/* =============================================================================================
   www/vitrine/vitrine.css — Vitrine Portail Animation (index.php), 14/10/2026.

   Polices système uniquement : aucune requête vers un service de polices (règle du dépôt).
   Thème clair/sombre automatique selon le réglage de l'appareil.
   Deux teintes de service : bleu = Gestion2colo (directeurs), vert = Organisme (organisateurs).
   ============================================================================================= */

:root {
    --fond: #f6f7fb;
    --fond-alt: #eef1f7;
    --surface: #ffffff;
    --texte: #18212f;
    --texte-doux: #4b5567;
    --bordure: #dde2ec;
    --ombre: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);

    --g2c: #1d4f9c;
    --g2c-fond: #e8effa;
    --org: #0f7a5c;
    --org-fond: #e3f4ee;
    --accent: #c2410c;

    --rayon: 16px;
    --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fond: #0f141c;
        --fond-alt: #141b25;
        --surface: #18202c;
        --texte: #e8edf4;
        --texte-doux: #a5b0c0;
        --bordure: #2a3443;
        --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);

        --g2c: #7fb0f5;
        --g2c-fond: #1a2a44;
        --org: #5fd3ad;
        --org-fond: #15342b;
        --accent: #fb923c;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

img { max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 3.2vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.vit-cadre { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.vit-etroit { max-width: 820px; }

.vit-evitement {
    position: absolute; left: -9999px; top: 0;
    background: var(--surface); padding: 8px 12px; z-index: 10;
}
.vit-evitement:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.vit-ico { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- En-tête ---------- */
.vit-entete {
    background: var(--surface);
    border-bottom: 1px solid var(--bordure);
}
.vit-entete-ligne {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 64px; gap: 12px;
}
.vit-marque {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 1.05rem; text-decoration: none;
}
/* Le logo est gris ardoise : sur fond sombre il lui faut son propre disque clair. */
.vit-logo {
    display: inline-flex; width: 44px; height: 44px; border-radius: 50%;
    align-items: center; justify-content: center; background: #fff;
    border: 1px solid var(--bordure);
}
.vit-logo img { width: 34px; height: auto; }
.vit-retour {
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none; color: var(--texte-doux); font-weight: 600; font-size: .95rem;
    padding: 8px 12px; border-radius: 10px;
}
.vit-retour:hover { background: var(--fond-alt); color: var(--texte); }

/* ---------- Bandeaux ---------- */
.vit-hero { padding: 64px 0 40px; text-align: center; }
.vit-hero p.vit-chapo {
    font-size: 1.2rem; color: var(--texte-doux); max-width: 720px; margin: 0 auto;
}
.vit-surtitre {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.vit-hero.vit-g2c .vit-surtitre { color: var(--g2c); }
.vit-hero.vit-org .vit-surtitre { color: var(--org); }

.vit-section { padding: 48px 0; }
.vit-section.vit-alt { background: var(--fond-alt); }
.vit-section > .vit-cadre > h2 { text-align: center; }
.vit-section .vit-intro { text-align: center; color: var(--texte-doux); max-width: 680px; margin: 0 auto 32px; }

/* ---------- Les deux portes d'entrée ---------- */
.vit-portes {
    display: grid; gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.vit-porte {
    position: relative;
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon);
    box-shadow: var(--ombre); padding: 32px 28px 28px;
    border-top: 6px solid var(--teinte);
    transition: transform .15s, box-shadow .15s;
}
.vit-porte:hover { transform: translateY(-2px); }
.vit-porte.vit-g2c { --teinte: var(--g2c); --teinte-fond: var(--g2c-fond); }
.vit-porte.vit-org { --teinte: var(--org); --teinte-fond: var(--org-fond); }
.vit-porte .vit-pour {
    font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: var(--teinte);
}
.vit-porte h2 { margin: 6px 0 10px; font-size: 1.8rem; }
.vit-porte ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.vit-porte li { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; }
.vit-porte li .vit-ico { color: var(--teinte); margin-top: .2em; }
/* Carte entièrement cliquable : le lien principal couvre la carte, les autres liens passent au-dessus. */
.vit-porte .vit-couvrant::after { content: ""; position: absolute; inset: 0; border-radius: var(--rayon); }
.vit-porte .vit-boutons { position: relative; z-index: 1; }
.vit-porte .vit-boutons .vit-couvrant { position: static; }

/* ---------- Boutons ---------- */
.vit-boutons { display: flex; flex-wrap: wrap; gap: 12px; }
.vit-hero .vit-boutons { justify-content: center; margin-top: 28px; }
.vit-btn {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    min-height: 46px; padding: 10px 20px; border-radius: 12px;
    font-weight: 700; font-size: 1rem; text-decoration: none;
    border: 2px solid transparent; transition: filter .15s, background .15s;
}
.vit-btn-plein { background: var(--teinte, var(--accent)); color: #fff; }
@media (prefers-color-scheme: dark) { .vit-btn-plein { color: #0f141c; } }
.vit-btn-plein:hover { filter: brightness(1.08); }
.vit-btn-contour { border-color: var(--teinte, var(--bordure)); color: var(--teinte, var(--texte)); background: transparent; }
.vit-btn-contour:hover { background: var(--teinte-fond, var(--fond-alt)); }
.vit-g2c { --teinte: var(--g2c); --teinte-fond: var(--g2c-fond); }
.vit-org { --teinte: var(--org); --teinte-fond: var(--org-fond); }

/* ---------- Cartes de fonctionnalités ---------- */
.vit-grille {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.vit-carte {
    background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon);
    padding: 22px; box-shadow: var(--ombre);
}
.vit-carte h3 { margin-top: 12px; }
.vit-carte p { color: var(--texte-doux); margin: 0; font-size: .97rem; }
.vit-pastille {
    display: inline-flex; width: 44px; height: 44px; border-radius: 12px;
    align-items: center; justify-content: center;
    background: var(--teinte-fond, var(--fond-alt)); color: var(--teinte, var(--accent));
}
.vit-pastille .vit-ico { width: 24px; height: 24px; }

/* Carte-lien (documents, renvois) */
a.vit-carte {
    display: flex; gap: 16px; align-items: center; text-decoration: none;
    transition: border-color .15s, transform .15s;
}
a.vit-carte:hover { border-color: var(--teinte, var(--accent)); transform: translateY(-2px); }
a.vit-carte h3 { margin: 0 0 2px; }
a.vit-carte .vit-suite { margin-left: auto; color: var(--teinte, var(--accent)); }

/* ---------- Étapes ---------- */
.vit-etapes { counter-reset: etape; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.vit-etape { position: relative; padding: 22px 22px 22px 70px; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); }
.vit-etape::before {
    counter-increment: etape; content: counter(etape);
    position: absolute; left: 20px; top: 20px;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; background: var(--teinte, var(--accent)); color: #fff;
}
@media (prefers-color-scheme: dark) { .vit-etape::before { color: #0f141c; } }
.vit-etape p { margin: 0; color: var(--texte-doux); }

/* ---------- Encadrés ---------- */
.vit-encadre {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--teinte-fond, var(--fond-alt)); border-radius: var(--rayon);
    padding: 20px 22px; margin: 24px 0;
}
.vit-encadre .vit-ico { color: var(--teinte, var(--accent)); width: 26px; height: 26px; margin-top: 2px; }
.vit-encadre p:last-child { margin-bottom: 0; }

/* ---------- Pages de texte (légal) ---------- */
.vit-texte { padding: 40px 0 56px; }
.vit-texte h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.vit-texte h2 { font-size: 1.3rem; margin-top: 2em; padding-top: .2em; }
.vit-texte .vit-maj { color: var(--texte-doux); font-size: .92rem; }
.vit-texte ul { padding-left: 1.2em; }
.vit-texte li { margin-bottom: .4em; }
.vit-texte dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 1em; }
.vit-texte dt { font-weight: 700; }
.vit-texte dd { margin: 0; }
@media (max-width: 560px) {
    .vit-texte dl { grid-template-columns: 1fr; }
    .vit-texte dd { margin-bottom: 8px; }
}
.vit-a-completer { background: #fde68a; color: #422006; padding: 0 4px; border-radius: 4px; }

/* ---------- Pied ---------- */
.vit-pied {
    border-top: 1px solid var(--bordure); background: var(--surface);
    padding: 28px 0; font-size: .92rem; color: var(--texte-doux); text-align: center;
}
.vit-pied-liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 10px; }
.vit-pied-liens a { color: var(--texte); font-weight: 600; text-decoration: none; }
.vit-pied-liens a:hover { text-decoration: underline; }
.vit-pied p { margin: 0; }

@media (max-width: 560px) {
    .vit-hero { padding: 40px 0 24px; }
    .vit-section { padding: 36px 0; }
    .vit-porte { padding: 26px 20px 22px; }
    .vit-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* Utilitaires — la CSP refuse les attributs style="", tout passe par une classe. */
.vit-serree { padding-top: 8px; }
.vit-centre { text-align: center; margin-top: 28px; }
.vit-grille-docs { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .vit-grille-docs { grid-template-columns: 1fr; } }
