@font-face { font-family: Cormorant; src: url('/decors/fonts/cormorant.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: DM Sans; src: url('/decors/fonts/dm-sans.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }

:root {
  color-scheme: dark;
  --fond: #101222; --surface: #181a2e; --relief: #24273e; --texte: #fff3df; --doux: #c7c5d6;
  --or: #e9bc76; --or-clair: #ffe2ac; --contraste: #281a14; --ligne: #c8a37355; --halo: #9472ac50;
  --titre: Cormorant, Georgia, serif; --corps: 'DM Sans', 'Segoe UI', sans-serif;
}
[data-theme="nordique"] { --fond: #071822; --surface: #0d2734; --relief: #153b49; --texte: #f2fbf9; --doux: #b8d4dd; --or: #9fdfd9; --or-clair: #ddffed; --contraste: #09282e; --ligne: #91c7d354; --halo: #3d97a364; }
[data-theme="celtique"] { --fond: #0e1a15; --surface: #19291e; --relief: #283e2b; --texte: #f5fae4; --doux: #c6d6b9; --or: #c3db90; --or-clair: #e9f5ba; --contraste: #202b15; --ligne: #9caf6e64; --halo: #81aa6260; }
[data-theme="egyptien"] { --fond: #21131a; --surface: #301f27; --relief: #492d31; --texte: #fff1df; --doux: #e1c6b9; --or: #f4bb79; --or-clair: #ffdfa8; --contraste: #381c14; --ligne: #e7a96f57; --halo: #bd6e576a; }

* { box-sizing: border-box; }
html { min-width: 300px; }
body { margin: 0; background: radial-gradient(ellipse at 65% 8%, var(--halo), transparent 53rem), var(--fond); color: var(--texte); font: 15px/1.5 var(--corps); }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
a { text-decoration: none; color: inherit; }
:focus-visible { outline: 2px solid var(--or-clair); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--titre); font-weight: 650; }
img { display: block; max-width: 100%; }
.picto { display: inline-block; object-fit: contain; vertical-align: middle; flex: none; }
.picto--plateaux { border-radius: 18%; }
.primaire .picto { filter: brightness(.25) saturate(.5); }
.saut { position: fixed; left: 16px; top: -150px; padding: 10px; z-index: 12; background: var(--fond); }
.saut:focus { top: 8px; }
.attente { display: grid; min-height: 100svh; place-content: center; gap: 8px; text-align: center; }
.attente h1 { font-size: 4rem; }
.sigil { width: 72px; margin-inline: auto; }

.coquille { min-height: 100svh; }
.entete { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; min-height: 74px; padding: 10px clamp(18px, 4vw, 64px); border-bottom: 1px solid var(--ligne); background: var(--fond); }
.marque { display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--or-clair); }
.marque strong { font: 700 clamp(24px, 2.5vw, 34px)/1 var(--titre); letter-spacing: .04em; }
.navigation { display: flex; gap: 6px; min-width: 0; }
.navigation a { position: relative; display: flex; min-height: 46px; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--doux); font-size: 13px; font-weight: 650; }
.navigation a:hover { background: var(--surface); color: var(--texte); }
.navigation a[aria-current="page"] { border-color: var(--ligne); background: var(--relief); color: var(--or-clair); }
.entete-actions { display: flex; justify-content: flex-end; align-items: center; gap: 7px; }
.pilule { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 5px 11px; border: 1px solid var(--ligne); border-radius: 30px; background: var(--surface); color: var(--or-clair); font-weight: 750; white-space: nowrap; }
.pilule small { color: var(--doux); font-weight: 550; }
.outil { display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; border: 1px solid var(--ligne); border-radius: 10px; background: var(--surface); }
.outil:hover, .outil[aria-pressed="true"] { border-color: var(--or); background: var(--relief); }
.contenu { width: min(100%, 1530px); margin: auto; padding: 23px clamp(16px, 4vw, 64px) 46px; }
.contenu:focus { outline: none; }

.hero, .page-titre { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--ligne); background: var(--surface); }
.hero { min-height: clamp(340px, 34vw, 485px); display: flex; align-items: flex-end; border-radius: 15px; box-shadow: 0 24px 52px #07081072; }
.hero::before, .page-titre::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--fond), transparent 4%) 4%, color-mix(in srgb, var(--fond), transparent 32%) 35%, transparent 73%), linear-gradient(0deg, #080b14ad, transparent 55%); }
.hero::after { content: ''; position: absolute; inset: 8px; border: 1px solid #ffdf9e48; border-radius: 9px; pointer-events: none; }
.hero-cadre, .banniere-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero-paysage { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero-texte { padding: clamp(25px, 4vw, 58px); max-width: 69%; }
.surtitre { display: flex; align-items: center; gap: 7px; color: var(--or-clair); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .16em; }
.hero h1 { margin: 7px 0 10px; font-size: clamp(4rem, 7vw, 7.25rem); line-height: .83; letter-spacing: -.037em; color: #fff4df; text-wrap: balance; }
.hero p { margin-top: 16px; color: #f0e8e5; max-width: 33ch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; align-items: center; }
.bouton { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--ligne); border-radius: 8px; background: var(--relief); color: var(--texte); font-size: 13px; font-weight: 720; text-align: center; }
.bouton:hover:not(:disabled), .filtre:hover { border-color: var(--or); }
.bouton.primaire { color: var(--contraste); border-color: var(--or-clair); background: linear-gradient(165deg, var(--or-clair), var(--or)); }
.bouton.primaire:hover:not(:disabled) { background: var(--or-clair); }
.bouton.nu { background: color-mix(in srgb, var(--fond), transparent 18%); }
.bouton.danger { color: #ffd3c2; }
.rubrique { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin: 22px 0 11px; }
.rubrique h2 { font-size: clamp(1.85rem, 3vw, 2.85rem); line-height: 1; }
.domaines { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.domaine { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: start; justify-content: end; gap: 2px; min-width: 0; min-height: clamp(116px, 12vw, 165px); padding: 12px; border: 1px solid var(--ligne); border-radius: 11px; background: var(--surface); text-align: left; color: #fff6e6; }
.domaine::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #080d1a 2%, #08101ab8 27%, transparent 77%); }
.domaine-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.domaine:hover, .domaine[aria-pressed="true"] { border-color: var(--or-clair); box-shadow: inset 0 -2px var(--or); }
.domaine .picto { width: 28px; height: 28px; }
.domaine strong { display: block; font: 700 clamp(18px, 2vw, 28px)/.97 var(--titre); }
.domaine small { color: #e5e1df; font-size: 11px; }
.raccourcis { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 15px; }
.carrefour { display: flex; align-items: center; gap: 13px; min-height: 75px; padding: 7px 11px; border: 1px solid var(--ligne); border-radius: 10px; background: var(--surface); text-align: left; }
.carrefour:hover { border-color: var(--or); }
.carrefour-art { width: 73px; height: 60px; flex: none; object-fit: cover; border-radius: 6px; }
.carrefour div { flex: 1; min-width: 0; }
.carrefour strong { display: block; font: 700 24px/.95 var(--titre); }
.carrefour small { display: block; margin-top: 5px; color: var(--doux); font-size: 12px; }

.page-titre { display: flex; align-items: end; min-height: 205px; margin: 0 0 20px; border-radius: 13px; }
.page-titre-texte { padding: clamp(16px, 4vw, 43px); }
.page-titre h1 { margin: 4px 0 8px; font-size: clamp(2.7rem, 6vw, 5.2rem); line-height: .88; }
.page-titre p, .muted { color: var(--doux); }
.page-titre p { max-width: 54ch; }
.banniere-art { inset-inline-start: auto; width: 67%; object-position: center; }
.banniere-objet { width: min(50%, 495px); object-fit: contain; }
.ligne-actions, .balance { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.filtre { min-height: 38px; padding: 5px 12px; border: 1px solid var(--ligne); border-radius: 20px; color: var(--doux); background: var(--surface); font-size: 13px; }
.filtre[aria-pressed="true"] { border-color: var(--or); color: var(--or-clair); background: var(--relief); }
.liste-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.carte { --rarete: var(--ligne); position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 5px; border: 1px solid var(--rarete); border-radius: 10px; background: var(--surface); text-align: left; }
.carte[data-rarete="1"] { --rarete: #82a6cc; }.carte[data-rarete="2"] { --rarete: #ae91d5; }.carte[data-rarete="3"] { --rarete: #dfa878; }.carte[data-rarete="4"] { --rarete: #efd797; }
.carte:hover { border-color: var(--or-clair); }
.carte > img { width: 100%; height: auto; border-radius: 5px; aspect-ratio: 3/4; object-fit: cover; background: var(--relief) url('/decors/reliques/dos.webp') center / cover; }
.carte.inconnue > img { filter: saturate(.72) brightness(.83); }
.carte span { padding: 6px 5px 1px; font: 700 20px/1 var(--titre); }
.carte small { padding: 3px 5px; color: var(--doux); font-size: 11px; }
.carte .compte { position: absolute; top: 9px; right: 9px; padding: 3px 6px; border-radius: 4px; background: #0b1025e0; color: #fff6df; font-size: 12px; }
.carte.brillante { box-shadow: inset 0 0 0 2px #a6e0de6b; }

.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 218px), 1fr)); gap: 13px; }
.panneau { min-width: 0; padding: clamp(15px, 2.5vw, 24px); border: 1px solid var(--ligne); border-radius: 12px; background: var(--surface); }
.panneau h2 { font-size: 29px; line-height: 1; }
.panneau p { margin-top: 8px; color: var(--doux); }
.jeu { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.jeu-visuel { width: 100%; aspect-ratio: 1.65; object-fit: cover; border-bottom: 1px solid var(--ligne); }
.jeu-corps { flex: 1; display: flex; flex-direction: column; align-items: start; padding: 16px; }
.jeu-corps .bouton { margin-top: auto; }
.jeu-corps p { margin-bottom: 13px; }
.jeu-corps small { margin-bottom: 5px; color: var(--or-clair); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.offre { display: flex; flex-direction: column; }
.offre-art { width: 100%; height: 143px; object-fit: contain; border-radius: 6px; margin-bottom: 13px; background: #111623; }
.offre h2 { margin-bottom: 4px; }
.offre .actions { margin-top: auto; padding-top: 13px; }
.chances { color: var(--doux); font-size: 12px; margin-top: 10px; }
.chances summary { cursor: pointer; color: var(--or-clair); padding-block: 5px; }
.chances p { margin: 4px 0; }
.note { margin: 12px 0; padding: 9px 13px; border: 1px solid var(--ligne); border-left: 3px solid var(--or); border-radius: 6px; color: var(--doux); background: var(--surface); }

.salle { max-width: 715px; margin-inline: auto; background: linear-gradient(color-mix(in srgb, var(--surface), transparent 5%), color-mix(in srgb, var(--surface), transparent 8%)), url('/decors/plateaux/cuir.webp') center / 200px; }
.salle .statut { font-weight: 750; color: var(--or-clair); }
.plateau { display: grid; grid-template-columns: repeat(var(--colonnes, 3), minmax(0, 1fr)); gap: 6px; width: min(100%, 380px); margin: 17px auto; padding: 8px; border: 1px solid var(--ligne); border-radius: 9px; background: url('/decors/plateaux/pierre.webp') center / 145px; }
.case { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid var(--ligne); border-radius: 7px; color: #fff8dc; background: var(--relief); }
.case:hover:not(:disabled) { border-color: var(--or-clair); box-shadow: inset 0 0 0 1px var(--or-clair); }
.case:disabled { opacity: 1; }
.case .picto { width: 58%; height: 58%; }
.case .picto--plateaux { width: 92%; height: 92%; }
.case.active, .case.gagnante { border-color: var(--or-clair); box-shadow: inset 0 0 0 2px var(--or); }
.case.gagnante[data-place="1"] { border-color: #a3e5ff; box-shadow: inset 0 0 0 2px #a3e5ff; }
.case.cachee { background: url('/decors/plateaux/memoire.webp') center / cover; }
.case.cachee .picto { display: none; }
.case.gravure { font: 700 30px/1 var(--titre); }
.case.gravure .picto { width: 100%; height: 100%; object-fit: cover; }
.plateau[data-jeu="labyrinthe"] .case { background: url('/decors/plateaux/dalle.webp') center / cover; }
.plateau[data-jeu="labyrinthe"] .mur { background-image: url('/decors/plateaux/mur.webp'); }
.plateau[data-jeu="labyrinthe"] .passee { background-image: url('/decors/plateaux/chemin.webp'); }
.plateau[data-jeu="labyrinthe"] .case:last-child { background-image: url('/decors/plateaux/porte.webp'); }
.plateau[data-jeu="labyrinthe"] .case:last-child .picto:not(.picto--plateaux) { opacity: .9; }
.griffe .cible { background: var(--halo); }
.griffe .vise { border-color: var(--or-clair); box-shadow: inset 0 0 0 2px var(--or); }
.plateau[data-jeu="astres"] .case, .plateau[data-jeu="astres"] .picto { border-radius: 50%; }
.question { display: grid; grid-template-columns: minmax(75px, 145px) 1fr; align-items: start; gap: 13px; margin: 16px 0; }
.question > img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; }
.question-feedback { min-height: 24px; }
.code { font: 750 25px ui-monospace, monospace; letter-spacing: .16em; color: var(--or-clair); }
.cle { overflow-wrap: anywhere; font: 16px ui-monospace, monospace; color: var(--or-clair); }
.champ { min-height: 44px; max-width: 100%; padding: 8px 10px; border: 1px solid var(--ligne); border-radius: 7px; background: var(--fond); color: var(--texte); }
.form { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin-top: 15px; }
.form label { display: grid; gap: 4px; color: var(--doux); font-size: 13px; }
.choix-encre { display: flex; align-items: center; gap: 6px; }
.choix-encre .picto { width: 32px; height: 32px; }
.atelier-canvas { display: block; width: 100%; aspect-ratio: 5/3; border: 2px solid #ac8754; border-radius: 9px; margin-top: 13px; background: #f3dfb4 url('/decors/plateaux/parchemin.webp') center / cover; touch-action: none; }

dialog { color: var(--texte); background: var(--surface); width: min(720px, calc(100% - 24px)); max-height: calc(100svh - 24px); overflow: auto; padding: clamp(16px, 4vw, 32px); border: 1px solid var(--ligne); border-radius: 14px; box-shadow: 0 28px 85px #000a; }
dialog::backdrop { background: #090b16c4; }
dialog h2 { margin: 6px 35px 10px 0; font-size: clamp(2rem, 5vw, 3.45rem); line-height: .94; }
dialog .fermer { position: absolute; top: 11px; right: 11px; z-index: 1; }
dialog .domaines { margin-top: 13px; }
dialog .domaine { min-height: 105px; padding: 8px; }
dialog .domaine strong { font-size: 19px; }
.intro-points { display: flex; gap: 6px; margin-top: 14px; }
.intro-points i { width: 7px; height: 7px; border-radius: 50%; background: var(--doux); opacity: .35; }
.intro-points i.active { background: var(--or); opacity: 1; }
.profil-embleme { width: 64px; border-radius: 8px; margin: 10px 0; }
.intro-visuel { width: 100%; height: clamp(87px, 20vw, 168px); object-fit: cover; border: 1px solid var(--ligne); border-radius: 8px; margin: 9px 0 12px; }
.choix-offrande { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 14px 0 7px; }
.choix-offrande button { display: grid; justify-items: start; gap: 4px; text-align: left; padding: 8px; overflow: hidden; }
.choix-offrande strong { font: 700 23px/.95 var(--titre); }
.offrande-art { width: 100%; height: 100px; object-fit: contain; background: #101424; border-radius: 5px; }
.dialogue-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(89px, 1fr)); gap: 7px; margin-top: 13px; }
.dialogue-detail { display: grid; grid-template-columns: minmax(80px, 185px) 1fr; gap: 12px; margin-top: 13px; }
.dialogue-detail > img { border-radius: 7px; }
#notification { position: fixed; z-index: 6; right: 15px; bottom: 16px; max-width: min(425px, calc(100vw - 30px)); pointer-events: none; }
#notification:not(:empty) { padding: 10px 14px; border: 1px solid var(--or); border-radius: 8px; background: var(--relief); box-shadow: 0 10px 30px #0008; }

@media (max-width: 1030px) { .navigation a { padding-inline: 7px; }.navigation { gap: 2px; }.entete { padding-inline: 17px; gap: 10px; }.entete-actions .pilule small { display: none; } }
@media (max-width: 790px) {
  .entete { grid-template-columns: 1fr auto; min-height: 59px; padding-top: max(8px, env(safe-area-inset-top)); }
  .marque .picto { width: 31px; height: 31px; }
  .navigation { position: fixed; z-index: 5; inset: auto 0 0; padding: 0 max(env(safe-area-inset-right), 3px) env(safe-area-inset-bottom) max(env(safe-area-inset-left), 3px); border-top: 1px solid var(--ligne); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--fond); }
  .navigation a { flex-direction: column; gap: 2px; min-height: 58px; padding: 3px 0; border: 0; border-radius: 0; font-size: 11px; }
  .navigation a[aria-current="page"] { box-shadow: inset 0 2px var(--or); }
  .contenu { padding-top: 15px; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  #notification { bottom: calc(67px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .hero { min-height: 390px; }
  .hero-paysage { object-position: center; }
  .hero::before { background: linear-gradient(0deg, var(--fond) 3%, color-mix(in srgb, var(--fond), transparent 17%) 23%, #10122200 75%); }
  .hero-texte { max-width: 100%; padding: 21px; }
  .hero h1 { font-size: clamp(3.1rem, 12.4vw, 4.5rem); }
  .hero p { font-size: 14px; }
  .hero .bouton { padding-inline: 9px; }
  .domaines { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .domaine { padding: 9px; min-height: 111px; }
  .domaine strong { font-size: 22px; }
  .raccourcis { grid-template-columns: 1fr; gap: 8px; }
  .liste-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .outil { width: 38px; height: 38px; }
  .entete-actions .pilule { padding-inline: 7px; min-height: 36px; }
  .page-titre { min-height: 172px; }
  .page-titre::before { background: linear-gradient(90deg, var(--fond), color-mix(in srgb, var(--fond), transparent 33%) 52%, #080b144a), linear-gradient(0deg, var(--fond), transparent); }
  .banniere-art { width: 80%; }
  .jeu-visuel { aspect-ratio: 1.92; }
}
@media (prefers-reduced-motion: no-preference) {
  .bouton, .carte, .carrefour, .domaine, .outil { transition: border-color .16s, background-color .16s, box-shadow .16s; }
  dialog[open] { animation: apparition .18s ease-out; }
  @keyframes apparition { from { opacity: .45; transform: translateY(5px); } to { opacity: 1; transform: none; } }
}

.eveil { width: min(100%, 1110px); margin-inline: auto; }
.eveil-entete { margin-bottom: 15px; }
.eveil-entete h1 { font-size: clamp(2.7rem, 6vw, 5rem); line-height: .95; }
.eveil-entete p { margin-top: 6px; color: var(--doux); }
.eveil-choix .bouton { min-height: 43px; }
.eveil-panneau { border: 1px solid var(--ligne); border-radius: 13px; overflow: hidden; background: var(--surface); }
.eveil-scene-entete, .eveil-legende { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px clamp(12px, 2.5vw, 24px); }
.eveil-scene-entete h2 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: .9; padding-block: 4px; }
.eveil-scene-entete > strong { flex: none; color: var(--or-clair); }
.eveil-legende h3 { font-size: 1.65rem; line-height: 1; }
.eveil-legende p { margin-top: 4px; color: var(--doux); }
.eveil-legende button { flex: none; }
.fragment-sanctuaire:not([hidden]) { border-top: 1px solid var(--ligne); padding: 9px clamp(12px, 2.5vw, 24px); color: var(--or-clair); }
.eveil-progression, .eveil-apercu { margin: 13px 0; padding: 12px 16px; border: 1px solid var(--ligne); border-radius: 10px; background: var(--surface); }
.eveil-progression label, .eveil-apercu summary { color: var(--or-clair); font-weight: 700; }
.eveil-progression progress { display: block; width: 100%; height: 12px; margin: 7px 0; accent-color: var(--or); }
.eveil-progression p, .eveil-apercu p { margin: 6px 0; color: var(--doux); }
.eveil-progression .bouton { margin-top: 3px; }
#eveil-scene:focus { outline:none; }
.eveil-apercu summary { cursor:pointer; padding-block:5px; }
.eveil-apercu .ligne-actions { margin-block:8px 1px; }
@media(max-width:540px){.eveil-legende{align-items:start;flex-direction:column}.navigation{grid-template-columns:repeat(6,minmax(0,1fr))}.navigation a{font-size:10px}}
@media(min-width:541px) and (max-width:790px){.navigation{grid-template-columns:repeat(6,minmax(0,1fr))}}
