/* La carte « histoire » de l'accueil (« TA PROCHAINE ACTION » depuis la 0.81), les entraînements, et le compte à
   rebours de l'étape du jour (app/histoire.js, vueSuite dans app/ville.js : plus sur l'accueil depuis la 0.81). Les transitions entre étapes : app/transition.css. */

/* 0.81, « TA PROCHAINE ACTION » : l'étiquette en haut de la carte, les niveaux à côté. */
.quartier.histoire > header { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
/* 0.84 : la carte entière ouvre la carte de la ville. (Son rond, en haut à droite, est parti le 28 novembre : « il ne
   sert à rien, parce que quand on appuie sur le composant, on voit la carte ».) */
.quartier.histoire { cursor: pointer; position: relative; }
/* Le quartier et le repère (« LE PORT · ÉTAPE 3 SUR 7 »), puis ce que le joueur va faire, en gros : il se lit à trois mètres. */
.quartier .action { display: flex; flex-direction: column; gap: 4px; }
.quartier .jalon { margin: 0; font: 700 15px/1.2 var(--body); letter-spacing: .12em; color: var(--gold); text-transform: uppercase; text-shadow: 0 0 14px rgba(11,11,26,.95); }
.quartier .action h1 { margin: 0; font: 400 36px/1.02 var(--sign); color: var(--text); text-shadow: 0 3px 0 var(--pink), 0 0 22px rgba(11,11,26,.9); overflow-wrap: anywhere; }
.quartier.histoire.niveau .action h1, .quartier.histoire.club .action h1, .quartier.histoire.bout .action h1 { font-size: 30px; color: var(--gold); text-shadow: 0 3px 0 #8A1457, 0 0 22px rgba(11,11,26,.9); }
.quartier.histoire::after { height: 330px; }
@media (max-width: 370px) { .quartier .action h1 { font-size: 31px; } .quartier.histoire.niveau .action h1, .quartier.histoire.club .action h1, .quartier.histoire.bout .action h1 { font-size: 26px; } .quartier .jalon { font-size: 13px; } }
/* L'image d'un niveau est en largeur : on la cadre sur Alloy. */
.quartier.histoire.n2 > img { object-position: 78% top; }
.quartier.histoire.n3 > img { object-position: 46% top; }
/* Le niveau suivant, proposé en grand : le bouton porte un mot long. */
.cta.long b { font-size: 23px; }
.cta.long span { margin-top: 5px; font-size: 10.5px; letter-spacing: .08em; }
@media (max-width: 370px) { .cta.long b { font-size: 20px; } .cta.long span { font-size: 9.5px; letter-spacing: .04em; } }
/* Le niveau d'après, réservé : annoncé, pas proposé. Une ligne quand elle tient (le nom, son étiquette à côté), deux sinon. */
.niveau-a-venir { display: flex; flex-flow: row wrap; align-items: center; justify-content: center; gap: 6px 12px; min-height: 52px; padding: 8px 12px; border-radius: 18px; border: 1.5px dashed rgba(255,255,255,.45); background: rgba(11,11,26,.72); }
.niveau-a-venir b { font: 400 19px/1 var(--sign); }
.niveau-a-venir span { font: 700 11px/1 var(--body); letter-spacing: .16em; color: var(--pink); }
.quartier .cta.mince { min-height: 56px; }
.quartier .cta.mince b { font-size: 20px; }

/* Une idée sans image (le jeu de jambes) : la carte tient sans elle. */

/* Le compte à rebours de l'étape du jour : un anneau qui se vide, les chiffres au milieu. */
.suite .demain.rebours { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; }
.rebours .anneau { position: relative; width: 104px; height: 104px; display: grid; place-items: center; }
.rebours .anneau svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rebours .anneau circle { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 5; }
.rebours .anneau circle.reste { stroke: var(--gold); stroke-linecap: round; }
.suite .demain.rebours b { position: relative; margin: 0; font: 400 22px/1 var(--num); letter-spacing: .02em; color: var(--gold); font-variant-numeric: tabular-nums; }
.suite .demain.rebours .kicker { opacity: 1; color: var(--soft); font-size: 9.5px; letter-spacing: .12em; }
.suite .jour { align-items: stretch; }
.suite .neuf { display: flex; flex-direction: column; justify-content: center; }
.suite .neuf h3 { font-size: 21px; }

/* Petit écran : la bulle d'Alloy laisse la place au repère et au bouton, qui doivent tenir sans faire défiler. */
@media (max-height: 700px) { .quartier.histoire { min-height: 410px; } .quartier.histoire::after { height: 270px; } }
#tout-voir { align-self: center; min-height: 44px; padding: 0 16px; }
/* Un défi annoncé « bientôt » : sa carte garde « Ça m'intéresse », en bas, à la place des trois niveaux. */
/* Un titre de section long (« LOS ENTRENAMIENTOS ») : le petit mot passe dessous plutôt que de sortir de l'écran. */
.porte { flex-wrap: wrap; row-gap: 3px; }
.porte h2 { min-width: 0; }

/* La barre du bas à quatre onglets (Histoire, Défis, Classement, Profil) : gros, l'onglet courant évident. */
#onglets { padding-left: 4px; padding-right: 4px; }
#onglets a { position: relative; min-height: 56px; justify-content: center; gap: 5px; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
#onglets svg { width: 30px; height: 30px; }
#onglets a.on::before { content: ""; position: absolute; top: -9px; left: 22%; right: 22%; height: 4px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
/* L'onglet Défis : les cartes l'une sous l'autre, en pleine largeur. */
.defis.pile { flex-direction: column; overflow: visible; margin: 0; padding: 0; scroll-snap-type: none; }
#vue > .defis.pile { max-width: 100%; }
.defis.pile .defi { width: 100%; }
.defis.pile .defi h3 { font-size: 19px; }
.defis.pile .defi .kicker { font-size: 11px; }
/* L'onglet Histoire ne doit presque plus défiler : la carte du quartier et l'élément de la ville se serrent un peu. */
.quartier.histoire { min-height: 440px; }
/* LA CARTE EST AUSSI HAUTE QUE CE QU'ELLE PORTE (0.76). Elle prenait « la place qui reste » (flex: 1, donc une base de
   zéro) avec 440 points au moins, et rognait ce qui dépassait : dès que son pied portait deux blocs de plus (un niveau
   fini dont le suivant est « BIENTÔT » : l'annonce, puis REJOUER) sous une bulle de quatre lignes, le bouton sortait
   de la carte et se retrouvait coupé au ras du bloc suivant. (Aurélien, 18 novembre : « le bouton rejouer est coupé
   par la section prochain badge ».) Sa base est maintenant son contenu : elle grandit avec lui, sans rien rogner, et
   continue de remplir l'écran quand elle est seule (le premier pas). Garde-fou : tools/e2e/accueil.mjs. */
.quartier.histoire { flex: 1 0 auto; }
/* Les trois niveaux tiennent sur UNE ligne, à toutes les largeurs (deux niveaux cochés passaient EXTRÊME à la ligne
   sur un petit téléphone, et la carte gagnait 46 points de haut). */
.quartier.histoire .pastille-niveau.trois { flex-wrap: nowrap; }
@media (max-width: 400px) {
  .quartier.histoire .pastille-niveau.trois { gap: 4px; }
  .quartier.histoire .pastille-niveau .niv { gap: 3px; padding: 0 7px; }
  .quartier.histoire .pastille-niveau .niv b { letter-spacing: 0; }
  .quartier.histoire .pastille-niveau .niv svg { width: 12px; height: 12px; }
}
/* RIEN SOUS 14 POINTS SUR L'ONGLET HISTOIRE (0.76 : la page relue de haut en bas). L'étape du jour et la carte de la
   ville gardaient des mots de 9,5 à 13 points : ils passent à 14, ici, sans toucher aux autres pages qui portent les
   mêmes blocs. (Le prochain badge : app/recompenses.css.) */
#vue > .suite .neuf .kicker, #vue > .suite .demain .kicker, #vue > .suite .demain.rebours .kicker { font-size: 14px; letter-spacing: .08em; line-height: 1.15; }
#vue > .suite .neuf p:last-child, #vue > .suite .demain p:last-child { font-size: 14px; }
#vue > .suite .mois span { font-size: 14px; letter-spacing: .08em; }
#vue > .vers-carte .kicker { font-size: 14px; letter-spacing: .1em; }
#vue > .vers-carte .ou b { font-size: 14px; }
.vers-carte { height: 124px; }
/* L'Arène, en bas du Classement : une carte fine. */

/* La barre du haut des onglets : la série à gauche ; à droite le son, puis le PROFIL, gros et évident. */
.pastilles.entete { gap: 8px; }
.pastilles.entete .son { margin-left: auto; }
.pastille.vers-profil { gap: 7px; height: 48px; padding: 0 14px 0 10px; border: 2px solid var(--gold); color: var(--gold); text-decoration: none; min-width: 0; }
.pastille.vers-profil svg { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pastille.vers-profil b { font: 400 14px/1 var(--sign); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-tete .retour { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-right: 6px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); color: inherit; }
.pro-tete .retour svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pro-tete .kicker { white-space: nowrap; }
/* (le mot de l'onglet des entraînements est court, « Entraîner » : en entier il remplissait sa colonne et touchait son voisin) */

/* ── « BIENTÔT » et « AU CLUB » : les deux seules étiquettes de ce qui est fermé, les mêmes partout ───────────
   (src/parcours.js : etiquetteFermee). BIENTÔT : sombre, discret. AU CLUB : or, avec le cadenas. */
.mot-ferme { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 6px; border-radius: 999px; font: 400 13px/1 var(--sign); letter-spacing: .05em; white-space: nowrap; }
.mot-ferme svg { flex: none; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mot-ferme.bientot, .defi.ferme .bas .mot-ferme.bientot { background: rgba(11,11,26,.86); color: var(--text); border: 1px dashed rgba(255,255,255,.5); }
.mot-ferme.club, .defi.ferme .bas .mot-ferme.club { background: var(--gold); color: #1A0B1F; border: 1px solid var(--gold); }
.niveau-a-venir .mot-ferme { font: 400 14px/1 var(--sign); }
/* La fiche d'un quartier fermé, sur la carte : le même mot, dans le même ton. */
.fiche-carte .etat.club { border-style: solid; border-color: var(--gold); color: var(--gold); }

/* Les entraînements : la carte des défis « bientôt », avec l'icône à droite à la place de l'image. */
.defi.entrainement { background: linear-gradient(120deg, #1b1338, #2a1040); }
.defi.entrainement > img { left: auto; right: 12px; top: 50%; width: auto; height: 64%; aspect-ratio: 1; transform: translateY(-50%); object-fit: contain; object-position: center; }
.defi.entrainement::after { content: none; }
.defi.entrainement > div { width: auto; left: 14px; right: calc(36% + 24px); bottom: 14px; text-align: left; }
.defi.entrainement h3 { overflow-wrap: anywhere; }
.defi.entrainement .ce-que-cest { margin: 5px 0 0; font: 500 13px/1.3 var(--body); opacity: .9; text-align: left; }

/* Rien sous 14 points sur la carte de l'histoire (17 novembre : Aurélien la lit à bout de bras, sans lunettes). */
.quartier.histoire .kicker { font-size: 14px; letter-spacing: .1em; }
.quartier.histoire .cta span { font-size: 14px; letter-spacing: .06em; line-height: 1.15; text-align: center; }
.quartier.histoire .chemin > a, .quartier.histoire .chemin > span { font-size: 14px; }
.quartier.histoire .mot-ferme { font-size: 14px; }
