/* Ressources › Guide stratégique (docs/guide.md). Complète encyclopedie.css (page, fil d'Ariane, pastilles de version,
   fiches précédente / suivante) ; couleurs par variables seulement : le mode sombre les suit seul. */

.guide-page {
    max-width: 860px;
}

.guide-tete {
    margin-bottom: 1.4rem;
    text-align: left;
}

.guide-tete h1 {
    margin: 0 0 0.5rem;
    text-align: left;
    font-family: 'Grandstander', cursive;
    font-size: clamp(1.6rem, 4.5vw, 2.2rem);
    line-height: 1.2;
    color: var(--brun-nuit);
}

.guide-tete p {
    margin: 0;
    max-width: 65ch;
    line-height: 1.55;
}

.guide-rang {
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brun-cuir);
}

.guide-intro {
    font-size: 1.05rem;
}

/* Accueil : fiches dans l'ordre de lecture */
.guide-liste {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.guide-carte a {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    height: 100%;
    padding: 0.85rem 1rem;
    color: inherit;
    text-decoration: none;
    background: var(--beige-clair);
    border: 1px solid var(--beige-fonce);
    border-radius: 10px;
    transition:
        border-color 0.15s,
        box-shadow 0.15s,
        transform 0.15s;
}

.guide-carte a:hover,
.guide-carte a:focus-visible {
    border-color: var(--or);
    box-shadow: 0 8px 18px rgba(75, 48, 30, 0.14);
    transform: translateY(-2px);
}

.guide-carte-rang {
    flex: 0 0 2.2rem;
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    font-family: 'Grandstander', cursive;
    font-weight: 800;
    color: var(--brun-nuit);
    background: var(--or-clair);
    border: 1px solid var(--or);
    border-radius: 50%;
}

.guide-carte-corps {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.guide-carte-titre {
    font-family: 'Grandstander', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--brun-nuit);
}

.guide-carte-texte {
    font-size: 0.92rem;
    line-height: 1.45;
}

/* Fiche */
.guide-sommaire {
    margin: 0 0 1.2rem;
    padding: 0.7rem 1rem;
    background: var(--beige-clair);
    border: 1px solid var(--beige-fonce);
    border-radius: 10px;
}

.guide-sommaire-titre {
    margin: 0 0 0.3rem;
    font-weight: 700;
    color: var(--brun-cuir);
}

.guide-sommaire ol {
    margin: 0;
    padding-left: 1.3rem;
}

.guide-legende {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0 0 1.2rem;
    font-size: 0.85rem;
}

.guide-vide {
    padding: 1rem;
    text-align: center;
    font-style: italic;
    background: var(--beige-clair);
    border: 1px dashed var(--beige-fonce);
    border-radius: 10px;
}

.guide-section {
    margin-bottom: 1.6rem;
    scroll-margin-top: 5rem;
}

.guide-section h2,
.guide-section h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.6rem;
    margin: 0 0 0.5rem;
    font-family: 'Grandstander', cursive;
    font-size: 1.3rem;
    line-height: 1.3;
    color: var(--brun-nuit);
}

.guide-section h3 {
    font-size: 1.12rem;
}

/* Groupe de sections (fiche « Les rôles » : principaux, secondaires) : titre souligné d'un filet, phrase d'introduction */
.guide-groupe {
    margin: 2rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--or);
    scroll-margin-top: 5rem;
}

.guide-groupe h2 {
    margin: 0 0 0.2rem;
    font-family: 'Grandstander', cursive;
    font-size: 1.45rem;
    line-height: 1.3;
    color: var(--brun-nuit);
}

.guide-groupe p {
    margin: 0;
    line-height: 1.5;
}

.guide-sommaire-groupe {
    font-weight: 700;
}

.guide-sommaire ol ol {
    margin-bottom: 0.3rem;
}

/* La section qui suit un groupe (hors groupe) s'en détache */
.guide-section--groupe + .guide-section:not(.guide-section--groupe) {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--beige-fonce);
}

.guide-section p {
    margin: 0;
    line-height: 1.6;
}

/* Encart discret à la suite d'une section (Maskemane après le soigneur) : plus petit, liseré de sa version */
.guide-section p.guide-complement {
    margin-top: 0.6rem;
    padding-left: 0.8rem;
    border-left: 3px solid var(--or);
    font-size: 0.92rem;
}

/* Section qui ne vaut qu'à une version : liseré à la couleur de sa pastille */
.guide-section--origine {
    padding-left: 0.9rem;
    border-left: 4px solid var(--brun-cuir-clair);
}

.guide-section--4x {
    padding-left: 0.9rem;
    border-left: 4px solid var(--or);
}

@media (max-width: 575.98px) {
    .guide-carte a {
        padding: 0.75rem 0.8rem;
        gap: 0.7rem;
    }

    .guide-voisins {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .guide-voisins .enc-voisin--hasard {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
    }
}
