/*
 * ASCENSION - TOUT LE DESIGN DE /jouer, DANS CE SEUL FICHIER (carte Task Ascension #40, 24/10/2026).
 *
 * Interface, fenetres, boutons, textes, contours, minimap, couleurs du dessin de la carte : tout est ici.
 * Aucune autre feuille n'est chargee par le jeu, et aucun module ne pose de style a la main.
 *
 * L'ORDRE DU FICHIER :
 *   1. LA PALETTE : generee depuis palette.json (ne pas la toucher ici, voir la balise >>> PALETTE).
 *   2. LES REGLAGES (:root ci-dessous) : toutes les valeurs du design, nommees. C'EST ICI QU'ON CHANGE LE LOOK.
 *        - les grands boutons : --asc-texte-echelle (taille de tout le texte), --asc-unite (tous les espacements
 *          et dimensions), --asc-rayon (coins de tout le jeu), --asc-trait-* (epaisseur des contours) ;
 *        - la carte et la minimap (lues aussi par le JS, src/design.js : nombres SANS unite pour le dessin) ;
 *        - puis chaque valeur repetee du fichier (taille de texte, espacement, ombre, plan...), avec son
 *          nombre d'emplois et deux exemples de regles qui s'en servent.
 *   3. LES REGLES : une section par module du jeu, dans l'ordre de chargement des modules. Une valeur qui
 *      ne sert qu'a un seul element reste ecrite dans sa regle.
 *
 * POUR UNE IA : changer une valeur = changer sa variable dans les reglages ; ajouter un style a un module =
 * l'ecrire dans sa section, avec les variables existantes. Jamais de nouvelle feuille, jamais de style dans le JS.
 * Les points de rupture (@media) ne peuvent pas lire de variable CSS : ils restent ecrits dans les sections.
 */

/* >>> PALETTE : GENEREE par Resources/game/outils/appliquer_palette.py depuis Resources/game/src/palette.json.
   Ne pas modifier a la main : changer palette.json puis relancer le script. Palette v2 de la DA (carte #35). */
@import url("https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;700&display=swap");

:root {
  --asc-basalte: #1f1a24;
  --asc-basalte-rgb: 31, 26, 36;
  --asc-ombre-violette: #3a3143;
  --asc-ombre-violette-rgb: 58, 49, 67;
  --asc-ardoise: #514e5d;
  --asc-ardoise-rgb: 81, 78, 93;
  --asc-mauve-cendre: #825e6c;
  --asc-mauve-cendre-rgb: 130, 94, 108;
  --asc-galet: #957f88;
  --asc-galet-rgb: 149, 127, 136;
  --asc-brume: #a9a6b0;
  --asc-brume-rgb: 169, 166, 176;
  --asc-creme: #f6e6cf;
  --asc-creme-rgb: 246, 230, 207;
  --asc-ciel-braise: #f68436;
  --asc-ciel-braise-rgb: 246, 132, 54;
  --asc-soleil: #f9b036;
  --asc-soleil-rgb: 249, 176, 54;
  --asc-peche: #edbb7e;
  --asc-peche-rgb: 237, 187, 126;
  --asc-saumon: #e07853;
  --asc-saumon-rgb: 224, 120, 83;
  --asc-flamboyant: #e83010;
  --asc-flamboyant-rgb: 232, 48, 16;
  --asc-tole-rouge: #bf2a26;
  --asc-tole-rouge-rgb: 191, 42, 38;
  --asc-tole-rouge-sombre: #8e2d1d;
  --asc-tole-rouge-sombre-rgb: 142, 45, 29;
  --asc-nuit: #0f2345;
  --asc-nuit-rgb: 15, 35, 69;
  --asc-nuit-profonde: #091731;
  --asc-nuit-profonde-rgb: 9, 23, 49;
  --asc-bleu-nuit: #06386e;
  --asc-bleu-nuit-rgb: 6, 56, 110;
  --asc-ardoise-nuit: #313755;
  --asc-ardoise-nuit-rgb: 49, 55, 85;
  --asc-lagon-nuit: #3a5f86;
  --asc-lagon-nuit-rgb: 58, 95, 134;
  --asc-tole-framboise: #8f1352;
  --asc-tole-framboise-rgb: 143, 19, 82;
  --asc-lampadaire: #ffd23f;
  --asc-lampadaire-rgb: 255, 210, 63;
  --asc-lampadaire-sombre: #d4a522;
  --asc-lampadaire-sombre-rgb: 212, 165, 34;
  --asc-neon-rose: #ff3fa4;
  --asc-neon-rose-rgb: 255, 63, 164;
  --asc-neon-cyan: #3ff0e6;
  --asc-neon-cyan-rgb: 63, 240, 230;
  --asc-neon-violet: #ab7ba4;
  --asc-neon-violet-rgb: 171, 123, 164;
  --asc-grand-bleu: #14456b;
  --asc-grand-bleu-rgb: 20, 69, 107;
  --asc-lagon: #1f8a9e;
  --asc-lagon-rgb: 31, 138, 158;
  --asc-lagon-clair: #4cc4c4;
  --asc-lagon-clair-rgb: 76, 196, 196;
  --asc-ecume: #a8ece0;
  --asc-ecume-rgb: 168, 236, 224;
  --asc-foret: #1f2318;
  --asc-foret-rgb: 31, 35, 24;
  --asc-olive: #3e4915;
  --asc-olive-rgb: 62, 73, 21;
  --asc-canne: #3f8a3b;
  --asc-canne-rgb: 63, 138, 59;
  --asc-feuille: #7cc24f;
  --asc-feuille-rgb: 124, 194, 79;
  --asc-bois-sombre: #3d2419;
  --asc-bois-sombre-rgb: 61, 36, 25;
  --asc-bois: #8f5942;
  --asc-bois-rgb: 143, 89, 66;
  --asc-bois-clair: #b97b67;
  --asc-bois-clair-rgb: 185, 123, 103;
  --asc-basalte-mur: #642b1c;
  --asc-basalte-mur-rgb: 100, 43, 28;
  --asc-sable: #f3dfb0;
  --asc-sable-rgb: 243, 223, 176;
  --asc-case-jaune: #f2c14e;
  --asc-case-jaune-rgb: 242, 193, 78;
  --asc-case-rose: #e98a9c;
  --asc-case-rose-rgb: 233, 138, 156;
  --asc-case-bleue: #7fb4d9;
  --asc-case-bleue-rgb: 127, 180, 217;
  --asc-case-verte: #8cc9a0;
  --asc-case-verte-rgb: 140, 201, 160;
  --asc-peau-1: #f6d5bf;
  --asc-peau-1-rgb: 246, 213, 191;
  --asc-peau-2: #e8b48f;
  --asc-peau-2-rgb: 232, 180, 143;
  --asc-peau-3: #c98c62;
  --asc-peau-3-rgb: 201, 140, 98;
  --asc-peau-4: #a0663f;
  --asc-peau-4-rgb: 160, 102, 63;
  --asc-peau-5: #6e4428;
  --asc-peau-5-rgb: 110, 68, 40;
  --asc-peau-6: #4a2c1a;
  --asc-peau-6-rgb: 74, 44, 26;
  --asc-case-jaune-clair: #f7d484;
  --asc-case-jaune-clair-rgb: 247, 212, 132;
  --asc-case-jaune-sombre: #ac8a4a;
  --asc-case-jaune-sombre-rgb: 172, 138, 74;
  --asc-case-rose-clair: #f1b2b4;
  --asc-case-rose-clair-rgb: 241, 178, 180;
  --asc-case-rose-sombre: #a6687a;
  --asc-case-rose-sombre-rgb: 166, 104, 122;
  --asc-case-bleue-clair: #b0ccda;
  --asc-case-bleue-clair-rgb: 176, 204, 218;
  --asc-case-bleue-sombre: #6582a0;
  --asc-case-bleue-sombre-rgb: 101, 130, 160;
  --asc-case-verte-clair: #b8d9b7;
  --asc-case-verte-clair-rgb: 184, 217, 183;
  --asc-case-verte-sombre: #6d8f7d;
  --asc-case-verte-sombre-rgb: 109, 143, 125;
  --asc-creme-clair: #fffaf0;
  --asc-creme-clair-rgb: 255, 250, 240;
  --asc-creme-sombre: #cdb6ac;
  --asc-creme-sombre-rgb: 205, 182, 172;
  --asc-police-titres: "Pixelify Sans", "Pixel Operator", monospace;
  --asc-police-texte: "Pixel Operator", "Pixelify Sans", monospace;
}

/* Pixel Operator : licence CC0, fichiers et licence dans Resources/assets/fonts/pixel-operator. */
@font-face {
  font-family: "Pixel Operator";
  src: url("fonts/pixel-operator/PixelOperator.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Pixel Operator";
  src: url("fonts/pixel-operator/PixelOperator-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
/* <<< PALETTE */

:root {
  /* ---- La carte et la minimap. Les valeurs sans unite sont lues par le JS (src/design.js). */
  --asc-carte-fond: var(--asc-case-bleue); /* fond derriere la carte (PixiJS) */
  --asc-case-survol-trait: 1; /* epaisseur du losange de la case sous la souris */
  --asc-case-survol-libre: #ffffff; /* case libre (blanc neutre de PixiJS, hors palette) */
  --asc-case-survol-bloquee: var(--asc-saumon); /* case ou l'on ne peut pas marcher */
  --asc-case-survol-opacite: 0.9;
  --asc-minimap-taille: 160px;
  --asc-minimap-taille-mobile: 110px; /* ecran de 600px de large ou moins */
  --asc-minimap-contour: 4px; /* epaisseur du contour de la minimap */
  --asc-minimap-liseret: 2px; /* liseret creme autour du contour */
  --asc-minimap-case: 5; /* pixels par case dans la minimap */
  --asc-repere-fond: var(--asc-lampadaire); /* le perso sur la minimap et sur le plan de l'ile */
  --asc-repere-contour: var(--asc-nuit-profonde);
  --asc-repere-trait: 2;
  --asc-repere-rayon: 6; /* rayon du point du perso sur le plan de l'ile */
  --asc-cible-fond: var(--asc-tole-rouge); /* lieu signale sur la minimap (lieu de travail apres le guichet Emploi) */
  --asc-joystick-taille: 120px; /* joystick tactile ; la course du bouton en decoule */
  --asc-joystick-bouton: 52px;
  --asc-plan-vignette: 240; /* taille d'une zone dessinee sur le plan de l'ile, en pixels */
  --asc-plan-decalage-nom: 15; /* nom de la zone, sous son dessin, en % de la hauteur du plan */

  /* ---- Menu en gros boutons (gros_boutons.js, section 47 de l'ARCHITECTURE) : toutes les fenêtres en tuiles. */
  --asc-gb-tuile-hauteur: 96px; /* hauteur mini d'une tuile */
  --asc-gb-tuile-hauteur-mobile: 72px;
  --asc-gb-icone: 32px; /* icône pixel 8 x 8 d'une tuile */
  --asc-gb-icone-mobile: 24px;
  --asc-gb-ecart: 10px; /* entre deux tuiles, et entre les blocs d'un écran */
  --asc-gb-colonnes: 2; /* tuiles par rangée pour 2, 4 ou 8 tuiles */
  --asc-gb-colonnes-larges: 3; /* tuiles par rangée pour 3, 5, 6 ou 9 tuiles */
  --asc-gb-chiffre: var(--asc-soleil); /* couleur du chiffre clé d'une tuile */
  --asc-gb-pastille-fond: var(--asc-tole-rouge); /* petit nombre en coin d'une tuile */
  --asc-gb-champ-hauteur: 44px; /* champs et boutons d'un écran d'action */

  /* ---- Texte. --asc-texte-echelle grossit ou réduit TOUT le texte du jeu (1 = taille normale). */
  --asc-texte-echelle: 1;
  --asc-texte-1: calc(0.65rem * var(--asc-texte-echelle)); /* 3 emplois : .asc-crime-bouton-touche, .asc-monde-zone small */
  --asc-texte-2: calc(0.68rem * var(--asc-texte-echelle)); /* 2 emplois : .asc-monde-zone, .asc-besoins */
  --asc-texte-3: calc(0.6875rem * var(--asc-texte-echelle)); /* 2 emplois : .asc-god-sortie, .asc-god-journal */
  --asc-texte-4: calc(0.7rem * var(--asc-texte-echelle)); /* 9 emplois : .asc-retro-marque, .asc-tel-bulle small */
  --asc-texte-5: calc(0.72rem * var(--asc-texte-echelle)); /* 5 emplois : .asc-tel-lien, .asc-inv-emplacement */
  --asc-texte-6: calc(0.75rem * var(--asc-texte-echelle)); /* 24 emplois : .asc-aide, .asc-ciel-heure */
  --asc-texte-7: calc(0.78rem * var(--asc-texte-echelle)); /* 8 emplois : .asc-mv-saison, .asc-tel-app-nom */
  --asc-texte-8: calc(0.8rem * var(--asc-texte-echelle)); /* 25 emplois : .asc-label, .asc-ciel-bandeau-ligne */
  --asc-texte-9: calc(0.8125rem * var(--asc-texte-echelle)); /* 5 emplois : .asc-btn, .asc-cons-aide */
  --asc-texte-10: calc(0.82rem * var(--asc-texte-echelle)); /* 4 emplois : .asc-tel-notifs-ligne, .asc-tel-vide */
  --asc-texte-11: calc(0.85rem * var(--asc-texte-echelle)); /* 43 emplois : .asc-aide, .asc-ciel-heure */
  --asc-texte-12: calc(0.875rem * var(--asc-texte-echelle)); /* 2 emplois : .asc-btn, .asc-cons-contenu h4 */
  --asc-texte-13: calc(0.88rem * var(--asc-texte-echelle)); /* 1 emploi : .asc-tel-bulle */
  --asc-texte-14: calc(0.9rem * var(--asc-texte-echelle)); /* 11 emplois : .asc-ciel-bandeau-ligne, .asc-retro-voile-sous */
  --asc-texte-15: calc(0.92rem * var(--asc-texte-echelle)); /* 1 emploi : .asc-fin */
  --asc-texte-16: calc(0.95rem * var(--asc-texte-echelle)); /* 3 emplois : .asc-retro-sous-titre, .asc-bat-panneau h4 */
  --asc-texte-17: calc(1rem * var(--asc-texte-echelle)); /* 7 emplois : .asc-monde .asc-argent-fermer::before, .asc-sortie-boite p */
  --asc-texte-18: calc(1.05rem * var(--asc-texte-echelle)); /* 10 emplois : .asc-retro-tete, .asc-tel-titre */
  --asc-texte-19: calc(1.1rem * var(--asc-texte-echelle)); /* 7 emplois : .asc-partie-ailleurs-boite strong, .asc-tel-action.is-grand */
  --asc-texte-20: calc(1.15rem * var(--asc-texte-echelle)); /* 2 emplois : .asc-justice-verdict, .asc-perso-fiche-nom */
  --asc-texte-21: calc(1.2rem * var(--asc-texte-echelle)); /* 5 emplois : .asc-retro-voile-titre, .asc-com-carton */
  --asc-texte-22: calc(1.3rem * var(--asc-texte-echelle)); /* 2 emplois : .asc-pegre-mort-titre, .asc-perso-modale-titre */
  --asc-texte-23: calc(1.4rem * var(--asc-texte-echelle)); /* 3 emplois : .asc-chargement, .asc-fin-cours-grand */
  --asc-texte-24: calc(1.5rem * var(--asc-texte-echelle)); /* 1 emploi : .asc-tel-app-icone */
  --asc-texte-25: calc(1.6rem * var(--asc-texte-echelle)); /* 1 emploi : .asc-retro-score */

  /* ---- Espacements (padding, margin, gap, décalages). --asc-unite les met tous à l'échelle (1px = normal). */
  --asc-unite: 1px;
  --asc-esp-1: calc(1 * var(--asc-unite)); /* 4 emplois : .asc-tel-badge, .asc-crime-tas-etiquette */
  --asc-esp-2: calc(2 * var(--asc-unite)); /* 17 emplois : .asc-retro-btn, .asc-tel-notif */
  --asc-esp-3: calc(3 * var(--asc-unite)); /* 12 emplois : .asc-label, .asc-retro-records li */
  --asc-esp-4: calc(4 * var(--asc-unite)); /* 55 emplois : .asc-cons-histo, .asc-cons-tele */
  --asc-esp-5: calc(5 * var(--asc-unite)); /* 6 emplois : .asc-ciel-heure, .asc-argent-poche */
  --asc-esp-6: calc(6 * var(--asc-unite)); /* 123 emplois : .asc-monde .asc-argent-entete, .asc-aide */
  --asc-esp-7: calc(7 * var(--asc-unite)); /* 10 emplois : .asc-ciel-bandeau-ligne, .asc-piece-titre */
  --asc-esp-8: calc(8 * var(--asc-unite)); /* 171 emplois : .asc-partie-ailleurs-boite strong, .asc-partie-ailleurs-boite button */
  --asc-esp-10: calc(10 * var(--asc-unite)); /* 106 emplois : .asc-monde .asc-argent-entete, .asc-label */
  --asc-esp-12: calc(12 * var(--asc-unite)); /* 76 emplois : .asc-aide, .asc-erreur */
  --asc-esp-14: calc(14 * var(--asc-unite)); /* 42 emplois : .asc-aide, .asc-sortie-boite p */
  --asc-esp-15: calc(15 * var(--asc-unite)); /* .asc-passifs-fermer::before */
  --asc-esp-16: calc(16 * var(--asc-unite)); /* 36 emplois : .asc-sortie-boite, .asc-partie-ailleurs */
  --asc-esp-18: calc(18 * var(--asc-unite)); /* 9 emplois : .asc-partie-ailleurs-boite, .asc-partie-ailleurs-boite button */
  --asc-esp-20: calc(20 * var(--asc-unite)); /* 5 emplois : .asc-partie-ailleurs-boite, .asc-zone--bas-gauche */
  --asc-esp-28: calc(28 * var(--asc-unite)); /* 5 emplois : .asc-joystick, .asc-log-actions */
  --asc-esp-52: calc(52 * var(--asc-unite)); /* 6 emplois : .asc-mv-hud, .asc-justice-prison */
  --asc-esp-60: calc(60 * var(--asc-unite)); /* 2 emplois : .asc-monde-message, .asc-veh-message */
  --asc-esp-64: calc(64 * var(--asc-unite)); /* 5 emplois : .asc-crime-toasts, .asc-god-panneau */
  --asc-esp-84: calc(84 * var(--asc-unite)); /* 3 emplois : .asc-ciel-bandeau, .asc-argent-barre */
  --asc-esp-96: calc(96 * var(--asc-unite)); /* 7 emplois : .asc-ciel-bandeau, .asc-cons-toast */
  --asc-esp-120: calc(120 * var(--asc-unite)); /* 4 emplois : .asc-mv-message, .asc-com-toast */
  --asc-esp-124: calc(124 * var(--asc-unite)); /* 2 emplois : .asc-tel-notif, .asc-tel */
  --asc-esp-160: calc(160 * var(--asc-unite)); /* 3 emplois : .asc-ciel-heure, .asc-argent-barre */

  /* ---- Dimensions répétées (largeurs, hauteurs, icônes, jauges), mêmes unités. */
  --asc-dim-2: calc(2 * var(--asc-unite)); /* .asc-fin-barre */
  --asc-dim-4: calc(4 * var(--asc-unite)); /* 2 emplois : .asc-pegre-bouton-jauge, .asc-pegre-cachette.is-en-cours::after */
  --asc-dim-10: calc(10 * var(--asc-unite)); /* 6 emplois : .asc-tel-point, .asc-crime-jauge-barre */
  --asc-dim-12: calc(12 * var(--asc-unite)); /* 3 emplois : .asc-cons-etiquette, .asc-tel-bouton-icone */
  --asc-dim-13: calc(13 * var(--asc-unite)); /* 3 emplois : .asc-inv-ascen, .asc-mj-paye img */
  --asc-dim-14: calc(14 * var(--asc-unite)); /* 3 emplois : .asc-cons-etiquette, .asc-cons-etiquette.is-cd */
  --asc-dim-16: calc(16 * var(--asc-unite)); /* .asc-retro-panneau */
  --asc-dim-20: calc(20 * var(--asc-unite)); /* 3 emplois : .asc-tel-bouton-icone, .asc-tel-pastille */
  --asc-dim-22: calc(22 * var(--asc-unite)); /* 6 emplois : .asc-inv-pastille, .asc-passifs-pastille */
  --asc-dim-24: calc(24 * var(--asc-unite)); /* 5 emplois : .asc-monde .asc-argent-fermer, .asc-zone */
  --asc-dim-26: calc(26 * var(--asc-unite)); /* 2 emplois : .asc-perso-choix-bouton--couleur */
  --asc-dim-30: calc(30 * var(--asc-unite)); /* libre depuis la carte #78 (croix commune) */
  --asc-dim-32: calc(32 * var(--asc-unite)); /* 30 emplois : .asc-ciel-bandeau, .asc-cons-toast */
  --asc-dim-36: calc(36 * var(--asc-unite)); /* 7 emplois : .asc-cons-champ, .asc-mv-fiche-bouton */
  --asc-dim-40: calc(40 * var(--asc-unite)); /* 5 emplois : .asc-btn, .asc-crime-fiche-bouton */
  --asc-dim-42: calc(42 * var(--asc-unite)); /* 2 emplois : .asc-mj-table */
  --asc-dim-44: calc(44 * var(--asc-unite)); /* 7 emplois : .asc-btn, .asc-mv-fiche-bouton */
  --asc-dim-46: calc(46 * var(--asc-unite)); /* 2 emplois : .asc-retro-bouton */
  --asc-dim-56: calc(56 * var(--asc-unite)); /* 3 emplois : .asc-tel-app-icone, .asc-com-carton */
  --asc-dim-58: calc(58 * var(--asc-unite)); /* 2 emplois : .asc-crime-bouton, .asc-besoins-nom */
  --asc-dim-64: calc(64 * var(--asc-unite)); /* 2 emplois : .asc-fin-courbe, textarea.asc-god-champ */
  --asc-dim-72: calc(72 * var(--asc-unite)); /* 2 emplois : .asc-justice-juge, .asc-perso-avatar */
  --asc-dim-90: calc(90 * var(--asc-unite)); /* 3 emplois : .asc-com-champ, .asc-justice-juge */
  --asc-dim-96: calc(96 * var(--asc-unite)); /* 2 emplois : .asc-cons-fenetre, .asc-perso-creation-apercu */
  --asc-dim-120: calc(120 * var(--asc-unite)); /* 9 emplois : .asc-joystick, .asc-cons-tele */
  --asc-dim-140: calc(140 * var(--asc-unite)); /* 6 emplois : .asc-argent-panneau, .asc-com-infos */
  --asc-dim-150: calc(150 * var(--asc-unite)); /* 3 emplois : .asc-tel, .asc-argent-poche */
  --asc-dim-220: calc(220 * var(--asc-unite)); /* 3 emplois : .asc-mv-bulle, .asc-god-sortie */
  --asc-dim-260: calc(260 * var(--asc-unite)); /* 4 emplois : .asc-cons-tele, .asc-imm-survol */
  --asc-dim-280: calc(280 * var(--asc-unite)); /* 2 emplois : .asc-argent-message, .asc-log-deco */
  --asc-dim-380: calc(380 * var(--asc-unite)); /* 2 emplois : .asc-mj--bandeau, .asc-perso-ko-carte */
  --asc-dim-420: calc(420 * var(--asc-unite)); /* 2 emplois : .asc-partie-ailleurs-boite, .asc-perso-fiche */
  --asc-dim-480: calc(480 * var(--asc-unite)); /* 2 emplois : .asc-mv-message, .asc-arc-ecran-jeu */
  --asc-dim-520: calc(520 * var(--asc-unite)); /* 2 emplois : .asc-ciel-bandeau, .asc-mod-mots */
  --asc-dim-560: calc(560 * var(--asc-unite)); /* 3 emplois : .asc-retro-panneau, .asc-mj-annonces */
  --asc-dim-640: calc(640 * var(--asc-unite)); /* 3 emplois : .asc-inv-fenetre, .asc-passifs-fenetre */
  --asc-dim-660: calc(660 * var(--asc-unite)); /* 2 emplois : .asc-fin-fenetre, .asc-rent-fenetre */

  /* ---- Fenêtres : largeur maximale, et marge gardée au bord de l'écran sur téléphone. */
  --asc-fenetre-640: 640px; /* 1 emploi : .asc-arc-ecran-jeu */
  --asc-fenetre-600: 600px; /* 1 emploi : .asc-imm-panneau */
  --asc-fenetre-large: 560px; /* 4 emplois : .asc-cons-fenetre, .asc-bat-panneau */
  --asc-fenetre-moyenne: 460px; /* 4 emplois : .asc-com-fenetre, .asc-justice-panneau */
  --asc-colonne-largeur: 176px; /* la colonne de gros boutons en bas à droite (.asc-zone--bas-droite) ; le téléphone se pose à sa gauche */
  --asc-fenetre-440: 440px; /* 2 emplois : .asc-crime-combat, .asc-fin-fenetre */
  --asc-fenetre-etroite: 420px; /* 7 emplois : .asc-crime-toasts, .asc-crime-modale-carte */
  --asc-fenetre-400: 400px; /* 1 emploi : .asc-inv-fenetre */
  --asc-fenetre-320: 320px; /* 1 emploi : .asc-sortie-boite */
  --asc-fenetre-300: 300px; /* 1 emploi : .asc-tel-notif */
  --asc-fenetre-280: 280px; /* 1 emploi : .asc-justice-prison */
  --asc-fenetre-260: 260px; /* 1 emploi : .asc-rent-patrouille */
  --asc-marge-ecran: 32px; /* 20 emplois : .asc-sortie-boite, .asc-cons-fenetre */
  --asc-marge-ecran-24: 24px; /* 4 emplois : .asc-crime-combat, .asc-crime-toasts */

  /* ---- Contours (épaisseur des bordures et des liserés). */
  --asc-trait-fin: 1px; /* 19 emplois : .asc-btn, .asc-interface.is-ouvert .asc-zone--bas-droite */
  --asc-trait-moyen: 2px; /* 30 emplois : .asc-cons-onglets, .asc-cons-etiquette */
  --asc-trait-epais: 3px; /* 6 emplois : .asc-joystick, .asc-retro-panneau */
  --asc-trait-gras: 4px; /* 1 emploi : .asc-arc-ecran-jeu, .asc-minimap */
  --asc-liseret-neon: var(--asc-trait-fin) solid var(--asc-theme-clair); /* liseré néon des fenêtres de nuit (DA, rubrique 7), couleur du thème */
  --asc-liseret-decalage: -4px; /* 20 emplois : .asc-btn, .asc-interface.is-ouvert .asc-zone--bas-droite */

  /* ---- Coins. 0 = coins nets du pixel art (DA, rubrique 7) ; 6px arrondit TOUT le jeu. */
  --asc-rayon: 0; /* 161 emplois : .asc-monde .asc-argent-entete, .asc-monde .asc-argent-fermer */
  --asc-rond: 50%; /* 11 emplois : .asc-joystick, .asc-joystick-bouton */
  --asc-rayon-14: 14px; /* 2 emplois : .asc-retro-console--console_b, .asc-retro-bandeau */

  /* ---- Ombres et relief. */
  --asc-relief-bouton: inset 2px 2px 0 rgba(var(--asc-creme-rgb), 0.35), inset -2px -2px 0 rgba(var(--asc-nuit-profonde-rgb), 0.45); /* 33 emplois : .asc-joystick-bouton, .asc-cons-onglets .asc-cons-btn */
  --asc-ombre-1: 0 3px 0 rgba(var(--asc-nuit-profonde-rgb), 0.2); /* 9 emplois : .asc-joystick-bouton, .asc-tel-app-icone */
  --asc-ombre-2: 0 6px 0 rgba(var(--asc-nuit-profonde-rgb), 0.18), 0 12px 32px rgba(var(--asc-nuit-profonde-rgb), 0.25); /* 6 emplois : .asc-com-fenetre, .asc-fin-fenetre */
  --asc-ombre-3: 0 2px 0 rgba(var(--asc-nuit-profonde-rgb), 0.15); /* 6 emplois : .asc-label, .asc-argent-poche */
  --asc-ombre-4: 0 3px 0 rgba(var(--asc-nuit-profonde-rgb), 0.25); /* 4 emplois : .asc-justice-message, .asc-metier-message */
  --asc-ombre-5: 0 6px 0 rgba(var(--asc-nuit-profonde-rgb), 0.18); /* 4 emplois : .asc-bat-panneau, .asc-imm-panneau */
  --asc-ombre-6: 0 2px 0 rgba(var(--asc-nuit-profonde-rgb), 0.25); /* 3 emplois : .asc-com-enseigne, .asc-crime-recherche */
  --asc-ombre-7: 0 2px 0 rgba(var(--asc-nuit-profonde-rgb), 0.2); /* 3 emplois : .asc-mv-bulle, .asc-crime-fiche-bouton */
  --asc-ombre-8: 0 3px 0 rgba(var(--asc-nuit-profonde-rgb), 0.18); /* 2 emplois : .asc-ciel-heure, .asc-mv-saison */
  --asc-ombre-9: 0 6px 0 rgba(var(--asc-nuit-profonde-rgb), 0.25); /* 2 emplois : .asc-sortie-boite, .asc-monde-plan */
  --asc-ombre-10: 0 4px 0 rgba(var(--asc-nuit-profonde-rgb), 0.25); /* 2 emplois : .asc-crime-combat, .asc-justice-panneau */

  /* ---- Opacités et lettres. */
  --asc-opacite-55: 0.55; /* 3 emplois : .asc-crime-bouton:disabled, .asc-crime-fiche-bouton:disabled, .asc-perso-bouton:disabled */
  --asc-opacite-60: 0.6; /* 3 emplois : .asc-com-enseigne.is-ferme, 50% */
  --asc-opacite-70: 0.7; /* 2 emplois : .asc-tel-bulle small, .asc-crime-bouton-touche */
  --asc-opacite-80: 0.8; /* 2 emplois : .asc-justice-petit, .asc-justice-prison-motif */
  --asc-lettres: 0.04em; /* 4 emplois : .asc-com-corps h4, .asc-crime-recherche */

  /* ---- Plans (z-index) : plus le chiffre est grand, plus l'élément passe devant. */
  --asc-plan-2: 2; /* 3 emplois : .asc-crime-etiquettes, .asc-mj-calque */
  --asc-plan-3: 3; /* 4 emplois : .asc-etiquettes, .asc-com-enseignes */
  --asc-plan-4: 4; /* 6 emplois : .asc-aide, .asc-joystick */
  --asc-plan-5: 5; /* 6 emplois : .asc-chargement, .asc-ciel-heure */
  --asc-plan-6: 6; /* 10 emplois : .asc-interface, .asc-mv-message */
  --asc-plan-7: 7; /* 16 emplois : .asc-tel-notif, .asc-argent-message */
  --asc-plan-8: 8; /* 15 emplois : .asc-cons-fenetre, .asc-retro-bandeau */
  --asc-plan-9: 9; /* 9 emplois : .asc-cons-toast, .asc-retro-panneau */
  --asc-plan-10: 10; /* 1 emploi : .asc-cons-test */
  --asc-plan-20: 20; /* 2 emplois : .asc-arc-ecran, .asc-perso-modale */
  --asc-plan-21: 21; /* 1 emploi : .asc-arc-toast */
  --asc-plan-30: 30; /* 1 emploi : .asc-god-toast */
  --asc-plan-50: 50; /* 2 emplois : .asc-mj-rechargement, .asc-pegre-mort */
  --asc-plan-60: 60; /* 1 emploi : .asc-sortie */
  --asc-plan-100: 100; /* 1 emploi : .asc-partie-ailleurs */
}

/* ---- THÈMES D'INTERFACE (carte #43) : la couleur signature de l'interface, choisie par joueur.
   Le serveur pose data-theme sur <html> (cyan, rose, lagon ; ThemeInterface, réglages interface.*).
   Toutes les règles de l'interface lisent ces variables, jamais une couleur de la palette en direct :
     --asc-theme          la couleur du thème (fond des boutons principaux, bande de titre des fenêtres) ;
     --asc-theme-texte    le texte posé sur cette couleur ;
     --asc-theme-survol   le fond d'un bouton principal survolé ;
     --asc-theme-clair    la couleur du thème lisible SUR LA NUIT (liserés, textes, logo) ;
     --asc-theme-second*  le bouton secondaire (l'autre néon) ;
     --asc-theme-halo     la lueur néon des fenêtres et du logo.
   Accueil et inscription (carte #7) : un bouton radio coché portant data-asc-theme="<thème>" (Je suis un)
   impose son thème à la page.
   Défaut (sans attribut) : cyan. */
:root,
:root[data-theme="cyan"],
:root:has([data-asc-theme="cyan"]:checked) {
  --asc-theme: var(--asc-neon-cyan);
  --asc-theme-rgb: var(--asc-neon-cyan-rgb);
  --asc-theme-texte: var(--asc-nuit-profonde);
  --asc-theme-survol: var(--asc-ecume);
  --asc-theme-clair: var(--asc-neon-cyan);
  --asc-theme-clair-rgb: var(--asc-neon-cyan-rgb);
  --asc-theme-second: var(--asc-neon-rose);
  --asc-theme-second-texte: var(--asc-nuit-profonde);
  --asc-theme-second-survol: var(--asc-case-rose-clair);
}
:root[data-theme="rose"],
:root:has([data-asc-theme="rose"]:checked) {
  --asc-theme: var(--asc-neon-rose);
  --asc-theme-rgb: var(--asc-neon-rose-rgb);
  --asc-theme-texte: var(--asc-nuit-profonde);
  --asc-theme-survol: var(--asc-case-rose-clair);
  --asc-theme-clair: var(--asc-neon-rose);
  --asc-theme-clair-rgb: var(--asc-neon-rose-rgb);
  --asc-theme-second: var(--asc-neon-cyan);
  --asc-theme-second-texte: var(--asc-nuit-profonde);
  --asc-theme-second-survol: var(--asc-ecume);
}
/* Lagon : trop sombre pour un texte sur la nuit, ses textes, liserés et logo prennent lagon clair. */
:root[data-theme="lagon"],
:root:has([data-asc-theme="lagon"]:checked) {
  --asc-theme: var(--asc-lagon);
  --asc-theme-rgb: var(--asc-lagon-rgb);
  --asc-theme-texte: var(--asc-creme);
  --asc-theme-survol: var(--asc-grand-bleu);
  --asc-theme-clair: var(--asc-lagon-clair);
  --asc-theme-clair-rgb: var(--asc-lagon-clair-rgb);
  --asc-theme-second: var(--asc-ecume);
  --asc-theme-second-texte: var(--asc-nuit-profonde);
  --asc-theme-second-survol: var(--asc-creme-clair);
}
:root {
  --asc-theme-halo: 0 0 12px rgba(var(--asc-theme-clair-rgb), 0.55);
}

/* ================================================================================================
   PAGE ET MONDE  (ex-jouer.css)
   ================================================================================================ */

/* Page du jeu (/jouer) : plein écran, sans défilement. */
html:has(> body.asc-jouer), body.asc-jouer {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--asc-case-bleue);
  font-family: var(--asc-police-texte);
  color: var(--asc-creme);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Pas de ligatures : Pixelify Sans soude f et i ("Fiche" se lisait mal). Sur chaque élément, car
   un raccourci font: dans une règle remettrait la valeur par défaut. */
body.asc-jouer, body.asc-jouer *, body.asc-site, body.asc-site * {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0;
}

.asc-monde {
  position: fixed;
  /* Le bandeau Radio Ascension (modules/presse.js) pose --asc-radio-h sur :root : tout ce que le jeu colle en haut
     (boutons, jauges, mini-carte, messages) descend avec la racine, sans chevauchement. 0 quand il est fermé. */
  inset: var(--asc-radio-h, 0px) 0 0 0;
}

/* Direction artistique (carte Task #35) : titres et boutons du jeu en police de titre, sans lissage. */
.asc-monde h1,
.asc-monde h2,
.asc-monde h3,
.asc-monde h4,
.asc-monde button {
  font-family: var(--asc-police-titres);
}

.asc-monde {
  -webkit-font-smoothing: none;
}

/* Bande de titre et bouton fermer des fenêtres (DA, rubrique 7) : posés ici une fois pour toutes les
   fenêtres du jeu. Une fenêtre nouvelle prend asc-fenetre-tete et asc-fenetre-fermer, ou s'ajoute ici. */
.asc-monde .asc-argent-entete,
.asc-monde .asc-com-entete,
.asc-monde .asc-inv-entete,
.asc-monde .asc-passifs-entete,
.asc-monde .asc-rent-entete,
.asc-monde .asc-pegre-tete,
.asc-monde .asc-bat-tete,
.asc-monde .asc-log-tete,
.asc-monde .asc-cons-tete,
.asc-monde .asc-monde-plan-tete,
.asc-monde .asc-justice-tribunal-tete,
.asc-monde .asc-perso-fiche-tete,
.asc-monde .asc-fenetre-tete {
  background: var(--asc-theme);
  color: var(--asc-theme-texte);
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  box-shadow: inset 0 -2px 0 rgba(var(--asc-nuit-profonde-rgb), 0.35), var(--asc-theme-halo);
  font-family: var(--asc-police-titres);
}

.asc-monde .asc-argent-entete *:not(button),
.asc-monde .asc-com-entete *:not(button),
.asc-monde .asc-inv-entete *:not(button),
.asc-monde .asc-passifs-entete *:not(button),
.asc-monde .asc-rent-entete *:not(button),
.asc-monde .asc-pegre-tete *:not(button),
.asc-monde .asc-bat-tete *:not(button),
.asc-monde .asc-log-tete *:not(button),
.asc-monde .asc-cons-tete *:not(button),
.asc-monde .asc-monde-plan-tete *:not(button),
.asc-monde .asc-justice-tribunal-tete *:not(button),
.asc-monde .asc-perso-fiche-tete *:not(button),
.asc-monde .asc-fenetre-tete *:not(button) {
  color: inherit;
}

.asc-monde .asc-argent-fermer,
.asc-monde .asc-fin-fermer,
.asc-monde .asc-passifs-fermer,
.asc-monde .asc-rent-fermer,
.asc-monde .asc-fenetre-fermer {
  width: var(--asc-dim-24);
  min-width: var(--asc-dim-24);
  height: var(--asc-dim-24);
  padding: 0;
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-flamboyant);
  color: var(--asc-creme);
  font-family: var(--asc-police-titres);
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  box-shadow: inset 2px 2px 0 rgba(var(--asc-creme-rgb), 0.35), inset -2px -2px 0 rgba(var(--asc-tole-rouge-sombre-rgb), 0.6);
  cursor: pointer;
  overflow: hidden;
  font-size: 0;
}

/* Le mot du bouton reste pour les lecteurs d'écran ; on n'affiche qu'une croix carrée. */
.asc-monde .asc-argent-fermer::before,
.asc-monde .asc-fin-fermer::before,
.asc-monde .asc-passifs-fermer::before,
.asc-monde .asc-rent-fermer::before,
.asc-monde .asc-fenetre-fermer::before {
  content: "x";
  font-size: var(--asc-texte-17);
}

.asc-monde .asc-argent-fermer:active,
.asc-monde .asc-fin-fermer:active,
.asc-monde .asc-passifs-fermer:active,
.asc-monde .asc-rent-fermer:active,
.asc-monde .asc-fenetre-fermer:active {
  box-shadow: inset -2px -2px 0 rgba(var(--asc-creme-rgb), 0.35), inset 2px 2px 0 rgba(var(--asc-tole-rouge-sombre-rgb), 0.6);
}

/* La croix TOUJOURS À GAUCHE (carte #78, demande de Philippe du 25/10/2026 : "les croix pour fermer doivent
   toujours flotter à gauche") : dans toute bande qui porte une croix, la croix passe en tête et le titre la suit,
   à côté d'elle (jamais dessous). Une fenêtre nouvelle prend la croix commune (croixFermer, gros_boutons.js). */
.asc-monde .asc-argent-fermer,
.asc-monde .asc-fin-fermer,
.asc-monde .asc-passifs-fermer,
.asc-monde .asc-rent-fermer,
.asc-monde .asc-fenetre-fermer {
  order: -1;
  flex: none;
  margin: 0;
}

.asc-monde :has(> :is(.asc-argent-fermer, .asc-fin-fermer, .asc-passifs-fermer, .asc-rent-fermer, .asc-fenetre-fermer)) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--asc-esp-8);
}

.asc-monde :has(> :is(.asc-argent-fermer, .asc-fin-fermer, .asc-passifs-fermer, .asc-rent-fermer, .asc-fenetre-fermer)) > :not(button) {
  min-width: 0;
}

.asc-monde canvas {
  display: block;
  image-rendering: pixelated;
}

/* Écran de chargement, retiré quand la ville est prête. */
.asc-chargement {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--asc-texte-23);
  font-weight: 800;
  color: var(--asc-creme);
  text-shadow: 0 2px 0 var(--asc-lagon-nuit);
  background: var(--asc-case-bleue);
  z-index: var(--asc-plan-5);
}

.asc-monde.is-pret .asc-chargement {
  display: none;
}

.asc-monde.is-erreur .asc-chargement::after {
  content: " (erreur : voir la console)";
}

.asc-aide {
  position: absolute;
  top: var(--asc-esp-12);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--asc-esp-6) var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.85);
  color: var(--asc-creme);
  font-size: var(--asc-texte-11);
  font-weight: 700;
  z-index: var(--asc-plan-4);
  white-space: nowrap;
}

/* Calque des étiquettes HTML posées sur les bâtiments (placées à chaque image par le client iso). */
.asc-etiquettes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: var(--asc-plan-3);
}

.asc-label {
  position: absolute;
  left: 0;
  top: 0;
  padding: var(--asc-esp-3) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-size: var(--asc-texte-8);
  font-weight: 800;
  box-shadow: var(--asc-ombre-3);
  white-space: nowrap;
}

.asc-label--metier {
  background: var(--asc-case-jaune);
}

/* Joystick tactile : caché sur les écrans à souris. */
.asc-joystick {
  position: absolute;
  left: var(--asc-esp-28);
  bottom: var(--asc-esp-28);
  width: var(--asc-joystick-taille);
  height: var(--asc-joystick-taille);
  border-radius: var(--asc-rond);
  background: rgba(var(--asc-nuit-rgb), 0.35);
  border: var(--asc-trait-epais) solid rgba(var(--asc-lagon-nuit-rgb), 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--asc-plan-4);
  touch-action: none;
}

.asc-joystick-bouton {
  width: var(--asc-joystick-bouton);
  height: var(--asc-joystick-bouton);
  border-radius: var(--asc-rond);
  background: var(--asc-nuit);
  box-shadow: var(--asc-ombre-1);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

@media (pointer: coarse) {
  .asc-joystick {
    display: flex;
  }

  .asc-aide {
    font-size: var(--asc-texte-6);
    white-space: normal;
    width: 80%;
    text-align: center;
  }
}

.asc-erreur {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: var(--asc-esp-12);
  background: var(--asc-saumon);
  color: var(--asc-creme);
  font-weight: 700;
  text-align: center;
}

/* Un élément du jeu marqué `hidden` reste caché, même si sa classe lui donne un display (flex, grid...).
   Sans cela, la carte "KO" vide du personnage restait affichée par-dessus l'avatar. */
.asc-monde [hidden] {
  display: none !important;
}

/* Modale "Voulez-vous sortir ?" quand on clique la porte d'un intérieur (interieur.js, demanderSortie). */
.asc-sortie {
  position: absolute;
  inset: 0;
  z-index: var(--asc-plan-60);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--asc-nuit-profonde-rgb), 0.35);
}

.asc-sortie-boite {
  width: min(var(--asc-fenetre-320), calc(100vw - var(--asc-marge-ecran)));
  padding: var(--asc-esp-16);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-9);
  text-align: center;
}

.asc-sortie-boite p {
  margin: 0 0 var(--asc-esp-14);
  font-family: var(--asc-police-titres);
  font-size: var(--asc-texte-17);
}

.asc-sortie-choix {
  display: flex;
  justify-content: center;
  gap: var(--asc-esp-10);
}

.asc-sortie-option {
  justify-content: center;
}

/* Partie ouverte sur un autre appareil (une seule partie par compte) : le jeu est couvert et arrêté. */
.asc-partie-ailleurs {
  position: fixed;
  inset: 0;
  z-index: var(--asc-plan-100);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--asc-esp-16);
  background: rgba(var(--asc-nuit-profonde-rgb), 0.88);
}

.asc-partie-ailleurs-boite {
  max-width: var(--asc-dim-420);
  padding: var(--asc-esp-18) var(--asc-esp-20);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  text-align: center;
  box-shadow: 0 6px 0 rgba(var(--asc-nuit-profonde-rgb), 0.4);
}

.asc-partie-ailleurs-boite strong {
  display: block;
  margin-bottom: var(--asc-esp-8);
  font-family: var(--asc-police-titres);
  font-size: var(--asc-texte-19);
}

.asc-partie-ailleurs-boite button {
  margin-top: var(--asc-esp-6);
  padding: var(--asc-esp-8) var(--asc-esp-18);
  border: 0;
  background: var(--asc-case-jaune);
  color: var(--asc-nuit);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}


/* ================================================================================================
   CALQUE D'INTERFACE ET BOUTONS COMMUNS  (ex-interface.css)
   ================================================================================================ */

/*
 * LE SYSTÈME D'INTERFACE DU JEU (demande de Philippe du 22/10/2026 : « un truc uniforme, factoriser les
 * classes CSS »). Règles écrites dans ARCHITECTURE-_MAP.md, section 47. Un seul bouton (.asc-btn),
 * quatre variantes, un seul calque (.asc-interface) découpé en six zones. Les feuilles des modules ne
 * redéfinissent ni la couleur, ni la police, ni le relief d'un bouton : elles ne gardent que ce qui leur
 * est propre (une jauge, une icône).
 */

/* ------------------------------------------------------------------ le bouton */
.asc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--asc-esp-8);
  min-height: var(--asc-dim-40);
  padding: var(--asc-esp-8) var(--asc-esp-14);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-family: var(--asc-police-titres);
  font-weight: 800;
  font-size: var(--asc-texte-12);
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  box-shadow:
    inset 2px 2px 0 rgba(var(--asc-creme-rgb), 0.35),
    inset -2px -2px 0 rgba(var(--asc-nuit-profonde-rgb), 0.45),
    0 2px 0 rgba(var(--asc-nuit-profonde-rgb), 0.5);
}
.asc-btn:hover { background: var(--asc-bleu-nuit); }
.asc-btn:active,
.asc-btn.is-ouvert { transform: translateY(2px); box-shadow: inset 2px 2px 0 rgba(var(--asc-nuit-profonde-rgb), 0.45); }
.asc-btn:disabled { background: var(--asc-ardoise-nuit); color: var(--asc-mauve-cendre); outline-color: var(--asc-ardoise); cursor: default; }
.asc-btn[hidden] { display: none !important; }

/* Variantes : principal (l'action attendue), secondaire, danger (perte d'argent, attaque), pègre. */
.asc-btn--principal { background: var(--asc-theme); color: var(--asc-theme-texte); outline-color: var(--asc-nuit-profonde); }
.asc-btn--principal:hover { background: var(--asc-theme-survol); }
.asc-btn--secondaire { background: var(--asc-theme-second); color: var(--asc-theme-second-texte); outline-color: var(--asc-nuit-profonde); }
.asc-btn--secondaire:hover { background: var(--asc-theme-second-survol); }
.asc-btn--danger { background: var(--asc-tole-rouge); color: var(--asc-creme); outline-color: var(--asc-creme); }
.asc-btn--danger:hover { background: var(--asc-flamboyant); }
.asc-btn--pegre { background: var(--asc-ombre-violette); outline-color: var(--asc-neon-rose); }
.asc-btn--pegre:hover { background: var(--asc-tole-framboise); }

/* ------------------------------------------------------------------ le calque et ses zones (interface.js) */
.asc-interface {
  position: absolute;
  inset: 0;
  z-index: var(--asc-plan-6);
  pointer-events: none;
}
.asc-zone {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  pointer-events: none;
  max-width: calc(50vw - var(--asc-dim-24));
}
.asc-zone > * {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
  pointer-events: auto;
}
.asc-zone > .asc-btn:active,
.asc-zone > .asc-btn.is-ouvert { transform: translateY(2px) !important; }
.asc-zone--haut-gauche { top: var(--asc-esp-12); left: var(--asc-esp-12); align-items: flex-start; }
.asc-zone--haut-centre { top: var(--asc-esp-12); left: 50%; transform: translateX(-50%); align-items: center; max-width: 46vw; }
.asc-zone--haut-droite { top: var(--asc-esp-12); right: var(--asc-esp-12); align-items: flex-end; }
.asc-zone--bas-gauche { bottom: var(--asc-esp-16); left: var(--asc-esp-16); align-items: flex-start; justify-content: flex-end; }
.asc-zone--bas-centre { bottom: var(--asc-esp-16); left: 50%; transform: translateX(-50%); align-items: center; max-width: 46vw; }
/* Les boutons d'action : tous ici, empilés, à la même largeur. */
.asc-zone--bas-droite { bottom: var(--asc-esp-16); right: var(--asc-esp-16); align-items: stretch; justify-content: flex-end; width: var(--asc-colonne-largeur); }
.asc-zone--bas-droite > .asc-btn,
.asc-zone--bas-droite > * > .asc-btn { width: 100%; }
.asc-zone--bas-droite > * { display: flex; flex-direction: column; align-items: stretch; gap: var(--asc-esp-8); }
.asc-zone--bas-droite > .asc-btn { flex-direction: row; }
.asc-zone--bas-droite > .asc-pegre-bouton { flex-direction: column; align-items: stretch; }
.asc-zone--bas-droite > [hidden] { display: none !important; }

/* La colonne en gros boutons (lot 1, règle 6 ; interface.js) : SAC, TÉLÉPHONE, PLAN, ICI, PLUS, une tuile par
   rangée, icône à gauche ; les boutons des modules attendent dans le tiroir caché. */
.asc-interface-tiroir { display: none !important; }
.asc-interface-colonne .asc-gb-grille[data-nombre] { grid-template-columns: minmax(0, 1fr); gap: var(--asc-esp-8); }
.asc-interface-colonne .asc-gb-tuile.asc-btn {
  flex-direction: row;
  justify-content: flex-start;
  gap: var(--asc-esp-10);
  min-height: var(--asc-dim-56);
  padding: var(--asc-esp-8) var(--asc-esp-12);
  font-size: var(--asc-texte-12);
  text-align: left;
}
.asc-interface-colonne .asc-gb-icone { width: var(--asc-dim-24); height: var(--asc-dim-24); }
/* Le bouton d'aide "?" (27/10/2026) : plus bas que les autres, en tête de colonne ; son texte se lit en grand. */
.asc-interface-colonne .asc-gb-tuile.asc-btn[data-tuile="aide"] { min-height: var(--asc-dim-36); justify-content: center; }
.asc-aide-texte { font-size: var(--asc-texte-12); line-height: 1.4; }
/* La fenêtre de PLUS et d'ICI : au centre, un en-tête commun, puis les gros boutons. */
.asc-interface-fenetre {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(var(--asc-fenetre-moyenne), calc(100vw - var(--asc-marge-ecran)));
  max-height: calc(100vh - var(--asc-dim-120));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-10);
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  z-index: var(--asc-plan-8);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}
.asc-interface-fenetre[hidden] { display: none !important; }

/* La barre de pièce (carte #62, modules/_portes.js) : titre de la pièce et LE bouton Sortir commun, sous les
   besoins. Le bouton n'est là que si une porte est ouverte pour le joueur. */
.asc-piece-barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--asc-esp-8);
  max-width: 100%;
}
.asc-piece-barre[hidden],
.asc-piece-barre [hidden] { display: none !important; }
.asc-piece-titre {
  padding: var(--asc-esp-7) var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.9);
  color: var(--asc-creme);
}
.asc-piece-choix {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
  flex-basis: 100%;
}
.asc-piece-choix-titre {
  padding: var(--asc-esp-5) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.9);
  color: var(--asc-creme);
  font-size: var(--asc-texte-11);
}

/* ------------------------------------------------------------------ les messages (messages.js, 02/11/2026) */
/* jeu.ui.message(type, texte) : une pile par type, au-dessus des zones ET des fenêtres. Refus en plein milieu,
   info / succès / erreur en bas au centre juste au-dessus du chat, alerte / annonce en haut au centre juste sous
   les bandeaux (hauteurs mesurées par interface.js). Un seul dessin de message, ses variantes par type. */
.asc-messages {
  position: absolute;
  inset: 0;
  z-index: var(--asc-plan-30);
  pointer-events: none;
}
.asc-msg-pile {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-6);
  width: min(var(--asc-fenetre-moyenne), calc(100vw - var(--asc-marge-ecran-24)));
  pointer-events: none;
}
.asc-msg-pile--centre { top: 50%; transform: translate(-50%, -50%); }
.asc-msg-pile--bas-centre { bottom: calc(var(--asc-bas-centre-h, 56px) + var(--asc-esp-16) + var(--asc-esp-8)); }
.asc-msg-pile--haut-centre { top: calc(var(--asc-haut-centre-h, 0px) + var(--asc-esp-12) + var(--asc-esp-8)); }
.asc-msg {
  max-width: 100%;
  box-sizing: border-box;
  padding: var(--asc-esp-8) var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.95);
  color: var(--asc-creme);
  font-weight: 700;
  font-size: var(--asc-texte-11);
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: var(--asc-ombre-4);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  pointer-events: auto;
  cursor: pointer;
}
.asc-msg--refus { padding: var(--asc-esp-12) var(--asc-esp-18); font-family: var(--asc-police-titres); font-size: var(--asc-texte-12); outline-color: var(--asc-flamboyant); }
.asc-msg--succes { outline-color: var(--asc-lagon-clair); }
.asc-msg--erreur { background: var(--asc-tole-rouge); outline-color: var(--asc-creme); }
.asc-msg--alerte { background: var(--asc-saumon); outline-color: var(--asc-creme); }
.asc-msg--annonce { background: var(--asc-flamboyant); outline-color: var(--asc-creme); font-family: var(--asc-police-titres); font-size: var(--asc-texte-17); }

/* Le bouton Menu : seulement sur téléphone (voir plus bas). */
.asc-interface-menu { display: none !important; }

/* ------------------------------------------------------------------ le menu en gros boutons (gros_boutons.js) */
/* Règle 6 du projet (carte #68) : toute fenêtre s'ouvre sur 2 à 6 gros boutons. Mode d'emploi : section 47.
   Une tuile = .asc-btn agrandi : icône pixel, un ou deux mots, le chiffre qui compte en gros. */
.asc-gb {
  /* Encres du composant (carte #76) : fond nuit par défaut, redéfinies plus bas pour un fond clair. */
  --asc-gb-encre-titre: var(--asc-theme-clair);
  --asc-gb-encre-note: var(--asc-peche);
  --asc-gb-encre-ligne: currentColor;
  --asc-gb-encre-valeur: var(--asc-lagon-clair);
  --asc-gb-encre-moins: var(--asc-saumon);
  --asc-gb-trait: var(--asc-ardoise-nuit);
  --asc-gb-gros-fond: rgba(var(--asc-nuit-profonde-rgb), 0.6);
  display: flex;
  flex-direction: column;
  gap: var(--asc-gb-ecart);
  min-width: 0;
  font-family: var(--asc-police-texte);
}
/* Sur un fond clair (écran du téléphone, panneau des jeux rétro, ou toute zone marquée .asc-gb--clair) : encres
   nuit, plus de texte crème ou pêche sur crème. Les tuiles gardent leur fond nuit, elles ne changent pas. */
.asc-gb--clair,
.asc-tel-ecran.asc-gb,
.asc-tel-ecran .asc-gb,
.asc-retro-panneau.asc-gb,
.asc-retro-panneau .asc-gb {
  --asc-gb-encre-titre: var(--asc-nuit);
  --asc-gb-encre-note: var(--asc-ardoise-nuit);
  --asc-gb-encre-ligne: var(--asc-nuit);
  --asc-gb-encre-valeur: var(--asc-nuit);
  --asc-gb-encre-moins: var(--asc-tole-rouge-sombre);
  --asc-gb-trait: var(--asc-ardoise);
  --asc-gb-gros-fond: var(--asc-nuit);
}
.asc-gb-barre { display: flex; align-items: center; gap: var(--asc-esp-10); }
.asc-gb-retour.asc-btn { min-height: var(--asc-dim-36); padding: var(--asc-esp-4) var(--asc-esp-12); font-size: var(--asc-texte-9); }
.asc-gb-titre {
  font-family: var(--asc-police-titres);
  font-weight: 800;
  font-size: var(--asc-texte-12);
  color: var(--asc-gb-encre-titre);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asc-gb-grille { display: grid; grid-template-columns: repeat(var(--asc-gb-colonnes), minmax(0, 1fr)); gap: var(--asc-gb-ecart); }
.asc-gb-grille[data-nombre="3"],
.asc-gb-grille[data-nombre="5"],
.asc-gb-grille[data-nombre="6"],
.asc-gb-grille[data-nombre="9"] { grid-template-columns: repeat(var(--asc-gb-colonnes-larges), minmax(0, 1fr)); }
.asc-gb-tuile.asc-btn {
  flex-direction: column;
  gap: var(--asc-esp-6);
  position: relative;
  min-height: var(--asc-gb-tuile-hauteur);
  padding: var(--asc-esp-10) var(--asc-esp-6);
  white-space: normal;
  text-align: center;
  font-size: var(--asc-texte-12);
  text-transform: uppercase;
}
.asc-gb-icone { width: var(--asc-gb-icone); height: var(--asc-gb-icone); fill: currentColor; flex: none; }
.asc-gb-libelle { line-height: 1.1; max-width: 100%; }
/* Trois tuiles par rangée : le mot le plus long (TÉLÉPORTATION) tient sur une ligne. */
.asc-gb-grille[data-nombre="3"] .asc-gb-tuile.asc-btn,
.asc-gb-grille[data-nombre="5"] .asc-gb-tuile.asc-btn,
.asc-gb-grille[data-nombre="6"] .asc-gb-tuile.asc-btn,
.asc-gb-grille[data-nombre="9"] .asc-gb-tuile.asc-btn { font-size: var(--asc-texte-9); }
.asc-gb-chiffre { font-size: var(--asc-texte-17); color: var(--asc-gb-chiffre); text-transform: none; }
.asc-gb-pastille {
  position: absolute;
  top: var(--asc-esp-4);
  right: var(--asc-esp-4);
  min-width: var(--asc-dim-22);
  padding: 0 var(--asc-esp-4);
  background: var(--asc-gb-pastille-fond);
  color: var(--asc-creme);
  font-size: var(--asc-texte-8);
  line-height: var(--asc-dim-22);
}
.asc-btn--principal .asc-gb-chiffre,
.asc-btn--secondaire .asc-gb-chiffre { color: inherit; }
/* Ergonomie (27/10/2026) : la ligne fine sous le chiffre (taille et rue d'un lot, raison d'une tuile grisée), et le
   haut d'une page (ce qui se lit avant les tuiles, le solde de la banque). */
.asc-gb-sous { font-size: var(--asc-texte-6); line-height: 1.2; text-transform: none; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.asc-gb-tuile.asc-btn:disabled .asc-gb-sous { opacity: 1; color: var(--asc-saumon); }
.asc-gb-haut { display: flex; flex-direction: column; gap: var(--asc-esp-6); margin-bottom: var(--asc-gb-ecart); }
/* Un écran d'action : le chiffre en gros, un champ, une rangée de boutons. */
.asc-gb-page { display: flex; flex-direction: column; gap: var(--asc-gb-ecart); min-width: 0; }
/* En colonne, un champ posé tel quel garde sa hauteur (sa base de 120px est une largeur, pas une hauteur). */
.asc-gb-page > .asc-bat-champ,
.asc-gb-page > .asc-bat-select { flex: 0 0 auto; }
.asc-gb-gros {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-2);
  padding: var(--asc-esp-10);
  background: var(--asc-gb-gros-fond);
  border-radius: var(--asc-rayon);
}
.asc-gb-gros-libelle { font-size: var(--asc-texte-9); color: var(--asc-peche); text-transform: uppercase; }
.asc-gb-gros-valeur { font-family: var(--asc-police-titres); font-weight: 800; font-size: var(--asc-texte-24); color: var(--asc-creme); }
.asc-gb-champ {
  width: 100%;
  min-height: var(--asc-gb-champ-hauteur);
  box-sizing: border-box;
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  outline: var(--asc-trait-fin) solid var(--asc-ardoise);
  font: inherit;
  font-size: var(--asc-texte-12);
}
.asc-gb-champ:focus { outline: var(--asc-liseret-neon); }
.asc-gb-rangee { display: flex; gap: var(--asc-esp-8); flex-wrap: wrap; }
.asc-gb-rangee > * { flex: 1 1 0; min-width: 0; }
.asc-gb-action.asc-btn { min-height: var(--asc-gb-champ-hauteur); }
.asc-gb-note { font-size: var(--asc-texte-8); color: var(--asc-gb-encre-note); }
.asc-gb-gros .asc-gb-note { color: var(--asc-peche); }
/* Une ligne de liste (relevé, joueurs) : libellé à gauche, valeur à droite. */
.asc-gb-ligne { display: flex; justify-content: space-between; gap: var(--asc-esp-8); padding: var(--asc-esp-4) 0; border-bottom: var(--asc-trait-fin) dashed var(--asc-gb-trait); font-size: var(--asc-texte-9); color: var(--asc-gb-encre-ligne); }
.asc-gb-ligne-gauche { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.asc-gb-ligne-droite { white-space: nowrap; font-weight: 800; color: var(--asc-gb-encre-valeur); }
.asc-gb-ligne.is-moins .asc-gb-ligne-droite { color: var(--asc-gb-encre-moins); }
.asc-gb-liste { display: flex; flex-direction: column; max-height: var(--asc-dim-260); overflow-y: auto; }
@media (max-width: 760px), (max-height: 520px) {
  .asc-gb-grille[data-nombre] { grid-template-columns: repeat(var(--asc-gb-colonnes), minmax(0, 1fr)); }
  .asc-gb-tuile.asc-btn { min-height: var(--asc-gb-tuile-hauteur-mobile); font-size: var(--asc-texte-9); }
  .asc-gb-icone { width: var(--asc-gb-icone-mobile); height: var(--asc-gb-icone-mobile); }
}

/* ------------------------------------------------------------------ téléphone : interface repliable */
@media (max-width: 760px), (max-height: 520px) {
  .asc-interface-menu { display: inline-flex !important; }
  /* Le chat prend toute la largeur en bas ; joystick et boutons se posent juste au-dessus
     (--asc-bas-centre-h : hauteur du bas au centre, mesurée par interface.js). */
  .asc-zone--bas-centre { left: var(--asc-esp-12); right: var(--asc-esp-12); bottom: var(--asc-esp-12); transform: none; max-width: none; align-items: stretch; }
  .asc-zone--bas-centre > * { width: auto !important; }
  .asc-zone--bas-gauche,
  .asc-zone--bas-droite { bottom: calc(var(--asc-bas-centre-h, 56px) + var(--asc-esp-20)); }
  .asc-zone--bas-droite { width: 148px; right: var(--asc-esp-12); gap: var(--asc-esp-6); }
  .asc-interface-colonne .asc-gb-tuile.asc-btn { min-height: var(--asc-dim-44); font-size: var(--asc-texte-9); }
  .asc-interface-colonne .asc-gb-icone { width: var(--asc-dim-20); height: var(--asc-dim-20); }
  .asc-zone--haut-centre { max-width: calc(100vw - var(--asc-dim-24)); }
  /* Les retours au-dessus du joystick et du bouton Menu, pas dessus (hauteur des côtés mesurée par interface.js). */
  .asc-msg-pile--bas-centre { bottom: calc(var(--asc-bas-centre-h, 56px) + var(--asc-esp-20) + var(--asc-bas-cotes-h, 0px) + var(--asc-esp-8)); }
  /* Les refus un peu plus haut que le milieu : la pile des retours, posée au-dessus du joystick, ne les touche pas. */
  .asc-msg-pile--centre { top: 40%; }
  .asc-btn { min-height: var(--asc-dim-44); font-size: var(--asc-texte-9); padding: var(--asc-esp-6) var(--asc-esp-10); }
  /* L'aide au clavier ne sert à rien au doigt. */
  .asc-zone .asc-aide { display: none !important; }
  /* Menu replié : seuls le joystick, les messages, le chat et le bouton Menu restent à l'écran. */
  .asc-interface:not(.is-ouvert) .asc-zone--bas-droite > :not(.asc-interface-menu),
  /* La barre de pièce (bouton Sortir) reste visible menu replié : c'est la seule chose en haut à gauche. */
  .asc-interface:not(.is-ouvert) .asc-zone--haut-gauche > :not(.asc-piece-barre),
  .asc-interface:not(.is-ouvert) .asc-zone--haut-droite,
  .asc-interface:not(.is-ouvert) .asc-zone--bas-gauche > :not(.asc-joystick) { display: none !important; }
  /* Menu ouvert : un voile sombre derrière les boutons, pour les lire sur la ville. */
  .asc-interface.is-ouvert .asc-zone--bas-droite {
    padding: var(--asc-esp-8);
    background: rgba(var(--asc-nuit-profonde-rgb), 0.85);
    outline: var(--asc-liseret-neon);
    outline-offset: var(--asc-liseret-decalage);
  }
}


/* ================================================================================================
   MODULE CIEL  (ex-ciel.css)
   ================================================================================================ */

/* Heure du jeu et météo (chantier v2-5) : la pastille de l'heure et le bandeau des événements, en haut au
   centre, sous la ligne d'aide de la page (.asc-aide). Injectée par modules/_ciel.js (import ?raw). */

.asc-ciel-heure {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--asc-plan-5);
  padding: var(--asc-esp-5) var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.92);
  color: var(--asc-creme);
  font-weight: 800;
  font-size: var(--asc-texte-11);
  white-space: nowrap;
  box-shadow: var(--asc-ombre-8);
  pointer-events: none;
}

.asc-ciel-heure.is-nuit {
  background: rgba(var(--asc-bleu-nuit-rgb), 0.92);
  color: var(--asc-sable);
}

.asc-ciel-bandeau {
  position: absolute;
  top: var(--asc-esp-84);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--asc-plan-5);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
  width: min(var(--asc-dim-520), calc(100% - var(--asc-dim-32)));
  pointer-events: none;
}

.asc-ciel-bandeau[hidden] {
  display: none;
}

.asc-ciel-bandeau-ligne {
  padding: var(--asc-esp-7) var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  font-weight: 800;
  font-size: var(--asc-texte-14);
  text-align: center;
  box-shadow: 0 3px 0 rgba(var(--asc-nuit-profonde-rgb), 0.22);
}

.asc-ciel-bandeau-ligne.is-cyclone {
  background: var(--asc-tole-rouge);
  color: var(--asc-creme);
  animation: asc-ciel-clignote 1.2s steps(2, end) infinite;
}

.asc-ciel-bandeau-ligne.is-eruption {
  background: var(--asc-ciel-braise);
  color: var(--asc-nuit-profonde);
}

.asc-ciel-bandeau-ligne.is-fete {
  background: var(--asc-case-jaune);
  color: var(--asc-nuit-profonde);
}

@keyframes asc-ciel-clignote {
  50% {
    background: var(--asc-tole-rouge);
  }
}

@media (max-width: 600px) {
  .asc-ciel-heure {
    top: auto;
    bottom: var(--asc-esp-160);
    font-size: var(--asc-texte-6);
  }

  .asc-ciel-bandeau {
    top: var(--asc-esp-96);
  }

  .asc-ciel-bandeau-ligne {
    font-size: var(--asc-texte-8);
  }
}


/* ================================================================================================
   MODULE CONSOLES  (ex-consoles.css)
   ================================================================================================ */

/* Consoles et cartouches (chantier v3-1) : fenêtre Ludothèque (ma ludothèque, boutique de jeux, marché de
   collection), écran "aucun jeu installé", message du jeu. Chargé par modules/_consoles.js (?v = script compilé). */

.asc-cons-fenetre {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-8);
  display: flex;
  flex-direction: column;
  width: min(var(--asc-fenetre-large), calc(100vw - var(--asc-marge-ecran)));
  max-height: calc(100vh - var(--asc-dim-96));
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: 0 6px 0 rgba(var(--asc-nuit-profonde-rgb), 0.25), 0 12px 32px rgba(var(--asc-nuit-profonde-rgb), 0.35);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  overflow: hidden;
}

.asc-cons-fenetre[hidden] {
  display: none;
}

.asc-cons-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-12);
  padding: var(--asc-esp-12) var(--asc-esp-16);
  background: var(--asc-ardoise-nuit);
  color: var(--asc-creme);
}

.asc-cons-contenu {
  padding: var(--asc-esp-12) var(--asc-esp-16) var(--asc-esp-16);
  overflow-y: auto;
}

.asc-cons-contenu h4 {
  margin: var(--asc-esp-14) 0 var(--asc-esp-6);
  font-size: var(--asc-texte-12);
}

.asc-cons-aide,
.asc-cons-vide {
  margin: 0 0 var(--asc-esp-10);
  font-size: var(--asc-texte-9);
  color: var(--asc-creme);
}

.asc-cons-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-8) 0;
  border-bottom: var(--asc-trait-fin) solid var(--asc-creme);
}

.asc-cons-ligne.is-edition .asc-cons-nom > span:nth-child(2) {
  color: var(--asc-case-jaune);
}

.asc-cons-nom {
  flex: 1 1 220px;
  min-width: 0;
  font-weight: 700;
}

.asc-cons-detail {
  font-size: var(--asc-texte-6);
  font-weight: 400;
  color: var(--asc-creme);
}

.asc-cons-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--asc-esp-6);
}

.asc-cons-prix {
  font-weight: 800;
  white-space: nowrap;
}

/* L'étiquette : une petite cartouche (rectangle) ou un CD-ROM (rond), à la couleur du jeu. */
.asc-cons-etiquette {
  display: inline-block;
  width: var(--asc-dim-12);
  height: var(--asc-dim-14);
  margin-right: var(--asc-esp-8);
  vertical-align: -2px;
  border: var(--asc-trait-moyen) solid rgba(var(--asc-basalte-rgb), 0.35);
  border-radius: var(--asc-rayon);
  background: var(--asc-cons-couleur, var(--asc-brume));
}

.asc-cons-etiquette.is-cd {
  width: var(--asc-dim-14);
  border-radius: var(--asc-rond);
}

.asc-cons-btn--discret {
  text-decoration: underline;
}

.asc-cons-btn--large {
  display: block;
  width: 100%;
  margin-bottom: var(--asc-esp-8);
}

.asc-cons-formulaire {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--asc-esp-8);
  width: 100%;
}

.asc-cons-champ {
  flex: 1 1 140px;
  min-height: var(--asc-dim-36);
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-lagon-nuit);
  border-radius: var(--asc-rayon);
  font: inherit;
}

.asc-cons-histo {
  padding: var(--asc-esp-4) 0;
  font-size: var(--asc-texte-9);
}

/* L'écran de la console quand aucun jeu n'est installé. */
.asc-cons-ecran {
  text-align: center;
}

.asc-cons-tele {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--asc-dim-120);
  margin: var(--asc-esp-4) auto var(--asc-esp-12);
  max-width: var(--asc-dim-260);
  border: 8px solid var(--asc-ombre-violette);
  border-radius: var(--asc-rayon);
  background: var(--asc-brume);
  color: var(--asc-nuit-profonde);
  font-family: monospace;
  font-weight: 800;
  text-transform: uppercase;
  image-rendering: pixelated;
}

.asc-cons-tele.is-cd {
  background: var(--asc-nuit);
  color: var(--asc-case-bleue);
}
/* Le cadre du jeu de test (porte de test installerJeuDeTest). */
.asc-cons-test {
  position: absolute;
  inset: 25%;
  z-index: var(--asc-plan-10);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-weight: 800;
}

@media (max-width: 600px) {
  .asc-cons-fenetre {
    top: 0;
    left: 0;
    transform: none;
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: var(--asc-rayon);
  }
}


/* ================================================================================================
   MODULE JEUX RETRO  (ex-jeux_retro.css)
   ================================================================================================ */

/*
 * Jeux rétro (chantier v3-2) : le panneau, la console (écran pixel net, croix et boutons tactiles), le menu
 * des jeux, les meilleurs scores, le bandeau des invitations. Injecté par
 * Resources/game/src/modules/_jeux_retro.js (import ?raw, livré dans le script compilé : jamais d'ancienne
 * version en cache). Même style que les panneaux des métiers : blanc cassé, coins ronds, ombre plate.
 */
.asc-retro-panneau {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--asc-dim-560);
  max-width: calc(100vw - var(--asc-dim-16));
  max-height: calc(100vh - var(--asc-dim-16));
  overflow: auto;
  box-sizing: border-box;
  padding: var(--asc-esp-12) var(--asc-esp-14);
  border-radius: 16px;
  background: #fffaf0;
  color: #2b3a4a;
  border: var(--asc-trait-epais) solid #2b3a4a;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3);
  z-index: var(--asc-plan-9);
  touch-action: none;
  user-select: none;
}

.asc-retro-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
  margin-bottom: var(--asc-esp-8);
  font-weight: 900;
  font-size: var(--asc-texte-18);
}

.asc-retro-btn {
  margin: var(--asc-esp-2);
}

.asc-retro-zone {
  display: flex;
  justify-content: center;
}

/* La console : coque arrondie, vitre sombre, écran pixel net. */
.asc-retro-console {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-10);
  padding: var(--asc-esp-14) var(--asc-esp-14) var(--asc-esp-12);
  border-radius: 18px 18px 40px 18px;
  background: #2ec4b6;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 3px 0 rgba(0, 0, 0, 0.25);
}

.asc-retro-console--console_b {
  border-radius: var(--asc-rayon-14);
  background: #3d3552;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.35), 0 3px 0 rgba(0, 0, 0, 0.25);
}

.asc-retro-vitre {
  position: relative;
  padding: var(--asc-esp-10);
  border-radius: 10px 10px 22px 10px;
  background: #1f2a33;
}

.asc-retro-console--console_b .asc-retro-vitre {
  border-radius: 8px;
  background: #0d0b14;
}

.asc-retro-ecran {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
}

.asc-retro-voile {
  position: absolute;
  inset: var(--asc-esp-10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--asc-esp-6);
  background: rgba(10, 14, 20, 0.6);
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.asc-retro-voile[hidden] {
  display: none;
}

.asc-retro-voile-titre {
  font-weight: 900;
  font-size: var(--asc-texte-21);
  text-shadow: 0 2px 0 #000;
}

.asc-retro-voile-sous {
  font-weight: 800;
  font-size: var(--asc-texte-14);
  color: #ffd166;
}

.asc-retro-commandes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--asc-esp-12);
}

.asc-retro-marque {
  flex: 1;
  text-align: center;
  font-size: var(--asc-texte-4);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
}

/* La croix : quatre touches posées en plus. */
.asc-retro-croix {
  display: grid;
  grid-template-columns: 34px 34px 34px;
  grid-template-rows: 34px 34px 34px;
}

.asc-retro-touche {
  border: 0;
  padding: 0;
  background: #1f2a33;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
  touch-action: none;
}

.asc-retro-touche--haut { grid-column: 2; grid-row: 1; border-radius: 6px 6px 0 0; }
.asc-retro-touche--gauche { grid-column: 1; grid-row: 2; border-radius: 6px 0 0 6px; }
.asc-retro-touche--droite { grid-column: 3; grid-row: 2; border-radius: 0 6px 6px 0; }
.asc-retro-touche--bas { grid-column: 2; grid-row: 3; border-radius: 0 0 6px 6px; }

.asc-retro-boutons {
  display: flex;
  gap: var(--asc-esp-10);
  transform: rotate(-20deg);
}

.asc-retro-bouton {
  width: var(--asc-dim-46);
  height: var(--asc-dim-46);
  border: 0;
  border-radius: var(--asc-rond);
  background: #e63946;
  color: #fff;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
  touch-action: none;
}

.asc-retro-bouton--b {
  background: #ffb703;
  color: #2b3a4a;
  margin-top: var(--asc-esp-18);
}

.asc-retro-touche.is-appui,
.asc-retro-bouton.is-appui {
  transform: translateY(2px);
  box-shadow: none;
  filter: brightness(1.2);
}

/* Le menu des jeux. */
.asc-retro-carte {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-10);
  margin-bottom: var(--asc-esp-8);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.asc-retro-carte-info {
  flex: 1 1 220px;
}

.asc-retro-carte-titre {
  font-weight: 900;
}

.asc-retro-carte-console,
.asc-retro-carte-desc {
  font-size: var(--asc-texte-8);
  color: #5c6b7a;
}

.asc-retro-carte-record {
  font-size: var(--asc-texte-8);
  font-weight: 800;
  color: #c47f2c;
}

.asc-retro-score {
  font-size: var(--asc-texte-25);
  font-weight: 900;
  text-align: center;
  margin: var(--asc-esp-4) 0 var(--asc-esp-8);
}

.asc-retro-message {
  margin: var(--asc-esp-4) 0;
  font-weight: 700;
}

.asc-retro-message.is-erreur {
  color: #c1121f;
}

.asc-retro-message.is-bravo {
  color: #2d6a4f;
}

.asc-retro-sous-titre {
  margin: var(--asc-esp-10) 0 var(--asc-esp-4);
  font-size: var(--asc-texte-16);
  font-weight: 900;
}

.asc-retro-records {
  margin: 0;
  padding: 0;
  list-style: none;
}

.asc-retro-records li {
  display: flex;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-3) var(--asc-esp-6);
  border-radius: 6px;
}

.asc-retro-records li:nth-child(odd) {
  background: rgba(43, 58, 74, 0.06);
}

.asc-gb-ligne.asc-retro-ligne-moi {
  font-weight: 800;
}

.asc-retro-records li.is-moi {
  background: #ffd166;
}

.asc-retro-records-rang {
  width: 2em;
  font-weight: 900;
}

.asc-retro-records-nom {
  flex: 1;
}

.asc-retro-records-score {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.asc-retro-pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--asc-esp-6);
  margin-top: var(--asc-esp-10);
}

.asc-retro-aide {
  margin: var(--asc-esp-8) 0 0;
  font-size: var(--asc-texte-6);
  color: #5c6b7a;
}

.asc-retro-champ {
  width: 100%;
  box-sizing: border-box;
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid #2b3a4a;
  border-radius: 10px;
  font: inherit;
}

.asc-retro-liste {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.asc-retro-defi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--asc-esp-6);
  padding: var(--asc-esp-4) 0;
  font-size: var(--asc-texte-11);
}

/* Le bandeau : invitation à un duel, résultat, refus. */
.asc-retro-bandeau {
  position: absolute;
  top: var(--asc-esp-96);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--asc-esp-8);
  max-width: calc(100vw - var(--asc-dim-32));
  padding: var(--asc-esp-8) var(--asc-esp-14);
  border-radius: var(--asc-rayon-14);
  background: #ffd166;
  color: #2b3a4a;
  font-weight: 800;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
  z-index: var(--asc-plan-8);
}

.asc-retro-bandeau[hidden] {
  display: none;
}

.asc-retro-bandeau.is-erreur {
  background: #ffb3b8;
}

@media (max-width: 600px) {
  .asc-retro-panneau {
    padding: var(--asc-esp-8);
  }

  .asc-retro-console {
    padding: var(--asc-esp-10) var(--asc-esp-8);
  }

  .asc-retro-vitre {
    padding: var(--asc-esp-6);
  }

  .asc-retro-voile {
    inset: var(--asc-esp-6);
  }
}


/* ================================================================================================
   MODULE MONDE VIVANT  (ex-monde_vivant.css)
   ================================================================================================ */

/* Monde vivant (chantier v3-7) : pastilles de la saison et du nouveau protégé, phrases des passants,
   badge de la fiche. Chargée par modules/_monde_vivant.js avec ?v=<script compilé>. Préfixe asc-mv-. */

.asc-mv-hud {
  position: absolute;
  top: var(--asc-esp-52);
  left: var(--asc-esp-12);
  z-index: var(--asc-plan-5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--asc-esp-6);
  pointer-events: none;
}

.asc-mv-saison,
.asc-mv-nouveau {
  padding: var(--asc-esp-4) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  font-weight: 800;
  font-size: var(--asc-texte-7);
  white-space: nowrap;
  box-shadow: var(--asc-ombre-8);
}

.asc-mv-saison {
  background: rgba(var(--asc-nuit-rgb), 0.92);
  color: var(--asc-creme);
}

.asc-mv-saison.is-seche {
  background: rgba(var(--asc-sable-rgb), 0.95);
  color: var(--asc-nuit-profonde);
}

.asc-mv-saison.is-pluies {
  background: rgba(var(--asc-ecume-rgb), 0.95);
  color: var(--asc-nuit-profonde);
}

.asc-mv-nouveau {
  border: 0;
  background: var(--asc-lagon-clair);
  color: var(--asc-creme);
  cursor: pointer;
  pointer-events: auto;
}

.asc-mv-saison[hidden],
.asc-mv-nouveau[hidden] {
  display: none;
}
.asc-mv-bulles {
  position: absolute;
  inset: 0;
  z-index: var(--asc-plan-4);
  pointer-events: none;
  overflow: hidden;
}

.asc-mv-bulle {
  position: absolute;
  top: 0;
  left: 0;
  max-width: var(--asc-dim-220);
  padding: var(--asc-esp-4) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-basalte);
  font-size: var(--asc-texte-8);
  box-shadow: var(--asc-ombre-7);
}

.asc-mv-fiche {
  margin-top: var(--asc-esp-8);
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
}

.asc-mv-fiche-badge {
  font-weight: 800;
}

.asc-mv-fiche-aide {
  font-size: var(--asc-texte-11);
}

.asc-mv-fiche-bouton {
  margin-top: var(--asc-esp-6);
  min-height: var(--asc-dim-36);
  padding: var(--asc-esp-4) var(--asc-esp-12);
  border: var(--asc-trait-fin) solid var(--asc-lagon);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-ecume);
  font-weight: 700;
  cursor: pointer;
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

@media (max-width: 600px) {
  .asc-mv-hud {
    top: 48px;
  }

  .asc-mv-fiche-bouton {
    min-height: var(--asc-dim-44);
  }
}


/* ================================================================================================
   MODULE TELEPHONE  (ex-telephone.css)
   ================================================================================================ */

/* Le téléphone du joueur (chantier v2-5) : bouton du HUD, notification, téléphone et ses apps. Injectée
   par modules/_telephone.js (import ?raw). Sur mobile (moins de 600 px), le téléphone prend tout l'écran
   et chaque bouton fait au moins 44 px de haut (zone tactile). */

.asc-tel-bouton {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
}

/* Le petit téléphone dessiné en CSS, à gauche du libellé. */
.asc-tel-bouton-icone {
  width: var(--asc-dim-12);
  height: var(--asc-dim-20);
  border: var(--asc-trait-moyen) solid var(--asc-ombre-violette);
  border-radius: var(--asc-rayon);
  box-shadow: inset 0 -4px 0 var(--asc-nuit-profonde);
}

.asc-tel-pastille {
  min-width: var(--asc-dim-20);
  height: var(--asc-dim-20);
  padding: 0 var(--asc-esp-6);
  border-radius: var(--asc-rayon);
  background: var(--asc-tole-rouge);
  color: var(--asc-creme);
  font-size: var(--asc-texte-6);
  line-height: 20px;
  text-align: center;
}

.asc-tel-pastille[hidden] {
  display: none;
}

.asc-tel-notif {
  position: absolute;
  right: var(--asc-esp-16);
  bottom: var(--asc-esp-124);
  z-index: var(--asc-plan-7);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--asc-esp-2);
  width: min(var(--asc-fenetre-300), calc(100vw - var(--asc-marge-ecran)));
  padding: var(--asc-esp-10) var(--asc-esp-14);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-ombre-violette);
  color: var(--asc-creme);
  font: inherit;
  text-align: left;
  box-shadow: 0 6px 18px rgba(var(--asc-nuit-profonde-rgb), 0.3);
  cursor: pointer;
  animation: asc-tel-arrivee 0.25s ease-out;
}

.asc-tel-notif[hidden] {
  display: none;
}

.asc-tel-notif span {
  overflow: hidden;
  max-width: 100%;
  font-size: var(--asc-texte-11);
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}

@keyframes asc-tel-arrivee {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* Le téléphone : coque sombre, écran clair. */
.asc-tel {
  position: absolute;
  /* À gauche de la colonne de gros boutons, jamais dessus (revue du layout, 02/11/2026). */
  right: calc(var(--asc-colonne-largeur) + var(--asc-esp-16) + var(--asc-esp-16));
  bottom: var(--asc-esp-124);
  z-index: var(--asc-plan-8);
  display: flex;
  flex-direction: column;
  width: 320px;
  /* Sous les bandeaux du haut au centre (hauteur mesurée par interface.js), jamais dessus. */
  height: min(580px, calc(100vh - var(--asc-dim-150)), calc(100vh - var(--asc-esp-124) - var(--asc-haut-centre-h, 0px) - var(--asc-dim-24)));
  padding: var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-basalte);
  box-shadow: 0 10px 30px rgba(var(--asc-nuit-profonde-rgb), 0.4);
  color: var(--asc-creme);
  -webkit-user-select: none;
  user-select: none;
}

.asc-tel[hidden] {
  display: none;
}

.asc-tel-statut {
  display: flex;
  justify-content: space-between;
  padding: var(--asc-esp-2) var(--asc-esp-14) var(--asc-esp-8);
  color: var(--asc-creme);
  font-size: var(--asc-texte-8);
  font-weight: 800;
}

/* La croix est à gauche de la barre d'état (carte #78) : la météo reste au bord droit. */
.asc-tel-statut-meteo {
  margin-left: auto;
}

.asc-tel-ecran {
  flex: 1;
  overflow-y: auto;
  padding: var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  -webkit-overflow-scrolling: touch;
}

.asc-tel-nav {
  display: flex;
  gap: var(--asc-esp-6);
  padding-top: var(--asc-esp-8);
}

.asc-tel-nav-bouton {
  flex: 1;
  min-height: var(--asc-dim-44);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-ombre-violette);
  color: var(--asc-creme);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-tel-nav-bouton.is-accueil {
  background: var(--asc-bleu-nuit);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

/* L'accueil : la grille des apps. */
.asc-tel-apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--asc-esp-12);
}

.asc-tel-app {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-6);
  padding: var(--asc-esp-6) var(--asc-esp-2);
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.asc-tel-app .asc-tel-pastille {
  position: absolute;
  top: 0;
  right: var(--asc-esp-10);
}

.asc-tel-app-icone {
  display: grid;
  place-items: center;
  width: var(--asc-dim-56);
  height: var(--asc-dim-56);
  border-radius: var(--asc-rayon);
  background: var(--asc-brume);
  color: var(--asc-creme);
  font-size: var(--asc-texte-24);
  font-weight: 900;
  box-shadow: var(--asc-ombre-1);
}

.asc-tel-app-icone.is-messages { background: var(--asc-neon-cyan); }
.asc-tel-app-icone.is-contacts { background: var(--asc-case-bleue); }
.asc-tel-app-icone.is-annonces { background: var(--asc-soleil); }
.asc-tel-app-icone.is-police { background: var(--asc-ardoise-nuit); }
.asc-tel-app-icone.is-plan { background: var(--asc-case-verte); }

.asc-tel-app-nom {
  font-size: var(--asc-texte-7);
  font-weight: 700;
  text-align: center;
}

.asc-tel-notifs {
  margin-top: var(--asc-esp-16);
}

.asc-tel-notifs-ligne {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--asc-esp-6);
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  font-size: var(--asc-texte-10);
}

/* Écrans des apps. */
.asc-tel-titre {
  margin: 0 0 var(--asc-esp-10);
  font-size: var(--asc-texte-18);
  font-weight: 900;
}

.asc-tel-message {
  margin: 0 0 var(--asc-esp-8);
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-ecume);
  font-size: var(--asc-texte-11);
}

.asc-tel-message.is-erreur {
  background: var(--asc-creme);
}

.asc-tel-vide,
.asc-tel-aide {
  color: var(--asc-creme);
  font-size: var(--asc-texte-10);
}

.asc-tel-erreur {
  color: var(--asc-saumon);
}

.asc-tel-liste {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
}

.asc-tel-ligne {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: var(--asc-dim-44);
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.asc-tel-ligne .asc-tel-pastille {
  position: absolute;
  bottom: var(--asc-esp-8);
  right: var(--asc-esp-8);
}

/* La pastille des non lus en bas à droite, à côté de l'aperçu (elle couvrait l'heure, 27/10/2026). */
.asc-tel-ligne:has(.asc-tel-pastille) .asc-tel-ligne-texte {
  padding-right: var(--asc-dim-32);
}

.asc-tel-ligne-haut {
  display: flex;
  justify-content: space-between;
  gap: var(--asc-esp-8);
}

.asc-tel-ligne-texte {
  overflow: hidden;
  color: var(--asc-creme);
  font-size: var(--asc-texte-10);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asc-tel-zone.is-ici {
  background: var(--asc-creme);
  cursor: default;
}

.asc-tel-champ {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--asc-dim-44);
  margin-bottom: var(--asc-esp-8);
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-lagon-nuit);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font: inherit;
  font-size: var(--asc-texte-17);
  -webkit-user-select: text;
  user-select: text;
}

textarea.asc-tel-champ {
  min-height: 80px;
  resize: vertical;
}

.asc-tel-etiquette {
  display: block;
  margin-bottom: var(--asc-esp-4);
  font-size: var(--asc-texte-8);
  font-weight: 700;
}

.asc-tel-action {
  min-height: var(--asc-dim-44);
  margin-bottom: var(--asc-esp-8);
  padding: var(--asc-esp-8) var(--asc-esp-14);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-bleu-nuit);
  color: var(--asc-creme);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-tel-action.is-second {
  background: var(--asc-brume);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-tel-action.is-danger,
.asc-tel-mini.is-danger {
  background: var(--asc-tole-rouge);
  color: var(--asc-creme);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-tel-action.is-grand {
  width: 100%;
  font-size: var(--asc-texte-19);
}

.asc-tel-mini {
  min-height: var(--asc-dim-36);
  padding: var(--asc-esp-4) var(--asc-esp-10);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  font: inherit;
  font-size: var(--asc-texte-8);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.asc-tel-lien {
  padding: 0;
  border: 0;
  background: none;
  color: var(--asc-saumon);
  font: inherit;
  font-size: var(--asc-texte-5);
  text-decoration: underline;
  cursor: pointer;
}

.asc-tel-rangee {
  display: flex;
  flex-wrap: wrap;
  gap: var(--asc-esp-6);
}

.asc-tel-saisie {
  display: flex;
  gap: var(--asc-esp-6);
  margin-top: var(--asc-esp-8);
}

.asc-tel-saisie .asc-tel-champ {
  flex: 1;
  margin-bottom: 0;
}

.asc-tel-saisie .asc-tel-action {
  margin-bottom: 0;
}

/* Le fil d'une conversation. */
.asc-tel-fil {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
  max-height: 340px;
  overflow-y: auto;
}

.asc-tel-bulle {
  align-self: flex-start;
  max-width: 80%;
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  font-size: var(--asc-texte-13);
  overflow-wrap: anywhere;
  -webkit-user-select: text;
  user-select: text;
}

.asc-tel-bulle.is-moi {
  align-self: flex-end;
  border-radius: var(--asc-rayon);
  background: var(--asc-bleu-nuit);
  color: var(--asc-creme);
}

.asc-tel-bulle small {
  display: block;
  opacity: var(--asc-opacite-70);
  font-size: var(--asc-texte-4);
}

.asc-tel-signale {
  color: var(--asc-saumon);
}

.asc-tel-signalement {
  display: flex;
  gap: var(--asc-esp-4);
  margin-top: var(--asc-esp-4);
}

.asc-tel-signalement .asc-tel-champ {
  min-height: var(--asc-dim-36);
  margin: 0;
  padding: var(--asc-esp-4) var(--asc-esp-8);
}

/* Contacts. */
.asc-tel-contact {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
}

.asc-tel-point {
  flex: none;
  width: var(--asc-dim-10);
  height: var(--asc-dim-10);
  border-radius: var(--asc-rond);
  background: var(--asc-nuit);
}

.asc-tel-point.is-en-ligne {
  background: var(--asc-feuille);
}

.asc-tel-contact-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.asc-tel-contact-info small {
  color: var(--asc-creme);
}

.asc-tel-contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--asc-esp-4);
}

.asc-tel-badge {
  margin-left: var(--asc-esp-6);
  padding: var(--asc-esp-1) var(--asc-esp-6);
  border-radius: var(--asc-rayon);
  background: var(--asc-case-jaune);
  color: var(--asc-nuit-profonde);
  font-size: var(--asc-texte-4);
}

/* Annonces. */
.asc-tel-filtres {
  display: flex;
  gap: var(--asc-esp-6);
  margin: var(--asc-esp-4) 0 var(--asc-esp-10);
  overflow-x: auto;
}

.asc-tel-filtre {
  flex: none;
  min-height: var(--asc-dim-36);
  padding: var(--asc-esp-4) var(--asc-esp-12);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  font: inherit;
  font-size: var(--asc-texte-8);
  font-weight: 700;
  cursor: pointer;
}

.asc-tel-filtre.is-actif {
  background: var(--asc-ombre-violette);
  color: var(--asc-creme);
}

.asc-tel-annonce {
  padding: var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
}

.asc-tel-annonce p {
  margin: var(--asc-esp-6) 0;
  font-size: var(--asc-texte-11);
  overflow-wrap: anywhere;
}

.asc-tel-annonce small {
  color: var(--asc-creme);
}

.asc-tel-prix {
  color: var(--asc-lagon-clair);
  font-weight: 800;
  white-space: nowrap;
}

.asc-tel-statut-annonce {
  display: block;
  margin: var(--asc-esp-4) 0;
}

/* Journal de la gendarmerie (guichet du bâtiment). */
.asc-tel-journal-ligne {
  padding: var(--asc-esp-6) 0;
  border-bottom: var(--asc-trait-fin) solid var(--asc-creme);
  font-size: var(--asc-texte-11);
}

@media (max-width: 600px) {

  .asc-tel-bouton-libelle {
    display: none;
  }

  .asc-tel-notif {
    right: var(--asc-esp-12);
    bottom: 116px;
  }

  /* Sur téléphone, le téléphone du jeu prend tout l'écran. */
  .asc-tel {
    inset: 0;
    width: auto;
    height: auto;
    padding: max(var(--asc-esp-8), env(safe-area-inset-top)) var(--asc-esp-8) max(var(--asc-esp-8), env(safe-area-inset-bottom));
    border-radius: var(--asc-rayon);
  }

  .asc-tel-fil {
    max-height: none;
  }
}


/* Lot 1 des interfaces simples (règle 6) : sur l'écran clair du téléphone, les encres des gros boutons viennent du
   composant (.asc-gb, encres pour fond clair, carte #76). */
.asc-tel-ecran .asc-tel-zone-texte { min-height: var(--asc-dim-90); resize: vertical; }
.asc-tel-ligne.asc-tel-contact { flex-direction: row; }

/* ================================================================================================
   MODULE ARCADE  (ex-arcade.css)
   ================================================================================================ */

/* Salle d'arcade et tournois (chantier v3-3) : écran de la borne pendant une partie, tableaux des records
   et des classements, messages. Le panneau du guichet lui-même est celui des bâtiments (batiments.css).
   Chargé par Resources/game/src/modules/arcade.js (balise link, ?v = nom du script compilé). */

[class^="asc-arc-"][hidden] {
  display: none !important;
}

/* L'écran de la borne : un voile sombre, le jeu rétro au milieu. */
.asc-arc-ecran {
  position: absolute;
  inset: 0;
  z-index: var(--asc-plan-20);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--asc-esp-10);
  padding: var(--asc-esp-16);
  background: rgba(var(--asc-basalte-rgb), 0.86);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-arc-ecran-tete {
  display: flex;
  gap: var(--asc-esp-12);
  align-items: baseline;
  color: var(--asc-lagon-clair);
  font-weight: 800;
  text-shadow: 0 0 6px var(--asc-neon-rose);
}

.asc-arc-ecran-jeu {
  position: relative;
  width: min(var(--asc-fenetre-640), calc(100vw - var(--asc-marge-ecran)));
  height: min(var(--asc-dim-480), calc(100vh - var(--asc-dim-120)));
  border: var(--asc-trait-gras) solid var(--asc-bleu-nuit);
  border-radius: var(--asc-rayon);
  background: var(--asc-basalte);
  overflow: hidden;
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

/* Menu en gros boutons du guichet (carte #73) : la ligne du joueur dans les records et les classements. */
.asc-gb-ligne.asc-arc-ligne-moi {
  font-weight: 800;
  color: var(--asc-sable);
}

/* ================================================================================================
   MODULE CASINO  (carte #48)
   ================================================================================================ */

/* Le casino : machines à sous, roulette, blackjack et poker, joués dans le panneau du guichet des bâtiments
   (asc-bat-panneau), devant la table. Chargé par Resources/game/src/modules/casino.js. */

[class^="asc-cas-"][hidden] {
  display: none !important;
}

.asc-cas-aide,
.asc-cas-bilan {
  font-size: var(--asc-texte-11);
}

.asc-cas-message {
  min-height: var(--asc-dim-16);
  font-weight: 800;
  color: var(--asc-lampadaire);
}

.asc-cas-mise {
  width: var(--asc-dim-90);
}

.asc-cas-bloc {
  padding-top: var(--asc-esp-8);
  border-top: var(--asc-trait-fin) solid var(--asc-creme);
}

.asc-cas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--asc-texte-11);
}

.asc-cas-table td {
  padding: var(--asc-esp-2) var(--asc-esp-6);
  border-bottom: var(--asc-trait-fin) solid rgba(var(--asc-creme-rgb), 0.2);
}

/* Les trois rouleaux de la machine. */
.asc-cas-rouleaux {
  display: flex;
  justify-content: center;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-tole-rouge-sombre);
  outline: var(--asc-trait-moyen) solid var(--asc-lampadaire-sombre);
}

.asc-cas-symbole {
  min-width: var(--asc-dim-64);
  padding: var(--asc-esp-10) var(--asc-esp-6);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-basalte);
  font-weight: 800;
  text-align: center;
}

.asc-cas-symbole--sept,
.asc-cas-symbole--cloche {
  color: var(--asc-tole-rouge);
}

.asc-cas-rouleaux.is-tourne .asc-cas-symbole,
.asc-cas-roue.is-tourne {
  animation: asc-cas-tourne 0.12s steps(2) infinite;
}

@keyframes asc-cas-tourne {
  50% {
    opacity: 0.35;
  }
}

/* La roue : le numéro tombé, à sa couleur. */
.asc-cas-roue {
  align-self: center;
  min-width: var(--asc-dim-56);
  padding: var(--asc-esp-10);
  border-radius: 50%;
  background: var(--asc-basalte);
  color: var(--asc-creme);
  font-size: var(--asc-texte-18);
  font-weight: 800;
  text-align: center;
  outline: var(--asc-trait-moyen) solid var(--asc-lampadaire-sombre);
}

.asc-cas-roue--rouge {
  background: var(--asc-tole-rouge);
}

.asc-cas-roue--vert {
  background: var(--asc-lagon);
}

.asc-cas-paris {
  display: flex;
  flex-direction: column;
}

/* Le tapis vert du blackjack et du poker, et les cartes. */
.asc-cas-tapis,
.asc-cas-poker {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
  padding: var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-lagon-nuit);
}

.asc-cas-cartes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--asc-esp-4);
}

.asc-cas-carte {
  min-width: var(--asc-dim-30);
  padding: var(--asc-esp-6) var(--asc-esp-4);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-basalte);
  font-weight: 800;
  text-align: center;
  box-shadow: var(--asc-ombre-5);
}

.asc-cas-carte.is-rouge {
  color: var(--asc-tole-rouge);
}

.asc-cas-carte.is-cachee {
  background: var(--asc-tole-framboise);
  min-height: var(--asc-dim-30);
}

.asc-cas-carte.is-cliquable {
  cursor: pointer;
}

.asc-cas-carte.is-choisie {
  transform: translateY(calc(-1 * var(--asc-esp-6)));
  outline: var(--asc-trait-moyen) solid var(--asc-lampadaire);
}

.asc-cas-siege.is-moi {
  font-weight: 800;
}

.asc-cas-siege.is-gagnant {
  color: var(--asc-lampadaire);
}

/* ================================================================================================
   MODULE ARGENT  (ex-argent.css)
   ================================================================================================ */

/* L'argent (carte Task #13) : HUD et guichet du jeu (/jouer), symbole de l'Ascen à l'écran Économie. */

/* Le symbole de l'Ascen, en pixel art net, à la hauteur du texte. */
.asc-ascen {
  height: 0.9em;
  width: auto;
  vertical-align: -0.05em;
  image-rendering: pixelated;
}

/* HUD : liquide et banque en haut à droite. */
.asc-argent-hud {
  position: absolute;
  top: var(--asc-esp-12);
  right: var(--asc-esp-12);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
  z-index: var(--asc-plan-4);
  pointer-events: none;
}

.asc-argent-poche {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-10);
  min-width: var(--asc-dim-150);
  padding: var(--asc-esp-5) var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.9);
  color: var(--asc-creme);
  font-weight: 800;
  box-shadow: var(--asc-ombre-3);
}

.asc-argent-libelle {
  font-size: var(--asc-texte-6);
  color: var(--asc-creme);
  text-transform: uppercase;
}

.asc-argent-poche--liquide .asc-argent-valeur {
  color: var(--asc-lagon-clair);
}

.asc-argent-montant {
  white-space: nowrap;
}

/* Boutons d'action (guichet, donner du liquide), au-dessus de l'invite « Entrer : ... ». */
.asc-argent-barre {
  position: absolute;
  bottom: var(--asc-esp-84);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--asc-esp-8);
  z-index: var(--asc-plan-4);
}

.asc-argent-action {
  padding: var(--asc-esp-10) var(--asc-esp-16);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-case-jaune);
  color: var(--asc-nuit-profonde);
  font: inherit;
  font-weight: 800;
  box-shadow: var(--asc-ombre-1);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-argent-action--don {
  background: var(--asc-ecume);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

/* Le panneau du guichet ou du don : un en-tête, puis un menu en gros boutons (.asc-gb-*, carte #68). */
.asc-argent-panneau {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100% - var(--asc-dim-32)));
  max-height: calc(100% - var(--asc-dim-140));
  overflow-y: auto;
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: 0 6px 0 rgba(var(--asc-nuit-profonde-rgb), 0.2);
  z-index: var(--asc-plan-6);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  -webkit-user-select: text;
  user-select: text;
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-argent-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--asc-texte-19);
}

.asc-argent-fermer {
  border: 0;
  background: none;
  color: var(--asc-creme);
  font: inherit;
  font-size: var(--asc-texte-11);
  cursor: pointer;
}














/* Message court après une opération (ou un refus). */

@media (pointer: coarse) {
  .asc-argent-poche {
    min-width: var(--asc-dim-120);
    font-size: var(--asc-texte-11);
  }

  .asc-argent-barre {
    bottom: var(--asc-esp-160);
  }
}


/* ================================================================================================
   MODULE BATIMENTS  (ex-batiments.css)
   ================================================================================================ */

/* Bâtiments publics (carte Task #19, chantier v2-1) : barre de la pièce, panneau du guichet, messages.
   Chargé par Resources/game/src/modules/batiments.js (balise link, ?v = nom du script compilé). */

/* L'attribut hidden gagne toujours sur les display des panneaux ci-dessous. */
[class^="asc-bat-"][hidden] {
  display: none !important;
}

/* Dans un bâtiment : la ville (étiquettes, joystick) disparaît. */
.asc-dans-batiment .asc-etiquettes,
.asc-dans-batiment .asc-joystick,
.asc-dans-batiment .asc-aide {
  display: none !important;
}

/* Les actions de la pièce (Guichet) : rangées en bas à droite par le calque d'interface (carte #62). Le titre
   et le bouton Sortir sont dans la barre de pièce commune (.asc-piece-barre, section du calque). */
.asc-bat-barre {
  display: flex;
  gap: var(--asc-esp-8);
}

.asc-bat-panneau {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(var(--asc-fenetre-large), calc(100vw - var(--asc-marge-ecran)));
  max-height: calc(100vh - var(--asc-dim-120));
  overflow-y: auto;
  padding: var(--asc-esp-14) var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-5);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-10);
  z-index: var(--asc-plan-8);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-bat-panneau h4 {
  margin: var(--asc-esp-4) 0 0;
  font-size: var(--asc-texte-16);
}

.asc-bat-panneau p {
  margin: 0;
}

.asc-bat-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
}

.asc-bat-salut {
  padding: var(--asc-esp-8) var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit);
  font-style: italic;
}

.asc-bat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--asc-esp-6);
}

.asc-bat-zone {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
}

/* Lot 5 (carte #59) : le rayon du magasin de jeux vidéo, au guichet du vendeur. */
.asc-cons-magasin {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
}

.asc-bat-ligne {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  flex-wrap: wrap;
  padding: var(--asc-esp-6) 0;
  border-bottom: var(--asc-trait-fin) solid var(--asc-creme);
}

.asc-bat-produit {
  flex: 1 1 160px;
  display: flex;
  flex-direction: column;
}

.asc-bat-produit small {
  color: var(--asc-creme);
}

.asc-bat-prix {
  font-weight: 800;
  white-space: nowrap;
}

.asc-bat-select,
.asc-bat-champ {
  border: var(--asc-trait-fin) solid var(--asc-lagon-nuit);
  border-radius: var(--asc-rayon);
  padding: var(--asc-esp-6) var(--asc-esp-8);
  font: inherit;
  color: var(--asc-creme);
  background: var(--asc-nuit);
}

.asc-bat-champ {
  flex: 1 1 120px;
  min-width: 0;
}

.asc-bat-vide {
  color: var(--asc-creme);
}

/* ================================================================================================
   MODULE COMMERCES  (ex-commerces.css)
   ================================================================================================ */

.asc-dans-logement .asc-com-hud {
  display: none;
}

.asc-com-enseignes {
  position: absolute;
  inset: 0;
  z-index: var(--asc-plan-3);
  pointer-events: none;
}

.asc-com-enseigne {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 180px;
  padding: var(--asc-esp-3) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-bois);
  border-radius: var(--asc-rayon);
  background: var(--asc-sable);
  color: var(--asc-nuit-profonde);
  font: inherit;
  font-size: var(--asc-texte-7);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--asc-ombre-6);
  pointer-events: auto;
  cursor: pointer;
}

.asc-com-enseigne.is-moi {
  border-color: var(--asc-olive);
  background: var(--asc-ecume);
  color: var(--asc-nuit-profonde);
}

.asc-com-enseigne.is-ferme {
  opacity: var(--asc-opacite-60);
}

.asc-com-fenetre {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-7);
  width: min(var(--asc-fenetre-moyenne), calc(100vw - var(--asc-marge-ecran)));
  max-height: min(80vh, 680px);
  overflow-y: auto;
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-2);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

/* Le corps des fenêtres : un menu en gros boutons (.asc-gb-*, section du calque d'interface, carte #71). */

.asc-com-entete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--asc-esp-8);
  margin-bottom: var(--asc-esp-8);
}

.asc-com-titre {
  font-size: var(--asc-texte-19);
  font-weight: 800;
}

.asc-com-sous-titre,
.asc-com-muet {
  color: var(--asc-creme);
  font-size: var(--asc-texte-8);
  font-weight: 700;
}

.asc-com-case {
  flex: 1;
  font-size: var(--asc-texte-11);
  font-weight: 700;
}

.asc-com-btn {
  flex: none;
}
/* La mise en rayon : cartons numérotés à ranger dans l'ordre. */
.asc-com-jeu {
  z-index: var(--asc-plan-9);
}

.asc-com-chrono {
  margin: var(--asc-esp-6) 0;
  font-size: var(--asc-texte-17);
  font-weight: 800;
}

.asc-com-cartons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: var(--asc-esp-8);
  margin: var(--asc-esp-8) 0;
}

.asc-com-carton {
  height: var(--asc-dim-56);
  border: var(--asc-trait-epais) solid var(--asc-bois);
  background: var(--asc-peche);
  color: var(--asc-nuit-profonde);
  font-size: var(--asc-texte-21);
}

.asc-com-carton.is-range {
  border-color: var(--asc-olive);
  background: var(--asc-ecume);
  color: var(--asc-nuit-profonde);
}

@media (max-width: 600px) {

  .asc-com-fenetre {
    top: auto;
    bottom: var(--asc-esp-12);
    transform: translateX(-50%);
    max-height: 70vh;
  }
}


/* ================================================================================================
   MODULE CRIME  (ex-crime.css)
   ================================================================================================ */

/* Combat, vol, casier et argent au sol (chantier v2-2) : panneau de combat, toasts, badge Recherché,
   boutons de la fiche, étiquettes de l'argent au sol, panneau de plainte. Préfixe asc-crime-. */

/* Panneau de combat : en bas au centre, au-dessus du joystick, gros boutons tactiles. */
.asc-crime-combat {
  position: absolute;
  left: 50%;
  bottom: var(--asc-esp-18);
  transform: translateX(-50%);
  width: min(var(--asc-fenetre-440), calc(100vw - var(--asc-marge-ecran-24)));
  padding: var(--asc-esp-10) var(--asc-esp-12) var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-basalte-rgb), 0.92);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-10);
  z-index: var(--asc-plan-6);
  user-select: none;
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-crime-combat[hidden] {
  display: none;
}

.asc-crime-combat-titre {
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--asc-esp-6);
}

.asc-crime-jauges {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-4);
}

.asc-crime-jauge {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: var(--asc-esp-8);
  font-size: var(--asc-texte-8);
}

.asc-crime-jauge-nom {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asc-crime-jauge-barre {
  height: var(--asc-dim-10);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.15);
  overflow: hidden;
}

.asc-crime-jauge-plein {
  display: block;
  height: 100%;
  background: var(--asc-lagon-clair);
  transition: width 0.25s ease-out;
}

.asc-crime-jauge--lui .asc-crime-jauge-plein {
  background: var(--asc-saumon);
}

.asc-crime-journal {
  min-height: 3.3em;
  margin: var(--asc-esp-6) 0;
  font-size: var(--asc-texte-6);
  color: rgba(var(--asc-creme-rgb), 0.75);
}

.asc-crime-journal-ligne.is-moi {
  color: var(--asc-ecume);
}

.asc-crime-boutons {
  display: flex;
  gap: var(--asc-esp-8);
}

.asc-crime-bouton {
  position: relative;
  flex: 1;
  min-height: 52px;
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-peche);
  color: var(--asc-nuit-profonde);
  font-weight: 800;
  font-size: var(--asc-texte-16);
  box-shadow: 0 3px 0 rgba(var(--asc-nuit-profonde-rgb), 0.3);
  touch-action: manipulation;
  overflow: hidden;
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-crime-bouton[hidden] {
  display: none;
}

.asc-crime-bouton:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(var(--asc-nuit-profonde-rgb), 0.3);
}

.asc-crime-bouton--frapper {
  background: var(--asc-saumon);
  color: var(--asc-creme);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-crime-bouton--esquiver {
  background: var(--asc-case-bleue);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-crime-bouton--fuir {
  background: var(--asc-case-jaune);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-crime-bouton--braquer {
  background: var(--asc-bleu-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-crime-bouton:disabled,
.asc-crime-bouton.is-recharge {
  opacity: var(--asc-opacite-55);
}

.asc-crime-bouton-touche {
  position: absolute;
  top: var(--asc-esp-3);
  left: var(--asc-esp-6);
  font-size: var(--asc-texte-1);
  opacity: var(--asc-opacite-70);
}

.asc-crime-bouton-recharge {
  position: absolute;
  right: var(--asc-esp-6);
  bottom: var(--asc-esp-3);
  font-size: var(--asc-texte-4);
}


/* Badge Recherché : en haut à gauche. */
.asc-crime-recherche {
  position: absolute;
  top: var(--asc-esp-12);
  left: var(--asc-esp-12);
  padding: var(--asc-esp-5) var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: var(--asc-tole-rouge);
  color: var(--asc-creme);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--asc-lettres);
  box-shadow: var(--asc-ombre-6);
  z-index: var(--asc-plan-5);
  animation: asc-crime-clignote 1.2s steps(2, end) infinite;
}

.asc-crime-recherche[hidden] {
  display: none;
}

@keyframes asc-crime-clignote {
  50% {
    opacity: var(--asc-opacite-60);
  }
}

/* ================================================================================================
   ÉTOILES DE RECHERCHE (carte #85, modules/etoiles.js) : la jauge à 5 étoiles façon GTA, en haut à droite
   sous l'argent (zone haut-droite d'interface.js). Elle remplace le badge Recherché et le bandeau d'avis.
   Réglages de la jauge en tête du bloc (variables du composant, comme .asc-gb).
   ================================================================================================ */
.asc-etoiles {
  --asc-etoile-taille: calc(24 * var(--asc-unite));
  --asc-etoile-taille-mobile: calc(20 * var(--asc-unite));
  --asc-etoile-taille-mini: calc(14 * var(--asc-unite));
  --asc-etoile-allumee: var(--asc-lampadaire);
  --asc-etoile-eteinte: rgba(var(--asc-creme-rgb), 0.3);
  --asc-etoile-contour: var(--asc-nuit-profonde);
  --asc-etoile-fond: rgba(var(--asc-nuit-rgb), 0.9);
  display: flex;
  align-items: center;
  gap: var(--asc-esp-4);
  padding: var(--asc-esp-4) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-etoile-fond);
  box-shadow: var(--asc-ombre-3);
  pointer-events: none;
}
.asc-etoiles[hidden] { display: none !important; }
.asc-etoiles-case { display: inline-flex; line-height: 0; }
.asc-etoiles-case .asc-gb-icone {
  width: var(--asc-etoile-taille);
  height: var(--asc-etoile-taille);
  fill: var(--asc-etoile-eteinte);
  filter: drop-shadow(1px 0 0 var(--asc-etoile-contour)) drop-shadow(-1px 0 0 var(--asc-etoile-contour)) drop-shadow(0 1px 0 var(--asc-etoile-contour)) drop-shadow(0 -1px 0 var(--asc-etoile-contour));
}
.asc-etoiles-case.is-allumee .asc-gb-icone { fill: var(--asc-etoile-allumee); }
/* Une étoile qui vient de s'allumer clignote (règle etoiles.clignote_s). */
.asc-etoiles-case.is-nouvelle .asc-gb-icone { animation: asc-etoiles-clignote 0.4s steps(2, end) infinite; }
@keyframes asc-etoiles-clignote {
  50% { fill: var(--asc-etoile-eteinte); }
}
/* God mode : la jauge se modifie d'un clic. */
.asc-god-actif .asc-etoiles { outline: var(--asc-trait-moyen) dashed var(--asc-flamboyant); outline-offset: 2px; cursor: pointer; pointer-events: auto !important; }
/* La petite jauge de la fiche d'un autre joueur. */
.asc-etoiles-fiche { display: flex; align-items: center; gap: var(--asc-esp-6); margin-top: var(--asc-esp-4); font-weight: 800; color: var(--asc-saumon); text-transform: uppercase; font-size: var(--asc-texte-6); }
.asc-etoiles--mini { padding: var(--asc-esp-2) var(--asc-esp-4); box-shadow: none; }
.asc-etoiles--mini .asc-etoiles-case .asc-gb-icone { width: var(--asc-etoile-taille-mini); height: var(--asc-etoile-taille-mini); }
@media (max-width: 760px), (max-height: 520px) {
  .asc-etoiles-case .asc-gb-icone { width: var(--asc-etoile-taille-mobile); height: var(--asc-etoile-taille-mobile); }
  /* Menu replié : le haut à droite se cache, sauf la jauge quand on est recherché. */
  .asc-interface:not(.is-ouvert) .asc-zone--haut-droite:has(> .asc-etoiles.is-recherche:not([hidden])) { display: flex !important; }
  .asc-interface:not(.is-ouvert) .asc-zone--haut-droite > :not(.asc-etoiles) { display: none !important; }
}

/* Boutons du panneau de plainte (ATTAQUER et VOLER sont des gros boutons de la fiche, carte #75). */
.asc-crime-fiche-bouton {
  flex: 1;
  min-height: var(--asc-dim-40);
  padding: var(--asc-esp-6) var(--asc-esp-12);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-peche);
  color: var(--asc-nuit-profonde);
  font-weight: 800;
  box-shadow: var(--asc-ombre-7);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-crime-fiche-bouton--clair {
  background: var(--asc-nuit);
  color: var(--asc-creme);
  margin-top: var(--asc-esp-10);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-crime-fiche-bouton:disabled {
  opacity: var(--asc-opacite-55);
}

/* Étiquettes de l'argent au sol. */
.asc-crime-etiquettes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: var(--asc-plan-2);
}

.asc-crime-tas-etiquette {
  position: absolute;
  left: 0;
  top: 0;
  padding: var(--asc-esp-1) var(--asc-esp-6);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-lampadaire-rgb), 0.92);
  color: var(--asc-nuit-profonde);
  font-size: var(--asc-texte-4);
  font-weight: 800;
  white-space: nowrap;
}

/* Panneau de plainte (sans le guichet de v2-1). */
.asc-crime-modale {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--asc-basalte-rgb), 0.35);
  z-index: var(--asc-plan-8);
}

.asc-crime-modale-carte {
  width: min(var(--asc-fenetre-etroite), calc(100vw - var(--asc-marge-ecran-24)));
  max-height: calc(100vh - var(--asc-dim-40));
  overflow: auto;
  padding: var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-crime-modale-titre {
  font-weight: 800;
  font-size: var(--asc-texte-18);
  margin-bottom: var(--asc-esp-8);
}

.asc-crime-plainte-aide,
.asc-crime-plainte-vide {
  font-size: var(--asc-texte-11);
  color: var(--asc-creme);
  margin-bottom: var(--asc-esp-8);
}

.asc-crime-plainte-ligne {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-6) 0;
  border-top: var(--asc-trait-fin) solid var(--asc-lagon-nuit);
}

.asc-crime-plainte-texte {
  flex: 1;
  font-size: var(--asc-texte-11);
}

.asc-crime-plainte-ligne .asc-crime-fiche-bouton {
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .asc-crime-bouton {
    min-height: var(--asc-dim-58);
    font-size: var(--asc-texte-14);
  }

  .asc-crime-combat {
    bottom: var(--asc-esp-120);
  }
}


/* ================================================================================================
   MODULE DIAMANTS  (carte #46) : app Diamants du téléphone (solde, objets, packs)
   ================================================================================================ */

.asc-diam {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  color: var(--asc-nuit-profonde);
}

.asc-diam-titre {
  font-size: var(--asc-texte-18);
  font-weight: 800;
}

.asc-diam-solde {
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-theme);
  font-weight: 800;
}

.asc-diam-texte,
.asc-diam-info,
.asc-diam-meta {
  margin: 0;
  font-size: var(--asc-texte-11);
}

.asc-diam-info {
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-ecume);
}

.asc-diam-onglets,
.asc-diam-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--asc-esp-6);
}

.asc-diam-btn {
  min-height: var(--asc-dim-44);
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-weight: 700;
  cursor: pointer;
}

.asc-diam-btn.is-actif {
  background: var(--asc-theme);
  color: var(--asc-nuit-profonde);
}

.asc-diam-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.asc-diam-zone {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
}

.asc-diam-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-ecume);
}

.asc-diam-ligne-infos {
  flex: 1;
  min-width: 0;
}

.asc-diam-nom,
.asc-diam-sous-titre {
  font-weight: 800;
}

.asc-diam-badge {
  font-size: var(--asc-texte-10);
  font-weight: 700;
}

.asc-diam-message {
  margin: 0;
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-ecume);
  font-size: var(--asc-texte-11);
}

.asc-diam-message.is-erreur,
.asc-diam-meta.is-erreur {
  font-weight: 700;
}

.asc-diam-date {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
}

.asc-diam-champ {
  min-height: var(--asc-dim-44);
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border: var(--asc-trait-fin) solid var(--asc-nuit);
  border-radius: var(--asc-rayon);
  font: inherit;
}

/* ================================================================================================
   MODULE FINANCE  (ex-finance.css)
   ================================================================================================ */

/* Finance (chantier v3-5) : apps Contrats, Bourse et Paris du téléphone, guichet Contrats de la mairie,
   guichet et fenêtre de la Bourse. Depuis la carte #72 (règle 6), chaque écran est un menu en gros boutons
   (.asc-gb-*, section 47) : ici ne restent que le cadre de la fenêtre et ce qui est propre à la finance
   (cote, courbe, choix à bouton unique). */

.asc-fin {
  padding: var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
}

.asc-fin-fenetre {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-7);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  width: min(var(--asc-fenetre-440), calc(100vw - var(--asc-marge-ecran)));
  max-height: min(80vh, var(--asc-dim-660));
  overflow-y: auto;
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-2);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-fin-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.asc-fin-contenu.asc-fin {
  padding: 0;
}

.asc-fin-message {
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-lagon-nuit);
  color: var(--asc-creme);
  font-size: var(--asc-texte-9);
}

.asc-fin-message.is-erreur {
  background: var(--asc-saumon);
  color: var(--asc-nuit-profonde);
}

/* Un champ et son libellé au-dessus. */
.asc-fin-champ {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-2);
  font-size: var(--asc-texte-9);
  color: var(--asc-peche);
}

.asc-fin-options {
  display: flex;
  flex-direction: column;
  gap: var(--asc-gb-ecart);
}

/* La cote et mes actions : une ligne-bouton par titre (symbole, nom, cours, variation). */
.asc-fin-lignes {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-4);
  max-height: var(--asc-dim-260);
  overflow-y: auto;
}

.asc-fin-titre-ligne {
  display: grid;
  grid-template-columns: 4.5em 1fr auto 4.5em;
  gap: var(--asc-esp-6);
  align-items: center;
  min-height: var(--asc-dim-44);
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  font: inherit;
  font-size: var(--asc-texte-9);
  text-align: left;
  cursor: pointer;
  outline: var(--asc-trait-fin) solid var(--asc-ardoise);
}

.asc-fin-titre-ligne:hover,
.asc-fin-titre-ligne:focus-visible {
  outline: var(--asc-liseret-neon);
}

.asc-fin-symbole {
  font-weight: 800;
  color: var(--asc-theme-clair);
}

.asc-fin-nom {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asc-fin-cours {
  font-weight: 700;
}

.asc-fin .is-hausse {
  color: var(--asc-case-verte);
  fill: var(--asc-case-verte);
}

.asc-fin .is-baisse {
  color: var(--asc-saumon);
  fill: var(--asc-saumon);
}

.asc-fin .asc-gb-gros .is-hausse,
.asc-fin .asc-gb-gros .is-baisse {
  font-size: var(--asc-texte-12);
  font-weight: 800;
}

/* La courbe des derniers cours : des barres pixel en SVG, vertes quand ça monte, saumon quand ça baisse. */
.asc-fin-courbe {
  display: block;
  width: 100%;
  height: var(--asc-dim-64);
  padding: var(--asc-esp-4);
  box-sizing: border-box;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
}


/* ================================================================================================
   MODULE GOD  (ex-god.css)
   ================================================================================================ */

/* God mode des admins (carte Task #36) : bouton en haut à droite, panneau à droite, messages. Depuis la carte #68,
   le panneau est un menu en gros boutons (.asc-gb-*, section du calque d'interface). Boutons :
   bouton commun .asc-btn (interface.css, section 47 d'ARCHITECTURE-_MAP.md). Chargé par modules/god.js. */

.asc-god-bouton.asc-btn { background: var(--asc-flamboyant); color: var(--asc-creme); outline-color: var(--asc-lampadaire); }
.asc-god-bouton.asc-btn:hover { background: var(--asc-tole-rouge); }

.asc-god-panneau {
  position: absolute;
  top: var(--asc-esp-64);
  right: 200px;
  z-index: var(--asc-plan-9);
  display: flex;
  flex-direction: column;
  width: min(var(--asc-fenetre-etroite), calc(100vw - var(--asc-marge-ecran-24)));
  max-height: calc(100% - var(--asc-dim-140));
  background: var(--asc-nuit);
  color: var(--asc-creme);
  outline: var(--asc-trait-moyen) solid var(--asc-nuit-profonde);
  box-shadow: 0 0 0 3px var(--asc-flamboyant), 4px 4px 0 rgba(var(--asc-nuit-profonde-rgb), 0.5);
  font-family: var(--asc-police-texte);
  font-size: var(--asc-texte-9);
}
.asc-god-panneau[hidden] { display: none; }
.asc-god-tete { display: flex; justify-content: space-between; align-items: center; }
.asc-god-cible, .asc-god-corps { padding: var(--asc-esp-8) var(--asc-esp-10); }
.asc-god-cible { border-bottom: var(--asc-trait-fin) solid var(--asc-ardoise-nuit); }
.asc-god-corps { overflow-y: auto; display: flex; flex-direction: column; gap: var(--asc-esp-8); }
.asc-god-section { display: flex; flex-direction: column; gap: var(--asc-esp-6); padding-bottom: var(--asc-esp-8); border-bottom: var(--asc-trait-fin) dashed var(--asc-ardoise-nuit); }
.asc-god-etiquette { font-family: var(--asc-police-titres); color: var(--asc-soleil); font-size: var(--asc-texte-9); text-transform: uppercase; }
.asc-god-info { color: var(--asc-peche); font-size: var(--asc-texte-6); }
.asc-god-cible-nom { flex: 1; color: var(--asc-theme-clair); }
.asc-god-ligne { display: flex; gap: var(--asc-esp-6); flex-wrap: wrap; align-items: center; }
.asc-god-ligne .asc-btn { min-height: var(--asc-dim-32); padding: var(--asc-esp-4) var(--asc-esp-10); font-size: var(--asc-texte-6); }
.asc-god-cible-liste { display: flex; flex-direction: column; gap: var(--asc-esp-4); margin-top: var(--asc-esp-6); }
.asc-god-champ {
  min-height: var(--asc-dim-32);
  min-width: 0;
  flex: 1 1 70px;
  padding: var(--asc-esp-4) var(--asc-esp-6);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  outline: var(--asc-trait-fin) solid var(--asc-ardoise);
  font: inherit;
}
textarea.asc-god-champ { min-height: var(--asc-dim-64); width: 100%; font-family: monospace; }
.asc-god-json { min-height: var(--asc-dim-120); }
.asc-god-liste { display: flex; flex-direction: column; gap: var(--asc-esp-4); }
.asc-god-commande summary { cursor: pointer; padding: var(--asc-esp-3) 0; color: var(--asc-creme); }
.asc-god-commande[open] { padding: var(--asc-esp-6); background: rgba(var(--asc-nuit-profonde-rgb), 0.6); display: flex; flex-direction: column; gap: var(--asc-esp-6); }
.asc-god-param { display: flex; flex-direction: column; gap: var(--asc-esp-2); color: var(--asc-peche); font-size: var(--asc-texte-6); }
.asc-god-sortie {
  max-height: var(--asc-dim-220);
  overflow: auto;
  margin: 0;
  padding: var(--asc-esp-6);
  background: var(--asc-nuit-profonde);
  color: var(--asc-ecume);
  font-size: var(--asc-texte-3);
  white-space: pre-wrap;
  word-break: break-word;
}
.asc-god-sortie:empty { display: none; }
.asc-god-journal { font-family: monospace; font-size: var(--asc-texte-3); color: var(--asc-ecume); word-break: break-word; }
.asc-god-journal.is-echec { color: var(--asc-saumon); }

/* Interface modifiable : en god mode, les valeurs qui s'éditent se signalent. */
.asc-god-actif .asc-argent-hud,
.asc-god-actif .asc-besoins,
.asc-god-actif .asc-ciel-heure { outline: var(--asc-trait-moyen) dashed var(--asc-flamboyant) !important; outline-offset: 2px; cursor: pointer; pointer-events: auto !important; }

/* Viseur de téléportation : le prochain clic sur la carte téléporte. */
.asc-god-viseur canvas { cursor: crosshair !important; }
@media (max-width: 760px), (max-height: 520px) {
  .asc-god-panneau { top: 56px; right: var(--asc-esp-12); left: var(--asc-esp-12); width: auto; max-height: calc(100% - var(--asc-dim-140)); }
}


/* ================================================================================================
   MODULE IMMOBILIER  (ex-immobilier.css)
   ================================================================================================ */

.asc-dans-logement .asc-imm-hud {
  display: none;
}

.asc-imm-panneau {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: var(--asc-plan-8);
  transform: translate(-50%, -50%);
  width: min(var(--asc-fenetre-moyenne), calc(100vw - var(--asc-marge-ecran)));
  max-height: calc(100vh - var(--asc-dim-120));
  overflow-y: auto;
  padding: var(--asc-esp-14) var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-5);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

/* Le panneau : la bande de titre commune, puis un menu en gros boutons (.asc-gb-*, carte #71). */
.asc-imm-panneau:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-10);
}

.asc-imm-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.asc-imm-etiquettes {
  position: absolute;
  inset: 0;
  z-index: var(--asc-plan-3);
  pointer-events: none;
}

.asc-imm-etiquette {
  position: absolute;
  top: 0;
  left: 0;
  padding: var(--asc-esp-2) var(--asc-esp-7);
  border: 0;
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.92);
  color: var(--asc-creme);
  font: inherit;
  font-size: var(--asc-texte-4);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(var(--asc-nuit-profonde-rgb), 0.18);
  cursor: pointer;
  pointer-events: auto;
}

.asc-imm-etiquette.is-vente {
  background: var(--asc-case-jaune);
}

.asc-imm-etiquette.is-location {
  background: var(--asc-case-bleue);
}

.asc-imm-etiquette.is-moi {
  background: var(--asc-canne);
  color: var(--asc-creme);
}

.asc-imm-survol {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--asc-plan-7);
  max-width: var(--asc-dim-260);
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-basalte-rgb), 0.9);
  color: var(--asc-creme);
  font-size: var(--asc-texte-6);
  pointer-events: none;
}
/* Bandeau « Déménage d'abord » de la fiche d'un bien (Habiter impossible quand on habite ailleurs). */
.asc-imm-bandeau {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  margin-top: var(--asc-esp-8);
  padding: var(--asc-esp-8) var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-basalte-rgb), 0.92);
  border: 2px solid var(--asc-creme);
  color: var(--asc-creme);
  font-size: var(--asc-texte-11);
}




/* ================================================================================================
   MODULE INVENTAIRE  (ex-inventaire.css)
   ================================================================================================ */

/* Le Sac et la boutique de vêtements (carte #74, règle 6) : un en-tête, puis un menu en gros boutons
   (.asc-gb-*, section du calque d'interface), puis la zone des messages. */
.asc-inv-fenetre {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-7);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  width: min(var(--asc-fenetre-400), calc(100vw - var(--asc-marge-ecran)));
  max-height: min(78vh, var(--asc-dim-640));
  overflow-y: auto;
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-2);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  -webkit-user-select: none;
  user-select: none;
}

.asc-inv-fenetre[hidden] {
  display: none;
}

.asc-inv-entete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--asc-esp-8);
}

.asc-inv-titre {
  font-size: var(--asc-texte-19);
  font-weight: 800;
}

.asc-inv-sous-titre,
.asc-inv-pied {
  color: var(--asc-peche);
  font-size: var(--asc-texte-7);
  font-weight: 700;
}

.asc-inv-pied {
  text-align: center;
}

/* La couleur du vêtement, en coin de son gros bouton. */
.asc-inv-pastille {
  position: absolute;
  top: var(--asc-esp-4);
  left: var(--asc-esp-4);
  width: var(--asc-dim-16);
  height: var(--asc-dim-16);
  border: var(--asc-trait-moyen) solid var(--asc-creme);
  border-radius: var(--asc-rayon);
  background: var(--asc-inv-couleur, var(--asc-nuit-profonde));
}

.asc-inv-message {
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  font-weight: 700;
  font-size: var(--asc-texte-11);
}

.asc-inv-message.is-erreur {
  color: var(--asc-saumon);
}

@media (max-width: 600px) {

  .asc-inv-fenetre {
    top: auto;
    bottom: var(--asc-esp-12);
    transform: translateX(-50%);
    max-height: 70vh;
  }
}


/* ================================================================================================
   MODULE JUSTICE  (ex-justice.css)
   ================================================================================================ */

/*
 * Justice (chantier v2-3) : avis de recherche, guichet de la gendarmerie, tribunal, prison, travail en prison.
 * Chargé par Resources/game/src/modules/justice.js (?v=<script compilé>), même style que les autres panneaux
 * du jeu : blanc, coins ronds, ombre plate, police grasse.
 */

/* Un détenu ne voyage pas : le plan de l'île est caché. */
.asc-justice-detenu .asc-monde-plan-bouton,
.asc-justice-detenu .asc-monde-plan {
  display: none !important;
}
.asc-justice-avis[hidden],
.asc-justice-prison[hidden],
.asc-justice-erreur[hidden] {
  display: none;
}

/* L'avis de recherche, en haut au centre, qui clignote doucement. */
.asc-justice-avis {
  position: absolute;
  top: var(--asc-esp-12);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--asc-plan-6);
  max-width: calc(100vw - var(--asc-dim-32));
  padding: var(--asc-esp-8) var(--asc-esp-16);
  border: var(--asc-trait-moyen) solid var(--asc-tole-rouge);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  font-weight: 800;
  text-align: center;
  box-shadow: var(--asc-ombre-1);
  pointer-events: none;
  animation: asc-justice-clignote 1.2s ease-in-out infinite alternate;
}

@keyframes asc-justice-clignote {
  from { opacity: 1; }
  to { opacity: 0.65; }
}

/* Le calque de la justice : ses panneaux se posent dedans. */
.asc-justice {
  position: absolute;
  inset: 0;
  z-index: var(--asc-plan-8);
  pointer-events: none;
}

.asc-justice > * {
  pointer-events: auto;
}

.asc-justice-panneau {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(var(--asc-fenetre-moyenne), calc(100vw - var(--asc-marge-ecran)));
  max-height: calc(100vh - var(--asc-dim-32));
  overflow: auto;
  padding: var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  box-shadow: var(--asc-ombre-10);
}

.asc-justice-panneau p {
  margin: var(--asc-esp-6) 0 var(--asc-esp-10);
}

.asc-justice-voile {
  position: absolute;
  inset: 0;
  background: rgba(var(--asc-basalte-rgb), 0.55);
}

.asc-justice-tribunal-tete {
  display: flex;
  gap: var(--asc-esp-14);
  align-items: flex-start;
  margin-bottom: var(--asc-esp-12);
}

.asc-justice-juge {
  flex: none;
  width: var(--asc-dim-72);
  height: var(--asc-dim-90);
  image-rendering: pixelated;
  border-radius: var(--asc-rayon);
  background: var(--asc-sable);
}

.asc-justice-crimes {
  margin: 0 0 var(--asc-esp-6);
  padding-left: var(--asc-esp-18);
  font-weight: 800;
}

.asc-justice-petit {
  font-size: var(--asc-texte-11);
  opacity: var(--asc-opacite-80);
}

/* L'audience : AVOCAT et les 4 plaidoiries en gros boutons (.asc-gb-*, carte #75). */
.asc-justice-plaidoiries {
  margin: var(--asc-esp-8) 0 var(--asc-esp-12);
}

.asc-justice-erreur {
  margin-bottom: var(--asc-esp-10);
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  font-weight: 700;
}

.asc-justice-verdict {
  font-size: var(--asc-texte-20);
  font-weight: 800;
}

.asc-justice-verdict--relaxe { color: var(--asc-lagon-clair); }
.asc-justice-verdict--amende { color: var(--asc-case-jaune); }
.asc-justice-verdict--prison { color: var(--asc-saumon); }

.asc-justice-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--asc-esp-8);
  margin-top: var(--asc-esp-8);
}

/* La prison : minuterie et actions, en haut à gauche. */
.asc-justice-prison {
  position: absolute;
  /* À droite, sous l'argent et les étoiles : à gauche, il recouvrait la fiche (besoins, Ma fiche, Quitter). */
  top: 112px;
  right: var(--asc-esp-16);
  width: min(var(--asc-fenetre-280), calc(100vw - var(--asc-marge-ecran)));
  padding: var(--asc-esp-10) var(--asc-esp-12);
  border: var(--asc-trait-epais) solid var(--asc-ciel-braise);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.94);
  color: var(--asc-creme);
  font-size: var(--asc-texte-14);
  box-shadow: var(--asc-ombre-3);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-justice-prison-titre {
  display: block;
  color: var(--asc-ciel-braise);
  font-size: var(--asc-texte-17);
}

.asc-justice-prison-reste {
  font-weight: 800;
}

.asc-justice-prison-motif {
  margin: var(--asc-esp-2) 0 var(--asc-esp-8);
  opacity: var(--asc-opacite-80);
}

.asc-justice-prison-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--asc-esp-6);
}

/* Le travail en prison : cliquer chaque pièce de linge ou chaque assiette. */
.asc-justice-travail-zone {
  position: relative;
  height: var(--asc-dim-220);
  margin: var(--asc-esp-10) 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  overflow: hidden;
}

.asc-justice-objet {
  position: absolute;
  width: var(--asc-dim-40);
  height: var(--asc-dim-32);
  border: var(--asc-trait-epais) solid rgba(var(--asc-basalte-rgb), 0.25);
  border-radius: var(--asc-rayon);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.asc-justice-objet--vaisselle {
  width: var(--asc-dim-36);
  height: var(--asc-dim-36);
  border-radius: var(--asc-rond);
  background: radial-gradient(circle, var(--asc-nuit) 35%, var(--asc-nuit) 36%, var(--asc-creme) 70%);
}

.asc-justice-objet.is-fait {
  transform: scale(0.4);
  opacity: 0.2;
  cursor: default;
}

/* Petit guichet propre (quand les guichets des bâtiments publics ne sont pas là). */
.asc-justice-guichet strong {
  display: block;
  margin-bottom: var(--asc-esp-4);
}

@media (max-width: 600px) {
  .asc-justice-prison {
    top: auto;
    bottom: 140px;
  }
}


/* ================================================================================================
   MODULE LOGEMENT  (ex-logement.css)
   ================================================================================================ */

/* Logement (carte Task #18) : panneaux HTML du foyer, du studio, de la déco et du coffre.
   Chargé par Resources/game/src/modules/logement.js (import ?raw, posé dans une balise <style>). */

/* L'attribut hidden gagne toujours sur les display des panneaux ci-dessous. */
[class^="asc-log-"][hidden] {
  display: none !important;
}

/* Dans une pièce : la ville (étiquettes, joystick) disparaît. */
.asc-dans-logement .asc-etiquettes,
.asc-dans-logement .asc-joystick,
.asc-dans-logement .asc-aide {
  display: none !important;
}

.asc-log-panneau {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(var(--asc-fenetre-large), calc(100vw - var(--asc-marge-ecran)));
  max-height: calc(100vh - var(--asc-dim-120));
  overflow-y: auto;
  padding: var(--asc-esp-14) var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-5);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-10);
  z-index: var(--asc-plan-8);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-log-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
}

/* Les actions d'une pièce (Décorer, Réserve, Gérer, Porte) : rangées en bas à droite par le calque
   d'interface (carte #62) ; titre et Sortir dans la barre de pièce commune (.asc-piece-barre). */
.asc-log-barre {
  display: flex;
  gap: var(--asc-esp-8);
}

/* Menu d'un meuble (dormir, se laver, coffre). */
.asc-log-actions {
  position: absolute;
  bottom: var(--asc-esp-28);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-10) var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-1);
  z-index: var(--asc-plan-7);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-log-bulle {
  position: absolute;
  left: 0;
  top: 0;
  padding: var(--asc-esp-4) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-basalte);
  font-weight: 800;
  font-size: var(--asc-texte-8);
  pointer-events: none;
  z-index: var(--asc-plan-6);
}

.asc-log-sonnette {
  position: absolute;
  top: var(--asc-esp-64);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  flex-wrap: wrap;
  padding: var(--asc-esp-10) var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-weight: 700;
  box-shadow: var(--asc-ombre-1);
  z-index: var(--asc-plan-8);
}
/* Panneau de déco, à droite (en bas sur téléphone). */
.asc-log-deco {
  position: absolute;
  top: var(--asc-esp-64);
  /* À gauche de la colonne des boutons d'action (176 px, zone bas droite) : Terminer reste cliquable. */
  right: calc(var(--asc-esp-16) * 2 + 176px);
  bottom: var(--asc-esp-12);
  width: var(--asc-dim-280);
  overflow-y: auto;
  padding: var(--asc-esp-10) var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.96);
  color: var(--asc-creme);
  box-shadow: 0 4px 0 rgba(var(--asc-nuit-profonde-rgb), 0.15);
  z-index: var(--asc-plan-7);
}

.asc-log-deco h4,
.asc-log-panneau h4 {
  margin: var(--asc-esp-6) 0;
  font-size: var(--asc-texte-14);
}

.asc-log-aide {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-6);
  flex-wrap: wrap;
  margin: var(--asc-esp-8) 0;
  padding: var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  font-size: var(--asc-texte-11);
}

.asc-log-catalogue {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--asc-esp-6);
}

.asc-log-famille {
  grid-column: 1 / -1;
  margin-top: var(--asc-esp-6);
  font-weight: 800;
  font-size: var(--asc-texte-8);
  color: var(--asc-creme);
}

.asc-log-meuble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-2);
  padding: var(--asc-esp-6) var(--asc-esp-4);
  border: var(--asc-trait-moyen) solid transparent;
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  font: inherit;
  font-size: var(--asc-texte-5);
  text-align: center;
  cursor: pointer;
}

.asc-log-meuble canvas {
  max-width: 100%;
  image-rendering: pixelated;
}

.asc-log-meuble small {
  color: var(--asc-nuit);
}

.asc-log-meuble.is-choisi {
  border-color: var(--asc-case-jaune);
}

/* Magasin de meubles (guichet) et réserve des meubles d'un logement (carte #44) ; en gros boutons (carte #74) :
   le dessin du meuble prend la place de l'icône de sa tuile, et la fiche d'un meuble le montre en grand. */
.asc-mag-vignette {
  flex: 0 0 auto;
  width: var(--asc-dim-40);
  image-rendering: pixelated;
}

.asc-mag-fiche {
  display: flex;
  justify-content: center;
}

.asc-mag-fiche canvas {
  image-rendering: pixelated;
}

@media (max-width: 640px) {
  .asc-log-deco {
    top: auto;
    left: var(--asc-esp-12);
    right: var(--asc-esp-12);
    width: auto;
    height: 42vh;
  }

  .asc-log-catalogue {
    grid-template-columns: repeat(4, 1fr);
  }

}


/* ================================================================================================
   MODULE METIERS  (ex-metiers.css)
   ================================================================================================ */

/*
 * Métiers (carte Task #16) : bouton de prise de service, bandeau « En service », panneaux des
 * mini-jeux. Injecté par Resources/game/src/modules/metiers.js (import ?raw), même style que
 * l'invite et les étiquettes de jouer.css : blanc, coins ronds, ombre plate, police grasse.
 */


.asc-metier-service {
  position: absolute;
  top: var(--asc-esp-52);
  left: var(--asc-esp-16);
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-6) var(--asc-esp-8) var(--asc-esp-6) var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.92);
  color: var(--asc-creme);
  font-size: var(--asc-texte-11);
  font-weight: 800;
  box-shadow: var(--asc-ombre-3);
  z-index: var(--asc-plan-6);
}

/* Panneau d'un mini-jeu : centré, ou en bandeau haut pour les mini-jeux qui se jouent dans la ville. */
.asc-mj {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  max-width: calc(100vw - var(--asc-dim-32));
  max-height: calc(100vh - var(--asc-dim-32));
  overflow: auto;
  box-sizing: border-box;
  padding: var(--asc-esp-14) var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  border: var(--asc-trait-epais) solid var(--asc-ombre-violette);
  box-shadow: 0 5px 0 rgba(var(--asc-nuit-profonde-rgb), 0.3);
  z-index: var(--asc-plan-7);
}

.asc-mj--bandeau {
  top: var(--asc-esp-52);
  transform: translateX(-50%);
  width: var(--asc-dim-380);
  padding: var(--asc-esp-10) var(--asc-esp-14);
}

.asc-mj-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
  margin-bottom: var(--asc-esp-8);
  font-weight: 900;
  font-size: var(--asc-texte-18);
}

.asc-mj-chrono {
  font-variant-numeric: tabular-nums;
  padding: var(--asc-esp-2) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-ombre-violette);
  color: var(--asc-creme);
  font-size: var(--asc-texte-11);
}

.asc-mj-chrono.is-urgent {
  background: var(--asc-tole-rouge);
}

.asc-mj-texte {
  margin: 0 0 var(--asc-esp-10);
  font-size: var(--asc-texte-14);
  font-weight: 700;
}

.asc-mj-pied {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--asc-esp-8);
  margin-top: var(--asc-esp-12);
}

/* Grille de cases cliquables : plats du comptoir, pièces de l'établi, tables. */
.asc-mj-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: var(--asc-esp-8);
}

.asc-mj-case {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-4);
  padding: var(--asc-esp-6) var(--asc-esp-4);
  border: var(--asc-trait-moyen) solid var(--asc-lagon-nuit);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font: inherit;
  font-size: var(--asc-texte-5);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}

.asc-mj-case.is-choisi {
  border-color: var(--asc-case-verte);
  background: var(--asc-creme);
}

.asc-mj-case:disabled {
  cursor: default;
  opacity: var(--asc-opacite-60);
}

.asc-mj-case canvas,
.asc-mj-dessin {
  image-rendering: pixelated;
}

.asc-mj-dessin {
  display: block;
  margin: 0 auto var(--asc-esp-8);
}

.asc-mj-tables {
  display: flex;
  flex-wrap: wrap;
  gap: var(--asc-esp-6);
  margin-top: var(--asc-esp-10);
}

.asc-mj-table {
  width: var(--asc-dim-42);
  height: var(--asc-dim-42);
  border: 0;
  border-radius: var(--asc-rond);
  background: var(--asc-bois);
  color: var(--asc-creme);
  font: inherit;
  font-weight: 900;
  box-shadow: 0 3px 0 var(--asc-bois);
  cursor: pointer;
}

.asc-mj-liste {
  margin: 0 0 var(--asc-esp-10);
  padding: 0;
  list-style: none;
  font-size: var(--asc-texte-11);
  font-weight: 700;
}

.asc-mj-liste li::before {
  content: "- ";
}

.asc-mj-montees {
  min-height: 28px;
  margin: var(--asc-esp-8) 0;
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  font-size: var(--asc-texte-8);
  font-weight: 800;
}

.asc-mj-barre {
  height: 6px;
  margin-top: var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  overflow: hidden;
}

.asc-mj-barre > div {
  height: 100%;
  background: var(--asc-case-jaune);
  transition: width 0.2s linear;
}

/* Résultat d'une tâche. */
/* Lieux de travail (carte #55) : bulle au-dessus d'un client ou du joueur (commande, plats portés, appel). */
.asc-lieu-bulle {
  position: absolute;
  left: var(--asc-lieu-x, 0);
  top: var(--asc-lieu-y, 0);
  transform: translate(-50%, -100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--asc-esp-2);
  max-width: var(--asc-dim-260);
  padding: var(--asc-esp-4) var(--asc-esp-6);
  border: var(--asc-trait-moyen) solid var(--asc-basalte);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  box-shadow: var(--asc-ombre-4);
  pointer-events: none;
  z-index: var(--asc-plan-6);
}

.asc-lieu-bulle[hidden] {
  display: none;
}

.asc-lieu-bulle canvas {
  width: var(--asc-dim-32);
  height: var(--asc-dim-32);
  image-rendering: pixelated;
}

.asc-lieu-bulle--appel {
  min-width: var(--asc-dim-32);
  background: var(--asc-case-jaune);
  font-weight: 900;
  font-size: var(--asc-texte-18);
}

.asc-lieu-bulle-texte {
  width: 100%;
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: var(--asc-texte-11);
}

.asc-mj-verdict {
  margin: var(--asc-esp-4) 0 var(--asc-esp-8);
  font-size: var(--asc-texte-21);
  font-weight: 900;
}

.asc-mj-verdict.is-ok {
  color: var(--asc-lagon-clair);
}

.asc-mj-verdict.is-ko {
  color: var(--asc-saumon);
}

.asc-mj-paye {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-6);
  font-weight: 800;
}

.asc-mj-paye img {
  width: var(--asc-dim-16);
  height: var(--asc-dim-13);
  image-rendering: pixelated;
}


/* ================================================================================================
   MODULE MONDE  (ex-monde.css)
   ================================================================================================ */

/* Le monde (carte Task #14) : panneaux de sortie, plan de l'île, fondu de voyage. Chargé par modules/monde.js. */

.asc-label--sortie {
  background: var(--asc-case-jaune);
  color: var(--asc-nuit-profonde);
  border: var(--asc-trait-moyen) solid var(--asc-lampadaire-sombre);
}

.asc-monde-plan-bouton[hidden] {
  display: none;
}

/* Le plan de l'île : une carte dessinée, une pastille par zone. */
.asc-monde-plan {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-7);
  width: min(var(--asc-fenetre-large), calc(100vw - var(--asc-marge-ecran)));
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  box-shadow: var(--asc-ombre-9);
}

.asc-monde-plan[hidden] {
  display: none;
}

.asc-monde-plan-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--asc-esp-10);
  font-size: var(--asc-texte-18);
}

/* La case "Afficher la mini-carte" sous le plan de l'île (carte #78). */
/* Une case à cocher sous un contenu : "Afficher la mini-carte" du plan, "Ne plus afficher" de la modale de sortie. */
.asc-monde-plan-option,
.asc-sortie-option {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  margin-top: var(--asc-esp-10);
  font-weight: 700;
  cursor: pointer;
}

.asc-monde-plan-option input,
.asc-sortie-option input {
  width: var(--asc-dim-24);
  height: var(--asc-dim-24);
  margin: 0;
  accent-color: var(--asc-theme);
  cursor: pointer;
}

.asc-monde-ile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--asc-rayon);
  background: var(--asc-case-bleue);
  overflow: hidden;
}

/* Chaque zone vue du dessus, centrée sur sa place du plan. */
.asc-monde-vignette {
  position: absolute;
  width: 30%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
  cursor: pointer;
}

.asc-monde-vignette.is-ici {
  cursor: default;
}

.asc-monde-zone {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--asc-esp-5) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-ombre-violette);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font: inherit;
  font-size: var(--asc-texte-8);
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.asc-monde-zone small {
  font-size: var(--asc-texte-1);
  font-weight: 700;
}

.asc-monde-zone.is-ici {
  background: var(--asc-case-jaune);
  cursor: default;
}

.asc-monde-plan-aide {
  margin: var(--asc-esp-10) 0 0;
  font-size: var(--asc-texte-8);
}

/* Fondu pendant le changement de zone. */
.asc-monde-voile {
  position: absolute;
  inset: 0;
  z-index: var(--asc-plan-8);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--asc-basalte);
  color: var(--asc-creme);
  font-size: var(--asc-texte-21);
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.asc-monde-voile.is-visible {
  opacity: 1;
  pointer-events: auto;
}
/* La minimap ronde, en bas à gauche comme dans GTA (zone bas-gauche du calque d'interface). */
.asc-minimap {
  width: var(--asc-minimap-taille);
  height: var(--asc-minimap-taille);
  padding: 0;
  border: var(--asc-minimap-contour) solid var(--asc-nuit);
  border-radius: var(--asc-rond);
  overflow: hidden;
  background: var(--asc-case-bleue);
  box-shadow: 0 0 0 var(--asc-minimap-liseret) var(--asc-creme), 0 4px 0 var(--asc-minimap-liseret) rgba(var(--asc-nuit-profonde-rgb), 0.3);
  cursor: pointer;
}

.asc-minimap[hidden] {
  display: none;
}

.asc-minimap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 600px) {
  .asc-minimap {
    width: var(--asc-minimap-taille-mobile);
    height: var(--asc-minimap-taille-mobile);
  }

  .asc-monde-zone {
    font-size: var(--asc-texte-2);
    padding: var(--asc-esp-3) var(--asc-esp-6);
  }
}


/* ================================================================================================
   MODULE MULTIJOUEUR  (ex-multijoueur.css)
   ================================================================================================ */

/*
 * MULTIJOUEUR ET CHAT EN BULLES (carte Task #15) : noms au-dessus des têtes, bulles façon Habbo,
 * barre de chat en bas de l'écran, annonces du système. Chargé par src/modules/multijoueur.js
 * (page /jouer) et par l'écran Modération du back-office.
 */

/* Calque des noms et des bulles, par-dessus le canvas. */
.asc-mj-calque {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: var(--asc-plan-2);
}

.asc-mj-nom {
  position: absolute;
  left: 0;
  top: 0;
  padding: var(--asc-esp-1) var(--asc-esp-8);
  border: 0;
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-basalte-rgb), 0.72);
  color: var(--asc-creme);
  font: 700 var(--asc-texte-5)/1.4 "Nunito", "Trebuchet MS", Arial, sans-serif;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
}

.asc-mj-nom:hover {
  background: rgba(var(--asc-basalte-rgb), 0.9);
}

/* Les bulles d'un joueur, empilées au-dessus de sa tête (la plus récente en bas). */
.asc-mj-bulles {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-3);
  width: max-content;
  max-width: var(--asc-dim-260);
}

.asc-mj-bulle {
  position: relative;
  max-width: var(--asc-dim-260);
  padding: var(--asc-esp-4) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-basalte);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-basalte);
  font: 600 var(--asc-texte-8)/1.3 "Nunito", "Trebuchet MS", Arial, sans-serif;
  overflow-wrap: anywhere;
  box-shadow: var(--asc-ombre-6);
  animation: asc-mj-apparait 0.15s ease-out;
  transition: opacity 0.4s;
}

.asc-mj-bulle:last-child::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--asc-basalte);
  border-bottom: 0;
}

.asc-mj-bulle--murmurer {
  border-style: dashed;
  background: rgba(var(--asc-creme-rgb), 0.82);
  font-style: italic;
}

.asc-mj-bulle--crier {
  background: var(--asc-case-jaune);
  font-weight: 800;
  text-transform: uppercase;
}

.asc-mj-bulle.is-partie {
  opacity: 0;
}

@keyframes asc-mj-apparait {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* Annonces du système, en haut de l'écran. */
.asc-mj-annonces {
  position: absolute;
  top: var(--asc-esp-52);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
  width: min(var(--asc-dim-560), calc(100% - var(--asc-dim-32)));
  pointer-events: none;
  z-index: var(--asc-plan-3);
}

.asc-mj-annonce {
  padding: var(--asc-esp-8) var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-basalte);
  color: var(--asc-case-jaune);
  font: 700 var(--asc-texte-11)/1.35 "Nunito", "Trebuchet MS", Arial, sans-serif;
  text-align: center;
  box-shadow: var(--asc-ombre-4);
}

/* La barre de chat, en bas de l'écran. */
.asc-mj-chat {
  position: absolute;
  left: 50%;
  bottom: var(--asc-esp-16);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--asc-esp-6);
  width: min(620px, calc(100% - var(--asc-dim-32)));
  padding: var(--asc-esp-6);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.92);
  box-shadow: var(--asc-ombre-1);
  z-index: var(--asc-plan-4);
}

.asc-mj-modes {
  display: flex;
  gap: var(--asc-esp-2);
}

.asc-mj-mode,
.asc-mj-envoyer {
  padding: var(--asc-esp-6) 9px;
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  font: 700 var(--asc-texte-6)/1 "Nunito", "Trebuchet MS", Arial, sans-serif;
  cursor: pointer;
}

.asc-mj-mode.is-actif {
  background: var(--asc-ombre-violette);
  color: var(--asc-creme);
}

.asc-mj-envoyer {
  background: var(--asc-theme);
  color: var(--asc-theme-texte);
}

.asc-mj-champ {
  flex: 1;
  min-width: 0;
  padding: var(--asc-esp-7) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-lagon-nuit);
  border-radius: var(--asc-rayon);
  font: 600 var(--asc-texte-14)/1.2 "Nunito", "Trebuchet MS", Arial, sans-serif;
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}

.asc-mj-champ:focus {
  outline: none;
  border-color: var(--asc-ombre-violette);
}

.asc-mj-erreur {
  position: absolute;
  left: var(--asc-esp-8);
  right: var(--asc-esp-8);
  bottom: calc(100% + var(--asc-esp-6));
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-tole-rouge);
  color: var(--asc-creme);
  font: 700 var(--asc-texte-8)/1.3 "Nunito", "Trebuchet MS", Arial, sans-serif;
}

/* Mise à jour du jeu : bandeau en haut au centre, avant le rechargement de la page. */
.asc-mj-rechargement {
  position: absolute;
  top: var(--asc-esp-12);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - var(--asc-dim-32));
  padding: var(--asc-esp-8) var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-tole-rouge);
  color: var(--asc-creme);
  font: 700 var(--asc-texte-11)/1.3 "Nunito", "Trebuchet MS", Arial, sans-serif;
  text-align: center;
  z-index: var(--asc-plan-50);
  pointer-events: none;
}

@media (pointer: coarse) {
  /* Sur téléphone, la barre se range à droite du joystick. */
  .asc-mj-chat {
    left: 164px;
    right: var(--asc-esp-12);
    width: auto;
    transform: none;
    flex-wrap: wrap;
  }

  .asc-mj-modes {
    width: 100%;
  }

  .asc-mj-mode {
    flex: 1;
  }

}

/* Écran Modération : la liste des mots défile au-delà d'une hauteur d'écran. */
.asc-mod-mots {
  max-height: var(--asc-dim-520);
  overflow-y: auto;
}


/* ================================================================================================
   MODULE PARRAINAGE  (carte #47) : app Créateur du téléphone, badge Créateur de la fiche publique
   ================================================================================================ */

.asc-crea {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  color: var(--asc-nuit-profonde);
}

.asc-crea-titre {
  font-size: var(--asc-texte-18);
  font-weight: 800;
}

.asc-crea-bloc {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
  padding: var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-ecume);
}

.asc-crea-sous-titre,
.asc-crea-nom {
  font-weight: 800;
}

.asc-crea-texte,
.asc-crea-meta,
.asc-crea-legal {
  margin: 0;
  font-size: var(--asc-texte-11);
}

.asc-crea-legal {
  font-style: italic;
}

.asc-crea-info {
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  font-size: var(--asc-texte-11);
}

.asc-crea-info.is-erreur {
  font-weight: 700;
}

.asc-crea-badge,
.asc-crea-fiche-badge {
  align-self: flex-start;
  padding: var(--asc-esp-4) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-theme);
  color: var(--asc-nuit-profonde);
  font-weight: 800;
}

.asc-crea-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-6);
}

.asc-crea-champ {
  flex: 1;
  min-width: 0;
  min-height: var(--asc-dim-44);
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border: var(--asc-trait-fin) solid var(--asc-nuit);
  border-radius: var(--asc-rayon);
  font: inherit;
}

.asc-crea-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--asc-dim-44);
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.asc-crea-fiche {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--asc-esp-6);
  margin-top: var(--asc-esp-6);
}

.asc-crea-fiche-compte {
  font-size: var(--asc-texte-11);
  font-weight: 700;
  color: inherit;
}

/* ================================================================================================
   MODULE PASSIFS  (ex-passifs.css)
   ================================================================================================ */

/* Métiers passifs (chantier v2-8) : fenêtres Exploitations, emplacement et comptoir. Depuis la carte #72
   (règle 6), leur corps est un menu en gros boutons (.asc-gb-*, section 47) ; ici, le cadre seulement. */
.asc-passifs-fenetre {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-7);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  width: min(var(--asc-fenetre-etroite), calc(100vw - var(--asc-marge-ecran)));
  max-height: min(78vh, var(--asc-dim-640));
  overflow-y: auto;
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-2);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  -webkit-user-select: none;
  user-select: none;
}

.asc-passifs-entete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--asc-esp-8);
}

.asc-passifs-titre {
  font-size: var(--asc-texte-15);
  font-weight: 800;
}

.asc-passifs-sous-titre {
  font-size: var(--asc-texte-8);
}

.asc-passifs-sous-titre:empty {
  display: none;
}

/* Le menu posé dans le guichet d'un intérieur (coopérative, poissonnerie, cabane, marché). */
.asc-passifs-menu {
  color: var(--asc-creme);
}

.asc-passifs-bloc {
  display: flex;
  flex-direction: column;
  gap: var(--asc-gb-ecart);
}

.asc-passifs-message {
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-lagon-nuit);
  color: var(--asc-creme);
  font-size: var(--asc-texte-9);
}

.asc-passifs-message.is-erreur {
  background: var(--asc-saumon);
  color: var(--asc-nuit-profonde);
}

@media (max-width: 600px) {
  .asc-passifs-fenetre {
    top: auto;
    bottom: var(--asc-esp-12);
    transform: translateX(-50%);
    max-height: 70vh;
  }
}


/* ================================================================================================
   MODULE PEGRE  (ex-pegre.css)
   ================================================================================================ */

/* Pègre et mort RP (chantier v2-4) : bouton et panneaux du jeu, mini-jeu du cambriolage, endormis
   hors ligne, écran de mort ; et les quelques classes de l'onglet Pègre du back-office.
   Chargé par Resources/game/src/modules/pegre.js (lien avec ?v = script compilé) et par la vue admin. */

[class^="asc-pegre-"][hidden] {
  display: none !important;
}

/* ------------------------------------------------------------------ bouton du HUD */

.asc-pegre-bouton {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--asc-esp-4);
}

.asc-pegre-bouton-jauge {
  display: block;
  height: var(--asc-dim-4);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.2);
  overflow: hidden;
}

.asc-pegre-bouton-jauge-remplie,
.asc-pegre-jauge-remplie {
  display: block;
  height: 100%;
  width: var(--asc-pegre-risque, 0%);
  background: var(--asc-feuille);
  transition: width 0.25s linear;
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-pegre-bouton[data-niveau="prudence"] .asc-pegre-bouton-jauge-remplie,
.asc-pegre-jauge--prudence .asc-pegre-jauge-remplie {
  background: var(--asc-peche);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-pegre-bouton[data-niveau="danger"] .asc-pegre-bouton-jauge-remplie,
.asc-pegre-jauge--danger .asc-pegre-jauge-remplie {
  background: var(--asc-tole-rouge);
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

/* ------------------------------------------------------------------ panneaux */

.asc-pegre-panneau {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(var(--asc-fenetre-moyenne), calc(100vw - var(--asc-marge-ecran)));
  max-height: calc(100vh - var(--asc-dim-120));
  overflow-y: auto;
  padding: var(--asc-esp-14) var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-5);
  z-index: var(--asc-plan-8);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

/* Lot 5 (carte #59) : dans la maison cambriolée, le panneau se range à droite pour laisser voir la pièce. */
.asc-pegre-panneau--maison {
  top: var(--asc-dim-120);
  left: auto;
  right: var(--asc-esp-16);
  transform: none;
  width: min(var(--asc-fenetre-etroite), calc(100vw - var(--asc-marge-ecran)));
}

.asc-pegre-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
  margin-bottom: var(--asc-esp-8);
}

.asc-pegre-titre {
  margin: 0;
  font-size: var(--asc-texte-18);
  font-weight: 900;
}

.asc-pegre-corps {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-10);
}

.asc-pegre-libelle {
  font-size: var(--asc-texte-6);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--asc-creme);
}

.asc-pegre-aide {
  margin: 0;
  font-size: var(--asc-texte-8);
  color: var(--asc-creme);
}

.asc-pegre-replique {
  margin: 0;
  font-weight: 800;
}

.asc-pegre-replique.is-alarme {
  color: var(--asc-saumon);
}

.asc-pegre-saisie {
  display: flex;
  gap: var(--asc-esp-6);
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ jauges */

.asc-pegre-jauge {
  height: var(--asc-dim-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  overflow: hidden;
}

.asc-pegre-jauge--discretion .asc-pegre-jauge-remplie {
  background: var(--asc-lagon-nuit);
}

.asc-pegre-jauge--temps .asc-pegre-jauge-remplie {
  background: var(--asc-peche);
}

/* ------------------------------------------------------------------ cambriolage */

.asc-pegre-camb-jauges {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--asc-esp-6) var(--asc-esp-10);
}

.asc-pegre-trouve {
  margin: 0;
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-sable);
  font-weight: 800;
}

.asc-pegre-cachettes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--asc-esp-8);
}

.asc-pegre-cachette {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-2);
  padding: var(--asc-esp-10) var(--asc-esp-8);
  border: var(--asc-trait-moyen) solid var(--asc-creme);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.asc-pegre-cachette:hover:not(:disabled) {
  border-color: var(--asc-lagon-nuit);
}

.asc-pegre-cachette.is-fouillee {
  background: var(--asc-creme);
  cursor: default;
}

.asc-pegre-cachette-nom {
  font-weight: 800;
  font-size: var(--asc-texte-11);
}

.asc-pegre-cachette-etat {
  font-size: var(--asc-texte-6);
  color: var(--asc-creme);
}

/* Barre de progression de la fouille, sur la durée réglée (variable posée par pegre.js). */
.asc-pegre-cachette.is-en-cours::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: var(--asc-dim-4);
  width: 100%;
  background: var(--asc-lagon-nuit);
  transform-origin: left;
  animation: asc-pegre-fouille var(--asc-pegre-fouille, 4s) linear forwards;
}

@keyframes asc-pegre-fouille {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ------------------------------------------------------------------ endormis hors ligne */

.asc-pegre-calque {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: var(--asc-plan-2);
}

.asc-pegre-endormi {
  position: absolute;
  left: 0;
  top: 0;
  padding: var(--asc-esp-1) var(--asc-esp-8);
  border: 0;
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-ombre-violette-rgb), 0.75);
  color: var(--asc-creme);
  font: 700 var(--asc-texte-4)/1.4 "Nunito", "Trebuchet MS", Arial, sans-serif;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
}

/* ------------------------------------------------------------------ mort RP */

.asc-pegre-mort {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--asc-basalte-rgb), 0.82);
  z-index: var(--asc-plan-50);
}

.asc-pegre-mort-boite {
  width: min(var(--asc-fenetre-etroite), calc(100vw - var(--asc-marge-ecran)));
  padding: var(--asc-esp-20);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  text-align: center;
  box-shadow: 0 6px 0 rgba(var(--asc-nuit-profonde-rgb), 0.3);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-pegre-mort-titre {
  margin: 0 0 var(--asc-esp-8);
  font-size: var(--asc-texte-22);
  font-weight: 900;
}

/* ------------------------------------------------------------------ onglet Pègre (back-office) */

.asc-pegre-filtre {
  max-width: 12rem;
}

.asc-pegre-filtre-type {
  max-width: 16rem;
}

.asc-pegre-colonne-jauge {
  min-width: 8rem;
}

.asc-pegre-progress {
  width: 100%;
  height: 8px;
  accent-color: var(--asc-feuille);
}

.asc-pegre-progress--prudence {
  accent-color: var(--asc-peche);
}

.asc-pegre-progress--danger {
  accent-color: var(--asc-tole-rouge);
}


/* ================================================================================================
   MODULE PERSONNAGE  (ex-personnage.css)
   ================================================================================================ */

/* Personnage (carte Task #5) : HUD des besoins, création, fiche publique, KO. Chargé par
   Resources/game/src/modules/personnage.js. Couleurs de la page du jeu (jouer.css). */

/* HUD des 4 besoins, en haut à gauche. */
.asc-besoins {
  position: absolute;
  top: var(--asc-esp-12);
  left: var(--asc-esp-12);
  width: 190px;
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-nuit-rgb), 0.9);
  box-shadow: var(--asc-ombre-3);
  color: var(--asc-creme);
  font-size: var(--asc-texte-6);
  font-weight: 800;
  z-index: var(--asc-plan-6);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-besoins-jauge {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-6);
  margin: var(--asc-esp-3) 0;
}

.asc-besoins-nom {
  width: var(--asc-dim-58);
  flex: none;
}

.asc-besoins-barre {
  flex: 1;
  height: 9px;
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  overflow: hidden;
}

.asc-besoins-plein {
  display: block;
  height: 100%;
  width: 100%;
  transition: width 0.6s linear;
}

.asc-besoins-jauge--faim .asc-besoins-plein { background: var(--asc-peche); }
.asc-besoins-jauge--energie .asc-besoins-plein { background: var(--asc-case-jaune); }
.asc-besoins-jauge--hygiene .asc-besoins-plein { background: var(--asc-case-bleue); }
.asc-besoins-jauge--moral .asc-besoins-plein { background: var(--asc-neon-violet); }

.asc-besoins-jauge.is-bas .asc-besoins-nom { color: var(--asc-saumon); }
.asc-besoins-jauge.is-bas .asc-besoins-plein { background: var(--asc-tole-rouge); }

.asc-besoins-malus {
  margin-top: var(--asc-esp-4);
  color: var(--asc-saumon);
  font-size: var(--asc-texte-4);
}

.asc-besoins-fiche {
  margin-top: var(--asc-esp-6);
  width: 100%;
  padding: var(--asc-esp-4) 0;
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-ombre-violette);
  color: var(--asc-creme);
  font: inherit;
  cursor: pointer;
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-besoins-quitter {
  margin-top: var(--asc-esp-4);
  background: var(--asc-nuit);
}

/* Modales du personnage (création, fiche). */
.asc-perso-modale {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--asc-esp-16);
  background: rgba(var(--asc-basalte-rgb), 0.55);
  z-index: var(--asc-plan-20);
  touch-action: auto;
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-perso-modale-carte {
  width: 100%;
  max-width: var(--asc-dim-560);
  max-height: calc(100vh - var(--asc-dim-32));
  overflow-y: auto;
  padding: var(--asc-esp-18) var(--asc-esp-20);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: 0 4px 0 rgba(var(--asc-nuit-profonde-rgb), 0.2);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-perso-modale-titre {
  margin: 0 0 var(--asc-esp-4);
  font-size: var(--asc-texte-22);
}

.asc-perso-modale-erreur {
  margin: var(--asc-esp-10) 0;
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  font-size: var(--asc-texte-11);
  font-weight: 700;
}

.asc-perso-bouton {
  display: block;
  width: 100%;
  margin-top: var(--asc-esp-12);
}

/* Rendre visite grisé (porte fermée, pas de studio) : carte #45. */
.asc-perso-bouton:disabled {
  opacity: var(--asc-opacite-55);
  cursor: default;
}

/* Création : aperçu de l'avatar + champs. */
.asc-perso-creation-corps {
  display: flex;
  gap: var(--asc-esp-16);
}

.asc-perso-creation-apercu {
  flex: none;
  width: var(--asc-dim-96);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: var(--asc-esp-8);
}

.asc-perso-creation-champs {
  flex: 1;
  min-width: 0;
}

.asc-perso-avatar {
  width: var(--asc-dim-72);
  height: auto;
  image-rendering: pixelated;
}

.asc-perso-creation-apercu .asc-perso-avatar {
  width: var(--asc-dim-90);
}

.asc-perso-choix {
  display: flex;
  flex-wrap: wrap;
  gap: var(--asc-esp-5);
}

.asc-perso-choix-bouton {
  padding: var(--asc-esp-4) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-creme);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font: inherit;
  font-size: var(--asc-texte-6);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--asc-relief-bouton);
  font-family: var(--asc-police-titres);
}

.asc-perso-choix-bouton--couleur {
  width: var(--asc-dim-40);
  height: var(--asc-dim-40);
  padding: 0;
  border-radius: var(--asc-rond);
  position: relative;
}

.asc-perso-choix-bouton.is-choisi {
  border-color: var(--asc-ombre-violette);
  box-shadow: 0 0 0 2px var(--asc-creme) inset;
}

/* Fiche publique façon Habbo : l'en-tête (avatar, nom, métier, badges), puis le menu en gros boutons (carte #75). */
.asc-perso-fiche {
  max-width: var(--asc-dim-420);
}

.asc-perso-fiche-tete {
  display: flex;
  gap: var(--asc-esp-14);
  align-items: center;
}

.asc-perso-fiche-nom {
  font-size: var(--asc-texte-20);
  font-weight: 800;
}

.asc-perso-fiche-ligne {
  font-size: var(--asc-texte-8);
}

.asc-perso-fiche-bloc {
  margin-top: var(--asc-esp-12);
  font-size: var(--asc-texte-6);
  font-weight: 800;
}

.asc-perso-fiche-niveau {
  color: var(--asc-creme);
}

.asc-perso-fiche-menu {
  margin-top: var(--asc-esp-12);
}

/* KO : voile sur la ville pendant le séjour à l'hôpital. */
.asc-perso-ko {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--asc-esp-16);
  background: rgba(var(--asc-tole-rouge-sombre-rgb), 0.35);
  /* Sous le calque d'interface (z-index 6) et sans capter les clics : le bouton God, le chat et le HUD
     restent utilisables pendant le KO ; le perso, lui, est bloqué par jeu.etat.bloque. */
  z-index: var(--asc-plan-5);
  pointer-events: none;
}

.asc-perso-ko-carte {
  max-width: var(--asc-dim-380);
  padding: var(--asc-esp-16) var(--asc-esp-20);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  text-align: center;
}

.asc-perso-ko-titre {
  font-size: var(--asc-texte-21);
  font-weight: 800;
  color: var(--asc-saumon);
}

.asc-perso-ko-texte {
  margin-top: var(--asc-esp-6);
  font-size: var(--asc-texte-11);
}

.asc-perso-ko-reste {
  margin-top: var(--asc-esp-10);
  font-size: var(--asc-texte-23);
  font-weight: 800;
}

/* KO animé (carte #38, modules/ko.js) : un bandeau en haut au lieu du voile plein écran (le jeu reste visible,
   chat et téléphone utilisables), la bulle de l'infirmière au réveil, un message de fin. Sans clic. */
.asc-ko-bandeau {
  position: absolute;
  top: var(--asc-esp-12);
  left: 50%;
  transform: translateX(-50%);
  max-width: min(var(--asc-dim-380), calc(100vw - var(--asc-dim-32)));
  padding: var(--asc-esp-8) var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  text-align: center;
  pointer-events: none;
  z-index: var(--asc-plan-5);
}

.asc-ko-titre {
  font-weight: 800;
  color: var(--asc-saumon);
}

.asc-ko-texte {
  margin-top: var(--asc-esp-4);
  font-size: var(--asc-texte-11);
}

.asc-ko-reste {
  margin-top: var(--asc-esp-4);
  font-size: var(--asc-texte-21);
  font-weight: 800;
}

.asc-ko-bulle {
  position: absolute;
  top: 0;
  left: 0;
  max-width: var(--asc-dim-260);
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit);
  font-size: var(--asc-texte-11);
  pointer-events: none;
  z-index: var(--asc-plan-5);
}

.asc-ko-bulle-facture {
  margin-top: var(--asc-esp-4);
  font-weight: 700;
  color: var(--asc-tole-rouge);
}
@media (max-width: 520px) {
  .asc-besoins {
    width: var(--asc-dim-150);
    font-size: var(--asc-texte-2);
  }

  .asc-besoins-nom {
    width: 48px;
  }

  .asc-perso-creation-corps {
    flex-direction: column;
    align-items: center;
  }
}


/* ================================================================================================
   MODULE RENTIER  (ex-rentier.css)
   ================================================================================================ */

/* Rentier (chantier v3-6) : fenêtres Rentier, Distributeur et Location. Depuis la carte #72 (règle 6),
   leur corps est un menu en gros boutons (.asc-gb-*, section 47) ; ici, le cadre seulement. */
.asc-rent-fenetre {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-7);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  width: min(var(--asc-fenetre-moyenne), calc(100vw - var(--asc-marge-ecran)));
  max-height: min(80vh, var(--asc-dim-660));
  overflow-y: auto;
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-2);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-rent-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
}

.asc-rent-titre {
  font-size: var(--asc-texte-15);
  font-weight: 800;
}

/* Le menu posé dans le téléphone ou le guichet de la gendarmerie : sur fond nuit, comme la fenêtre. */
.asc-rent-menu:not(.asc-rent-corps) {
  padding: var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
}

/* Un champ et son libellé au-dessus (remplir, prix, location). */
.asc-rent-etiquette-champ {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-2);
  color: var(--asc-peche);
  font-size: var(--asc-texte-9);
}

.asc-rent-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-8) 0;
  border-bottom: var(--asc-trait-fin) solid var(--asc-lagon-nuit);
}

.asc-rent-nom {
  display: flex;
  flex: 1 1 140px;
  flex-direction: column;
}

.asc-rent-detail {
  color: var(--asc-creme);
  font-size: var(--asc-texte-7);
  font-weight: 700;
}

.asc-rent-section {
  margin: var(--asc-esp-12) 0 var(--asc-esp-4);
  font-weight: 800;
}

.asc-rent-vide {
  color: var(--asc-creme);
}

.asc-rent-badge-service {
  display: inline-block;
  margin: var(--asc-esp-4) 0;
  padding: var(--asc-esp-3) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-ardoise-nuit);
  color: var(--asc-creme);
  font-size: var(--asc-texte-8);
  font-weight: 800;
}

/* Le panneau de patrouille du policier en service, en haut à gauche. */
.asc-rent-patrouille {
  position: absolute;
  top: var(--asc-esp-52);
  left: var(--asc-esp-16);
  z-index: var(--asc-plan-6);
  width: min(var(--asc-fenetre-260), calc(100vw - var(--asc-marge-ecran)));
  max-height: 46vh;
  overflow-y: auto;
  padding: var(--asc-esp-10) var(--asc-esp-12);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-creme-rgb), 0.95);
  color: var(--asc-nuit-profonde);
  box-shadow: var(--asc-ombre-1);
}

/* Les étiquettes posées sur la carte (hors service, à louer, recherché). */
.asc-rent-etiquettes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.asc-rent-etiquette {
  position: absolute;
  top: 0;
  left: 0;
  padding: var(--asc-esp-2) var(--asc-esp-7);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-size: var(--asc-texte-4);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--asc-ombre-7);
}

.asc-rent-etiquette--offre {
  background: var(--asc-lagon-clair);
  color: var(--asc-creme);
}

.asc-rent-etiquette--casse {
  background: var(--asc-galet);
  color: var(--asc-creme);
}

.asc-rent-etiquette--recherche {
  background: var(--asc-tole-rouge);
  color: var(--asc-creme);
}



/* ================================================================================================
   MODULE VEHICULES  (ex-vehicules.css)
   ================================================================================================ */

/* Véhicules et transports (chantier v2-6) : boutons Descendre et Garage du HUD, panneaux de la concession,
   du garage, du taxi et du bus, message du jeu. Chargé par modules/vehicules.js (?v = script compilé). */

.asc-veh-hud {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--asc-esp-8);
}

.asc-veh-hud[hidden],
.asc-veh-hud.is-cache,
.asc-veh-panneau[hidden],
.asc-veh-btn[hidden] {
  display: none;
}

.asc-veh-panneau {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-7);
  width: min(var(--asc-fenetre-etroite), calc(100vw - var(--asc-marge-ecran)));
  max-height: min(78vh, var(--asc-dim-640));
  overflow-y: auto;
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-2);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  -webkit-user-select: none;
  user-select: none;
}

.asc-veh-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-8);
  margin-bottom: var(--asc-esp-6);
  font-size: var(--asc-texte-18);
}

.asc-veh-aide {
  margin: 0 0 var(--asc-esp-10);
  color: var(--asc-creme);
  font-size: var(--asc-texte-11);
}

.asc-veh-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--asc-esp-10);
  padding: var(--asc-esp-8) 0;
  border-top: var(--asc-trait-fin) solid var(--asc-creme);
}

.asc-veh-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.asc-veh-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--asc-esp-6);
}

.asc-veh-petit {
  color: var(--asc-creme);
  font-size: var(--asc-texte-7);
}

.asc-veh-pastille {
  display: inline-block;
  width: var(--asc-dim-10);
  height: var(--asc-dim-10);
  margin-right: var(--asc-esp-6);
  border-radius: var(--asc-rond);
  background: var(--asc-veh-couleur, var(--asc-brume));
}

.asc-veh-attente {
  margin: 0 0 var(--asc-esp-8);
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  font-weight: 700;
}

.asc-veh-attente.is-la {
  background: var(--asc-case-jaune);
  color: var(--asc-nuit-profonde);
}

/* La concession en gros boutons (carte #74) : la teinte en gros sur la fiche, les icônes des teintes à leur
   couleur (variable --asc-veh-couleur posée sur la tuile par vehicules.js). */
.asc-veh-teinte-grande {
  display: inline-block;
  width: var(--asc-dim-32);
  height: var(--asc-dim-32);
  border: var(--asc-trait-moyen) solid var(--asc-creme);
  border-radius: var(--asc-rayon);
  background: var(--asc-veh-couleur, var(--asc-brume));
}

.asc-veh-corps button[data-tuile="couleur"] .asc-gb-icone,
.asc-veh-corps button[data-tuile^="teinte-"] .asc-gb-icone {
  color: var(--asc-veh-couleur, currentColor);
}
/* Le bus qui roule (modules/bus_pnj.js, 28/10/2026) : le bandeau du passager en haut de l'écran (ligne, arrêt
   suivant, descente choisie, DESCENDRE). Le panneau de l'arrêt reprend .asc-veh-panneau et les gros boutons. */
.asc-bus-bandeau {
  position: absolute;
  top: var(--asc-esp-12);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--asc-plan-7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-4);
  max-width: min(var(--asc-dim-380), calc(100vw - var(--asc-dim-32)));
  padding: var(--asc-esp-8) var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  text-align: center;
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

.asc-bus-bandeau[hidden] {
  display: none;
}

.asc-bus-titre {
  font-weight: 800;
  color: var(--asc-case-jaune);
}

.asc-bus-texte {
  font-size: var(--asc-texte-11);
}

.asc-bus-descendre,
.asc-bus-choisir {
  margin-top: var(--asc-esp-4);
}

/* CHOISIR L'ARRÊT (01/11/2026) : les arrêts suivants en boutons, sous le bandeau du passager. */
.asc-bus-arrets {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-4);
}

.asc-bus-arrets[hidden] {
  display: none;
}


/* ================================================================================================
   ACCUEIL ET PAGES DE COMPTE  (carte #7)
   Pages publiques du module (body.asc-site : accueil, pages légales ;
   vues Resources/views/front/site) et pages de compte du cœur (connexion, inscription, mot de passe,
   invitation) habillées par AuthPages::stylesheet, repérées par .authentication-wrapper.
   Couleur : le thème (--asc-theme*), que "Je suis un" coché remplace en direct (bloc THÈMES).
   ================================================================================================ */

html:has(> body.asc-site), body.asc-site {
  margin: 0;
  min-height: 100%;
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  font-family: var(--asc-police-texte);
  font-size: var(--asc-texte-22);
  line-height: 1.35;
}
.asc-site-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  image-rendering: pixelated;
}
.asc-site-ecran {
  position: relative;
  z-index: var(--asc-plan-2);
  min-height: 100vh;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 430px) minmax(0, 330px);
  justify-content: space-between;
  gap: var(--asc-marge-ecran-24);
  align-items: start;
  padding: var(--asc-marge-ecran-24) var(--asc-marge-ecran-24) var(--asc-esp-120);
}
.asc-site-ecran--centre { grid-template-columns: minmax(0, 720px); justify-content: center; }
.asc-site-fenetre {
  background: var(--asc-creme);
  color: var(--asc-basalte);
  border: var(--asc-trait-epais) solid var(--asc-basalte);
  box-shadow: inset 0 0 0 var(--asc-dim-2) var(--asc-creme-clair), 0 0 0 var(--asc-dim-2) var(--asc-theme-clair), var(--asc-theme-halo), var(--asc-ombre-9);
}
.asc-site-fenetre-tete {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-6) var(--asc-esp-8) var(--asc-esp-6) var(--asc-esp-12);
  background: var(--asc-theme);
  color: var(--asc-theme-texte);
  font-family: var(--asc-police-titres);
  font-size: var(--asc-texte-21);
  border-bottom: var(--asc-trait-epais) solid var(--asc-basalte);
}
.asc-site-fenetre-corps { padding: var(--asc-esp-18); }
.asc-site-fenetre-corps p { margin: 0 0 var(--asc-esp-14); }
.asc-site-fermer {
  margin-left: auto;
  width: var(--asc-dim-24);
  height: var(--asc-dim-24);
  border: 0;
  cursor: pointer;
  background: var(--asc-ardoise);
  color: var(--asc-creme);
  font-family: var(--asc-police-titres);
  box-shadow: var(--asc-relief-bouton);
}
.asc-site-logo {
  margin: var(--asc-esp-4) 0 var(--asc-esp-14);
  font-family: var(--asc-police-titres);
  font-weight: 700;
  font-size: 3.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--asc-theme-clair);
  -webkit-text-stroke: var(--asc-trait-fin) var(--asc-basalte);
  text-shadow: 4px 4px 0 var(--asc-basalte), var(--asc-theme-halo);
}
.asc-site-accroche { font-family: var(--asc-police-titres); font-size: 1.6rem; line-height: 1.1; }
.asc-site-accroche em { font-style: normal; background: var(--asc-nuit); color: var(--asc-theme-clair); padding: 0 var(--asc-esp-6); }
.asc-site-encart { background: var(--asc-nuit); color: var(--asc-creme); padding: var(--asc-esp-10) var(--asc-esp-12); }
.asc-site-champ {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: var(--asc-esp-12);
  padding: var(--asc-esp-10) var(--asc-esp-12);
  font-family: var(--asc-police-texte);
  font-size: var(--asc-texte-22);
  border: var(--asc-trait-epais) solid var(--asc-basalte);
  background: var(--asc-creme-clair);
  box-shadow: inset 3px 3px 0 var(--asc-creme-sombre);
}
.asc-site-champ:focus { outline: var(--asc-trait-epais) solid var(--asc-theme-clair); }
.asc-site-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: var(--asc-esp-12) var(--asc-esp-20);
  border: 0;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: var(--asc-police-titres);
  font-weight: 700;
  font-size: 1.6rem;
  background: var(--asc-theme);
  color: var(--asc-theme-texte);
  box-shadow: var(--asc-relief-bouton), 0 5px 0 var(--asc-basalte);
}
.asc-site-btn:hover { background: var(--asc-theme-survol); }
.asc-site-btn:active { transform: translateY(3px); box-shadow: var(--asc-relief-bouton), 0 2px 0 var(--asc-basalte); }
.asc-site-petit { margin-top: var(--asc-esp-10); font-size: var(--asc-texte-14); color: var(--asc-ardoise); text-align: center; }
.asc-site-lien { display: block; margin-top: var(--asc-esp-14); text-align: center; color: var(--asc-bleu-nuit); }

/* "Je suis un" : trois boutons à cocher, celui coché prend le thème qu'il donne. */
.asc-site-genre { border: 0; margin: 0 0 var(--asc-esp-14); padding: 0; display: flex; flex-wrap: wrap; gap: var(--asc-esp-8); align-items: center; }
.asc-site-genre legend { float: left; margin-right: var(--asc-esp-8); font-family: var(--asc-police-titres); }
.asc-site-genre-choix { position: relative; cursor: pointer; }
.asc-site-genre-choix input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.asc-site-genre-choix span {
  display: inline-block;
  padding: var(--asc-esp-6) var(--asc-esp-14);
  font-family: var(--asc-police-titres);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-relief-bouton);
}
.asc-site-genre-choix input:checked + span { background: var(--asc-theme); color: var(--asc-theme-texte); outline: var(--asc-trait-moyen) solid var(--asc-basalte); }
.asc-site-genre-choix input:focus-visible + span { outline: var(--asc-trait-epais) solid var(--asc-theme-clair); }

/* Journal de l'île. */
.asc-site-compteur { font-family: var(--asc-police-titres); font-size: var(--asc-texte-24); }
.asc-site-compteur::before {
  content: "";
  display: inline-block;
  width: var(--asc-dim-12);
  height: var(--asc-dim-12);
  margin-right: var(--asc-esp-8);
  background: var(--asc-feuille);
  box-shadow: 0 0 0 var(--asc-dim-2) var(--asc-basalte);
  animation: asc-site-pouls 1s steps(2) infinite;
}
@keyframes asc-site-pouls { 50% { opacity: 0.3; } }
.asc-site-evt { padding: var(--asc-esp-8) 0; border-bottom: var(--asc-dim-2) dashed var(--asc-creme-sombre); font-size: var(--asc-texte-17); }
.asc-site-evt small { display: block; font-size: var(--asc-texte-12); color: var(--asc-ardoise); }

/* Bulles de dialogue posées sur le décor. */
.asc-site-bulle {
  position: fixed;
  z-index: var(--asc-plan-2);
  padding: var(--asc-esp-5) var(--asc-esp-10);
  background: var(--asc-creme-clair);
  color: var(--asc-basalte);
  border: var(--asc-trait-epais) solid var(--asc-basalte);
  font-size: var(--asc-texte-14);
  white-space: nowrap;
  animation: asc-site-flotte 3s steps(3) infinite;
}
.asc-site-bulle--1 { left: 48%; top: 36%; }
.asc-site-bulle--2 { left: 56%; top: 64%; animation-delay: 1.2s; }
@keyframes asc-site-flotte { 50% { transform: translateY(-4px); } }

/* Barre d'activités en bas, et sa fenêtre. */
.asc-site-dock {
  position: fixed;
  z-index: var(--asc-plan-4);
  left: 50%;
  bottom: var(--asc-esp-14);
  transform: translateX(-50%);
  display: flex;
  gap: var(--asc-esp-6);
  padding: var(--asc-esp-8);
  background: var(--asc-basalte);
  border: var(--asc-trait-epais) solid var(--asc-ardoise);
  box-shadow: 0 0 0 var(--asc-dim-2) var(--asc-theme-clair), var(--asc-theme-halo);
}
.asc-site-dock button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-4);
  padding: var(--asc-esp-8) var(--asc-esp-12);
  border: 0;
  cursor: pointer;
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-family: var(--asc-police-titres);
  font-size: var(--asc-texte-17);
  box-shadow: var(--asc-relief-bouton);
}
.asc-site-dock button:hover, .asc-site-dock button[aria-pressed="true"] { background: var(--asc-theme); color: var(--asc-theme-texte); }
.asc-site-dock canvas { width: var(--asc-dim-36); height: var(--asc-dim-36); image-rendering: pixelated; }
.asc-site-info { position: fixed; z-index: var(--asc-plan-5); left: 50%; bottom: 110px; transform: translateX(-50%); width: min(380px, calc(100% - var(--asc-marge-ecran-24))); }
.asc-site-info[hidden] { display: none; }

/* Pied de page : liens légaux du Pack RGPD et crédits. */
.asc-site-pied { position: fixed; z-index: var(--asc-plan-3); left: var(--asc-esp-12); bottom: var(--asc-esp-10); font-size: var(--asc-texte-12); color: var(--asc-creme-sombre); }
.asc-site-pied a { color: inherit; margin-right: var(--asc-esp-10); text-decoration: none; }
.asc-site-pied a:hover { color: var(--asc-theme-clair); }
.asc-site-pied ul { display: inline; margin: 0; padding: 0; }
.asc-site-pied li { display: inline; }

/* Pages légales et accueil : la page défile, le pied suit le contenu (fixe, il couvrait le bouton Jouer). */
.asc-site--document .asc-site-pied,
.asc-site--accueil .asc-site-pied { position: relative; left: auto; bottom: auto; z-index: var(--asc-plan-2); padding: 0 var(--asc-esp-12) var(--asc-esp-20); }
.asc-site--document .asc-site-ecran { min-height: auto; padding-bottom: var(--asc-esp-28); }

@media (max-width: 1000px) {
  .asc-site-ecran { grid-template-columns: minmax(0, 1fr); padding: var(--asc-esp-12) var(--asc-esp-12) 150px; }
  .asc-site-dock { gap: var(--asc-esp-4); padding: var(--asc-esp-4); max-width: calc(100% - var(--asc-marge-ecran-24)); box-sizing: border-box; }
  .asc-site-dock button { padding: var(--asc-esp-6) var(--asc-esp-6); font-size: var(--asc-texte-12); }
  .asc-site-bulle { display: none; }
  .asc-site-logo { font-size: 2.4rem; }
  .asc-site-pied { position: relative; left: auto; bottom: auto; z-index: var(--asc-plan-2); padding: 0 var(--asc-esp-12) 120px; }
}

/* ---- Pages de compte du cœur (connexion, inscription...) : la carte Materialize aux couleurs du jeu. */
html:has(.authentication-wrapper), body:has(.authentication-wrapper) {
  background: var(--asc-nuit-profonde);
  font-family: var(--asc-police-texte);
}
.authentication-wrapper .card {
  background: var(--asc-creme);
  color: var(--asc-basalte);
  border: var(--asc-trait-epais) solid var(--asc-basalte);
  border-radius: var(--asc-rayon);
  box-shadow: inset 0 0 0 var(--asc-dim-2) var(--asc-creme-clair), 0 0 0 var(--asc-dim-2) var(--asc-theme-clair), var(--asc-theme-halo), var(--asc-ombre-9);
}
.authentication-wrapper .card,
.authentication-wrapper .form-label,
.authentication-wrapper .form-control,
.authentication-wrapper p,
.authentication-wrapper a { font-family: var(--asc-police-texte); }
.authentication-wrapper .app-brand-text,
.authentication-wrapper h1, .authentication-wrapper h2, .authentication-wrapper h3, .authentication-wrapper h4 {
  font-family: var(--asc-police-titres);
  color: var(--asc-theme-clair);
  -webkit-text-stroke: var(--asc-trait-fin) var(--asc-basalte);
  text-shadow: 3px 3px 0 var(--asc-basalte), var(--asc-theme-halo);
}
.authentication-wrapper .form-control,
.authentication-wrapper .form-select,
.authentication-wrapper .input-group-text {
  border: var(--asc-trait-moyen) solid var(--asc-basalte);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme-clair);
  color: var(--asc-basalte);
}
.authentication-wrapper .form-control:focus { border-color: var(--asc-basalte); box-shadow: 0 0 0 var(--asc-dim-2) var(--asc-theme-clair); }
.authentication-wrapper .btn-primary {
  border: 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-theme);
  color: var(--asc-theme-texte);
  font-family: var(--asc-police-titres);
  font-size: var(--asc-texte-22);
  box-shadow: var(--asc-relief-bouton), 0 4px 0 var(--asc-basalte);
}
.authentication-wrapper .btn-primary:hover, .authentication-wrapper .btn-primary:focus { background: var(--asc-theme-survol); color: var(--asc-theme-texte); }
.authentication-wrapper .btn { border-radius: var(--asc-rayon); }
.authentication-wrapper a:not(.btn) { color: var(--asc-bleu-nuit); }
.authentication-wrapper .form-check-input:checked { background-color: var(--asc-theme); border-color: var(--asc-basalte); }
.authentication-wrapper .alert { border-radius: var(--asc-rayon); }
.authentication-wrapper .asc-site-genre legend { font-size: var(--asc-texte-17); }

/* ---- Pages de compte dans la fenêtre Bienvenue (carte #67, AuthPages::layout -> front.compte.enveloppe).
   Aucune feuille du cœur n'est chargée : le formulaire du cœur (classes Bootstrap) est mis en forme ici,
   dans .asc-compte seulement. Étapes : data-etape="choix" (deux gros boutons) puis "formulaire". */
.asc-site-ecran--compte { grid-template-columns: minmax(0, 460px); justify-content: center; align-items: center; }
.asc-compte-logo { display: block; text-align: center; text-decoration: none; }
.asc-compte-logo .asc-site-logo { display: inline-block; }
.asc-compte[data-etape="choix"] [data-asc-compte-formulaire],
.asc-compte[data-etape="formulaire"] [data-asc-compte-choix] { display: none; }
.asc-compte-gros { margin-bottom: var(--asc-esp-14); padding: var(--asc-esp-18) var(--asc-esp-20); font-size: 1.9rem; }
.asc-site-btn--second { background: var(--asc-nuit); color: var(--asc-creme); }
.asc-site-btn--second:hover { background: var(--asc-bleu-nuit); }

/* Le formulaire du cœur : sa carte devient le corps de la fenêtre. */
.asc-compte .authentication-wrapper,
.asc-compte .authentication-inner,
.asc-compte .position-relative { display: block; min-height: 0; padding: 0; margin: 0; background: none; }
.asc-compte .authentication-wrapper .card { border: 0; box-shadow: none; background: none; padding: 0; }
.asc-compte .card-body { padding: 0; }
.asc-compte .app-brand,
.asc-compte .btn-close,
.asc-compte [data-password-toggle],
.asc-compte .d-none { display: none !important; }
.asc-compte h4 { margin: 0 0 var(--asc-esp-8); font-size: var(--asc-texte-24); }
.asc-compte .mb-1, .asc-compte .mb-4, .asc-compte .mb-5 { margin: 0 0 var(--asc-esp-12); }
.asc-compte .d-flex { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--asc-esp-8); }
.asc-compte .text-center { text-align: center; }
.asc-compte .form-floating { display: flex; flex-direction: column-reverse; }
.asc-compte .form-floating label,
.asc-compte .form-label { margin-bottom: var(--asc-esp-4); font-family: var(--asc-police-titres); font-size: var(--asc-texte-17); }
.asc-compte .input-group, .asc-compte .input-group-merge { display: block; }
.asc-compte .form-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: var(--asc-esp-10) var(--asc-esp-12);
  font-family: var(--asc-police-texte);
  font-size: var(--asc-texte-22);
  border: var(--asc-trait-epais) solid var(--asc-basalte);
  border-radius: 0;
  background: var(--asc-creme-clair);
  color: var(--asc-basalte);
  box-shadow: inset 3px 3px 0 var(--asc-creme-sombre);
}
.asc-compte .form-control:focus { outline: var(--asc-trait-epais) solid var(--asc-theme-clair); }
.asc-compte .form-control::placeholder { color: transparent; }
.asc-compte .form-check { display: flex; align-items: center; gap: var(--asc-esp-6); }
.asc-compte .form-check-input { width: var(--asc-dim-24); height: var(--asc-dim-24); margin: 0; accent-color: var(--asc-theme); }
.asc-compte .btn, .asc-compte .btn-primary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: var(--asc-esp-12) var(--asc-esp-20);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: var(--asc-police-titres);
  font-weight: 700;
  font-size: 1.6rem;
  background: var(--asc-theme);
  color: var(--asc-theme-texte);
  box-shadow: var(--asc-relief-bouton), 0 5px 0 var(--asc-basalte);
}
.asc-compte .btn:hover { background: var(--asc-theme-survol); }
.asc-compte .btn-outline-secondary { background: var(--asc-nuit); color: var(--asc-creme); font-size: var(--asc-texte-17); }
.asc-compte .alert { padding: var(--asc-esp-10) var(--asc-esp-12); margin-bottom: var(--asc-esp-12); background: var(--asc-nuit); color: var(--asc-creme); border: 0; border-radius: 0; }
.asc-compte .alert-danger { box-shadow: inset var(--asc-dim-4) 0 0 var(--asc-tole-rouge); }
.asc-compte .invalid-feedback { display: block; margin-top: var(--asc-esp-4); font-size: var(--asc-texte-14); color: var(--asc-basalte); }
.asc-compte .form-text, .asc-compte .small, .asc-compte .text-muted { font-size: var(--asc-texte-14); color: var(--asc-ardoise); }
.asc-compte .divider-text { display: block; margin: var(--asc-esp-8) 0; text-align: center; font-size: var(--asc-texte-14); }
.asc-compte i[class*="ri-"] { display: none; }
/* Le sous-titre de la connexion du cœur (vouvoiement) : la fenêtre a déjà son titre. */
.asc-compte .card-body > .d-flex:first-child > p { display: none; }
.asc-compte .card-body > .d-flex:first-child { justify-content: flex-end; margin: 0; }
.asc-compte .asc-site-genre legend { float: none; width: 100%; margin: 0 0 var(--asc-esp-6); }
@media (max-width: 1000px) {
  .asc-compte-gros { padding: var(--asc-esp-14) var(--asc-esp-12); font-size: 1.4rem; }
}

/* ================================================================================================
 * Autologin des comptes de test (carte #81) : la marque "Compte N" au-dessus de Ma fiche, dans l'onglet
 * ouvert par un lien /jouer?autologin= (modules/autologin.js).
 */
.asc-autologin-marque {
  display: block;
  margin-top: var(--asc-esp-6);
  padding: var(--asc-esp-4) 0;
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-case-jaune);
  font-size: var(--asc-texte-4);
  text-align: center;
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
}

/* ================================================================================================
 * MODULE MIROIR (carte #89, Personnage v2 P3) : s'habiller devant son perso en grand (modules/miroir.js).
 * Le perso au centre sur son socle qui tourne, les cases autour, le sac en bas, puis les gros boutons
 * (.asc-gb-*). Couleurs du socle lues par le JS dans les variables --asc-miroir-* ci-dessous.
 */
.asc-miroir {
  --asc-miroir-socle: var(--asc-ardoise-nuit);
  --asc-miroir-socle-bord: var(--asc-lagon-nuit);
  --asc-miroir-repere: var(--asc-theme);
  --asc-miroir-ombre: var(--asc-nuit-profonde);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-7);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-10);
  width: min(720px, calc(100vw - var(--asc-marge-ecran)));
  max-height: 92vh;
  overflow-y: auto;
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-2);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  -webkit-user-select: none;
  user-select: none;
}

.asc-miroir[hidden] {
  display: none;
}

.asc-miroir-tete {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
}

.asc-miroir-titre {
  font-size: var(--asc-texte-19);
  font-weight: 800;
}

.asc-miroir-corps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--asc-esp-10);
}

.asc-miroir-cases {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
}

.asc-miroir-case {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  min-height: var(--asc-dim-40);
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border: var(--asc-trait-moyen) solid var(--asc-lagon-nuit);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  min-width: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.asc-miroir-case .asc-gb-icone {
  width: var(--asc-dim-24);
  height: var(--asc-dim-24);
}

.asc-miroir-case.is-porte {
  border-color: var(--asc-theme);
}

.asc-miroir-case.is-nu {
  border-style: dashed;
}

.asc-miroir-case.is-cible {
  outline: var(--asc-trait-moyen) solid var(--asc-theme);
  outline-offset: var(--asc-esp-2);
}

.asc-miroir-case:disabled {
  opacity: 0.4;
  cursor: default;
}

.asc-miroir-case-textes {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.asc-miroir-case-nom {
  color: var(--asc-peche);
  font-size: var(--asc-texte-6);
  font-weight: 700;
}

.asc-miroir-case-valeur {
  overflow: hidden;
  font-size: var(--asc-texte-11);
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* La couleur du vêtement, en coin de sa case ou de son bouton du sac. */
.asc-miroir-pastille {
  flex: none;
  width: var(--asc-dim-16);
  height: var(--asc-dim-16);
  margin-left: auto;
  border: var(--asc-trait-moyen) solid var(--asc-creme);
  border-radius: var(--asc-rayon);
  background: var(--asc-miroir-couleur, var(--asc-nuit-profonde));
}

/* La scène : le perso en grand, pixels nets, et les deux flèches pour le faire tourner. */
.asc-miroir-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--asc-esp-10) var(--asc-dim-40);
  border-radius: var(--asc-rayon);
  background: radial-gradient(ellipse at 50% 85%, var(--asc-ardoise-nuit), var(--asc-nuit-profonde) 70%);
}

.asc-miroir-toile {
  width: var(--asc-miroir-toile-l, 240px);
  height: var(--asc-miroir-toile-h, 290px);
  image-rendering: pixelated;
  cursor: grab;
  touch-action: none;
}

.asc-miroir-toile:active {
  cursor: grabbing;
}

.asc-miroir-fleche {
  position: absolute;
  top: 50%;
  width: var(--asc-dim-32);
  min-width: 0;
  padding: 0;
  transform: translateY(-50%);
}

.asc-miroir-fleche--gauche { left: var(--asc-esp-4); }
.asc-miroir-fleche--droite { right: var(--asc-esp-4); }

/* La flèche dessinée en CSS (un triangle), aucun caractère. */
.asc-miroir-fleche::before {
  content: "";
  display: block;
  margin: 0 auto;
  border-top: var(--asc-esp-8) solid transparent;
  border-bottom: var(--asc-esp-8) solid transparent;
}

.asc-miroir-fleche--gauche::before { border-right: var(--asc-esp-10) solid currentColor; }
.asc-miroir-fleche--droite::before { border-left: var(--asc-esp-10) solid currentColor; }

/* Le sac en bas : un bouton par vêtement qui se porte, à cliquer ou à glisser sur sa case. */
.asc-miroir-sac {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-6);
}

.asc-miroir-sac-titre {
  color: var(--asc-peche);
  font-size: var(--asc-texte-7);
  font-weight: 700;
}

.asc-miroir-sac-liste {
  display: flex;
  flex-wrap: wrap;
  gap: var(--asc-esp-6);
}

.asc-miroir-objet {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-6);
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-lagon-nuit);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  font: inherit;
  font-size: var(--asc-texte-11);
  font-weight: 700;
  cursor: grab;
}

.asc-miroir-objet .asc-miroir-pastille {
  margin-left: 0;
}

.asc-miroir-note {
  color: var(--asc-brume);
  font-size: var(--asc-texte-8);
}

.asc-miroir-message {
  padding: var(--asc-esp-8) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  font-weight: 700;
  font-size: var(--asc-texte-11);
}

.asc-miroir-message.is-erreur {
  color: var(--asc-saumon);
}

@media (max-width: 600px) {

  .asc-miroir {
    top: auto;
    bottom: var(--asc-esp-12);
    transform: translateX(-50%);
  }

  .asc-miroir-corps {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "scene scene" "gauche droite";
  }

  .asc-miroir-scene { grid-area: scene; }
  .asc-miroir-cases--gauche { grid-area: gauche; }
  .asc-miroir-cases--droite { grid-area: droite; }
}

/* ================================================================================================
 * Personnalisation du perso (carte #88) : création en grand (aperçu du perso v2 dessiné par le serveur),
 * grilles de choix (coupes, yeux, barbes...), couleur libre, écrans du salon (src/personnalisation_ui.js,
 * src/creation_perso.js, modules/personnalisation.js).
 */
.asc-pers-creation {
  max-width: var(--asc-dim-660);
}

.asc-pers-apercu {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-8);
  min-width: var(--asc-dim-220);
  padding: var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-ombre-violette);
}

.asc-pers-apercu.is-chargement .asc-pers-apercu-toile {
  opacity: var(--asc-opacite-55);
}

.asc-pers-apercu-toile {
  image-rendering: pixelated;
  max-width: 100%;
}

.asc-pers-choix {
  display: flex;
  flex-wrap: wrap;
  gap: var(--asc-esp-5);
}

.asc-pers-choix-bouton {
  min-height: var(--asc-dim-40);
  padding: var(--asc-esp-4) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-creme);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-family: var(--asc-police-titres);
  font-size: var(--asc-texte-6);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--asc-relief-bouton);
}

.asc-pers-choix-bouton--couleur {
  width: var(--asc-dim-40);
  padding: 0;
  border-radius: var(--asc-rond);
}

.asc-pers-choix-bouton.is-choisi {
  border-color: var(--asc-theme-clair);
  box-shadow: 0 0 0 2px var(--asc-creme) inset;
}

.asc-pers-libre {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-10);
  margin-top: var(--asc-esp-10);
  font-size: var(--asc-texte-6);
}

.asc-pers-libre-champ {
  width: var(--asc-dim-56);
  height: var(--asc-dim-40);
  padding: 0;
  border: var(--asc-trait-moyen) solid var(--asc-creme);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  cursor: pointer;
}

.asc-pers-salon {
  display: flex;
  gap: var(--asc-esp-12);
  flex-wrap: wrap;
}

.asc-pers-salon-menu {
  flex: 1;
  min-width: var(--asc-dim-220);
}

.asc-pers-message {
  flex-basis: 100%;
  padding: var(--asc-esp-6) var(--asc-esp-10);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  font-size: var(--asc-texte-6);
  font-weight: 700;
}

@media (max-width: 760px), (max-height: 520px) {
  .asc-pers-apercu {
    min-width: 0;
    width: 100%;
  }
}

/* ------------------------------------------------------------------ cambriolage RP et commissariat (carte #98) */

.asc-pegre-jauge--discretion.is-haute .asc-pegre-jauge-remplie {
  background: var(--asc-tole-rouge);
}

.asc-pegre-sac {
  margin: var(--asc-esp-6) 0;
  font-weight: 800;
}

.asc-pegre-vole .asc-gb-valeur,
.asc-pegre-vole span:last-child {
  color: var(--asc-tole-rouge);
  font-weight: 800;
  letter-spacing: 1px;
}

.asc-pegre-serrure {
  position: relative;
  height: var(--asc-dim-24);
  margin: var(--asc-esp-10) 0;
  border: var(--asc-trait-moyen) solid var(--asc-ardoise);
  border-radius: var(--asc-rayon);
  background: var(--asc-basalte);
  overflow: hidden;
}

.asc-pegre-serrure-vert {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12%;
  background: var(--asc-feuille);
}

.asc-pegre-serrure-aiguille {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--asc-dim-4);
  background: var(--asc-soleil);
  transform: translateX(-50%);
}

.asc-pegre-goupilles {
  display: flex;
  gap: var(--asc-esp-8);
  justify-content: center;
  margin-bottom: var(--asc-esp-10);
}

.asc-pegre-goupille {
  width: var(--asc-dim-16);
  height: var(--asc-dim-16);
  border: var(--asc-trait-moyen) solid var(--asc-brume);
  border-radius: var(--asc-rond);
}

.asc-pegre-goupille.is-faite {
  background: var(--asc-feuille);
  border-color: var(--asc-feuille);
}

.asc-pegre-proprio .asc-pegre-etourdir {
  width: 100%;
  margin-top: var(--asc-esp-6);
}

.asc-pegre-alerte {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--asc-basalte-rgb), 0.7);
  z-index: var(--asc-plan-50);
}

.asc-pegre-alerte-boite {
  width: min(var(--asc-fenetre-400), calc(100vw - var(--asc-dim-32)));
  padding: var(--asc-esp-16);
  border: var(--asc-trait-epais) solid var(--asc-tole-rouge);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  text-align: center;
}

.asc-pegre-alerte-titre {
  margin: 0 0 var(--asc-esp-8);
  color: var(--asc-tole-rouge);
  font-size: var(--asc-texte-22);
}

.asc-pegre-alerte-compte {
  margin: var(--asc-esp-8) 0;
  font-size: var(--asc-texte-25);
  font-weight: 800;
  color: var(--asc-soleil);
}

.asc-pegre-etourdi {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--asc-basalte-rgb), 0.82);
  color: var(--asc-creme);
  font-size: var(--asc-texte-23);
  font-weight: 800;
  z-index: var(--asc-plan-50);
}

.asc-pegre-receleur-rue {
  border-color: var(--asc-soleil);
}

.asc-gav-hud {
  position: absolute;
  top: var(--asc-esp-12);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--asc-plan-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--asc-esp-6) var(--asc-esp-16);
  border: var(--asc-trait-moyen) solid var(--asc-nuit);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
}

.asc-gav-hud-titre {
  font-size: var(--asc-texte-12);
  text-transform: uppercase;
}

.asc-gav-hud-texte {
  font-size: var(--asc-texte-16);
  font-weight: 800;
}
.asc-gav-scene {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--asc-plan-4);
  padding: var(--asc-esp-3) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
}

.asc-gav-replique {
  font-weight: 700;
}

.asc-gav-issue {
  font-size: var(--asc-texte-16);
}

.asc-gav-erreur {
  color: var(--asc-tole-rouge);
}

/* Carte #100 : ce que disent l'inspecteur et l'avocat (bulles de paroles, jamais le dossier). */
.asc-gav-paroles {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--asc-theme, var(--asc-creme));
  background: rgba(0, 0, 0, 0.25);
}

.asc-gav-qui {
  display: block;
  font-size: var(--asc-texte-12, 12px);
  opacity: 0.8;
}

.asc-gav-alerte {
  color: var(--asc-tole-rouge);
}

/* ================================================================================================
 * ROUE DES EMOTES (carte #99) : clic sur sa propre case, gros boutons en cercle autour du perso, MIROIR au
 * centre (modules/roue_emotes.js). Le JS ne pose que la position : --asc-roue-x, --asc-roue-y (pieds du perso),
 * --asc-roue-rayon, et --asc-roue-dx, --asc-roue-dy pour chaque bouton.
 */
.asc-roue {
  --asc-roue-bouton: 76px;
  --asc-roue-centre: 84px;
  position: absolute;
  left: var(--asc-roue-x, 50%);
  top: var(--asc-roue-y, 50%);
  width: 0;
  height: 0;
  z-index: var(--asc-plan-7);
  pointer-events: none;
}

.asc-roue[hidden] { display: none; }

.asc-roue-bouton {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--asc-roue-bouton);
  height: var(--asc-roue-bouton);
  transform: translate(calc(-50% + var(--asc-roue-dx, 0px)), calc(-50% + var(--asc-roue-dy, 0px)));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--asc-esp-4);
  padding: 0;
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  border-radius: 50%;
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-2);
  font: 700 var(--asc-texte-5)/1.1 var(--asc-police-texte);
  pointer-events: auto;
  cursor: pointer;
  animation: asc-roue-entree 0.12s steps(3, end);
}

.asc-roue-bouton:hover,
.asc-roue-bouton:focus-visible {
  background: var(--asc-theme);
  color: var(--asc-theme-texte);
}

.asc-roue-bouton .asc-gb-icone { width: var(--asc-dim-24); height: var(--asc-dim-24); }

.asc-roue-libelle {
  max-width: calc(var(--asc-roue-bouton) - 8px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Emote achetée en diamants : liseré doré. */
.asc-roue-bouton.is-diamants { border-color: var(--asc-soleil); }

/* MIROIR, au centre (sur le perso) : plus gros, à la couleur du thème. */
.asc-roue-bouton.asc-roue-centre {
  width: var(--asc-roue-centre);
  height: var(--asc-roue-centre);
  background: var(--asc-theme);
  color: var(--asc-theme-texte);
  font-family: var(--asc-police-titres);
}

.asc-roue-bouton:disabled { opacity: 0.45; cursor: not-allowed; }

@keyframes asc-roue-entree {
  from { transform: translate(-50%, -50%) scale(0.4); }
}

@media (max-width: 760px), (max-height: 520px) {
  .asc-roue { --asc-roue-bouton: 60px; --asc-roue-centre: 68px; }
}

/* ------------------------------------------------------------------ gabarits de logements (carte #97) */
/* Aperçu en plan d'une forme (notaire, entrepreneur) : net, centré, jamais plus large que 180 pixels. */
.asc-gab-apercu {
  display: block;
  margin: 8px auto;
  max-width: 180px;
  width: auto;
  height: auto;
  image-rendering: pixelated;
}

/* ------------------------------------------------------------------ socle des métiers : emploi (carte #102) */
/* Un client attend un joueur en service : carte en bas d'écran, deux gros boutons (Accepter, Laisser). */
.asc-emploi-alerte {
  position: absolute;
  bottom: var(--asc-esp-96);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  max-width: calc(100vw - var(--asc-dim-32));
  padding: var(--asc-esp-8) var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-ombre-violette);
  color: var(--asc-creme);
  font-weight: 700;
  text-align: center;
  z-index: var(--asc-plan-9);
}

/* ===== Auto-école et permis de conduire (carte #102, modules/autoecole.js) ===== */
.asc-ae-hud {
  position: absolute;
  top: var(--asc-esp-52);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--asc-plan-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-4);
  max-width: calc(100vw - var(--asc-dim-32));
  padding: var(--asc-esp-8) var(--asc-esp-16);
  border: var(--asc-trait-moyen) solid var(--asc-lagon-nuit);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  text-align: center;
}

.asc-ae-hud-etape {
  font-size: var(--asc-texte-16);
  font-weight: 800;
}

.asc-ae-hud-info {
  font-size: var(--asc-texte-12);
}
.asc-emploi-alerte .asc-gb-rangee {
  justify-content: center;
}

/* ================================================================================================
 * JOURNAL DE L'ÎLE ET RADIO (Task Master #102, modules/presse.js) : app Journal et présentoirs (même écran en
 * gros boutons), bandeau défilant de la radio en haut de l'écran, bulle du témoin PNJ, message en bas.
 * Le JS ne pose que --asc-presse-duree (durée du défilement) et --asc-presse-x / -y (place de la bulle).
 */
.asc-presse-entete {
  padding: var(--asc-esp-8) var(--asc-esp-10);
  font: 700 var(--asc-texte-18)/1.2 var(--asc-police-texte);
  color: var(--asc-theme);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.asc-presse-corps { padding: 0 var(--asc-esp-8) var(--asc-esp-8); }

.asc-presse-rubrique {
  font: 700 var(--asc-texte-8)/1.2 var(--asc-police-texte);
  color: var(--asc-theme);
  text-transform: uppercase;
}

.asc-presse-titre {
  margin: var(--asc-esp-4) 0;
  font: 700 var(--asc-texte-19)/1.25 var(--asc-police-texte);
  color: var(--asc-creme);
}

.asc-presse-signature {
  font: 400 var(--asc-texte-10)/1.3 var(--asc-police-texte);
  color: rgba(var(--asc-creme-rgb), 0.7);
}

.asc-presse-texte {
  margin: var(--asc-esp-8) 0;
  font: 400 var(--asc-texte-14)/1.45 var(--asc-police-texte);
  color: var(--asc-creme);
}

.asc-presse-citation {
  margin: var(--asc-esp-8) 0;
  padding-left: var(--asc-esp-10);
  border-left: var(--asc-trait-moyen) solid var(--asc-theme);
  font: 400 var(--asc-texte-14)/1.4 var(--asc-police-texte);
  color: var(--asc-creme);
}

/* Sur l'écran crème du téléphone (app Journal), titre, signature et texte des articles en encre nuit : le crème sur crème
   rendait l'article invisible, et le cyan du thème s'y lisait mal. */
.asc-tel-ecran .asc-presse-titre,
.asc-tel-ecran .asc-presse-texte,
.asc-tel-ecran .asc-presse-citation { color: var(--asc-nuit); }
.asc-tel-ecran .asc-presse-signature { color: var(--asc-ardoise-nuit); }
.asc-tel-ecran .asc-presse-entete,
.asc-tel-ecran .asc-presse-rubrique { color: var(--asc-bleu-nuit); }

.asc-presse-kiosque {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(var(--asc-dim-420), calc(100% - var(--asc-esp-16) * 2));
  max-height: calc(100% - var(--asc-esp-64) * 2);
  overflow: auto;
  z-index: var(--asc-plan-8);
  background: var(--asc-nuit);
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  border-radius: var(--asc-rayon-14);
  box-shadow: var(--asc-ombre-2);
}

.asc-presse-kiosque[hidden] { display: none; }

.asc-presse-radio {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  overflow: hidden;
  z-index: var(--asc-plan-6);
  padding: var(--asc-esp-4) var(--asc-esp-8);
  background: rgba(var(--asc-nuit-profonde-rgb), 0.85);
  border-bottom: var(--asc-trait-fin) solid var(--asc-theme);
  pointer-events: none;
}

.asc-presse-radio[hidden] { display: none; }

/* La croix de fermeture est À DROITE du bandeau (demande explicite de Philippe du 28/10/2026, exception à la règle
   des croix à gauche) ; le texte défile dessous. Seule la croix reçoit le clic. */
.asc-monde .asc-presse-radio .asc-presse-radio-fermer {
  order: 0;
  margin: 0;
  position: absolute;
  right: var(--asc-esp-4);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: auto;
}

.asc-presse-radio-nom {
  flex: none;
  position: relative;
  z-index: 1;
  padding: var(--asc-esp-2) var(--asc-esp-8);
  background: var(--asc-theme);
  color: var(--asc-nuit);
  font: 700 var(--asc-texte-8)/1.2 var(--asc-police-texte);
  text-transform: uppercase;
}

.asc-presse-radio-piste {
  flex: none;
  white-space: nowrap;
  color: var(--asc-creme);
  font: 400 var(--asc-texte-11)/1.3 var(--asc-police-texte);
  animation: asc-presse-defile var(--asc-presse-duree, 30s) linear infinite;
}

@keyframes asc-presse-defile {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

.asc-presse-bulle {
  position: absolute;
  left: 0;
  top: 0;
  max-width: var(--asc-dim-220);
  transform: translate(var(--asc-presse-x, 50%), var(--asc-presse-y, 50%)) translate(-50%, -100%);
  z-index: var(--asc-plan-7);
  padding: var(--asc-esp-4) var(--asc-esp-8);
  background: var(--asc-creme);
  color: var(--asc-nuit);
  border-radius: var(--asc-rayon-14);
  box-shadow: var(--asc-ombre-7);
  font: 400 var(--asc-texte-10)/1.3 var(--asc-police-texte);
  pointer-events: none;
}
.asc-ae-question {
  margin: var(--asc-esp-8) 0;
  font-size: var(--asc-texte-20);
  font-weight: 800;
}

.asc-ae-choix {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
}

.asc-ae-choix .asc-gb-action {
  width: 100%;
  font-size: var(--asc-texte-16);
}

.asc-ae-verdict {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-12);
  max-width: calc(100vw - var(--asc-dim-32));
  padding: var(--asc-esp-16) var(--asc-esp-20);
  border: var(--asc-trait-moyen) solid var(--asc-tole-rouge);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  font-size: var(--asc-texte-20);
  text-align: center;
}

.asc-ae-verdict.is-reussi {
  border-color: var(--asc-canne);
}

.asc-ae-verdict-liste {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-4);
  font-size: var(--asc-texte-14);
}

/* ================================================================================================
 * FAMILLE SANTÉ (Task Master #102, modules/sante.js) : pastille des maladies et blessures sous les besoins, fenêtre
 * en gros boutons (Ma santé, diagnostic du médecin, soin de l'infirmier, ambulance), bouton du cas en cours, message.
 */
.asc-sante-pastille {
  position: absolute;
  top: var(--asc-esp-84);
  right: var(--asc-esp-12);
  z-index: var(--asc-plan-6);
  max-width: calc(100vw - var(--asc-esp-28));
  padding: var(--asc-esp-4) var(--asc-esp-10);
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  font: 700 var(--asc-texte-14)/1.2 var(--asc-police-texte);
  cursor: pointer;
}

.asc-sante-pastille[hidden],
.asc-sante-travail[hidden],
.asc-sante-fenetre[hidden] { display: none; }

.asc-sante-travail {
  position: absolute;
  right: var(--asc-esp-12);
  bottom: calc(var(--asc-esp-120) * 2);
  z-index: var(--asc-plan-7);
  padding: var(--asc-esp-8) var(--asc-esp-16);
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  border-radius: var(--asc-rayon);
  background: var(--asc-theme);
  color: var(--asc-nuit-profonde);
  font: 800 var(--asc-texte-18)/1.2 var(--asc-police-texte);
  text-transform: uppercase;
  cursor: pointer;
}
.asc-sante-fenetre {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(var(--asc-dim-420), calc(100% - var(--asc-esp-16) * 2));
  max-height: calc(100% - var(--asc-esp-64) * 2);
  overflow: auto;
  z-index: var(--asc-plan-9);
  background: var(--asc-nuit);
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  border-radius: var(--asc-rayon-14);
  box-shadow: var(--asc-ombre-2);
}

.asc-monde .asc-sante-fenetre:not([hidden]) {
  display: block;
}

.asc-sante-tete {
  padding: var(--asc-esp-8) var(--asc-esp-10) 0;
}

.asc-sante-entete {
  padding: var(--asc-esp-8) var(--asc-esp-10);
  font: 700 var(--asc-texte-18)/1.2 var(--asc-police-texte);
  color: var(--asc-theme);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.asc-sante-corps { padding: 0 var(--asc-esp-8) var(--asc-esp-8); }

/* ================================================================================================
 * USINE, CAMPAGNE ET FEU (Task Master #102, modules/usine.js) : jauge des mini-jeux (sucrerie, distillerie,
 * jardinier, maçon, pompier), panneau du travail en cours en bas de l'écran (Y ALLER, l'étape, ARROSER,
 * INCENDIER), message. Le JS ne pose que --asc-usine-curseur et --asc-usine-zone-g / -l (place du curseur et de
 * la zone verte, de 0 à 100 %).
 */
.asc-usine-jauge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-9);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-12);
  width: min(var(--asc-dim-420), calc(100% - var(--asc-esp-16) * 2));
  padding: var(--asc-esp-16);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  border-radius: var(--asc-rayon-14);
  box-shadow: var(--asc-ombre-2);
  text-align: center;
}

.asc-usine-jauge[hidden] { display: none; }

.asc-usine-jauge-titre {
  font: 800 var(--asc-texte-20)/1.2 var(--asc-police-texte);
  color: var(--asc-theme);
}

.asc-usine-barre {
  position: relative;
  height: var(--asc-dim-40);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  border: var(--asc-trait-moyen) solid var(--asc-creme-sombre);
  overflow: hidden;
}

.asc-usine-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--asc-usine-zone-g, 40%);
  width: var(--asc-usine-zone-l, 20%);
  background: var(--asc-canne);
}

.asc-usine-curseur {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--asc-usine-curseur, 0%);
  width: var(--asc-dim-4);
  transform: translateX(-50%);
  background: var(--asc-soleil);
}

.asc-usine-jauge .asc-gb-action {
  width: 100%;
  font-size: var(--asc-texte-20);
}

.asc-usine-panneau {
  position: absolute;
  left: 50%;
  bottom: var(--asc-esp-160);
  transform: translateX(-50%);
  z-index: var(--asc-plan-7);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  max-width: calc(100vw - var(--asc-dim-32));
  padding: var(--asc-esp-8) var(--asc-esp-16);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  text-align: center;
}

.asc-usine-panneau[hidden] { display: none; }

.asc-usine-panneau.is-feu { border-color: var(--asc-tole-rouge); }

.asc-usine-panneau-titre {
  font: 800 var(--asc-texte-16)/1.2 var(--asc-police-texte);
}

.asc-usine-panneau .asc-gb-rangee {
  justify-content: center;
}
/* ===== Refonte des terrains (carte #103) : aperçu du terrain chez le notaire ===== */
.asc-terrain-apercu { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 6px 0; }
.asc-terrain-plan { image-rendering: pixelated; border: 2px solid var(--asc-bord, #f6ead6); border-radius: 6px; max-width: 100%; }

/* ================================================================================================
 * FAMILLES TRANSPORTS ET COMMERCE (carte #102, modules/postes.js et modules/chauffeurs.js) : bandeau de la tâche
 * en poste (consigne, choix en gros boutons, jauge du pompiste), bandeau du chauffeur (course, tournée, passager),
 * message en bas de l'écran. Aucun style posé par le JS.
 */
.asc-poste-hud,
.asc-ch-hud {
  position: absolute;
  top: var(--asc-esp-52);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--asc-plan-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--asc-esp-8);
  max-width: calc(100vw - var(--asc-dim-32));
  padding: var(--asc-esp-8) var(--asc-esp-16);
  border: var(--asc-trait-moyen) solid var(--asc-lagon-nuit);
  border-radius: var(--asc-rayon);
  background: var(--asc-creme);
  color: var(--asc-nuit-profonde);
  text-align: center;
}

.asc-poste-tete,
.asc-ch-ligne {
  font-size: var(--asc-texte-12);
}

.asc-poste-consigne,
.asc-ch-titre {
  font-size: var(--asc-texte-16);
  font-weight: 800;
}

.asc-poste-choix {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--asc-esp-8);
}

/* Étiquettes des meubles de travail (ergonomie, 27/10/2026) : posées au-dessus du meuble, celle de l'étape en couleur. */
.asc-poste-etiquettes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: var(--asc-plan-2);
}

.asc-poste-etiquettes[hidden] {
  display: none;
}

.asc-poste-etiquette {
  position: absolute;
  left: 0;
  top: 0;
  padding: var(--asc-esp-1) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: rgba(var(--asc-basalte-rgb), 0.78);
  color: var(--asc-creme);
  font: 800 var(--asc-texte-6)/1.4 var(--asc-police-texte);
  white-space: nowrap;
}

.asc-poste-etiquette.is-cible {
  background: var(--asc-theme);
  color: var(--asc-nuit-profonde);
}

.asc-poste-jauge {
  font: 800 var(--asc-texte-18)/1.2 var(--asc-police-texte);
  color: var(--asc-theme);
}
.asc-sante-ausol {
  position: absolute;
  top: var(--asc-esp-64);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--asc-plan-9);
  max-width: calc(100vw - var(--asc-esp-28));
  padding: var(--asc-esp-10) var(--asc-esp-16);
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  font: 800 var(--asc-texte-18)/1.2 var(--asc-police-texte);
  text-align: center;
}

.asc-sante-ausol[hidden] { display: none; }

/* ------------------------------------------------------------------ familles Services et Justice (Task Master #102) */

.asc-svc-fenetre {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(var(--asc-dim-420), calc(100% - var(--asc-esp-16) * 2));
  max-height: calc(100% - var(--asc-esp-64) * 2);
  overflow: auto;
  z-index: var(--asc-plan-8);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  border-radius: var(--asc-rayon-14);
  box-shadow: var(--asc-ombre-2);
}

.asc-svc-tete {
  display: flex;
  align-items: center;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-8) var(--asc-esp-12);
  border-bottom: var(--asc-trait-fin) solid var(--asc-theme);
}

.asc-svc-titre {
  font-weight: 800;
  font-size: var(--asc-texte-14);
}

.asc-svc-corps {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  padding: var(--asc-esp-12);
}

.asc-svc-ordre {
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-4);
  font-size: var(--asc-texte-14);
  font-weight: 700;
}

.asc-svc-geste {
  padding: var(--asc-esp-4) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-ombre-violette);
}

.asc-svc-bouton {
  position: absolute;
  left: var(--asc-esp-16);
  bottom: var(--asc-esp-160);
  z-index: var(--asc-plan-6);
}

.asc-svc-bouton[hidden] { display: none; }

/* Ivresse (rhum, Task Master #102) : l'image du jeu tangue et se brouille un peu (règle rhum.ivresse_effet). */
.asc-ivre {
  animation: asc-ivre-tangue 3.2s ease-in-out infinite;
  filter: blur(0.6px) saturate(1.25);
}

@keyframes asc-ivre-tangue {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  25% { transform: rotate(0.8deg) translateX(4px); }
  75% { transform: rotate(-0.8deg) translateX(-4px); }
}

/* ---- ÉCONOMIE LISIBLE (27/10/2026, section 75) : l'origine de chaque ligne du relevé, le message de paye. */
.asc-argent-origine {
  display: inline-block;
  margin-right: var(--asc-esp-6);
  padding: 0 var(--asc-esp-4);
  font-size: var(--asc-texte-10);
  color: var(--asc-creme);
  background: var(--asc-ardoise-nuit);
}
.asc-argent-origine.is-client,
.asc-argent-origine.is-pnj { background: var(--asc-lagon); }
.asc-argent-origine.is-caisse { background: var(--asc-bois); }
.asc-argent-origine.is-ville { background: var(--asc-flamboyant); }
.asc-argent-origine.is-taxe,
.asc-argent-origine.is-mairie { background: var(--asc-tole-rouge); }
.asc-argent-paie {
  position: absolute;
  top: var(--asc-esp-120);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--asc-plan-30);
  min-width: calc(220 * var(--asc-unite));
  padding: var(--asc-esp-8) var(--asc-esp-12);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  outline: var(--asc-liseret-neon);
  outline-offset: var(--asc-liseret-decalage);
  pointer-events: none;
}
.asc-argent-paie-titre { font-family: var(--asc-police-titres); margin-bottom: var(--asc-esp-6); color: var(--asc-theme-clair); }
.asc-argent-paie-ligne { display: flex; justify-content: space-between; gap: var(--asc-esp-10); font-size: var(--asc-texte-11); }
.asc-argent-paie-ligne.is-ville .asc-argent-paie-montant { color: var(--asc-soleil); }
.asc-argent-paie-ligne.is-taxe .asc-argent-paie-montant { color: var(--asc-saumon); }
.asc-argent-paie-total { margin-top: var(--asc-esp-6); padding-top: var(--asc-esp-4); border-top: var(--asc-trait-fin) solid var(--asc-theme-clair); font-family: var(--asc-police-titres); }

/* ===== Accès aux logements (27/10/2026) : pavé du digicode et du code de la porte (modules/acces_logement.js) ===== */
.asc-acces-ecran {
  margin: var(--asc-esp-8) 0;
  padding: var(--asc-esp-8) var(--asc-esp-12);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-family: var(--asc-police-titres);
  font-size: var(--asc-texte-18);
  letter-spacing: 0.3em;
  text-align: center;
  outline: var(--asc-liseret-neon);
}
.asc-acces-pave { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--asc-esp-6); }
.asc-acces-touche { min-height: calc(44 * var(--asc-unite)); font-size: var(--asc-texte-16); }

/* ===== Musique (carte Musiques) : fenêtre de la chaîne hi-fi (modules/musique.js), gros boutons dedans ===== */
.asc-musique-fenetre {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--asc-plan-7);
  display: flex;
  flex-direction: column;
  gap: var(--asc-esp-8);
  width: min(var(--asc-fenetre-400), calc(100vw - var(--asc-marge-ecran)));
  max-height: min(78vh, var(--asc-dim-640));
  overflow-y: auto;
  padding: var(--asc-esp-14);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  box-shadow: var(--asc-ombre-2);
}
@media (max-width: 640px) {
  .asc-musique-fenetre {
    top: auto;
    bottom: var(--asc-esp-12);
    transform: translateX(-50%);
    max-height: 70vh;
  }
}

/* ===== Objets liés au joueur (achetés en diamants, src/lie.js, décision du 28/10/2026) ===== */
.asc-lie {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--asc-esp-4);
  padding: 0 var(--asc-esp-4);
  border: var(--asc-trait-moyen) solid var(--asc-theme);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit-profonde);
  color: var(--asc-creme);
  font-size: var(--asc-texte-10);
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
}
.asc-lie svg,
.asc-lie canvas {
  width: var(--asc-esp-10);
  height: var(--asc-esp-10);
  color: var(--asc-theme);
}
.asc-lie-bulle {
  position: fixed;
  z-index: 9999;
  left: var(--asc-lie-x, 50%);
  top: var(--asc-lie-y, 50%);
  transform: translate(-100%, calc(-100% - var(--asc-esp-4)));
  font-family: var(--asc-police-texte);
  font-size: var(--asc-texte-11);
  width: max-content;
  max-width: 240px;
  padding: var(--asc-esp-6) var(--asc-esp-8);
  border-radius: var(--asc-rayon);
  background: var(--asc-nuit);
  color: var(--asc-creme);
  font-weight: 400;
  white-space: normal;
  box-shadow: var(--asc-ombre-2);
}
.asc-lie-bulle[hidden] {
  display: none;
}
