/* Aide de GesCo – feuille de style commune à toutes les pages.
   Identité du site Cosoges : bleu-vert #127E8F, bleu nuit #1C1A2E, polices IBM Plex.
   Hors connexion (pages ouvertes en local), les polices Google ne sont pas chargées : repli sur Segoe UI. */

:root {
    --principal: #127e8f;
    --principal-fonce: #0d5f6c;
    --principal-clair: #e8f4f6;
    --nuit: #1c1a2e;
    --texte: #2b2a3a;
    --texte-secondaire: #5d5b6e;
    --bordure: #e2e1e8;
    --fond: #ffffff;
    --fond-doux: #f6f6f9;
    --astuce: #127e8f;
    --attention: #b5651d;
    --attention-fond: #fdf4ea;
    --police-texte: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --police-titres: "IBM Plex Mono", Consolas, monospace;
    --largeur-sommaire: 260px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--fond);
    color: var(--texte);
    font-family: var(--police-texte);
    font-size: 16px;
    line-height: 1.65;
}

a { color: var(--principal); }
a:hover { color: var(--principal-fonce); }

/* ---- Bandeau ------------------------------------------------------------ */

.bandeau {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: var(--fond);
    border-bottom: 1px solid var(--bordure);
}

.bandeau img { height: 34px; }

.bandeau .nom {
    font-family: var(--police-titres);
    font-weight: 600;
    font-size: 18px;
    color: var(--nuit);
    text-decoration: none;
}

.bandeau .nom span { color: var(--principal); }

.bandeau .site {
    margin-left: auto;
    padding: 6px 16px;
    border: 1px solid var(--nuit);
    border-radius: 999px;
    color: var(--nuit);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.bandeau .site:hover { background: var(--nuit); color: #fff; }

/* ---- Disposition : sommaire à gauche, contenu à droite ------------------ */

.page {
    display: grid;
    grid-template-columns: var(--largeur-sommaire) minmax(0, 1fr);
    max-width: 1240px;
    margin: 0 auto;
}

.sommaire {
    position: sticky;
    top: 57px;
    align-self: start;
    max-height: calc(100vh - 57px);
    overflow-y: auto;
    padding: 28px 16px 28px 24px;
    border-right: 1px solid var(--bordure);
    font-size: 15px;
}

.sommaire h2 {
    margin: 20px 0 6px;
    font-family: var(--police-titres);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--texte-secondaire);
}

.sommaire h2:first-child { margin-top: 0; }

.sommaire ul { list-style: none; margin: 0; padding: 0; }

.sommaire a {
    display: block;
    padding: 5px 10px;
    border-radius: 6px;
    color: var(--texte);
    text-decoration: none;
}

.sommaire a:hover { background: var(--fond-doux); }

.sommaire a.actif {
    background: var(--principal-clair);
    color: var(--principal-fonce);
    font-weight: 600;
}

.contenu {
    padding: 32px 48px 64px;
    max-width: 900px;
}

/* ---- Textes ------------------------------------------------------------- */

.fil {
    margin: 0 0 8px;
    font-family: var(--police-titres);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--principal);
}

.fil a { color: inherit; text-decoration: none; }

h1, h2, h3 {
    font-family: var(--police-titres);
    color: var(--nuit);
    line-height: 1.25;
}

h1 { margin: 0 0 12px; font-size: 34px; font-weight: 600; }

h2 {
    margin: 44px 0 12px;
    padding-top: 8px;
    font-size: 22px;
    font-weight: 600;
}

h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; }

.introduction { font-size: 18px; color: var(--texte-secondaire); margin: 0 0 24px; }

/* Nom d'un bouton, d'une case ou d'une option tel qu'il apparaît à l'écran */
.ecran {
    padding: 1px 7px;
    border: 1px solid var(--bordure);
    border-radius: 5px;
    background: var(--fond-doux);
    font-size: .92em;
    white-space: nowrap;
}

kbd {
    padding: 1px 7px;
    border: 1px solid #c9c8d2;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    font-family: var(--police-titres);
    font-size: .85em;
}

/* ---- Capture d'écran annotée --------------------------------------------- */

figure { margin: 24px 0; }

.capture {
    position: relative;
    border: 1px solid var(--bordure);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(28, 26, 46, .10);
}

.capture img { display: block; width: 100%; height: auto; }

/* Emplacement d'une capture pas encore faite : cadre en pointillés, à remplacer par l'image (voir docs/AIDE.md). */
.capture.a-venir {
    padding: 56px 16px;
    border-style: dashed;
    box-shadow: none;
    text-align: center;
    color: var(--texte-secondaire);
}

.capture.a-venir p { margin: 0; font-style: italic; }

/* Repère numéroté posé sur la capture ; position en % (style="left:..%; top:..%") */
.repere {
    position: absolute;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--principal);
    color: #fff;
    font: 600 13px/22px var(--police-titres);
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

figcaption { margin-top: 8px; font-size: 14px; color: var(--texte-secondaire); }

/* Légende des repères */
ol.reperes { list-style: none; padding: 0; margin: 16px 0; }

ol.reperes li { position: relative; padding-left: 40px; margin-bottom: 10px; counter-increment: repere; }

ol.reperes li::before {
    content: counter(repere);
    position: absolute;
    left: 0;
    top: 1px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--principal);
    color: #fff;
    font: 600 13px/26px var(--police-titres);
    text-align: center;
}

/* ---- Encadrés ------------------------------------------------------------ */

.encadre {
    margin: 20px 0;
    padding: 14px 18px;
    border-left: 4px solid var(--astuce);
    border-radius: 0 8px 8px 0;
    background: var(--principal-clair);
}

/* Titre de l'encadré : seulement le <strong> placé directement dans l'encadré (« > »), pas un mot en gras du texte
   (:first-child ne tient pas compte du texte qui précède : sans « > », le premier gras d'un paragraphe serait pris). */
.encadre > strong:first-child {
    display: block;
    margin-bottom: 2px;
    font-family: var(--police-titres);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--astuce);
}

.encadre.attention { border-color: var(--attention); background: var(--attention-fond); }
.encadre.attention > strong:first-child { color: var(--attention); }

.encadre p { margin: 0; }

/* Passage d'un texte juridique en cours de relecture (« à confirmer ») */
.a-confirmer { background: var(--attention-fond); color: var(--attention); border-radius: 3px; padding: 0 3px; }

/* ---- Cartes du sommaire général (page d'accueil) ------------------------- */

.cartes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin: 16px 0;
}

.carte {
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--bordure);
    border-radius: 8px;
    color: var(--texte);
    text-decoration: none;
}

.carte:hover { border-color: var(--principal); box-shadow: 0 4px 14px rgba(18, 126, 143, .12); }

.carte .titre-carte { display: block; font-family: var(--police-titres); font-weight: 600; color: var(--nuit); }

.carte .texte-carte { display: block; margin-top: 4px; font-size: 14px; color: var(--texte-secondaire); }

.carte.a-venir { opacity: .55; pointer-events: none; }

/* ---- Voir aussi et pied de page ----------------------------------------- */

.voir-aussi { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--bordure); }

.voir-aussi h2 { margin-top: 0; font-size: 16px; }

.pied {
    margin-top: 48px;
    font-size: 13px;
    color: var(--texte-secondaire);
}

/* ---- Petits écrans : le sommaire passe au-dessus du contenu ------------- */

@media (max-width: 820px) {
    .page { grid-template-columns: 1fr; }

    .sommaire {
        position: static;
        max-height: none;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--bordure);
    }

    .contenu { padding: 24px 16px 48px; }

    h1 { font-size: 27px; }

    .bandeau { padding: 10px 16px; }
}

/* ---- Impression : sans sommaire ni bandeau ------------------------------ */

@media print {
    .bandeau, .sommaire { display: none; }
    .page { display: block; }
    .capture { box-shadow: none; }
}
