/* Thème cartoon / aventure commun à tout le site, chargé après style.css.
   Les panneaux sont en papier clair dans les deux thèmes : seuls le ciel et le sol changent. */

@font-face {
  font-family: "Lilita One";
  src: url("../assets/fonts/lilita-one-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

body.aventure {
  --raccord: #e8935c;
  /* Thème sombre par défaut ; le thème clair reprend le papier plus bas */
  --encre: #0d1230;
  --encre-texte: #f1f4ff;
  --papier: #20284b;
  --papier-2: #2c3560;
  --champ: #161c39;
  --champ-survol: #2a3360;
  --relief-haut: #38427a;
  --relief-bas: #2b3463;
  --levre-claire: #141a3a;
  --indice: #94a0c4;
  --encart: #3a3560;
  --rouge-texte: #ffa07e;
  /* Cadres : trait fin et ombre douce */
  --cadre-bord: rgb(200 215 255 / .16);
  --cadre-ombre: inset 0 1px 0 rgb(255 255 255 / .05), 0 16px 38px rgb(5 8 26 / .38);
  --cadre-ombre-douce: inset 0 1px 0 rgb(255 255 255 / .04), 0 6px 16px rgb(5 8 26 / .26);
  --cadre-ombre-haute: inset 0 1px 0 rgb(255 255 255 / .07), 0 22px 46px rgb(5 8 26 / .48);
  --rouge: #e4572e;
  --or: #ffc93b;
  --texte-papier: #dfe5f7;
  --doux-papier: #aeb8d4;
  --bd: "Lilita One", "Arial Black", Arial, sans-serif;
  --voile: rgb(48 24 84 / .35);
  --sticker: var(--cadre-ombre);
  --decor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='960' height='236' shape-rendering='crispEdges'%3E%3Cg shape-rendering='auto' fill='%231d2442' stroke='%231d2442' stroke-width='6'%3E%3Ccircle cx='90' cy='106' r='14'/%3E%3Ccircle cx='114' cy='98' r='19'/%3E%3Ccircle cx='140' cy='105' r='15'/%3E%3Crect x='90' y='106' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%23f7b6c2'%3E%3Ccircle cx='90' cy='106' r='14'/%3E%3Ccircle cx='114' cy='98' r='19'/%3E%3Ccircle cx='140' cy='105' r='15'/%3E%3Crect x='90' y='106' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%231d2442' stroke='%231d2442' stroke-width='6'%3E%3Ccircle cx='380' cy='98' r='14'/%3E%3Ccircle cx='404' cy='90' r='19'/%3E%3Ccircle cx='430' cy='97' r='15'/%3E%3Crect x='380' y='98' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%23f7b6c2'%3E%3Ccircle cx='380' cy='98' r='14'/%3E%3Ccircle cx='404' cy='90' r='19'/%3E%3Ccircle cx='430' cy='97' r='15'/%3E%3Crect x='380' y='98' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%231d2442' stroke='%231d2442' stroke-width='6'%3E%3Ccircle cx='600' cy='110' r='14'/%3E%3Ccircle cx='624' cy='102' r='19'/%3E%3Ccircle cx='650' cy='109' r='15'/%3E%3Crect x='600' y='110' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%23f7b6c2'%3E%3Ccircle cx='600' cy='110' r='14'/%3E%3Ccircle cx='624' cy='102' r='19'/%3E%3Ccircle cx='650' cy='109' r='15'/%3E%3Crect x='600' y='110' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%231d2442' stroke='%231d2442' stroke-width='6'%3E%3Ccircle cx='830' cy='92' r='14'/%3E%3Ccircle cx='854' cy='84' r='19'/%3E%3Ccircle cx='880' cy='91' r='15'/%3E%3Crect x='830' y='92' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%23f7b6c2'%3E%3Ccircle cx='830' cy='92' r='14'/%3E%3Ccircle cx='854' cy='84' r='19'/%3E%3Ccircle cx='880' cy='91' r='15'/%3E%3Crect x='830' y='92' width='50' height='14'/%3E%3C/g%3E%3Cpath d='M0 200 L0 160 L60 160 L60 136 L120 136 L120 112 L204 112 L204 136 L276 136 L276 160 L420 160 L420 136 L504 136 L504 160 L612 160 L612 124 L684 124 L684 100 L768 100 L768 124 L840 124 L840 148 L960 148 L960 200Z' fill='%2354407f' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='27' y='150' width='6' height='10' fill='%2354352f'/%3E%3Crect x='12.0' y='138' width='36' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='18.0' y='126' width='24' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='24.0' y='114' width='12' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='157' y='102' width='6' height='10' fill='%2354352f'/%3E%3Crect x='142.0' y='90' width='36' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='148.0' y='78' width='24' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='154.0' y='66' width='12' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='317' y='150' width='6' height='10' fill='%2354352f'/%3E%3Crect x='302.0' y='138' width='36' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='308.0' y='126' width='24' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='314.0' y='114' width='12' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='467' y='126' width='6' height='10' fill='%2354352f'/%3E%3Crect x='452.0' y='114' width='36' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='458.0' y='102' width='24' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='464.0' y='90' width='12' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='557' y='150' width='6' height='10' fill='%2354352f'/%3E%3Crect x='542.0' y='138' width='36' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='548.0' y='126' width='24' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='554.0' y='114' width='12' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='722' y='90' width='6' height='10' fill='%2354352f'/%3E%3Crect x='707.0' y='78' width='36' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='713.0' y='66' width='24' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='719.0' y='54' width='12' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='897' y='138' width='6' height='10' fill='%2354352f'/%3E%3Crect x='882.0' y='126' width='36' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='888.0' y='114' width='24' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='894.0' y='102' width='12' height='12' fill='%231c5a5c' stroke='%231d2442' stroke-width='3'/%3E%3Cpath d='M0 236 L0 188 L96 188 L96 176 L240 176 L240 188 L384 188 L384 200 L528 200 L528 188 L720 188 L720 176 L864 176 L864 188 L960 188 L960 236Z' fill='%233ea36a'/%3E%3Cpath d='M0 188 L96 188 L96 176 L240 176 L240 188 L384 188 L384 200 L528 200 L528 188 L720 188 L720 176 L864 176 L864 188 L960 188' fill='none' stroke='%231d2442' stroke-width='4'/%3E%3C/svg%3E");
  --ciel: linear-gradient(#1c1b4f, #3d2a78 30%, #7a3b8f 58%, #d95f85 82%, #ffb26b);
  /* style.css s'appuie sur ces variables : tout le texte passe sur papier */
  --text: var(--encre-texte);
  --muted: var(--doux-papier);
  --ice: #8fd2ff;
  --ink: var(--papier-2);
  --panel-2: var(--papier-2);
  --line: var(--encre);
  --arete: rgb(200 215 255 / .28);
  --verre: var(--papier);
  --ombre: var(--cadre-ombre);
  --done: #4ff0b0;
  --doing: #ffc24d;
  --idea: #c9a6ff;
  color: var(--texte-papier);
  font-size: 17px;
}
html[data-theme="clair"] body.aventure {
  --raccord: #ffe2a8;
  --encre: #1d2442;
  --encre-texte: #1d2442;
  --papier: #fff4d6;
  --papier-2: #f6e2b3;
  --champ: #fffaf0;
  --champ-survol: #fff;
  --relief-haut: #fffdf6;
  --relief-bas: #fbeec9;
  --levre-claire: #cfae6b;
  --indice: #7a6a52;
  --encart: #ffe9a8;
  --cadre-bord: rgb(29 36 66 / .14);
  --cadre-ombre: 0 14px 34px rgb(44 32 12 / .2);
  --cadre-ombre-douce: 0 5px 14px rgb(44 32 12 / .13);
  --cadre-ombre-haute: 0 20px 42px rgb(44 32 12 / .28);
  --rouge-texte: #b23a14;
  --texte-papier: #33291c;
  --doux-papier: #65543c;
  --ice: #155ea8;
  --arete: rgb(29 36 66 / .28);
  --done: #0d7a52;
  --doing: #a05f00;
  --idea: #6a35a8;
  --voile: rgb(48 24 84 / 0);
  --decor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='960' height='236' shape-rendering='crispEdges'%3E%3Cg shape-rendering='auto' fill='%231d2442' stroke='%231d2442' stroke-width='6'%3E%3Ccircle cx='90' cy='106' r='14'/%3E%3Ccircle cx='114' cy='98' r='19'/%3E%3Ccircle cx='140' cy='105' r='15'/%3E%3Crect x='90' y='106' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%23ffffff'%3E%3Ccircle cx='90' cy='106' r='14'/%3E%3Ccircle cx='114' cy='98' r='19'/%3E%3Ccircle cx='140' cy='105' r='15'/%3E%3Crect x='90' y='106' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%231d2442' stroke='%231d2442' stroke-width='6'%3E%3Ccircle cx='380' cy='98' r='14'/%3E%3Ccircle cx='404' cy='90' r='19'/%3E%3Ccircle cx='430' cy='97' r='15'/%3E%3Crect x='380' y='98' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%23ffffff'%3E%3Ccircle cx='380' cy='98' r='14'/%3E%3Ccircle cx='404' cy='90' r='19'/%3E%3Ccircle cx='430' cy='97' r='15'/%3E%3Crect x='380' y='98' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%231d2442' stroke='%231d2442' stroke-width='6'%3E%3Ccircle cx='600' cy='110' r='14'/%3E%3Ccircle cx='624' cy='102' r='19'/%3E%3Ccircle cx='650' cy='109' r='15'/%3E%3Crect x='600' y='110' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%23ffffff'%3E%3Ccircle cx='600' cy='110' r='14'/%3E%3Ccircle cx='624' cy='102' r='19'/%3E%3Ccircle cx='650' cy='109' r='15'/%3E%3Crect x='600' y='110' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%231d2442' stroke='%231d2442' stroke-width='6'%3E%3Ccircle cx='830' cy='92' r='14'/%3E%3Ccircle cx='854' cy='84' r='19'/%3E%3Ccircle cx='880' cy='91' r='15'/%3E%3Crect x='830' y='92' width='50' height='14'/%3E%3C/g%3E%3Cg shape-rendering='auto' fill='%23ffffff'%3E%3Ccircle cx='830' cy='92' r='14'/%3E%3Ccircle cx='854' cy='84' r='19'/%3E%3Ccircle cx='880' cy='91' r='15'/%3E%3Crect x='830' y='92' width='50' height='14'/%3E%3C/g%3E%3Cpath d='M0 200 L0 160 L60 160 L60 136 L120 136 L120 112 L204 112 L204 136 L276 136 L276 160 L420 160 L420 136 L504 136 L504 160 L612 160 L612 124 L684 124 L684 100 L768 100 L768 124 L840 124 L840 148 L960 148 L960 200Z' fill='%238fb7dd' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='27' y='150' width='6' height='10' fill='%237a4a26'/%3E%3Crect x='12.0' y='138' width='36' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='18.0' y='126' width='24' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='24.0' y='114' width='12' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='157' y='102' width='6' height='10' fill='%237a4a26'/%3E%3Crect x='142.0' y='90' width='36' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='148.0' y='78' width='24' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='154.0' y='66' width='12' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='317' y='150' width='6' height='10' fill='%237a4a26'/%3E%3Crect x='302.0' y='138' width='36' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='308.0' y='126' width='24' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='314.0' y='114' width='12' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='467' y='126' width='6' height='10' fill='%237a4a26'/%3E%3Crect x='452.0' y='114' width='36' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='458.0' y='102' width='24' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='464.0' y='90' width='12' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='557' y='150' width='6' height='10' fill='%237a4a26'/%3E%3Crect x='542.0' y='138' width='36' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='548.0' y='126' width='24' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='554.0' y='114' width='12' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='722' y='90' width='6' height='10' fill='%237a4a26'/%3E%3Crect x='707.0' y='78' width='36' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='713.0' y='66' width='24' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='719.0' y='54' width='12' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='897' y='138' width='6' height='10' fill='%237a4a26'/%3E%3Crect x='882.0' y='126' width='36' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='888.0' y='114' width='24' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Crect x='894.0' y='102' width='12' height='12' fill='%232e8f5c' stroke='%231d2442' stroke-width='3'/%3E%3Cpath d='M0 236 L0 188 L96 188 L96 176 L240 176 L240 188 L384 188 L384 200 L528 200 L528 188 L720 188 L720 176 L864 176 L864 188 L960 188 L960 236Z' fill='%236fd24f'/%3E%3Cpath d='M0 188 L96 188 L96 176 L240 176 L240 188 L384 188 L384 200 L528 200 L528 188 L720 188 L720 176 L864 176 L864 188 L960 188' fill='none' stroke='%231d2442' stroke-width='4'/%3E%3C/svg%3E");
  --ciel: linear-gradient(#4fc3f7, #9be2f8 60%, #f2f6d8);
}

html body.aventure.aventure {
  background: var(--raccord);
  image-rendering: auto;
}

html body.aventure h1,
html body.aventure h2,
html body.aventure h3,
html body.aventure h4 { font-family: var(--bd); font-weight: 400; }
html body.aventure :focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }

/* Barre de navigation façon écriteau */
html body.aventure .nav,
html body.aventure .nav.nav-defile {
  border: 1px solid var(--cadre-bord);
  border-radius: 20px;
  background: var(--papier);
  backdrop-filter: none;
  box-shadow: var(--cadre-ombre);
}
html body.aventure .nav-liens a { border-radius: 9px; color: var(--encre-texte); font-family: var(--bd); font-weight: 400; font-size: .95rem; letter-spacing: .05em; text-transform: uppercase; }
html body.aventure .nav-liens a:hover { color: var(--texte-papier); background: var(--papier-2); }
html body.aventure .nav-liens a[aria-current] { color: #04143a; background: linear-gradient(180deg, #4cc6f7, #1a90f2); box-shadow: 0 3px 0 #0040c0; }
html body.aventure .nav-menu { border: 2px solid var(--encre); color: var(--encre-texte); background: var(--papier-2); }
html body.aventure .nav-skin { image-rendering: pixelated; }

/* Boutons en relief : une lèvre plus sombre de la même teinte, sans contour, et une lueur colorée */
html body.aventure .block,
html body.aventure .nav-bouton,
html body.aventure .copier {
  --fond-bouton: linear-gradient(180deg, #4cc6f7, #1a90f2);
  --levre: #0040c0;
  --lueur: rgb(26 144 242 / .32);
  --texte-bouton: #04143a;
  --relief: 5px;
  position: relative;
  border: 0;
  border-radius: 11px;
  color: var(--texte-bouton);
  background: var(--fond-bouton);
  font-family: var(--bd);
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 var(--relief) 0 var(--levre), 0 calc(var(--relief) + 8px) 20px var(--lueur);
  transition: transform .14s, box-shadow .14s, filter .14s;
}
html body.aventure .nav-bouton,
html body.aventure .copier { --relief: 4px; }
html body.aventure .block:hover,
html body.aventure .nav-bouton:hover,
html body.aventure .copier:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 var(--relief) 0 var(--levre), 0 calc(var(--relief) + 12px) 26px var(--lueur);
}
html body.aventure .block:active,
html body.aventure .nav-bouton:active,
html body.aventure .copier:active {
  transform: translateY(var(--relief));
  filter: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 0 0 var(--levre);
}
html body.aventure .block:disabled {
  opacity: .6;
  transform: none;
  filter: none;
  box-shadow: 0 var(--relief) 0 var(--levre);
}
html body.aventure .bouton-discord,
html body.aventure .nav-discord {
  --fond-bouton: linear-gradient(180deg, #7380f7, #5865f2);
  --levre: #3b46b8;
  --lueur: rgb(88 101 242 / .32);
  --texte-bouton: #fff;
}
html body.aventure .nav-theme,
html body.aventure .bouton-discret {
  --fond-bouton: linear-gradient(180deg, var(--relief-haut), var(--relief-bas));
  --levre: var(--levre-claire);
  --lueur: rgb(120 85 30 / .16);
  --texte-bouton: var(--encre-texte);
}
html body.aventure .nav-bouton.nav-boutique {
  --fond-bouton: linear-gradient(180deg, #ffd337 0%, #f7b500 100%);
  --levre: #b37800;
  --lueur: rgb(255 176 0 / .34);
  --texte-bouton: #463000;
}
html body.aventure .nav-bouton.nav-boutique:hover {
  --fond-bouton: linear-gradient(180deg, #ffe052 0%, #ffc400 100%);
  --lueur: rgb(255 193 0 / .5);
}
html body.aventure .nav-menu { border: 0; border-radius: 11px; color: var(--encre-texte); background: var(--relief-bas); box-shadow: 0 4px 0 var(--levre-claire); }

/* Onglets et filtres : même relief, plus discret */
html body.aventure .onglets a,
html body.aventure .journal-filtres button {
  border: 0;
  border-radius: 10px;
  background: var(--champ);
  color: var(--encre-texte);
  font-family: var(--bd);
  font-weight: 400;
  letter-spacing: .03em;
  box-shadow: 0 4px 0 var(--levre-claire);
  transition: transform .14s, box-shadow .14s;
}
html body.aventure .onglets a:hover,
html body.aventure .journal-filtres button:hover { color: var(--encre-texte); background: var(--champ-survol); transform: translateY(-2px); }
html body.aventure .onglets a[aria-current],
html body.aventure .journal-filtres button[aria-pressed="true"] {
  color: #04143a;
  background: linear-gradient(180deg, #4cc6f7, #1a90f2);
  box-shadow: 0 4px 0 #0040c0;
}

/* Panneaux de papier */
html body.aventure .document,
html body.aventure .sommaire,
html body.aventure .juridique-tete,
html body.aventure .journal-article {
  border: 1px solid var(--cadre-bord);
  border-radius: 20px;
  background: var(--papier);
  box-shadow: var(--cadre-ombre);
  backdrop-filter: none;
}
html body.aventure .document h2,
html body.aventure .document h3,
html body.aventure .sommaire a::before,
html body.aventure .juridique .document section h2::before,
html body.aventure .journal-texte h2,
html body.aventure .journal-texte h3,
html body.aventure .journal-texte h4 { color: var(--encre-texte); }
html body.aventure .document h2 { color: var(--rouge-texte); }
html body.aventure .document a:not(.block),
html body.aventure .journal-texte a,
html body.aventure .juridique-tete time { color: var(--ice); }
html body.aventure .document code,
html body.aventure .journal-texte code,
html body.aventure .journal-texte pre { background: var(--papier-2); color: var(--encre-texte); }
html body.aventure .journal-texte pre code { background: none; }
html body.aventure .tableau { border: 1px solid var(--cadre-bord); background: var(--champ); }
html body.aventure th { background: var(--papier-2); color: var(--encre-texte); }
html body.aventure .maj { color: var(--doux-papier); }
html body.aventure .surtitre { color: var(--rouge-texte); font-family: var(--bd); font-weight: 400; letter-spacing: .05em; }

/* Pages « bientôt » et documents : posés sur l'herbe */
body.aventure:not(.page-accueil) > main { position: relative; }
html body.aventure .bientot { margin-top: 120px; }

/* Documents légaux et règlement */
html body.aventure .juridique { margin-top: 34px; }
html body.aventure .juridique-tete { padding: clamp(18px, 3vw, 28px); }
html body.aventure .juridique-tete .maj { color: var(--doux-papier); }
html body.aventure .sommaire a { color: var(--doux-papier); }
html body.aventure .sommaire a:hover { color: var(--ice); }
html body.aventure .essentiel { border: 1px solid var(--cadre-bord); background: var(--encart); }
html body.aventure .essentiel h2 { color: var(--encre-texte); }

/* Recherche des actualités */
html body.aventure #journal-recherche {
  border: 1px solid var(--cadre-bord);
  border-radius: 14px;
  background: var(--champ);
  color: var(--encre-texte);
}
html body.aventure #journal-recherche:focus { border-color: var(--encre); box-shadow: 0 0 0 3px var(--or); }
html body.aventure #journal-recherche::placeholder { color: var(--indice); }

/* Actualités */
html body.aventure .journal { margin-top: 30px; }
html body.aventure .journal-tete h1 {
  color: #fff;
  text-shadow: 3px 0 0 var(--encre), -3px 0 0 var(--encre), var(--cadre-ombre-douce), 0 -3px 0 var(--encre), 3px 3px 0 var(--encre), -3px 3px 0 var(--encre), 3px -3px 0 var(--encre), -3px -3px 0 var(--encre), var(--cadre-ombre);
}
html body.aventure .journal-tete .journal-sur-titre { color: var(--or); font-family: var(--bd); text-shadow: 2px 0 0 var(--encre), -2px 0 0 var(--encre), var(--cadre-ombre-douce), 0 -2px 0 var(--encre), var(--cadre-ombre-douce); }
html body.aventure .journal-tete p:last-child {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 16px;
  border: 1px solid var(--cadre-bord);
  border-radius: 14px;
  background: var(--papier);
  color: var(--texte-papier);
}
html body.aventure .journal-outils { margin-top: 34px; }
html body.aventure .journal-etat { color: #fff; font-weight: 600; text-shadow: var(--cadre-ombre-douce); }
html body.aventure .journal-carte {
  padding: 12px;
  border: 1px solid var(--cadre-bord);
  border-radius: 20px;
  background: var(--papier);
  box-shadow: var(--cadre-ombre);
  transition: transform .15s, box-shadow .15s;
}
html body.aventure .journal-carte:hover { transform: translateY(-5px); box-shadow: var(--cadre-ombre-haute); }
html body.aventure .journal-visuel,
html body.aventure .journal-carte:hover .journal-visuel {
  border: 1px solid var(--cadre-bord);
  border-radius: 14px;
  background: var(--decor) repeat-x bottom center, var(--ciel);
  box-shadow: none;
  transform: none;
}
html body.aventure .journal-visuel::after { display: none; }
html body.aventure .journal-couverture-badge {
  border: 1px solid var(--cadre-bord);
  border-radius: 7px;
  background: var(--papier);
  color: var(--encre-texte);
  font: 400 .78rem/1.2 var(--bd);
  backdrop-filter: none;
}
html body.aventure .journal-coin { border: 2px solid var(--encre); background: var(--or); color: #1d2442; backdrop-filter: none; }
html body.aventure .journal-titre { color: var(--encre-texte); font-family: var(--bd); font-weight: 400; letter-spacing: 0; }
html body.aventure .journal-tag[data-c="Maintenance"] { color: #a32015; }
html body.aventure .journal-couverture[data-c] { background: none; }
html body.aventure .journal-mention-salon,
html body.aventure .journal-lien { color: #0b5fad; background: color-mix(in srgb, #0b5fad 14%, transparent); }
html body.aventure .journal-mention-role { color: #8a5800; background: color-mix(in srgb, #c98400 18%, transparent); }
html body.aventure .journal-mention-user { color: #3c4bc7; background: color-mix(in srgb, #5865f2 14%, transparent); }
html body.aventure .journal-spoiler { background: var(--encre); }
html body.aventure .journal-spoiler.visible { background: var(--papier-2); }
html body.aventure .journal-galerie a { border: 1px solid var(--cadre-bord); }
html body.aventure .journal-auteur-avatar { border: 1px solid var(--cadre-bord); }

/* Profil : fiche d'aventurier */
html body.aventure.aventure .profil-page { width: min(1000px, calc(100% - 32px)); margin: 108px auto 72px; }
.fiche-grille { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.fiche-perso,
.fiche-panneau {
  border: 1px solid var(--cadre-bord);
  border-radius: 20px;
  background: var(--papier);
  box-shadow: var(--cadre-ombre);
}
.fiche-perso { padding: 24px 22px; text-align: center; }
.fiche-portrait { margin: 12px auto 14px; }
html body.aventure .profil-skin { display: block; width: 128px; height: 128px; margin-inline: auto; border: 0; border-radius: 0; background: none; box-shadow: none; image-rendering: pixelated; }
html body.aventure .fiche-perso h1 { margin: 0; color: var(--encre-texte); font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.1; overflow-wrap: anywhere; }
.fiche-soustitre { margin: 6px 0 18px; color: var(--doux-papier); font-size: .95rem; }
.fiche-perso .block { width: 100%; min-height: 44px; font-size: 1.05rem; }
.fiche-perso a.block { display: flex; align-items: center; justify-content: center; margin-bottom: 14px; box-sizing: border-box; text-decoration: none; }
.fiche-colonne { display: grid; gap: 24px; min-width: 0; }
.fiche-panneau { padding: clamp(20px, 3vw, 28px); }
.fiche-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
html body.aventure .fiche-tete h2 { margin: 2px 0 0; color: var(--encre-texte); font-size: 1.7rem; line-height: 1.1; }
html body.aventure .profil-badge {
  padding: 5px 12px;
  border: 1px solid var(--cadre-bord);
  border-radius: 10px;
  color: var(--encre-texte);
  font: 400 .95rem/1.2 var(--bd);
  letter-spacing: .02em;
  transform: rotate(3deg);
}
html body.aventure .profil-badge[data-etat="vide"] { border-color: var(--encre); color: #1d2442; background: var(--or); }
html body.aventure .profil-badge[data-etat="ok"] { border-color: var(--encre); color: #fff; background: #1f8a5b; }
.fiche-texte { margin: 0 0 16px; color: var(--texte-papier); }
.fiche-etapes { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: fiche; }
.fiche-etapes li { counter-increment: fiche; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.fiche-etapes li::before {
  content: counter(fiche);
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid var(--encre);
  border-radius: 50%;
  color: #fff;
  background: var(--rouge);
  font: 400 1.05rem/1 var(--bd);
}
.fiche-etapes code { padding: 1px 7px; border-radius: 6px; background: var(--papier-2); color: var(--encre-texte); font-family: var(--bd); font-weight: 400; }
html body.aventure .profil-liaison-lie { display: flex; }
html body.aventure .profil-discord img { width: 56px; height: 56px; border: 1px solid var(--cadre-bord); }
html body.aventure .profil-discord-infos strong { color: var(--encre-texte); font: 400 1.25rem/1.2 var(--bd); }
html body.aventure .profil-liaison-lie .block { min-height: 42px; }
html body.aventure .profil-erreur { margin-bottom: 18px; border: 1px solid var(--cadre-bord); background: #ffd9d0; color: #7a1a10; font-weight: 600; }

/* Liaison Discord : le pont entre deux comptes */
html body.aventure.aventure .lien-flow { width: min(720px, calc(100% - 32px)); margin-top: 30px; }
.lien-tete { margin-bottom: 44px; text-align: center; }
html body.aventure .lien-tete .surtitre { color: var(--or); text-shadow: 2px 0 0 var(--encre), -2px 0 0 var(--encre), var(--cadre-ombre-douce), 0 -2px 0 var(--encre), var(--cadre-ombre-douce); }
html body.aventure .lien-tete h1 {
  margin: 2px 0 0;
  color: #fff;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  text-shadow: 3px 0 0 var(--encre), -3px 0 0 var(--encre), var(--cadre-ombre-douce), 0 -3px 0 var(--encre), 3px 3px 0 var(--encre), -3px 3px 0 var(--encre), 3px -3px 0 var(--encre), -3px -3px 0 var(--encre), var(--cadre-ombre);
}
.lien-carte {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--cadre-bord);
  border-radius: 20px;
  background: var(--papier);
  box-shadow: var(--cadre-ombre);
  text-align: center;
}
.lien-etapes { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 18px; padding: 0; list-style: none; counter-reset: lien; }
.lien-etapes::before { content: ""; position: absolute; top: 18px; left: 16.6%; right: 16.6%; border-top: 4px dashed rgb(29 36 66 / .4); }
.lien-etapes li { position: relative; counter-increment: lien; color: var(--doux-papier); font: 400 .98rem/1.2 var(--bd); }
.lien-etapes li::before {
  content: counter(lien);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 6px;
  border: 3px solid var(--encre);
  border-radius: 50%;
  color: var(--encre-texte);
  background: var(--papier-2);
  font: 400 1.1rem/1 var(--bd);
}
.lien-etapes[data-etape="2"] li:nth-child(1)::before,
.lien-etapes[data-etape="3"] li:nth-child(-n + 2)::before,
.lien-etapes[data-etape="4"] li::before { content: "✓"; color: #fff; background: #1f8a5b; font-family: var(--body); font-weight: 600; }
.lien-etapes[data-etape="2"] li:nth-child(2),
.lien-etapes[data-etape="3"] li:nth-child(3) { color: var(--encre-texte); }
.lien-etapes[data-etape="2"] li:nth-child(2)::before,
.lien-etapes[data-etape="3"] li:nth-child(3)::before { color: #1d2442; background: var(--or); }
html body.aventure .lien-flow #lien-etat { margin: 0 0 18px; color: var(--texte-papier); font-weight: 600; font-size: 1rem; }
/* Le panneau affiché porte déjà le message : évite de le dire deux fois */
html body.aventure .lien-flow #lien-etat:has(~ #lien-ok:not([hidden])),
html body.aventure .lien-flow #lien-etat:has(~ #lien-confirm:not([hidden])) { display: none; }
html body.aventure .lien-panneau { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
html body.aventure .lien-texte { color: var(--texte-papier); }
html body.aventure .lien-duo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 24px; }
html body.aventure .lien-compte {
  flex-direction: column;
  gap: 8px;
  padding: 16px 10px;
  border: 1px solid var(--cadre-bord);
  border-radius: 14px;
  background: var(--papier-2);
  box-shadow: var(--cadre-ombre-douce);
}
.lien-compte-vide { border-style: dashed !important; box-shadow: none !important; background: transparent !important; }
html body.aventure .lien-avatar { width: 80px; height: 80px; border: 1px solid var(--cadre-bord); border-radius: 14px; background: #bfe9fb; }
html body.aventure .lien-avatar-rond { border-color: var(--encre); border-radius: 50%; background: #5865f2; }
.lien-avatar-vide { display: grid; place-items: center; box-sizing: border-box; color: #fff; font: 400 2.2rem/1 var(--bd); }
html body.aventure .lien-label { color: var(--doux-papier); font: 400 .85rem/1.2 var(--bd); letter-spacing: .04em; }
html body.aventure .lien-nom { color: var(--encre-texte); font: 400 1.25rem/1.2 var(--bd); }
html body.aventure .lien-plus {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--encre);
  border-radius: 50%;
  color: #1d2442;
  background: var(--or);
  font-size: 1.3rem;
  box-shadow: 0 3px 0 var(--encre);
}
html body.aventure #lien-ok .lien-plus { color: #fff; background: #1f8a5b; }
.lien-bravo { margin: 0 0 16px; color: #1f6d49; font: 400 1.8rem/1.1 var(--bd); }
#lien-erreur .lien-erreur-icone { margin: 0 0 8px; color: var(--rouge); font: 400 3.4rem/1 var(--bd); text-shadow: 3px 3px 0 var(--encre); }
#lien-erreur p:not(.lien-erreur-icone) { margin-top: 0; color: var(--texte-papier); font-weight: 600; }
#lien-erreur code { padding: 1px 7px; border-radius: 6px; background: var(--papier-2); }

/* Pied : la roche du fond */
html body.aventure .pied {
  --text: #e8f4ff;
  --muted: #b8c4dc;
  --ice: #7fdcff;
  --arete: rgb(127 220 255 / .22);
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--cadre-bord);
  background: #1d2138;
  color: var(--text);
}
html body.aventure .pied > * { position: relative; z-index: 1; }

@media (max-width: 960px) {
  html body.aventure .nav-liens { border: 1px solid var(--cadre-bord); background: var(--papier-2); }
}
@media (max-width: 860px) {
  .fiche-grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  html body.aventure .lien-duo { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  html body.aventure .lien-compte { width: 100%; box-sizing: border-box; }
  .lien-etapes li { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html body.aventure .journal-carte { transition: none; }
}

/* Un pseudo garde sa casse exacte : il est sensible aux majuscules en jeu */
html body.aventure .nav-connexion:has(.nav-skin) { text-transform: none; letter-spacing: .02em; }

/* Barre sur ordinateur : liens centrés entre le logo et les commandes, de même hauteur et alignés */
@media (min-width: 961px) {
  html body.aventure .nav { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 16px; align-items: center; padding: 9px 16px 13px; }
  html body.aventure .nav-marque { display: flex; align-items: center; }
  html body.aventure .nav-marque img { width: 132px; }
  html body.aventure .nav-liens { justify-self: center; align-items: center; gap: 12px; }
  html body.aventure .nav-liens a { box-sizing: border-box; height: 42px; padding: 0 12px; white-space: nowrap; }
  html body.aventure .nav-liens a[aria-current],
  html body.aventure .nav-liens a[aria-current]:hover { box-shadow: 0 4px 0 #0040c0; }
  html body.aventure .nav-liens a:hover { box-shadow: 0 4px 0 var(--levre-claire); }
  html body.aventure .nav-actions { align-items: center; }
  html body.aventure .nav-bouton { box-sizing: border-box; height: 42px; min-height: 42px; }
  html body.aventure .nav-theme, html body.aventure .nav-discord { width: 42px; padding: 0; }
}
@media (min-width: 1321px) {
  html body.aventure .nav { width: min(1440px, calc(100% - 24px)); }
  html body.aventure .nav-liens a { font-size: .95rem; }
}
/* Un long pseudo ne doit pas pousser les liens hors de la barre */
@media (min-width: 1501px) {
  html body.aventure .nav-connexion { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 1321px) and (max-width: 1500px) {
  html body.aventure .nav-marque img { width: 120px; }
  html body.aventure .nav-liens { gap: 6px; }
  html body.aventure .nav-liens a { padding: 0 9px; font-size: .94rem; }
  html body.aventure .nav-connexion { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Barre sur ordinateur portable : icônes et centrage conservés, seul l'espacement se resserre */
@media (min-width: 1101px) and (max-width: 1320px) {
  html body.aventure .nav { column-gap: 10px; }
  html body.aventure .nav-marque img { width: 116px; }
  html body.aventure .nav-liens { gap: 6px; }
  html body.aventure .nav-liens a { gap: 5px; padding: 0 9px; font-size: .9rem; letter-spacing: .03em; }
  html body.aventure .nav-liens svg { width: 16px; height: 16px; }
  html body.aventure .nav-actions { gap: 6px; }
  html body.aventure .nav-connexion { max-width: 138px; padding-inline: 10px; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 1101px) and (max-width: 1220px) {
  html body.aventure .nav-liens svg { display: none; }
}
/* Barre entre tablette et petit écran : les liens en capitales doivent tenir sans déborder */
@media (min-width: 961px) and (max-width: 1100px) {
  html body.aventure .nav { column-gap: 10px; }
  html body.aventure .nav-marque img { width: 96px; }
  html body.aventure .nav-liens { gap: 2px; }
  html body.aventure .nav-liens svg { display: none; }
  html body.aventure .nav-liens a { padding: 0 7px; font-size: .86rem; letter-spacing: .03em; }
  html body.aventure .nav-actions { gap: 6px; }
  html body.aventure .nav-connexion { max-width: 138px; padding-inline: 10px; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Liens de la barre : petit relief au survol et à l'appui */
html body.aventure .nav-liens a { transition: color .15s, background .15s, transform .14s, box-shadow .14s; }
html body.aventure .nav-liens svg { transition: transform .14s; }
html body.aventure .nav-liens a:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--levre-claire); }
html body.aventure .nav-liens a:hover svg { transform: scale(1.12); }
html body.aventure .nav-liens a:active { transform: translateY(2px); box-shadow: none; }
html body.aventure .nav-liens a[aria-current]:hover { color: #04143a; background: linear-gradient(180deg, #4cc6f7, #1a90f2); box-shadow: 0 3px 0 #0040c0; }
html body.aventure .nav-menu { transition: transform .14s, box-shadow .14s, background .14s; }
html body.aventure .nav-menu:hover { background: #fff6dc; transform: translateY(-1px); }
html body.aventure .nav-menu:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--levre-claire); }
html body.aventure .nav-ouverte .nav-menu { background: linear-gradient(180deg, #4cc6f7, #1a90f2); box-shadow: 0 4px 0 #0040c0; }

/* Menu mobile : liens sur deux colonnes pour rester compact */
@media (max-width: 960px) {
  html body.aventure .nav-ouverte .nav-liens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; animation: nav-panneau .16s ease-out; }
  html body.aventure .nav-liens a { min-height: 44px; padding: 8px 10px; box-sizing: border-box; }
}
@media (max-width: 350px) {
  html body.aventure .nav-ouverte .nav-liens { grid-template-columns: minmax(0, 1fr); }
}
@keyframes nav-panneau {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html body.aventure .nav-liens a, html body.aventure .nav-liens svg, html body.aventure .nav-menu { transition: none; }
  html body.aventure .nav-liens a:hover, html body.aventure .nav-liens a:active, html body.aventure .nav-menu:hover, html body.aventure .nav-menu:active { transform: none; }
  html body.aventure .nav-liens a:hover svg { transform: none; }
  html body.aventure .nav-ouverte .nav-liens { animation: none; }
}

/* Pied de page */
html body.aventure :is(.pied, .pied-bas) :focus-visible { outline-color: #ffd04a; }

/* Fenêtre de confirmation */
html body.aventure .fenetre {
  width: min(440px, calc(100% - 32px));
  margin: auto;
  padding: 26px;
  border: 1px solid var(--cadre-bord);
  border-radius: 20px;
  color: var(--texte-papier);
  background: var(--papier);
  box-shadow: var(--cadre-ombre);
}
html body.aventure .fenetre[open] { animation: fenetre-arrivee .16s ease-out; }
html body.aventure .fenetre::backdrop { background: rgb(13 15 42 / .68); }
html body.aventure .fenetre h2 { margin: 0 0 10px; color: var(--encre-texte); font-size: 1.5rem; line-height: 1.2; }
html body.aventure .fenetre p { margin: 0; line-height: 1.5; }
html body.aventure .fenetre strong { color: var(--encre-texte); overflow-wrap: anywhere; }
html body.aventure .fenetre .fenetre-erreur { margin-top: 12px; padding: 8px 12px; border: 2px solid #b23a14; border-radius: 10px; color: #8f2d0f; background: #ffe3d6; font-weight: 600; }
.fenetre-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.fenetre-actions .block { min-height: 44px; font-size: 1rem; }
html body.aventure .bouton-danger {
  --fond-bouton: linear-gradient(180deg, #ee7350, #e4572e);
  --levre: #a83a18;
  --lueur: rgb(228 87 46 / .3);
  --texte-bouton: #fff;
}
html body.aventure .fenetre .block:disabled { opacity: .6; transform: none; filter: none; cursor: wait; }
@keyframes fenetre-arrivee {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 420px) { .fenetre-actions .block { flex: 1 1 100%; } }
@media (prefers-reduced-motion: reduce) { html body.aventure .fenetre[open] { animation: none; } }



/* Tous les boutons du site : même relief que Connexion */
html body.aventure.aventure :is(.pied-copier, .wk-proposer, .wk-bouton-page, .vt-voter, .voir, .ot-fermer, .ot-lien, .mo-ouvrir, .wiki-menu, .ad-actions button, .ad-filtres button, .vt-onglets button, .wk-filtres button, .wk-onglets button, .wk-outils button) {
  --fond-bouton: linear-gradient(180deg, #4cc6f7, #1a90f2);
  --levre: #0040c0;
  --lueur: rgb(26 144 242 / .32);
  --texte-bouton: #04143a;
  --relief: 4px;
  border: 0;
  border-radius: 11px;
  color: var(--texte-bouton) !important;
  background: var(--fond-bouton);
  font-family: var(--bd);
  font-weight: 400;
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 var(--relief) 0 var(--levre), 0 calc(var(--relief) + 6px) 14px var(--lueur);
  cursor: pointer;
  transition: transform .14s, box-shadow .14s, filter .14s;
}
/* Variante claire : boutons secondaires et choix non actifs */
html body.aventure.aventure :is(.ot-fermer, .ot-lien, .mo-ouvrir, .voir, .wiki-menu, .ad-actions button, .ad-filtres button[aria-pressed="false"], .vt-onglets button[aria-pressed="false"], .wk-filtres button[aria-pressed="false"], .wk-onglets button[aria-selected="false"], .wk-outils button) {
  --fond-bouton: linear-gradient(180deg, var(--relief-haut), var(--relief-bas));
  --levre: var(--levre-claire);
  --lueur: rgb(120 85 30 / .16);
  --texte-bouton: var(--encre-texte);
}
html body.aventure.aventure .ad-actions .ad-ok { --fond-bouton: linear-gradient(180deg, #37a06c, #23774c); --levre: #14512f; --lueur: rgb(35 119 76 / .3); --texte-bouton: #fff; }
html body.aventure.aventure .ad-actions .ad-non { --fond-bouton: linear-gradient(180deg, #ee7350, #e4572e); --levre: #a83a18; --lueur: rgb(228 87 46 / .3); --texte-bouton: #fff; }
html body.aventure.aventure :is(.ot-lien, .voir, .wk-outils button, .ad-actions button, .ad-filtres button, .vt-onglets button, .wk-filtres button, .mo-ouvrir) { --relief: 3px; }
html body.aventure.aventure .ot-lien { padding: 6px 12px; font-size: .8rem; }
html body.aventure.aventure :is(.pied-copier, .wk-proposer, .wk-bouton-page, .ot-fermer, .ot-lien, .mo-ouvrir, .wiki-menu, .ad-actions button, .ad-filtres button, .vt-onglets button, .wk-filtres button, .wk-onglets button, .wk-outils button):hover {
  background: var(--fond-bouton);
  filter: brightness(1.07);
  transform: translateY(-2px);
}
html body.aventure.aventure :is(.pied-copier, .wk-proposer, .wk-bouton-page, .ot-fermer, .ot-lien, .mo-ouvrir, .wiki-menu, .ad-actions button, .ad-filtres button, .vt-onglets button, .wk-filtres button, .wk-onglets button, .wk-outils button):active {
  filter: none;
  transform: translateY(var(--relief));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .3);
}
html body.aventure.aventure .vt-voter { cursor: not-allowed; }

/* Pied de page : qui on est, où aller, comment rejoindre */
html body.aventure .pied-copier { flex: none; min-height: 32px; padding: 3px 11px; font-size: .82rem; }
html body.aventure .pied-copier:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Sections de l'accueil : posées directement sur le décor */
.couche {
  position: relative;
  padding: clamp(46px, 7vw, 76px) 16px clamp(56px, 8vw, 92px);
}
.couche-interieur { position: relative; width: min(1120px, 100%); margin: 0 auto; }

/* Même fond sur toutes les pages : le village, puis la couleur du fondu et ses petits objets */
.fond-village { position: absolute; inset: 0 0 auto; z-index: -1; overflow: hidden; pointer-events: none; background: #6b4a2c; }
.fond-village::before {
  content: "";
  position: absolute;
  inset: -2%;
  background: url("/assets/fond/village.webp") center 62% / cover no-repeat;
  transform: translate(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -9px));
}
/* Le bas de l'image se fond dans la couleur unie */
.fond-village::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(transparent, color-mix(in srgb, var(--raccord) 42%, transparent) 55%, var(--raccord));
}
/* Formes sur la couleur unie */
.fond-formes {
  --trait: rgb(255 255 255 / .26);
  --trait-doux: rgb(255 240 215 / .17);
  --losange: rgb(255 244 214 / .6);
  --losange-bord: rgb(255 252 240 / .9);
  --losange-lueur: rgb(255 240 200 / .55);
  position: absolute;
  inset-inline: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
html[data-theme="clair"] .fond-formes {
  --trait: rgb(224 130 40 / .26);
  --trait-doux: rgb(26 144 242 / .14);
  --losange: rgb(240 150 40 / .45);
  --losange-bord: rgb(224 124 24 / .8);
  --losange-lueur: rgb(240 150 40 / .35);
}
.forme-cadre {
  position: absolute;
  width: var(--t);
  height: var(--t);
  border: 1px solid var(--trait);
  border-radius: 28px;
  transform: rotate(var(--r));
  animation: forme-derive 20s ease-in-out infinite alternate;
}
.forme-cadre:nth-child(1) { --t: clamp(240px, 30vw, 440px); --r: 22deg; top: 3%; left: calc(var(--t) / -2); }
.forme-cadre:nth-child(2) { --t: clamp(280px, 36vw, 540px); --r: 30deg; top: 20%; right: calc(var(--t) / -2.2); animation-duration: 26s; animation-delay: -7s; }
.forme-cadre:nth-child(3) { --t: clamp(170px, 20vw, 290px); --r: 56deg; top: 47%; left: 46%; border-color: var(--trait-doux); animation-duration: 23s; animation-delay: -12s; }
.forme-cadre:nth-child(4) { --t: clamp(240px, 32vw, 480px); --r: 16deg; top: 62%; left: calc(var(--t) / -2.3); animation-duration: 29s; animation-delay: -4s; }
.forme-cadre:nth-child(5) { --t: clamp(200px, 25vw, 360px); --r: 40deg; top: 80%; right: calc(var(--t) / -2.4); animation-duration: 24s; animation-delay: -16s; }
@keyframes forme-derive {
  from { transform: translateY(-10px) rotate(var(--r)); }
  to { transform: translateY(12px) rotate(calc(var(--r) + 4deg)); }
}
.forme-losange {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--losange-bord);
  border-radius: 2px;
  background: var(--losange);
  box-shadow: 0 0 12px var(--losange-lueur);
  animation: forme-losange 7s ease-in-out infinite alternate;
}
.forme-losange:nth-child(6) { top: 7%; left: 5%; }
.forme-losange:nth-child(7) { top: 15%; right: 6%; animation-duration: 8.2s; animation-delay: -2s; }
.forme-losange:nth-child(8) { top: 29%; left: 3%; animation-duration: 6.4s; animation-delay: -4s; }
.forme-losange:nth-child(9) { top: 38%; right: 4%; animation-delay: -1.5s; }
.forme-losange:nth-child(10) { top: 47%; left: 6.5%; animation-duration: 7.8s; animation-delay: -3s; }
.forme-losange:nth-child(11) { top: 57%; right: 7%; animation-duration: 6.8s; animation-delay: -5s; }
.forme-losange:nth-child(12) { top: 68%; left: 2.5%; animation-duration: 8.6s; animation-delay: -2.6s; }
.forme-losange:nth-child(13) { top: 76%; right: 3%; animation-duration: 7.4s; animation-delay: -4.2s; }
.forme-losange:nth-child(14) { top: 87%; left: 8%; animation-duration: 6.2s; animation-delay: -1s; }
.forme-losange:nth-child(15) { top: 93%; right: 8%; animation-duration: 8s; animation-delay: -3.6s; }
@keyframes forme-losange {
  from { opacity: .35; transform: translateY(10px) rotate(45deg) scale(.8); }
  to { opacity: .9; transform: translateY(-12px) rotate(45deg) scale(1); }
}
/* Sans marge libre, les losanges se cacheraient à moitié derrière les cartes */
@media (max-width: 1240px) { .forme-losange { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .forme-cadre, .forme-losange { animation: none; }
  .forme-cadre { transform: rotate(var(--r)); }
  .forme-losange { opacity: .7; transform: rotate(45deg); }
}
html body.aventure.aventure > main { min-height: 50vh; margin-bottom: 90px !important; }

/* Thème sombre : éléments restés sur des couleurs pensées pour le papier */
html:not([data-theme="clair"]) body.aventure .carte-tresor {
  --encre-texte: #1d2442;
  --rouge-texte: #b23a14;
  --texte-papier: #33291c;
  --doux-papier: #65543c;
}
html:not([data-theme="clair"]) body.aventure .vt-vide { color: var(--doux-papier); }
html:not([data-theme="clair"]) body.aventure .vt-pos { color: #e6a56c; }
html:not([data-theme="clair"]) body.aventure .wiki-note { background: rgb(127 200 255 / .12); }
html:not([data-theme="clair"]) body.aventure .wiki-note a { color: var(--ice); }
html:not([data-theme="clair"]) body.aventure .journal-mention { color: #a8ddff !important; background: rgb(127 200 255 / .16) !important; }

/* Pied de page */
html body.aventure .pied {
  padding: 0 max(16px, calc((100% - 1160px) / 2)) 22px;
  background: linear-gradient(180deg, #1d2138, #13162a);
}
.pp-appel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px 22px;
  margin-top: -34px;
  padding: 20px 26px;
  border: 1px solid rgb(143 210 255 / .3);
  border-radius: 20px;
  background: linear-gradient(110deg, #16408f, #4a2f9e 60%, #7a3b8f);
  box-shadow: 0 18px 40px rgb(5 8 26 / .45);
}
html body.aventure .pp-appel h2 { margin: 0; color: #fff; font: 400 clamp(1.5rem, 3vw, 2rem)/1.1 var(--bd); }
.pp-appel-texte p { margin: 3px 0 0; color: #d3dcf5; font-size: .88rem; }
.pp-ip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px 7px 16px;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 13px;
  background: rgb(8 13 38 / .5);
}
html body.aventure .pp-ip code { color: #fff; background: none; font: 400 1.15rem/1.2 var(--bd); overflow-wrap: anywhere; }
html body.aventure .pied-copier { flex: none; min-height: 32px; padding: 3px 11px; font-size: .82rem; }
html body.aventure .pied-copier:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
html body.aventure .pp-discord { min-height: 50px; padding: 8px 20px; font-size: 1rem; white-space: nowrap; }

.pp-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 28px 44px;
  padding: 34px 0 26px;
}
.pp-liens { display: flex; gap: 40px; }
.pp-gauche { justify-content: flex-start; }
.pp-droite { justify-content: flex-end; text-align: right; }
.pp-liens div { display: grid; align-content: start; gap: 7px; }
html body.aventure .pp-liens h3 { margin: 0 0 3px; color: #8fd2ff; font: 600 .76rem/1.2 var(--body); letter-spacing: .09em; text-transform: uppercase; }
html body.aventure .pp-liens a { color: #c9d3ea; font-size: .92rem; text-decoration: none; white-space: nowrap; }
html body.aventure .pp-liens a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pp-marque { max-width: 340px; text-align: center; }
.pp-marque img { display: block; width: min(320px, 100%); height: auto; margin: 0 auto; }
.pp-marque p { margin: 10px 0 0; color: #b8c4dc; font-size: .88rem; line-height: 1.45; }
.pp-fin {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid rgb(200 215 255 / .14);
  color: #9aa7c4;
  font-size: .8rem;
}
.pp-fin span + span::before { content: "·"; margin-right: 12px; }
.pp-fin strong { color: #ffd04a; font-weight: 600; }
@media (max-width: 1000px) {
  .pp-appel { grid-template-columns: minmax(0, 1fr) auto; }
  html body.aventure .pp-discord { grid-column: 1 / -1; justify-self: stretch; }
  .pp-plan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-marque { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
}
@media (max-width: 600px) {
  .pp-appel { grid-template-columns: minmax(0, 1fr); padding: 18px; text-align: center; }
  .pp-ip { justify-content: space-between; }
  .pp-plan { grid-template-columns: minmax(0, 1fr); }
  .pp-fin { flex-direction: column; align-items: center; text-align: center; }
  .pp-fin span + span::before { display: none; }
  .pp-liens { justify-content: space-between; text-align: left; gap: 20px; }
  .pp-liens div { flex: 1; }
  html body.aventure .pp-liens a { white-space: normal; }
}

/* La barre reste immobile d'une page à l'autre */
html { scrollbar-gutter: stable; }
html body.aventure .nav { animation: none; }

/* Liens légaux sur la dernière ligne, bouton API toujours encadré */
.pp-legal { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
html body.aventure .pp-legal a { color: #b8c4dc; text-underline-offset: 3px; }
html body.aventure .pp-legal a:hover { color: #fff; }
html body.aventure .pp-liens a.pp-api {
  justify-self: start;
  width: fit-content;
  margin-top: 2px;
  padding: 3px 10px;
  border: 1px solid rgb(143 210 255 / .5);
  border-radius: 8px;
  color: #dbeeff;
}
html body.aventure .pp-liens a.pp-api:hover { border-color: #8fd2ff; background: rgb(143 210 255 / .12); text-decoration: none; }

/* Passage d'une page à l'autre en fondu, la barre restant en place */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  html body.aventure .nav { view-transition-name: barre; }
  ::view-transition-group(root) { animation-duration: .18s; }
  ::view-transition-old(barre), ::view-transition-new(barre) { animation: none; }
}

/* Changement de thème en douceur */
html.theme-bascule body *:not(canvas) {
  transition: background-color .8s ease, border-color .8s ease, color .8s ease, box-shadow .8s ease !important;
}

/* Téléphone : pas de bouton Discord dans la barre (il reste dans le pied de page) */
@media (max-width: 760px) {
  html body.aventure .nav-discord { display: none; }
}

/* Menu déroulant du compte : la marge haute du menu garde le survol entre le bouton et le menu */
.nav-compte { position: relative; display: flex; min-width: 0; }
.nav-compte-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 20;
  padding-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-compte:focus-within .nav-compte-menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) {
  .nav-compte:hover .nav-compte-menu { opacity: 1; visibility: visible; transform: none; }
}
.nav-compte-menu button {
  display: block;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid var(--cadre-bord);
  border-radius: 12px;
  background: var(--papier);
  box-shadow: var(--cadre-ombre);
  color: var(--encre-texte);
  font: 400 .95rem/1.2 var(--bd);
  letter-spacing: .03em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.nav-compte-menu button:hover, .nav-compte-menu button:focus-visible { background: var(--rouge); color: #fff; }
.nav-compte-menu button:disabled { opacity: .6; cursor: default; }
@media (prefers-reduced-motion: reduce) { .nav-compte-menu, .nav-compte-menu button { transition: none; } }

/* Tous les titres en Arial Black (repli sur Arial très gras là où la police n'est pas installée) */
html body.aventure :is(h1, h2, h3, h4, h5, h6, .couche-titre, .accueil-actu-titre) {
  font-family: "Arial Black", "Arial Bold", Gadget, Arial, sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: -.01em;
  overflow-wrap: break-word;
}
