/* ============================================================
   ADVENTURE VALLEY — ACTION GAMES
   Feuille de style principale.

   La palette est relevée directement sur le logo : dégradé vert
   printemps → turquoise → cyan, posé sur un noir profond. Le
   teal sombre sert d'état « éteint » : dans un action game, une
   cellule est soit allumée, soit verrouillée, et toute la page
   repose sur cette opposition.
   ============================================================ */

/* ── Jetons ──────────────────────────────────────────────────── */
:root {
    /* Fonds */
    --void:      #05070B;
    --panel:     #0A0F16;
    --panel-lit: #0E1720;
    --line:      #16232C;

    /* Rampe de marque (relevée sur le logo) */
    --spring:    #24EA6C;
    --aqua:      #24EAC6;
    --cyan:      #36EAEA;
    --ramp: linear-gradient(100deg, var(--spring), var(--aqua) 55%, var(--cyan));

    /* État éteint / verrouillé */
    --deep:      #0C5C68;
    --deep-soft: rgba(36, 234, 198, .12);

    /* Texte */
    --bone:      #E4F1EE;
    --ash:       #6F838C;
    --ash-dim:   #47575F;

    /* Rythme */
    --gut:       clamp(1.25rem, 4vw, 2.5rem);
    --shell:     1180px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--void);
    color: var(--bone);
    font-family: 'Barlow', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a { color: var(--aqua); }

::selection { background: var(--aqua); color: var(--void); }

/* Repère de focus visible : indispensable pour la navigation au clavier */
:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 2px;
}

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gut);
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Typographie ─────────────────────────────────────────────── */
.display {
    font-family: 'Chakra Petch', 'Barlow', sans-serif;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.04;
    margin: 0;
}

.mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.tinted {
    background: var(--ramp);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Barre d'état ────────────────────────────────────────────── */
.statusbar {
    position: relative;
    z-index: 3;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 7, 11, .72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.statusbar__in {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding-block: .85rem;
}
.statusbar__brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.statusbar__mark { width: 30px; height: 30px; flex: none; }
.statusbar__name {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600; font-size: .95rem;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--bone);
}
.statusbar__state {
    display: inline-flex; align-items: center; gap: .55rem;
    color: var(--ash);
}
.statusbar__dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--spring); flex: none;
    box-shadow: 0 0 0 0 rgba(36, 234, 108, .55);
    animation: ping 2.6s ease-out infinite;
}
/* Sur mobile, le libellé complet ferait déborder la barre : on
   bascule sur une version courte plutôt que de laisser le texte
   se chevaucher avec le nom de la marque. */
.statusbar__short { display: none; }
@media (max-width: 620px) {
    .statusbar__long  { display: none; }
    .statusbar__short { display: inline; }
    .statusbar__name  { font-size: .82rem; letter-spacing: .1em; }
}
@media (max-width: 380px) {
    .statusbar__name { font-size: .74rem; }
}

@keyframes ping {
    0%   { box-shadow: 0 0 0 0 rgba(36, 234, 108, .5); }
    70%  { box-shadow: 0 0 0 9px rgba(36, 234, 108, 0); }
    100% { box-shadow: 0 0 0 0 rgba(36, 234, 108, 0); }
}

/* ── Accueil ─────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding-block: clamp(3.5rem, 11vw, 7.5rem) clamp(3rem, 9vw, 6rem);
    text-align: center;
    overflow: hidden;
}

/* Halo ambiant : reprend les teintes du logo, très diffusées */
.hero::before {
    content: '';
    position: absolute; inset: -30% -10% auto;
    height: 130%;
    background:
        radial-gradient(46% 38% at 50% 22%, rgba(36, 234, 198, .16), transparent 70%),
        radial-gradient(34% 30% at 22% 48%, rgba(36, 234, 108, .10), transparent 70%),
        radial-gradient(34% 30% at 80% 42%, rgba(54, 234, 234, .10), transparent 70%);
    pointer-events: none;
}

/* Emblème + anneaux : les arcs concentriques du logo, remis en
   mouvement. La rotation lente prolonge le mark plutôt que d'ajouter
   un effet décoratif étranger à la marque. */
.emblem {
    position: relative;
    width: clamp(150px, 27vw, 226px);
    aspect-ratio: 1;
    margin: 0 auto clamp(1.6rem, 4vw, 2.4rem);
    display: grid; place-items: center;
}
.emblem__img { width: 78%; position: relative; z-index: 2; }
.emblem__ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 1px dashed rgba(36, 234, 198, .3);
    animation: spin 26s linear infinite;
}
.emblem__ring--2 {
    inset: 11%;
    border-style: solid;
    border-color: rgba(36, 234, 108, .16);
    animation-duration: 38s;
    animation-direction: reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero__eyebrow { color: var(--aqua); margin-bottom: 1.1rem; }
.hero__eyebrow span { color: var(--ash-dim); margin-inline: .5rem; }

.hero__title {
    font-size: clamp(2.9rem, 13vw, 7.2rem);
    letter-spacing: -.005em;
    margin-bottom: 1.2rem;
    /* drop-shadow plutôt que text-shadow : sur un texte en dégradé
       (background-clip), text-shadow se rend de façon incohérente
       selon les navigateurs. */
    filter: drop-shadow(0 0 34px rgba(36, 234, 198, .3));
}

.hero__lede {
    max-width: 47ch; margin: 0 auto;
    font-size: clamp(1rem, 2.4vw, 1.15rem);
    color: #A9BEC4;
}

.hero__cta { margin-top: clamp(1.8rem, 5vw, 2.6rem); }

/* ── Bouton ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600; font-size: .9rem;
    letter-spacing: .12em; text-transform: uppercase;
    padding: .95rem 1.9rem;
    border: 0; border-radius: 2px;
    background: var(--ramp);
    color: #04120C;
    text-decoration: none; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
    box-shadow: 0 0 0 rgba(36, 234, 198, 0);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(36, 234, 198, .28); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--ghost {
    background: transparent; color: var(--aqua);
    border: 1px solid rgba(36, 234, 198, .38);
}
.btn--ghost:hover { background: var(--deep-soft); box-shadow: none; }

/* ── Compte à rebours ────────────────────────────────────────── */
.countdown {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: clamp(.7rem, 2.6vw, 1.5rem);
    margin-top: clamp(1.8rem, 5vw, 2.6rem);
}
.countdown__cell {
    min-width: 74px;
    padding: .8rem .6rem .6rem;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 3px;
}
.countdown__num {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1.5rem, 5vw, 2.1rem);
    font-weight: 700; line-height: 1;
    color: var(--aqua);
    font-variant-numeric: tabular-nums;
}
.countdown__lbl { color: var(--ash); font-size: .62rem; margin-top: .4rem; }

/* ── Section ─────────────────────────────────────────────────── */
.band { padding-block: clamp(3.5rem, 9vw, 6.5rem); position: relative; }
.band--panel { background: linear-gradient(180deg, transparent, rgba(10, 15, 22, .85) 12%, rgba(10, 15, 22, .85) 88%, transparent); }

.band__head { margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.band__eyebrow { color: var(--aqua); display: block; margin-bottom: .8rem; }
.band__title {
    font-size: clamp(1.7rem, 5vw, 2.7rem);
    max-width: 22ch;
}
.band__note { color: var(--ash); max-width: 56ch; margin: .9rem 0 0; }

/* ── Tableau des cellules (élément signature) ────────────────── */
/* Dans un action game, chaque cellule porte une plaque lumineuse
   indiquant sa nature et son état. Avant l'ouverture, elles sont
   toutes verrouillées : le « bientôt » du site EST cet état. */
.cellgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}
.cell {
    position: relative;
    background: var(--panel);
    padding: 1.6rem 1.4rem 1.5rem;
    min-height: 178px;
    display: flex; flex-direction: column;
    text-align: left;
    border: 0;
    width: 100%;
    font: inherit; color: inherit;
    cursor: default;
    transition: background .28s ease;
}
.cell__no {
    color: var(--ash-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem; letter-spacing: .18em;
    transition: color .28s ease;
}
.cell__name {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700; font-size: 1.22rem;
    letter-spacing: .06em; text-transform: uppercase;
    margin: .7rem 0 .55rem;
    color: #5E7078;
    transition: color .28s ease;
}
.cell__teaser {
    color: var(--ash); font-size: .92rem;
    margin: 0; flex: 1;
    transition: opacity .28s ease, transform .28s ease;
}
.cell__state {
    display: inline-flex; align-items: center; gap: .5rem;
    margin-top: 1rem;
    color: var(--ash-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: .64rem; letter-spacing: .2em; text-transform: uppercase;
    transition: color .28s ease;
}
.cell__state::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--ash-dim);
    transition: background .28s ease, box-shadow .28s ease;
}
/* Liseré supérieur : la plaque qui s'allume */
.cell::after {
    content: '';
    position: absolute; inset: 0 0 auto;
    height: 2px; background: var(--ramp);
    transform: scaleX(0); transform-origin: left;
    transition: transform .34s cubic-bezier(.22, 1, .36, 1);
}
.cell:hover, .cell:focus-visible { background: var(--panel-lit); }
.cell:hover::after, .cell:focus-visible::after { transform: scaleX(1); }
.cell:hover .cell__name, .cell:focus-visible .cell__name { color: var(--bone); }
.cell:hover .cell__no, .cell:focus-visible .cell__no { color: var(--aqua); }
.cell:hover .cell__state, .cell:focus-visible .cell__state { color: var(--aqua); }
.cell:hover .cell__state::before, .cell:focus-visible .cell__state::before {
    background: var(--spring);
    box-shadow: 0 0 10px rgba(36, 234, 108, .8);
}

/* La révélation du texte n'a lieu que sur les appareils disposant
   d'un vrai survol. Sur écran tactile, le texte reste affiché :
   sans cela, il serait définitivement inaccessible. */
@media (hover: hover) and (pointer: fine) {
    .cell__teaser { opacity: 0; transform: translateY(6px); }
    .cell:hover .cell__teaser,
    .cell:focus-visible .cell__teaser { opacity: 1; transform: none; }
}

/* ── Déroulé (une vraie séquence : l'ordre porte du sens) ────── */
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--panel); padding: 1.8rem 1.5rem; }
.step__no {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem; font-weight: 700; line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--deep);
}
.step__title {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600; font-size: 1.1rem;
    letter-spacing: .04em;
    margin: .9rem 0 .5rem;
}
.step__text { color: var(--ash); font-size: .94rem; margin: 0; }

/* ── Publics ─────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: .6rem; }
.tag {
    border: 1px solid rgba(36, 234, 198, .26);
    color: var(--aqua);
    padding: .5rem 1.05rem;
    border-radius: 100px;
    font-size: .86rem;
    background: var(--deep-soft);
}

/* ── Liste d'attente ─────────────────────────────────────────── */
.notify { max-width: 620px; }
.notify__form { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.notify__field {
    flex: 1 1 250px;
    padding: .95rem 1.1rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--bone);
    font-family: inherit; font-size: 1rem;
}
.notify__field::placeholder { color: var(--ash-dim); }
.notify__field:focus { outline: none; border-color: var(--aqua); }
.notify__small { color: var(--ash-dim); font-size: .82rem; margin-top: .9rem; }
.notify__msg { margin-top: 1rem; font-size: .94rem; min-height: 1.4em; }
.notify__msg--ok { color: var(--spring); }
.notify__msg--err { color: #FF8A7A; }
/* Piège à robots : invisible pour l'utilisateur, rempli par les
   scripts automatisés — voir ajax/notify.php */
.notify__trap { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ── Site partenaire ─────────────────────────────────────────── */
.sister {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1.2rem;
    border: 1px solid var(--line);
    background: var(--panel);
    padding: 1.5rem 1.6rem;
}
.sister__title { font-family: 'Chakra Petch', sans-serif; font-weight: 600; margin: 0 0 .25rem; }
.sister__text { color: var(--ash); margin: 0; font-size: .93rem; }

/* ── Pied de page ────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--line);
    padding-block: 2.6rem;
    margin-top: clamp(2rem, 6vw, 4rem);
}
.site-footer__in {
    display: flex; flex-wrap: wrap; gap: 1.4rem;
    align-items: center; justify-content: space-between;
}
.site-footer__legal { color: var(--ash-dim); font-size: .84rem; margin: 0; }
.socials { display: flex; gap: .6rem; }
.socials a {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    color: var(--ash);
    text-decoration: none; font-size: 1.05rem;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.socials a:hover { color: var(--aqua); border-color: rgba(36, 234, 198, .4); background: var(--deep-soft); }

/* ── Apparition au défilement ────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
    opacity: 1; transform: none;
    transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1);
}

/* ── Mouvement réduit ────────────────────────────────────────── */
/* Certaines personnes désactivent les animations pour raisons de
   confort ou de santé : on respecte ce réglage système. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
