/*  Aeterna — La Remontée : « le conte au crépuscule », version nuit (branche da-nuit, docs/da/crepuscule.png).
 *  Le monde est une aquarelle au soir qui remplit l'écran ; l'interface est posée dessus en feuillets de
 *  PARCHEMIN CLAIR (bandeau, rente, onglets, médaillons, panneaux, pages) écrits à l'encre brune, cernés d'un
 *  trait d'or fané ; une seule couleur d'action, l'ambre brûlé. Ce qui est du monde reste sombre : les cartes,
 *  le combat, les autels à décor, l'entrée — ils reprennent la palette de nuit par leurs propres variables.
 *  Portrait, une main. Les cartes ne s'animent que par transform/opacity. */

:root {
  /* la nuit : le fond sous l'aquarelle, et la palette des zones sombres (cartes, combat, autels) */
  --nuit: #151220;
  --nuit-haut: #241f2e;
  --nuit-bas: #1b1724;
  --nuit-clair: #2e2838;
  --encre-nuit: #eae0d5;       /* l'encre claire sur la nuit */
  --encre-nuit-2: #b3a99a;
  --or-nuit: #b39a5a;          /* l'or fané tel qu'il se lit sur la nuit */
  /* le parchemin : les feuillets posés sur le monde (docs/da/crepuscule.png) */
  --papier-haut: #ebdfc6;      /* le feuillet, dégradé léger de haut en bas */
  --papier-bas: #dccba6;
  --papier-clair: #f5eddb;     /* une case, une ligne relevée */
  --papier-sombre: #cdb98f;    /* une case en retrait, un séparateur */
  --encre: #3a2b1c;            /* l'encre brune du conte */
  --encre-2: #7a6449;          /* l'encre passée : notes, unités, ce qui informe */
  --or-fane: #8a6d3b;          /* le trait d'or fané sur le parchemin : liserés, titres */
  --or-fane-sombre: #6b5638;
  --ambre: #d9822b;            /* LA couleur d'action : bouton principal, niveau en cours, pastille */
  --ambre-clair: #f3b35c;      /* son halo, le soleil */
  --sur-ambre: #fff6ea;        /* l'encre posée sur l'ambre */
  --brique: #b8413a;           /* perte, refus, et le chiffre qui attend sur un médaillon */
  --sauge: #6d8a68;            /* victoire, gain — rare */
  --dore: #e6c14a;             /* le laiton d'avant : réservé à la dorure des cartes Légendaires */
  /* le grain du papier : un bruit SVG très léger, posé sur les feuillets */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .1 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --papier: var(--grain), linear-gradient(var(--papier-haut), var(--papier-bas));
  /* le cadre d'un feuillet : un trait d'or fané, un filet clair à l'intérieur, l'ombre sur le monde */
  --cadre: 0 0 0 1px var(--or-fane-sombre), inset 0 0 0 1px rgba(255,255,255,.55), 0 8px 24px rgba(0,0,0,.55);
  /* Les coins d'une carte à collectionner : ~3,2 mm sur 63 mm de large, soit 5 % de la largeur — le même que
   * celui découpé dans les versos (gen_images.DOS_RAYON). En pourcentages de la carte elle-même (5 % de sa
   * largeur = 3,5714 % de sa hauteur au format 5:7) : une unité cqw posée sur .carte se mesurerait sur son
   * parent et donnait un recto plus rond que le dos (Mika, 22 sept. 2026). */
  --rayon-carte: 5% / 3.5714%;
  /* les anciens noms restent (ardoise, laiton, ivoire, gris…) : sur le parchemin ils portent l'encre et l'or ;
   * les zones de nuit (.carte, .combat, .panneau.decor, l'entrée) les rebranchent sur la nuit plus bas */
  --ardoise: var(--papier-sombre);
  --ardoise-2: var(--papier-haut);
  --ardoise-3: var(--papier-clair);
  --laiton: var(--or-fane);
  --laiton-sombre: var(--or-fane-sombre);
  --laiton-voile: rgba(138, 109, 59, .28);
  --ivoire: var(--encre);
  --gris: var(--encre-2);
  --rouge: var(--brique);
  --vert: var(--sauge);
  --bleu: #4f86b8;
  --saison: #b5a46d;           /* la dominante du chapitre courant */
  --saison-fond: #14161c;
  --bandeau: 52px;
  --onglets: 60px;
  --rente: 34px;        /* la bande de rente au-dessus des onglets */
  --sur: env(safe-area-inset-top, 0px);
  --sous: env(safe-area-inset-bottom, 0px);
  --verre: rgba(235, 223, 198, .96);
  --ombre: 0 10px 30px rgba(0, 0, 0, .55);
  /* les voiles : sur le parchemin une ombre d'encre, dans la nuit une lueur */
  --voile: rgba(58,43,28,.07); --voile-bord: rgba(58,43,28,.22); --fond-case: rgba(58,43,28,.08); --fond-case-bord: rgba(138,109,59,.3);
  /* les couleurs de rang telles qu'elles se lisent sur le parchemin (les cartes gardent les leurs) */
  --rang-0: #6b7480; --rang-1: #2f6fa8; --rang-2: #7a3fb8; --rang-3: #8a6d1e; --rang-4: #b8413a;
}
/* les zones de nuit : ce qui appartient au monde garde l'encre claire et l'or tel qu'il se lit sur la nuit */
.combat, .panneau.decor, #ecran-entree, .ouverture, .paquet, .entete-carte, .entete-niveau, .vitrine {
  --ardoise: var(--nuit); --ardoise-2: var(--nuit-haut); --ardoise-3: var(--nuit-clair);
  --ivoire: var(--encre-nuit); --gris: var(--encre-nuit-2); --or-fane: var(--or-nuit); --laiton: var(--or-nuit); --or-fane-sombre: #7d6b3f; --laiton-sombre: #7d6b3f;
  color: var(--ivoire);   /* la couleur s'hérite calculée : il faut la reposer dans la zone */
  --laiton-voile: rgba(179,154,90,.28); --bleu: #6fa8dc; --sauge: #7f9c7a;
  --voile: rgba(255,255,255,.05); --voile-bord: rgba(255,255,255,.12); --fond-case: rgba(21,18,32,.6); --fond-case-bord: rgba(179,154,90,.15);
  --rang-0: #a9b0ba; --rang-1: #7db8ee; --rang-2: #c48cf5; --rang-3: var(--dore); --rang-4: #f07a72;
}
/* …et un feuillet de parchemin posé dans une zone de nuit (le panneau de l'entrée) revient à l'encre */
#ecran-entree .panneau, .panneau.decor .bouton:not(.principal) {
  --ivoire: var(--encre); --gris: var(--encre-2); --or-fane: #8a6d3b; --laiton: #8a6d3b; --or-fane-sombre: #6b5638; --laiton-sombre: #6b5638;
  color: var(--ivoire);
  --voile: rgba(58,43,28,.07); --voile-bord: rgba(58,43,28,.22); --fond-case: rgba(58,43,28,.08); --fond-case-bord: rgba(138,109,59,.3);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* la voix du conte (DA § 4, chantier 6) : EB Garamond (OFL, public/fonts/, latin, axe de graisse 400–800, vraies
   petites capitales), Georgia puis la serif du système en repli ; corps 17 px — l'œil de Garamond est petit — et
   rien d'écrit sous .78rem (13 px) hors des cartes, dont les chiffres suivent la largeur */
@font-face { font-family: 'EB Garamond'; src: url('/fonts/ebgaramond.woff2') format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/fonts/ebgaramond-italique.woff2') format('woff2'); font-weight: 400 800; font-style: italic; font-display: swap; }
html, body { margin: 0; height: 100%; background: var(--nuit); color: var(--ivoire); font: 17px/1.35 'EB Garamond', Georgia, 'Times New Roman', serif; overscroll-behavior: none; }
body { background: var(--nuit); }
/* la toile du monde : l'aquarelle du Domaine sous tout l'écran, voilée juste assez pour que le parchemin se détache */
#fond-monde { position: fixed; inset: 0; z-index: 0; background: var(--nuit); pointer-events: none; }
#fond-monde .toile { position: absolute; inset: 0; background: center 30% / cover no-repeat; opacity: 0; transition: opacity .9s ease; }
#fond-monde .toile.visible { opacity: 1; }
#fond-monde::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(21,18,32,.35), rgba(21,18,32,.08) 25%, rgba(21,18,32,.12) 70%, rgba(21,18,32,.55)); }
button { font: inherit; color: inherit; }
/* les titres : une serif fine à petites capitales, espacée, à l'or fané */
h1, h2, h3 { font-weight: 600; color: var(--or-fane); letter-spacing: .06em; }
h1, h3 { font-variant-caps: small-caps; }
/* un titre de section : petites capitales, filet d'or fané qui s'efface vers la droite */
h2 { display: flex; align-items: baseline; gap: 10px; margin: 22px 2px 10px; white-space: nowrap; font-size: .92rem; letter-spacing: .16em; text-transform: uppercase; color: var(--papier-haut); text-shadow: 0 1px 3px rgba(0,0,0,.8), 0 0 12px rgba(0,0,0,.5); }
h2::after { content: ''; flex: 1; min-width: 12px; height: 1px; align-self: center; background: linear-gradient(90deg, rgba(235,223,198,.7), transparent); }
h2 small { color: var(--papier-sombre); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; letter-spacing: .04em; text-transform: none; }
h3 { font-size: 1.25rem; }
.note { color: var(--gris); font-size: .92rem; margin: 4px 0 8px; }
.erreur { color: var(--rouge); }
.ecran { position: fixed; inset: 0; }

/* ------------------------------------------------------------- boutons */
/* le kit (DA § 5.3) : le secondaire est un papier relevé à liseré d'or fané ; le principal, l'ambre brûlé en dégradé,
 * encre claire, ombre courte — la seule couleur d'action de tout le jeu */
.bouton { background: linear-gradient(var(--papier-clair), var(--papier-bas)); border: 1px solid var(--or-fane-sombre); color: var(--encre); border-radius: 10px; padding: 12px 16px; min-height: 48px; flex: 1; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 2px 6px rgba(0,0,0,.35); transition: transform .08s, filter .15s; }
.bouton.principal { background: linear-gradient(#ee9a3e, #c8701f); color: var(--sur-ambre); border-color: var(--ambre-clair); font-weight: bold; text-shadow: 0 1px 1px rgba(60,25,0,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 2px 10px rgba(217,130,43,.35); }
.bouton:active:not(:disabled) { transform: translateY(1px); filter: brightness(.94); }
.bouton:disabled { opacity: .4; box-shadow: none; }
.bouton small { font-weight: normal; opacity: .85; margin-left: 6px; }
.mini { background: linear-gradient(var(--papier-clair), var(--papier-bas)); border: 1px solid var(--or-fane-sombre); color: var(--ivoire); border-radius: 8px; padding: 6px 12px; min-height: 36px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.mini:active { filter: brightness(.94); }
.mini.actif { background: var(--ambre); color: var(--sur-ambre); border-color: var(--ambre); }
.rangee { display: flex; gap: 10px; margin: 10px 0; }
.colonne { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }

/* le panneau du kit (DA § 5.2) : un feuillet de papier de nuit — dégradé, grain, liseré d'or fané, ombre douce —,
 * un fin filet d'or en haut */
.panneau { position: relative; overflow: hidden; background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 12px; padding: 14px; color: var(--encre); box-shadow: var(--cadre); }
.panneau::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(138,109,59,.35); border-radius: 8px; pointer-events: none; }
.panneau > * { position: relative; }
/* un panneau qui porte un décor de Domaine (--decor), voilé */
.panneau.decor { background: var(--nuit-haut) var(--decor, none) center 30% / cover no-repeat; color: var(--encre-nuit); }
.panneau.decor::before { border-color: rgba(179,154,90,.35); z-index: 1; }
.panneau.decor::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(21,18,32,.55), rgba(21,18,32,.9)); }
.panneau.decor > * { z-index: 1; }

/* -------------------------------------------------------------- entrée */
#ecran-entree { background: var(--ardoise) url(/img/fond_nexus.webp?v=1f95743f73) center 35% / cover no-repeat; overflow-y: auto; }
#ecran-entree::before { content: ''; position: fixed; inset: 0; background: linear-gradient(rgba(21,18,32,.55), rgba(21,18,32,.75) 45%, rgba(21,18,32,.96)); }
.entree { position: relative; max-width: 380px; margin: 0 auto; padding: calc(var(--sur) + 7vh) 22px 22px; text-align: center; }
.dos-entree { display: block; width: 104px; margin: 0 auto 14px; filter: drop-shadow(0 0 12px rgba(179,154,90,.35)) drop-shadow(0 18px 20px rgba(0,0,0,.7)); transform: rotate(-5deg); animation: flotter-doux 5s ease-in-out infinite; }
@keyframes flotter-doux { 50% { transform: rotate(-5deg) translateY(-6px); } }
.entree h1 { font-size: 3rem; margin: 0; line-height: 1; text-shadow: 0 0 24px rgba(179,154,90,.45), 0 2px 4px #000; }
.sous-titre { color: var(--laiton-sombre); margin: 6px 0 12px; letter-spacing: .34em; text-transform: uppercase; font-size: .88rem; }
.chrona { color: var(--gris); font-style: italic; margin: 0 0 24px; text-shadow: 0 1px 2px #000; }
.entree .panneau { text-align: left; }
.google { display: flex; justify-content: center; margin-bottom: 14px; min-height: 44px; }
.google:empty { display: none; }
.repli { text-align: left; display: flex; flex-direction: column; gap: 10px; }
.repli label { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; color: var(--gris); letter-spacing: .06em; text-transform: uppercase; }
.repli input { background: var(--papier-clair); border: 1px solid var(--or-fane-sombre); border-radius: 10px; color: var(--ivoire); padding: 12px; font: inherit; font-size: 1rem; min-height: 48px; letter-spacing: 0; text-transform: none; }
.repli input:focus { outline: none; border-color: var(--laiton); box-shadow: 0 0 0 3px rgba(179,154,90,.15); }
.repli .rangee { margin-bottom: 0; }

/* -------------------------------------------------------------- cadre */
.bandeau { position: fixed; top: calc(var(--sur) + 6px); left: 8px; right: 8px; height: calc(var(--bandeau) - 8px); padding: 0; display: flex; align-items: stretch; background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 10px; color: var(--encre); box-shadow: var(--cadre); z-index: 5; }
.bandeau::before { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(138,109,59,.35); border-radius: 7px; pointer-events: none; }
.bandeau .nom-boite { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.bandeau .nom-boite > .icone { height: 26px; flex: none; }
.bandeau .nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.05rem; font-weight: 600; color: var(--encre); }
/* Icônes d'interface (img/icones/*.webp, laiton détouré) : elles se calent sur la hauteur du texte */
.icone { display: inline-block; height: 1em; width: auto; aspect-ratio: 1; vertical-align: -.18em; object-fit: contain; pointer-events: none; user-select: none; }
.ressources { display: flex; font-size: .92rem; }
.ressource { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border-left: 1px solid var(--or-fane-sombre); color: var(--encre); font-variant-numeric: tabular-nums; }
.ressource .icone { height: 1.3em; }
.ressource b { font-weight: normal; }
.ressource.vide { border-color: var(--rouge); color: var(--rouge); }
#r-energie { font-variant-numeric: tabular-nums; font-size: .92rem; }
#contenu { scrollbar-width: none; position: fixed; top: calc(var(--bandeau) + var(--sur) + 4px); bottom: calc(var(--onglets) + var(--sous)); left: 0; right: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.onglet { padding: 6px 14px 28px; }
/* La rente, juste au-dessus des onglets (Mika, 22 sept. 2026) : « le niveau 2-4 veille · +12 battements et
 * +0,6 éclat / min », puis ce qui s'est accumulé depuis la dernière visite, compté en direct. */
#ecran-jeu.avec-rente #contenu { bottom: calc(var(--onglets) + var(--rente) + var(--sous) + 6px); }
.rente { position: fixed; left: 8px; right: 8px; bottom: calc(var(--onglets) + var(--sous) + 6px); height: var(--rente); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 8px; box-shadow: var(--cadre); z-index: 5; font-size: .84rem; color: var(--encre-2); white-space: nowrap; overflow: hidden; }
.rente::before, .rente::after { content: ''; flex: none; width: 18px; height: 1px; background: var(--or-fane); box-shadow: 0 0 0 0 transparent; }
.rente .icone { height: 1.1em; opacity: .85; }
.rente span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* le texte cède la place au bouton, jamais l'inverse */
.rente b { font-weight: 600; color: var(--encre); font-variant-numeric: tabular-nums; }
.rente b:empty { display: none; }
.rente span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rente span .icone { height: 1em; margin-right: 3px; }
.rente span small { color: var(--or-fane); font-size: .84rem; }
.bouton.petit { min-height: 22px; height: 22px; padding: 0 10px; font-size: .84rem; line-height: 1; border-radius: 6px; flex: none; }
.rente .bouton.petit { margin-left: 4px; }
.onglets { position: fixed; bottom: calc(var(--sous) + 6px); left: 8px; right: 8px; height: var(--onglets); display: flex; background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 10px; box-shadow: var(--cadre); overflow: hidden; z-index: 5; }
.onglets button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: none; border: 0; border-left: 1px solid var(--or-fane-sombre); color: var(--encre-2); font-size: .78rem; letter-spacing: .04em; transition: color .15s; }
.onglets button:first-child { border-left: 0; }
.onglets button .icone { width: 30px; height: 30px; transition: transform .15s, filter .15s; filter: saturate(.7) brightness(.85); }
.onglets button.actif { color: var(--encre); background: linear-gradient(rgba(243,179,92,.55), rgba(217,130,43,.4)); }
.onglets button.actif .icone { transform: translateY(-1px); filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.onglets button.actif::before { content: ''; position: absolute; bottom: 4px; left: 30%; right: 30%; height: 2px; background: var(--brique); border-radius: 1px; }

/* -------------------------------------------------------------- chemin */
/* la Remontée respire (DA § 2.2) : le chemin file sous la bande de rente et les onglets, translucides */
#onglet-remontee { padding: 0 0 calc(var(--onglets) + var(--rente) + var(--sous) + 12px); }
#contenu:has(#onglet-remontee:not([hidden])) { bottom: 0 !important; }
#chemin { position: relative; background: transparent; }
/* Le chapelet du jour (chantier 4 de la refonte, 23 sept. 2026) : dix médaillons ronds enfilés sur un fil d'or
   fané à droite du chemin — une icône par chose du jour, jamais d'onglets (Mika). Sans étiquette : le nom est
   dans la page qu'on ouvre ; le compte ambre dit ce qui attend, le médaillon s'allume avec lui. Quarante pixels
   par grain, le chapelet tient en 454 px et laisse les nœuds du chemin (x ≤ 278 + 24) libres sous le doigt. */
.flottants-droit { position: fixed; right: 8px; top: calc(var(--sur) + var(--bandeau) + 10px); z-index: 4; display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
.flottants-droit::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(transparent, var(--or-nuit) 12%, var(--or-nuit) 88%, transparent); opacity: .8; }
.flottant-droit { position: relative; width: 42px; height: 42px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--or-fane-sombre); background: var(--grain), radial-gradient(circle at 35% 30%, var(--papier-clair), var(--papier-bas) 80%); color: var(--encre); cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.55), inset 0 0 0 2px rgba(255,255,255,.5), inset 0 0 0 3px rgba(138,109,59,.35); }
.flottant-droit .icone { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.flottant-droit small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* le nom reste pour le lecteur d'écran */
.flottant-droit:has(.compte:not([hidden])) { border-color: var(--ambre-clair); box-shadow: 0 0 0 1px rgba(243,179,92,.35), 0 0 14px rgba(217,130,43,.45), 0 3px 8px rgba(0,0,0,.55); }
.flottant-droit .compte { position: absolute; top: -5px; right: -6px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; background: var(--brique); color: #fff3e6; font-size: .78rem; font-weight: 700; line-height: 19px; text-align: center; border: 1px solid #f1d9a8; box-shadow: 0 1px 4px rgba(0,0,0,.5); animation: battre-point 1.4s ease-in-out infinite; }
.flottant-droit:active { transform: scale(.94); }
/* la fiche « ? » (chantier 5 de la refonte, 23 sept. 2026) : la règle d'un écran s'ouvre à côté de son titre, l'écran
   ne garde que chiffres, noms et boutons ; par-dessus la page du jour, se ferme seule sans la fermer */
.aide { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; margin-left: 4px; padding: 0; border-radius: 50%; border: 1px solid var(--or-fane-sombre); background: var(--papier-clair); color: var(--or-fane); font: 700 .82rem/1 Georgia, 'Times New Roman', serif; letter-spacing: 0; text-transform: none; font-variant-caps: normal; vertical-align: middle; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.aide:active { transform: scale(.9); }
h2 .aide { align-self: center; }
.page-cal-tete .aide { position: absolute; top: 8px; right: 8px; }
#feuille-aide { z-index: 10; }
.feuille.centre .aide-corps { text-align: left; }
.aide-corps h3 { text-align: center; margin-bottom: 12px; }
.aide-corps p { margin: 0 0 10px; font-size: .95rem; line-height: 1.45; }
/* le glossaire : un terme en tête de ligne, sa définition, un filet entre deux ; la feuille passe au-dessus du combat */
#feuille-aide { z-index: 30; }
.aide-corps p.terme { margin: 0; padding: 7px 0; border-top: 1px solid var(--voile-bord); font-size: .92rem; line-height: 1.4; color: var(--encre-2); }
.aide-corps p.terme:first-child { border-top: 0; }
.aide-corps p.terme b { display: block; color: var(--encre); font-weight: 700; letter-spacing: .02em; }
#feuille-aide.glossaire .feuille-corps { max-width: 400px; }
.lien-glossaire { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 4px 0; background: none; border: 0; color: var(--or-fane); font: inherit; font-size: .92rem; cursor: pointer; }
.lien-glossaire .aide { margin: 0; pointer-events: none; }
.sorts li small.repos { color: var(--encre-2); font-size: .82rem; white-space: nowrap; }
.chrona-dit { margin: 0 0 8px; font-style: italic; color: var(--or-fane); }
#feuille-expedition { z-index: 9; }                     /* s'ouvre par-dessus la page du jour */
.page-expeditions .expeditions { margin: 10px; }
/* la page de calendrier (Mika, 22 sept. 2026) : au centre de l'écran, une feuille pendue à deux anneaux de laiton,
   trente jours en six colonnes sur une grille réglée ; sceau sur les jours pris, le jour luit, les jours à paquet dorés */
#page-jour .feuille-corps { max-width: 400px; padding: 12px 12px 0; text-align: left; background: var(--papier); }
#page-jour:not([data-volet="calendrier"]) .jour-titre, #page-jour:not([data-volet="calendrier"]) #jour-semaine { display: none; }
/* une page centrée ne dépasse jamais l'écran : elle défile dedans, et sa rangée de boutons reste collée en bas */
.feuille.centre .feuille-corps { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--or-fane-sombre) transparent; }
#page-jour .volet > .rangee:last-child { position: sticky; bottom: 0; z-index: 3; margin: 8px -12px 0; padding: 10px 12px 12px; background: linear-gradient(rgba(220,203,166,0), var(--papier-bas) 14px); }
.jour-titre { margin: 0 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--laiton); letter-spacing: .1em; text-transform: uppercase; font-size: .92rem; }
.jour-titre b { font-weight: 600; white-space: nowrap; }
.jour-titre span { color: var(--gris); font-size: .84rem; letter-spacing: 0; text-transform: none; text-align: center; }
.page-cal { position: relative; margin: 14px 0 12px; border: 1px solid var(--laiton-sombre); border-radius: 8px; background: var(--papier-clair); box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05); }
/* les anneaux de reliure : seulement sur la page du calendrier, là où ils ont un sens (Mika, 25 sept. 2026 : ailleurs,
   « aucun intérêt graphique ») */
.page-calendrier::before, .page-calendrier::after { content: ''; position: absolute; top: -13px; width: 14px; height: 22px; border: 3px solid var(--laiton); border-radius: 8px; background: transparent; box-shadow: 0 2px 4px rgba(0,0,0,.6); }
.page-calendrier::before { left: 20%; } .page-calendrier::after { right: 20%; }
.page-cal-tete { position: relative; padding: 14px 36px 10px; text-align: center; border-bottom: 1px solid var(--laiton-sombre); background: linear-gradient(rgba(179,154,90,.14), rgba(179,154,90,.03)); border-radius: 8px 8px 0 0; }
.page-cal-tete h3 { margin: 0; color: var(--laiton); letter-spacing: .1em; text-transform: uppercase; font-size: .95rem; font-weight: 600; line-height: 1.2; }
.page-cal-tete p { margin: 4px 0 0; color: var(--gris); font-size: .84rem; }
.page-cal-tete p b { color: var(--ivoire); font-weight: normal; }
/* le volet de l'énigme : même page reliée que le calendrier, les deux camps l'un au-dessus de l'autre */
.page-enigme .enigme-camps { padding: 12px 8px 6px; }
.page-enigme .rangee-cartes { gap: 6px; flex-wrap: nowrap; }
.page-enigme .rangee-cartes .carte { width: 30%; max-width: 120px; }
.page-enigme .enigme-contre { margin: 6px 0; text-align: center; color: var(--laiton); font-size: .84rem; letter-spacing: .3em; text-transform: uppercase; }
.page-enigme .enigme-etat { margin: 0; padding: 8px 12px 10px; border-top: 1px solid var(--laiton-sombre); color: var(--gris); font-size: .84rem; text-align: center; }
.page-enigme .enigme-etat b { color: var(--ivoire); font-weight: normal; }
.page-enigme .enigme-etat .enigme-gain { display: inline-flex; align-items: center; gap: 3px; color: var(--ivoire); }
.page-enigme .enigme-etat .enigme-gain .icone { width: 14px; height: 14px; }
/* le volet des contrats : trois lignes à jauge, le coffre dessous */
.page-contrats .contrats { list-style: none; margin: 0; padding: 6px 10px 2px; }
.page-contrats .contrats li { display: grid; grid-template-columns: 30px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #332c3e; }
.page-contrats .contrats li:last-child { border-bottom: 0; }
.page-contrats .contrats li > .icone { grid-row: 1 / 3; width: 30px; height: 30px; }
.page-contrats .contrats .texte { color: var(--ivoire); font-size: .92rem; line-height: 1.2; }
.page-contrats .contrats .jauge { grid-column: 2; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.page-contrats .contrats .jauge .barre { flex: 1; height: 5px; border-radius: 3px; background: var(--voile-bord); overflow: hidden; }
.page-contrats .contrats .jauge .barre i { display: block; height: 100%; width: var(--part, 0%); background: var(--laiton); transition: width .4s; }
.page-contrats .contrats .jauge small { color: var(--gris); font-size: .78rem; min-width: 28px; text-align: right; }
.page-contrats .contrats .gain { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: .84rem; color: var(--gris); }
.page-contrats .contrats .gain span { display: inline-flex; align-items: center; gap: 3px; }
.page-contrats .contrats .gain .icone { width: 12px; height: 12px; }
.page-contrats .contrats .gain .bouton.petit { margin-top: 2px; }
.page-contrats .contrats li.pris .texte, .page-contrats .contrats li.pris .jauge { opacity: .5; }
.page-contrats .contrats li.pris .gain { color: var(--laiton); }
.page-contrats .contrats li.pris .gain .sceau { width: 26px; height: 26px; transform: rotate(-10deg); filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); animation: sceller .35s cubic-bezier(.2,.8,.3,1.3) backwards; }
.page-contrats .coffre { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--laiton-sombre); background: linear-gradient(rgba(179,154,90,.06), rgba(179,154,90,.14)); border-radius: 0 0 8px 8px; }
.page-contrats .coffre > .icone { width: 42px; height: 42px; filter: grayscale(.9) brightness(.6); transition: filter .4s; }
.page-contrats .coffre.ouvrable > .icone { filter: none; animation: luire-icone 1.4s ease-in-out infinite alternate; }
.page-contrats .coffre.pris > .icone { filter: none; opacity: .6; }
.page-contrats .coffre .texte { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.page-contrats .coffre .texte b { color: var(--ivoire); font-weight: normal; font-size: .92rem; }
.page-contrats .coffre .texte span { color: var(--gris); font-size: .84rem; }
@keyframes luire-icone { from { filter: drop-shadow(0 0 2px rgba(179,154,90,.3)); } to { filter: drop-shadow(0 0 10px rgba(179,154,90,.9)); } }
.page-cal-grille { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; padding: 1px; background: var(--or-fane-sombre); border-radius: 0 0 8px 8px; overflow: hidden; }
.page-cal-grille .jour { position: relative; min-height: 62px; padding: 3px 3px 4px; background: var(--papier-haut); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.page-cal-grille .jour small { position: absolute; top: 3px; left: 5px; font-size: .78rem; color: var(--gris); line-height: 1; }
.page-cal-grille .jour .don { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: 12px; }
.page-cal-grille .jour .don span { display: flex; flex-direction: column; align-items: center; font-size: .62rem; line-height: 1.1; color: var(--ivoire); }
.page-cal-grille .jour .don span:nth-child(2) { flex-direction: row; gap: 2px; margin-top: -2px; }
.page-cal-grille .jour .don span:nth-child(2) .icone { width: 12px; height: 12px; }
.page-cal-grille .jour .don .icone { width: 22px; height: 22px; margin-bottom: 1px; }
.page-cal-grille .jour.fete { background: linear-gradient(rgba(217,130,43,.28), rgba(217,130,43,.1)), var(--papier-haut); }
.page-cal-grille .jour.fete small { color: var(--or-fane-sombre); font-weight: 600; }
.page-cal-grille .jour.pris .don, .page-cal-grille .jour.pris small { opacity: .45; }
.page-cal-grille .jour .sceau { position: absolute; inset: 0; margin: auto; width: 60%; height: auto; transform: rotate(var(--tour, -12deg)); opacity: .92; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); animation: sceller .35s cubic-bezier(.2,.8,.3,1.3) backwards; }
.page-cal-grille .jour.aujourdhui { z-index: 1; background: #fff8e8; box-shadow: inset 0 0 0 2px var(--ambre), inset 0 0 14px rgba(217,130,43,.35); animation: luire 1.6s ease-in-out infinite alternate; }
.page-cal-grille .jour.aujourdhui small { color: var(--ambre); font-weight: bold; }
@keyframes luire { to { box-shadow: inset 0 0 0 2px var(--ambre), inset 0 0 24px rgba(217,130,43,.6); } }
@keyframes sceller { from { transform: rotate(var(--tour, -12deg)) scale(1.8); opacity: 0; } }
#chemin svg { display: block; width: 100%; height: auto; }
/* « Revenir au 1-5 » : un feuillet flottant en bas à gauche du chemin, au-dessus de la rente */
.vers-courant { position: fixed; left: 12px; bottom: calc(var(--onglets) + var(--rente) + var(--sous) + 22px); z-index: 4; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 22px; border: 1px solid var(--or-fane-sombre); background: var(--papier); box-shadow: var(--cadre); color: var(--encre); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; animation: apparaitre .25s ease-out; }
.vers-courant .icone { width: 28px; height: 28px; }
/* la route (da-nuit) : posée sur la toile, un bord d'encre, la chaussée de pierre pâle, les joints en pointillé */
/* la chaussée pavée : un bord d'encre, une bordure de pierre, les pavés en motif (#paves) */
.route-bord, .route-bordure, .route, .route-pas { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-bord { stroke: rgba(30,20,14,.75); }
.route-bordure { stroke: #8d7b5c; }
.route { stroke: url(#paves); }
.route-pas { stroke: var(--ambre); stroke-dasharray: 0 10; stroke-linecap: round; opacity: .8; }
/* la plaque de l'étape : un petit feuillet */
.plaque rect { fill: #ebdfc6; stroke: var(--or-fane-sombre); stroke-width: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.plaque .plaque-filet { fill: none; stroke: rgba(138,109,59,.4); filter: none; }
.zone-titre { font-size: 17px; letter-spacing: .04em; fill: var(--encre); font-weight: 600; }
.zone-sous { fill: var(--encre-2); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
/* les nœuds = des médaillons de parchemin numérotés à l'encre, posés sur un petit socle d'ombre ;
 * fait → parchemin franc ; en cours → soleil d'ambre à rayons, halo qui respire ; à venir → parchemin passé */
.niveau { cursor: pointer; }
.niveau .socle { fill: rgba(20,14,10,.45); }
.niveau circle.rond { fill: #dccba6; stroke: #5c4832; stroke-width: 2.5; }
.niveau circle.filet { fill: none; stroke: rgba(92,72,50,.45); stroke-width: 1; pointer-events: none; }
.niveau.fait circle.rond { fill: #ebdfc6; stroke: #6b5638; }
.niveau.courant circle.rond { fill: url(#soleil); stroke: #f3d6a0; stroke-width: 3; animation: respirer-medaillon 2s ease-in-out infinite alternate; }
.niveau.courant circle.filet { stroke: rgba(255,240,200,.5); }
.niveau.courant .rayons line { stroke: var(--ambre-clair); stroke-width: 2.5; stroke-linecap: round; opacity: .9; }
@keyframes respirer-medaillon { from { filter: drop-shadow(0 0 4px rgba(217,130,43,.5)); } to { filter: drop-shadow(0 0 14px rgba(243,179,92,1)); } }
.niveau.courant .onde { fill: none; stroke: var(--ambre-clair); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: onde 2s ease-out infinite; }
.niveau.ferme circle.rond { fill: #b7a47f; stroke: #5c4832; }
.niveau.ferme text { fill: #6b5a45; }
.niveau text { fill: var(--encre); font-size: 24px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.niveau.courant text { fill: #fff6ea; text-shadow: 0 1px 2px rgba(90,40,0,.7); }
.niveau.boss circle.rond { stroke-width: 3; }
.niveau.boss image { pointer-events: none; }
.niveau.boss.ferme image { opacity: .5; }
.niveau.boss.fait image { opacity: .9; }
.niveau.boss text { font-size: 12px; fill: #ebdfc6; font-weight: bold; text-shadow: none; }
.niveau.boss .etiquette { fill: #3a2b1c; stroke: #ebdfc6; stroke-width: 1; }
.niveau.boss .crane { font-size: 14px; fill: #ebdfc6; }
@keyframes onde { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }

/* -------------------------------------------------------------- cartes */
.rangee-cartes { display: flex; gap: 8px; justify-content: center; align-items: flex-end; flex-wrap: wrap; }
.grille-cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
/* Les cartes — le recto de la DA « crépuscule » (docs/da/crepuscule_deck.png, Mika, 23 sept. 2026) : un feuillet de
 * parchemin cerné d'encre, l'illustration dans sa fenêtre à filet sombre, le ruban de la saison qui pend en haut à
 * gauche, le médaillon de niveau en ambre à cheval sur le bas de l'image, deux cases de chiffres dessous, le nom à
 * l'encre, la jauge au pied. Le rang monte comme un bijou :
 *   Commun      parchemin mat, filet d'encre
 *   Rare        filet et ornements d'argent bleuté, holo sur l'illustration seule
 *   Épique      filet et ornements violets, holo à motif sur l'illustration
 *   Légendaire  l'illustration va jusqu'au bord, dorure (ornements, nom), les cases posées sur l'image
 *   Mythique    la même chose, film prismatique, dorure rouge et or, une aura qui bat
 * Tout est en cqw (la carte fait 100 × 140 cqw) : elle se lit à 85 px comme à 200 px. Le film holo suit
 * l'inclinaison du téléphone (--hx / --hy posés par app.js), ou ondule tout seul en vitrine. */
.carte { --teinte: var(--saison); --couleur-rang: #5c4832; --img: linear-gradient(#000, #000);   /* noir : pas de brillant tant que l’illustration n’est pas là (carte.js) */
  --ivoire: var(--encre); --gris: var(--encre-2);
  --argent: linear-gradient(135deg, #7d8594 0%, #e9edf3 28%, #9aa3b3 45%, #ffffff 55%, #8b93a3 72%, #dfe4ec 100%);
  --or: linear-gradient(135deg, #6e5312 0%, #f6e27a 30%, #c9a63a 48%, #fff3b0 58%, #a8852a 75%, #f1d36a 100%);
  --arc: linear-gradient(115deg, rgba(255,60,90,.55), rgba(255,190,40,.55), rgba(120,255,140,.55), rgba(60,200,255,.55), rgba(190,90,255,.55), rgba(255,60,90,.55));
  /* les bandes de lumière qui glissent sur l'illustration : violette (Épique), dorée (Légendaire), prismatique (Mythique) */
  --lumiere-violette: linear-gradient(115deg, transparent 41%, rgba(196,140,245,.7) 46%, rgba(255,255,255,1) 50%, rgba(140,200,255,.7) 54%, transparent 59%);
  --lumiere-or: linear-gradient(115deg, transparent 40%, rgba(255,210,120,.8) 46%, rgba(255,250,225,1) 50%, rgba(255,210,120,.8) 54%, transparent 60%);
  --lumiere-prisme: linear-gradient(115deg, transparent 38%, rgba(255,80,110,.75) 43%, rgba(255,200,80,.85) 47%, rgba(255,255,255,1) 50%, rgba(90,220,255,.85) 53%, rgba(190,110,255,.75) 57%, transparent 62%);
  --bord: #5c4832; --ombre: 0 3px 8px rgba(0,0,0,.55);
  position: relative; width: 100%; aspect-ratio: 5 / 7; container-type: inline-size; overflow: hidden; border-radius: var(--rayon-carte);
  color: var(--encre); background: var(--grain), linear-gradient(#efe4cc, #dccba6); background-size: 180px 180px, 100% 100%; border: 1px solid var(--bord);
  box-shadow: var(--ombre), inset 0 0 0 1.2cqw rgba(255,255,255,.35), inset 0 0 0 1.6cqw rgba(107,86,56,.35);
  cursor: pointer; transition: transform .2s; will-change: transform; user-select: none; }
.carte.rang-1 { --couleur-rang: #5b8fc4; --bord: #4f7196; }
.carte.rang-2 { --couleur-rang: #8a5cc4; --bord: #6d4a99; }
.carte.rang-3 { --couleur-rang: #c9a63a; --bord: #8a6d1e; }
.carte.rang-4 { --couleur-rang: #e0685e; --bord: #8f3a2c; }
/* la fenêtre de l'illustration */
.carte .portrait { position: absolute; left: 5cqw; top: 5cqw; width: 90cqw; height: 88cqw; object-fit: cover; object-position: center 25%; background: var(--nuit-haut); border: 1px solid #3a2b1c; border-radius: 2.5cqw; box-shadow: 0 0 0 .8cqw color-mix(in srgb, var(--couleur-rang) 55%, transparent); }
.carte .holo { display: none; position: absolute; left: 5cqw; top: 5cqw; width: 90cqw; height: 88cqw; border-radius: 2.5cqw; z-index: 1; pointer-events: none; background-size: 220% 220%; background-position: calc(50% + var(--hx, 0) * 45%) calc(50% + var(--hy, 0) * 45%); }
/* Le brillant ne prend que sur l'illustration (Mika, 24 sept. 2026 : « brillant, mais que sur les parties de l'image,
 * pas sur la carte ») : il est découpé à la fenêtre de l'image, et l'image elle-même lui sert de masque en luminance
 * (posée deux fois et additionnée, pour qu'il se voie) : les ombres restent sombres, les parties claires s'allument.
 * Plus de rayures ni de paillettes. Sur les cartes à pleine illustration, il s'éteint avant le nom et les chiffres. */
.carte :is(.holo, .reflet) { mask: var(--img) center 25% / cover no-repeat, var(--img) center 25% / cover no-repeat; mask-mode: luminance; mask-composite: add; }
.carte:is(.rang-3, .rang-4, .plein) :is(.holo, .reflet) { mask: linear-gradient(#fff 60%, #000 74%), var(--img) center / cover no-repeat, var(--img) center / cover no-repeat; mask-mode: luminance; mask-composite: intersect, add; }
/* le ruban de la saison : une bannière à queue d'aronde, teinte du Domaine, l'icône laiton dedans */
.carte .embleme { position: absolute; z-index: 5; top: 0; left: 8cqw; width: 15cqw; height: 23cqw; display: flex; align-items: flex-start; justify-content: center; padding-top: 3.5cqw;
  background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 30%, transparent 70%, rgba(0,0,0,.25)), color-mix(in srgb, var(--teinte) 62%, #2a1a0c);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.carte .embleme::after { content: ''; position: absolute; inset: 0 1.2cqw; border-left: 1px solid rgba(255,230,180,.45); border-right: 1px solid rgba(255,230,180,.45); pointer-events: none; }
.carte .embleme .icone { width: 10cqw; height: 10cqw; filter: drop-shadow(0 1px 1px rgba(0,0,0,.7)); }
/* le rôle (Mika, 27 sept. 2026) : une bannière jumelle de celle de la saison, côté droit, à la couleur du rôle */
.carte .banniere-role { position: absolute; z-index: 5; top: 0; right: 8cqw; width: 15cqw; height: 23cqw; display: flex; align-items: flex-start; justify-content: center; padding-top: 3.5cqw; box-sizing: border-box;
  background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 30%, transparent 70%, rgba(0,0,0,.25)), color-mix(in srgb, var(--c) 72%, #2a1a0c);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); color: #fff4dc; pointer-events: none; }
.carte .banniere-role::after { content: ''; position: absolute; inset: 0 1.2cqw; border-left: 1px solid rgba(255,230,180,.45); border-right: 1px solid rgba(255,230,180,.45); }
.carte .banniere-role svg { width: 9cqw; height: 9cqw; filter: drop-shadow(0 1px 1px rgba(0,0,0,.7)); }
.medaille-role { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; border-radius: 50%; color: #fff8ec;
  background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 70%); border: 1px solid #f1dfb3; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.medaille-role svg { width: 62%; height: 62%; }
/* le médaillon du niveau, à cheval sur le bas de l'image ; son anneau porte la couleur du rang */
.carte .niv { position: absolute; z-index: 4; left: 50%; top: 85cqw; width: 17cqw; height: 17cqw; margin-left: -8.5cqw; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 8.5cqw; font-weight: 700; line-height: 1; color: #fff6ea; text-shadow: 0 1px 1px rgba(90,40,0,.8); font-variant-numeric: tabular-nums;
  background: radial-gradient(circle at 40% 35%, #f8cf7e, #e0892f 60%, #b8631c); border: .9cqw solid var(--couleur-rang); box-shadow: 0 1px 3px rgba(0,0,0,.6), inset 0 0 0 .5cqw rgba(255,240,200,.45); }
.carte.rang-0 .niv { border-color: #f3d6a0; }
/* les chiffres : deux cases de parchemin cernées d'encre */
.carte .boite { position: absolute; z-index: 2; left: 5cqw; right: 5cqw; top: 98cqw; bottom: 3.5cqw; display: flex; flex-direction: column; gap: 1.2cqw; }
.carte .stats { display: flex; gap: 2.5cqw; font-size: 7.6cqw; color: var(--encre); }
.carte .stats span { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 1.4cqw; height: 15cqw; border-radius: 2cqw; border: 1px solid rgba(92,72,50,.55); background: rgba(255,250,238,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.carte .stats span:first-child { order: 2; }   /* l'attaque à gauche, la durabilité à droite, comme la maquette */
.carte .stats .icone { height: 1.05em; }
.carte .stats b { color: var(--encre); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* attaque d'une carte Figée : la base barrée, la moitié réelle en givre (Mika, 23 sept. 2026) */
.carte .stats b.moitie { display: inline-flex; align-items: baseline; gap: 1.2cqw; }
.carte .stats b.moitie s { color: var(--encre-2); opacity: .75; font-size: .82em; text-decoration-color: #c0392b; text-decoration-thickness: .12em; }
.carte .stats b.moitie em { font-style: normal; color: #1f6fa8; font-weight: bold; }
/* le nom, à l'encre sous les chiffres ; le rang ne s'écrit plus, il se voit (filets, ornements, anneau du médaillon) */
.carte .nom { position: absolute; z-index: 2; left: 5cqw; right: 5cqw; top: 115cqw; height: 13cqw; display: flex; align-items: center; justify-content: center; font-size: 6.4cqw; font-weight: 600; line-height: 1.05; color: var(--encre); text-align: center; overflow: hidden; }
.carte .nom span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.carte .rang { display: none; }
.carte .jauge { position: absolute; left: 7cqw; right: 7cqw; bottom: 3.5cqw; height: 2.6cqw; background: rgba(58,43,28,.25); border-radius: 2cqw; overflow: hidden; }
.carte .jauge i { display: block; height: 100%; background: var(--sauge); transform-origin: left; transition: transform .35s; }
.carte .jauge i.bas { background: var(--brique); }
/* hors combat la carte est entière : la jauge ne se montre que là où la santé compte */
.carte .jauge:has(i[style*="scaleX(1)"]) { opacity: 0; }
/* en combat la santé est tout : la jauge se montre toujours, plus épaisse */
.combat .carte .jauge, .combat .carte .jauge:has(i) { opacity: 1; height: 4cqw; }
/* l'ornement : un filet intérieur et quatre coins en double volute, dessinés une fois en SVG (500 × 700)
 * et posés en masque sur .relief ; ce qui le remplit (argent, violet, or) dépend du rang. */
.carte .relief { display: none; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  --ornement: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 700' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round'%3E%3Crect x='11' y='11' width='478' height='678' rx='10'/%3E%3Cg id='c'%3E%3Cpath d='M24 110C24 62 62 24 110 24'/%3E%3Ccircle cx='49' cy='49' r='5' fill='%23fff' stroke='none'/%3E%3Cpath d='M110 24l12 5-12 5M24 110l5 12 5-12'/%3E%3C/g%3E%3Cuse href='%23c' transform='translate(500 0) scale(-1 1)'/%3E%3Cuse href='%23c' transform='translate(0 700) scale(1 -1)'/%3E%3Cuse href='%23c' transform='translate(500 700) scale(-1 -1)'/%3E%3Cpath d='M236 16l14-8 14 8-14 8z M236 684l14-8 14 8-14 8z' fill='%23fff' stroke='none'/%3E%3C/svg%3E");
  -webkit-mask: var(--ornement) center / 100% 100% no-repeat; mask: var(--ornement) center / 100% 100% no-repeat; }
.carte .blindage { position: absolute; top: 2cqw; right: 2cqw; background: var(--bleu); color: #fff; border-radius: 10px; font-size: .65rem; padding: 1px 6px; font-weight: bold; z-index: 5; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.carte .blindage:empty { display: none; }
/* « ×3 » : une pastille d'encre ronde en haut à droite */
/* en haut au centre, entre la bannière de saison et celle de rôle (27 sept. 2026 : elle passait sous la bannière de rôle) */
.carte .pastille { position: absolute; top: 5cqw; left: 50%; translate: -50% 0; max-width: 48cqw; white-space: nowrap; overflow: hidden; min-width: 16cqw; height: 14cqw; padding: 0 3cqw; display: flex; align-items: center; justify-content: center; border-radius: 8cqw; background: rgba(42,30,20,.88); color: #f3e6c8; border: 1px solid rgba(243,214,160,.55); font-size: 7cqw; font-weight: 600; z-index: 6; box-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* le sort spécial en combat : une pastille d'encre à cheval sur le bas de l'image — le nombre de tours à attendre
 * dans un rond, le nom du sort ; lavée d'ambre et battante quand il est prêt */
.carte .recharge { position: absolute; z-index: 5; left: 8cqw; right: 8cqw; top: 84cqw; height: 13cqw; display: flex; align-items: center; gap: 2cqw; padding: 0 3cqw 0 1cqw; border-radius: 7cqw;
  background: rgba(30,22,16,.9); border: 1px solid rgba(243,214,160,.5); color: #efe4cc; font-size: 6cqw; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }
.carte .recharge b { flex: none; min-width: 10cqw; height: 10cqw; padding: 0 1.5cqw; border-radius: 5cqw; display: flex; align-items: center; justify-content: center; background: #efe4cc; color: var(--encre); font-size: 6.5cqw; font-weight: 700; }
.carte .recharge span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte .recharge.pop { animation: pop .45s ease-out; }
.carte .niv + .recharge, .carte:has(.recharge) .niv { display: none; }
/* Rare — argent bleuté : ornements, holo arc-en-ciel sur l'illustration seule */
.carte.rang-1 .holo { display: block; background-image: var(--arc); mix-blend-mode: overlay; opacity: .45; }
.carte.rang-1 .relief { display: block; background: var(--argent); background-size: 220% 220%; background-position: calc(50% + var(--hx, 0) * 40%) calc(50% + var(--hy, 0) * 40%); opacity: .95; }

/* Épique — violet : ornements violets métallisés ; sur l'illustration, une bande de lumière violette */
.carte.rang-2 { background-image: var(--grain), linear-gradient(#ece0d4, #d5c3b0); }
.carte.rang-2 .holo { display: block; mix-blend-mode: color-dodge; opacity: .9; background-image: var(--lumiere-violette); }
.carte.rang-2 .relief { display: block; background: linear-gradient(135deg, #5b3d86 0%, #e6c9ff 30%, #9b6fd0 48%, #ffffff 58%, #7a52ad 75%, #d9b8ff 100%); background-size: 220% 220%; background-position: calc(50% + var(--hx, 0) * 40%) calc(50% + var(--hy, 0) * 40%); }

/* Légendaire — sans cadre : l'illustration (l'alt-art, en 2:3) va jusqu'au bord ; les cases de chiffres se posent
 * sur l'image, le nom passe à l'or sur un voile, la dorure court sur les ornements */
.carte.rang-3 .portrait, .carte.rang-4 .portrait { left: 0; top: 0; width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; object-position: center; }
.carte.rang-3 .holo, .carte.rang-4 .holo { display: block; left: 0; top: 0; width: 100%; height: 100%; border-radius: 0;
  mix-blend-mode: color-dodge; opacity: 1; background-image: var(--lumiere-or); }
.carte.rang-3::before, .carte.rang-4::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 50%; z-index: 1; pointer-events: none; background: linear-gradient(transparent, rgba(21,18,32,.55) 45%, rgba(21,18,32,.9)); }
.carte.rang-3 .stats span, .carte.rang-4 .stats span { background: rgba(239,228,204,.88); border-color: rgba(138,109,30,.8); }
.carte.rang-3 .nom span, .carte.rang-4 .nom span { color: transparent; background-image: var(--or); background-size: 220% 220%; background-position: calc(50% + var(--hx, 0) * 40%) calc(50% + var(--hy, 0) * 40%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 1px 0 rgba(0,0,0,.95)) drop-shadow(0 0 3px rgba(0,0,0,.8)); }
.carte.rang-3 .relief, .carte.rang-4 .relief { display: block; background: var(--or); background-size: 220% 220%; background-position: calc(50% + var(--hx, 0) * 40%) calc(50% + var(--hy, 0) * 40%); filter: drop-shadow(0 1px 1px rgba(0,0,0,.8)); }
.carte.rang-3 .jauge, .carte.rang-4 .jauge { background: rgba(0,0,0,.45); }
.carte.rang-3 { --ombre: 0 0 10px rgba(230,193,74,.5), 0 3px 8px rgba(0,0,0,.55); }

/* Mythique — la Légendaire poussée : film prismatique, dorure rouge et or, une aura qui bat */
.carte.rang-4 .holo { background-image: var(--lumiere-prisme); opacity: .8; }
.carte.rang-4 .relief, .carte.rang-4 .nom span { background-image: linear-gradient(135deg, #7a2a24 0%, #ffd6a0 28%, #f07a72 45%, #fff3b0 56%, #b8402f 72%, #f6e27a 100%); }
.carte.rang-4 { --ombre: 0 0 12px rgba(240,122,114,.55), 0 3px 8px rgba(0,0,0,.55); animation: aura-mythique 2.6s ease-in-out infinite alternate; }
@keyframes aura-mythique { to { box-shadow: 0 0 22px rgba(240,122,114,.85), 0 3px 8px rgba(0,0,0,.55); } }
/* Sans capteur d'inclinaison, les films ondulent d'eux-mêmes là où la carte est seule à l'écran. */
html:not(.incline) :is(.vitrine, .pli, #deck-cartes) .carte :is(.holo, .relief, .nom span) { animation: miroiter 5s ease-in-out infinite alternate; }
@keyframes miroiter { from { background-position: 20% 30%; } to { background-position: 80% 70%; } }

.carte .flottant { z-index: 1; }
.carte.choisie { outline: 3px solid var(--ambre); outline-offset: 2px; }
/* la Rupture : la carte tombée éclate — un éclair rouge qui gonfle et retombe, sans quitter sa place */
.carte.eclate { animation: eclater .6s ease-out; }
@keyframes eclater { 30% { filter: grayscale(1) brightness(2.2) drop-shadow(0 0 26px var(--rouge)); transform: rotate(-6deg) scale(1.02); } 100% { filter: grayscale(1) brightness(.5); transform: rotate(-6deg) scale(.92); } }
.carte.tombee { filter: grayscale(1) brightness(.5); transform: rotate(-6deg) scale(.92); transition: transform .5s, filter .5s; }

/* animations de combat — transform seulement */
.carte.elan-bas { animation: elan-bas .5s ease-out; }
.carte.elan-haut { animation: elan-haut .5s ease-out; }
.carte.secousse { animation: secousse .4s; }
.carte.lueur { animation: lueur .6s; }
.carte.esquive { animation: esquive .5s; }
.carte.arrivee { animation: arrivee .5s ease-out; }
@keyframes elan-bas { 30% { transform: translateY(26px) scale(1.06); } 100% { transform: none; } }
@keyframes elan-haut { 30% { transform: translateY(-26px) scale(1.06); } 100% { transform: none; } }
@keyframes secousse { 20% { transform: translateX(-6px) rotate(-2deg); } 50% { transform: translateX(6px) rotate(2deg); } 80% { transform: translateX(-3px); } }
@keyframes lueur { 50% { transform: scale(1.05); box-shadow: 0 0 18px var(--vert); } }
@keyframes esquive { 40% { transform: translateX(28px) rotate(4deg); opacity: .5; } }
@keyframes arrivee { from { transform: scale(.4); opacity: 0; } }
/* la carte qui agit passe devant les autres le temps de sa charge ou de son envol */
.carte.charge, .carte.envol { z-index: 6; transition: none; }
/* l'aura d'un soin (verte) ou d'un blindage (bleue) : un halo qui s'allume puis s'éteint, des étincelles qui montent */
.carte .aura { position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; --lueur: var(--vert); animation: aura var(--ms, 1s) ease-out forwards; }
.carte .aura.bouclier { --lueur: var(--bleu); }
.carte .aura.or { --lueur: var(--dore); }
.carte .flottant.or { z-index: 6; top: 30%; color: var(--laiton); font-size: 1.15rem; letter-spacing: .06em; text-shadow: 0 0 6px #000, 0 0 12px rgba(179,154,90,.6); animation-duration: 1.3s; }
.carte .aura::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 26px var(--lueur); opacity: .8; }
.carte .aura.bouclier::before { border: 2px solid var(--lueur); box-shadow: inset 0 0 20px var(--lueur); }
.carte .aura i { position: absolute; bottom: 20%; width: var(--taille, 4px); height: var(--taille, 4px); border-radius: 50%; background: var(--lueur); box-shadow: 0 0 6px var(--lueur); animation: etincelle calc(var(--ms, 1s) * .7) ease-out forwards; opacity: 0; }
@keyframes aura { 0% { opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes etincelle { 0% { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-70px) scale(1); opacity: 0; } }
.carte .blindage.pop { animation: pop .5s ease-out; }
@keyframes pop { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
/* les chiffres qui flottent : gros, cernés de noir, un coup de poing à l'arrivée puis ils montent (Mika, 23 sept. 2026 :
 * « les dommages qu'on ne distingue pas bien ») */
.flottant { position: absolute; left: 50%; top: 38%; z-index: 7; transform: translateX(-50%); font-weight: 900; font-size: 2rem; line-height: 1; color: #ff5a4a; white-space: nowrap;
  -webkit-text-stroke: 1px #2a0400; paint-order: stroke fill; text-shadow: 0 0 3px #000, 0 0 10px #000, 0 2px 0 #000; animation: flotter 1.3s ease-out forwards; pointer-events: none; }
.flottant.soin { color: #7ff0a0; -webkit-text-stroke-color: #062a10; }
.flottant.bouclier { color: #8fd3ff; -webkit-text-stroke-color: #04223a; font-size: 1.5rem; }
.flottant.texte { font-size: .9rem; font-weight: 700; color: var(--laiton); -webkit-text-stroke: 0; letter-spacing: .03em; }
.flottant.effet { top: 58%; font-size: .95rem; font-weight: 800; color: #8fd3ff; -webkit-text-stroke: 0; text-shadow: 0 0 4px #000, 0 0 10px #000; animation-duration: 1.5s; }
.flottant.moitie { color: #9fdcff; -webkit-text-stroke-color: #062a44; font-size: 1.55rem; }     /* coup divisé par deux : givré, plus petit */
.flottant.effet.moitie { color: #9fdcff; top: 30%; }
.flottant.effet.usure { color: #b6e06a; } .flottant.effet.stase { color: #d19bff; } .flottant.effet.decomposition { color: #f0b46a; }
@keyframes flotter { 0% { transform: translate(-50%, 6px) scale(1.7); opacity: 0; } 12% { transform: translate(-50%, 0) scale(1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -46px) scale(.95); opacity: 0; } }
/* la carte touchée s'embrase d'un éclair rouge le temps du coup */
.carte.touche::after { content: ''; position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at 50% 45%, rgba(255,90,74,.55), rgba(255,40,20,.15) 60%, transparent 75%); box-shadow: inset 0 0 0 3px rgba(255,90,74,.9); animation: coup .45s ease-out forwards; }
@keyframes coup { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ce que la carte porte en combat : des chips en colonne au coin gauche, et un voile teinté — Stase violet, Figé
 * givre, Usure vert malade, Déphasage fantôme, Mur bois. Par-dessus le recto, qui ne change pas. */
.carte .statuts { position: absolute; top: 2cqw; left: 2cqw; z-index: 6; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; pointer-events: none; }
.carte .statuts .chip { font-size: .62rem; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 8px; color: #fff; background: rgba(20,20,30,.9); border: 1px solid rgba(255,255,255,.35); text-shadow: 0 1px 0 #000; box-shadow: 0 1px 3px #000; white-space: nowrap; animation: pop .45s ease-out; }
.carte .statuts .chip.pop { animation: pop .45s ease-out; }
.carte .statuts .chip.fige { background: #1d4f7a; border-color: #8fd3ff; color: #dff4ff; }
.carte .statuts .chip.stase { background: #4a2270; border-color: #d19bff; color: #f0deff; }
.carte .statuts .chip.usure { background: #3a5416; border-color: #b6e06a; color: #eaffc8; }
.carte .statuts .chip.retard { background: #4d3a14; border-color: #e8c36a; color: #fff3cf; }
.carte .statuts .chip.engelure { background: #26455e; border-color: #bfe6ff; color: #eaf7ff; }
.carte .statuts .chip.aiguise, .carte .statuts .chip.force { background: #6b2616; border-color: #ff9a6a; color: #ffe6d8; }
.carte .statuts .chip.dephasage { background: #2c2c3a; border-color: #cfd3ff; color: #eef; }
.carte .statuts .chip.mur { background: #4a3218; border-color: #c89a5a; color: #ffe8c8; }
.carte .statuts .chip.decomposition { background: #5a3a12; border-color: #f0b46a; color: #ffe6c2; }
.carte .statuts .chip.epines { background: #5a2a14; border-color: #f0a060; color: #ffe2c8; }
.carte .statuts .chip.annonce { background: #6a1a12; border-color: #ff8a70; color: #ffd8d0; }
.carte .voile-statut { position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; }
.carte.est-stase .voile-statut { opacity: 1; background: repeating-linear-gradient(135deg, rgba(120,60,180,.28) 0 6px, rgba(120,60,180,.08) 6px 12px); box-shadow: inset 0 0 0 3px #d19bff, inset 0 0 28px rgba(160,90,255,.7); }
.carte.est-fige .voile-statut { opacity: 1; background: linear-gradient(180deg, rgba(180,230,255,.35), rgba(120,190,255,.12) 50%, rgba(200,240,255,.35)); box-shadow: inset 0 0 0 3px #8fd3ff, inset 0 0 30px rgba(143,211,255,.8); }
.carte.est-fige .voile-statut::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.7) 0 2px, transparent 3px), radial-gradient(circle at 80% 30%, rgba(255,255,255,.6) 0 2px, transparent 3px), radial-gradient(circle at 35% 70%, rgba(255,255,255,.6) 0 2px, transparent 3px), radial-gradient(circle at 70% 85%, rgba(255,255,255,.7) 0 2px, transparent 3px); }
.carte.est-usure .voile-statut { opacity: 1; background: radial-gradient(circle at 50% 100%, rgba(120,180,40,.4), transparent 70%); box-shadow: inset 0 0 0 3px #b6e06a, inset 0 0 26px rgba(150,220,60,.6); }
.carte.est-dephasage .voile-statut { opacity: 1; background: linear-gradient(90deg, rgba(200,205,255,.25), transparent 40%, transparent 60%, rgba(200,205,255,.25)); box-shadow: inset 0 0 0 2px rgba(207,211,255,.8); }
.carte.est-dephasage { opacity: .72; }
.carte.est-mur .voile-statut { opacity: 1; box-shadow: inset 0 0 0 4px #c89a5a, inset 0 0 18px rgba(200,154,90,.6); }
.carte.est-stase .portrait, .carte.est-fige .portrait { filter: saturate(.55) brightness(.85); }

/* ------------------------------------------------------- le face-à-face */
/* avant le premier coup : les adversaires descendent, le deck monte, le sceau « VS » frappe au milieu */
.vs { position: fixed !important; inset: 0; z-index: 15; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; gap: 6px; padding: calc(var(--sur) + 14px) 12px calc(var(--sous) + 14px);
  background: radial-gradient(80% 50% at 50% 50%, rgba(28,22,36,.95), rgba(8,6,12,.98)); animation: fin-voile .3s ease-out both; cursor: pointer; }
.vs.part { animation: vs-partir .35s ease-in forwards; }
@keyframes vs-partir { to { opacity: 0; } }
.vs-titre { color: var(--encre-nuit); font-size: .95rem; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 1px 3px #000; }
.vs-camp { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vs-cartes { width: 100%; display: flex; justify-content: center; gap: 8px; }
.vs-cartes .carte { width: 36%; max-width: 165px; flex: 0 1 auto; pointer-events: none; }
.vs-cartes .carte.boss { width: 40%; max-width: 170px; }
.vs-cartes.serre .carte { width: 24%; }
.vs-cartes:has(.carte:nth-child(3)) .carte { width: 31%; }
.vs-camp.adverse .carte { animation: vs-descendre .5s cubic-bezier(.2,.8,.3,1.2) both; }
.vs-camp.moi .carte { animation: vs-monter .5s cubic-bezier(.2,.8,.3,1.2) both; }
.vs-cartes .carte:nth-child(2) { animation-delay: .08s; } .vs-cartes .carte:nth-child(3) { animation-delay: .16s; } .vs-cartes .carte:nth-child(4) { animation-delay: .24s; }
@keyframes vs-descendre { from { transform: translateY(-60px); opacity: 0; } }
@keyframes vs-monter { from { transform: translateY(60px); opacity: 0; } }
.vs-total { display: flex; gap: 8px; margin: 0; }
.vs-total span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 12px; border-radius: 999px; background: var(--papier); border: 1px solid var(--or-fane-sombre); color: var(--encre); box-shadow: 0 2px 6px rgba(0,0,0,.5); font-size: .95rem; }
.vs-total .icone { width: 20px; height: 20px; }
.vs-total b { font-weight: 700; font-variant-numeric: tabular-nums; }
.vs-sceau { position: relative; width: 74px; height: 74px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f8cf7e, #e0892f 60%, #b8631c); border: 3px solid #f3d6a0; box-shadow: 0 0 0 1px #6b5638, 0 0 30px rgba(243,179,92,.8); animation: fin-sceau .5s cubic-bezier(.2,.8,.3,1.5) .35s both; }
.vs-sceau .rayons { position: absolute; inset: -40px; border-radius: 50%; z-index: -1; background: repeating-conic-gradient(rgba(243,179,92,.5) 0 6deg, transparent 6deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); animation: fin-rayons 14s linear infinite; }
.vs-sceau b { font-size: 1.9rem; font-weight: 700; letter-spacing: .04em; color: #fff6ea; text-shadow: 0 2px 2px rgba(90,40,0,.8); }
.vs-consigne { color: var(--encre-nuit-2); font-style: italic; font-size: .85rem; animation: battre-point 1.4s ease-in-out infinite; }

/* --------------------------------------------------------------- combat */
.combat { position: fixed; inset: 0; z-index: 10; background: var(--ardoise) var(--fond-combat, none) center / cover no-repeat; display: flex; flex-direction: column; padding: calc(var(--sur) + 8px) 10px var(--sous); }
.combat::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(21,18,32,.25), rgba(21,18,32,.55) 60%, rgba(21,18,32,.85)); pointer-events: none; }
.combat > * { position: relative; }
.combat-haut { display: flex; justify-content: space-between; align-items: center; color: var(--laiton); margin-bottom: 4px; text-shadow: 0 1px 3px #000; letter-spacing: .06em; }
.combat-boutons { display: flex; gap: 6px; }
.combat-boutons .mini { background: rgba(21,18,32,.6); backdrop-filter: blur(4px); }
/* les deux camps se partagent la hauteur ; les cartes ne passent pas à la ligne, elles se serrent */
.camp { flex: 1; min-height: 0; padding: 6px 0; flex-wrap: nowrap; align-items: center; }
/* le médaillon du cycle : un disque ambre tenu par deux filets d'or fané, entre les ennemis et le deck */
.combat-cycle { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; height: 34px; margin: -4px 0; }
.combat-cycle::before, .combat-cycle::after { content: ''; width: 24%; height: 1px; background: linear-gradient(90deg, transparent, var(--or-fane)); opacity: .8; }
.combat-cycle::after { background: linear-gradient(90deg, var(--or-fane), transparent); }
#combat-cycle { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; color: var(--sur-ambre); background: radial-gradient(circle at 40% 35%, #f3b35c, #c8701f 75%); border: 2px solid var(--or-fane); box-shadow: 0 0 0 3px rgba(21,18,32,.7), 0 0 14px rgba(217,130,43,.5), 0 3px 8px rgba(0,0,0,.6); }
#combat-cycle.bat { animation: bat-cycle .5s ease-out; }
@keyframes bat-cycle { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.camp .carte { width: 44%; max-width: 190px; flex: 0 1 auto; }   /* trois cartes se serrent à ~31 %, une seule reste large */
.camp .carte.boss { width: 50%; max-width: 210px; }
/* le journal : trois lignes, le doigt l'ouvre */
/* Le mode manuel : la carte dont c'est le tour s'allume (.choisie), ses sorts s'alignent sous les camps ;
 * quand un sort vise, les ennemis à portée s'entourent d'or (.ciblable) et attendent le doigt. */
.combat-sorts { flex: none; margin-top: 4px; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); border: 1px solid rgba(179,154,90,.3); border-radius: 10px; padding: 6px 8px; }
.combat-sorts .consigne { margin: 0 0 6px; text-align: center; font-size: .88rem; color: var(--laiton); letter-spacing: .04em; }
.sorts-liste { display: flex; gap: 6px; }
.sorts-liste .sort { flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; background: rgba(179,154,90,.08); border: 1px solid var(--laiton-sombre); border-radius: 8px; color: var(--ivoire); cursor: pointer; }
.sorts-liste .sort b { font-weight: normal; color: var(--laiton); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sorts-liste .sort small { font-size: .78rem; color: var(--gris); line-height: 1.2; text-align: center; }
.sorts-liste .sort:active { background: rgba(179,154,90,.2); }
.sorts-liste .sort.actif { background: var(--ambre); border-color: var(--ambre); }
.sorts-liste .sort.actif b, .sorts-liste .sort.actif small { color: var(--sur-ambre); }
.sorts-liste .sort.pas-pret { opacity: .5; }
.camp .carte.ciblable { cursor: pointer; outline: 3px solid var(--ambre); outline-offset: 3px; animation: viser 1s ease-in-out infinite alternate; }
@keyframes viser { to { outline-color: rgba(217,130,43,.35); transform: translateY(-4px); } }
.combat-journal { flex: none; max-height: 4.6em; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--or-fane-sombre) transparent; color: var(--ivoire); background: rgba(10,8,16,.78); backdrop-filter: blur(4px); border: 1px solid rgba(179,154,90,.3); border-radius: 10px; padding: 5px 10px; font-size: .92rem; line-height: 1.35; margin-top: 4px; transition: max-height .25s; }
.combat-journal.ouvert { max-height: 45vh; }
.combat-journal p { margin: 0 0 1px; }
.combat-journal p.cycle { color: var(--laiton); }
.combat-journal p.mort { color: var(--rouge); }
.combat-journal p.soin { color: var(--vert); }
.combat-journal p.fin { color: var(--laiton); font-weight: bold; }
.combat-fin { position: fixed; inset: 0; z-index: 20; overflow-y: auto; display: flex; align-items: safe center; justify-content: center; padding: calc(var(--sur) + 16px) 16px calc(var(--sous) + 16px);
  background: radial-gradient(70% 55% at 50% 45%, rgba(21,18,32,.6), rgba(10,8,16,.93)); animation: fin-voile .4s ease-out both; }
@keyframes fin-voile { from { opacity: 0; } }
.fin-feuillet { position: relative; width: 100%; max-width: 360px; padding: 46px 18px 16px; margin-top: 34px; text-align: center; color: var(--encre);
  background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 14px; box-shadow: var(--cadre), 0 0 60px rgba(217,130,43,.25); animation: fin-poser .5s cubic-bezier(.2,.8,.3,1.2) .1s both; }
.fin-feuillet::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(138,109,59,.4); border-radius: 10px; pointer-events: none; }
@keyframes fin-poser { from { transform: translateY(40px) scale(.94); opacity: 0; } }
/* le soleil : un médaillon d'ambre à cheval sur le haut du feuillet, des rayons qui tournent derrière */
.fin-soleil { position: absolute; left: 50%; top: -42px; width: 84px; height: 84px; margin-left: -42px; }
.fin-soleil .rayons { position: absolute; inset: -34px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(243,179,92,.55) 0 6deg, transparent 6deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); animation: fin-rayons 14s linear infinite; }
@keyframes fin-rayons { to { transform: rotate(360deg); } }
.fin-soleil .glyphe { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 40% 35%, #f8cf7e, #e0892f 60%, #b8631c);
  border: 3px solid #f3d6a0; box-shadow: 0 0 0 1px #6b5638, 0 0 24px rgba(243,179,92,.8), inset 0 0 0 2px rgba(255,240,200,.4); animation: fin-sceau .6s cubic-bezier(.2,.8,.3,1.4) .25s both; }
.fin-soleil .glyphe .icone { width: 50px; height: 50px; filter: drop-shadow(0 2px 2px rgba(60,25,0,.6)); }
@keyframes fin-sceau { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
.combat-fin .issue { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: .08em; font-variant: small-caps; color: var(--encre);
  background: linear-gradient(135deg, #6e5312, #b98a2a 40%, #7a5a14 60%, #a8852a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.combat-fin .sous { display: block; margin-top: 2px; color: var(--encre-2); font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; }
.combat-fin .sous:empty { display: none; }
.combat-fin .gains { display: flex; gap: 10px; margin: 14px 0 4px; }
.combat-fin .gain { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 6px 6px; border-radius: 10px; background: rgba(255,250,238,.6); border: 1px solid rgba(107,86,56,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); animation: fin-poser .45s ease-out calc(.35s + var(--k) * .2s) both; }
.combat-fin .gain .icone { width: 34px; height: 34px; }
.combat-fin .gain b { color: var(--encre); font-size: 1.5rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.combat-fin .gain small { color: var(--encre-2); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.combat-fin .texte { margin: 10px 0 0; color: var(--encre-2); font-style: italic; }
.combat-fin .bouton { width: 100%; margin-top: 16px; }
/* la défaite : le soleil s'éteint en cuivre gris, le titre à la brique */
.combat-fin.defaite .fin-soleil .glyphe { background: radial-gradient(circle at 40% 35%, #b9ab94, #7d6e5a 65%, #4e4336); border-color: #cdbd9f; box-shadow: 0 0 0 1px #3a2b1c, 0 0 14px rgba(0,0,0,.5); }
.combat-fin.defaite .fin-soleil .rayons { display: none; }
.combat-fin.defaite .issue { background: none; -webkit-text-fill-color: var(--brique); color: var(--brique); }
.combat-fin.defaite .fin-feuillet { box-shadow: var(--cadre); }

/* réglage : un choix à deux boutons accolés */
.segments { display: inline-flex; border: 1px solid var(--laiton-sombre); border-radius: 8px; overflow: hidden; }
.segments .mini { border: 0; border-radius: 0; min-height: 34px; }
.segments .mini + .mini { border-left: 1px solid var(--laiton-sombre); }
.reglage { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--voile-bord); }
.reglage .note { margin: 0; }

/* ------------------------------------------------------------- feuilles */
.feuille { position: fixed; inset: 0; z-index: 8; background: rgba(10,8,16,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: flex-end; }
.feuille-corps { position: relative; width: 100%; max-height: 88%; overflow-y: auto; background: var(--papier); border-top: 1px solid var(--or-fane); border-radius: 18px 18px 0 0; padding: 18px 14px calc(var(--sous) + 14px); animation: monter .25s ease-out; box-shadow: 0 -12px 40px rgba(0,0,0,.6); }
/* La feuille centrée : le rapport de Chrona au retour, au milieu de l'écran (Mika, 22 sept. 2026) */
.feuille.centre { align-items: center; justify-content: center; padding: calc(var(--sur) + 12px) 12px calc(var(--sous) + 12px); }
.feuille.centre .feuille-corps { width: 100%; max-width: 340px; max-height: 100%; border: 1px solid var(--laiton); border-radius: 18px; padding: 22px 18px 18px; text-align: center; animation: apparaitre .3s ease-out; box-shadow: 0 0 40px rgba(179,154,90,.15), 0 20px 50px rgba(0,0,0,.7); }
.feuille.centre .feuille-corps::before { display: none; }
@keyframes apparaitre { from { opacity: 0; transform: scale(.92) translateY(12px); } }
.retour-corps .icone.grande { width: 64px; height: 64px; margin-bottom: 4px; filter: drop-shadow(0 0 14px rgba(179,154,90,.4)); }
.retour-corps h3 { margin: 0 0 12px; font-size: 1.2rem; color: var(--laiton); letter-spacing: .04em; }
.retour-duree { display: flex; flex-direction: column; margin: 0 0 4px; }
.retour-duree b { font-weight: normal; font-size: 2rem; line-height: 1.1; color: var(--ivoire); }
.retour-duree span { font-size: .84rem; color: var(--gris); letter-spacing: .1em; text-transform: uppercase; }
.retour-corps .note { margin: 6px 0 14px; }
.butin { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.butin .part { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 12px; background: rgba(179,154,90,.07); border: 1px solid rgba(179,154,90,.3); }
.butin .part .icone { width: 34px; height: 34px; margin-bottom: 4px; }
.butin .part b { font-weight: normal; font-size: 1.35rem; color: var(--ivoire); }
.butin .part span { font-size: .84rem; color: var(--gris); letter-spacing: .08em; text-transform: uppercase; }
.retour-corps .bouton { width: 100%; }
.feuille-corps::before { content: ''; position: absolute; top: 7px; left: 50%; width: 38px; height: 3px; margin-left: -19px; border-radius: 2px; background: var(--or-fane); opacity: .7; }
.feuille-corps h3 { margin: 0 0 4px; }
.feuille .bouton.fermer { width: 100%; }
@keyframes monter { from { transform: translateY(40px); opacity: 0; } }
/* l'en-tête d'un niveau porte le décor de son chapitre */
.entete-niveau { margin: -18px -14px 12px; padding: 22px 16px 12px; background: var(--ardoise-2) var(--decor, none) center 30% / cover no-repeat; border-radius: 18px 18px 0 0; position: relative; }
.entete-niveau::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(rgba(21,18,32,.35), #1f1a29); }
.entete-niveau > * { position: relative; }
.entete-niveau h3 { text-shadow: 0 1px 3px #000; }
.entete-niveau .note { color: var(--ivoire); opacity: .85; text-shadow: 0 1px 2px #000; }
#niveau-vague .carte, #derive-vague .carte { width: 30%; }
#niveau-gain, #derive-gain { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0 4px; }
/* le butin du mini-boss : une ligne à part, cadre ambré, pour qu'on le voie avant de combattre */
#niveau-gain .butin-boss, #derive-gain .butin-boss { flex-basis: 100%; display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--ambre, #c8701f); background: rgba(238,154,62,.12); box-shadow: 0 0 10px rgba(238,154,62,.25); }
#niveau-gain .butin-boss .icone, #derive-gain .butin-boss .icone { width: 30px; height: 30px; }
#niveau-gain .butin-boss > span, #derive-gain .butin-boss > span { display: flex; flex-direction: column; line-height: 1.15; }
#niveau-gain .butin-boss small, #derive-gain .butin-boss small { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
#niveau-gain .butin-boss b, #derive-gain .butin-boss b { color: var(--encre, inherit); }
.gain { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(179,154,90,.08); border: 1px solid rgba(179,154,90,.3); color: var(--ivoire); font-size: .92rem; }
.gain .icone { height: 1.25em; }
/* La fiche d'une carte : la carte en vitrine sur le décor de son Domaine (on la touche, elle se retourne
 * sur son verso), le nom, des chips, la jauge de niveau, les chiffres, les sorts, puis les gestes en tuiles. */
.fiche-carte { padding-top: 0; }
.entete-carte { margin: 0 -14px 12px; padding: 26px 14px 10px; background: var(--ardoise-2) var(--decor, none) center 30% / cover no-repeat; position: relative; }
.entete-carte::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 40%, color-mix(in srgb, var(--teinte, var(--laiton)) 28%, transparent), transparent 70%), linear-gradient(rgba(21,18,32,.45), rgba(21,18,32,.6) 70%, #1f1a29); }
.entete-carte > * { position: relative; }
.entete-carte .consigne { margin: 8px 0 0; text-align: center; font-size: .84rem; color: var(--gris); font-style: italic; opacity: .8; }
/* la loupe du plein écran : un bouton de laiton rond à droite de la vitrine, jamais sur la carte */
.bouton-contempler { position: absolute; right: 14px; bottom: 44px; width: 48px; height: 48px; padding: 10px; border-radius: 50%; border: 1px solid var(--or-fane-sombre); background: var(--papier); box-shadow: var(--cadre); color: var(--encre); cursor: pointer; }
.bouton-contempler svg { display: block; width: 100%; height: 100%; }
.bouton-contempler:active { transform: scale(.94); }
/* Contempler : la carte entière, en plein écran, par-dessus tout ; le fond s'éclaircit quand on la tire vers le bas */
.contempler { position: fixed; inset: 0; z-index: 40; overflow: hidden; touch-action: none; background: rgba(8,6,12, var(--fond, 1)); animation: monter .2s ease-out; }
.contempler.part { opacity: 0; transition: opacity .22s ease-in; pointer-events: none; }
.contempler-carte { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-select: none; }
.contempler-carte .vitrine { width: 100%; }   /* la vitrine elle-même : pivot, retournement et brillance, zoomés (Mika, 24 sept. 2026) */
.contempler-fermer { position: absolute; top: calc(var(--sur, 0px) + 12px); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--or-fane-sombre); background: rgba(21,18,32,.7); color: var(--ivoire); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.contempler-aide { position: absolute; left: 0; right: 0; bottom: calc(var(--sous, 0px) + 18px); margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; color: var(--laiton); pointer-events: none; text-shadow: 0 1px 4px #000; transition: opacity .8s ease; }
.contempler-aide small { color: var(--ivoire); font-size: .78rem; font-style: italic; opacity: .85; }
.contempler-aide.efface { opacity: 0; }
.vitrine { width: 50%; margin: 0 auto; }
/* La carte retournable (carte.js) : le conteneur porte `verso` quand le dos est visible. Côté verso, le
 * conteneur ne dessine rien (ni fond, ni liseré, ni arrondi) : l'image porte son propre cadre, avec ses
 * coins peints et une gouttière transparente (Mika, 22 sept. 2026). Le dos est contre-miroité pour que le
 * retournement de 180° le montre à l'endroit. Deux allures : la vitrine (fiche) se retourne dans les deux
 * sens par transition ; le pli (paquet, don) se dévoile une fois, par animation, dans la couleur du rang. */
.retournable { position: relative; perspective: 900px; cursor: pointer; }
.retournable .carte { cursor: pointer; z-index: 1; }
.retournable .dos { position: absolute; inset: -1px; z-index: 4; background: transparent center / 100% 100% no-repeat; transform: scaleX(-1); opacity: 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.retournable.verso .carte { transform: rotateY(180deg); background-color: transparent; background-size: 0 0, 0 0; border-color: transparent; border-radius: 0; box-shadow: none; animation: none; }
.retournable.verso .dos { opacity: 1; }
.retournable.verso .carte > *:not(.dos) { visibility: hidden; }
/* la vitrine : le basculement des styles attend la mi-course du retournement, comme le contenu */
.vitrine .carte { transition: transform .7s ease-in-out, background-color 0s linear .35s, background-size 0s linear .35s, border-color 0s linear .35s, border-radius 0s linear .35s, box-shadow 0s linear .35s; box-shadow: 0 14px 30px rgba(0,0,0,.7), 0 0 24px color-mix(in srgb, var(--teinte, var(--laiton)) 30%, transparent); }
.vitrine .dos { transition: opacity 0s linear .35s; filter: drop-shadow(0 14px 22px rgba(0,0,0,.7)); }
.vitrine .carte > *:not(.dos) { transition: visibility 0s linear .35s; }
.fiche-carte h3 { margin: 0 0 8px; text-align: center; font-size: 1.25rem; color: var(--laiton); letter-spacing: .04em; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 12px; }
.chip { --couleur-rang: var(--gris); display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; padding: 3px 10px; border-radius: 999px; color: var(--ivoire); border: 1px solid var(--voile-bord); background: var(--voile); }
.chip.rang-0, .chip.rang-1, .chip.rang-2, .chip.rang-3, .chip.rang-4 { color: var(--couleur-rang); border-color: color-mix(in srgb, var(--couleur-rang) 45%, transparent); background: color-mix(in srgb, var(--couleur-rang) 10%, transparent); }
.chip.rang-0 { --couleur-rang: var(--rang-0); } .chip.rang-1 { --couleur-rang: var(--rang-1); } .chip.rang-2 { --couleur-rang: var(--rang-2); } .chip.rang-3 { --couleur-rang: var(--rang-3); } .chip.rang-4 { --couleur-rang: var(--rang-4); }
.chip.fusion { color: var(--sur-ambre); background: var(--ambre); border-color: var(--ambre); font-weight: bold; }
.niveau-fiche { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: .92rem; color: var(--gris); margin-bottom: 10px; }
.niveau-fiche b { color: var(--ivoire); font-weight: normal; }
.niveau-fiche .jauge { height: 6px; border-radius: 3px; background: var(--voile-bord); overflow: hidden; }
.niveau-fiche .jauge i { display: block; height: 100%; background: linear-gradient(90deg, var(--laiton-sombre), var(--laiton)); transform-origin: left; }
.chiffres { display: flex; gap: 8px; margin-bottom: 10px; }
.chiffres span { flex: 1; display: flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 10px; background: var(--voile); border: 1px solid var(--voile-bord); font-size: .84rem; color: var(--gris); }
.chiffres .icone { height: 1.5em; align-self: center; }
.chiffres b { font-size: 1.1rem; color: var(--ivoire); font-weight: normal; }
.sorts { list-style: none; margin: 0 0 4px; padding: 0; font-size: .92rem; color: var(--gris); }
.sorts li { padding: 6px 0; border-bottom: 1px solid var(--voile-bord); display: flex; gap: 8px; }
.sorts li b { color: var(--ivoire); font-weight: normal; flex: none; }
.sorts li b::after { content: ' —'; color: var(--laiton-sombre); }
/* les tuiles de geste, deux par ligne ; la fusion prend toute la largeur */
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.tuiles .large { grid-column: 1 / -1; }
.tuile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px 10px; min-height: 84px; border-radius: 12px; border: 1px solid rgba(179,154,90,.32); background: linear-gradient(var(--papier-clair), var(--papier-haut)); color: var(--ivoire); text-align: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 6px rgba(0,0,0,.45); cursor: pointer; transition: transform .08s, filter .15s; }
.tuile:active { transform: scale(.97); }
.tuile > .icone { width: 32px; height: 32px; margin-bottom: 2px; }
.tuile small .icone { height: 1.15em; }
.tuile b { font-size: .92rem; font-weight: normal; }
.tuile small { font-size: .84rem; color: var(--gris); }
.tuile.principale { background: linear-gradient(#ee9a3e, #c8701f); color: var(--sur-ambre); border-color: var(--ambre-clair); text-shadow: 0 1px 1px rgba(60,25,0,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 2px 10px rgba(217,130,43,.35); }
.tuile.principale small { color: rgba(255,240,220,.85); }
.tuile.principale .icone { filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.tuile.principale b { font-weight: bold; }
.tuile.fusion { border-color: var(--ambre); box-shadow: 0 0 14px rgba(217,130,43,.35), inset 0 0 18px rgba(217,130,43,.12); animation: appel-fusion 1.6s ease-in-out infinite; }
@keyframes appel-fusion { 50% { box-shadow: 0 0 24px rgba(217,130,43,.6), inset 0 0 18px rgba(217,130,43,.2); } }
.tuile:disabled { opacity: .45; box-shadow: none; animation: none; cursor: default; }
.choix-fusion { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
/* dans la collection, une carte qui a trois exemplaires de son rang appelle la fusion */
.carte.neuve .pastille { background: var(--ambre); color: var(--sur-ambre); border-color: var(--ambre); }
.carte.fusion .pastille { background: var(--ambre); color: var(--sur-ambre); box-shadow: 0 0 10px var(--ambre); animation: battre-point 1.4s ease-in-out infinite; }
.vide-collection { grid-column: 1 / -1; text-align: center; }

/* -------------------------------------------------------------- deck */
.autel-deck { padding: 14px 10px 12px; }
.autel-deck::after { background: radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--saison) 30%, transparent), transparent 70%), linear-gradient(rgba(21,18,32,.4), rgba(21,18,32,.85)); }
.autel-deck .rangee-cartes { gap: 10px; }
#deck-slots .carte { width: 30%; }
#deck-slots .vide { width: 30%; aspect-ratio: 5 / 7; border: 1.5px dashed rgba(179,154,90,.35); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--gris); font-size: .78rem; text-align: center; padding: 0 6px; line-height: 1.15; background: rgba(21,18,32,.35); }
#deck-slots .vide i { font-style: normal; font-size: 1.6rem; color: var(--laiton-sombre); line-height: 1; }
#deck-synergie { margin: 12px 0 0; text-align: center; font-size: .92rem; }
#deck-synergie span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; color: var(--laiton); background: rgba(179,154,90,.1); border: 1px solid rgba(179,154,90,.35); }
#deck-synergie span b { color: var(--ivoire); }
/* les filtres de la collection : une bande de parchemin, une case par Domaine, l'active lavée d'ambre */
.filtres { display: flex; margin: 0 0 10px; background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 10px; box-shadow: var(--cadre); overflow: hidden; position: sticky; top: 0; z-index: 2; }
.filtre { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 0 2px; background: none; border: 0; border-left: 1px solid rgba(107,86,56,.5); color: var(--encre); font: inherit; font-size: .88rem; cursor: pointer; }
.filtre:first-child { border-left: 0; flex: 1.3; }
.filtre .icone { width: 24px; height: 24px; }
.filtre small { color: var(--encre-2); font-size: .74rem; font-variant-numeric: tabular-nums; }
.filtre.actif { background: linear-gradient(rgba(243,179,92,.55), rgba(217,130,43,.4)); }
.filtre:disabled { opacity: .35; cursor: default; }
#deck-synergie .icone { height: 1.1em; }

/* ------------------------------------------------------------ listes */
/* Le Livre des cartes : un album à la Panini, une page par Domaine (on glisse de l'une à l'autre), sept
 * cases numérotées — les deux héros, les quatre créatures, le mini-boss au milieu de la dernière ligne.
 * Une case vide montre la silhouette de la carte et son prix en poussière. */
.livre { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 12px; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.livre::-webkit-scrollbar { display: none; }
.page { flex: 0 0 100%; scroll-snap-align: center; position: relative; overflow: hidden; border-radius: 6px 16px 16px 6px; border: 1px solid var(--or-fane-sombre); border-left: 3px solid var(--teinte); color: var(--encre); background: var(--papier-haut) var(--decor, none) center 30% / cover no-repeat; padding: 12px 12px 14px; box-shadow: var(--ombre), inset 12px 0 18px -12px rgba(0,0,0,.9); }
.page::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(235,223,198,.86), rgba(235,223,198,.96) 40%); }
.page > * { position: relative; }
.page-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.page-tete .glyphe { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--teinte); background: var(--nuit-haut); display: flex; align-items: center; justify-content: center; flex: none; }
.page-tete .glyphe .icone { width: 26px; height: 26px; }
.page-tete .titre { flex: 1; min-width: 0; }
.page-tete .titre b { display: block; font-weight: 600; color: var(--encre); letter-spacing: .04em; }
.page-tete .titre small { color: var(--gris); font-size: .84rem; }
.page-tete .compte { color: var(--ivoire); font-size: .9rem; white-space: nowrap; }
.page-jauge { height: 3px; border-radius: 2px; background: var(--voile-bord); margin: -4px 0 12px; overflow: hidden; }
.page-jauge i { display: block; height: 100%; background: var(--teinte); box-shadow: 0 0 8px var(--teinte); transform-origin: left; }
/* le Sceau du Livre (chantier 12) : le cachet laiton en tête de la page complète, la note sous la jauge */
.page-tete .compte.scellee { display: flex; align-items: center; gap: 4px; color: #9a4f14; font-weight: 600; }
.page-tete .compte.scellee .sceau { width: 34px; height: 34px; transform: rotate(-10deg); filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); animation: sceller .35s cubic-bezier(.2,.8,.3,1.3) backwards; }
.page.scellee .page-jauge i { background: var(--ambre-clair); box-shadow: 0 0 8px var(--ambre-clair); }
.page-sceau { margin: -6px 0 10px; font-size: .84rem; color: var(--gris); }
.page.scellee .page-sceau { color: #9a4f14; font-weight: 600; }
.page-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.case { position: relative; }
.case .rangs { display: block; text-align: center; font-size: .6rem; color: var(--encre-2); opacity: .85; margin-top: 3px; line-height: 1.1; }
.chips .rangs { font-size: .84rem; color: var(--laiton); opacity: .85; align-self: center; }
.case .numero { position: absolute; z-index: 6; left: -4px; top: calc(100% - 16px - 1.1em); width: 20px; height: 20px; border-radius: 50%; background: var(--papier-clair); border: 1px solid var(--teinte); color: var(--teinte); font-size: .62rem; display: flex; align-items: center; justify-content: center; pointer-events: none; }
/* la case vide : cadre en pointillé, silhouette sombre du portrait, nom et prix */
.case.vide .cadre { aspect-ratio: 5 / 7; border-radius: var(--rayon-carte); container-type: inline-size; border: 1px dashed rgba(107,86,56,.6); background: #4a3f33; overflow: hidden; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 3cqw 5cqw; text-align: center; cursor: pointer; }
.case.vide .cadre img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: grayscale(1) sepia(.35) brightness(.5) contrast(1.05); opacity: .85; }
.case.vide .cadre .point { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%); font-size: 22cqw; color: rgba(179,154,90,.35); }
.case.vide .cadre .nom-vide { position: relative; font-size: 6.6cqw; color: var(--encre-nuit-2); text-shadow: 0 1px 2px #000; line-height: 1.1; }
.case.vide .cadre .prix { position: relative; margin-top: 3cqw; font-size: 6cqw; color: var(--or-nuit); opacity: .75; }
.case.vide.achetable .cadre { border-color: var(--ambre); box-shadow: 0 0 10px rgba(217,130,43,.25); }
.case.vide.achetable .cadre .prix { opacity: 1; }
.livre-pages { display: flex; justify-content: center; gap: 8px; padding: 6px 0 2px; }
.livre-pages button { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--teinte); background: transparent; padding: 0; transition: transform .15s, background .15s; }
.livre-pages button.actif { background: var(--teinte); transform: scale(1.25); box-shadow: 0 0 8px var(--teinte); }
/* le journal de Chrona : une frise, un point laiton par entrée */
.journal { list-style: none; margin: 0; padding: 10px 12px 10px 30px; font-size: .92rem; position: relative; background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 12px; box-shadow: var(--cadre); color: var(--encre); }
.journal::before { content: ''; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 1px; background: linear-gradient(var(--laiton-sombre), transparent); }
.journal li { position: relative; padding: 6px 0 6px 6px; color: var(--gris); }
.journal li::before { content: ''; position: absolute; left: -16px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--laiton-sombre); box-shadow: 0 0 0 2px var(--papier-haut); }
.journal li:first-child::before { background: var(--laiton); box-shadow: 0 0 0 2px var(--papier-haut), 0 0 8px rgba(217,130,43,.6); background: var(--ambre); }
.journal li b { color: var(--or-fane); font-weight: 600; font-size: .84rem; margin-right: 6px; }

/* ------------------------------------------------------------ veille */
/* Le tableau de la Veille (chantier 6) : l'aquarelle visible en haut, encadrée d'or fané, la nuit ne remonte que sur la
   moitié basse où vivent les compteurs — la maquette docs/da/conte_veille.png */
.autel-veille { text-align: center; padding: 150px 14px 14px; border-color: var(--or-fane-sombre); background-position: center 12%; background-size: cover; }
.autel-veille::after { background: linear-gradient(rgba(21,18,32,0) 0, rgba(21,18,32,.35) 110px, rgba(21,18,32,.92) 170px, rgba(21,18,32,.96)); }
.autel-veille::before { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(179,154,90,.35); border-radius: calc(var(--rayon) - 4px); pointer-events: none; z-index: 1; }
.veille { display: flex; justify-content: center; gap: 28px; margin: 0 0 4px; }
.veille .compte { display: flex; flex-direction: column; align-items: center; }
.veille .compte b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 2.3rem; line-height: 1.1; color: var(--ivoire); text-shadow: 0 0 18px rgba(217,130,43,.45); }
.veille .compte .icone { height: .85em; }
.veille .compte span { font-size: .84rem; color: var(--or-fane); letter-spacing: .1em; text-transform: uppercase; }
.veille-depuis { color: var(--gris); font-size: .92rem; margin: 0 0 10px; }
.veille-rente { justify-content: center; margin: 0 0 12px; }
.veille-rente span { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; font-size: .88rem; background: var(--voile); border: 1px solid var(--voile-bord); color: var(--gris); }
.veille-rente span b { color: var(--ivoire); }
.veille-rente .icone { height: 1em; }
.autel-veille .rangee { justify-content: center; margin: 0; }
#veille-encaisser { min-width: 60%; }
.veille-depuis::before { content: ''; display: inline-block; width: 1em; height: 1em; margin-right: 5px; vertical-align: -.15em; background: url(/img/icones/veille.webp?v=005d39ccc2) center / contain no-repeat; opacity: .8; }

.toast { position: fixed; left: 50%; bottom: calc(var(--onglets) + var(--sous) + 14px); transform: translateX(-50%); background: var(--verre); backdrop-filter: blur(8px); border: 1px solid var(--laiton); border-radius: 10px; padding: 10px 16px; z-index: 20; max-width: 90%; text-align: center; animation: monter .2s; box-shadow: var(--ombre); }
.toast.erreur { border-color: var(--rouge); }

/* -------------------------------------------------------- invocation */
.autel-invocation { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 14px 14px; border-color: var(--or-fane-sombre); background-position: center 35%; }
.autel-invocation::after { background: radial-gradient(60% 70% at 50% 40%, rgba(179,154,90,.2), transparent 70%), linear-gradient(rgba(21,18,32,.35), rgba(21,18,32,.6) 55%, rgba(21,18,32,.94)); }
.autel-invocation::before { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(179,154,90,.35); border-radius: calc(var(--rayon) - 4px); pointer-events: none; z-index: 1; }
.autel-invocation .paquet.mini { width: 118px; margin: 4px 0 8px; transform: rotate(-3deg); animation: flotter-paquet 3s ease-in-out infinite; }
.autel-invocation .chrona-dit { margin: 0; text-align: center; color: var(--ivoire); font-size: .95rem; text-shadow: 0 1px 3px #000; }
.autel-invocation .rangee { margin: 0; width: 100%; justify-content: center; }
.autel-invocation .rangee .bouton { min-width: 70%; }
.taux-liste { margin: 10px 0 4px; padding: 10px 10px 4px; background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 12px; box-shadow: var(--cadre); }
.taux-liste .pitie { justify-content: center; margin-bottom: 8px; }
.taux-liste .rangs { display: flex; gap: 4px; margin-bottom: 8px; padding: 6px 4px; border-radius: var(--rayon); background: var(--voile); border: 1px solid var(--fond-case-bord); }
.taux { --couleur-rang: var(--rang-0); flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--couleur-rang); white-space: nowrap; font-size: .88rem; padding: 3px 2px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--couleur-rang) 35%, transparent); background: color-mix(in srgb, var(--couleur-rang) 8%, transparent); }
.taux b { color: var(--ivoire); font-size: 1rem; }
.taux small { font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; }
.taux.rang-1 { --couleur-rang: var(--rang-1); } .taux.rang-2 { --couleur-rang: var(--rang-2); } .taux.rang-3 { --couleur-rang: var(--rang-3); } .taux.rang-4 { --couleur-rang: var(--rang-4); }
.pitie { display: flex; gap: 6px; flex-wrap: wrap; }
.pitie span { font-size: .88rem; color: var(--gris); padding: 3px 9px; border-radius: 999px; background: var(--voile); border: 1px solid var(--voile-bord); }
.pitie span b { color: var(--ivoire); font-weight: normal; }
#invocation-resultat { margin-top: 12px; }
#invocation-resultat:empty { display: none; }

/* ------------------------------------------------------------- paquets */
/* Le paquet : le dos commun sous un sceau laiton. `mini` sur l'autel (décoratif), `grand` dans l'ouverture (un bouton). */
.paquet { position: relative; aspect-ratio: 5 / 7; border: 0; padding: 0; background: url(/img/dos.webp?v=1f95743f73) center / 100% 100% no-repeat; filter: drop-shadow(0 0 10px rgba(179,154,90,.3)) drop-shadow(0 14px 16px rgba(0,0,0,.65)); overflow: hidden; }
.paquet::before { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 45%, transparent 60%); }
.paquet .sceau { position: absolute; left: -6%; right: -6%; top: 44%; height: 12%; display: flex; align-items: center; justify-content: center; background: linear-gradient(#f3d66e, #b8952e); box-shadow: 0 2px 6px rgba(0,0,0,.6); border-top: 1px solid #fff2b3; border-bottom: 1px solid #6e5518; }
/* le sceau déborde de la bande, comme un cachet posé dessus */
.paquet .sceau .icone { height: 260%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }
.paquet .etiquette-paquet { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ivoire); text-shadow: 0 1px 3px #000; }
.paquet.mini { width: 86px; flex: none; transform: rotate(-6deg); }
.paquet.grand { width: 46%; max-width: 200px; cursor: pointer; transform: rotate(-4deg); animation: flotter-paquet 3s ease-in-out infinite; transition: transform .2s; }
.paquet.grand:active { transform: rotate(-4deg) scale(.97); }
@keyframes flotter-paquet { 50% { transform: rotate(-4deg) translateY(-8px); } }

/* La loupe : la carte seule en grand, par-dessus tout ; entre en grossissant, sort en fondu */
.loupe { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: calc(var(--sur) + 20px) 20px calc(var(--sous) + 20px); background: rgba(10,8,16,.8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: monter .25s ease-out; }
.loupe.part { animation: reposer .3s ease-in forwards; pointer-events: none; }
@keyframes reposer { to { opacity: 0; } }
.loupe-carte { width: min(78vw, 46vh); animation: grossir .35s cubic-bezier(.2,.8,.2,1); }
@keyframes grossir { from { transform: scale(.4); opacity: 0; } }
.loupe-carte .vitrine { width: 100%; }
.loupe-nom { margin: 0; text-align: center; color: var(--laiton); font-size: 1.2rem; letter-spacing: .04em; display: flex; flex-direction: column; gap: 2px; }
.loupe-nom small { color: var(--gris); font-size: .78rem; }
.loupe-aide { margin: 0; color: var(--gris); font-size: .72rem; font-style: italic; text-align: center; }

/* l'ouverture, plein écran : la scène au centre, les gestes en bas */
.ouverture { position: fixed; inset: 0; z-index: 12; background: radial-gradient(90% 60% at 50% 40%, #2e2838, var(--ardoise) 70%); display: flex; flex-direction: column; padding: calc(var(--sur) + 14px) 14px calc(var(--sous) + 14px); }
.ouverture-scene { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 0; }
.ouverture .consigne { margin: 0; color: var(--gris); font-style: italic; letter-spacing: .04em; animation: respirer 2.4s ease-in-out infinite; }
@keyframes respirer { 50% { opacity: .45; } }
.ouverture-actions { display: flex; gap: 10px; min-height: 48px; }
.ouverture-actions .bouton { flex: 1; animation: monter .3s ease-out; }
/* le paquet se déchire : le sceau saute, le paquet gonfle et s'efface, les cartes en sortent (mouvement en JS) */
.ouverture.ouverte .paquet.grand { animation: dechirer .7s ease-in forwards; pointer-events: none; }
.ouverture.ouverte .paquet.grand .sceau { animation: sauter .5s ease-out forwards; }
.ouverture.ouverte .consigne { display: none; }
@keyframes dechirer { 0% { transform: rotate(-4deg) scale(1); } 35% { transform: rotate(2deg) scale(1.08); opacity: 1; } 100% { transform: rotate(6deg) scale(1.3); opacity: 0; } }
@keyframes sauter { to { transform: translateY(-140px) rotate(-14deg); opacity: 0; } }
.ouverture-cartes { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: center; padding: 8px; pointer-events: none; }
.ouverture-cartes.seule { grid-template-columns: 52%; justify-content: center; }
.ouverture.ouverte .ouverture-cartes { pointer-events: auto; }
.ouverture-cartes .pli { opacity: 0; }
.ouverture.ouverte .ouverture-cartes .pli { opacity: 1; }

/* Un pli : la carte de dos qui se dévoile au toucher (paquet, don de fin de combat) */
.pli { perspective: 700px; }
.pli.verso:active .carte { transform: rotateY(180deg) scale(.97); }
.pli.devoilee .carte { animation: retourner .8s ease-in-out both, revenir .8s step-end both; }
.pli.devoilee .dos { animation: devoiler .8s step-end both; }
/* Rare ou mieux : au retournement, la carte s'allume de la couleur de son rang (--eclat) — un anneau de
 * lumière qui tourne derrière elle, un halo qui bat, des ondes qui s'en échappent (--ondes : 2 pour Rare,
 * jusqu'à 5 pour Mythique) ; puis un liseré lumineux reste. */
@property --tour { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.pli.devoilee.rare::before { content: ''; position: absolute; inset: -5%; z-index: 0; pointer-events: none; border-radius: 14px; filter: blur(7px); opacity: 0;
  background: conic-gradient(from var(--tour), transparent 0 18%, var(--eclat) 32%, transparent 46% 64%, var(--eclat) 80%, transparent 94%);
  animation: anneau-tourne 1.5s linear .4s infinite, anneau-monte 3s ease-in-out .4s forwards; }
@keyframes anneau-tourne { to { --tour: 360deg; } }
@keyframes anneau-monte { 15% { opacity: 1; } 70% { opacity: .9; } 100% { opacity: .35; } }
.pli.devoilee.rare .carte { animation: retourner .8s ease-in-out both, revenir .8s step-end both, halo-rare 1.1s ease-in-out .45s 3 alternate; box-shadow: 0 0 4px var(--eclat), 0 0 16px color-mix(in srgb, var(--eclat) 60%, transparent); border-color: var(--eclat); }
@keyframes halo-rare { to { box-shadow: 0 0 8px var(--eclat), 0 0 34px var(--eclat), 0 0 70px color-mix(in srgb, var(--eclat) 55%, transparent); } }
.pli.devoilee.rare::after { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: 12px; border: 2px solid var(--eclat); box-shadow: 0 0 12px var(--eclat), inset 0 0 12px var(--eclat); opacity: 0; animation: onde 1.1s ease-out .4s var(--ondes, 2); }
@keyframes onde { 0% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(1.45); } }
@keyframes retourner { 0% { transform: rotateY(180deg) scale(.96); } 50% { transform: rotateY(90deg) scale(1.06); } 100% { transform: none; } }
@keyframes devoiler { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
/* le recto retrouve son fond et son liseré à mi-course, quand le verso s'efface */
@keyframes revenir { 0% { background-size: 0 0, 0 0; border-color: transparent; border-radius: 0; box-shadow: none; } 50% { background-size: 180px 180px, 100% 100%; border-color: var(--bord); border-radius: var(--rayon-carte); box-shadow: var(--ombre); } }
.combat-fin .don { display: flex; justify-content: center; margin: 12px 0 0; }
.combat-fin .don .pli { width: 34%; }
/* l'onglet qui a quelque chose à montrer (un paquet offert) porte un point laiton qui bat */
.onglets button.signal::after { content: ''; position: absolute; top: 9px; right: 26%; width: 9px; height: 9px; border-radius: 50%; background: var(--ambre); box-shadow: 0 0 10px var(--ambre); animation: battre-point 1.4s ease-in-out infinite; }
@keyframes battre-point { 50% { transform: scale(1.35); opacity: .7; } }

[hidden] { display: none !important; }

/* ------------------------------------------------------------ expéditions (chantier 4) */
.expeditions { display: grid; gap: 8px; margin: 8px 0 16px; }
.expedition-slot { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--verre); border: 1px solid rgba(179,154,90,.14); box-shadow: var(--ombre); text-align: left; color: var(--ivoire); }
.expedition-slot > .icone { width: 30px; height: 30px; opacity: .85; }
.expedition-slot.vide { border-style: dashed; color: var(--gris); }
.expedition-slot.vide .icone { filter: grayscale(1) brightness(.7); opacity: .6; }
.expedition-slot .texte { min-width: 0; }
.expedition-slot .texte b { display: block; font-weight: normal; }
.expedition-slot .texte small { display: block; color: var(--gris); font-size: .84rem; margin-top: 2px; }
.expedition-slot .texte small .icone { height: 1.05em; vertical-align: -.2em; margin-right: 2px; }
.expedition-slot .compte-rebours { color: var(--laiton); font-variant-numeric: tabular-nums; font-size: .92rem; white-space: nowrap; }
.expedition-slot .cartes { display: flex; gap: 4px; margin-top: 6px; }
.expedition-slot .cartes .carte { width: 22%; max-width: 72px; pointer-events: none; }
.expedition-slot.prete { border-color: var(--ambre); box-shadow: 0 0 14px rgba(217,130,43,.3), var(--ombre); }
.expedition-slot.prete > .icone { animation: luire-icone 1.6s ease-in-out infinite; }
/* la feuille : trois durées, puis la collection en petit — la carte choisie se cerne de laiton */
.durees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.durees .tuile { min-height: 74px; padding: 10px 6px 8px; }
.durees .tuile.choisie { border-color: var(--ambre); box-shadow: 0 0 12px rgba(217,130,43,.35), inset 0 0 14px rgba(217,130,43,.1); }
.expedition .sous-titre { margin: 12px 0 4px; font-size: .92rem; letter-spacing: .08em; text-transform: uppercase; color: var(--laiton); }
.expedition .sous-titre small { text-transform: none; letter-spacing: 0; color: var(--gris); margin-left: 6px; }
.choix-expedition { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; max-height: 42vh; overflow-y: auto; padding: 4px 2px; }
.choix-expedition .carte { cursor: pointer; transition: transform .1s, box-shadow .15s; }
.choix-expedition .carte.choisie { outline: 2px solid var(--ambre); outline-offset: 2px; box-shadow: 0 0 14px rgba(217,130,43,.45); transform: translateY(-3px); }
.choix-expedition .note { grid-column: 1 / -1; }
.gain-expedition { min-height: 1.2em; }
.gain-expedition .icone { height: 1.1em; vertical-align: -.2em; margin: 0 2px 0 6px; }
.gain-expedition b { color: var(--laiton); font-weight: normal; }

/* ------------------------------------------------------------ le Colporteur (chantier 5) */
.page-colporteur .etal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 10px 4px; }
.page-colporteur .article { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.page-colporteur .article .carte { width: 100%; }
.page-colporteur .article .bouton.petit { width: 100%; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.page-colporteur .article .bouton .icone { height: 1em; vertical-align: -.15em; margin-right: 2px; }
.page-colporteur .article.achete .carte { opacity: .45; filter: grayscale(.6); }
.page-colporteur .article .sceau { width: 34px; height: 34px; transform: rotate(-10deg); filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); animation: sceller .35s cubic-bezier(.2,.8,.3,1.3) backwards; }
.page-colporteur.ferme .article .carte { opacity: .55; filter: grayscale(.4) brightness(.8); }
.page-colporteur .note { padding: 0 12px 10px; margin: 0; text-align: center; }
.page-colporteur .note b { color: var(--laiton); font-weight: normal; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ le Boss des Larmes (chantier 7) */
.page-boss .boss-scene { display: flex; gap: 10px; padding: 10px 10px 4px; align-items: stretch; }
.page-boss .boss-carte { flex: 0 0 40%; display: flex; align-items: center; }
.page-boss .boss-carte .carte { width: 100%; filter: drop-shadow(0 0 14px rgba(240,122,114,.35)); }
.page-boss.tombe .boss-carte .carte { filter: grayscale(1) brightness(.6); transform: rotate(-6deg); }
.page-boss .boss-monde { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.page-boss .boss-monde .note { margin: 0; font-size: .84rem; line-height: 1.3; }
.page-boss .jauge-monde { position: relative; height: 22px; border-radius: 11px; background: var(--papier-sombre); border: 1px solid var(--laiton-sombre); overflow: hidden; box-shadow: inset 0 2px 6px rgba(0,0,0,.8); }
.page-boss .jauge-monde i { display: block; height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, #b8322a, #f07a72); transition: transform .8s cubic-bezier(.2,.8,.3,1); box-shadow: 0 0 10px rgba(240,122,114,.6); }
.page-boss .jauge-monde span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .84rem; font-weight: bold; color: #fff; text-shadow: 0 0 3px #000, 0 1px 0 #000; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.boss-etat { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; font-size: .84rem; }
.boss-etat li { display: flex; flex-direction: column; gap: 0; min-width: 0; padding: 4px 8px; border-radius: 6px; background: var(--fond-case); border: 1px solid var(--fond-case-bord); }
.boss-etat li small { color: var(--encre-2); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boss-etat li b { color: var(--encre); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.boss-etat li b .icone { height: 1em; vertical-align: -.15em; margin-right: 2px; }
.page-boss .boss-actions { padding: 8px 10px 0; }
.page-boss .boss-actions .bouton { flex: 1; }
.page-boss .note#boss-note { padding: 6px 12px 10px; margin: 0; text-align: center; }
.page-boss .note#boss-note b { color: var(--laiton); font-weight: normal; }

/* ------------------------------------------------------------ le jeu des versos (chantier 6) */
.page-versos .grille-versos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 10px 4px; }
.page-versos .grille-versos .retournable { width: 100%; }
.page-versos .grille-versos .trouvee { opacity: .55; pointer-events: none; }
.page-versos .grille-versos .trouvee .carte { box-shadow: 0 0 0 2px var(--laiton), 0 0 12px rgba(179,154,90,.4); }
.page-versos.finie .grille-versos .trouvee { opacity: 1; pointer-events: none; }
.page-versos .note { padding: 0 12px 10px; margin: 0; text-align: center; }
.page-versos .note b { color: var(--laiton); font-weight: normal; font-variant-numeric: tabular-nums; }

/* ---- l'Arène (chantier 8) : mon deck engagé, les défis du jour, le classement ---- */
.page-arene .arene-moi { display: flex; gap: 10px; padding: 10px 10px 4px; align-items: stretch; }
.page-arene .arene-deck { flex: 0 0 46%; display: flex; gap: 4px; align-items: center; }
.page-arene .arene-deck .carte, .page-arene .adversaire-deck .carte { flex: 1; min-width: 0; }
.page-arene .arene-fiche { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.page-arene .arene-fiche .note { margin: 0; font-size: .84rem; line-height: 1.3; }
.page-arene .arene-fiche .boss-etat { grid-template-columns: 1fr; }
.arene-titre { margin: 10px 10px 4px; font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; color: var(--laiton); font-weight: normal; display: flex; justify-content: space-between; }
.arene-titre b { color: var(--ivoire); font-variant-numeric: tabular-nums; }
.page-arene .arene-adversaires, .arene-classement { list-style: none; margin: 0; padding: 0 10px; display: flex; flex-direction: column; gap: 6px; }
.page-arene .adversaire { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; background: var(--fond-case); border: 1px solid var(--fond-case-bord); }
.page-arene .adversaire-deck { flex: 0 0 42%; display: flex; gap: 3px; }
.page-arene .adversaire-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.page-arene .adversaire-nom b { color: var(--ivoire); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-arene .adversaire-nom small { opacity: .75; font-size: .78rem; font-variant-numeric: tabular-nums; }
.page-arene .adversaire .bouton { flex: 0 0 auto; }
.arene-classement li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; background: var(--fond-case); font-size: .88rem; }
.arene-classement li.moi { border: 1px solid var(--laiton); background: rgba(179,154,90,.12); }
.arene-classement .rang { flex: 0 0 2.2em; color: var(--laiton); font-variant-numeric: tabular-nums; }
.arene-classement .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arene-classement small { opacity: .7; font-size: .78rem; font-variant-numeric: tabular-nums; }
.arene-classement .points { color: var(--ivoire); font-variant-numeric: tabular-nums; }
.page-arene li.vide, .page-tour li.vide { padding: 8px; text-align: center; margin: 0; font-size: .84rem; }
.page-arene .note#arene-note { padding: 8px 12px 10px; margin: 0; text-align: center; }
.page-arene .note#arene-note b { color: var(--laiton); font-weight: normal; }

/* ---- la Tour sans fin (chantier 9) ---- */
.page-tour .tour-etage { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 10px; }
.page-tour .tour-etage::before, .page-tour .tour-etage::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--or-fane)); }
.page-tour .tour-etage::after { background: linear-gradient(90deg, var(--or-fane), transparent); }
.page-tour .tour-etage small { color: var(--encre-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.page-tour .tour-etage b { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: var(--sur-ambre); background: radial-gradient(circle at 40% 35%, #f8cf7e, #e9973c 60%, #c96f22); border: 2px solid #f3d6a0; box-shadow: 0 0 12px rgba(217,130,43,.6); text-shadow: 0 1px 2px rgba(90,40,0,.7); font-variant-numeric: tabular-nums; }
.page-tour .tour-vague, .page-tour .tour-deck { display: flex; gap: 6px; padding: 0 10px; justify-content: center; }
.page-tour .tour-vague .carte, .page-tour .tour-deck .carte { flex: 0 1 27%; min-width: 0; }
.page-tour .tour-vague { margin-top: 10px; }
.page-tour .tour-deck .carte.tombee { filter: grayscale(1) brightness(.5); }
.page-tour .boss-etat { grid-template-columns: 1fr 1fr 1fr; margin: 8px 10px 0; }
.page-tour .note#tour-note { padding: 8px 12px 10px; margin: 0; text-align: center; }
.page-tour .note#tour-note b { color: var(--laiton); font-weight: normal; }

/* Le Donjon du Domaine (chantier 10) : la frise des salles, le choix des cartes du Domaine, la course. */
.page-donjon .page-cal-tete p { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.page-donjon .donjon-cles { display: inline-flex; gap: 2px; }
.page-donjon .donjon-cles .icone { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.page-donjon .donjon-cles .icone.vide { opacity: .22; filter: grayscale(1); }
.page-donjon .donjon-faits { padding-left: 8px; border-left: 1px solid var(--fond-case-bord); }
/* le chemin du Donjon (Mika, 24 sept. 2026 : « pas terrible ») : quatre médaillons reliés par un fil, la récompense dessous */
.page-donjon .donjon-salles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; list-style: none; margin: 12px 8px 4px; padding: 0; }
.page-donjon .donjon-salles li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; min-width: 0; }
.page-donjon .donjon-salles li:not(:last-child)::after { content: ''; position: absolute; top: 17px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: repeating-linear-gradient(90deg, var(--laiton) 0 5px, transparent 5px 9px); opacity: .55; }
.page-donjon .donjon-salles li.faite:not(:last-child)::after { background: var(--laiton); opacity: .9; }
.page-donjon .donjon-salles .medaille { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 3px;
  font-weight: 700; font-size: 1rem; color: var(--laiton-sombre, #6b5620); background: radial-gradient(circle at 40% 35%, #fbf3df, #e6d6b0); border: 2px solid var(--laiton); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.page-donjon .donjon-salles .medaille .icone { width: 24px; height: 24px; }
.page-donjon .donjon-salles li.gardien .medaille { width: 40px; height: 40px; margin-top: -2px; border-color: #b8413a; background: radial-gradient(circle at 40% 35%, #fbe3d6, #e3b39a); }
.page-donjon .donjon-salles li.faite .medaille { color: #fff6ea; background: radial-gradient(circle at 40% 35%, #d8bf77, #a8852a); }
.page-donjon .donjon-salles li.ici .medaille { color: #fff6ea; background: radial-gradient(circle at 40% 35%, #f8cf7e, #e0892f 60%, #b8631c); border-color: #fff3d0; box-shadow: 0 0 0 3px rgba(224,137,47,.35), 0 0 14px rgba(224,137,47,.55); }
.page-donjon .donjon-salles li b { font-size: .8rem; font-weight: 600; color: var(--encre); white-space: nowrap; }
.page-donjon .donjon-salles li small { display: inline-flex; align-items: center; gap: 2px; font-size: .74rem; color: var(--encre-2); white-space: nowrap; }
.page-donjon .donjon-salles li small .icone { width: 13px; height: 13px; }
.page-donjon .donjon-salles li.gardien b { color: #9a3a2c; }
/* l'équipe : trois places ; une place libre est un cadre en pointillés */
.page-donjon .donjon-tete-liste { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 12px 4px; }
.page-donjon .donjon-tete-liste .arene-titre { margin: 0; }
.page-donjon .donjon-tete-liste small { color: var(--encre-2); font-size: .8rem; }
.page-donjon .donjon-tete-liste .bouton { flex: none; white-space: nowrap; }
.page-donjon .donjon-salles li small.lot { color: #9a3a2c; font-weight: 600; }
.page-donjon .donjon-equipe { display: grid; grid-template-columns: repeat(3, minmax(0, 88px)); justify-content: center; gap: 12px; margin: 0 12px; padding: 10px; border-radius: 12px; background: rgba(58,43,28,.08); border: 1px solid var(--fond-case-bord); }
.page-donjon .donjon-equipe .place { min-width: 0; }
.page-donjon .donjon-equipe .place.vide { aspect-ratio: 5 / 7; border-radius: var(--rayon-carte); border: 2px dashed rgba(107,86,56,.4); background: rgba(255,250,238,.35); display: flex; align-items: center; justify-content: center; padding: 6px; font: inherit; font-size: .78rem; color: var(--encre-2); text-align: center; }
/* la liste des cartes du Domaine : trois de front, les prises marquées de leur numéro de place et éteintes */
.page-donjon .donjon-cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 12px 12px; padding: 4px 2px 6px; }
.page-donjon .donjon-cartes .carte { min-width: 0; cursor: pointer; transition: transform .1s, filter .15s; }
.page-donjon .donjon-cartes .carte.choisie::after { content: ''; position: absolute; inset: 0; z-index: 4; background: rgba(21,18,32,.55); pointer-events: none; }
.page-donjon .donjon-cartes .carte.choisie .pastille { top: 50%; left: 50%; right: auto; translate: none; transform: translate(-50%, -50%); min-width: 26cqw; height: 26cqw; border-radius: 50%; font-size: 14cqw; background: radial-gradient(circle at 40% 35%, #f8cf7e, #e0892f 60%, #b8631c); color: #fff6ea; border: 1px solid #fff3d0; }
.page-donjon .donjon-cartes .note { grid-column: 1 / -1; padding: 8px 6px; text-align: center; }
.page-donjon .donjon-cle-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 12px 0; padding: 7px 10px; border-radius: 10px; background: rgba(179,154,90,.14); color: var(--encre); font-size: .86rem; text-align: left; }
.page-donjon .donjon-cle-note .icone { width: 18px; height: 18px; flex: none; }
.page-donjon #donjon-entrer small { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; opacity: .85; }
.page-donjon #donjon-entrer small .icone { width: 14px; height: 14px; }
/* la course : eux en haut, « contre », mon équipe en bas */
.page-donjon .donjon-face { margin: 8px 12px 0; padding: 8px 8px 10px; border-radius: 12px; background: rgba(58,43,28,.08); border: 1px solid var(--fond-case-bord); text-align: center; }
.page-donjon .donjon-face .arene-titre { margin: 0 0 6px; }
.page-donjon .tour-vague, .page-donjon .tour-deck { display: flex; gap: 8px; padding: 0; justify-content: center; }
.page-donjon .tour-vague .carte, .page-donjon .tour-deck .carte { flex: 0 1 30%; min-width: 0; }
.page-donjon .tour-deck .carte.tombee { filter: grayscale(1) brightness(.5); }
.page-donjon .donjon-contre { display: block; margin: 6px 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--laiton); }
.page-donjon .donjon-blessures { margin: 6px 0 0; font-size: .78rem; color: var(--encre-2); }
.page-donjon .lien-sortir { background: none; border: 0; font: inherit; font-size: .84rem; color: var(--encre-2); text-decoration: underline; padding: 6px 10px; }
.combat-fin .don.plusieurs { flex-wrap: wrap; gap: 6px; }
.combat-fin .don.plusieurs .pli { width: 30%; }

/* Les Semaines de Domaine (chantier 11) : le bandeau du Journal, la carte de la semaine à l'Invocation, le ruban du Livre. */
.semaine-domaine { display: block; margin: 4px 2px 8px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--teinte, var(--laiton)); background: var(--fond-case); color: var(--gris); font-size: .84rem; line-height: 1.3; }
.semaine-domaine .icone { width: 16px; height: 16px; vertical-align: -4px; margin-right: 4px; }
.semaine-domaine b { color: color-mix(in srgb, var(--teinte, var(--laiton)) 45%, var(--encre)); font-weight: 600; }
.semaine-domaine { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.semaine-domaine .chip-semaine { font-size: .84rem; padding: 2px 8px; border-radius: 999px; background: var(--voile); border: 1px solid var(--voile-bord); }
.semaine-domaine .chip-semaine b { color: var(--ivoire); }
.semaine-appel .texte .pitie { margin: 6px 0; }
.semaine-appel .texte .pitie span b { color: var(--encre); font-weight: 600; }
.semaine-appel { display: flex; gap: 10px; align-items: center; margin: 10px 0 0; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--teinte, var(--laiton)); background: var(--papier); box-shadow: var(--cadre); }
.semaine-appel .carte { flex: 0 0 28%; min-width: 0; }
.semaine-appel .carte.ombre { filter: grayscale(.8) brightness(.55); }
.semaine-appel .texte { flex: 1; min-width: 0; font-size: .88rem; color: var(--encre-2); line-height: 1.35; }
.semaine-appel .texte > b:first-child, .semaine-appel .texte h4 { color: var(--encre); }
.semaine-appel .texte b { color: var(--encre); font-weight: 600; }
.semaine-appel .texte p { margin: 4px 0; }
.semaine-appel .texte small { display: block; opacity: .8; }
.semaine-appel .texte small .fin { color: var(--encre); font-weight: 600; }
.case .ruban { position: absolute; z-index: 5; right: -3px; top: 8px; padding: 2px 6px; border-radius: 6px 0 0 6px; background: var(--teinte); color: var(--ardoise); font-size: .52rem; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }
.case .ruban.maintenant { background: var(--ambre); color: var(--sur-ambre); box-shadow: 0 0 10px var(--ambre); animation: battre-point 1.4s ease-in-out infinite; }
.semaine-appel .texte .pitie span { border-radius: 10px; }

/* ------------------------------------------------------------ le tutoriel */
/* le projecteur : un trou arrondi dans un voile sombre (une ombre immense autour), qui glisse d'une cible à l'autre ;
 * la bulle de Chrona est un feuillet de parchemin, en bas de l'écran quand il n'y a rien à montrer */
.guide { position: fixed; inset: 0; z-index: 40; }
.guide-trou { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(10,8,16,.74), 0 0 0 2px var(--ambre-clair), 0 0 24px 4px rgba(243,179,92,.6); transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease; pointer-events: none; }
.guide.sans-cible .guide-trou { left: 50% !important; top: 40% !important; width: 0 !important; height: 0 !important; box-shadow: 0 0 0 9999px rgba(10,8,16,.8); }
.guide-bulle { position: fixed; left: 14px; right: 14px; max-width: 420px; margin: 0 auto; padding: 14px 16px 12px; color: var(--encre); background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 14px; box-shadow: var(--cadre), 0 10px 30px rgba(0,0,0,.6); }
.guide.sans-cible .guide-bulle { top: auto !important; bottom: calc(var(--sous) + 120px) !important; }
.guide-bulle::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(138,109,59,.35); border-radius: 10px; pointer-events: none; }
.guide-bulle.entre { animation: fin-poser .35s cubic-bezier(.2,.8,.3,1.2) both; }
.guide-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.guide-tete .icone { width: 30px; height: 30px; flex: none; }
.guide-tete b { flex: 1; font-size: 1.08rem; font-weight: 700; letter-spacing: .02em; }
.guide-tete small { color: var(--encre-2); font-variant-numeric: tabular-nums; }
.guide-bulle p { margin: 0 0 12px; font-size: 1rem; line-height: 1.4; }
.guide-boutons { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.guide-boutons .bouton { flex: 0 1 auto; min-width: 45%; }
.guide-boutons .mini { margin-right: auto; }

/* ------------------------------------------------ retour de nouveau joueur (23 sept. 2026) */
/* le pronostic de la fiche du niveau : mon deck à gauche, le mot au milieu, la vague à droite */
.pronostic { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 2px; padding: 8px 10px; border-radius: 10px; background: var(--voile); border: 1px solid var(--voile-bord); }
.pronostic .camp { display: flex; flex-direction: column; gap: 1px; font-size: .9rem; }
.pronostic .camp:last-child { align-items: flex-end; }
.pronostic .camp small { color: var(--encre-2); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.pronostic .camp b { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.pronostic .camp .icone { width: 16px; height: 16px; }
.mot { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; letter-spacing: .04em; color: #fff6ea; text-transform: capitalize; box-shadow: 0 1px 3px rgba(0,0,0,.3); white-space: nowrap; }
.mot.facile { background: var(--sauge); }
.mot.serré { background: var(--ambre); }
.mot.difficile { background: var(--brique); }
.mot.hors-de-portée { background: #5c3a36; }
/* la fin du combat : Réessayer à côté du retour */
.combat-fin .fin-boutons { margin: 16px 0 0; }
.combat-fin .fin-boutons .bouton { margin: 0; }
/* le face-à-face cache la scène dessous (les cartes transparaissaient) */
.combat.presente #combat-ennemis, .combat.presente #combat-deck, .combat.presente .combat-cycle { visibility: hidden; }
/* le médaillon du cycle dit ce qu'il compte */
.combat-cycle { position: relative; }
.combat-cycle .cycle-mot { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: -2px; color: var(--encre-nuit-2); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 1px 2px #000; }
.combat-cycle:has(#combat-cycle[hidden]) .cycle-mot { display: none; }
/* la collection vide : un feuillet lisible, pas un texte sombre sur le fond */
.vide-collection { grid-column: 1 / -1; margin: 4px 0; padding: 12px 14px; border-radius: 10px; background: var(--papier); border: 1px solid var(--or-fane-sombre); box-shadow: var(--cadre); color: var(--encre); text-align: center; }
/* « Composer au mieux » sous le deck ; la case libre répond au doigt */
#deck-composer { display: block; margin: 8px auto 0; position: relative; z-index: 2; --ivoire: var(--encre); color: var(--encre); font-weight: 600; }
#deck-slots button.vide { background: rgba(21,18,32,.35); font: inherit; cursor: pointer; }
#deck-slots button.vide:active { transform: scale(.97); }
.choix-case { margin-top: 6px; }
/* la montée : le gain en petit sous le coût */
.tuile .gain-niveau { display: inline-block; margin-top: 2px; font-size: .78rem; color: var(--encre-2); }
/* la rente : quand « Encaisser » est là, les filets d'ornement laissent la place au texte */
.rente:has(#rente-prendre:not([hidden]))::before, .rente:has(#rente-prendre:not([hidden]))::after { display: none; }
.rente:has(#rente-prendre:not([hidden])) { gap: 5px; padding: 0 6px 0 10px; }
/* le soleil du 1-1 ne colle plus au bas de l'écran : le chemin peut descendre un peu plus */
#onglet-remontee { padding-bottom: calc(var(--onglets) + var(--rente) + var(--sous) + 22vh); }
/* le voyage peint va jusqu'en bas de l'écran (il se prolonge sous le Seuil) : ni marge, ni toile fixe derrière le chemin */
#onglet-remontee:has(#chemin.peint) { padding-bottom: 0; }
body:has(#onglet-remontee:not([hidden]) #chemin.peint) #fond-monde .toile { opacity: 0; }
/* le paysage peint passe aussi sous le bandeau, jusqu'en haut de l'écran (Mika, 25 sept. 2026 : « le paysage devrait
   passer derrière le bandeau ») : plus de bande sombre au-dessus ; le sommet du chemin garde de la marge sous lui */
#contenu:has(#onglet-remontee:not([hidden]) #chemin.peint) { top: 0 !important; }
/* le blindage : une pastille bleue marquée d'un petit écu clair, distincte de l'écu laiton de la durabilité */
.carte .blindage::before { content: ''; display: inline-block; width: .55em; height: .65em; margin-right: 3px; vertical-align: -.05em; background: #eaf4ff; clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }
/* l'Arène : les totaux et le mot de chaque adversaire */
.adversaire-nom .totaux { display: inline-flex; align-items: center; gap: 3px; color: var(--encre-2); }
.adversaire-nom .totaux .icone { width: 13px; height: 13px; }
.adversaire-nom .mot { align-self: flex-start; margin-top: 3px; padding: 1px 8px; font-size: .74rem; }

/* le gain d'une montée de niveau, en vert à côté de chaque chiffre de la fiche */
.fiche-carte .plus, .fiche-carte .chiffres span .plus { display: inline; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; min-width: 0; flex: none; color: #3f7a36; font-weight: 700; font-size: .92em; white-space: nowrap; }
.fiche-carte .niveau-fiche + #carte-actions { margin: 10px 0 12px; }

/* ------------------------------------------------ la brillance et la carte qu'on admire (23 sept. 2026) */
/* la vitrine pivote sous le doigt : --rx / --ry posés par Cartes.admirer ; le retournement garde l'inclinaison */
.retournable.vitrine .carte { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.retournable.vitrine.verso .carte { transform: rotateX(var(--rx, 0deg)) rotateY(calc(180deg + var(--ry, 0deg))); }
.retournable.vitrine.manie .carte { transition: none !important; box-shadow: calc(var(--hx, 0) * -18px) calc(var(--hy, 0) * -18px + 18px) 34px rgba(0,0,0,.75), 0 0 30px color-mix(in srgb, var(--teinte, var(--laiton)) 35%, transparent); }
.retournable.vitrine.manie .carte :is(.holo, .relief, .nom span, .reflet) { animation: none !important; }
.carte:is(.rang-3, .rang-4, .plein) .reflet { left: 0; top: 0; width: 100%; height: 100%; border-radius: 0; }
.retournable.vitrine .carte { cursor: grab; }
.retournable.vitrine.manie .carte { cursor: grabbing; }
/* le reflet : une tache de lumière et une bande spéculaire qui glissent avec l'angle (doigt ou inclinaison du téléphone) ;
 * invisible sur les cartes en grille, vivant en vitrine, dans les plis et quand le téléphone bouge */
.carte .reflet { position: absolute; left: 5cqw; top: 5cqw; width: 90cqw; height: 88cqw; z-index: 1; pointer-events: none; border-radius: 2.5cqw; opacity: 0; mix-blend-mode: overlay; transition: opacity .3s;
  background-image: radial-gradient(circle at center, rgba(255,255,255,.9), rgba(255,255,255,.25) 18%, transparent 40%), linear-gradient(115deg, transparent 38%, rgba(255,255,255,.55) 48%, rgba(255,255,255,.1) 55%, transparent 62%);
  background-size: 220% 220%, 260% 260%;
  background-position: calc(50% - var(--hx, 0) * 45%) calc(50% - var(--hy, 0) * 45%), calc(50% - var(--hx, 0) * 70%) calc(50% - var(--hy, 0) * 70%); }
:is(.vitrine, .pli, .loupe-carte) .carte .reflet, html.incline .carte .reflet { opacity: .35; }
:is(.vitrine, .pli, .loupe-carte) .carte.rang-1 .reflet, html.incline .carte.rang-1 .reflet { opacity: .55; }
:is(.vitrine, .pli, .loupe-carte) .carte.rang-2 .reflet, html.incline .carte.rang-2 .reflet { opacity: .7; }
:is(.vitrine, .pli, .loupe-carte) .carte:is(.rang-3, .rang-4) .reflet, html.incline .carte:is(.rang-3, .rang-4) .reflet { opacity: .85; mix-blend-mode: soft-light; }
.retournable.vitrine.manie .carte .reflet { opacity: .9; }
.retournable.verso .carte .reflet { opacity: 0 !important; }
/* sous le doigt, le film holo s'avive */
.retournable.vitrine.manie .carte.rang-1 .holo { opacity: .7; }
.retournable.vitrine.manie .carte.rang-2 .holo { opacity: .8; }
.retournable.vitrine.manie .carte:is(.rang-3, .rang-4) .holo { opacity: 1; }
/* sans capteur, en vitrine, le reflet ondule avec les films */
html:not(.incline) :is(.vitrine, .pli) .carte .reflet { animation: miroiter-reflet 5s ease-in-out infinite alternate; }
@keyframes miroiter-reflet { from { background-position: 30% 35%, 25% 30%; } to { background-position: 70% 60%, 75% 70%; } }

/* la santé du deck sur la fiche du niveau : une jauge et le temps de soin ; en brique sous la moitié */
.sante-deck { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: .88rem; color: var(--encre-2); }
.sante-deck .jauge-sante { flex: 0 0 70px; height: 6px; border-radius: 3px; background: var(--voile-bord); overflow: hidden; }
.sante-deck .jauge-sante i { display: block; height: 100%; background: var(--sauge); transform-origin: left; }
.sante-deck.alerte { color: var(--brique); font-weight: 600; }
.sante-deck.alerte .jauge-sante i { background: var(--brique); }
.carte.tombee .recharge, .carte.eclate .recharge { display: none; }   /* une carte tombée n'attend plus rien */

/* l'indice de l'Horloger (Énigme, après deux essais ratés) */
.enigme-indice { margin: 8px 10px 0; padding: 8px 12px; border-radius: 10px; background: rgba(243,179,92,.18); border: 1px solid rgba(201,111,34,.45); color: var(--encre); font-size: .9rem; }
.enigme-indice ol { margin: 4px 0 0; padding-left: 20px; }
#combat-consigne .indice { display: block; margin-top: 3px; color: var(--ambre-clair); font-size: .8rem; font-style: italic; }

/* l'expédition : sa feuille passe devant la page du jour (elle s'ouvrait dessous) ; l'estimation du butin */
#feuille-expedition { z-index: 9; }
#expedition-gain .estimation { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
#expedition-gain .estimation .icone { width: 18px; height: 18px; }
#expedition-gain .valeur { display: block; margin-top: 3px; color: var(--encre-2); font-size: .8rem; }

/* ------------------------------------------------ l'évolution (fusion) : la mise en scène grandit avec le rang */
.evolution { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; overflow: hidden;
  background: radial-gradient(60% 45% at 50% 42%, color-mix(in srgb, var(--eclat) 22%, rgba(10,8,16,.9)), rgba(6,4,10,.97)); animation: fin-voile .35s ease-out both; }
.evolution.part { animation: vs-partir .35s ease-in forwards; }
.evolution .scene-carte { position: relative; width: min(58vw, 40vh); aspect-ratio: 5 / 7; z-index: 3; }
.evolution .scene-carte .carte { position: absolute; inset: 0; width: 100%; height: 100%; }
/* l'ancienne se charge (tremble, s'illumine), la nouvelle surgit dans l'éclair */
.evolution .scene-carte .carte:first-child { animation: evo-charge 1s ease-in forwards; }
.evolution .scene-carte .carte:last-child { opacity: 0; animation: evo-surgit .7s cubic-bezier(.2,.8,.3,1.3) 1s forwards; }
@keyframes evo-charge { 0% { transform: scale(1); filter: brightness(1); } 70% { transform: scale(.96) rotate(-1.5deg); filter: brightness(1.6) drop-shadow(0 0 18px var(--eclat)); }
  80% { transform: scale(.97) rotate(1.5deg); } 90% { transform: scale(.96) rotate(-1deg); } 100% { transform: scale(1.02); filter: brightness(3); opacity: 0; } }
@keyframes evo-surgit { from { opacity: 0; transform: scale(1.25); filter: brightness(2.5) drop-shadow(0 0 40px var(--eclat)); } to { opacity: 1; transform: scale(1); filter: brightness(1) drop-shadow(0 0 calc(8px + var(--n) * 7px) var(--eclat)); } }
.evolution .eclair-evo { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: radial-gradient(circle at 50% 42%, #fff, color-mix(in srgb, var(--eclat) 60%, transparent) 30%, transparent 65%); opacity: 0; animation: evo-eclair .6s ease-out .9s forwards; }
@keyframes evo-eclair { 0% { opacity: 0; } 20% { opacity: calc(.5 + var(--n) * .12); } 100% { opacity: 0; } }
/* les rayons derrière la carte : absents en Rare, tournants dès l'Épique, en gerbe d'or pour la Légendaire, prismatiques en Mythique */
.evolution .rayons-evo { position: absolute; left: 50%; top: 42%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; z-index: 1; border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(color-mix(in srgb, var(--eclat) 55%, transparent) 0 5deg, transparent 5deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 5%, transparent 45%); mask: radial-gradient(circle, #000 5%, transparent 45%); }
.evolution.rang-2 .rayons-evo, .evolution.rang-3 .rayons-evo, .evolution.rang-4 .rayons-evo { animation: evo-rayons-in .8s ease-out 1s forwards, fin-rayons 18s linear 1s infinite; }
.evolution.rang-3 .rayons-evo { background: repeating-conic-gradient(rgba(255,226,140,.7) 0 4deg, transparent 4deg 12deg, rgba(230,193,74,.35) 12deg 14deg, transparent 14deg 22deg); }
.evolution.rang-4 .rayons-evo { background: repeating-conic-gradient(rgba(255,90,110,.55) 0 4deg, transparent 4deg 10deg, rgba(255,200,80,.55) 10deg 14deg, transparent 14deg 20deg, rgba(110,220,255,.5) 20deg 24deg, transparent 24deg 30deg, rgba(200,120,255,.5) 30deg 34deg, transparent 34deg 40deg); }
@keyframes evo-rayons-in { to { opacity: 1; } }
/* les ondes de choc : une en Épique, deux en Légendaire, trois en Mythique */
.evolution .onde-evo { position: absolute; left: 50%; top: 42%; width: 40px; height: 40px; margin: -20px; z-index: 2; border-radius: 50%; border: 3px solid var(--eclat); opacity: 0;
  box-shadow: 0 0 20px var(--eclat), inset 0 0 20px var(--eclat); animation: evo-onde 1.1s ease-out calc(1s + var(--k) * .22s) forwards; }
.evolution.rang-1 .onde-evo { animation-duration: .9s; border-width: 2px; }
@keyframes evo-onde { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(calc(10 + var(--n) * 4)); } }
/* les étincelles jaillissent de la carte au moment de l'éclair */
.evolution .etincelle-evo { position: absolute; left: 50%; top: 42%; z-index: 5; width: var(--taille); height: var(--taille); border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px var(--eclat); opacity: 0;
  animation: evo-etincelle 1.1s cubic-bezier(.1,.7,.3,1) calc(.95s + var(--t) * .3) forwards; }
.evolution.rang-4 .etincelle-evo:nth-child(3n) { box-shadow: 0 0 6px 2px #6fdcff; } .evolution.rang-4 .etincelle-evo:nth-child(3n+1) { box-shadow: 0 0 6px 2px #ffd36a; }
@keyframes evo-etincelle { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }
/* la pluie d'or (Légendaire, Mythique) tombe ensuite, doucement */
.evolution .pluie-evo { position: absolute; left: var(--x); top: -10px; z-index: 2; width: 3px; height: 9px; border-radius: 2px; background: linear-gradient(#fff6c8, #e6c14a); box-shadow: 0 0 6px #e6c14a; opacity: 0;
  animation: evo-pluie var(--duree) linear calc(1.2s + var(--t)) infinite; }
.evolution.rang-4 .pluie-evo:nth-child(2n) { background: linear-gradient(#ffe0f0, #f07a72); box-shadow: 0 0 6px #f07a72; }
@keyframes evo-pluie { 0% { opacity: 0; transform: translateY(0) rotate(0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translateY(105vh) rotate(260deg); } }
/* la Mythique fait trembler l'écran à l'éclair */
.evolution.rang-4 { animation: fin-voile .35s ease-out both, evo-secousse .5s ease-out 1s; }
@keyframes evo-secousse { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(2px, -1px); } }
.evolution .titre-evo { position: relative; z-index: 5; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: 0; animation: evo-titre .5s cubic-bezier(.2,.8,.3,1.3) 1.4s forwards; }
@keyframes evo-titre { from { opacity: 0; transform: translateY(18px) scale(.9); } to { opacity: 1; transform: none; } }
.evolution .titre-evo small { color: var(--encre-nuit-2); font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; }
.evolution .titre-evo b { font-size: calc(1.6rem + var(--n) * .25rem); font-variant: small-caps; letter-spacing: .06em; color: var(--eclat); text-shadow: 0 0 calc(6px + var(--n) * 5px) var(--eclat), 0 2px 3px #000; }
.evolution.rang-3 .titre-evo b { background: linear-gradient(135deg, #fff3b0, #e6c14a 45%, #a8852a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px rgba(230,193,74,.8)); text-shadow: none; }
.evolution.rang-4 .titre-evo b { background: linear-gradient(90deg, #ff6b8a, #ffd36a, #6fdcff, #c48cf5, #ff6b8a); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 0 12px rgba(240,122,114,.9)); animation: evo-prisme 3s linear infinite; }
@keyframes evo-prisme { to { background-position: 200% 0; } }
.evolution .consigne-evo { position: relative; z-index: 5; margin: 0; color: var(--encre-nuit-2); font-style: italic; font-size: .85rem; opacity: 0; transition: opacity .4s; }
.evolution.pret .consigne-evo { opacity: 1; }

/* la confirmation dans le jeu : au-dessus des fiches ; le panneau de fusion (trois exemplaires → la carte au rang suivant) */
#feuille-confirmer { z-index: 32; }
#feuille-confirmer .feuille-corps { max-width: 380px; }
.confirmer-corps h3 { margin: 0 0 10px; }
.confirmer-corps p { margin: 8px 0; }
.fusion-scene { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 10px; }
.fusion-trois { position: relative; width: 34%; aspect-ratio: 5 / 7.6; }
.fusion-trois .carte { position: absolute; width: 78%; }
.fusion-trois .carte:nth-child(1) { left: 0; top: 0; transform: rotate(-8deg); }
.fusion-trois .carte:nth-child(2) { left: 11%; top: 4%; transform: rotate(-1deg); }
.fusion-trois .carte:nth-child(3) { left: 22%; top: 8%; transform: rotate(6deg); box-shadow: 0 6px 14px rgba(0,0,0,.5); }
.fusion-fleche { flex: none; width: 34px; height: 20px; background: var(--ambre); clip-path: polygon(0 35%, 60% 35%, 60% 0, 100% 50%, 60% 100%, 60% 65%, 0 65%); filter: drop-shadow(0 0 6px rgba(217,130,43,.7)); animation: battre-point 1.4s ease-in-out infinite; }
.fusion-apres { width: 40%; }
.fusion-apres .carte { box-shadow: 0 0 18px var(--eclat, rgba(230,193,74,.6)); animation: miroiter-fusion 2.4s ease-in-out infinite alternate; }
.fusion-apres.rang-1 { --eclat: #7db8ee; } .fusion-apres.rang-2 { --eclat: #c48cf5; } .fusion-apres.rang-3 { --eclat: #e6c14a; } .fusion-apres.rang-4 { --eclat: #f07a72; }
@keyframes miroiter-fusion { from { box-shadow: 0 0 8px var(--eclat); } to { box-shadow: 0 0 24px var(--eclat); } }
.fusion-gains { list-style: none; margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--voile); border: 1px solid var(--voile-bord); display: grid; gap: 4px; font-size: .92rem; }
.fusion-gains li { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fusion-gains .icone { width: 18px; height: 18px; }
.fusion-gains .plus { color: #3f7a36; font-weight: 700; }
.fusion-gains b.rang-1 { color: #2f6fa8; } .fusion-gains b.rang-2 { color: #7a3fb8; } .fusion-gains b.rang-3 { color: #8a6d1e; } .fusion-gains b.rang-4 { color: #b8413a; }
.fusion-note { color: var(--encre-2); font-size: .85rem; font-style: italic; }

/* les contrats : la récompense passe sous la jauge, en une ligne (Mika, 24 sept. 2026 : « pas beau sur la droite ») */
.page-contrats .contrats li { grid-template-columns: 30px 1fr; grid-template-rows: auto auto auto; row-gap: 4px; border-bottom-color: var(--voile-bord); }
.page-contrats .contrats li > .icone { grid-row: 1 / 3; }
.page-contrats .contrats .texte { grid-column: 2; color: var(--encre); font-size: .98rem; }
.page-contrats .contrats .jauge { grid-column: 2; margin-top: 0; }
.page-contrats .contrats .jauge .barre i { background: var(--ambre); }
.page-contrats .contrats .gain { grid-column: 2; grid-row: auto; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 30px;
  padding: 0; border: 0; border-radius: 0; background: none; font-size: .9rem; color: var(--encre-2); }
.page-contrats .contrats .gain span { gap: 4px; }
.page-contrats .contrats .gain .icone { width: 16px; height: 16px; }
.page-contrats .contrats .gain > :is(.bouton, .sceau) { margin: 0 0 0 auto; }
.page-contrats .contrats li.pris .gain { color: var(--encre-2); }
.page-contrats .contrats li.pris .gain span { opacity: .55; }
.page-contrats .coffre .texte b { color: var(--encre); font-weight: 600; }
.page-contrats .coffre .texte span { color: var(--encre-2); }

/* ce qu'il y a à faire au Deck, en clair (la pastille de l'onglet renvoie ici) */
.deck-afaire { list-style: none; margin: 10px 0 0; padding: 6px 12px; background: var(--papier); border: 1px solid var(--or-fane-sombre); border-radius: 10px; box-shadow: var(--cadre); }
.deck-afaire li { position: relative; padding: 7px 0 7px 16px; border-top: 1px solid var(--voile-bord); color: var(--encre); font-size: .92rem; cursor: pointer; }
.deck-afaire li:first-child { border-top: 0; }
.deck-afaire li::before { content: ''; position: absolute; left: 2px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ambre); }
.deck-afaire li.plus-afaire { color: var(--encre-2); font-style: italic; cursor: default; }
/* la rente avec « Encaisser » : plus serrée, l'icône de tête s'efface (la ligne se coupait avec le bonus des sceaux) */
.rente:has(#rente-prendre:not([hidden])) { font-size: .76rem; gap: 4px; }
.rente:has(#rente-prendre:not([hidden])) > .icone { display: none; }
.rente:has(#rente-prendre:not([hidden])) .bouton.petit { padding: 2px 8px; }

/* ------------------------------------------------ partie de test du 24 sept. 2026 */
/* le Livre : le ruban de Semaine à l'encre (le jaune vif jurait), les numéros de case lisibles */
.case .ruban { background: #3a2b1c; color: #f3e6c8; border: 1px solid color-mix(in srgb, var(--teinte) 70%, #f3e6c8); font-size: .56rem; }
.case .ruban.maintenant { background: var(--ambre); color: var(--sur-ambre); border-color: #f3d6a0; }
.case .numero { background: #3a2b1c; border-color: #f3d6a0; color: #f3e6c8; font-size: .7rem; font-weight: 700; }
.case.vide .cadre .nom-vide { color: #f3e6c8; }
/* le chapelet : les quotas du jour (essais, coups, défis, montées) en simple point, les choses à prendre gardent leur chiffre */
.flottant-droit:is([data-volet=enigme], [data-volet=boss], [data-volet=arene], [data-volet=tour], [data-volet=donjon]) .compte { font-size: 0; min-width: 12px; width: 12px; height: 12px; padding: 0; top: -1px; right: -1px; }
/* le clone : une carte fantôme, voilée de vert-de-gris */
.carte.clone { filter: saturate(.35) hue-rotate(40deg) brightness(.95); }
.carte.clone .nom span { font-style: italic; }
/* le chargement du début : le Livre de Chrona (livre.css, livre.js) */

/* l'entrée dans un nouveau Domaine : son aquarelle plein écran, le nom en grand */
.domaine-scene { position: fixed; inset: 0; z-index: 44; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 16px; padding: 0 20px calc(var(--sous) + 40px);
  background: linear-gradient(transparent 30%, rgba(8,6,12,.55) 55%, rgba(8,6,12,.95)), var(--decor) center 30% / cover no-repeat; animation: domaine-in 1.2s ease-out both; }
@keyframes domaine-in { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
.domaine-scene.part { animation: vs-partir .35s ease-in forwards; }
.domaine-texte { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--encre-nuit); animation: evo-titre .6s cubic-bezier(.2,.8,.3,1.3) .5s both; }
.domaine-texte small { letter-spacing: .3em; text-transform: uppercase; font-size: .8rem; color: var(--or-nuit); }
.domaine-sceau { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--papier); border: 2px solid var(--or-fane-sombre); box-shadow: 0 0 24px color-mix(in srgb, var(--teinte) 70%, transparent); }
.domaine-sceau .icone { width: 44px; height: 44px; }
.domaine-texte b { font-size: 2.1rem; font-variant: small-caps; letter-spacing: .05em; line-height: 1.05; color: #fff3dc; text-shadow: 0 0 18px var(--teinte), 0 2px 4px #000; }
.domaine-texte span { font-size: .95rem; color: var(--encre-nuit-2); }
.domaine-texte em { max-width: 320px; font-size: .9rem; color: var(--encre-nuit-2); }
.domaine-scene .consigne-evo { opacity: 0; transition: opacity .4s; color: var(--encre-nuit-2); font-style: italic; font-size: .85rem; margin: 0; }
.domaine-scene.pret .consigne-evo { opacity: 1; }
.page-donjon #donjon-course > .rangee:last-child { justify-content: center; }
/* les boutons du Donjon à leur taille, centrés (Mika, 24 sept. 2026 : « le bouton orange est trop grand ») */
.page-donjon .boss-actions { justify-content: center; gap: 10px; padding: 10px 12px 2px; }
.page-donjon .boss-actions .bouton { flex: 0 1 auto; min-width: 128px; min-height: 42px; padding: 8px 22px; font-size: .95rem; }
/* la vitesse des combats en essai (calendrier, Pass) : le bouton luit d’ambre (Mika, 24 sept. 2026) */
#combat-vitesse.essai { border-color: var(--ambre-clair); box-shadow: 0 0 8px rgba(224,137,47,.6); color: var(--ambre-clair); }
/* le combat en boucle (Mika, 24 sept. 2026) : une ligne sous les boutons du niveau, et son bilan */
.niveau-boucle { margin-top: 6px; }
.niveau-boucle .bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.niveau-boucle .bouton .icone { width: 18px; height: 18px; }
.niveau-boucle .bouton small { font-size: .72rem; padding: 1px 7px; border-radius: 8px; background: rgba(179,154,90,.22); color: var(--encre-2); }
.bilan-boucle { text-align: center; font-size: 1.05rem; margin: 4px 0; }
.bilan-boucle.gains { display: flex; justify-content: center; gap: 16px; font-weight: 600; }
.bilan-boucle .icone { width: 18px; height: 18px; vertical-align: -3px; margin-right: 3px; }
/* « Étage N » à la fin d'un combat de la Tour : le coût d'énergie à côté (Mika, 25 sept. 2026) */
#combat-suite small { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; font-size: .8rem; opacity: .9; }
#combat-suite small .icone { width: 14px; height: 14px; }
/* l'Arène : mes totaux au-dessus des adversaires, pour comparer (Mika, 25 sept. 2026) */
.page-arene .arene-mes-totaux { display: flex; align-items: center; gap: 10px; margin: 4px 10px 6px; padding: 7px 10px; border-radius: 8px; background: rgba(224,137,47,.12); border: 1px solid rgba(224,137,47,.35); font-size: .88rem; }
.page-arene .arene-mes-totaux b { color: var(--encre); }
.page-arene .arene-mes-totaux .totaux { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--encre); }
.page-arene .arene-mes-totaux .totaux .icone { width: 15px; height: 15px; }
.page-arene .arene-mes-totaux small { margin-left: auto; color: var(--encre-2); }
/* ---------------------------------------------------------------- la Guilde (Mika, 25 sept. 2026) */
/* le blason : un écu à la couleur de la guilde, son emblème laiton dessus */
.blason { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 34px; vertical-align: middle;
  background: linear-gradient(160deg, rgba(255,255,255,.28), transparent 45%), var(--couleur, #8a6d1e);
  clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%); filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.blason .icone { width: 70%; height: auto; margin-top: -12%; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.blason.grand { width: 64px; height: 72px; }
.blason.petit { width: 15px; height: 17px; margin-right: 4px; vertical-align: -3px; }
#guilde-titre { display: flex; align-items: center; justify-content: center; gap: 6px; }
#guilde-titre .blason { width: 24px; height: 27px; }
.page-guilde .guilde-bloc { margin: 10px 12px 0; }
.page-guilde .guilde-bloc .arene-titre { margin: 0 0 6px; }
.page-guilde .guilde-sous-titre { display: flex; align-items: center; gap: 5px; margin: 8px 0 4px; color: var(--encre-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.page-guilde .guilde-sous-titre .icone { width: 15px; height: 15px; }
.page-guilde .guilde-attente { margin: 8px 12px 0; }
/* la liste des guildes ouvertes */
.guilde-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.guilde-liste li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--fond-case); border: 1px solid var(--fond-case-bord); }
.guilde-ligne { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.guilde-ligne b { color: var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guilde-ligne small { color: var(--encre-2); font-size: .78rem; }
.guilde-liste .bouton { flex: none; }
/* fonder */
.guilde-fonder { display: flex; gap: 12px; align-items: flex-start; }
.guilde-apercu { flex: none; padding-top: 4px; }
.guilde-fonder-champs { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.guilde-nom { width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--or-fane-sombre); background: rgba(255,250,238,.8); font: inherit; color: var(--encre); }
.guilde-choix { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.guilde-choix .choix { aspect-ratio: 1; padding: 3px; border-radius: 8px; border: 1px solid var(--fond-case-bord); background: var(--fond-case); cursor: pointer; }
.guilde-choix .choix .icone { width: 100%; height: 100%; object-fit: contain; }
.guilde-choix .choix.pris, .guilde-couleurs .teinte.pris { outline: 2px solid var(--ambre); outline-offset: 1px; }
.guilde-couleurs { display: flex; gap: 8px; }
.guilde-couleurs .teinte { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); background: var(--couleur); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
/* l'objectif */
.guilde-obj-texte { margin: 0 0 6px; color: var(--encre); }
.guilde-avancement { display: flex; align-items: center; gap: 10px; }
.guilde-avancement b { flex: none; font-variant-numeric: tabular-nums; color: var(--encre); }
.jauge-guilde { flex: 1; height: 10px; border-radius: 5px; background: rgba(58,43,28,.18); overflow: hidden; }
.jauge-guilde i { display: block; height: 100%; background: linear-gradient(90deg, #c8701f, #ee9a3e); transform-origin: left; }
.guilde-gains .icone { width: 14px; height: 14px; vertical-align: -2px; }
.page-guilde .guilde-bloc > .bouton { width: 100%; margin-top: 6px; }
/* l'entraide */
.guilde-don { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.guilde-don small { width: 100%; color: var(--encre-2); }
.guilde-ma-carte { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.guilde-ma-carte > .carte, .guilde-ma-carte > .place { flex: none; width: 70px; }
.guilde-ma-carte .place.vide { display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 7; border-radius: 8px; border: 2px dashed rgba(107,86,56,.4); font-size: .72rem; color: var(--encre-2); }
.guilde-ma-carte small { display: block; color: var(--encre-2); margin-bottom: 4px; }
.guilde-vitrine, .renfort-cartes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.guilde-vitrine figure, .renfort-cartes figure { margin: 0; min-width: 0; }
.guilde-vitrine figcaption, .renfort-cartes figcaption { font-size: .7rem; text-align: center; color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guilde-choix-cartes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 50vh; overflow-y: auto; }
.guilde-choix-cartes .carte.choisie, .renfort-cartes .carte.choisie { outline: 3px solid var(--ambre); outline-offset: 2px; }
/* classements, journal, membres */
.guilde-classement, .guilde-journal, .guilde-membres { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.guilde-classement li, .guilde-membres li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; background: var(--fond-case); border: 1px solid var(--fond-case-bord); font-size: .88rem; }
.guilde-classement li.moi, .guilde-membres li.moi { border-color: var(--ambre); background: rgba(224,137,47,.1); }
.guilde-classement .blason { width: 18px; height: 20px; }
.guilde-classement .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guilde-classement .points, .guilde-membres .part { font-variant-numeric: tabular-nums; }
.guilde-membres li b:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--encre); }
.guilde-membres li small { color: var(--encre-2); font-size: .74rem; white-space: nowrap; }
.guilde-membres .chef { color: var(--laiton); font-weight: 600; }
.guilde-mots { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.guilde-journal li { font-size: .84rem; color: var(--encre); padding: 3px 0; border-bottom: 1px dashed rgba(107,86,56,.2); }
.guilde-journal li small { color: var(--encre-2); margin-right: 6px; font-size: .72rem; }
.page-guilde > #guilde-corps > .rangee { margin-top: 10px; justify-content: center; }
/* le renfort dans la fiche d'un nœud */
.niveau-renfort { margin: 6px 0 4px; }
.niveau-renfort > small { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; color: var(--encre-2); font-size: .82rem; }
.niveau-renfort > small .icone { width: 16px; height: 16px; }
.page-guilde .rangee .bouton.principal, .page-guilde .guilde-bloc > .bouton { flex: 0 1 auto; width: auto; min-width: 170px; min-height: 42px; padding: 8px 22px; margin-left: auto; margin-right: auto; display: block; }
.page-guilde .lien-sortir { background: none; border: 0; font: inherit; font-size: .84rem; color: var(--encre-2); text-decoration: underline; padding: 6px 10px; cursor: pointer; }
/* être prévenu (Mika, 25 sept. 2026) : les genres en pastilles, allumées quand elles sont voulues */
.notifs { padding: 12px 14px; }
.notifs p { margin: 0 0 8px; }
.notifs-genres { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.notif-genre { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 16px; border: 1px solid var(--fond-case-bord); background: var(--fond-case); color: var(--encre-2); font: inherit; font-size: .84rem; cursor: pointer; opacity: .6; }
.notif-genre .icone { width: 16px; height: 16px; filter: grayscale(1); }
.notif-genre.actif { opacity: 1; color: var(--encre); border-color: var(--ambre); background: rgba(224,137,47,.12); }
.notif-genre.actif .icone { filter: none; }
.notifs .rangee { justify-content: center; }
.notifs .rangee .bouton { flex: 0 1 auto; min-width: 130px; }
#niveau-energie .prevenir { margin-left: 6px; }

/* ---------------------------------------------- audit des écrans du 25 sept. 2026 (Android en 360 à 412 px) */
/* les cibles du doigt : les petits boutons montent à 32 px ; les « ? », « Encaisser » et les points du Livre gardent
   leur dessin mais leur zone de toucher déborde autour (un ::before transparent) */
.bouton.petit { min-height: 32px; height: auto; padding: 6px 12px; line-height: 1.1; }
.rente .bouton.petit { min-height: 26px; height: 26px; padding: 0 10px; position: relative; }
.rente .bouton.petit::before { content: ''; position: absolute; inset: -6px -4px; }
.aide { width: 26px; height: 26px; position: relative; }
.aide::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; }
.point-page { position: relative; }
.point-page::before { content: ''; position: absolute; inset: -12px -6px; }
/* l'Arène en 360-400 px : le deck adverse un peu plus étroit, le nom sur deux lignes plutôt que « Écho du … »,
   les totaux jamais coupés en deux */
.adversaire-nom .totaux { white-space: nowrap; }
@media (max-width: 400px) {
  .page-arene .adversaire-deck { flex-basis: 34%; }
  .page-arene .adversaire-nom b { white-space: normal; line-height: 1.15; }
  .page-arene .adversaire .bouton { padding-left: 10px; padding-right: 10px; }
  .page-arene .arene-mes-totaux { gap: 6px; padding: 7px 8px; }
  .page-arene .arene-mes-totaux .totaux { white-space: nowrap; }
}
/* les petites cases d'état (Roi, Tour, Arène, Donjon) : une étiquette trop longue passe à la ligne au lieu de « COUPS DU… » */
.boss-etat li small { white-space: normal; line-height: 1.15; }
/* le Livre : le nom d'une carte pas encore trouvée et le ruban de la Semaine lisibles (6 à 9 px avant l'audit) */
.case.vide .cadre .nom-vide { font-size: max(10px, 8cqw); }
.case .ruban { font-size: .64rem; }
/* un téléphone couché (paysage, moins de 500 px de haut : pas une tablette ni un ordinateur) : le jeu s'efface derrière
   une consigne, il se tient à la verticale (Mika, 25 sept. 2026) */
.tourner { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .tourner { display: flex; position: fixed; inset: 0; z-index: 1000; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    background: radial-gradient(circle at 50% 40%, #2a2234, var(--nuit)); color: var(--ivoire); text-align: center; }
  .tourner .icone { width: 64px; height: 64px; animation: tourner-tel 2.4s ease-in-out infinite; }
  .tourner b { font-size: 1.3rem; color: #e6c14a; letter-spacing: .06em; }
  .tourner small { color: #efe4cc; opacity: .85; font-size: .95rem; }
}
@keyframes tourner-tel { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0deg); } }
/* le compte à côté d'un titre (« 180 j », « 14 / 45 cartes ») ne se coupe pas : c'est le titre qui cède */
h2 small { flex: none; }
/* en 360-400 px, les étiquettes des cases d'état plus serrées : « GARDIENS » tenait mal dans sa case */
@media (max-width: 400px) { .boss-etat li small { letter-spacing: .02em; font-size: .66rem; } }

/* ------------------------------------------------ le village du Seuil (Mika, 25 sept. 2026) */
/* sur le chemin ne restent que le calendrier et le Seuil : les autres médaillons sont cachés (ils portent encore les
   pastilles, que le village lit) */
#jour-boutons .flottant-droit:not([data-volet=calendrier]):not([data-volet=village]) { display: none !important; }
.village-medaillon { width: 50px; height: 50px; margin-left: -4px; }
.village-medaillon .icone { width: 40px; height: 40px; }
.village-medaillon.attend { box-shadow: 0 3px 8px rgba(0,0,0,.55), inset 0 0 0 2px rgba(255,255,255,.5), 0 0 0 2px var(--ambre), 0 0 14px rgba(243,179,92,.7); animation: luire-seuil 2.2s ease-in-out infinite; }
@keyframes luire-seuil { 50% { box-shadow: 0 3px 8px rgba(0,0,0,.55), inset 0 0 0 2px rgba(255,255,255,.5), 0 0 0 2px #ffd48a, 0 0 22px rgba(255,200,110,.95); } }
/* l'écran : sous les pages du jour (z 8), au-dessus du chemin */
.village-ecran { position: fixed; inset: 0; z-index: 7; background: #14110f; display: flex; flex-direction: column; animation: fin-voile .25s ease-out both; }
.village-bandeau { position: relative; top: auto; left: auto; right: auto; margin: calc(var(--sur) + 6px) 8px 0; flex: none; }
.village-cadre { flex: 1; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
/* le paysage continue au-dessus et au-dessous de la place (Mika, 25 sept. 2026 : « les bandes noires sont horribles ») :
   une image 1:3,5 dont la place occupe le milieu ; centrée, elle déborde de l'écran en haut et en bas, sur tout téléphone */
.village-paysage { position: relative; flex: none; width: 100%; max-width: 560px; aspect-ratio: 768 / 2688; background: url(/img/village/paysage.webp?v=5265176199) center / 100% 100% no-repeat; }
.village-place { position: absolute; left: 0; right: 0; top: 28.5714%; height: 42.8571%; }
/* le bandeau flotte sur le paysage */
.village-ecran .village-bandeau { position: absolute; top: calc(var(--sur) + 6px); left: 8px; right: 8px; margin: 0; z-index: 3000; }
.maison { position: absolute; transform: translate(-50%, -100%); padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.maison img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 6px rgba(0,0,0,.55)); transition: transform .15s; pointer-events: none; }
.maison:active img { transform: scale(.97); }
.maison.chantier img { width: 78%; margin: 0 auto; filter: drop-shadow(0 6px 6px rgba(0,0,0,.55)) saturate(.7) brightness(.85); }
/* ce qui attend : la maison luit d'ambre, et une pastille sur son écriteau le dit */
.maison.attend img { animation: lueur-maison 2.2s ease-in-out infinite; }
@keyframes lueur-maison { 0%, 100% { filter: drop-shadow(0 6px 6px rgba(0,0,0,.55)) drop-shadow(0 0 8px rgba(243,179,92,.6)); } 50% { filter: drop-shadow(0 6px 6px rgba(0,0,0,.55)) drop-shadow(0 0 18px rgba(255,200,110,.95)); } }
.maison.neuve img { animation: surgir-maison .9s cubic-bezier(.2,.8,.2,1.2); }
@keyframes surgir-maison { from { transform: translateY(18%) scale(.7); opacity: 0; } }
/* les écriteaux, au-dessus de toutes les maisons */
.village-ecriteaux { position: absolute; inset: 0; z-index: 2000; pointer-events: none; }
.ecriteau { position: absolute; transform: translate(-50%, -30%); white-space: nowrap; padding: 3px 9px; border-radius: 7px;
  background: linear-gradient(#f3e9d2, #e2d2ae); color: #3a2b1c; font: 600 .78rem 'EB Garamond', Georgia, serif; border: 1px solid #8a6d3b; box-shadow: 0 2px 5px rgba(0,0,0,.55); }
.ecriteau small { display: block; font-weight: 400; font-size: .68rem; opacity: .8; text-align: center; line-height: 1.1; }
.ecriteau.en-chantier { background: linear-gradient(#3a2f28, #2a221d); color: #e6c14a; border-color: #6b5620; text-align: center; }
.ecriteau.en-chantier small { display: block; color: #efe4cc; font-weight: 400; font-size: .7rem; opacity: .85; }
.ecriteau .pastille-m { position: absolute; top: -9px; right: -10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--brique); color: #fff3e6;
  font: 700 .78rem/20px sans-serif; text-align: center; border: 1px solid #f1d9a8; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ecriteau .pastille-m.doux { min-width: 12px; width: 12px; height: 12px; padding: 0; top: -5px; right: -5px; background: var(--ambre, #e8a33a); box-shadow: 0 0 6px rgba(243,179,92,.8); }
/* la bannière d'un bâtiment débloqué (Mika, 25 sept. 2026) : un feuillet qui descend du haut, la maison dessus */
.banniere-construction { position: fixed; inset: 0; z-index: 35; display: flex; align-items: flex-start; justify-content: center; padding: calc(var(--sur) + 70px) 16px 16px;
  background: rgba(10,8,16,.55); animation: fin-voile .3s ease-out both; }
.banniere-construction.part { opacity: 0; transition: opacity .25s; }
.banniere-corps { position: relative; width: 100%; max-width: 380px; padding: 16px 16px 14px; text-align: center; border-radius: 14px; border: 1px solid var(--or-fane-sombre);
  background: var(--grain), linear-gradient(#f3e9d2, #e2d2ae); color: var(--encre); box-shadow: 0 14px 40px rgba(0,0,0,.6), inset 0 0 0 4px rgba(255,255,255,.35);
  animation: banniere-descend .5s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes banniere-descend { from { transform: translateY(-40px); opacity: 0; } }
.banniere-sur { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--or-fane); }
.banniere-maisons { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 8px 0 4px; }
.banniere-maisons img { height: auto; min-width: 0; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)) drop-shadow(0 0 14px rgba(243,179,92,.55)); animation: surgir-maison .9s cubic-bezier(.2,.8,.2,1.2) .15s both; }
.banniere-titre { display: block; font-size: 1.15rem; color: #6b4a14; margin: 2px 0 4px; }
.banniere-corps p { margin: 0 0 10px; font-size: .9rem; color: var(--encre-2); }
.banniere-corps .rangee { justify-content: center; gap: 10px; }
.banniere-corps .rangee .bouton { flex: 1; max-width: 170px; }
/* le butin d'un mini-boss sur l'écran de victoire : une plaque qui s'illumine après les gains */
.fin-butin { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0 2px; padding: 8px 12px; border-radius: 10px;
  background: linear-gradient(rgba(243,179,92,.22), rgba(217,130,43,.12)); border: 1px solid rgba(201,111,34,.55); color: var(--encre);
  animation: butin-luit 1s ease-out .9s both; }
.fin-butin .icone { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 0 6px rgba(243,179,92,.7)); }
.fin-butin span { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.fin-butin small { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--or-fane); }
@keyframes butin-luit { from { opacity: 0; transform: scale(.9); box-shadow: 0 0 0 rgba(243,179,92,0); } 60% { box-shadow: 0 0 18px rgba(243,179,92,.7); } to { opacity: 1; transform: none; } }
/* soigner le deck en battements (Mika, 26 sept. 2026) : à côté de la santé du deck, sur la défaite, dans le Deck */
.soigner { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; white-space: nowrap; }
.soigner .icone { width: 16px; height: 16px; }
.fin-soigner { display: contents; }
.sante-deck { flex-wrap: wrap; }
#deck-afaire li.soin-deck { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
/* la fusion aidée : les battements à la place du troisième exemplaire */
.fusion-battements { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 60px; font-weight: 700; color: var(--encre); }
.fusion-battements .icone { width: 30px; height: 30px; }
/* l'expédition de 24 h, la seule qui rapporte une carte : cadre ambré et ruban */
#expedition-durees .tuile.avec-carte { position: relative; border-color: var(--ambre); box-shadow: 0 0 0 1px rgba(224,137,47,.5), 0 0 10px rgba(243,179,92,.35); }
#expedition-durees .ruban-carte { position: absolute; top: -9px; right: -6px; padding: 2px 8px; border-radius: 9px; background: linear-gradient(#ee9a3e, #c8701f); color: #fff6ea; font-size: .72rem; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
/* l'horloge de chargement, entre le chemin et le village (Mika, 26 sept. 2026) : l'horloge peinte, des rouages qui
   tournent, les aiguilles qui remontent ; la fin (un trou au cœur du cadran, un zoom) est menée par app.js */
.horloge-chargement { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(circle at 50% 42%, #2a2234, #14110f 72%); color: #efe4cc; text-align: center; overflow: hidden;
  animation: horloge-vient .18s ease-out; }
@keyframes horloge-vient { from { opacity: 0; } }
.horloge-chargement .svg-horloge { width: min(68vw, 290px); height: auto; overflow: visible; transform-origin: 50% 50%; will-change: transform; }
.horloge-chargement .rouage { transform-box: fill-box; transform-origin: center; animation: horloge-tourne var(--duree, 6s) linear infinite var(--sens, normal); }
@keyframes horloge-tourne { to { transform: rotate(360deg); } }
.horloge-chargement b { font-size: 1.2rem; letter-spacing: .18em; text-transform: uppercase; color: #e6c14a; }
.horloge-chargement small { font-style: italic; opacity: .85; }
/* les étoiles d'une Mythique (Mika, 26 sept. 2026) : une rangée d'étoiles d'or en haut de la carte, dessinées en CSS */
.carte .etoiles { position: absolute; z-index: 5; left: 0; right: 0; top: 10cqw; display: flex; justify-content: center; gap: 1.2cqw; pointer-events: none; filter: drop-shadow(0 0 1.2cqw rgba(255,210,110,.85)) drop-shadow(0 .4cqw .6cqw rgba(0,0,0,.6)); }
.carte .etoiles i { width: 8cqw; height: 8cqw; background: linear-gradient(160deg, #fff1b8, #f0b93a 55%, #a86a12);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
/* « Composer au mieux » avec montées : le trio tel qu'il sera, en petites cartes */
.composer-plan { display: flex; justify-content: center; gap: 8px; margin: 4px 0 8px; }
.composer-plan .carte.petite { width: 29%; }
/* la Dérive (Mika, 26 sept. 2026) : la faille qui flotte près du nœud en cours, et l'écran de sa route */
#chemin .faille { cursor: pointer; }
#chemin .faille-image { transform-box: fill-box; transform-origin: 50% 60%; animation: faille-flotte 4.5s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(230,220,255,.8)); }
#chemin .faille-halo { fill: var(--teinte, #cfc6ff); opacity: .28; filter: blur(9px); transform-box: fill-box; transform-origin: center; animation: faille-pulse 2.6s ease-in-out infinite; }
#chemin .faille.vive .faille-halo { opacity: .45; }
#chemin .faille-etiquette { fill: rgba(20,16,34,.82); stroke: rgba(230,220,255,.7); stroke-width: 1; }
#chemin .faille-texte { fill: #efe8ff; font-size: 11.5px; font-weight: 700; text-anchor: middle; dominant-baseline: central; letter-spacing: .02em; pointer-events: none; }
@keyframes faille-flotte { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-7px) rotate(1.5deg); } }
@keyframes faille-pulse { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1.1); } }
.derive-ecran { position: fixed; inset: 0; z-index: 7; background: var(--derive-fond, #120f1c); display: flex; flex-direction: column; animation: fin-voile .25s ease-out both; }
.derive-ecran .derive-bandeau { position: absolute; top: calc(var(--sur) + 6px); left: 8px; right: 8px; margin: 0; z-index: 3; }
.derive-ecran .derive-bandeau .aide { margin-left: 6px; }
.derive-infos { position: absolute; z-index: 2; top: calc(var(--sur) + 62px); left: 8px; right: 8px; padding: 8px 10px 7px; border-radius: 12px;
  background: rgba(16,12,28,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid color-mix(in srgb, var(--derive, #cfc6ff) 55%, transparent); color: #efe8ff; }
.derive-regle { margin: 0 0 5px; font-size: .76rem; line-height: 1.25; }
.derive-regle b { color: var(--derive, #cfc6ff); }
.derive-gardiens { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 5px; }
.derive-gardien, .derive-fin { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3px 4px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); line-height: 1.1; min-width: 0; }
.derive-gardien small, .derive-fin small { font-size: .62rem; letter-spacing: .06em; color: var(--derive, #cfc6ff); white-space: nowrap; }
.derive-gardien b, .derive-fin b { font-size: .72rem; font-weight: 600; max-width: 100%; }
.derive-gardien.pris { opacity: .5; }
.derive-fin { background: none; border-color: transparent; padding: 3px 2px; }
.derive-corps { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.derive-svg { display: block; width: 100%; height: auto; }
.derive-voile { fill: rgba(10,8,20,.12); pointer-events: none; }
.derive-parcours { fill: none; stroke: var(--ambre-clair, #f3b35c); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1 9; filter: drop-shadow(0 0 3px rgba(0,0,0,.6)); }
.derive-plaque { fill: #f3eeff; font-size: 12px; font-weight: 700; letter-spacing: .06em; paint-order: stroke; stroke: rgba(12,10,24,.85); stroke-width: 3px; }
.derive-noeud.courant circle.rond { stroke: #fff; }
.derive-noeud.courant .onde { stroke: var(--derive, #cfc6ff); }
.derive-noeud.coeur circle.rond { stroke: var(--derive, #cfc6ff); stroke-width: 4; }
/* le mode test : essayer chacune des quatre Dérives */
.derive-essai { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.derive-essai small { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-right: 2px; }
.derive-essai .mini { padding: 3px 7px; font-size: .68rem; border-radius: 8px; }
.derive-essai .mini.actif { border-color: var(--derive, #cfc6ff); color: var(--derive, #cfc6ff); }
/* la Tour sans fin en vraie tour (Mika, 26 sept. 2026) : le tronçon peint répété, les étages sur l'escalier, les gardiens au balcon */
.tour-ecran { background: #17151b; }
.tour-infos { position: absolute; z-index: 2; top: calc(var(--sur) + 62px); left: 8px; right: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px;
  padding: 7px; border-radius: 12px; background: rgba(20,17,26,.8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(214,190,130,.45); color: #efe4cc; }
.tour-case { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.1; background: none; border: none; color: inherit; font: inherit; padding: 0; }
button.tour-case { border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(214,190,130,.35); padding: 2px 0; }
.tour-case small { font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: #d9bd7a; }
.tour-case b { font-size: .8rem; font-weight: 600; }
.tour-brume { pointer-events: none; }
.tour-pied { fill: #d9bd7a; font-size: 13px; letter-spacing: .12em; text-anchor: middle; }
.bonus-puce { pointer-events: none; }
.bonus-puce rect { fill: rgba(20,16,28,.86); stroke: #e6c14a; stroke-width: 1; }
.bonus-puce text { fill: #f3e6c4; font-size: 10.5px; font-weight: 700; dominant-baseline: central; }
.bonus-puce.pris { opacity: .45; }
.tour-classement { margin: 0; padding-left: 0; list-style: none; }
.tour-classement li { padding: 4px 0; border-bottom: 1px solid rgba(138,109,59,.25); }
.tour-classement li.moi { font-weight: 700; }
#etage-vague .carte, #etage-deck .carte { width: 30%; }
#etage-gain { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0 4px; }
#etage-gain .butin-boss { flex-basis: 100%; display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--ambre, #c8701f); background: rgba(238,154,62,.12); box-shadow: 0 0 10px rgba(238,154,62,.25); }
#etage-gain .butin-boss .icone { width: 30px; height: 30px; }
#etage-gain .butin-boss > span { display: flex; flex-direction: column; line-height: 1.15; }
#etage-gain .butin-boss small { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.etage-deck-titre { margin: 8px 0 2px; }
/* le butin des expéditions, en images (Mika, 26 sept. 2026 : « là c'est juste un texte ») */
.butin-expedition { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.butin-case { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 3px; border-radius: 999px; white-space: nowrap; background: rgba(179,154,90,.1); border: 1px solid rgba(179,154,90,.35); }
.butin-case .icone { width: 20px; height: 20px; }
.butin-case b { font-size: .9rem; font-variant-numeric: tabular-nums; }
.butin-case small { font-size: .62rem; letter-spacing: .05em; text-transform: uppercase; opacity: .75; }
.butin-case:not(.carte-dos) small { display: none; }   /* l'icône dit déjà ce que c'est */
.butin-case.carte-dos { border-color: var(--ambre, #c8701f); background: rgba(238,154,62,.14); padding-left: 3px; }
.butin-case.carte-dos img { width: 20px; height: 29px; border-radius: 3px; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.retour-exp { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.retour-exp-cartes { display: flex; justify-content: center; gap: 6px; width: 100%; }
.retour-exp-cartes .carte { width: 26%; }
.retour-exp .gains { display: flex; gap: 10px; width: 100%; }
.retour-exp .gain { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 6px 6px; border-radius: 10px; background: rgba(255,250,238,.6); border: 1px solid rgba(107,86,56,.5); animation: fin-poser .45s ease-out calc(.3s + var(--k) * .2s) both; }
.retour-exp .gain .icone { width: 34px; height: 34px; }
.retour-exp .gain b { color: var(--encre); font-size: 1.45rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.retour-exp .gain small { color: var(--encre-2); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.retour-exp-don { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.retour-exp-don .pli { width: 38%; }
.retour-exp-don small { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-2); }
/* l'Arène retravaillée (Mika, 26 sept. 2026) : l'amphithéâtre peint, et par-dessus des panneaux de parchemin clair comme le reste
   du jeu (Mika : « l'interface est fort sombre » — la DA convenue : monde sombre, parchemin clair) */
.arene-ecran { background: #2a2230 var(--img-arene, url(/img/arene/fond.webp?v=ca5919cba9)) center top / cover no-repeat; }
.arene-ecran::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(14,11,20,0), rgba(14,11,20,.05) 150px, rgba(14,11,20,.3) 360px, rgba(14,11,20,.42)); pointer-events: none; }
.arene-corps { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--sur) + 150px) 10px calc(var(--sous) + 18px); display: flex; flex-direction: column; gap: 12px; color: #2b2118; }
.arene-corps section { border-radius: 14px; background: linear-gradient(#f6ecd6, #eadcbd); border: 1px solid #b89a5e; box-shadow: 0 4px 14px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.7); padding: 10px 12px; }
.arene-corps h4 { margin: 0 0 8px; font: 600 .78rem 'EB Garamond', Georgia, serif; letter-spacing: .14em; text-transform: uppercase; color: #8a6d3b; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.arene-corps h4 small { letter-spacing: 0; text-transform: none; color: #2b2118; font-size: .8rem; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.equipe-suit { margin: -4px 0 6px; font-size: .74rem; color: #6b5638; }
.arene-corps h4 .icone { width: 15px; height: 15px; }
.arene-fiche { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 8px 10px !important; background: linear-gradient(135deg, #fbf1dc, #ecd9b0) !important; border-color: #c8913a !important; }
.arene-fiche .medaillon { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 35%, #f8cf7e, #e9973c 60%, #a8581a); border: 2px solid #f3d6a0; box-shadow: 0 0 10px rgba(238,154,62,.45), inset 0 -3px 6px rgba(90,40,0,.4); }
.arene-fiche .medaillon b { font: 700 1.35rem 'EB Garamond', Georgia, serif; color: #fff6ea; text-shadow: 0 1px 2px rgba(90,40,0,.7); line-height: 1; }
.arene-fiche .medaillon b.sans { font-size: 1.1rem; }
.arene-fiche .medaillon sup { font-size: .6rem; }
.arene-moi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arene-moi .ligne { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.arene-nom { font: 600 .98rem 'EB Garamond', Georgia, serif; letter-spacing: .04em; }
.arene-points { font-size: .8rem; }
.arene-points b { font-size: .98rem; color: #a8581a; }
.arene-bilan { display: flex; gap: 4px; }
.arene-bilan i { font-style: normal; font-size: .68rem; font-weight: 700; padding: 0 6px; border-radius: 8px; }
.arene-bilan .v { background: rgba(80,140,70,.18); color: #3d7a32; }
.arene-bilan .d { background: rgba(180,70,50,.16); color: #a3402c; }
.arene-palier { display: flex; align-items: center; gap: 3px; font-size: .76rem; flex-wrap: wrap; }
.arene-palier .icone { width: 14px; height: 14px; }
.arene-palier small { color: #6b5638; margin-right: 3px; }
.arene-fige { font-size: .68rem; color: #6b5638; font-style: italic; }
.arene-cartes, .affiche-cartes { display: flex; justify-content: center; gap: 6px; }
.arene-cartes .carte { width: 30%; }
.arene-equipe .mini { display: block; margin: 8px auto 0; }
.arene-jetons { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.arene-jetons h4 { align-self: stretch; }
.jetons { display: flex; gap: 10px; }
.jetons i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b89a5e; background: rgba(138,109,59,.12); }
.jetons i.fait { background: radial-gradient(circle at 40% 35%, #f8cf7e, #c8701f); border-color: #a8581a; box-shadow: 0 0 8px rgba(238,154,62,.6); }
.arene-jetons small { font-size: .78rem; color: #6b5638; }
.affiches { display: flex; flex-direction: column; gap: 10px; }
.affiche { border-radius: 12px; padding: 8px; background: rgba(255,250,238,.75); border: 2px solid #b89a5e; display: grid; grid-template-columns: 56% 1fr; gap: 10px; align-items: center; }
.affiche.facile { border-color: #6fa35e; }
.affiche.serré { border-color: #d98a2e; }
.affiche.difficile, .affiche.hors-de-portée { border-color: #b8503c; }
.affiche-cartes { display: flex; gap: 4px; }
.affiche-cartes .carte { width: 33% !important; flex: 1 1 0; cursor: zoom-in; }
.affiche-infos { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.affiche-infos header { display: flex; align-items: center; gap: 4px; max-width: 100%; }
.affiche-infos header b { font: 600 .98rem 'EB Garamond', Georgia, serif; line-height: 1.1; }
.affiche-infos .qui { font-size: .7rem; color: #6b5638; }
.affiche-infos .mot { font-size: .72rem; padding: 1px 9px; }
.balance { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #b8503c; box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.balance .moi { background: linear-gradient(90deg, #c8701f, #f3b35c); }
.balance .eux { flex: 1; background: linear-gradient(90deg, #a3402c, #c96048); }
.affiche-infos .balance { align-self: stretch; height: 6px; }
.enjeu { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: .74rem; }
.enjeu span { color: #4a3a28; }
.enjeu b { color: #a8581a; }
.affiche-infos .arene-defier { align-self: stretch; padding: 7px 10px; margin-top: 2px; }
.arene-cartes .carte { cursor: zoom-in; }
.affiches-points { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.affiches-points i { width: 7px; height: 7px; border-radius: 50%; background: rgba(138,109,59,.35); }
.affiches-points i.actif { background: #c8701f; }
.arene-vide { color: #2b2118; }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 6px; }
.marche { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.marche b { font-size: .82rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marche small { font-size: .7rem; color: #6b5638; }
.marche .socle { display: flex; align-items: center; justify-content: center; width: 100%; border-radius: 8px 8px 0 0; font: 700 1rem 'EB Garamond', Georgia, serif; color: #2b2118;
  background: linear-gradient(#f3d6a0, #b8914a); box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.marche.m1 .socle { height: 64px; background: linear-gradient(#ffe6a8, #e0a93c); }
.marche.m2 .socle { height: 46px; background: linear-gradient(#f2eee8, #b3ada4); }
.marche.m3 .socle { height: 34px; background: linear-gradient(#efc79d, #b37443); }
.marche.moi b { color: #a8581a; }
.arene-classement .suite { list-style: none; margin: 8px 0 0; padding: 0; }
.arene-classement .suite li { display: grid; grid-template-columns: 2.4em 1fr auto auto; gap: 8px; align-items: center; padding: 5px 2px; border-bottom: 1px solid rgba(138,109,59,.25); font-size: .85rem; }
.arene-classement .suite li.moi { color: #a8581a; font-weight: 700; }
.derniers { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; font-size: .8rem; }
.derniers > small { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #8a6d3b; }
.derniers span b { display: inline-block; width: 1.6em; text-align: center; border-radius: 6px; margin-right: 4px; }
.derniers .v b { background: rgba(80,140,70,.2); color: #3d7a32; }
.derniers .d b { background: rgba(180,70,50,.18); color: #a3402c; }
.derniers i { font-style: normal; color: #6b5638; }

/* le choix de l'équipe d'Arène */
.equipe-note b { color: #a8581a; margin-left: 4px; }
.equipe-grille { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 52vh; overflow-y: auto; padding: 2px; }
.equipe-grille .carte { width: 100%; }
.equipe-grille .carte.choisie { outline: 3px solid #c8701f; outline-offset: 1px; border-radius: 8px; }
/* les expéditions en pleine page (Mika, 26 sept. 2026) : même peau que l'Arène (parchemin clair sur le décor peint) */
.exp-route .note, .expeditions-ecran .note { color: #6b5638; margin: 4px 0; }
.exp-ligne { display: grid; grid-template-columns: 50% 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(255,250,238,.7); border: 1px solid #b89a5e; margin-top: 8px; }
.exp-ligne.prete { border: 2px solid #c8701f; box-shadow: 0 0 10px rgba(238,154,62,.35); }
.exp-cartes { display: flex; gap: 4px; }
.exp-cartes .carte { width: 33%; flex: 1 1 0; cursor: zoom-in; }
.exp-infos { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.exp-infos > b { font: 600 .95rem 'EB Garamond', Georgia, serif; }
.exp-infos .compte-rebours { font-size: .8rem; color: #8a6d3b; font-variant-numeric: tabular-nums; }
.exp-infos .bouton { align-self: stretch; }
.expeditions-ecran .butin-expedition { margin-top: 0; }
.expeditions-ecran .butin-case { background: rgba(138,109,59,.1); border-color: rgba(138,109,59,.4); color: #2b2118; }
.exp-etape { margin: 8px 0 6px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #8a6d3b; }
.exp-etape b { color: #a8581a; letter-spacing: 0; }
.exp-etape small { text-transform: none; letter-spacing: 0; color: #6b5638; font-size: .74rem; }
.exp-durees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.exp-duree { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 10px; border: 1px solid #b89a5e;
  background: linear-gradient(#fbf3e0, #efe1bf); color: #2b2118; font: inherit; }
.exp-duree b { font: 700 1.2rem 'EB Garamond', Georgia, serif; }
.exp-duree small { font-size: .7rem; color: #6b5638; min-height: 1em; }
.exp-duree.choisie { border: 2px solid #c8701f; background: linear-gradient(#fff4dc, #f6d9a4); box-shadow: 0 0 10px rgba(238,154,62,.35); }
.exp-duree.avec-carte { border-color: #d98a2e; }
.exp-duree .ruban-carte { position: absolute; top: -9px; right: -4px; padding: 1px 7px; border-radius: 8px; background: linear-gradient(#ee9a3e, #c8701f); color: #fff6ea; font-size: .66rem; font-weight: 700; white-space: nowrap; }
.exp-grille { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.exp-grille .carte { width: 100%; }
.exp-grille .carte.choisie { outline: 3px solid #c8701f; outline-offset: 1px; border-radius: 8px; }
.exp-barre { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px;
  background: linear-gradient(#fbf1dc, #ecd9b0); border: 2px solid #c8913a; box-shadow: 0 -4px 16px rgba(0,0,0,.45); color: #2b2118; }
.exp-estimation { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: .82rem; }
.exp-estimation > b { font: 600 .9rem 'EB Garamond', Georgia, serif; }
.exp-estimation > small { color: #6b5638; font-size: .74rem; }
.exp-barre .bouton { flex: none; padding: 10px 20px; }
/* la fiche d'une carte en pleine page (Mika, 27 sept. 2026) : bandeau, la carte seule sur son décor, puis le parchemin */
.fiche-pleine { position: fixed; inset: 0; z-index: 8; display: flex; flex-direction: column; background: var(--papier); animation: fin-voile .2s ease-out both; }
.fiche-pleine[hidden] { display: none; }
/* le bandeau flotte au-dessus de la page, comme au village et dans l'Arène : le décor et le contenu passent dessous (Mika) */
.fiche-pleine .fiche-bandeau { position: absolute; top: calc(var(--sur) + 6px); left: 8px; right: 8px; margin: 0; z-index: 3; }
.fiche-decor > .bouton-contempler { position: absolute; right: 14px; bottom: 38px; }
/* les tuiles secondaires de la fiche (deck, illustration) : à plat, une ligne, pour ne pas voler la vedette à la montée */
.fiche-pleine #carte-actions > .tuile { flex-direction: row; justify-content: center; gap: 8px; min-height: 0; padding: 9px 12px; }
.fiche-pleine #carte-actions > .tuile .icone { width: 24px; height: 24px; margin: 0; }
.fiche-pleine #carte-actions > .tuile small { display: none; }
.fiche-pleine .feuille-corps { flex: 1; max-height: none; border: 0; border-radius: 0; box-shadow: none; animation: none; padding: 0 12px calc(var(--sous) + 18px); }
.fiche-pleine .feuille-corps::before { display: none; }
.fiche-decor { margin: 0 -12px 12px; padding: calc(var(--sur) + 70px) 12px 10px; background: var(--ardoise-2) var(--decor, none) center 30% / cover no-repeat; position: relative; }
.fiche-decor::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 40%, color-mix(in srgb, var(--teinte, var(--laiton)) 28%, transparent), transparent 70%), linear-gradient(rgba(21,18,32,.35), rgba(21,18,32,.6)); }
.fiche-decor > * { position: relative; }
.fiche-decor .vitrine { width: 48%; }
.fiche-decor .consigne { margin: 6px 0 0; text-align: center; font-size: .8rem; color: #efe4cc; font-style: italic; opacity: .8; }
.fiche-pleine .fiche-carte h3 { margin: 0 0 6px; font-size: 1.2rem; font-variant: small-caps; color: #7a5a2c; overflow-wrap: anywhere; }
.fiche-pleine .chips { margin-bottom: 4px; }
.chip.chip-role { padding-left: 3px; gap: 5px; }
.fiche-pleine .rangs { display: block; text-align: center; margin: 0 0 6px; }
.fiche-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0; }
.fiche-stat { padding: 8px 10px; border-radius: 12px; border: 1px solid #b89a5e; background: rgba(255,250,238,.7); }
.fiche-stat small { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #8a6d3b; }
.fiche-stat span { display: flex; align-items: center; gap: 6px; }
.fiche-stat .icone { width: 22px; height: 22px; }
.fiche-stat b { font-size: 1.35rem; color: var(--encre); }
.fiche-stat em { display: block; font-style: normal; font-size: .78rem; color: #3d7a32; min-height: 1em; }
.fiche-pleine #carte-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.fiche-pleine #carte-actions > * { flex: 1 1 40%; min-width: 0; }
.fiche-pleine #carte-actions > .large, .fiche-pleine #carte-actions > .fiche-max { flex-basis: 100%; }
.fiche-monter { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid #f3d6a0; background: linear-gradient(#ee9a3e, #c8701f); color: #fff6ea; font: inherit; text-align: left; box-shadow: 0 3px 10px rgba(168,88,26,.35); }
.fiche-monter:disabled { filter: saturate(.4); opacity: .75; }
.fiche-monter > .icone { width: 34px; height: 34px; }
.fiche-monter .txt { flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.fiche-monter .txt b { font-size: 1.08rem; font-weight: 600; }
.fiche-monter .txt small { font-size: .8rem; opacity: .92; }
.fiche-monter .prix { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 10px; background: rgba(255,246,234,.22); font-weight: 700; white-space: nowrap; }
.fiche-monter .prix .icone { width: 18px; height: 18px; }
.fiche-max { margin: 0; text-align: center; font-style: italic; }
.fiche-titre { margin: 16px 0 6px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #8a6d3b; font-weight: 600; }
/* les sorts, à la couleur de leur effet (Mika, 27 sept. 2026) : une bande à gauche, des étiquettes sobres */
.sorts-fiche { list-style: none; margin: 0; padding: 0; }
.sorts-fiche li { padding: 8px 10px 8px 12px; margin-bottom: 6px; border-radius: 10px; background: rgba(255,250,238,.7); border-left: 5px solid var(--c, #b89a5e); }
.sorts-fiche .tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sorts-fiche .tete b { font-weight: 600; color: var(--encre); }
.sorts-fiche .tete small { font-size: .72rem; color: #8a6d3b; white-space: nowrap; }
.sorts-fiche p { margin: 2px 0 4px; font-size: .92rem; color: #3a2b1c; }
.sorts-fiche .etiqs { display: flex; flex-wrap: wrap; gap: 4px; }
.etiq-sort { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 9px; font-size: .74rem; font-weight: 600; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.etiq-sort::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
/* le bouton de fusion : violet plein quand elle est prête, en pointillés sinon ; les exemplaires en jetons */
.fiche-fusion { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px; padding: 10px 12px; border-radius: 14px; font: inherit; text-align: left; color: #fff6ea;
  border: 1px solid #dcc4f7; background: linear-gradient(135deg, #b986ee, #7d46c4); box-shadow: 0 3px 12px rgba(125,70,196,.4); }
.fiche-fusion.attend { color: #4a2d72; border: 1px dashed #a986d6; background: linear-gradient(135deg, #f3ebff, #e4d4fa); box-shadow: none; }
.fiche-fusion > .icone { width: 38px; height: 38px; }
.fiche-fusion .txt { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.fiche-fusion .txt b { font-size: 1.05rem; font-weight: 600; }
.fiche-fusion .txt small { font-size: .8rem; }
.fiche-fusion .voir { padding: 4px 10px; border-radius: 10px; background: rgba(255,246,234,.22); font-weight: 700; }
.fiche-fusion .jetons { display: flex; gap: 4px; margin-top: 4px; }
.fiche-fusion .jetons i { width: 14px; height: 20px; border-radius: 3px; border: 1px solid currentColor; opacity: .45; }
.fiche-fusion .jetons i.la { opacity: 1; background: linear-gradient(#ffe6a8, #e0a93c); border-color: #fff3d6; }
.fiche-fusion.attend .jetons i.la { background: linear-gradient(#e6c96c, #b88a22); border-color: #8a6a12; }
/* en combat, sobre (Mika : « rien d'extravagant, pas de clignotements ») : un filet en tête de chaque sort, un point devant son nom */
.sorts-liste .sort { position: relative; overflow: hidden; }
.sorts-liste .sort[style*="--c"]::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); opacity: .9; }
.sorts-liste .sort[style*="--c"] b { display: inline-flex; align-items: center; gap: 5px; }
.sorts-liste .sort[style*="--c"] b::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.sorts-liste .sort.actif::before { background: var(--sur-ambre, #fff6ea); }
.combat-journal .nom-sort { color: var(--c); font-weight: 600; }
.fiche-pleine #carte-actions > .tuile.principale { background: linear-gradient(#fff4dc, #f6d9a4); color: var(--encre); border: 1px solid #d98a2e; text-shadow: none; box-shadow: none; }
/* le glossaire en quatre parties (Mika, 27 sept. 2026) : à gauche, compact ; rôles, couleurs, règles, effets rangés par couleur */
#feuille-aide.glossaire .aide-corps { text-align: left; }
.gl-section { margin: 0 0 14px; }
.gl-section h4 { margin: 4px 0 6px; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--or-fane, #8a6d3b); text-align: center; }
.gl-ligne { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid var(--voile-bord); font-size: .86rem; line-height: 1.3; color: var(--encre-2); }
.gl-ligne:first-of-type { border-top: 0; }
.gl-ligne > div { display: flex; flex-direction: column; }
.gl-ligne b { color: var(--c); font-size: .95rem; }
.gl-ligne .etiq-sort { justify-self: start; min-width: 78px; justify-content: flex-start; }
.gl-note { margin: 4px 0 0; font-size: .78rem; font-style: italic; color: var(--encre-2); text-align: center; }
.gl-terme { padding: 5px 0; border-top: 1px solid var(--voile-bord); font-size: .86rem; line-height: 1.35; color: var(--encre-2); }
.gl-terme b { color: var(--encre); margin-right: 5px; }
.gl-famille { margin: 6px 0 10px; padding-left: 9px; border-left: 3px solid var(--c); }
.gl-famille > .etiq-sort { margin-bottom: 2px; }
.gl-famille .gl-terme:first-of-type { border-top: 0; }
/* les pubs récompensées (Mika, 27 sept. 2026) : un bouton sobre, toujours au choix du joueur ; la pub d'essai en plein écran */
.bouton-pub { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 12px; border: 1px dashed #b89a5e; background: linear-gradient(#fbf3e0, #efe1bf);
  color: var(--encre, #2b2118); font: inherit; text-align: left; cursor: pointer; }
.bouton-pub .lecture { width: 26px; height: 26px; flex: none; color: #c8701f; }
.bouton-pub .lecture svg { width: 100%; height: 100%; }
.bouton-pub .txt { display: flex; flex-direction: column; line-height: 1.15; }
.bouton-pub .txt b { font-size: .9rem; font-weight: 600; }
.bouton-pub .txt small { font-size: .7rem; color: #6b5638; }
.zone-pub { display: flex; justify-content: center; margin: 8px 0 4px; }
.zone-pub:empty { display: none; }
.soins { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#niveau-energie .bouton-pub, #derive-energie .bouton-pub, #etage-energie .bouton-pub { display: flex; width: fit-content; margin: 8px 0 2px; }
.pub-voile { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8,6,12,.92); animation: fin-voile .2s ease-out both; }
.pub-cadre { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.pub-etiquette { align-self: flex-start; padding: 2px 8px; border-radius: 6px; background: rgba(239,228,204,.15); color: #efe4cc; letter-spacing: .12em; text-transform: uppercase; font-size: .7rem; }
.pub-ecran { position: relative; aspect-ratio: 9 / 14; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  background: radial-gradient(circle at 50% 40%, #3a3050, #17131a 70%); border: 1px solid rgba(214,190,130,.35); color: #efe4cc; }
.pub-ecran small { opacity: .7; font-style: italic; }
.pub-compte { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); border: 1px solid rgba(239,228,204,.4); font-size: .95rem; }
.pub-compte.fini { display: none; }
.pub-fermer { align-self: center; background: none; border: 0; color: #cbb994; font: inherit; font-size: .85rem; text-decoration: underline; }
.exp-rappel { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 9px; border: 1px solid rgba(138,109,59,.45); background: transparent; color: #6b5638; font: inherit; font-size: .76rem; }
.exp-rappel .icone { width: 14px; height: 14px; }

/* le médaillon du Seuil compte les maisons où quelque chose attend : en ambre, pas en rouge d'alerte (audit du 27 sept. 2026) */
#jour-boutons [data-volet=village] .compte { background: var(--ambre); }

/* les réglages (audit du 27 sept. 2026) : touchés par le nom du Gardien */
.bandeau button.nom-boite { border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.bandeau .nom-boite .engrenage { width: 16px; height: 16px; flex: none; color: var(--or-fane, #8a6d3b); opacity: .8; margin-left: -2px; }
.reglages-corps h3 { text-align: center; margin: 0 0 10px; }
.reglages-corps h4 { margin: 14px 0 6px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--encre-2); }
.reglages-boutons { display: grid; grid-template-columns: 1fr; gap: 8px; }
.reglages-corps .rangee { margin-top: 14px; }
/* le ruban de la carte de la Semaine sous la carte, plus sur ses bannières (audit du 27 sept. 2026 : il couvrait le haut) */
.case .ruban { position: absolute; z-index: 6; top: 4%; left: 50%; right: auto; transform: translateX(-50%); max-width: 56%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: 6px; padding: 1px 6px; font-size: .56rem; line-height: 1.35; -moz-text-size-adjust: none; text-size-adjust: none; }
/* (28 sept. 2026) sous la carte, il décalait la grille et les numéros sur le téléphone : il revient sur la carte, court et
 * centré en haut, entre les deux bannières */
/* les petites cartes (deck, collection, paquets, expéditions) : le nom et les chiffres descendaient à 6–7 px (audit du
 * 27 sept. 2026). Sous 130 px de large seulement, un peu plus gros, dans la place qui existe déjà (le dessin ne change pas). */
@container (max-width: 130px) {
  .carte .stats { font-size: 8.8cqw; gap: 2cqw; }
  .carte .stats span { gap: 1cqw; }
  .carte .nom { font-size: 7.4cqw; height: 18cqw; top: 114cqw; }
}
/* le chemin du Nexus : un ton de laiton patiné sur son lavis gris (audit du 27 sept. 2026) — la palette reste la sienne */
#chemin .voyage image.nexus { filter: sepia(.32) saturate(1.25) contrast(1.05) brightness(1.02); }
#chemin .voyage image.nexus-bord { filter: sepia(.16) saturate(1.12) contrast(1.02); }
/* l'entrée centrée dans l'écran, l'aquarelle visible jusqu'en bas (audit du 27 sept. 2026 : la moitié basse restait vide) */
.entree { min-height: 100svh; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; padding-top: var(--sur); }
#ecran-entree { background-position: center 60%; }
#ecran-entree::before { background: linear-gradient(rgba(21,18,32,.55), rgba(21,18,32,.7) 45%, rgba(21,18,32,.82)); }
/* la barre de la Tour sur parchemin clair, comme tout panneau posé sur une peinture (audit du 27 sept. 2026 : peu lisible) */
.tour-infos { background: linear-gradient(#f3e8d0, #e6d6b2); backdrop-filter: none; -webkit-backdrop-filter: none; border-color: #b89a5e; color: var(--encre); box-shadow: 0 4px 12px rgba(0,0,0,.45); }
.tour-case small { color: #7a5a2c; font-size: .62rem; }
.tour-case b { font-size: .95rem; }
button.tour-case { box-shadow: inset 0 0 0 1px rgba(138,109,59,.45); }
/* le bandeau du jeu : l'engrenage des réglages et l'énergie en « 18 · 7 min » prenaient la place du nom (audit du 27 sept. 2026) */
header.bandeau .ressources .ressource { padding: 0 7px; gap: 4px; }
.bandeau button.nom-boite { padding: 0 4px 0 8px; gap: 6px; }
.bandeau .nom-boite .engrenage { width: 12px; height: 12px; }
#r-energie.decompte, .energie-copie b.decompte { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; }
#r-energie small.dans, .energie-copie small.dans { font-size: .56rem; font-weight: 400; opacity: .8; white-space: nowrap; margin-top: 1px; }
/* Firefox Android « gonfle » les petits textes posés sur une grande image (font inflation) : sur le S24, les écriteaux du
 * village sortaient deux fois plus gros qu'ailleurs et se chevauchaient (Mika, 28 sept. 2026). On garde leur taille. */
.village-ecriteaux, .village-ecriteaux * { -moz-text-size-adjust: none; -webkit-text-size-adjust: none; text-size-adjust: none; }
/* les semaines à venir, sous le calendrier (Mika, 28 sept. 2026) : une ligne par semaine, liseré de la saison */
.semaines-a-venir { margin: 0 0 12px; padding: 10px 10px 8px; border: 1px solid var(--laiton-sombre); border-radius: 8px; background: var(--papier-clair); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.semaines-a-venir h4 { margin: 0 0 8px; text-align: center; font: 600 .95rem 'EB Garamond', Georgia, serif; letter-spacing: .12em; text-transform: uppercase; color: #7a5a2c; }
.semaines-a-venir ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sav-ligne { padding: 6px 8px; border-radius: 8px; border-left: 4px solid var(--teinte); background: rgba(255,250,238,.6); box-shadow: inset 0 0 0 1px rgba(138,109,59,.25); }
.sav-ligne.maintenant { background: linear-gradient(90deg, color-mix(in srgb, var(--teinte) 22%, #fff8ea), rgba(255,250,238,.6)); }
.sav-quand { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #7a5a2c; margin-bottom: 3px; }
.sav-corps { display: flex; align-items: center; gap: 8px; }
.sav-domaine { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 7px; }
.sav-domaine > .icone { width: 26px; height: 26px; flex: none; margin-top: 1px; }
.sav-domaine b { display: block; font-size: .92rem; line-height: 1.15; }
.sav-domaine small { display: block; font-size: .74rem; line-height: 1.25; color: var(--encre-2); }
.sav-derive { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.sav-derive img { width: 34px; height: 46px; object-fit: contain; filter: drop-shadow(0 0 6px var(--teinte)); }
.sav-derive small { font-size: .62rem; line-height: 1.1; color: var(--encre); }
.sav-note { margin: 8px 2px 0; font-size: .72rem; font-style: italic; color: var(--encre-2); text-align: center; }
/* la connexion Google (28 sept. 2026) : un bouton clair aux couleurs de Google, comme sa charte le demande, puis « ou » */
.bouton-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 46px; padding: 10px 16px; border-radius: 12px;
  border: 1px solid #b89a5e; background: #fffdf8; color: #2b2118; font: 600 1rem 'EB Garamond', Georgia, serif; box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer; }
.bouton-google[hidden] { display: none; }
.bouton-google svg { width: 20px; height: 20px; flex: none; }
.google-ou { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; color: var(--encre-2); font-size: .85rem; font-style: italic; }
.google-ou[hidden] { display: none; }
.google-ou::before, .google-ou::after { content: ''; flex: 1; height: 1px; background: rgba(138,109,59,.45); }
/* l'horloge attend ses pièces avant de paraître (28 sept. 2026) : le voile sombre d'abord, puis l'horloge en fondu */
.horloge-chargement .svg-horloge { transition: opacity .35s ease-out; }
.horloge-chargement.attend-horloge .svg-horloge, .horloge-chargement.attend-horloge b, .horloge-chargement.attend-horloge small { opacity: 0; }
/* ------------------------------------------------------------------ le coffre qui s'ouvre (28 sept. 2026) */
.coffre-voile { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: calc(var(--sur) + 16px) 20px calc(var(--sous) + 20px); box-sizing: border-box; background: radial-gradient(80% 55% at 50% 42%, #2c2336, #15121F 72%);
  opacity: 0; transition: opacity .35s ease-out; -moz-text-size-adjust: none; text-size-adjust: none; }
.coffre-voile.la { opacity: 1; }
.coffre-voile.part { opacity: 0; }
.coffre-titre { font: 600 1.25rem 'EB Garamond', Georgia, serif; letter-spacing: .14em; text-transform: uppercase; color: var(--or, #e6c14a); text-shadow: 0 2px 6px #000; }
.coffre-scene { position: relative; width: min(78vw, 330px); aspect-ratio: 1; }
.coffre-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent); mask: radial-gradient(closest-side, #000 72%, transparent); }
.coffre-image.ouvert { opacity: 0; }
/* il frémit : de petits coups de plus en plus vifs, le fermoir s'allume */
.coffre-scene.fremit .ferme { animation: coffre-fremit 1.1s ease-in both; }
@keyframes coffre-fremit {
  0%, 20% { transform: scale(1.18); filter: none; }
  28% { transform: rotate(-2deg) scale(1.18); } 36% { transform: rotate(2deg) scale(1.18); } 44% { transform: rotate(-1deg) scale(1.18); } 52% { transform: scale(1.18); }
  64% { transform: rotate(-3deg) scale(1.2); } 72% { transform: rotate(3deg) scale(1.2); } 80% { transform: rotate(-2deg) scale(1.21); }
  88% { transform: rotate(2deg) scale(1.22); filter: brightness(1.25) drop-shadow(0 0 18px rgba(243,179,92,.8)); }
  100% { transform: scale(1.23); filter: brightness(1.4) drop-shadow(0 0 26px rgba(243,179,92,.95)); } }
/* il s'ouvre : l'éclair, puis le coffre ouvert paraît, les rayons tournent derrière */
.coffre-eclair { position: absolute; inset: -20%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255,240,200,.95), rgba(243,179,92,.55) 30%, transparent 62%); }
.coffre-scene.ouvre .coffre-eclair { animation: coffre-eclair .9s ease-out both; }
@keyframes coffre-eclair { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
.coffre-scene.ouvre .ferme { opacity: 0; transition: opacity .25s .1s; }
.coffre-scene.ouvre .ouvert { opacity: 1; transition: opacity .25s .1s; animation: coffre-pose .6s ease-out both; }
@keyframes coffre-pose { from { transform: scale(1.08); } to { transform: none; } }
.coffre-rayons { position: absolute; inset: -12%; border-radius: 50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(243,200,120,.28) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 78%); mask: radial-gradient(closest-side, #000 20%, transparent 78%); }
.coffre-scene.ouvre .coffre-rayons { opacity: 1; transition: opacity .6s .2s; animation: coffre-tourne 18s linear infinite; }
@keyframes coffre-tourne { to { transform: rotate(360deg); } }
/* les gains, un à un, en fondu */
.coffre-gains { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 96px; }
.coffre-gains li { display: flex; align-items: center; gap: 10px; padding: 7px 18px; border-radius: 12px; background: linear-gradient(#f3e8d0, #e6d6b2);
  border: 1px solid #b89a5e; box-shadow: 0 4px 12px rgba(0,0,0,.45); color: var(--encre); font-size: 1.1rem;
  opacity: 0; transform: translateY(12px); transition: opacity .5s ease-out, transform .5s ease-out; }
.coffre-gains li.la { opacity: 1; transform: none; }
.coffre-gains li .icone { width: 28px; height: 28px; }
.coffre-gains li b { font-variant-numeric: tabular-nums; }
.coffre-prendre { min-width: 170px; margin-top: 6px; opacity: 0; pointer-events: none; transition: opacity .4s; }
.coffre-prendre.la { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .coffre-scene.fremit .ferme, .coffre-rayons { animation: none !important; } }
.coffre-voile > * { flex: none; }
.coffre-prendre { width: auto; height: auto; padding: 11px 34px; }
.coffre-scene { width: min(94vw, 420px); margin: -10px 0 -24px; }
.coffre-image { transform: scale(1.18); }
.coffre-scene.ouvre .ouvert { animation: coffre-pose2 .6s ease-out both; }
@keyframes coffre-pose2 { from { transform: scale(1.28); } to { transform: scale(1.18); } }
/* ------------------------------------------------------------------ les boutons de pub, variante A (28 sept. 2026,
 * maquette /maquettes/pubs.html) : la récompense d'abord, dans un médaillon doré ; la vidéo en petit ; ce qui reste en points */
.bouton-pub.pub-a { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 380px; box-sizing: border-box; margin: 8px auto 2px; padding: 9px 12px; border-radius: 14px;
  cursor: pointer; text-align: left; border: 1.5px solid #e6c14a; background: linear-gradient(135deg, #fff6df, #f1dfb4);
  box-shadow: 0 0 0 3px rgba(230,193,74,.18), 0 3px 10px rgba(0,0,0,.3); font: inherit; color: #2b2118; position: relative; overflow: hidden;
  -moz-text-size-adjust: none; text-size-adjust: none; transition: opacity .25s, filter .25s; }
.bouton-pub.pub-a::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%);
  background-size: 250% 100%; animation: pub-luire 3.5s ease-in-out infinite; }
@keyframes pub-luire { 0% { background-position: 130% 0; } 55%, 100% { background-position: -40% 0; } }
.pub-a .gain { flex: none; width: 52px; height: 52px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 35%, #fff3c9, #e6c14a 70%, #b8902c); box-shadow: inset 0 0 0 2px #fff4cf, 0 2px 5px rgba(0,0,0,.35); }
.pub-a .gain .icone { width: 24px; height: 24px; }
.pub-a .gain b { font-size: .78rem; line-height: 1; margin-top: 1px; white-space: nowrap; }
.pub-a .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.pub-a .txt > b { font-size: 1.02rem; }
.pub-a .txt small { font-size: .76rem; color: #6b5638; display: flex; align-items: center; gap: 5px; }
.pub-a .txt small svg { width: 13px; height: 13px; color: #c8701f; flex: none; }
.pub-a .points { display: flex; gap: 3px; margin-top: 4px; }
.pub-a .points i { width: 7px; height: 7px; border-radius: 50%; background: #c8701f; }
.pub-a .points i.pris { background: transparent; box-shadow: inset 0 0 0 1.2px #b89a5e; }
.pub-a .voir { flex: none; min-width: 40px; height: 40px; padding: 0 2px; box-sizing: border-box; border-radius: 20px; background: linear-gradient(#ee9a3e, #c8701f); color: #fff6ea;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
.pub-a .voir svg { width: 20px; height: 20px; margin-left: 2px; }
.pub-a.abonne .voir { padding: 0 14px; font-size: .9rem; }
/* la vidéo se prépare : le bouton attend, une petite roue tourne ; un clic est en cours : tous les boutons de pub s'éteignent */
.bouton-pub.pub-a.prepare, .bouton-pub.pub-a.occupe, .bouton-pub.pub-a:disabled { cursor: default; filter: saturate(.55); opacity: .8; }
.bouton-pub.pub-a.prepare::after, .bouton-pub.pub-a:disabled::after { animation: none; background: none; }
.bouton-pub.pub-a.prepare .voir, .bouton-pub.pub-a.occupe .voir { background: #b8a58a; }
i.roue { display: inline-block; flex: none; width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgba(200,112,31,.25); border-top-color: #c8701f; animation: pub-roue .8s linear infinite; }
@keyframes pub-roue { to { transform: rotate(360deg); } }
.confort-ligne .bouton.pub i.roue { margin-right: 2px; }
#niveau-energie .bouton-pub.pub-a, #derive-energie .bouton-pub.pub-a, #etage-energie .bouton-pub.pub-a { display: flex; width: 100%; margin: 8px 0 2px; }
/* les versos (29 sept. 2026) : une carte qui ne fait pas la paire pivote vers son dos avant de redevenir une tuile */
.pli.recache .carte { animation: recacher .7s ease-in-out both; }
.pli.recache .dos { animation: remontrer-dos .7s step-end both; }
.pli.recache .carte > *:not(.dos) { animation: masquer-recto .7s step-end both; }
@keyframes recacher { 0% { transform: none; } 50% { transform: rotateY(90deg) scale(1.06); } 100% { transform: rotateY(180deg) scale(.96); } }
@keyframes remontrer-dos { 0% { opacity: 0; } 50%, 100% { opacity: 1; } }
@keyframes masquer-recto { 0% { visibility: visible; } 50%, 100% { visibility: hidden; } }
/* les combats accélérés actifs (29 sept. 2026) : le temps qui reste, dans la fiche d'un nœud */
.vitesse-active { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: .85rem; color: #7a5a2c; }
.vitesse-active .icone { width: 18px; height: 18px; }
/* l'équipe du Roi (29 sept. 2026) : le deck, sa santé, le changer, le soigner */
.page-boss .boss-equipe { margin: 6px 10px 0; padding: 8px 10px; border-radius: 10px; background: rgba(255,250,238,.55); box-shadow: inset 0 0 0 1px rgba(138,109,59,.3); }
.boss-equipe .equipe-titre { margin: 0 0 6px; font-size: .88rem; }
.boss-equipe .equipe-titre small { color: var(--encre-2); font-style: italic; }
.boss-equipe .equipe-rangee { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.boss-equipe .equipe-carte { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.boss-equipe .equipe-carte .carte { width: 100%; cursor: pointer; }
.boss-equipe .sante-carte { display: block; width: 90%; height: 5px; border-radius: 3px; background: rgba(58,43,28,.2); overflow: hidden; }
.boss-equipe .sante-carte i { display: block; height: 100%; background: var(--sauge, #7fa25a); transform-origin: left; }
.boss-equipe .sante-carte.bas i { background: var(--brique, #b8322a); }
.boss-equipe .equipe-carte small { font-size: .7rem; color: var(--encre-2); }
.boss-equipe .place-libre { aspect-ratio: 5 / 7; border-radius: 10px; border: 1.5px dashed rgba(138,109,59,.6); background: rgba(255,250,238,.4); display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; color: var(--encre-2); cursor: pointer; }
.boss-equipe .place-libre b { font-size: 1.6rem; line-height: 1; }
.boss-equipe .equipe-soin { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; text-align: center; }
.boss-equipe .equipe-soin small { font-size: .78rem; color: var(--encre-2); }
.equipe-grille .carte.choisie { outline: 3px solid var(--ambre); outline-offset: 2px; border-radius: 8px; }
#etage-energie .palier-tour { display: block; margin-top: 4px; font-size: .78rem; color: var(--encre-2); font-style: italic; }
.entree-liens { margin: 14px 0 0; text-align: center; font-size: .85rem; }
.entree-liens a { color: #d8c49a; }
.reglages-corps a.bouton { text-align: center; text-decoration: none; }
/* supprimer son compte (29 sept. 2026) : discret, brique, jamais d'un seul toucher */
.reglages-corps .bouton.danger { color: #9a2a22; border-color: rgba(154,42,34,.45); background: transparent; font-size: .85rem; }
.champ-confirmation { width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 10px; border: 1px solid #b89a5e; font: inherit; font-size: 1rem; background: #fffaf0; }
.reglages-corps .rangee { flex-wrap: wrap; } .reglages-corps .rangee > * { flex: 1 1 45%; }
