/* Le Boarding habillé de l'écran de la carte d'aventure de Heroes III (DESIGN.md) : la carte en fond plein,
   coupée par les bords ; le texte dans des panneaux de marbre à filets d'or ; la barre d'état en cuir et la
   barre des ressources en rouge, en bas ; l'orange du joueur, seul, sur ce qui attend le geste de Nicolas.
   Une seule police, Spectral, deux tailles : la largeur de la colonne porte la hiérarchie, rien d'autre. */
@import url("https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,600;1,400&display=swap");

:root {
  --marbre: #1c1813;
  --filet: #9c7c3c;
  --filet-clair: #c9a85a;
  --filet-sombre: #4a3a1c;
  --cuir: #4a3020;
  --ressources: #6e140f;
  --texte: #e6d9bc;
  --texte-2: #b3a383;
  --drapeau: #f28a12;
  --alerte: #e8695c;        /* un indicateur qui manque sa cible (accueil, 09/11/2026) ; lisible sur le marbre */
  --police: "Spectral", Georgia, serif;
  --taille: 15px;
  --petite: 13px;
  --bas: 58px;              /* barre d'état + barre des ressources */
  /* Les veines du marbre et le grain du cuir : un bruit SVG, aucune image à charger. */
  --veines: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .045' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .52 0 0 0 0 .34 0 0 0 -2.2 1.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23v)'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.05' numOctaves='3' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .07 0 0 0 0 .03 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { background: #0b0a08; }
/* La carte : fixe, plus grande que la fenêtre, coupée net par ses quatre bords (ossature du tirage). Sa largeur
   couvre 115 % de la fenêtre, et sa hauteur aussi : 206vh = 115vh x 1,79, le rapport de monde.webp (2 560 x 1 429).
   Sans ce second terme, une fenêtre en hauteur (un téléphone) montrait du noir en haut et en bas. */
body {
  margin: 0; min-height: 100vh; padding-bottom: calc(var(--bas) + 24px);
  background: #0b0a08 url("img/monde.webp") center / max(115vw, 206vh) fixed no-repeat;
  color: var(--texte); font: 400 var(--taille)/1.45 var(--police);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font: inherit; margin: 0; }
img, video { display: block; }
a { color: inherit; }

/* Le panneau : marbre veiné, double filet d'or terne biseauté comme l'interface du jeu. */
.panneau {
  position: relative;
  background: linear-gradient(160deg, rgba(36,30,23,.86), rgba(28,24,19,.9) 55%, rgba(18,15,11,.92)), var(--veines) 0 0 / 300px, var(--marbre);
  border: 3px solid; border-color: var(--filet-clair) var(--filet-sombre) var(--filet-sombre) var(--filet-clair);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000, inset 0 0 0 2px rgba(201, 168, 90, .25), 0 8px 24px rgba(0, 0, 0, .55);
}

/* Le titre d'un panneau : même taille et même graisse que le texte ; il prend toute la largeur, filets
   tirés jusqu'aux bords. C'est la largeur qui le hisse (typographie du tirage). */
.titre { display: flex; align-items: center; gap: 12px; padding: 7px 16px; color: var(--filet-clair); letter-spacing: .06em; }
.titre::before, .titre::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--filet) 30%, var(--filet) 70%, transparent); }
.titre .compte { color: var(--texte-2); }
/* Le texte courant reste en colonne serrée. */
.serre { max-width: 40ch; }

/* L'en-tête : une bande de marbre, les quatre pages en mots. */
.entete { position: sticky; top: 0; z-index: 20; }
.entete nav { display: flex; justify-content: center; gap: 36px; padding: 8px 16px;
  background: linear-gradient(rgba(21,18,14,.88), rgba(21,18,14,.88)), var(--veines) 0 0 / 300px, #15120e; border-bottom: 2px solid var(--filet-sombre); box-shadow: 0 1px 0 #000, 0 4px 14px rgba(0, 0, 0, .6); }
.entete a { text-decoration: none; color: var(--texte-2); letter-spacing: .08em; padding: 2px 0; border-bottom: 1px solid transparent; }
.entete a:hover, .entete a:focus-visible { color: var(--texte); border-bottom-color: var(--filet); }
.entete a[aria-current="page"] { color: var(--filet-clair); border-bottom-color: var(--filet-clair); }

/* Les actions sont du texte (contrainte du tirage) : aucun fond plein, un mot qui se souligne au survol. */
.action { background: none; border: 0; padding: 4px 2px; font: inherit; color: var(--texte); cursor: pointer;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .15s, color .15s; }
.action:hover, .action:focus-visible { text-decoration-color: currentColor; }
.action.oui { color: var(--drapeau); }
.action.non { color: var(--texte-2); }
:focus-visible { outline: 2px solid var(--filet-clair); outline-offset: 2px; }

/* Le drapeau : l'orange du joueur, seul, sur ce qui attend le geste. Toujours accompagné d'un mot ou d'un compte. */
.drapeau { color: var(--drapeau); }
.fanion { display: inline-block; width: 10px; height: 14px; background: var(--drapeau); clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); flex: none; }

/* La barre d'état (cuir) et la barre des ressources (rouge), fixées en bas comme dans le jeu. */
.bas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; box-shadow: 0 -4px 14px rgba(0, 0, 0, .6); }
.barre-etat { height: 26px; display: flex; align-items: center; justify-content: center; padding: 0 16px;
  background: var(--grain) 0 0 / 200px, linear-gradient(#5a3a26, var(--cuir)); border-top: 2px solid var(--filet-sombre);
  color: var(--filet-clair); font-size: var(--petite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-ressources { height: 32px; display: flex; align-items: center; gap: 0; padding: 0 12px;
  background: linear-gradient(#83201a, var(--ressources) 60%, #4c0d0a); border-top: 1px solid #000; font-size: var(--petite); }
.barre-ressources .res { padding: 0 16px; border-right: 1px solid rgba(201, 168, 90, .35); white-space: nowrap; }
.barre-ressources .res b { font-weight: 400; color: #fff3d6; }
.barre-ressources .date { margin-left: auto; border: 0; color: #f0dcae; }

/* La liste des héros : cartes 3:4 de l'ancien Boarding, image à l'affiche, vidéo au survol. */
.heros-liste { display: grid; grid-template-columns: repeat(5, auto); gap: 5px; padding: 6px 12px 8px; }
a.carte-heros { display: block; color: inherit; text-decoration: none; }
.carte-heros { position: relative; background: #0b0a08; border: 1px solid var(--filet-sombre); cursor: pointer; overflow: hidden; }
.carte-heros:hover, .carte-heros:focus-visible { border-color: var(--filet-clair); }
/* Une carte prend sa taille de --carte-h quand la page la donne (l'accueil la tire de la hauteur de la fenêtre). */
.carte-heros .media { height: var(--carte-h, auto); aspect-ratio: 3 / 4; position: relative; }
.carte-heros .media img, .carte-heros .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carte-heros video { opacity: 0; transition: opacity .2s; }
.carte-heros:hover video, .carte-heros:focus-visible video { opacity: 1; }
.carte-heros .grave { position: absolute; inset: 0; display: grid; place-items: center; color: var(--filet); letter-spacing: .1em;
  background: var(--veines) 0 0 / 300px, #14110d; }
.carte-heros .legende { height: 20px; padding: 2px 6px 0; font-size: var(--petite); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-heros .legende span { display: block; color: var(--texte-2); }
.carte-heros .comptes { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; justify-content: space-between; font-size: var(--petite); }
.carte-heros .comptes span { min-width: 22px; padding: 0 6px; text-align: center; background: rgba(11, 10, 8, .85); border: 1px solid var(--filet-sombre); }
.carte-heros .comptes .drapeau { border-color: var(--drapeau); }

@media (prefers-reduced-motion: reduce) { .carte-heros video { display: none; } * { transition: none !important; } }

/* Le reste commun aux pages : l'avertissement sans JavaScript, les erreurs (en rouge, l'orange est au drapeau),
   les icônes des stats, les champs (un creux de marbre, l'or au focus). */
#sans-js { max-width: 560px; margin: 80px auto; padding: 16px 20px; background: var(--marbre); border: 1px solid var(--filet-sombre); }
#erreur { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 30; }
.erreur { margin: 0 0 6px; padding: 8px 14px; background: #2a0d0a; border: 1px solid #b3261e; color: var(--texte); cursor: pointer; }
.ico { width: 18px; height: 18px; vertical-align: -3px; flex: none; }
input, select, textarea { font: inherit; color: var(--texte); background: #0e0c09; border: 1px solid var(--filet-sombre); padding: 5px 8px; color-scheme: dark; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--filet-clair); }
input[type="checkbox"] { accent-color: var(--filet); width: 15px; height: 15px; }
.champ { display: grid; gap: 4px; font-size: var(--petite); color: var(--texte-2); }
[hidden] { display: none !important; }
