/* Vitrine Screen GM (screengm.com) : feuille de style de la page d'accueil de l'appli, reprise telle quelle (jetons et boutons de css/base.css,
   puis css/accueil.css), suivie de quelques règles propres à la vitrine (en-tête, clips vidéo, onglets en CSS seul). Aucune ressource externe. */

/* ======================= Jetons, icônes et boutons (css/base.css) ======================= */
:root {
  /* Couleurs du thème sombre */
  --fond: #16151a;
  --panneau: #1f1e24;
  --bord: #34323b;
  --texte: #e8e4dc;
  --texte-doux: #a29d94;
  --accent: #d9a929;
  --accent-texte: #1a1508;
  --erreur: #e06c5a;
  --champ: #121116;   /* fond des champs de saisie */
  --scene: #0c0b0e;   /* fond de la zone de carte */

  /* Couleurs de rôle. Le rouge est --erreur et l'or --accent ; ici le vert (réussite, soins, « sur la table ») et le violet (magie). */
  --succes: #4f9a5c;        /* fond plein et filet */
  --succes-bord: #2f6b3a;
  --succes-fond: #14281a;   /* bandeau, message : texte clair dessus */
  --succes-texte: #7cc47c;  /* texte vert sur fond sombre */
  --attention: #e0a21b;     /* orange : un geste est attendu (dossier à rouvrir, enregistrement à réessayer) */
  --arcane: #9ea3f0;

  /* Panneaux latéraux (arbre, inspecteur, onglets de Jouer) : quatre niveaux de texte, deux surfaces, deux filets. Règles : docs/design-panneaux.md */
  --p-texte-1: #ece8e0;   /* nom, titres de section, noms d'éléments, valeurs saisies */
  --p-texte-2: #c3beb4;   /* texte courant */
  --p-texte-3: #97928a;   /* étiquettes, notes, méta */
  --p-texte-4: #67635d;   /* placeholders, groupes de l'arbre, chevrons : jamais seul porteur d'une information */
  --p-surface-0: var(--panneau);
  --p-surface-1: #26252c; /* listes en creux, pastilles */
  --p-surface-survol: #2d2c34;
  --p-filet: #2f2d35;
  --p-filet-fort: #3d3a44;
  --p-choisi: rgba(217, 169, 41, 0.13);

  /* Police du texte courant, la même partout : celle du système, sans chargement */
  --police: system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rayons et espacements */
  --rayon: 6px;
  --rayon-controle: 8px;    /* champs et boutons de 36 px et plus (rangée filtre / replier / « + » de l'arbre) : même arrondi que les liens de la barre */
  --esp-1: 4px;
  --esp-2: 8px;
  --esp-3: 12px;
  --esp-4: 16px;

  /* Focus visible au clavier */
  --focus: 2px solid var(--accent);
  --focus-decalage: 2px;

  /* Taille de cible tactile : aucune exigence au-dessus de 760 px (densité inchangée), 44 px en dessous. */
  --cible: 0px;
  --cible-petit: 32px; /* plancher des boutons .petit, quelle que soit la largeur */
  --btn-h: 34px;       /* hauteur des boutons .btn au-dessus de 760 px (44 px en dessous) */

  /* Hauteur de la barre de navigation commune (tout en haut de chaque page) ; les mises en page à hauteur d'écran la retranchent. */
  --h-barre: 52px;
  --hauteur-barre: var(--h-barre); /* même valeur, nom lu par la régie (css/presentation.css) */
  --largeur-arbre: 260px; /* la colonne de gauche des pages d'atelier (redéfinie par css/atelier.css, qui charge après) : l'en-tête aligne sa zone de marque dessus */
}
@media (max-width: 760px) {
  :root { --cible: 44px; --btn-h: 44px; --h-barre: 52px; }
}

/* --- Icônes (js/icones.js) : le trait et les arrondis sont dans le SVG ; ici seulement la taille. --- */
.icone { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--esp-2);
  box-sizing: border-box; min-height: var(--btn-h); padding: 0 var(--esp-3);
  background: var(--panneau); color: var(--texte); border: 1px solid var(--bord); border-radius: var(--rayon);
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; touch-action: manipulation;
}
.btn:hover { background: var(--champ); border-color: var(--texte-doux); }
.btn:focus-visible { outline: var(--focus); outline-offset: var(--focus-decalage); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; pointer-events: none; transform: none; }
/* Grisé par desactiver() (js/infobulle.js) : l'apparence d'un bouton inactif, mais SANS pointer-events:none, pour que le survol et le toucher montrent la raison. */
.btn[aria-disabled="true"] { transform: none; }
[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn[aria-disabled="true"]:hover { background: var(--panneau); border-color: var(--bord); }
.btn-primaire[aria-disabled="true"]:hover { background: var(--accent); border-color: var(--accent); filter: none; }
.btn-discret[aria-disabled="true"]:hover { background: transparent; border-color: transparent; color: var(--texte-doux); }
.btn-danger[aria-disabled="true"]:hover { background: transparent; border-color: var(--erreur); color: var(--erreur); }
.btn[aria-pressed="true"] { background: rgba(217, 169, 41, 0.16); border-color: var(--accent); color: var(--accent); }
/* Un bouton à bascule inactif n'est jamais doré : le jaune dit « activé », le grisé dit « indisponible ». */
.btn[aria-pressed="true"][aria-disabled="true"], .btn[aria-pressed="true"]:disabled { background: transparent; border-color: transparent; color: var(--texte-doux); }
.btn-primaire { background: var(--accent); color: var(--accent-texte); border-color: var(--accent); font-weight: 700; }
.btn-primaire:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.1); }
.btn-primaire[aria-pressed="true"] { background: var(--accent); color: var(--accent-texte); filter: brightness(0.9); }
.btn-discret { background: transparent; border-color: transparent; color: var(--texte-doux); font-weight: 500; }
.btn-discret:hover { background: var(--champ); border-color: transparent; color: var(--texte); }
.btn-danger { background: transparent; color: var(--erreur); border-color: var(--erreur); }
.btn-danger:hover, .btn-danger[data-confirme="1"] { background: var(--erreur); border-color: var(--erreur); color: #fff; }
/* Un bouton ne déborde jamais son conteneur ; dans une grille étroite (ou avec .btn-souple) son texte peut passer à la ligne. */
.btn { max-width: 100%; }
.grid2 > .btn, .grid3 > .btn, .btn-souple { min-width: 0; white-space: normal; line-height: 1.15; }
.btn-icone { width: var(--btn-h); padding: 0; flex: none; font-size: 16px; }
.btn-icone .icone { width: 20px; height: 20px; vertical-align: 0; }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }


/* ======================= Page d'accueil (css/accueil.css) ======================= */
/* Accueil (index.html) : héros avec la table animée, Reprendre, rangée des cinq capacités, tableau de bord de six tuiles, promesses, pied de page.
   Les jetons (couleurs, rayon, focus, police) viennent de css/base.css ; ci-dessous seulement ceux qui n'existent que sur cette page.
   Thème sombre de l'appli. Téléphone : une colonne, gouttière de 16 px, aucun défilement horizontal. */
@property --r { syntax: '<percentage>'; inherits: false; initial-value: 0%; }

body.accueil {
  --titre: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --or-clair: #e9c66a;
  --surface: var(--p-surface-1);
  --largeur: 1180px;
  --gouttiere: 24px;
  --encre: #3a2a1f;
  margin: 0; min-height: 100vh; background: var(--fond); color: var(--texte); font: 15px/1.45 var(--police); overflow-x: hidden;
}
body.accueil *, body.accueil *::before, body.accueil *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
.accueil a:not(.btn) { color: inherit; }
.accueil :is(a, button):focus-visible { outline: var(--focus); outline-offset: var(--focus-decalage); }
.cache-visuel { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.chapitres > section { scroll-margin-top: 16px; }

/* Titres de bandeau */
.surtitre { color: var(--accent); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 14px; }
.grand-titre { font-family: var(--titre); font-weight: 600; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.04; margin: 0; letter-spacing: -0.01em; }
.grand-titre em { font-style: italic; color: var(--accent); }
.promesse { color: var(--texte-doux); font-size: 17px; max-width: 32em; margin: 18px 0 0; }
.accueil .actions .btn { min-height: 46px; padding: 0 20px; border-radius: 8px; font-size: 15px; }
.accueil .actions .icone { width: 18px; height: 18px; }

/* ======================= Héros : la table, les figurines, la carte qui s'allume ======================= */
.accueil .heros { position: relative; overflow: hidden; border-bottom: 1px solid var(--bord); background: radial-gradient(900px 560px at 68% 48%, #2b2338 0%, var(--scene) 72%); }
.accueil .heros .grille { max-width: var(--largeur); margin: 0 auto; padding: 20px 24px 28px; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr); gap: 32px; align-items: center; min-height: min(88vh, 760px); }
.accueil .heros .grand-titre { font-size: clamp(34px, 4vw, 54px); }
.accueil .heros .promesse { max-width: 27em; }
.accueil .heros .actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.illus { min-width: 0; }
/* Vidéo de présentation (16:9) : même cadre que la scène dessinée. */
.heros-video { position: relative; width: 100%; max-width: 760px; margin: 0 auto; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; border: 1px solid var(--bord); background: radial-gradient(closest-side at 50% 45%, #2b2338, var(--scene)); }
.heros-video > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Lecteur : vignette + bouton de lecture au centre ; pendant la lecture, une petite barre en bas à droite (pause, son) */
.heros-video > video { cursor: pointer; }
.hv-lire { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; border: 0; padding: 0; background: radial-gradient(closest-side at 50% 50%, rgba(12,11,14,0.35), rgba(12,11,14,0) 70%); color: #fff8e8; cursor: pointer; font: inherit; }
.hv-rond { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--accent); color: #1a1508; box-shadow: 0 10px 40px rgba(0,0,0,0.55), 0 0 0 6px rgba(233,198,106,0.22); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hv-rond svg { width: 38px; height: 38px; margin-left: 5px; }
.hv-lire:hover .hv-rond { transform: scale(1.07); box-shadow: 0 10px 40px rgba(0,0,0,0.55), 0 0 0 10px rgba(233,198,106,0.28); }
.hv-legende { font-weight: 600; font-size: 15px; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
.hv-duree { font-weight: 400; opacity: 0.8; margin-left: 4px; }
.hv-barre { position: absolute; right: 12px; bottom: 12px; display: none; gap: 8px; }
.hv-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); background: rgba(12,11,14,0.62); color: #fff8e8; cursor: pointer; padding: 0; backdrop-filter: blur(6px); }
.hv-btn:hover { background: rgba(12,11,14,0.85); }
.hv-btn svg { width: 20px; height: 20px; }
.heros-video.lancee .hv-lire { display: none; }
.heros-video.lancee .hv-barre { display: flex; }
.heros-video.lancee.en-pause .hv-lire { display: flex; }
@media (max-width: 560px) { .hv-rond { width: 64px; height: 64px; } .hv-rond svg { width: 30px; height: 30px; } }
.scene-wrap { position: relative; width: 100%; max-width: 760px; margin: 0 auto; aspect-ratio: 720 / 560; overflow: hidden; border-radius: 16px; border: 1px solid var(--bord); }
.stage { position: absolute; left: 0; top: 0; width: 720px; height: 560px; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.stage > * { position: absolute; }
.stage .decor { left: 0; top: 0; width: 720px; height: 560px; pointer-events: none; }


/* plateau en perspective : la carte du vrai moteur, projetée sur la table */
#svg-fond { z-index: 0; }
#svg-table { z-index: 1; }
#svg-cable { z-index: 2; }
.plateau { transform: perspective(900px) rotateX(52deg); transform-origin: 50% 50%; z-index: 3; }
.plateau .mat { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,236,190,0.55) 1px, transparent 1px), linear-gradient(90deg, rgba(255,236,190,0.55) 1px, transparent 1px); opacity: 0.16; transition: opacity 0.7s ease, background-color 0.7s ease; }
.plateau .cv { position: absolute; inset: 0; --r: 40%; opacity: 0.55; -webkit-mask-image: radial-gradient(circle at 50% 55%, #000 var(--r), transparent calc(var(--r) + 30%)); mask-image: radial-gradient(circle at 50% 55%, #000 var(--r), transparent calc(var(--r) + 30%)); transition: --r 1.8s ease, opacity 1.2s ease; }
.plateau .cv canvas { position: absolute; left: 0; top: 0; }
.allume .plateau .cv { --r: 100%; opacity: 1; }
/* le bord lumineux de l'image projetée, et la lumière qui déborde sur le bois */
.plateau .lueur { position: absolute; inset: -2px; border-radius: 3px; box-shadow: 0 0 0 1.5px rgba(200,245,255,0.35), 0 0 30px 8px rgba(190,240,255,0.1); opacity: 0.5; transition: opacity 1.2s ease, box-shadow 1.2s ease; pointer-events: none; }
.allume .plateau .lueur { opacity: 1; box-shadow: 0 0 0 2px rgba(210,248,255,0.85), 0 0 14px 2px rgba(150,230,255,0.7), 0 0 60px 18px rgba(190,240,255,0.22); }
.mode-mur .plateau .cv, .mode-mur .plateau .lueur, .mode-incruste .plateau .lueur { opacity: 0 !important; }
.mode-mur .plateau .mat { opacity: 1; background-color: #2f6b58; }
/* écran incrusté dans le plateau : la carte s'affiche sous les figurines, dans un cadre noir, sans projecteur */
.plateau .cadre-inc { position: absolute; inset: -12px; border: 12px solid #1d1c22; border-radius: 6px; outline: 3px solid var(--encre); box-shadow: inset 0 0 0 2px #3a3842; opacity: 0; transition: opacity 0.7s ease; pointer-events: none; }
.mode-incruste .plateau .cadre-inc { opacity: 1; }
.mode-incruste .plateau .mat { opacity: 1; background-color: #0d0c10; background-image: none; }
.cone { z-index: 4; mix-blend-mode: screen; opacity: 0.35; transition: opacity 1s ease; }
.allume .cone { opacity: 1; }
.proj { z-index: 7; transition: opacity 0.7s ease; }
.proj .verre { transition: filter 0.8s ease; filter: brightness(0.75); }
.allume .proj .verre { filter: brightness(1.15) drop-shadow(0 0 6px #bff3ff); }
.mode-mur .cone, .mode-mur .proj, .mode-incruste .cone, .mode-incruste .proj { opacity: 0 !important; }
#svg-objets { z-index: 5; }
.vapeur { animation: vapeur 3.5s ease-in-out infinite; }
@keyframes vapeur { 0%, 100% { transform: translateY(0); opacity: 0.12; } 50% { transform: translateY(-4px); opacity: 0.32; } }
.voile { z-index: 10; }

/* le câble du portable : celui du mode affiché, et l'influx qui y court quand le MJ envoie une salle */
.cable { opacity: 0; transition: opacity 0.7s ease; }
.mode-table .cable.table, .mode-mur .cable.mur, .mode-incruste .cable.incruste { opacity: 1; }
.cable .influx { opacity: 0; filter: drop-shadow(0 0 3px #8fe3ff) drop-shadow(0 0 6px #8fe3ff); }
.envoi .cable .influx { opacity: 1; stroke-dashoffset: -100; transition: stroke-dashoffset 0.95s ease-in, opacity 0.2s; }

.tv { z-index: 2; opacity: 0; transition: opacity 0.7s ease; left: 246px; top: 22px; width: 230px; height: 140px; }
.mode-mur .tv { opacity: 1; }
.tv .ecran-tv { position: absolute; left: 8px; top: 7px; width: 214px; height: 116px; overflow: hidden; border-radius: 3px; background: #0b0a0d; }
.tv .ecran-tv .cv2 { position: absolute; inset: 0; --r: 40%; opacity: 0.55; -webkit-mask-image: radial-gradient(circle at 50% 55%, #000 var(--r), transparent calc(var(--r) + 30%)); mask-image: radial-gradient(circle at 50% 55%, #000 var(--r), transparent calc(var(--r) + 30%)); transition: --r 1.8s ease, opacity 1.2s ease; }
.allume .tv .cv2 { --r: 100%; opacity: 1; }
.tv .ecran-tv canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }

.calque { left: 0; top: 0; width: 720px; height: 560px; z-index: 6; pointer-events: none; }
.fig { position: absolute; transform: translate(-50%, -91%); transition: left 0.9s ease, top 0.9s ease, width 0.9s ease, opacity 0.6s ease, transform 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); filter: drop-shadow(0 3px 2px rgba(0,0,0,0.4)); }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig.monstre { opacity: 0; transform: translate(-50%, -91%) scale(0.4); transform-origin: 50% 91%; }
.montre .fig.monstre { opacity: 1; transform: translate(-50%, -91%) scale(1); }
.montre .fig.monstre + .fig.monstre { transition-delay: 0.25s; }
.de-t { position: absolute; z-index: 8; transition: transform 1.3s cubic-bezier(0.2, 0.7, 0.25, 1); filter: drop-shadow(2px 4px 2px rgba(0,0,0,0.45)); }
.de-t svg { width: 100%; height: auto; display: block; }
.de-t.un { transform: translate(170px, 30px) rotate(-420deg); }
.de-t.deux { transform: translate(150px, 10px) rotate(380deg); }
.de-t.trois { transform: translate(220px, 0) rotate(-300deg); }
.lance .de-t.un, .lance .de-t.deux, .lance .de-t.trois { transform: translate(0, 0) rotate(0); }
.lance .de-t.deux { transition-delay: 0.08s; }
.lance .de-t.trois { transition-delay: 0.16s; }

/* le portable de la régie : posé droit au fond à gauche, son écran montre ce que voit la table */
.portable { z-index: 7; left: 12px; top: 120px; width: 200px; }
.portable::after { content: ""; position: absolute; left: -10px; right: -40px; top: 150px; height: 70px; background: radial-gradient(closest-side, rgba(180,220,255,0.18), transparent); pointer-events: none; }
.portable .ecran-p { position: relative; height: 136px; border-radius: 8px 8px 2px 2px; background: #15141a; border: 5px solid #2c2a33; outline: 2px solid var(--encre); box-shadow: 0 0 22px rgba(150,200,255,0.18); overflow: hidden; display: flex; flex-direction: column; }
.portable .barre-p { display: flex; align-items: center; justify-content: space-between; height: 17px; padding: 0 6px; background: #24222b; border-bottom: 1px solid #34323b; font: 600 8px var(--police); color: #cfc9be; }
.portable .direct { display: flex; align-items: center; gap: 3px; padding: 1px 5px; border-radius: 999px; background: #2f2d36; color: #8a8590; font-size: 7px; transition: background 0.4s ease, color 0.4s ease; }
.portable .direct i { width: 5px; height: 5px; border-radius: 50%; background: #5a5760; transition: background 0.4s ease, box-shadow 0.4s ease; }
.allume .portable .direct { background: rgba(126,240,160,0.15); color: #9ff0b8; }
.allume .portable .direct i { background: #7ef0a0; box-shadow: 0 0 4px #7ef0a0; }
.portable .direct > span { display: none; }
.mode-table .portable .v-table, .mode-mur .portable .v-mur, .mode-incruste .portable .v-incruste { display: inline; }
.portable .corps-p { flex: 1; display: flex; min-height: 0; }
.portable .liste { width: 44%; background: #1f1e24; border-right: 1px solid #34323b; padding: 5px 5px; }
.portable .liste h6 { margin: 0 0 4px; font: 600 7px var(--police); color: #a29d94; letter-spacing: 0.08em; text-transform: uppercase; }
.portable .liste .s { display: flex; align-items: center; gap: 4px; height: 15px; padding: 0 4px; margin-bottom: 3px; border-radius: 3px; font: 500 8px var(--police); color: #cfc9be; background: #2a2930; transition: background 0.3s ease, color 0.3s ease; white-space: nowrap; }
.portable .liste .s i { width: 5px; height: 5px; border-radius: 50%; background: #5a5760; flex: none; }
.portable .liste .s.cache { color: #7c7881; }
.portable .liste .s.cible.on { background: var(--accent); color: var(--accent-texte); }
.portable .liste .s.cible.on i { background: var(--accent-texte); }
.portable .liste .btn-m { margin-top: 5px; height: 15px; border-radius: 3px; border: 1px solid rgba(217,169,41,0.5); color: var(--or-clair); font: 600 6px/13px var(--police); letter-spacing: -0.01em; text-align: center; white-space: nowrap; overflow: hidden; transition: background 0.3s ease, color 0.3s ease; }
.portable .liste .btn-m.on { background: #c8452f; border-color: #c8452f; color: #fff; }
.portable .mini { flex: 1; display: grid; place-items: center; background: #0c0b0e; position: relative; overflow: hidden; }
.portable .mini canvas { max-width: 100%; max-height: 100%; opacity: 0.45; transition: opacity 1s ease; }
.allume .portable .mini canvas { opacity: 1; }
.portable .clavier { display: block; width: 240px; height: 52px; margin: 0 0 0 -20px; }
.curseur { z-index: 9; left: 236px; top: 330px; width: 20px; height: 20px; transition: left 1s ease, top 1s ease, transform 0.15s ease; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); pointer-events: none; }
.curseur.clic { transform: scale(0.8); }

/* ======================= Rangée des cinq capacités ======================= */
.capacites { max-width: var(--largeur); margin: 0 auto; padding: 28px 24px 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cap { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 14px; text-decoration: none; background: var(--panneau); border: 1px solid var(--bord); border-radius: 12px; transition: transform 0.2s ease, border-color 0.2s ease; }
.cap:hover { transform: translateY(-3px); border-color: var(--accent); }
.cap .pic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(217,169,41,0.14); color: var(--accent); margin-bottom: 4px; }
.cap .pic svg { width: 22px; height: 22px; }
.cap b { font-family: var(--titre); font-size: 17px; line-height: 1.15; color: var(--texte); }
.cap span.l { font-size: 13px; color: var(--texte-doux); line-height: 1.35; }
.bientot { display: inline-block; vertical-align: middle; margin-left: 8px; font-family: var(--corps, inherit); font-size: 11px; font-weight: 500; letter-spacing: 0.02em; padding: 2px 8px; border-radius: 999px; color: var(--arcane); border: 1px solid rgba(158,163,240,0.35); }
.cap .av { position: absolute; top: 12px; right: 12px; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; color: var(--arcane); border: 1px solid rgba(158,163,240,0.35); }




/* ======================= Chapitres (js/accueil/chapitres/) : Prépare, Joue, Sur la table, Avec ou sans figurines, Fait pour ton IA ======================= */
/* ======================= Chapitres ======================= */
.chapitres { max-width: var(--largeur); margin: 0 auto; padding: 0 24px; }
.chap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; padding: 84px 0; border-top: 1px solid var(--bord); }
.chap:first-child { border-top: 0; }
.chap.inverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.chap.inverse .texte { order: 2; }
.chap .texte { position: sticky; top: 120px; align-self: start; }
.chap .num { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: 0.14em; color: var(--accent); }
.chap .num::after { content: ""; width: 44px; height: 1px; background: rgba(217,169,41,0.5); }
.chap h2 { font-family: var(--titre); font-weight: 600; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; margin: 12px 0 14px; letter-spacing: -0.01em; }
.chap p { color: var(--texte-doux); font-size: 17px; margin: 0 0 8px; max-width: 28em; }
.chap .ouvrir { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(217,169,41,0.4); padding-bottom: 2px; }
.chap .ouvrir:hover { border-color: var(--accent); }
.chap .visuel { min-width: 0; }
.chap .note-ia { margin-top: 14px; padding: 10px 14px; border-left: 3px solid var(--accent); background: rgba(217,169,41,0.07); color: var(--texte); font-size: 15px; max-width: 28em; }
.anim .chap .texte { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.anim .chap .visuel { opacity: 0; transform: translateY(36px); transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s; }
.anim .chap.vu .texte, .anim .chap.vu .visuel { opacity: 1; transform: none; }

/* 1 · l'écran Préparer : arbre, carte, inspecteur (copie fidèle de donjon.html, en petit) */
.chap.large { grid-template-columns: 1fr; gap: 28px; }
.chap.large .texte { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 48px; align-items: end; }
.chap.large .texte > :is(.num, h2) { grid-column: 1; }
.chap.large .texte > p { grid-column: 2; }
.chap.large .texte > .ouvrir { grid-column: 1; }
/* 1 · Prépare : le texte à gauche, la fenêtre à droite, en haut l'un et l'autre ; trois points numérotés et un vrai bouton */
.chap.duo { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: start; }
.chap.duo .texte { position: static; display: block; }
.chap.duo .accroche { color: var(--texte); font-size: 19px; margin: 0 0 22px; }
.chap .points { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; }
.chap .points li { display: flex; gap: 12px; align-items: flex-start; color: var(--texte-doux); font-size: 15px; }
.chap .points li b { color: var(--texte); font-weight: 600; }
.chap .points .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-texte); font: 700 13px/24px var(--police); text-align: center; }
.chap .ouvrir-gros { min-height: 46px; padding: 0 22px; font-size: 15px; font-weight: 700; }
.chap .legende { margin: 12px 0 0; text-align: center; font-size: 13px; max-width: none; }
.chap.duo .pr-fenetre { max-width: none; }
/* 2 · Joue : la scène du héros (table, portable, projecteur) en miroir de Prépare ; les trois points s'allument avec la boucle */
.chap.duo.inverse { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
.chap.duo.inverse .texte { order: 2; }
.chap.duo .scene-wrap { max-width: none; box-shadow: 0 30px 60px rgba(0,0,0,0.45); }
#points-joue li, #points-table li { opacity: 0.55; transition: opacity 0.5s ease; }
#points-joue li.on, #points-table li.on { opacity: 1; }
#points-joue .n, #points-table .n { background: #4a4652; color: var(--texte); transition: background 0.4s ease, color 0.4s ease; }
#points-joue li.on .n, #points-table li.on .n { background: var(--accent); color: var(--accent-texte); }
.chap.duo .pr-corps { grid-template-columns: 280px minmax(0, 1fr); aspect-ratio: 16 / 10; }
/* 1 · l'écran Préparer : une fenêtre de navigateur simple, l'arbre à miniatures, la carte en grand, la fiche posée dessus (préfixe .pr-) */
.pr-fenetre { position: relative; max-width: 1000px; margin: 0 auto; border-radius: 16px; background: #201e26; border: 1px solid var(--bord); box-shadow: 0 30px 60px rgba(0,0,0,0.45); overflow: hidden; }
.pr-chrome { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; background: #2a2731; border-bottom: 1px solid var(--bord); }
.pr-points { display: flex; gap: 7px; }
.pr-points i { width: 11px; height: 11px; border-radius: 50%; background: #4a4652; }
.pr-adresse { flex: 0 1 340px; margin: 0 auto; height: 24px; border-radius: 999px; background: #1a1820; color: var(--texte-doux); font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pr-adresse b { color: var(--texte); font-weight: 600; }
.pr-vide { width: 47px; }
.pr-corps { display: grid; grid-template-columns: 250px minmax(0, 1fr); aspect-ratio: 16 / 9; }
.pr-arbre { padding: 14px 10px; border-right: 1px solid var(--bord); display: grid; align-content: start; gap: 2px; }
.pr-n { display: flex; align-items: center; gap: 9px; width: calc(100% - var(--niv, 0) * 12px); padding: 5px 8px; border: 0; border-radius: 10px; background: none; font: 600 13.5px var(--police); text-align: left; color: #cfc8bb; cursor: pointer; transition: background 0.3s ease, color 0.3s ease; white-space: nowrap; overflow: hidden; margin-left: calc(var(--niv, 0) * 12px); }
.pr-n:hover { background: rgba(255,255,255,0.05); }
.pr-n img, .pr-n .ic { width: 38px; height: 26px; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.pr-n .ic { display: grid; place-items: center; background: rgba(139,111,214,0.22); color: #c9b6ee; }
.pr-n .ic svg { width: 15px; height: 15px; }
.pr-n.on { background: var(--accent); color: #1b1408; }
.pr-n.on img, .pr-n.on .ic { box-shadow: 0 0 0 2px #1b1408; }
.pr-n > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.pr-carte { position: relative; overflow: hidden; background: #0e0d11; }
.pr-vue { position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease; display: grid; place-items: center; }
.pr-vue.on { opacity: 1; }
.pr-vue > img { width: 100%; height: 100%; object-fit: cover; }
.pr-grille { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px); background-size: 4.2% 6.2%; opacity: 0; transition: opacity 0.4s ease 0.2s; }
.pr-vue.on .pr-grille { opacity: 0.55; }
.pr-pin { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(27,20,8,0.75), 0 0 0 6px rgba(233,198,106,0.35); }
.pr-fiche { position: absolute; right: 14px; bottom: 14px; width: 270px; padding: 12px 14px; border-radius: 14px; background: rgba(28,26,33,0.9); backdrop-filter: blur(6px); border: 1px solid var(--bord); box-shadow: 0 10px 30px rgba(0,0,0,0.4); z-index: 5; }
.pr-fiche small { color: var(--accent); font: 700 10.5px var(--police); letter-spacing: 0.12em; }
.pr-fiche b { display: block; font: 600 21px/1.2 var(--titre); margin: 1px 0 4px; }
.pr-fiche p { margin: 0; color: var(--texte-doux); font-size: 13px; min-height: 1.4em; }
.pr-fiche p.desc { color: var(--texte); font-style: italic; }
.pr-fiche p.desc::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px; background: var(--accent); animation: pr-clign 1s steps(1) infinite; }
@keyframes pr-clign { 50% { opacity: 0; } }
.pr-puces { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pr-puces:empty { display: none; }
.pr-puces span { padding: 1px 9px; border-radius: 999px; font-size: 12px; background: rgba(217,169,41,0.16); color: var(--or-clair); border: 1px solid rgba(217,169,41,0.4); }
.pr-curseur { position: absolute; z-index: 15; width: 22px; height: 22px; left: 0; top: 0; transition: left 0.45s ease, top 0.45s ease, transform 0.12s ease; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); }
.pr-curseur.clic { transform: scale(0.8); }
@media (prefers-reduced-motion: reduce) { .pr-fiche p.desc::after { animation: none; } .pr-vue { transition: none; } }

.at-curseur { position: absolute; z-index: 5; width: 16px; height: 22px; pointer-events: none; transition: left 0.7s cubic-bezier(.5,0,.3,1), top 0.7s cubic-bezier(.5,0,.3,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6)); }
.at-curseur.clic { transform: scale(0.85); }
#cal-curseur { transition-duration: 0.5s; }


/* 3 · calibrage : une table vue de dessus, un réglage */
.cal { position: relative; }
.cal-vue { position: relative; width: 100%; aspect-ratio: 650 / 420; overflow: hidden; border-radius: 16px; border: 3px solid #4d3b2d; box-shadow: 5px 7px 0 rgba(0,0,0,0.4); background: #241d30; }
.cal-stage { position: absolute; left: 0; top: 0; width: 650px; height: 420px; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.cal-stage > * { position: absolute; }
.cal-bois { left: 0; top: 0; width: 650px; height: 420px; }
.cal-carte { transition: transform 0.8s cubic-bezier(.5,0,.3,1); box-shadow: 0 0 46px 18px rgba(255,214,140,0.3); }
.cal-carte canvas { display: block; }
.cal .bascule, .ia-zone .bascule { display: flex; width: max-content; margin: 0 auto 14px; border: 1px solid var(--bord); border-radius: 999px; overflow: hidden; background: var(--panneau); }
.cal .bascule button, .ia-zone .bascule button { font: 600 14px var(--police); color: var(--texte-doux); background: transparent; border: 0; padding: 9px 18px; cursor: pointer; }
.cal .bascule button[aria-pressed="true"], .ia-zone .bascule button[aria-pressed="true"] { background: var(--accent); color: var(--accent-texte); }
/* Au mur : la table s'efface, une télé montre la carte en grand. Écran incrusté : la carte dans un cadre noir, sans lumière de projecteur. */
.cal-bois, #cal-figs, .cal-carte { transition-property: opacity, transform, box-shadow; }
.cal-mur { left: 0; top: 0; width: 650px; height: 420px; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
.cal.mode-mur .cal-mur { opacity: 1; }
.cal.mode-mur .cal-bois, .cal.mode-mur #cal-figs, .cal.mode-mur .cal-carte { opacity: 0; }
.cal.mode-mur .cal-reglages > * { visibility: hidden; }
.cal-carte { position: absolute; }
/* écran incrusté : un écran dessiné dans le plateau (cadre noir, liseré, petite diode) ; la carte tourne et se règle À L'INTÉRIEUR, rognée par la fenêtre de l'écran (420 × 336, décalée de 115 / 42 dans la scène) */
.cal-fenetre { left: 0; top: 0; width: 650px; height: 420px; }
.cal-ecran-inc { left: 101px; top: 28px; width: 448px; height: 364px; border-radius: 16px; background: #0d0c10; box-shadow: 0 0 0 3px #2b2833, 0 8px 0 rgba(0,0,0,0.3), inset 0 0 0 2px #1d1b24; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }
.cal-ecran-inc::after { content: ""; position: absolute; right: 24px; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: #5fbf7a; box-shadow: 0 0 6px #5fbf7a; }
.cal.mode-incruste .cal-ecran-inc { opacity: 1; }
.cal.mode-incruste .cal-fenetre { left: 115px; top: 42px; width: 420px; height: 336px; overflow: hidden; border-radius: 4px; background: #0b0a0d; }
.cal.mode-incruste .cal-carte { margin: -42px 0 0 -115px; box-shadow: none; }
.cal-mur .ecran { position: absolute; left: 105px; top: 62px; width: 440px; height: 248px; overflow: hidden; border-radius: 4px; background: #0b0a0d; }
.cal-mur .ecran canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.cal-fig { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; transition: filter 0.4s ease; }
.cal-fig svg { display: block; }
.cal-fig.cale { filter: drop-shadow(0 0 7px #ffd98a); }
.cal-reglages { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 16px; background: var(--panneau); border: 2px solid var(--bord); border-radius: 14px; }
.cal-champ { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.cal-champ > span { font-size: 14px; font-weight: 600; color: var(--texte); white-space: nowrap; }
.cal-champ > b { min-width: 70px; text-align: right; font-size: 14px; font-weight: 600; color: var(--texte-doux); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-champ > b.ok { color: var(--succes); }
.cal-mini { width: 34px; height: 34px; border-radius: 9px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte-doux); display: grid; place-items: center; cursor: pointer; padding: 0; }
.cal-mini[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.cal-mini svg { width: 18px; height: 18px; }
.reglette { position: relative; flex: 1; min-width: 80px; height: 24px; cursor: pointer; touch-action: none; outline: 0; }
.reglette::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 6px; border-radius: 3px; background: #3d3a44; }
.reglette .rl-p { position: absolute; left: 0; top: 9px; height: 6px; border-radius: 3px; background: var(--accent); }
.reglette .rl-t { position: absolute; top: 2px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #f6e9bd; border: 3px solid var(--accent); box-shadow: 2px 3px 0 rgba(0,0,0,0.35); }
.reglette:focus-visible .rl-t { outline: 2px solid var(--or-clair); outline-offset: 2px; }


/* 4 · avec / sans figurines */
.duo4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.duo4 figure { margin: 0; }
.duo4 .vit { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: radial-gradient(closest-side, #2a2419, var(--scene)); border: 1px solid var(--bord); display: grid; place-items: center; }
.duo4 .cadre { position: relative; }
.duo4 .cadre canvas { display: block; border-radius: 4px; box-shadow: 0 14px 30px rgba(0,0,0,0.55); }
.duo4 figcaption { margin-top: 10px; font-size: 14px; color: var(--texte-doux); }
.duo4 figcaption b { display: block; color: var(--accent); font-size: 17px; font-family: var(--titre); font-weight: 600; margin-bottom: 2px; }
.pion { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--titre); color: #fff; border: 2.5px solid var(--encre); box-shadow: 0 3px 0 rgba(0,0,0,0.35); transition: left 0.9s ease, top 0.9s ease; }
.fg4 { position: absolute; transform: translate(-50%, -91%); filter: drop-shadow(0 3px 2px rgba(0,0,0,0.35)); }
.fg4 svg { display: block; width: 100%; height: auto; overflow: visible; }
.mj-curs { position: absolute; width: 18px; height: 18px; z-index: 3; transition: left 0.9s ease, top 0.9s ease; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); pointer-events: none; }

/* 5 · pour ton IA : une conversation avec l'IA d'images, qui se réduit dans un coin et laisse voir la Bibliothèque ; l'image glisse dedans (préfixe .ia-) */
.ia-fenetre { position: relative; border-radius: 16px; background: #201e26; border: 1px solid var(--bord); box-shadow: 0 30px 60px rgba(0,0,0,0.45); overflow: hidden; aspect-ratio: 16 / 10; display: flex; flex-direction: column; }
.ia-corps { flex: 1; min-height: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.ia-filtres { padding: 12px 10px; border-right: 1px solid var(--bord); display: grid; align-content: start; gap: 3px; font-size: 12.5px; }
.ia-filtres small { color: var(--texte-doux); font: 700 10px var(--police); letter-spacing: 0.12em; margin: 0 6px 4px; }
.ia-f { display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px; border-radius: 8px; color: var(--texte-doux); font-weight: 600; }
.ia-f i { font-style: normal; font-weight: 500; font-variant-numeric: tabular-nums; transition: color 0.4s ease; }
.ia-f.on { background: var(--accent); color: #1b1408; }
.ia-f.ia-alerte { color: #d9a929; }
.ia-f.flash i { color: var(--accent); font-weight: 700; }
.ia-grille { padding: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; gap: 10px; align-content: start; overflow: hidden; background: #0e0d11; }
.ia-t { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #1a1820; border: 1px solid var(--bord); }
.ia-t img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ia-t figcaption { padding: 5px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ia-t .ia-badge { position: absolute; left: 6px; top: 6px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: rgba(12,11,14,0.85); color: #d9a929; border: 1px solid rgba(217,169,41,0.5); }
.ia-t.nouveau { animation: ia-entree 0.6s cubic-bezier(.3,1.4,.5,1) both; box-shadow: 0 0 0 2px var(--accent); }
@keyframes ia-entree { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
.ia-depot { display: grid; place-items: center; text-align: center; min-height: 100%; aspect-ratio: auto; border: 1.5px dashed var(--bord); border-radius: 10px; color: var(--texte-doux); font-size: 12px; padding: 8px; transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease; }
.ia-depot b { display: block; font-size: 22px; line-height: 1; color: var(--accent); margin-bottom: 4px; font-weight: 400; }
.ia-depot.vise { border-color: var(--accent); background: rgba(217,169,41,0.1); color: var(--texte); }
/* la fenêtre de conversation : pleine fenêtre au début, puis réduite dans le coin bas droit */
.ia-chat { position: absolute; right: 0; bottom: 0; width: 100%; height: 100%; display: flex; flex-direction: column; background: #26242d; border: 0 solid var(--bord); border-radius: 0; z-index: 4; overflow: hidden; transition: width 0.8s cubic-bezier(.5,0,.3,1), height 0.8s cubic-bezier(.5,0,.3,1), right 0.8s cubic-bezier(.5,0,.3,1), bottom 0.8s cubic-bezier(.5,0,.3,1), border-radius 0.8s ease, box-shadow 0.8s ease; }
.ia-chat.coin { right: 14px; bottom: 14px; width: 42%; height: 56%; border: 1px solid #4a4652; border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,0.55); }
.ia-tete { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; flex: none; border-bottom: 1px solid var(--bord); font-size: 13px; font-weight: 600; color: var(--texte-doux); }
.ia-logo { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(from 20deg, #e9c66a, #d9a929, #c8452f, #8b6fd6, #e9c66a); }
.ia-fil { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 14px; overflow: hidden; }
.ia-m { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; animation: ia-monte 0.4s ease both; }
.ia-m.moi { align-self: flex-end; background: #3b3947; color: var(--texte); border-bottom-right-radius: 4px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.ia-m.ia { align-self: flex-start; background: transparent; padding-left: 0; color: var(--texte); }
.ia-m.ia img { display: block; width: min(300px, 100%); aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; margin-top: 8px; border: 1px solid var(--bord); cursor: grab; animation: ia-revele 1.4s ease both; transition: width 0.8s ease; }
.ia-chat.coin .ia-m.ia img { width: 150px; }
.ia-points-saisie { display: inline-flex; gap: 4px; }
.ia-points-saisie i { width: 6px; height: 6px; border-radius: 50%; background: var(--texte-doux); animation: ia-bond 1s ease infinite; }
.ia-points-saisie i:nth-child(2) { animation-delay: 0.15s; } .ia-points-saisie i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ia-monte { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ia-revele { from { opacity: 0; filter: blur(14px) saturate(0.4); } to { opacity: 1; filter: none; } }
@keyframes ia-bond { 0%, 60%, 100% { transform: none; opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.ia-saisie { flex: none; display: flex; align-items: center; gap: 8px; margin: 0 14px 14px; min-height: 38px; padding: 8px 8px 8px 14px; border-radius: 14px; background: #1a1820; border: 1px solid var(--bord); font-size: 12px; color: var(--texte-doux); }
.ia-saisie span { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ia-saisie span.ecrit { color: var(--texte); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.ia-envoi { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #4a4652; position: relative; transition: background 0.3s ease; }
.ia-envoi::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border: solid #1b1408; border-width: 2px 0 0 2px; transform: translate(-50%, -30%) rotate(45deg); }
.ia-envoi.pret { background: var(--accent); }
.ia-fantome { position: absolute; z-index: 10; width: 120px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 8px 20px rgba(0,0,0,0.5); pointer-events: none; transition: left 0.9s cubic-bezier(.5,0,.3,1), top 0.9s cubic-bezier(.5,0,.3,1), width 0.9s ease, opacity 0.35s ease; }
.ia-fantome[hidden] { display: none; }
#ia-curseur { transition: left 0.9s cubic-bezier(.5,0,.3,1), top 0.9s cubic-bezier(.5,0,.3,1), transform 0.12s ease; }
@media (prefers-reduced-motion: reduce) { .ia-chat, .ia-fantome { transition: none; } .ia-m, .ia-m.ia img, .ia-t.nouveau, .ia-points-saisie i { animation: none; } }
/* trois onglets : Illustre (Bibliothèque + conversation), Crée un donjon (conversation + arbre de Préparer), Décline en plateaux (image globale + plateaux) */
.ia-zone { position: relative; }
.ia-zone .bascule { margin: 0 auto 14px; }
.chap.duo .ia-fenetre { max-width: none; }
.chap.duo .note-ia { margin: 0 0 22px; font-size: 14px; }
.ia-fenetre :is(.ia-s1, .ia-s2) { display: none; position: absolute; left: 0; right: 0; top: 40px; bottom: 0; }
.ia-fenetre[data-o="1"] .ia-s1 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ia-fenetre[data-o="2"] .ia-s2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; background: #0e0d11; }
.ia-fenetre:not([data-o="0"]) :is(.ia-corps, .ia-chat) { display: none; }
#ia-curseur { z-index: 20; }
.ia-chat2 { display: flex; flex-direction: column; background: #26242d; border-right: 1px solid var(--bord); min-height: 0; }
.ia-arbre { padding: 14px 10px; align-content: start; background: #201e26; border-right: 0; overflow: hidden; }
.ia-arbre .pr-n { cursor: default; }
.ia-arbre .pr-n.nouveau { animation: ia-monte 0.4s ease both; }
.ia-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ia-chips span { padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #3b3947; border: 1px solid #4a4652; color: var(--texte); transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.ia-chips span.choisi { background: var(--accent); color: #1b1408; border-color: var(--accent); }
.ia-m.ia canvas { display: block; margin-top: 8px; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--bord); background: #0e0d11; }
.ia-plats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 8px; width: min(310px, 100%); }
.ia-plat { aspect-ratio: 16 / 9; background: #050507; border: 1px solid var(--bord); border-radius: 5px; overflow: hidden; display: grid; place-items: center; animation: ia-entree 0.4s cubic-bezier(.3,1.4,.5,1) both; }
.ia-plat canvas { display: block; max-width: 100%; max-height: 100%; }
.ia-fichier { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 12px; border-radius: 10px; background: #3b3947; border: 1px solid #4a4652; font-size: 12px; font-weight: 600; cursor: grab; }
.ia-fichier span, .ia-fantome-f span { width: 14px; height: 16px; border-radius: 3px; background: linear-gradient(135deg, #e9c66a, #c8452f); flex: none; }
.ia-fantome-f { position: absolute; z-index: 10; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: #3b3947; border: 2px solid #fff; box-shadow: 0 8px 20px rgba(0,0,0,0.5); font-size: 12px; font-weight: 600; pointer-events: none; white-space: nowrap; transition: left 0.9s cubic-bezier(.5,0,.3,1), top 0.9s cubic-bezier(.5,0,.3,1), opacity 0.35s ease; }
.ia-fantome-f[hidden] { display: none; }
.ia-globale { position: relative; margin: 14px; border-radius: 10px; overflow: hidden; border: 1px solid var(--bord); }
.ia-globale img { display: block; width: 100%; aspect-ratio: 1280 / 852; object-fit: cover; }
.ia-cadre { position: absolute; aspect-ratio: 16 / 9; border: 2px solid #fff; border-radius: 4px; background: rgba(255,255,255,0.14); box-shadow: 0 0 0 1px rgba(0,0,0,0.4); opacity: 0; transform: scale(1.12); transition: opacity 0.4s ease, transform 0.4s ease, background 0.4s ease, border-color 0.4s ease; }
.ia-cadre.on { opacity: 1; transform: none; }
.ia-cadre.pris { background: rgba(217,169,41,0.22); border-color: var(--accent); }
.ia-cadre span { position: absolute; left: 3px; top: 2px; min-width: 18px; text-align: center; font: 700 11px/16px var(--police); background: rgba(12,11,14,0.88); color: #fff; padding: 0 5px; border-radius: 999px; }
.ia-plateaux { padding: 14px 14px 14px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: center; }
.ia-p { margin: 0; border-radius: 8px; overflow: hidden; background: #1a1820; border: 1px solid var(--bord); }
.ia-p .vide { aspect-ratio: 16 / 9; background: #14131a; display: block; }
.ia-p img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ia-p figcaption { padding: 3px 6px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ia-p.nouveau { animation: ia-entree 0.5s cubic-bezier(.3,1.4,.5,1) both; border-color: var(--accent); }

@media (max-width: 860px) {
  .ia-corps { grid-template-columns: minmax(0, 1fr); }
  .ia-filtres { display: none; }
  .ia-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ia-chat.coin { width: 62%; height: 66%; }
  .ia-fenetre { aspect-ratio: 4 / 5; }
  .ia-fenetre[data-o="1"] .ia-s1 { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .ia-fenetre .ia-arbre { grid-auto-flow: row; grid-auto-columns: auto; overflow: hidden; max-height: 200px; border-right: 0; border-bottom: 0; border-top: 1px solid var(--bord); }
  .ia-fenetre .ia-arbre .pr-n { margin-left: 0 !important; width: calc(100% - var(--niv, 0) * 12px); }
  .ia-fenetre[data-o="2"] .ia-s2 { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; }
  .ia-plateaux { padding: 0 14px 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ia-zone .bascule { max-width: 100%; overflow-x: auto; }
  .ia-zone .bascule button { white-space: nowrap; padding: 9px 12px; }
  .cal-reglages { flex-wrap: wrap; }
  .cal-champ { flex: 1 1 100%; }
  .chapitres { padding: 0 16px; }
  .chap, .chap.inverse { grid-template-columns: 1fr; gap: 24px; padding: 48px 0; }
  .chap .visuel { order: -1; }
  .chap.inverse .texte { order: 0; }
  .chap .texte { position: static; }
  /* écran Préparer sur téléphone : l'arbre en bandeau défilant au-dessus, la carte, la fiche en bas en pleine largeur */
  .chap.large .texte { display: block; }
  .chap.duo { display: flex; flex-direction: column; gap: 0; }
  .chap.duo .texte { display: contents; }
  .chap.duo .num { order: 1; }
  .chap.duo h2 { order: 2; }
  .chap.duo .accroche { order: 3; margin-bottom: 24px; }
  .chap.duo .visuel { order: 4; }
  .chap.duo .points { order: 5; margin: 24px 0; }
  .chap.duo .texte > p:not(.accroche) { order: 5; }
  .chap.duo .note-ia { order: 5; margin: 0 0 24px; }
  .chap.duo .ouvrir-gros { order: 6; width: 100%; justify-content: center; }
  .pr-corps, .chap.duo .pr-corps { grid-template-columns: minmax(0, 1fr); aspect-ratio: auto; }
  .pr-arbre { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--bord); }
  .pr-n { margin-left: 0 !important; width: auto; }
  .pr-carte { aspect-ratio: 4 / 3; }
  .pr-fiche { left: 10px; right: 10px; width: auto; }
  .chap.large .texte > * { grid-column: auto !important; }
  .ia-haut { grid-template-columns: 1fr; }
  .fleche svg { transform: rotate(90deg); }
}
@media (max-width: 520px) {
  .cal .bascule button { padding: 8px 14px; font-size: 13px; }
  .duo4 { gap: 10px; }
  .pion { font-size: 11px; border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .anim .chap .texte, .anim .chap .visuel { transition: none; }
}

/* ======================= Tableau de bord : six tuiles pleines et uniformes ======================= */
main > .tableau { max-width: var(--largeur); margin: 0 auto; padding: 56px var(--gouttiere) 48px; }
.titre-section { font-family: var(--titre); font-weight: 600; font-size: 28px; margin: 0 0 18px; }
.outils { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tuile { position: relative; display: flex; flex-direction: column; min-width: 0; text-decoration: none; text-align: left; font: inherit; color: inherit; padding: 0; background: var(--panneau); border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease; }
.tuile:hover { transform: translateY(-3px); border-color: var(--accent); }
.tuile .visuel { position: relative; height: 200px; background: var(--scene); overflow: hidden; }
.tuile .visuel > canvas, .tuile .visuel > img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tuile .visuel > img.couvre { width: 100%; height: 100%; object-fit: cover; }
.tuile .visuel .couvre { width: 100%; height: 100%; object-fit: cover; display: block; }
.tuile .visuel .voile-bas { position: absolute; inset: auto 0 0 0; height: 35%; z-index: 2; background: linear-gradient(transparent, var(--panneau)); pointer-events: none; }
.tuile .texte { padding: 14px 16px 16px; }
.tuile b { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-size: 18px; color: var(--accent); }
.tuile b small { font: 12px var(--police); color: var(--texte-doux); overflow-wrap: anywhere; }
.tuile b small[hidden] { display: none; }
.tuile .ligne { display: block; color: var(--texte-doux); font-size: 14px; }
.tuile .pastille-carnet { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--p-choisi); color: var(--accent); }
.tuile .pastille-carnet[hidden] { display: none; }

/* Illustrations par défaut : chacune couvre toute la vignette */
.tuile .visuel.plan { background: radial-gradient(closest-side, #2a2419, var(--scene)); }
.mosaique { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 3px; background: #0c0b0e; }
.mosaique > div { overflow: hidden; position: relative; box-shadow: 0 6px 16px rgba(0,0,0,0.5); background: var(--surface); }
.mosaique canvas, .mosaique img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.mosaique img { width: 100%; height: 100%; object-fit: cover; }
.tuile .visuel.parchemin { background: #f1e6cb; }
.tuile .visuel.parchemin .croquis { position: absolute; inset: 0 0 0 54%; filter: sepia(0.85) saturate(0.7) contrast(0.95); opacity: 0.85; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
.tuile .visuel.parchemin .croquis > canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tuile .visuel.parchemin .ecriture { position: absolute; left: 18px; top: 18px; right: 48%; z-index: 1; display: grid; gap: 6px; color: #3a2a1f; font: 14px/1.4 var(--titre); }
.tuile .visuel.parchemin .ecriture b { font-size: 17px; color: #3a2a1f; display: block; }
.tuile .visuel.parchemin .ecriture span { color: #5a4634; font-size: 14px; }
.tuile .visuel.fiche-fond { background: radial-gradient(circle at 60% 55%, #5a3d1d, #2a1f14 55%, #16120d); }
.telephone { position: absolute; left: 50%; top: 50%; width: 112px; height: 196px; margin: -100px 0 0 -95px; border-radius: 18px; border: 3px solid #3a3740; background: #16151a; padding: 14px 10px; display: flex; flex-direction: column; gap: 8px; transform: rotate(6deg); box-shadow: 0 16px 40px rgba(0,0,0,0.6); overflow: hidden; }
.telephone .pv { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #4f9a5c 68%, #2a2a30 68%); flex: none; }
.telephone .carac { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.telephone .carac i { height: 22px; border-radius: 4px; background: #26252c; }
.telephone .nom { font-family: var(--titre); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telephone .classe { font-size: 10px; color: var(--texte-doux); margin-top: -6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.de { position: absolute; left: 50%; top: 50%; margin: 10px 0 0 40px; width: 64px; height: 64px; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.6)); animation: roule 6s ease-in-out infinite; }
@keyframes roule { 0%, 80%, 100% { transform: rotate(0); } 86% { transform: rotate(-200deg) scale(1.1); } 92% { transform: rotate(-360deg); } }
.tuile .visuel.papier { background: #f4efe4; }
.tuile .visuel.papier > canvas { transform: translate(-50%, -50%) rotate(-4deg); }

/* ======================= Promesses et pied de page ======================= */
/* ======================= Questions fréquentes ======================= */
.faq { margin: 56px 0 0; max-width: 820px; }
.faq details { border-top: 1px solid var(--bord); }
.faq details:last-of-type { border-bottom: 1px solid var(--bord); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 4px; font-family: var(--titre); font-size: 18px; color: var(--texte); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 22px; line-height: 1; color: var(--accent); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.faq details p { margin: 0 0 18px; padding: 0 4px; max-width: 42em; color: var(--texte-doux); font-size: 15.5px; line-height: 1.55; }
.promesses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 48px 0 0; padding: 24px 0 0; border-top: 1px solid var(--bord); }
.promesses b { display: block; }
.promesses span { color: var(--texte-doux); font-size: 14px; }
.pied { max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere) 40px; font-size: 13px; color: var(--texte-doux); }

/* ======================= Écrans plus étroits ======================= */
@media (max-width: 1000px) {
  .capacites { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) and (min-width: 861px) { .outils { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .accueil .heros .grille { grid-template-columns: 1fr; gap: 14px; padding: 16px 16px 28px; min-height: 0; }
  .accueil .heros .illus { order: -1; }
  .scene-wrap { max-width: 520px; }
            .capacites { padding: 22px 16px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capacites .cap:last-child { grid-column: 1 / -1; }
  main > .tableau { padding: 40px 16px 40px; }
  .outils { grid-template-columns: 1fr; }
  .tuile .visuel { height: 170px; }
  .promesses { grid-template-columns: 1fr; gap: 14px; }
  .pied { padding: 0 16px 32px; }
}
@media (max-width: 520px) {
  .capacites .cap b { font-size: 16px; }
}
@media (max-width: 860px) {
  .chap.duo .visuel { max-width: 100%; }
  .cal .bascule, .ia-zone .bascule { width: auto; max-width: 100%; overflow-x: auto; }
  .cal .bascule label, .ia-zone .bascule label { padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .de, .vapeur { animation: none; }
  .tuile, .cap { transition: none; }
  html { scroll-behavior: auto; }
}

/* ======================= Propre à la vitrine (écrit pour elle) =======================
   Les démonstrations dessinées en direct dans l'appli sont ici des enregistrements vidéo muets, lus en boucle quand ils sont à l'écran. */

/* En-tête simple : la marque et le lien vers l'appli (la barre de l'appli montre l'état du dossier de l'utilisateur) */
.menu-site { background: var(--panneau); border-bottom: 1px solid var(--bord); padding: 0 12px; }
.menu-int { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.menu-nom { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: 0.01em; text-decoration: none; }
.menu-nom img { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
@media (max-width: 520px) { .menu-site { padding: 0 16px; } }
.menu-droite { display: flex; align-items: center; gap: 8px; }

/* Lien « Mondes » à côté du choix de langue (toutes les pages de la vitrine) */
.menu-int { flex-wrap: wrap; }
.menu-lien { display: inline-flex; align-items: center; min-height: var(--btn-h); padding: 0 10px; border-radius: var(--rayon-controle); color: var(--texte-doux); font-size: 14px; font-weight: 600; text-decoration: none; }
.menu-lien:hover, .menu-lien.actif { color: var(--texte); }
.menu-lien:hover { background: var(--champ); }
.menu-lien:focus-visible { outline: var(--focus); outline-offset: var(--focus-decalage); }
.menu-droite { gap: 4px; }
@media (max-width: 520px) { .menu-droite .btn { padding: 0 10px; font-size: 13px; } .menu-lien { padding: 0 8px; } }

/* Choix de la langue : un lien discret (EN / FR) à côté du bouton de l'appli */
.lang-lien { display: inline-flex; align-items: center; justify-content: center; min-height: var(--btn-h); min-width: 40px; padding: 0 10px; border-radius: var(--rayon-controle); color: var(--texte-doux); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-decoration: none; }
.lang-lien:hover { color: var(--texte); background: var(--champ); }
.lang-lien:focus-visible { outline: var(--focus); outline-offset: var(--focus-decalage); }

/* Suggestion de langue : bandeau fixe en bas de l'écran, sans décaler la page */
.bandeau-langue { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; background: var(--panneau); border: 1px solid var(--bord); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 14px; animation: bandeau-entree 0.3s ease both; }
.bandeau-langue p { margin: 0; color: var(--texte); }
.bandeau-langue .btn { white-space: nowrap; }
.bandeau-fermer { font-size: 18px; padding: 0 12px; }
@keyframes bandeau-entree { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 520px) { .bandeau-langue { flex-wrap: wrap; justify-content: flex-end; left: 16px; right: 16px; bottom: 12px; transform: none; max-width: none; animation-name: bandeau-fondu; } .bandeau-langue p { flex-basis: 100%; } }
@keyframes bandeau-fondu { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bandeau-langue { animation: none; } }

/* Bêta fermée, sous les deux boutons du héros */
.accueil .heros .actions .beta { flex-basis: 100%; margin: 0; color: var(--texte-doux); font-size: 14px; }

/* Les clips : une vidéo à la place de la fenêtre ou de la scène dessinée */
.fen-clip { position: relative; border-radius: 16px; overflow: hidden; background: #201e26; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); }
.fen-clip video, .fen-clip > img { display: block; width: 100%; height: auto; }
.cal .fen-clip { border-radius: 14px; box-shadow: 5px 7px 0 rgba(0, 0, 0, 0.4); }
.ia-zone .fen-clip { border-radius: 16px; }
.duo4 .vit.clip { border: 0; }
.duo4 .vit > video, .duo4 .vit > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tuile .visuel > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tuile .visuel.parchemin .croquis > img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tuile .visuel.papier > img { transform: translate(-50%, -50%) rotate(-4deg); }

/* Onglets en CSS seul (radio cachés + étiquettes) : l'apparence des boutons de l'original (.bascule) */
.cal .bascule label, .ia-zone .bascule label { font: 600 14px var(--police); color: var(--texte-doux); background: transparent; border: 0; padding: 9px 18px; cursor: pointer; white-space: nowrap; }
.cal .bascule label:hover, .ia-zone .bascule label:hover { color: var(--texte); }
:is(.cal, .ia-zone) > input:nth-of-type(1):checked ~ .bascule label:nth-child(1),
:is(.cal, .ia-zone) > input:nth-of-type(2):checked ~ .bascule label:nth-child(2),
:is(.cal, .ia-zone) > input:nth-of-type(3):checked ~ .bascule label:nth-child(3) { background: var(--accent); color: var(--accent-texte); }
:is(.cal, .ia-zone) > input:nth-of-type(1):focus-visible ~ .bascule label:nth-child(1),
:is(.cal, .ia-zone) > input:nth-of-type(2):focus-visible ~ .bascule label:nth-child(2),
:is(.cal, .ia-zone) > input:nth-of-type(3):focus-visible ~ .bascule label:nth-child(3) { outline: 2px solid var(--texte); outline-offset: -4px; }
.panneaux .pan { display: none; }
:is(.cal, .ia-zone) > input:nth-of-type(1):checked ~ .panneaux .pan-1,
:is(.cal, .ia-zone) > input:nth-of-type(2):checked ~ .panneaux .pan-2,
:is(.cal, .ia-zone) > input:nth-of-type(3):checked ~ .panneaux .pan-3 { display: block; }
/* les trois points de « Projette » suivent l'affichage choisi (dans l'appli : une classe posée par le script) */
.chap:has(#aff-mur:checked) #points-table li:nth-child(1),
.chap:has(#aff-table:checked) #points-table li:nth-child(2),
.chap:has(#aff-incruste:checked) #points-table li:nth-child(3) { opacity: 1; }
.chap:has(#aff-mur:checked) #points-table li:nth-child(1) .n,
.chap:has(#aff-table:checked) #points-table li:nth-child(2) .n,
.chap:has(#aff-incruste:checked) #points-table li:nth-child(3) .n { background: var(--accent); color: var(--accent-texte); }
@media (max-width: 860px) { .cal .bascule, .ia-zone .bascule { max-width: 100%; overflow-x: auto; } .ia-zone .bascule label { padding: 9px 12px; } }
@media (max-width: 520px) { .cal .bascule label { padding: 8px 14px; font-size: 13px; } }

/* Section « Mondes » de l'accueil quand elle montre plusieurs mondes (générée par outils/monde.mjs) */
.chap .visuel.mondes-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mondes-grille .fen-clip { border-radius: 12px; }
.mondes-grille .fen-clip a { display: block; color: inherit; text-decoration: none; }
.mondes-grille .monde-nom { display: block; padding: 8px 12px 10px; font-size: 13.5px; font-weight: 600; }
@media (max-width: 520px) { .chap .visuel.mondes-grille { grid-template-columns: minmax(0, 1fr); } }
