/* =========================================================================
   Page d'accueil « install-first » — UNE page fluide (mobile-first).
   Les 3 cadres de la maquette (375 / 768 / 1280) sont des previews d'un
   SEUL écran responsive : ici, un seul flux + media queries.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Top nav (desktop uniquement — masquée sous 1024px)
   ------------------------------------------------------------------------- */
.topnav {
    display: none;
}

.topnav__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topnav__logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.topnav__wordmark {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .2em;
    color: var(--gold);
}

.topnav__links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.topnav__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

.topnav__link:hover {
    color: var(--gold);
}

/* -------------------------------------------------------------------------
   HERO
   ------------------------------------------------------------------------- */
.hero {
    position: relative;
    color: var(--ink);
    background:
        var(--hero-rings),
        var(--hero-glow-top),
        var(--hero-glow-bottom);
}

.hero__inner {
    /* Plein écran : le hero remplit le 1er viewport (mobile + tablette).
       min-height (jamais height) → le contenu n'est jamais rogné sur un écran
       très court. 100vh en fallback, puis 100svh (small viewport height) pour
       éviter le saut quand la barre d'URL mobile apparaît/disparaît. */
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 48px var(--gutter) 40px;
}

.hero__content {
    /* Remplit toute la hauteur du hero pour pouvoir centrer son contenu et
       coller le lien secondaire en bas (cf. .hero__mascot / .hero__secondary). */
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Mascotte : espace réservé (0 CLS) via width/height fixes.
   margin-top:auto — 1er enfant : combiné au margin-top:auto de .hero__secondary,
   les deux marges auto se partagent l'espace libre → bloc central centré
   verticalement ET lien secondaire poussé tout en bas (pas de conflit avec
   justify-content:center, ignoré dès qu'une marge auto existe). */
.hero__mascot {
    width: 200px;
    height: 200px;
    margin-top: auto;
    margin-bottom: 18px;
    filter: drop-shadow(0 8px 24px rgba(245, 197, 24, .18));
}

.hero__wordmark {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: clamp(30px, 8vw, 44px);
    letter-spacing: .2em;
    line-height: 1;
    color: var(--gold);
}

.hero__divider {
    width: 52px;
    height: 1px;
    margin: 20px 0;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

/* Eyebrow desktop « LE GRAND QUIZ » — masqué sur mobile (le wordmark suffit) */
.hero__eyebrow {
    display: none;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .3em;
    color: var(--brass);
    margin-bottom: 18px;
}

.hero__title {
    font-weight: 600;
    font-size: clamp(21px, 5.5vw, 30px);
    line-height: 1.2;
    color: var(--ink);
}

.hero__title-accent {
    color: var(--gold);
}

.hero__tagline {
    margin-top: 12px;
    max-width: 320px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-62);
}

.hero__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 26px;
    width: 100%;
}

.hero__proof {
    margin-top: 20px;
}

.hero__secondary {
    /* margin-top:auto → collé en bas du hero (cf. .hero__mascot). Desktop le
       repasse à une marge fixe (lien inline sous les preuves). */
    margin-top: auto;
    font-size: 13px;
    font-weight: 500;
    color: var(--brass);
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 2px;
}

/* Visuel hero (mockup téléphone) — masqué hors desktop */
.hero__visual {
    display: none;
}

/* QR — masqué sur mobile, visible dès la tablette */
.qr {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr__code {
    /* Cadre blanc + liseré laiton autour du vrai QR SVG (modules bleu nuit sur
       fond blanc, quiet zone intégrée au SVG). Taille fixe → 0 CLS. */
    width: 120px;
    height: 120px;
    background: #fff;
    border: 3px solid var(--brass);
    border-radius: var(--r-md);
    padding: 6px;
}

/* Le SVG remplit le cadre (dimensions pilotées ici, pas dans le SVG). */
.qr__code svg {
    display: block;
    width: 100%;
    height: 100%;
}

.qr__label {
    font-size: 11px;
    font-weight: 500;
    color: var(--brass);
    max-width: 120px;
    text-align: center;
}

/* -------------------------------------------------------------------------
   Mini-quiz jouable (visuel hero desktop) — série « Capitales » 10 questions.
   Écran au ratio d'un smartphone moderne (9 / 19.5) : hauteur réservée (0 CLS),
   le contenu du quiz tient dans l'écran (overflow interne discret si besoin).
   ------------------------------------------------------------------------- */
.phone {
    width: 288px;
    padding: 12px;
    background: linear-gradient(160deg, var(--bezel-a), var(--bezel-b));
    border-radius: 44px;
    box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(205, 184, 120, .16);
}

.phone__screen {
    position: relative;
    /* Écran ~264px de large → ~572px de haut : proportions d'un smartphone. */
    aspect-ratio: 9 / 19.5;
    border-radius: 34px;
    overflow: hidden;
    background: var(--surface-1);
}

.phone__notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 20px;
    background: var(--bezel-b);
    border-radius: 0 0 12px 12px;
    z-index: 2;
}

/* Les deux vues (jeu / résultat) se superposent en occupant tout l'écran :
   la vue cachée porte [hidden]. overflow-y:auto = filet de sécurité discret. */
.quiz,
.quiz__result {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 32px 22px 22px;
    overflow-y: auto;
}

.quiz[hidden],
.quiz__result[hidden] {
    display: none;
}

.phone__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.phone__cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--brass);
    white-space: nowrap;
}

.phone__count {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    /* Texte informatif (« Question X/Y ») : ink-55 ≈ 5.8:1 → WCAG AA.
       (ink-45 tombait à ~4.2:1.) */
    color: var(--ink-55);
}

/* Barre de progression (0 CLS : hauteur fixe réservée). */
.phone__bar {
    height: 6px;
    border-radius: var(--r-pill);
    background: var(--surface-3);
    overflow: hidden;
    margin-bottom: 18px;
    --quiz-progress: 0%;
}

.phone__bar-fill {
    display: block;
    height: 100%;
    width: var(--quiz-progress);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brass), var(--gold));
    transition: width .4s ease;
}

.phone__question {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 16px;
}

.phone__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Options = vrais <button> (clavier + a11y). Reset des styles natifs. */
.phone__opt {
    width: 100%;
    text-align: start;
    padding: 13px 16px;
    background: var(--surface-3);
    border: 1px solid rgba(205, 184, 120, .25);
    border-radius: var(--r-sm);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.phone__opt:hover:not(:disabled) {
    border-color: var(--gold);
}

.phone__opt:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.phone__opt:disabled {
    cursor: default;
}

/* Bonne réponse révélée (or). ::after = pastille ✓ sans toucher au texte. */
.phone__opt--correct {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--surface-dark);
    font-weight: 700;
}

.phone__opt--correct::after {
    content: " ✓";
    font-weight: 700;
}

/* Mauvaise sélection (rouge). */
.phone__opt--wrong {
    background: color-mix(in srgb, #e5484d 22%, var(--surface-3));
    border-color: #e5484d;
    color: var(--ink);
}

.phone__opt--wrong::after {
    content: " ✗";
    font-weight: 700;
    color: #e5484d;
}

.phone__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-62);
}

.phone__foot-points {
    color: var(--gold);
    font-weight: 700;
    margin-inline-start: auto;
}

/* Bouton « Suivant » (révélé après réponse). */
.quiz__next {
    padding: 9px 18px;
    background: var(--gold);
    border: none;
    border-radius: var(--r-pill);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--surface-dark);
    cursor: pointer;
}

.quiz__next[hidden] {
    display: none;
}

.quiz__next:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

/* --- Écran de résultat (pic d'engagement — score X/10 → CTA app) --- */
.quiz__result {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 28px 22px;
}

.quiz__result:focus-visible {
    outline: none;
}

.quiz__trophy {
    font-size: 44px;
    line-height: 1;
    animation: quiz-pop .5s ease both;
}

.quiz__result-lead {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-62);
}

.quiz__result-score {
    font-family: var(--font-title);
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: var(--gold);
    margin: 2px 0 6px;
}

.quiz__result-cta {
    font-size: 13px;
    line-height: 1.4;
    color: var(--ink);
    margin-bottom: 12px;
}

.quiz__result .store-badges {
    width: 100%;
    margin-bottom: 12px;
}

.quiz__replay {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--brass);
    cursor: pointer;
}

.quiz__replay:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.quiz__replay:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

@keyframes quiz-pop {
    0%   { transform: scale(0); opacity: 0; }
    70%  { transform: scale(1.25); }
    100% { transform: scale(1); opacity: 1; }
}

/* Micro-célébration sobre uniquement si l'utilisateur l'accepte (§7.2). */
@media (prefers-reduced-motion: reduce) {
    .quiz__trophy { animation: none; }
    .phone__bar-fill { transition: none; }
}

/* Utilitaire a11y : région d'annonce visuellement masquée. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* -------------------------------------------------------------------------
   FEATURES
   ------------------------------------------------------------------------- */
.features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

/* Les <li> ne génèrent pas de boîte : les cartes restent les cellules de grille
   (rendu strictement identique ; .card-quiz--desktop garde son display:none). */
.features__grid > li,
.browse__grid > li {
    display: contents;
}

.card-feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    background: var(--card-grad);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.card-feature__icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: var(--r-sm);
    background: var(--surface-1);
    border: 1px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
}

.card-feature__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.card-feature__desc {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-62);
}

/* Galerie des captures de l'app (visuels App Store localisés) : CARROUSEL EN BOUCLE
   continue (auto-scroll CSS, SANS barre de défilement) + LIGHTBOX au clic. 0 CLS.
   Le ruban est dupliqué (2×6 images) dans le template → boucle sans couture via -50%. */
.app-shots {
    position: relative;
    margin: 24px 0 0;
    overflow: hidden;            /* pas de scrollbar visible en bas */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.app-shots__track {
    display: flex;
    width: max-content;
    margin: 0;
    padding: 6px 0 10px;
    list-style: none;
    animation: app-shots-scroll 48s linear infinite;
}
/* Pause au survol / focus clavier → l'utilisateur peut viser et cliquer une image. */
.app-shots:hover .app-shots__track,
.app-shots__track:focus-within,
.app-shots.is-paused .app-shots__track {
    animation-play-state: paused;
}

/* Bouton Pause/Lecture (WCAG 2.2.2) : visible, focusable. Centré en bas (zone
   opaque du mask-image ; les coins sont estompés par le fondu → illisibles). */
.app-shots__toggle {
    position: absolute;
    inset-block-end: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--ink);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.app-shots__toggle:hover {
    background: var(--surface-3);
}
/* Icône affichée selon l'état : ❚❚ quand ça défile, ▶ quand c'est en pause. */
.app-shots__toggle-icon--play { display: none; }
.app-shots.is-paused .app-shots__toggle-icon--pause { display: none; }
.app-shots.is-paused .app-shots__toggle-icon--play { display: inline; }
.app-shots__item {
    flex: 0 0 clamp(150px, 52vw, 208px);
    margin-inline-end: 16px;
}
.app-shots__btn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    border-radius: var(--r-lg);
}
.app-shots__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1080 / 1920;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--surface-1);
}

@keyframes app-shots-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Lightbox (agrandissement plein écran). */
.app-shots__dialog {
    width: min(94vw, 460px);
    max-width: 94vw;
    max-height: 94vh;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    color: var(--ink);
}
.app-shots__dialog::backdrop {
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(2px);
}
.app-shots__dialog-fig { margin: 0; }
.app-shots__dialog-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 84vh;
    object-fit: contain;
    border-radius: var(--r-lg);
}
.app-shots__dialog-cap {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--ink);
}
.app-shots__dialog-close,
.app-shots__dialog-nav {
    position: absolute;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-1);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}
.app-shots__dialog-close { top: -14px; right: -14px; }
.app-shots__dialog-nav { top: 50%; transform: translateY(-50%); }
.app-shots__dialog-nav--prev { left: -14px; }
.app-shots__dialog-nav--next { right: -14px; }

/* Mouvement réduit : pas d'auto-scroll. Repli en défilement manuel, scrollbar masquée. */
@media (prefers-reduced-motion: reduce) {
    .app-shots {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-mask-image: none;
                mask-image: none;
    }
    .app-shots::-webkit-scrollbar { display: none; }
    .app-shots__track { animation: none; }
}

/* Badges stores sous les captures (section features). */
.features__badges {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}
.features__badges .store-badges {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-width: none;
}

/* -------------------------------------------------------------------------
   BROWSE (jouer dans le navigateur)
   ------------------------------------------------------------------------- */
.browse__title {
    font-family: var(--font-title);
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--ink);
    font-size: clamp(21px, 4vw, 36px);
    margin-bottom: 6px;
}

.browse__subtitle {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-55);
    margin-bottom: 20px;
}

.browse__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card-quiz {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 16px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.card-quiz:hover {
    border-color: var(--line-strong);
}

.card-quiz__emoji {
    font-size: 26px;
    line-height: 1;
}

.card-quiz__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.card-quiz__cta {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
}

/* Catégories réservées au desktop (Art & Sciences) */
.card-quiz--desktop {
    display: none;
}

/* -------------------------------------------------------------------------
   FINAL (deviens un héros)
   ------------------------------------------------------------------------- */
.cta-final {
    text-align: center;
    background:
        var(--final-glow),
        var(--surface-1);
}

.final__title {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: clamp(24px, 6vw, 46px);
    letter-spacing: .1em;
    color: var(--gold);
    margin-bottom: 8px;
}

.final__subtitle {
    font-size: 14px;
    color: var(--ink-62);
    margin-bottom: 24px;
}

.final__actions {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.final__actions .store-badges {
    margin-inline: auto;
}

.final__lang {
    display: flex;
    justify-content: center;
}

/* -------------------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------------------- */
.site-footer {
    padding: 24px var(--gutter);
    border-top: 1px solid var(--line-soft);
    background: var(--surface-2);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: var(--container);
    margin-inline: auto;
}

.site-footer__brand {
    display: none;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .18em;
    color: var(--brass);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    justify-content: center;
    font-size: 12px;
}

.site-footer__links a {
    color: var(--brass);
}

.site-footer__copy {
    font-size: 11px;
    /* Texte informatif normal (copyright) : ink-55 ≈ 5.8:1 sur --surface-2 → AA.
       (ink-32 tombait à ~2.6:1.) */
    color: var(--ink-55);
}

/* Sélecteur langue du footer : VISIBLE partout (mobile inclus) → seul moyen de
   changer de langue sur les pages hub/quiz en mobile (pas de top nav < 1024px).
   Seule exception : la home, où la section finale (.final__lang) l'affiche déjà
   juste au-dessus en mobile → on masque le doublon uniquement là (voir plus bas). */
.site-footer__lang {
    display: flex;
    margin-top: 14px;
    justify-content: center;
}

/* Home uniquement, en mobile : la section finale porte déjà le sélecteur → on
   évite le doublon dans le footer. Confiné en max-width pour ne pas fuir sur
   desktop (où .final__lang est masqué et le footer redevient l'unique sélecteur). */
@media (max-width: 1023.98px) {
    body:has(.cta-final) .site-footer__lang {
        display: none;
    }
}

/* =========================================================================
   TABLETTE ≥ 768px
   ========================================================================= */
@media (min-width: 768px) {
    .section { padding-block: 64px; }

    .hero__inner { padding: 64px 40px 48px; }
    .hero__mascot { width: 100px; height: 100px; margin-bottom: 24px; }
    .hero__divider { width: 64px; margin: 26px 0; }
    .hero__title { max-width: 520px; }
    .hero__tagline { max-width: 440px; font-size: 17px; }

    /* badges + QR côte à côte */
    .hero__actions {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 36px;
        margin-top: 36px;
    }
    .store-badges { width: auto; }
    .qr { display: flex; }

    .features__grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .card-feature { padding: 22px; }
    .card-feature__icon { width: 52px; height: 52px; font-size: 26px; }

    .browse__grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .browse__subtitle { font-size: 15px; }
    .card-quiz { padding: 22px 20px; }
    .card-quiz__emoji { font-size: 32px; }
    .card-quiz__name { font-size: 16px; }

    .final__subtitle { font-size: 16px; }

    .site-footer { padding: 28px 40px; }
    .site-footer__inner { flex-direction: row; justify-content: space-between; }
}

/* =========================================================================
   DESKTOP ≥ 1024px
   ========================================================================= */
@media (min-width: 1024px) {
    /* --- Top nav --- */
    .topnav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        /* Hauteur déterministe (--nav-h) : sert d'offset exact au hero plein
           écran ci-dessous. box-sizing:border-box → padding inclus. */
        min-height: var(--nav-h);
        padding: 0 64px;
        max-width: var(--container);
        margin-inline: auto;
        position: relative;
        z-index: 5;
    }

    /* --- Hero 2 colonnes --- */
    .hero {
        background:
            repeating-radial-gradient(circle at 30% 45%, transparent 0 60px, rgba(245, 197, 24, .05) 60px 61px),
            var(--hero-desktop);
    }
    .hero__inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 56px;
        align-items: center;
        text-align: start;
        max-width: var(--container);
        margin-inline: auto;
        /* position:relative → containing block du .hero__secondary ancré en bas.
           padding-bottom élargi : réserve l'espace du lien absolu (bottom:28px +
           hauteur du lien) pour que la grille ne passe jamais dessous (0 CLS). */
        position: relative;
        padding: 32px 64px 76px;
        /* Plein écran desktop SANS scroll parasite : la top nav étant dans le
           flux normal (position:relative, hauteur = --nav-h), on retire sa
           hauteur du viewport. Ainsi nav + hero = exactement 100svh au
           chargement. Choix « offset calc » plutôt que nav en overlay
           absolute/sticky : conserve la nav opaque dans le flux (pas de
           chevauchement à gérer) et reste min-height → jamais de contenu rogné. */
        min-height: calc(100vh - var(--nav-h));
        min-height: calc(100svh - var(--nav-h));
    }
    .hero__content { align-items: flex-start; }

    /* sur desktop, la mascotte/wordmark laissent place à l'eyebrow + mockup */
    .hero__mascot,
    .hero__wordmark,
    .hero__divider { display: none; }
    .hero__eyebrow { display: block; }

    .hero__title { font-size: clamp(40px, 4.2vw, 52px); line-height: 1.1; }
    .hero__tagline { max-width: 420px; font-size: 18px; }

    .hero__actions { justify-content: flex-start; gap: 32px; }
    .hero__proof { margin-top: 26px; }
    /* Desktop = hero en grille 2 colonnes : le lien secondaire sort du flux de la
       colonne gauche et s'ancre en bas-CENTRE du hero (plein largeur), pas dans la
       grille. Containing block = .hero__inner (position:relative ci-dessus).
       Centrage RTL-safe : inset-inline:0 (occupe la largeur) + width:fit-content +
       margin-inline:auto → la boîte shrink-to-fit se centre elle-même, l'underline
       (border-bottom) reste sous le seul texte. Tout en propriétés logiques → OK en
       arabe. Sélecteur descendant (.hero__inner …) → spécificité (0,2,0) qui bat la
       base (0,1,0) et neutralise son margin-top:auto. */
    .hero__inner .hero__secondary {
        position: absolute;
        inset-inline: 0;
        bottom: 28px;
        width: fit-content;
        margin: 0 auto;
        text-align: center;
    }

    .qr__code { width: 104px; height: 104px; }

    /* visuel : mockup téléphone */
    .hero__visual {
        display: flex;
        justify-content: center;
    }

    /* --- Features 3 colonnes --- */
    .features .container { max-width: 1080px; }
    .features__head { text-align: center; margin-bottom: 40px; }
    .features__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }

    /* variante desktop : icône au-dessus (colonne) */
    .card-feature {
        flex-direction: column;
        padding: 28px;
        border-radius: var(--r-xl);
    }
    .card-feature__icon { width: 56px; height: 56px; border-radius: 15px; font-size: 28px; margin-bottom: 18px; }
    .card-feature__title { font-size: 19px; }
    .card-feature__desc { font-size: 15px; line-height: 1.5; margin-top: 6px; }

    /* --- Browse 4 colonnes --- */
    .browse .container { max-width: 1080px; }
    .browse__grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
    .card-quiz { padding: 26px 22px; border-radius: var(--r-xl); }
    .card-quiz__emoji { font-size: 36px; }
    .card-quiz__name { font-size: 17px; }
    .card-quiz--desktop { display: flex; } /* Art & Sciences apparaissent */

    /* --- Final --- */
    .cta-final { padding-block: 90px; }
    .final__actions .store-badges { flex-direction: row; max-width: none; gap: 16px; }
    /* Sélecteur de langue final : redondant avec nav+footer sur desktop */
    .cta-final .final__lang { display: none; }

    /* --- Footer : marque visible + sélecteur langue --- */
    .site-footer { padding: 36px 64px; }
    .site-footer__brand { display: block; }
    .site-footer__lang { display: flex; }
}

/* Desktop large : hero centré dans le conteneur, fond plein largeur déjà géré */
@media (min-width: 1280px) {
    .hero__inner { padding-inline: 64px; }
}
