/* ==========================================================================
   style.css — Styles communs à toutes les pages
   --------------------------------------------------------------------------
   1. Variables (couleurs, polices...)  <-- modifiez ici l'identité visuelle
   2. Base / reset
   3. Mise en page (conteneur, sections, grilles)
   4. Boutons
   5. Cartes, badges
   6. Formulaires
   7. Bandeau de titre des pages
   8. Fonds de section
   9. Bandeau « cours d'essai »
   10. Animations (apparition, révélation des titres, défilement infini)
   11. « Comment ça marche »
   12. En-tête et pied de page
   13. Gamification (série, barres de progression, notifications)

   Parti pris (choisi avec ui-ux-pro-max) : « claymorphism » pour l'enseignement :
   formes douces et épaisses, bordures de 2,5 px, ombres doubles (une ombre pleine
   dessous + une ombre diffuse), boutons qui s'enfoncent quand on appuie.
   Palette : orange chaleureux (marque) + bleu confiance (action), sur fond papier.
   Polices : Baloo 2 (titres, arrondie et vivante) + Nunito (texte, très lisible).
   Approche « mobile-first » : les styles de base sont ceux du mobile.
   ========================================================================== */


/* ===== 1. VARIABLES ===== */
:root {
    /* Bleu : confiance, actions (boutons, liens) */
    --bleu:         #2563EB;
    --bleu-fonce:   #1E3A8A;   /* titres, fonds sombres */
    --bleu-clair:   #DBEAFE;
    --bleu-bord:    #93C5FD;
    /* Orange : marque, accents (pastilles, surlignage, repères) */
    --accent:       #F97316;
    --accent-fonce: #EA580C;
    --accent-clair: #FFEDD5;
    --accent-bord:  #FDBA74;
    --sur-accent:   #2B1204;   /* encre à poser sur un aplat orange (contraste 6:1) */
    /* Vert : bonnes réponses (le nom « menthe » est gardé pour les fiches existantes) */
    --menthe:       #16A34A;
    --menthe-fonce: #15803D;
    --menthe-clair: #DCFCE7;
    /* Violet : un 3e repère de couleur (niveaux, matières) */
    --violet:       #7C3AED;
    --violet-clair: #EDE9FE;
    /* Rouge du stylo du professeur : corrections, erreurs */
    --rouge:        #DC2626;
    --erreur:       #B91C1C;

    /* Fonds et textes (papier chaud, encre brune : plus doux que du noir pur) */
    --creme:        #FFF7ED;
    --blanc:        #FFFFFF;
    --texte:        #33200F;
    --texte-doux:   #6B5240;
    --bordure:      #F1DFCB;
    --bordure-forte:#DDC3A5;

    /* Formes « argile » */
    --rayon:        24px;
    --rayon-petit:  14px;
    --ombre:        0 5px 0 var(--bordure), 0 14px 28px rgba(120, 53, 15, .08);
    --ombre-forte:  0 6px 0 rgba(120, 53, 15, .12), 0 22px 44px rgba(120, 53, 15, .16);

    /* Typographie */
    --police-titre: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
    --police-texte: 'Nunito', 'Segoe UI', system-ui, sans-serif;
    --police-main:  'Playwrite FR Moderne', 'Segoe Script', cursive;   /* écriture cursive d'école (accueil, 404) */

    /* Dimensions */
    --largeur:      1120px;
    --hauteur-nav:  72px;
    --sortie:       cubic-bezier(.16, 1, .3, 1);   /* courbe des animations : démarre vite, finit doucement */
    --rebond:       cubic-bezier(.22, 1, .36, 1);   /* sortie exponentielle : décélère sans rebondir */
}


/* ===== 2. BASE / RESET ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--hauteur-nav) + 16px);  /* évite que le menu sticky masque les ancres */
    -webkit-text-size-adjust: 100%;
    scrollbar-color: var(--bordure-forte) var(--creme);
}

body {
    margin: 0;
    font-family: var(--police-texte);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--texte);
    background: var(--creme);
    -webkit-font-smoothing: antialiased;
    accent-color: var(--bleu);
    caret-color: var(--bleu);
}

::selection { background: var(--accent); color: var(--sur-accent); }

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
    font-family: var(--police-titre);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.01em;
    margin: 0 0 .5em;
    color: var(--bleu-fonce);
    text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 6.6vw, 4rem); font-weight: 800; line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 4.6vw, 2.6rem); }
h3 { font-size: 1.3rem; line-height: 1.2; }

p  { margin: 0 0 1em; }
a  { color: var(--bleu); text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
a:hover { color: var(--bleu-fonce); text-decoration-thickness: 2.5px; }
ul { padding-left: 1.2em; }

/* Coup de surligneur sur un mot important */
mark, .surligne {
    color: inherit; padding: 0 .1em; margin: 0 -.1em;
    background: linear-gradient(transparent 58%, var(--accent-bord) 58%, var(--accent-bord) 92%, transparent 92%);
}

[hidden] { display: none !important; }

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

/* Icônes SVG inline (voir fonction icone() en PHP) */
.icone { width: 1.25em; height: 1.25em; flex-shrink: 0; display: inline-block; vertical-align: -.2em; }

/* Texte réservé aux lecteurs d'écran */
.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* Lien « Aller au contenu » (accessibilité clavier) */
.lien-evitement {
    position: absolute; left: -999px; top: 8px; z-index: 200;
    background: var(--blanc); padding: .6em 1em; border-radius: var(--rayon-petit);
}
.lien-evitement:focus { left: 8px; }

/* Piège à robots des formulaires : invisible pour les humains */
.piege { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Respect des préférences « réduire les animations » : tout reste visible, plus rien ne bouge */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js [data-coupe] { visibility: visible !important; }
}


/* ===== 3. MISE EN PAGE ===== */
.conteneur {
    width: 100%;
    max-width: var(--largeur);
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 64px 0; }

.section__entete { max-width: 700px; margin-bottom: 36px; }
.section__entete > :last-child { margin-bottom: 0; }
.section__entete--centre { margin-left: auto; margin-right: auto; text-align: center; }
.section__intro { color: var(--texte-doux); font-size: 1.15rem; max-width: 60ch; }
.section__entete--centre .section__intro { margin-left: auto; margin-right: auto; }

/* Grilles réutilisables : 1 colonne sur mobile, plus sur grand écran */
.grille { display: grid; gap: 20px; }
@media (min-width: 640px)  { .grille--2, .grille--3, .grille--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .grille--3 { grid-template-columns: repeat(3, 1fr); }
                             .grille--4 { grid-template-columns: repeat(4, 1fr); } }

@media (min-width: 768px) { .section { padding: 96px 0; } }


/* ===== 4. BOUTONS (argile : épais, ombre pleine dessous, ils s'enfoncent au clic) ===== */
.btn {
    --bouton: var(--bleu);
    --bouton-ombre: #1E40AF;
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 52px; padding: .55em 1.5em .6em;
    font: 700 1.1rem/1.2 var(--police-titre);
    text-decoration: none; text-align: center;
    color: var(--blanc); background: var(--bouton);
    border: 0; border-radius: 16px;
    box-shadow: 0 5px 0 var(--bouton-ombre), 0 12px 20px rgba(30, 58, 138, .18), inset 0 2px 0 rgba(255, 255, 255, .3);
    cursor: pointer; position: relative;
    transition: translate .2s var(--rebond), box-shadow .2s var(--sortie), background .2s;
}
.btn:hover { color: var(--blanc); text-decoration: none; }
@media (hover: hover) {
    .btn:hover { translate: 0 -2px; box-shadow: 0 7px 0 var(--bouton-ombre), 0 16px 24px rgba(30, 58, 138, .22), inset 0 2px 0 rgba(255, 255, 255, .3); }
}
.btn:active { translate: 0 4px; box-shadow: 0 1px 0 var(--bouton-ombre), inset 0 2px 0 rgba(255, 255, 255, .2); }

/* Action principale (« Réserver ») : bleu confiance */
.btn-accent { --bouton: var(--bleu); --bouton-ombre: #1E40AF; }
/* Action sur fond sombre ou pour attirer l'œil : orange */
.btn-orange { --bouton: var(--accent); --bouton-ombre: #C2410C; color: var(--sur-accent); box-shadow: 0 5px 0 var(--bouton-ombre), 0 12px 20px rgba(194, 65, 12, .25), inset 0 2px 0 rgba(255, 255, 255, .35); }
.btn-orange:hover { color: var(--sur-accent); }

.btn-primaire { --bouton: var(--bleu-fonce); --bouton-ombre: #0F1F52; }

.btn-contour {
    color: var(--bleu-fonce); background: var(--blanc);
    border: 2.5px solid var(--bleu-fonce); padding-block: calc(.55em - 2.5px) calc(.6em - 2.5px);
    box-shadow: 0 5px 0 var(--bleu-fonce);
}
.btn-contour:hover { color: var(--bleu-fonce); background: var(--bleu-clair); }
@media (hover: hover) { .btn-contour:hover { box-shadow: 0 7px 0 var(--bleu-fonce); } }
.btn-contour:active { box-shadow: 0 1px 0 var(--bleu-fonce); }

.btn-blanc { color: var(--bleu-fonce); background: var(--blanc); box-shadow: 0 5px 0 rgba(0, 0, 0, .25), inset 0 2px 0 #fff; }
.btn-blanc:hover { color: var(--bleu-fonce); }

.btn-bloc { width: 100%; }
.groupe-boutons { display: flex; flex-wrap: wrap; gap: 14px 16px; padding-bottom: 6px; }

/* Lien fléché (action secondaire dans un texte) */
.lien-fleche { font-weight: 800; text-decoration: none; white-space: nowrap; }
.lien-fleche::after { content: "→"; display: inline-block; margin-left: .35em; transition: translate .25s var(--rebond); }
.lien-fleche:hover { text-decoration: underline; }
.lien-fleche:hover::after { translate: 5px 0; }


/* ===== 5. CARTES, BADGES ===== */
.carte {
    background: var(--blanc);
    border: 2.5px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 24px;
    box-shadow: var(--ombre), inset 0 2px 0 #fff;
}

.badge {
    display: inline-block; padding: .2em .75em;
    font-size: .85rem; font-weight: 800;
    border-radius: 999px;
    background: var(--bleu-clair); color: var(--bleu-fonce);
}
.badge--menthe { background: var(--menthe-clair); color: #14532D; }
.badge--gris   { background: #F1E8DC; color: var(--texte-doux); }
.badge--blanc  { background: var(--blanc); color: var(--bleu-fonce); }

/* Liste à puces « coche » (tracée comme une coche au stylo) */
.liste-coches { list-style: none; padding: 0; margin: 0 0 1em; }
.liste-coches li { position: relative; padding-left: 1.9em; margin-bottom: .5em; }
.liste-coches li::before {
    content: ""; position: absolute; left: .1em; top: .28em; width: 1.05em; height: 1.05em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803D' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}


/* ===== 6. FORMULAIRES ===== */
.formulaire { display: grid; gap: 16px; }
.formulaire__ligne { display: grid; gap: 16px; }
@media (min-width: 640px) { .formulaire__ligne--2 { grid-template-columns: 1fr 1fr; } }

.champ label { display: block; margin-bottom: .3em; font-weight: 800; font-size: .98rem; }
.champ__aide { font-weight: 400; color: var(--texte-doux); }

.champ input[type="text"], .champ input[type="email"], .champ input[type="tel"],
.champ select, .champ textarea {
    width: 100%; min-height: 52px; padding: .65em 1em;
    font: inherit; color: var(--texte);
    background: var(--creme);
    border: 2.5px solid var(--bordure); border-radius: var(--rayon-petit);
    box-shadow: inset 0 3px 6px rgba(120, 53, 15, .08);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.champ textarea { min-height: 140px; resize: vertical; }
.champ input:hover, .champ select:hover, .champ textarea:hover { border-color: var(--bordure-forte); }
.champ input:focus, .champ select:focus, .champ textarea:focus {
    outline: none; background: var(--blanc); border-color: var(--bleu); box-shadow: 0 0 0 4px var(--bleu-clair);
}
.champ--erreur input, .champ--erreur select, .champ--erreur textarea { border-color: var(--erreur); }
.champ__erreur { margin: .3em 0 0; font-size: .95rem; font-weight: 800; color: var(--erreur); }

.champ label.champ--case { display: flex; font-weight: 400; gap: .7em; align-items: flex-start; font-size: .98rem; color: var(--texte-doux); cursor: pointer; }
.champ--case input { margin-top: .2em; width: 22px; height: 22px; flex-shrink: 0; }

/* Messages de retour (succès / erreur générale) */
.alerte { padding: 14px 18px; border-radius: var(--rayon-petit); margin-bottom: 20px; font-weight: 800; }
.alerte--succes { background: var(--menthe-clair); color: #14532D; border: 2px solid #86EFAC; }
.alerte--erreur { background: #FEE2E2; color: var(--erreur); border: 2px solid #FCA5A5; }


/* ===== 7. BANDEAU DE TITRE DES PAGES INTÉRIEURES : fond papier à pois (comme un cahier) ===== */
.page-titre {
    background: var(--accent-clair) radial-gradient(circle, #F5C9A0 1.6px, transparent 1.7px) 0 0 / 22px 22px;
    border-bottom: 3px solid var(--accent-bord);
    padding: 48px 0 44px;
}
.page-titre h1 { margin-bottom: .3em; font-size: clamp(2.2rem, 5.6vw, 3.4rem); }
.page-titre p { max-width: 58ch; margin: 0; color: var(--texte-doux); font-size: 1.2rem; }
@media (min-width: 768px) { .page-titre { padding: 76px 0 64px; } }

/* FAQ (balises <details>, sans JavaScript) */
.faq details { background: var(--blanc); border: 2.5px solid var(--bordure); border-radius: var(--rayon-petit); margin-bottom: 10px; }
.faq summary { padding: 16px 20px; font-weight: 800; cursor: pointer; }
.faq details[open] summary { color: var(--bleu); }
.faq details p { padding: 0 20px; margin-bottom: 16px; color: var(--texte-doux); }


/* ==========================================================================
   8. FONDS DE SECTION (aplats)
   Utilisation : <section class="section section--bleu"> etc.
   ========================================================================== */
.section--blanc, .section--menthe { background: var(--blanc); }
.section--bleu   { background: #EAF2FF; }
.section--creme  { background: var(--creme); }
.section--orange { background: var(--accent-clair); }
.section--cta    { padding: 0; background: var(--bleu-fonce); }


/* ==========================================================================
   9. BANDEAU D'APPEL À L'ACTION (includes/cta-essai.php) : pleine largeur, à l'encre
   ========================================================================== */
.cta-final {
    position: relative; display: grid; gap: 28px; align-items: center;
    padding: 64px 0; color: var(--blanc);
}
.cta-final h2 { color: var(--blanc); margin-bottom: .35em; }
.cta-final p { max-width: 52ch; margin: 0; color: #C7D7FB; font-size: 1.15rem; }
@media (min-width: 900px) {
    .cta-final { grid-template-columns: 1fr auto; gap: 56px; padding: 88px 0; }
    .cta-final .groupe-boutons { flex-direction: column; align-items: stretch; }
}


/* ==========================================================================
   10. ANIMATIONS
   Principe : le contenu est TOUJOURS visible tant que le JavaScript n'a pas pris la main
   (classe .anim-ok posée par animations.js). Aucune animation ne cache du contenu si le script échoue.
   Les animations de transform / opacity restent fluides, même sur téléphone.
   ========================================================================== */

/* --- Apparition au défilement : <div data-anim> ; <ul data-anim-groupe> décale ses enfants (--i) --- */
.anim-ok [data-anim]:not(.visible),
.anim-ok [data-anim-groupe]:not(.visible) > * { opacity: 0; translate: 0 36px; }
.anim-ok [data-anim].visible,
.anim-ok [data-anim-groupe].visible > * {
    animation: apparition .9s var(--sortie) both;
    animation-delay: calc(var(--i, 0) * 90ms);
}
.anim-ok [data-anim="gauche"]:not(.visible) { translate: -48px 0; }
.anim-ok [data-anim="droite"]:not(.visible) { translate: 48px 0; }
.anim-ok [data-anim="zoom"]:not(.visible)   { translate: 0 20px; scale: .92; }
@keyframes apparition { from { opacity: 0; translate: var(--depart, 0 36px); scale: var(--zoom, 1); } to { opacity: 1; translate: 0 0; scale: 1; } }
.anim-ok [data-anim="gauche"].visible { --depart: -48px 0; }
.anim-ok [data-anim="droite"].visible { --depart: 48px 0; }
.anim-ok [data-anim="zoom"].visible   { --depart: 0 20px; --zoom: .92; }

/* --- Entrée à l'ouverture de la page (haut de l'accueil) : fonctionne en CSS pur --- */
[data-entree] { animation: apparition .9s var(--sortie) both; animation-delay: calc(var(--i, 0) * 110ms + 450ms); }

/* --- Révélation des titres mot à mot, par un volet vertical (technique « Vertical Cut Reveal ») --- */
.js [data-coupe]:not(.coupe--pret) { visibility: hidden; animation: voir 0s 1.5s forwards; }   /* secours : visible après 1,5 s même sans script */
@keyframes voir { to { visibility: visible; } }
.coupe__mot { display: inline-block; vertical-align: top; overflow: hidden; padding: .06em .04em .16em; margin: -.06em -.04em -.16em; }
.coupe__int { display: inline-block; transform: translateY(115%) rotate(5deg); transform-origin: 0 100%; }
.coupe--pret .coupe__int { animation: coupe .85s var(--sortie) both; animation-delay: calc(var(--i, 0) * 85ms + 150ms); }
@keyframes coupe { from { transform: translateY(115%) rotate(5deg); } to { transform: none; } }
/* le dernier mot reçoit un coup de surligneur, tracé après la révélation */
.coupe__mot--marque .coupe__int {
    background: linear-gradient(transparent 60%, var(--accent-bord) 60%, var(--accent-bord) 93%, transparent 93%) no-repeat 0 0 / 0% 100%;
}
.coupe--pret .coupe__mot--marque .coupe__int {
    animation: coupe .85s var(--sortie) both, marque .8s .95s var(--sortie) forwards;
    animation-delay: calc(var(--i, 0) * 85ms + 150ms), 0s;
}
@keyframes marque { to { background-size: 100% 100%; } }

/* --- Défilement infini (technique « Marquee ») : la piste contient deux copies, on la déplace de la moitié --- */
.defile { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.defile__piste { display: flex; width: max-content; animation: defile var(--duree, 50s) linear infinite; will-change: transform; }
.defile__groupe { display: flex; flex-shrink: 0; gap: var(--ecart, 20px); padding-right: var(--ecart, 20px); }
.defile:hover .defile__piste, .defile:focus-within .defile__piste { animation-play-state: paused; }
@keyframes defile { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .defile { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
    .defile__groupe[aria-hidden="true"] { display: none; }
}


/* ==========================================================================
   11. « COMMENT ÇA MARCHE » (includes/etapes.php) : quatre pastilles numérotées reliées par un trait
   ========================================================================== */
.etapes-cartes { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 36px; }
@media (min-width: 640px)  { .etapes-cartes { grid-template-columns: repeat(2, 1fr); gap: 44px 32px; } }
@media (min-width: 1000px) { .etapes-cartes { grid-template-columns: repeat(4, 1fr); gap: 28px; } }
/* le trait pointillé se dessine quand la liste apparaît */
@media (min-width: 1000px) {
    .etapes-cartes::before {
        content: ""; position: absolute; left: 36px; right: 36px; top: 35px; border-top: 4px dotted var(--accent-bord);
        transform-origin: left; transition: transform 1.4s .3s var(--sortie);
    }
    .anim-ok .etapes-cartes:not(.visible)::before { transform: scaleX(0); }
}
.etape-carte { position: relative; }
.etape-carte__numero {
    position: relative; z-index: 1; display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 18px;
    font: 800 2rem/1 var(--police-titre); color: var(--sur-accent);
    background: var(--accent); border-radius: 50% 50% 50% 14px;
    box-shadow: 0 5px 0 #C2410C, 0 12px 20px rgba(194, 65, 12, .22), inset 0 2px 0 rgba(255, 255, 255, .4);
    transition: rotate .4s var(--rebond);
}
.etape-carte:nth-child(even) .etape-carte__numero { background: #60A5FA; box-shadow: 0 5px 0 #1D4ED8, 0 12px 20px rgba(29, 78, 216, .2), inset 0 2px 0 rgba(255, 255, 255, .4); color: #0B1B4D; border-radius: 50% 50% 14px 50%; }
@media (hover: hover) { .etape-carte:hover .etape-carte__numero { rotate: -8deg; } }
.etape-carte h3 { margin-bottom: .3em; }
.etape-carte p { margin: 0; color: var(--texte-doux); }
.etapes-cta { margin-top: 44px; }


/* ==========================================================================
   12. EN-TÊTE (menu sticky) ET PIED DE PAGE
   ========================================================================== */
/* ===== NAVIGATION ===== */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--blanc);
    border-bottom: 3px solid var(--bordure);
}
/* barre de lecture : un trait orange qui se remplit au fil de la page (--defile : 0 à 1, posé par animations.js) */
.nav::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--accent);
    transform: scaleX(var(--defile, 0)); transform-origin: left;
}
.nav__interieur {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    height: var(--hauteur-nav);
}

/* Logo */
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    font: 700 1.5rem/1 var(--police-titre); letter-spacing: -.01em;
    color: var(--bleu-fonce); text-decoration: none; white-space: nowrap;
}
.logo strong { font-weight: 800; color: var(--accent-fonce); }
.logo img { transition: rotate .4s var(--rebond); }
@media (hover: hover) { .logo:hover img { rotate: -12deg; } }
.logo:hover { color: var(--bleu-fonce); text-decoration: none; }
.logo--clair, .logo--clair:hover { color: var(--blanc); }
.logo--clair strong { color: var(--accent-bord); }

/* Bouton burger (mobile) */
.nav__burger {
    width: 48px; height: 48px; padding: 0;
    background: var(--accent-clair); border: 0; border-radius: 14px; cursor: pointer;
    display: grid; place-items: center;
}
.nav__burger-barres,
.nav__burger-barres::before,
.nav__burger-barres::after {
    display: block; width: 22px; height: 3px;
    background: var(--bleu-fonce); border-radius: 2px;
    transition: transform .25s var(--sortie), background .2s;
}
.nav__burger-barres { position: relative; }
.nav__burger-barres::before, .nav__burger-barres::after { content: ""; position: absolute; left: 0; }
.nav__burger-barres::before { top: -7px; }
.nav__burger-barres::after  { top: 7px; }
/* burger -> croix quand le menu est ouvert */
.nav__burger[aria-expanded="true"] .nav__burger-barres { background: transparent; }
.nav__burger[aria-expanded="true"] .nav__burger-barres::before { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] .nav__burger-barres::after  { transform: translateY(-7px) rotate(-45deg); }

/* Menu : caché sur mobile, déplié par main.js (classe .ouvert) */
.nav__menu {
    position: absolute; top: calc(var(--hauteur-nav) + 3px); left: 0; right: 0;
    max-height: calc(100dvh - var(--hauteur-nav)); overflow-y: auto;
    background: var(--blanc);
    padding: 6px 20px 26px;
    border-bottom: 3px solid var(--bordure);
    box-shadow: var(--ombre-forte);
    display: none;
}
.nav__menu.ouvert { display: block; animation: menu-ouvre .35s var(--sortie) both; }
@keyframes menu-ouvre { from { opacity: 0; translate: 0 -12px; } to { opacity: 1; translate: 0 0; } }
.nav__menu ul { list-style: none; margin: 0 0 20px; padding: 0; }
.nav__menu li { display: flex; align-items: center; border-bottom: 2px solid var(--bordure); }
.nav__menu li a {
    flex: 1; display: block; padding: 16px 0;
    font: 700 1.25rem/1.2 var(--police-titre); color: var(--bleu-fonce); text-decoration: none;
}
.nav__menu li a:hover, .nav__menu li a.actif { color: var(--accent-fonce); }
.nav__menu .nav__cta { display: flex; }             /* dans le menu déplié : bouton pleine largeur */
.nav__droite { display: flex; align-items: center; gap: 8px; }
.nav__cta-mobile { min-height: 44px; padding: .3em 1em .35em; font-size: 1rem; white-space: nowrap; }
@media (max-width: 419px) { .logo__texte { display: none; } }

/* Bureau : menu horizontal */
@media (min-width: 1120px) {
    .nav__burger { display: none; }
    .nav__menu {
        position: static; display: flex; align-items: center; gap: 28px;
        max-height: none; overflow: visible;
        padding: 0; border: 0; box-shadow: none; background: none; animation: none;
    }
    .nav__menu ul { display: flex; gap: 2px; margin: 0; }
    .nav__menu li { border: 0; gap: 6px; }
    .nav__menu li a { flex: none; padding: 8px 12px; font: 700 1.08rem/1.2 var(--police-titre); border-radius: 12px; white-space: nowrap; transition: background .2s, color .2s; }
    .nav__menu li a:hover { background: var(--accent-clair); color: var(--bleu-fonce); }
    .nav__menu li a.actif { background: var(--accent-clair); color: var(--accent-fonce); }
    .nav__droite { display: none; }
    .nav__menu .nav__cta { display: inline-flex; min-height: 46px; padding-block: .3em .35em; white-space: nowrap; }
}


/* ===== PIED DE PAGE ===== */
.pied { background: var(--bleu-fonce); color: #C7D7FB; }
.pied a { color: #E5EDFF; text-decoration: none; }
.pied a:hover { color: var(--blanc); text-decoration: underline; }
.pied :focus-visible { outline-color: var(--accent); }

.pied__grille { display: grid; gap: 36px; padding-top: 60px; padding-bottom: 44px; border-top: 1px solid rgba(255, 255, 255, .14); }
@media (min-width: 640px)  { .pied__grille { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px)  { .pied__grille { grid-template-columns: 1.6fr 1fr 1fr 1.5fr; } }

.pied__titre { font-size: 1.15rem; color: var(--blanc); margin-bottom: .8em; }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: .55em; }
.pied__contact li { display: flex; gap: .6em; align-items: flex-start; }
.pied__contact .icone { margin-top: .2em; }

.pied__bloc--presentation p { margin: 1em 0; max-width: 34ch; }
.pied__reseau { display: inline-flex; align-items: center; gap: .5em; font-weight: 800; }

.pied__bas { border-top: 1px solid rgba(255, 255, 255, .14); padding: 20px 0; font-size: .95rem; }
.pied__bas-interieur { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.pied__bas p { margin: 0; }
.pied__legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }


/* ==========================================================================
   13. GAMIFICATION COMMUNE : série dans le menu, barres de progression, notifications
   (le JavaScript est dans assets/js/gamification.js)
   ========================================================================== */
/* ===== SÉRIE DE VISITES (dans le menu) ===== */
.nav__streak {
    display: inline-flex; align-items: center; gap: .2em; padding: .15em .55em;
    font-size: .9rem; font-weight: 800; line-height: 1.3; color: var(--sur-accent);
    background: var(--accent-bord); border-radius: 999px; white-space: nowrap;
}
.nav__streak .icone { width: 1em; height: 1em; }

/* ===== BARRES DE PROGRESSION ===== */
.progression { margin-bottom: 20px; }
.progression:last-child { margin-bottom: 0; }
.progression__texte { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; font-size: .98rem; color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.progression__nom { font-weight: 800; color: var(--texte); }
.progression__barre { height: 14px; border-radius: 999px; background: #F1E8DC; overflow: hidden; box-shadow: inset 0 3px 6px rgba(120, 53, 15, .14); }
.progression__remplie {
    width: 100%; height: 100%; border-radius: 999px;
    background: var(--menthe);
    box-shadow: inset 0 3px 5px rgba(255, 255, 255, .4);
    transform: scaleX(var(--pct, 0)); transform-origin: left;     /* --pct : 0 à 1, posé par gamification.js */
    transition: transform 1s var(--sortie);
}

/* ===== ICÔNES DES BADGES (masques SVG, posés par gamification.js : data-icone="flame") ===== */
.badge-icone {
    display: block; width: 1em; height: 1em; background: currentColor;
    -webkit-mask: var(--masque) center / contain no-repeat; mask: var(--masque) center / contain no-repeat;
}
.badge-icone[data-icone="check"]  { --masque: url(../images/icons/check.svg); }
.badge-icone[data-icone="flame"]  { --masque: url(../images/icons/flame.svg); }
.badge-icone[data-icone="trophy"] { --masque: url(../images/icons/trophy.svg); }
.badge-icone[data-icone="award"]  { --masque: url(../images/icons/award.svg); }
.badge-icone[data-icone="lock"]   { --masque: url(../images/icons/lock.svg); }

/* ===== NOTIFICATION « NOUVEAU BADGE » ===== */
.notifications { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: grid; gap: 10px; max-width: calc(100vw - 32px); }
.notification {
    display: flex; align-items: center; gap: 14px; padding: 14px 18px;
    background: var(--bleu-fonce); color: #C7D7FB; border-radius: var(--rayon);
    box-shadow: 0 5px 0 #0F1F52, var(--ombre-forte);
    animation: badge-apparition .6s var(--rebond) both;
}
.notification--sortie { opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .4s; }
.notification__emoji { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; font-size: 1.5rem; border-radius: 50%; background: var(--accent); color: var(--sur-accent); }
.notification__texte { display: grid; font-size: .98rem; }
.notification__texte strong { color: var(--blanc); }

@keyframes badge-apparition {
    from { opacity: 0; transform: translateY(20px) scale(.9); }
    to   { opacity: 1; transform: none; }
}
