/* Pangée — L'Âge des Héros : thème dark fantasy (pierre, or, portail écarlate) */
:root {
  --fond: #0e0b09; --fond2: #16110d; --panneau: #1b1510; --panneau2: #231b14; --bord: #3d2f20; --bord-or: #6b5328;
  --or: #d4ae5a; --or-clair: #f0d48e; --or-sombre: #8a6a2c; --texte: #e9dcc0; --texte-doux: #b4a283; --muet: #85755c;
  --rouge: #c2412d; --rouge-vif: #ff5a2a; --vert: #6e9e4f; --bleu: #6fa8dc; --violet: #a98bf0;
  --rayon: 8px; --ombre: 0 8px 30px rgba(0,0,0,.55);
  --titre: 'Cinzel', 'Trajan Pro', Georgia, serif; --corps: 'EB Garamond', Garamond, Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--fond); color: var(--texte); font: 17px/1.45 var(--corps);
  background-image: radial-gradient(1200px 600px at 70% -10%, rgba(255,90,42,.10), transparent 60%), radial-gradient(900px 700px at -10% 110%, rgba(212,174,90,.07), transparent 60%),
  repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px); background-attachment: fixed; }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; letter-spacing: .04em; color: var(--or-clair); margin: 0 0 .5em; }
h2 { font-size: 1.15rem; display: flex; align-items: baseline; gap: .6em; flex-wrap: wrap; }
h2 small, h3 small { font-family: var(--corps); font-weight: 400; color: var(--muet); letter-spacing: 0; font-size: .85rem; }
h3 { font-size: 1rem; }
a { color: var(--or); }
code { background: #0008; padding: .1em .4em; border-radius: 4px; color: var(--or-clair); }
code.gros { font-size: 1.4rem; }
hr { border: 0; border-top: 1px solid var(--bord); margin: 1em 0; }
.muet { color: var(--muet); } .petit { font-size: .85rem; } .centre { text-align: center; justify-content: center; }
.aide { color: var(--texte-doux); font-size: .9rem; font-style: italic; }
[hidden] { display: none !important; }
::selection { background: var(--rouge); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #3a2c1e; border-radius: 6px; border: 2px solid var(--fond); } ::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------ Contrôles */
input, select, textarea { font: inherit; color: var(--texte); background: #0f0b08; border: 1px solid var(--bord); border-radius: 6px; padding: .35em .55em; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--or-sombre); box-shadow: 0 0 0 3px rgba(212,174,90,.15); }
input:disabled, textarea:disabled, select:disabled { background: transparent; border-color: transparent; color: var(--texte); opacity: 1; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--or); }
input[type=range] { padding: 0; accent-color: var(--or); }
input.court, .court { width: 5.5em; }
textarea { resize: vertical; }
label { cursor: pointer; }
.champ { display: flex; flex-direction: column; gap: .2em; margin-bottom: .7em; }
.champ > span { font-family: var(--titre); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--or-sombre); }
.btn { font: 600 .92rem var(--corps); color: var(--texte); background: linear-gradient(#2a2017, #1d1610); border: 1px solid var(--bord-or); border-radius: 6px; padding: .45em .9em; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn:hover { border-color: var(--or); color: var(--or-clair); box-shadow: 0 0 12px rgba(212,174,90,.2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-or { background: linear-gradient(#b48a3a, #7a5a1e); color: #1a1007; border-color: var(--or-clair); text-shadow: 0 1px 0 rgba(255,255,255,.25); }
.btn-or:hover { background: linear-gradient(#d4ae5a, #8f6b25); color: #120a03; }
.btn-danger { border-color: #6b2a20; color: #f0b3a5; } .btn-danger:hover { border-color: var(--rouge-vif); color: #fff; box-shadow: 0 0 12px rgba(255,90,42,.3); }
.btn-vert { border-color: #3f5e2c; color: #c5e0b1; }
.btn-grand { width: 100%; padding: .8em; font-family: var(--titre); letter-spacing: .1em; font-size: 1rem; }
.btn-mini { font: .82rem var(--corps); color: var(--texte-doux); background: #0006; border: 1px solid var(--bord); border-radius: 5px; padding: .15em .5em; cursor: pointer; white-space: nowrap; }
.btn-mini:hover { color: var(--or-clair); border-color: var(--or-sombre); } .btn-mini.danger:hover { color: #fff; border-color: var(--rouge); }
.btn-icone { background: none; border: 0; color: var(--texte-doux); font-size: 1.1rem; cursor: pointer; padding: .2em .4em; } .btn-icone:hover { color: var(--or-clair); }
.lien { background: none; border: 0; color: var(--or); text-decoration: underline dotted; cursor: pointer; font: inherit; padding: 0; text-align: left; }
.ligne-boutons { display: flex; flex-wrap: wrap; gap: .5em; align-items: center; margin: .6em 0; } .ligne-boutons.fin { justify-content: flex-end; }
.segmente { display: inline-flex; border: 1px solid var(--bord); border-radius: 6px; overflow: hidden; flex-wrap: wrap; }
.segmente button { background: transparent; border: 0; color: var(--texte-doux); padding: .3em .7em; cursor: pointer; font: .88rem var(--corps); border-right: 1px solid var(--bord); }
.segmente button:last-child { border-right: 0; } .segmente button.actif { background: var(--or-sombre); color: #fff; }
.badge { display: inline-block; font: .72rem var(--corps); padding: .05em .5em; border-radius: 99px; border: 1px solid var(--bord-or); color: var(--or); background: #0006; vertical-align: middle; }
.badge-secret { border-color: #5e3f8f; color: #cdb8ff; } .badge-cache { border-color: #555; color: #aaa; }
.badge-ok { border-color: #3f6e2c; color: #b8e09c; } .badge-ko { border-color: #8a2e20; color: #ffb3a0; }
.tag { display: inline-block; font-size: .78rem; padding: .05em .55em; border-radius: 4px; background: #2a2017; border: 1px solid var(--bord); margin: .1em .2em .1em 0; color: var(--texte-doux); }
.etat { display: inline-block; font-size: .75rem; padding: .05em .5em; border-radius: 4px; background: #4a1c14; color: #ffcbbd; border: 1px solid #7a2e20; margin: .1em .2em .1em 0; cursor: help; }

/* ------------------------------------------------ Accueil */
.page-accueil { overflow: hidden; }
.accueil { min-height: 100vh; display: grid; place-items: center; position: relative; }
.portail { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.portail-anneau { width: 620px; height: 620px; border-radius: 50%; background: conic-gradient(from 0deg, #3a0a04, #ff5a1f, #8a1a0a, #ffb347, #3a0a04); filter: blur(40px); opacity: .45; animation: tourne 24s linear infinite; }
.portail-coeur { position: absolute; width: 360px; height: 460px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255,150,60,.35), rgba(120,20,5,.15) 55%, transparent 70%); animation: pulse 4s ease-in-out infinite; }
@keyframes tourne { to { transform: rotate(360deg); } } @keyframes pulse { 50% { transform: scale(1.08); opacity: .8; } }
.accueil-carte { position: relative; width: min(420px, 92vw); padding: 2.4em 2.2em 1.6em; background: linear-gradient(180deg, rgba(28,21,16,.94), rgba(14,11,9,.96)); border: 1px solid var(--bord-or); border-radius: 14px; box-shadow: var(--ombre), 0 0 60px rgba(255,90,42,.18), inset 0 0 0 4px rgba(0,0,0,.4), inset 0 0 0 5px rgba(212,174,90,.25); text-align: center; }
.accueil-carte h1 { font-size: 3rem; font-weight: 900; margin: 0; background: linear-gradient(#fff3c4, #d4ae5a 55%, #8a6a2c); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; letter-spacing: .12em; }
.sous-titre { font-family: var(--titre); color: var(--rouge-vif); letter-spacing: .35em; text-transform: uppercase; font-size: .85rem; margin: 0 0 1.6em; text-shadow: 0 0 12px rgba(255,90,42,.6); }
.sceau-grand { font-size: 2.4rem; color: var(--or); filter: drop-shadow(0 0 12px rgba(255,90,42,.6)); }
.accueil-carte form { text-align: left; }
.erreur { color: #ff9b85; min-height: 1.4em; text-align: center; }
body.ouverture .accueil-carte { transition: all .7s ease-in; transform: scale(.85); opacity: 0; filter: blur(6px); }
body.ouverture .portail-anneau { transition: all .7s; transform: scale(3); opacity: .9; }

/* ------------------------------------------------ Application */
.app { display: grid; grid-template-columns: auto 1fr 360px; grid-template-rows: 58px 1fr; grid-template-areas: "haut haut haut" "nav vue journal"; height: 100vh; overflow: hidden; }
.barre-haut { grid-area: haut; display: flex; align-items: center; justify-content: space-between; padding: 0 1em; background: linear-gradient(#1f1812, #140f0b); border-bottom: 1px solid var(--bord-or); box-shadow: 0 2px 18px rgba(0,0,0,.6); position: relative; z-index: 5; }
.barre-haut::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--rouge-vif), transparent); opacity: .6; }
.titre-campagne { display: flex; align-items: center; gap: .7em; min-width: 0; }
.titre-campagne h1 { font-size: 1.15rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titre-campagne small { color: var(--texte-doux); font-style: italic; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
.sceau { font-size: 1.6rem; color: var(--rouge-vif); filter: drop-shadow(0 0 8px rgba(255,90,42,.7)); }
.actions-haut { display: flex; align-items: center; gap: .8em; }
.role { font-family: var(--titre); font-size: .8rem; color: var(--or); letter-spacing: .06em; }
.etat-connexion { width: 10px; height: 10px; border-radius: 50%; background: #555; display: inline-block; }
.etat-connexion.ok { background: #6be06b; box-shadow: 0 0 8px #6be06b; } .etat-connexion.ko { background: var(--rouge-vif); box-shadow: 0 0 8px var(--rouge-vif); animation: pulse 1s infinite; }
.nav-laterale { grid-area: nav; display: flex; flex-direction: column; gap: 2px; padding: .6em .4em; background: #120e0a; border-right: 1px solid var(--bord); overflow-y: auto; width: 190px; }
.nav-laterale button { display: flex; align-items: center; gap: .7em; background: none; border: 1px solid transparent; color: var(--texte-doux); padding: .5em .6em; border-radius: 6px; cursor: pointer; font: 600 .92rem var(--corps); text-align: left; }
.nav-laterale button:hover { color: var(--or-clair); background: #1e1711; }
.nav-laterale button.actif { color: var(--or-clair); background: linear-gradient(90deg, rgba(212,174,90,.18), transparent); border-color: var(--bord-or); box-shadow: inset 3px 0 0 var(--rouge-vif); }
.nav-laterale .ic { width: 1.4em; text-align: center; font-size: 1.05rem; }
.vue { grid-area: vue; overflow-y: auto; padding: 1em 1.2em 3em; }
.journal { grid-area: journal; display: flex; flex-direction: column; background: #120e0a; border-left: 1px solid var(--bord); min-height: 0; }

.panneau { background: linear-gradient(180deg, var(--panneau), #17120d); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1em 1.1em; margin-bottom: 1em; box-shadow: 0 4px 16px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.03); position: relative; }
.panneau > h2:first-child { padding-bottom: .4em; border-bottom: 1px solid var(--bord); margin-bottom: .8em; }
.titre-section { margin: 1.2em 0 .5em; font-size: .95rem; color: var(--or); border-bottom: 1px dashed var(--bord); padding-bottom: .2em; display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.grille-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8em; }
.maitre-detail { display: grid; grid-template-columns: 300px 1fr; gap: 1em; align-items: start; }
.liste-col { position: sticky; top: 0; max-height: calc(100vh - 90px); overflow-y: auto; }
.liste { list-style: none; padding: 0; margin: 0; } .liste li { padding: .25em 0; border-bottom: 1px solid #ffffff08; } .liste li.ok { color: #b8e09c; } .liste li.ko { color: #ffb3a0; }
ol.liste { list-style: decimal inside; }
.liste-persos { list-style: none; padding: 0; margin: .6em 0; }
.liste-persos button { display: flex; gap: .6em; align-items: center; width: 100%; background: none; border: 1px solid transparent; border-radius: 6px; padding: .35em .4em; color: var(--texte); cursor: pointer; text-align: left; font: inherit; }
.liste-persos button:hover { background: #ffffff08; } .liste-persos button.actif { border-color: var(--bord-or); background: rgba(212,174,90,.1); }
.liste-persos b { display: block; font-weight: 600; } .liste-persos small { color: var(--muet); }
.recherche { margin: .5em 0; }
.filtres-ligne { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; margin-bottom: .8em; } .filtres-ligne .recherche { flex: 1; min-width: 200px; margin: 0; } .filtres-ligne select { width: auto; }

/* Vignettes, groupe */
.vignette { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 2px solid var(--or-sombre); background: #2a2017; display: grid; place-items: center; flex: none; font-family: var(--titre); font-size: 1.5rem; color: var(--or); box-shadow: 0 0 0 3px #0008; }
.vignette img { width: 100%; height: 100%; object-fit: cover; } .vignette.petite { width: 34px; height: 34px; font-size: .9rem; border-width: 1px; }
.cartes-groupe { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .8em; }
.carte-heros { display: flex; gap: .8em; padding: .7em; border: 1px solid var(--bord); border-radius: var(--rayon); background: #120e0a; cursor: pointer; position: relative; transition: border-color .15s, transform .15s; }
.carte-heros:hover { border-color: var(--or-sombre); transform: translateY(-1px); }
.carte-heros.grand { cursor: default; } .carte-heros .infos { flex: 1; min-width: 0; } .carte-heros h3 { margin: 0; }
.carte-heros small { color: var(--muet); }
.pv-rapide { position: absolute; top: .5em; right: .5em; display: flex; gap: .2em; }
.mini-stats { display: flex; flex-wrap: wrap; gap: .3em .8em; font-size: .85rem; color: var(--texte-doux); margin-top: .3em; }
.pv-barre { position: relative; height: 20px; background: #2a0d08; border: 1px solid #5a2218; border-radius: 4px; overflow: hidden; margin: .35em 0; }
.pv-barre div { height: 100%; background: linear-gradient(#5fa043, #3b6e28); transition: width .4s; } .pv-barre.bas div { background: linear-gradient(#d0a030, #8a6a18); } .pv-barre.critique div { background: linear-gradient(#e0442a, #8a1e10); }
.pv-barre span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; font-weight: 600; text-shadow: 0 1px 2px #000; }
.groupe-liste { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: .5em; } .groupe-liste li { display: flex; gap: .6em; align-items: center; } .groupe-liste li > span:last-child { flex: 1; } .groupe-liste small { color: var(--muet); margin-left: .4em; }

/* Scène */
.scene-joueur { display: flex; gap: 1.2em; align-items: flex-start; }
.scene-joueur img { width: 45%; max-height: 360px; object-fit: cover; border-radius: 6px; border: 1px solid var(--bord-or); cursor: zoom-in; }
.scene-joueur h2 { font-size: 1.5rem; }
blockquote { margin: .8em 0 0; padding: .6em 1em; border-left: 3px solid var(--rouge-vif); background: #0005; font-style: italic; font-size: 1.1rem; }
.depot { border: 2px dashed var(--bord-or); border-radius: var(--rayon); padding: 1.6em; text-align: center; color: var(--texte-doux); transition: all .15s; }
.depot.survol { border-color: var(--rouge-vif); background: rgba(255,90,42,.08); color: #fff; }
.dernier-partage img, .derniere-image img { max-width: 100%; max-height: 260px; border-radius: 6px; display: block; margin: .6em 0 .3em; cursor: zoom-in; }
.demandes { border-color: var(--rouge); box-shadow: 0 0 22px rgba(255,90,42,.25); animation: lueur 2s ease-in-out infinite; }
@keyframes lueur { 50% { box-shadow: 0 0 34px rgba(255,90,42,.45); } }
.demande { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: .3em 0; }
.jets-rapides .btn { margin: .2em .2em 0 0; }
.ordre-combat { margin: 0; padding-left: 1.4em; } .ordre-combat li { padding: .25em .4em; border-radius: 5px; }
.ordre-combat li.tour-actif { background: rgba(255,90,42,.15); outline: 1px solid var(--rouge); } .ordre-combat li.moi b { color: var(--or-clair); }
.sante { font-size: .8rem; color: var(--texte-doux); margin-left: .4em; }

/* ------------------------------------------------ Fiche de personnage */
.fiche-tete { display: grid; grid-template-columns: 110px 1fr auto; gap: 1em; align-items: start; }
.portrait { width: 110px; height: 130px; border-radius: 8px; border: 2px solid var(--or-sombre); background: #120e0a; overflow: hidden; cursor: pointer; color: var(--muet); padding: 0; box-shadow: 0 0 0 4px #0009, 0 0 20px rgba(212,174,90,.15); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.nom-perso { font: 700 1.6rem var(--titre); color: var(--or-clair); background: transparent; border-color: transparent; padding: 0 .2em; }
.nom-perso:hover:not(:disabled) { border-color: var(--bord); }
.identite-ligne { display: flex; flex-wrap: wrap; gap: .3em .8em; margin: .3em 0; }
.identite-ligne label { display: flex; align-items: center; gap: .3em; font-size: .8rem; color: var(--muet); font-family: var(--titre); }
.identite-ligne input { width: 9em; font-family: var(--corps); font-size: .95rem; }
.px-ligne { display: flex; align-items: center; gap: .7em; flex-wrap: wrap; font-size: .9rem; }
.px-ligne .niveau { font: 700 .95rem var(--titre); color: var(--rouge-vif); }
.px-barre { flex: 1; min-width: 120px; max-width: 280px; height: 8px; background: #000a; border: 1px solid var(--bord); border-radius: 99px; overflow: hidden; }
.px-barre div { height: 100%; background: linear-gradient(90deg, var(--or-sombre), var(--or-clair)); box-shadow: 0 0 8px var(--or); }
.px-ligne.grand .px-barre { max-width: none; height: 12px; }
.etats { margin-top: .3em; }
.kpis { display: grid; grid-template-columns: repeat(4, 74px); gap: .4em; }
.kpi { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #120e0a; border: 1px solid var(--bord); border-radius: 8px; padding: .3em .2em; color: var(--texte); font: inherit; min-height: 58px; }
button.kpi { cursor: pointer; } button.kpi:hover { border-color: var(--or); }
.kpi small { font: .62rem var(--titre); letter-spacing: .05em; color: var(--or-sombre); text-transform: uppercase; text-align: center; }
.kpi b { font: 700 1.3rem var(--titre); } .kpi input { text-align: center; font: 700 1.2rem var(--titre); padding: 0; width: 3em; }
.pv-zone { margin: .8em 0; } .pv-actions { display: flex; gap: .5em; align-items: center; flex-wrap: wrap; }
.pv-actions input[type=number] { width: 5em; } .mini { font-size: .85rem; color: var(--texte-doux); display: flex; align-items: center; gap: .3em; } .mini input { width: 4.5em; }
.sous-onglets { display: flex; gap: .2em; border-bottom: 1px solid var(--bord-or); margin: .8em 0 0; flex-wrap: wrap; }
.sous-onglets button { background: none; border: 1px solid transparent; border-bottom: 0; color: var(--texte-doux); padding: .45em .9em; cursor: pointer; font: 600 .9rem var(--titre); letter-spacing: .03em; border-radius: 6px 6px 0 0; }
.sous-onglets button.actif { color: var(--or-clair); border-color: var(--bord-or); background: linear-gradient(#2a2017, var(--panneau)); margin-bottom: -1px; }
.fiche-corps { padding-top: .8em; }
.grille-caracs { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6em; }
.carac { display: flex; flex-direction: column; align-items: center; gap: .25em; padding: .6em .3em; border: 1px solid var(--bord-or); border-radius: 10px 10px 30px 30px; background: radial-gradient(circle at 50% 30%, #2a2017, #120e0a); }
.carac small { font: .68rem var(--titre); letter-spacing: .06em; color: var(--or); text-transform: uppercase; }
.carac-mod { font: 900 1.8rem var(--titre); color: var(--texte); background: none; border: 0; cursor: pointer; line-height: 1; padding: .1em; }
.carac-mod:hover { color: var(--rouge-vif); text-shadow: 0 0 10px rgba(255,90,42,.6); }
.carac input { width: 3.4em; text-align: center; padding: .1em; } .carac-val { border: 1px solid var(--bord); border-radius: 99px; padding: 0 .7em; }
.carac-save { font: .8rem var(--corps); background: #0006; border: 1px solid var(--bord); color: var(--texte-doux); border-radius: 5px; cursor: pointer; padding: .1em .4em; }
.carac-save.maitrise { color: var(--or-clair); border-color: var(--or-sombre); } .carac-save i { font-style: normal; cursor: pointer; }
.competences { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .15em .9em; }
.comp { display: flex; align-items: center; gap: .3em; } .comp .puce { background: none; border: 0; color: var(--or-sombre); cursor: pointer; width: 1.4em; padding: 0; font-size: .9rem; }
.comp.maitrise .puce { color: var(--or-clair); }
.comp-nom { flex: 1; display: flex; justify-content: space-between; background: none; border: 0; border-bottom: 1px dotted #ffffff14; color: var(--texte); cursor: pointer; font: inherit; padding: .1em .2em; text-align: left; }
.comp-nom:hover { color: var(--or-clair); background: #ffffff06; } .comp-nom small { color: var(--muet); font-size: .7rem; } .comp.maitrise .comp-nom b { color: var(--or-clair); }
.ligne-infos { display: flex; gap: 1em; align-items: center; flex-wrap: wrap; margin: .8em 0; } .ligne-infos label { flex: 1; display: flex; align-items: center; gap: .5em; min-width: 240px; color: var(--muet); font-size: .9rem; }
.slots { display: grid; gap: .35em; } .slot-ligne { display: flex; align-items: center; gap: .7em; } .slot-ligne > span:first-child { min-width: 14em; }
.pastilles { display: inline-flex; gap: .3em; flex-wrap: wrap; }
.pastille { width: 20px; height: 20px; transform: rotate(45deg); border: 2px solid var(--or); background: radial-gradient(circle, var(--or-clair), var(--or-sombre)); cursor: pointer; box-shadow: 0 0 6px rgba(212,174,90,.5); padding: 0; border-radius: 3px; transition: all .15s; }
.pastille.utilisee { background: #120e0a; box-shadow: none; border-color: #5a4a30; }
.pastille:hover { transform: rotate(45deg) scale(1.15); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { font: .72rem var(--titre); letter-spacing: .06em; text-transform: uppercase; color: var(--or-sombre); text-align: left; padding: .4em; border-bottom: 1px solid var(--bord-or); }
.table td { padding: .3em .4em; border-bottom: 1px solid #ffffff0a; vertical-align: middle; } .table td small { color: var(--muet); margin-left: .3em; }
.table td.actions { white-space: nowrap; text-align: right; } .table td.pos { color: #b8e09c; } .table td.neg { color: #ffb3a0; }
.table tr.tour-actif td { background: rgba(255,90,42,.14); } .table tr.tour-actif td:first-child { box-shadow: inset 3px 0 0 var(--rouge-vif); }
.table tr.ko td { opacity: .5; text-decoration: line-through; } .table tr.cache td { font-style: italic; color: var(--texte-doux); }
.bourse { display: flex; gap: .6em; flex-wrap: wrap; align-items: center; margin-bottom: .8em; }
.piece { display: flex; flex-direction: column; align-items: center; gap: .15em; padding: .4em; border-radius: 50%; width: 82px; height: 82px; justify-content: center; border: 2px solid; font-size: .7rem; font-family: var(--titre); }
.piece input { width: 4.5em; text-align: center; padding: .1em; }
.piece-pp { border-color: #c8d0d8; color: #e4ecf2; background: radial-gradient(#3a4048, #1c2026); } .piece-po { border-color: #d4ae5a; color: #f0d48e; background: radial-gradient(#4a3a18, #221a0a); }
.piece-pe { border-color: #c9b25a; color: #e8d98e; background: radial-gradient(#3e3a20, #1e1c0e); } .piece-pa { border-color: #a8b0b8; color: #dce2e8; background: radial-gradient(#33373c, #18191c); } .piece-pc { border-color: #b8703a; color: #f0b88a; background: radial-gradient(#40261a, #1e120a); }
.capacite { border: 1px solid var(--bord); border-radius: 6px; padding: .5em .7em; margin-bottom: .4em; background: #120e0a; } .capacite summary { cursor: pointer; } .capacite summary small { color: var(--muet); }
.capacite input, .capacite textarea { margin-top: .3em; }
.liste-sorts { display: grid; gap: .2em; } .sort-ligne { display: flex; align-items: center; gap: .6em; padding: .2em .3em; border-radius: 4px; } .sort-ligne:hover { background: #ffffff06; }
.sort-ligne small { flex: 1; color: var(--muet); } .sort-ligne.non-prepare .lien { color: var(--muet); }
.meta { border: 1px solid var(--bord-or); border-radius: 8px; display: grid; gap: .4em; } .meta legend { font-family: var(--titre); color: var(--or); padding: 0 .4em; } .meta label { display: flex; gap: .5em; align-items: center; } .meta label input:not([type=checkbox]), .meta label select { flex: 1; }
.grille-etats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5em; }
.etat-choix { display: grid; grid-template-columns: auto 1fr; gap: 0 .5em; padding: .4em; border: 1px solid var(--bord); border-radius: 6px; } .etat-choix small { grid-column: 2; color: var(--muet); font-size: .8rem; }
.grille-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6em; } .grille-slots label { display: flex; flex-direction: column; font-size: .85rem; }

/* Arbre généalogique */
.arbre { display: flex; flex-direction: column; align-items: center; gap: .4em; padding: 1em; background: radial-gradient(ellipse at center, rgba(212,174,90,.06), transparent 70%); border-radius: 12px; margin-bottom: 1em; }
.arbre-rang { display: flex; gap: .8em; justify-content: center; align-items: center; flex-wrap: wrap; }
.arbre-rang.centre { gap: .6em; } .fratrie { display: flex; gap: .6em; }
.arbre-trait { width: 2px; height: 22px; background: linear-gradient(var(--or-sombre), var(--or)); }
.membre { display: flex; flex-direction: column; align-items: center; gap: .1em; width: 150px; padding: .6em .5em; border: 1px solid var(--bord-or); border-radius: 10px; background: linear-gradient(#231b14, #140f0b); color: var(--texte); font: inherit; cursor: pointer; text-align: center; }
.membre:hover { border-color: var(--or); box-shadow: 0 0 12px rgba(212,174,90,.2); }
.membre img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 1px solid var(--or-sombre); }
.membre small { font: .65rem var(--titre); letter-spacing: .06em; color: var(--or); text-transform: uppercase; } .membre span { font-size: .78rem; color: var(--muet); }
.membre.soi { border: 2px solid var(--or); box-shadow: 0 0 18px rgba(255,90,42,.3); cursor: default; width: 170px; }
.membre.statut-décédé { filter: grayscale(.8); opacity: .75; } .membre.statut-décédé b::after { content: ' ✝'; }
.membre.statut-disparu { border-style: dashed; } .membre.secret { border-color: #5e3f8f; }
.lien-union { color: var(--rouge-vif); font-size: 1.4rem; }
.rel { font-size: .7rem; font-style: normal; padding: 0 .4em; border-radius: 99px; border: 1px solid var(--bord); }
.rel-hostile, .rel-rompue { color: #ffb3a0; border-color: #7a2e20; } .rel-tendue { color: #f0d48e; } .rel-proche, .rel-bonne { color: #b8e09c; border-color: #3f6e2c; }
.vide { color: var(--muet); font-style: italic; }

/* ------------------------------------------------ Journal */
.journal-tete { padding: .7em .8em .4em; border-bottom: 1px solid var(--bord); } .journal-tete h2 { font-size: .95rem; margin: 0 0 .4em; }
.filtres { display: flex; gap: .3em; } .filtres button { background: none; border: 1px solid var(--bord); color: var(--texte-doux); border-radius: 99px; font: .78rem var(--corps); padding: .1em .6em; cursor: pointer; } .filtres button.actif { border-color: var(--or); color: var(--or-clair); }
.journal-flux { flex: 1; overflow-y: auto; padding: .6em; display: flex; flex-direction: column; gap: .45em; min-height: 0; }
.jet, .message { border: 1px solid var(--bord); border-radius: 8px; padding: .4em .6em; background: #1a140f; font-size: .92rem; animation: entree .3s ease-out; }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } }
.jet-tete, .message-tete { display: flex; flex-wrap: wrap; gap: .3em; align-items: center; } .jet-tete time, .message-tete time { margin-left: auto; color: var(--muet); font-size: .75rem; }
.jet-label { color: var(--texte-doux); }
.jet-corps { display: flex; align-items: center; gap: .6em; } .jet-total { font: 900 1.6rem var(--titre); color: var(--or-clair); min-width: 1.6em; text-align: center; }
.jet-detail { font-size: .8rem; color: var(--muet); } .de { display: inline-block; min-width: 1.5em; text-align: center; border: 1px solid var(--bord); border-radius: 4px; margin: 0 1px; padding: 0 2px; color: var(--texte); }
.de.ecarte { opacity: .35; text-decoration: line-through; } .de.crit { border-color: var(--or); color: var(--or-clair); } .de.fumble { border-color: var(--rouge); color: #ff9b85; }
.jet-crit { border-color: var(--or); box-shadow: 0 0 14px rgba(212,174,90,.35); } .jet-crit .jet-total { color: #fff3c4; text-shadow: 0 0 10px var(--or); }
.jet-fumble { border-color: var(--rouge); } .jet-fumble .jet-total { color: #ff7a5a; }
.jet-intention { font-size: .85rem; color: #cdb8ff; } .jet-reponse { font-size: .85rem; color: #b8e09c; font-style: italic; }
.reponses-rapides { margin: -.2em 0 .2em .6em; padding: .4em; border-left: 2px solid #5e3f8f; display: flex; flex-wrap: wrap; gap: .3em; } .reponses-rapides small { width: 100%; color: var(--muet); }
.message.prive { border-color: #5e3f8f; background: #1a1424; } .message.moi { border-left: 3px solid var(--or-sombre); } .message.du-mj { border-left: 3px solid var(--rouge-vif); }
.message-texte { white-space: normal; } .message img { max-width: 100%; border-radius: 4px; } .rappel { font-size: .78rem; color: var(--muet); font-style: italic; }
.composer { padding: .5em .6em; border-top: 1px solid var(--bord); display: grid; gap: .35em; }
.composer-ligne { display: flex; gap: .35em; align-items: stretch; } .composer-ligne > input, .composer-ligne > textarea, .composer-ligne > select { flex: 1; }
.plateau { padding: .5em .6em .7em; border-top: 1px solid var(--bord-or); background: linear-gradient(#1a140f, #0f0b08); display: grid; gap: .4em; }
.des-rapides { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25em; }
.de-btn { font: 700 .78rem var(--titre); padding: .45em 0; border-radius: 6px; border: 1px solid var(--bord-or); background: radial-gradient(circle at 50% 30%, #3a2c1e, #160f0a); color: var(--or-clair); cursor: pointer; }
.de-btn:hover { border-color: var(--rouge-vif); color: #fff; box-shadow: 0 0 10px rgba(255,90,42,.4); } .de-20 { border-color: var(--or); }
.options-jet { display: flex; gap: .4em; flex-wrap: wrap; } .options-jet .segmente button { font-size: .78rem; padding: .2em .5em; }

/* Animation du dé */
.de-anim { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 100; pointer-events: none; }
.de-anim .d20 { position: relative; width: 140px; height: 140px; animation: roule .9s cubic-bezier(.2,.8,.3,1); }
.de-anim svg { width: 100%; height: 100%; filter: drop-shadow(0 0 20px rgba(255,90,42,.6)); }
.de-anim polygon { fill: #2a1a10; stroke: var(--or); stroke-width: 2.5; } .de-anim polygon.f { fill: #3a2414; }
.de-anim span { position: absolute; inset: 0; display: grid; place-items: center; font: 900 2.6rem var(--titre); color: var(--or-clair); text-shadow: 0 0 12px #000; padding-top: 10px; }
.de-anim.crit polygon { stroke: #fff3c4; } .de-anim.crit span { color: #fff; text-shadow: 0 0 20px var(--or); } .de-anim.fumble span { color: #ff6a4a; }
.de-anim.out { transition: opacity .4s; opacity: 0; }
@keyframes roule { 0% { transform: rotate(-540deg) scale(.2); opacity: 0; } 70% { transform: rotate(15deg) scale(1.1); opacity: 1; } 100% { transform: rotate(0) scale(1); } }

/* ------------------------------------------------ Fenêtres, notifications */
.modal-fond { position: fixed; inset: 0; background: rgba(5,3,2,.72); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 1em; animation: fondu .15s; }
@keyframes fondu { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; background: linear-gradient(#211913, #15100c); border: 1px solid var(--bord-or); border-radius: 12px; box-shadow: var(--ombre), 0 0 40px rgba(255,90,42,.12); }
.modal-large { width: min(920px, 100%); }
.modal-tete { display: flex; justify-content: space-between; align-items: center; padding: .7em 1em; border-bottom: 1px solid var(--bord); } .modal-tete h2 { margin: 0; }
.modal-corps { padding: 1em; overflow-y: auto; } .modal-pied { display: flex; justify-content: flex-end; gap: .5em; padding: .7em 1em; border-top: 1px solid var(--bord); }
.modal .apercu { max-width: 100%; max-height: 300px; display: block; margin: 0 auto 1em; border-radius: 6px; }
#toasts { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: .4em; pointer-events: none; }
.toast { padding: .55em 1.2em; border-radius: 8px; background: #1f1812; border: 1px solid var(--bord-or); box-shadow: var(--ombre); color: var(--texte); animation: entree .25s; font-weight: 600; }
.toast.out { transition: all .5s; opacity: 0; transform: translateY(-10px); }
.toast-erreur { border-color: var(--rouge); color: #ffb3a0; } .toast-prive, .toast-secret { border-color: #5e3f8f; color: #d9c8ff; } .toast-demande, .toast-combat { border-color: var(--rouge-vif); box-shadow: 0 0 20px rgba(255,90,42,.4); }
.toast-niveau { border-color: var(--or); color: #fff3c4; box-shadow: 0 0 30px rgba(212,174,90,.6); font-family: var(--titre); } .toast-objet { border-color: var(--vert); }
.ecran-plein { position: fixed; inset: 0; z-index: 90; background: rgba(5,3,2,.92); display: grid; place-items: center; cursor: zoom-out; animation: fondu .3s; }
.ecran-plein figure { margin: 0; max-width: 94vw; max-height: 92vh; text-align: center; } .ecran-plein img { max-width: 94vw; max-height: 82vh; border: 1px solid var(--bord-or); border-radius: 6px; box-shadow: 0 0 60px rgba(255,90,42,.25); }
.ecran-plein figcaption { font: 1.2rem var(--titre); color: var(--or-clair); margin-top: .5em; } .ecran-plein figcaption small { display: block; font: .85rem var(--corps); color: var(--muet); }
.ecran-plein > .btn-icone { position: absolute; top: 1em; right: 1em; font-size: 1.6rem; }
.liste-coches { display: flex; flex-wrap: wrap; gap: .4em 1em; margin: .6em 0; } .liste-coches label { display: flex; gap: .4em; align-items: center; }
.modal .liste-coches { flex-direction: column; max-height: 50vh; overflow-y: auto; flex-wrap: nowrap; }
.resultats { display: grid; gap: .2em; max-height: 55vh; overflow-y: auto; }
.resultat { text-align: left; background: #120e0a; border: 1px solid var(--bord); border-radius: 5px; padding: .4em .6em; color: var(--texte); cursor: pointer; font: inherit; } .resultat:hover { border-color: var(--or); } .resultat small { color: var(--muet); }
.couleurs { display: flex; gap: .4em; margin: .5em 0; } .couleurs label { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #000; display: grid; place-items: center; } .couleurs input { margin: 0; }

/* ------------------------------------------------ Grimoire et objets */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8em; align-items: start; }
.grille-cartes.objets { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.carte-cliquable { cursor: pointer; position: relative; } .carte-cliquable:hover .carte-sort, .carte-cliquable:hover .carte-objet { border-color: var(--or); }
.carte-cliquable > .btn-mini { position: absolute; right: .6em; bottom: .6em; } .carte-cliquable > .badge { position: absolute; top: .5em; right: .5em; }
.connu .carte-sort { border-color: var(--or); box-shadow: 0 0 12px rgba(212,174,90,.25); }
.carte-sort { border: 1px solid var(--bord-or); border-radius: 8px; background: linear-gradient(#f2e6c9, #e3d2ab); color: #2a1d10; overflow: hidden; font-size: .92rem; }
.carte-sort header { padding: .5em .8em .3em; border-bottom: 2px solid #b89a5e; } .carte-sort h3 { color: #3a2614; font-size: 1.25rem; margin: 0; font-variant: small-caps; }
.carte-sort .sous { display: flex; justify-content: space-between; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #6a5236; }
.carte-sort.offensif header { background: linear-gradient(#e7eef6, #d6e2ee); } .carte-sort.soutien header { background: linear-gradient(#eef3e4, #dfe9cf); }
.grille-sort { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .3em .8em; margin: 0; padding: .5em .8em; } .grille-sort dt { font-size: .65rem; font-weight: 700; text-transform: uppercase; color: #5a4128; } .grille-sort dd { margin: 0; }
.carte-sort .effet, .carte-sort .plus-haut, .carte-sort > .muet { padding: 0 .8em; margin: .4em 0; } .carte-sort footer { padding: .4em .8em .6em; display: flex; flex-wrap: wrap; gap: .2em; align-items: center; } .carte-sort footer small { margin-left: auto; color: #6a5236; font-style: italic; }
.carte-sort .tag { background: #d9c79c; border-color: #b89a5e; color: #3a2614; }
.carte-objet { border: 1px solid var(--bord); border-radius: 8px; padding: .7em .8em; background: #140f0b; min-height: 100%; } .carte-objet h3 { margin: 0; font-size: 1rem; }
.carte-objet img { width: 100%; max-height: 140px; object-fit: cover; border-radius: 5px; margin-bottom: .4em; }
.carte-objet .sous { font-size: .8rem; color: var(--muet); text-transform: capitalize; } .carte-objet .stats { display: flex; flex-wrap: wrap; gap: .2em .8em; font-size: .85rem; margin: .4em 0; } .carte-objet .stats b { color: var(--or-sombre); font-weight: 600; }
.carte-objet p { font-size: .88rem; color: var(--texte-doux); margin: .3em 0 1.6em; }
.cat-objet-magique { border-color: #5e3f8f; box-shadow: inset 0 0 20px rgba(169,139,240,.08); } .cat-objet-magique h3 { color: #d9c8ff; }
.cat-arme h3 { color: #ffcbbd; } .cat-armure h3, .cat-bouclier h3 { color: #c8d4e0; }

/* ------------------------------------------------ Chronologie */
.graphe { margin: 0 0 1em; } .graphe svg { width: 100%; height: auto; background: #0f0b08; border: 1px solid var(--bord); border-radius: 8px; }
.graphe .palier { stroke: #ffffff14; stroke-dasharray: 4 4; } .graphe .palier-txt, .graphe .axe { fill: var(--muet); font-size: 11px; font-family: var(--corps); }
.graphe figcaption { display: flex; flex-wrap: wrap; gap: .4em 1.2em; font-size: .85rem; margin-top: .4em; } .graphe figcaption i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .3em; vertical-align: middle; }
.frise { position: relative; padding-left: 2.6em; } .frise::before { content: ''; position: absolute; left: 1.05em; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--rouge-vif), var(--or-sombre), transparent); }
.evenement { position: relative; margin-bottom: 1em; display: flex; gap: .8em; cursor: pointer; }
.evt-pastille { position: absolute; left: -2.6em; top: .2em; width: 2.2em; height: 2.2em; border-radius: 50%; display: grid; place-items: center; background: #1f1812; border: 2px solid var(--or); color: var(--or-clair); z-index: 1; }
.type-combat .evt-pastille, .type-mort .evt-pastille { border-color: var(--rouge-vif); color: #ffb3a0; } .type-choix .evt-pastille { border-color: var(--violet); color: #d9c8ff; }
.evt-corps { flex: 1; border: 1px solid var(--bord); border-radius: 8px; padding: .6em .9em; background: #140f0b; transition: border-color .15s; } .evenement:hover .evt-corps { border-color: var(--or-sombre); }
.evt-corps header small { color: var(--muet); } .evt-corps h3 { margin: 0 0 .3em; } .evt-corps img { max-width: 100%; max-height: 220px; border-radius: 6px; }
.evenement.cache .evt-corps { border-style: dashed; opacity: .8; }
.choix { display: grid; gap: .3em; margin: .5em 0; } .option { padding: .3em .6em; border-radius: 6px; border: 1px solid var(--bord); } .option small { display: block; color: var(--texte-doux); }
.option.retenu { border-color: var(--or); background: rgba(212,174,90,.08); } .option.ecarte { opacity: .45; border-style: dashed; }
.montee { margin-top: .4em; color: var(--or-clair); font-family: var(--titre); text-shadow: 0 0 10px rgba(212,174,90,.5); }
.secret-mj { color: #cdb8ff; background: #1a1424; border-left: 2px solid #5e3f8f; padding: .3em .6em; border-radius: 4px; font-size: .9rem; }
.ligne-choix { display: grid; grid-template-columns: auto 1fr 1.4fr auto; gap: .4em; align-items: center; margin-bottom: .3em; }
.points td.pos { color: #b8e09c; }

/* ------------------------------------------------ Carte */
.carte-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1em; align-items: start; height: 100%; }
.carte-liste { max-height: calc(100vh - 90px); overflow-y: auto; } .carte-liste label { display: block; margin-bottom: .4em; }
.carte-principale { padding: 0; overflow: hidden; display: flex; flex-direction: column; height: calc(100vh - 92px); }
.carte-joueur .carte-principale { height: calc(100vh - 190px); border: 1px solid var(--bord); border-radius: 8px; margin-top: .5em; }
.carte-principale > .carte-outils, .carte-principale > div { width: 100%; }
.carte-outils { display: flex; flex-wrap: wrap; gap: .6em; padding: .5em; border-bottom: 1px solid var(--bord); background: #120e0a; align-items: center; }
.carte-outils .groupe { display: flex; gap: .25em; align-items: center; padding-right: .6em; border-right: 1px solid var(--bord); } .carte-outils .groupe.droite { margin-left: auto; border: 0; }
.outil { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--bord); background: #1a140f; color: var(--texte); cursor: pointer; font-size: 1rem; }
.outil.actif { border-color: var(--rouge-vif); background: rgba(255,90,42,.18); box-shadow: 0 0 10px rgba(255,90,42,.35); }
.carte-outils input[type=range] { width: 90px; }
.carte-zone { position: relative; flex: 1; min-height: 300px; } .carte-zone canvas { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.carte-info { position: absolute; top: .8em; right: .8em; width: 300px; max-height: calc(100% - 1.6em); overflow-y: auto; background: rgba(20,15,11,.96); border: 1px solid var(--bord-or); border-radius: 10px; padding: .8em; box-shadow: var(--ombre); }
.carte-info img { max-width: 100%; border-radius: 6px; } .carte-info .fermer { position: absolute; top: .3em; right: .3em; }
.carte-legende { position: absolute; left: .8em; bottom: .6em; font: .8rem var(--titre); color: var(--or-clair); text-shadow: 0 1px 3px #000; pointer-events: none; }
.vide-grand { display: grid; place-content: center; text-align: center; height: 100%; min-height: 300px; padding: 2em; }

/* ------------------------------------------------ Bâtiments, galerie, notes */
.plan { overflow: auto; background: #0f0b08; border: 1px solid var(--bord); border-radius: 8px; padding: .5em; max-height: 70vh; } .plan svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8em; margin-top: 1em; }
.galerie figure { margin: 0; border: 1px solid var(--bord); border-radius: 8px; overflow: hidden; background: #120e0a; }
.galerie img { width: 100%; height: 170px; object-fit: cover; display: block; cursor: zoom-in; } .galerie figcaption { padding: .4em .6em; font-size: .85rem; display: grid; gap: .2em; } .galerie small { color: var(--muet); }
.note-texte { min-height: 50vh; font-size: 1rem; line-height: 1.6; } .detail-col > input { margin-bottom: .5em; }
.grille-regles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2em; }
.def dt { font-weight: 700; color: var(--or-clair); margin-top: .4em; } .def dd { margin: 0 0 0 .8em; color: var(--texte-doux); font-size: .92rem; }
.grille-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6em; } .grille-actions div { border: 1px solid var(--bord); border-radius: 6px; padding: .4em .6em; } .grille-actions small { display: block; color: var(--texte-doux); }
.onglets-groupe { display: flex; gap: .3em; flex-wrap: wrap; margin-bottom: .8em; } .onglets-groupe button { background: #1a140f; border: 1px solid var(--bord); color: var(--texte-doux); padding: .4em .9em; border-radius: 6px; cursor: pointer; font: 600 .95rem var(--titre); } .onglets-groupe button.actif { border-color: var(--or); color: var(--or-clair); box-shadow: 0 0 10px rgba(212,174,90,.25); }

/* ------------------------------------------------ Adaptation écrans */
@media (max-width: 1400px) { .app { grid-template-columns: auto 1fr 320px; } .nav-laterale { width: 64px; } .nav-laterale .lib { display: none; } .nav-laterale button { justify-content: center; } .kpis { grid-template-columns: repeat(3, 70px); } }
@media (max-width: 1100px) { .grille-caracs { grid-template-columns: repeat(3, 1fr); } .grille-4 { grid-template-columns: 1fr 1fr; } .fiche-tete { grid-template-columns: 90px 1fr; } .kpis { grid-column: 1 / -1; grid-template-columns: repeat(auto-fill, 74px); } .portrait { width: 90px; height: 110px; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 58px auto 1fr 45vh; grid-template-areas: "haut" "nav" "vue" "journal"; }
  .nav-laterale { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--bord); } .journal { border-left: 0; border-top: 1px solid var(--bord-or); }
  .deux-col, .maitre-detail, .carte-layout { grid-template-columns: 1fr; } .liste-col { position: static; max-height: none; } .scene-joueur { flex-direction: column; } .scene-joueur img { width: 100%; }
  .actions-haut .role { display: none; } .titre-campagne small { max-width: 40vw; }
}

/* ------------------------------------------------ Lancer de dés animé */
.lancer-zone { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
.lancer-zone::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(255,90,42,.16), transparent 55%); animation: fondu .3s; }
.lancer-zone.out { transition: opacity .5s; opacity: 0; }
.de-volant { position: absolute; left: 0; top: 0; width: 80px; height: 80px; will-change: transform; filter: drop-shadow(0 10px 14px rgba(0,0,0,.7)); }
.de-volant svg { width: 100%; height: 100%; }
.de-volant svg > polygon:first-child, .de-volant svg > rect { fill: url(#none); fill: #3a2212; stroke: var(--or); stroke-width: 3; }
.de-volant .f { fill: #4a2c16; stroke: rgba(240,212,142,.5); stroke-width: 1.5; } .de-volant .l { fill: none; stroke: rgba(240,212,142,.45); stroke-width: 1.5; }
.de-volant span { position: absolute; inset: 0; display: grid; place-items: center; font: 900 1.7rem var(--titre); color: var(--or-clair); text-shadow: 0 2px 4px #000; padding-top: 4px; }
.de-volant.f4 span { padding-top: 26px; font-size: 1.4rem; }
.de-volant.pose { filter: drop-shadow(0 0 16px rgba(255,170,80,.55)) drop-shadow(0 8px 10px rgba(0,0,0,.7)); }
.de-volant.pose span { animation: frappe .35s ease-out; }
.de-volant.crit svg > polygon:first-child { stroke: #fff3c4; fill: #6a4a10; } .de-volant.crit.pose { filter: drop-shadow(0 0 28px #ffd75e); }
.de-volant.fumble svg > polygon:first-child { stroke: #ff5a2a; fill: #3a0d06; } .de-volant.fumble span { color: #ff8a6a; }
.de-volant.ecarte.pose { opacity: .35; filter: grayscale(1); }
.lancer-zone.secret .de-volant svg > polygon:first-child, .lancer-zone.secret .de-volant svg > rect { stroke: #b48cff; fill: #24183a; }
@keyframes frappe { 0% { transform: scale(1.8); } 100% { transform: scale(1); } }
.lancer-bandeau { position: absolute; left: 50%; top: calc(42% + 70px); transform: translate(-50%, 10px); opacity: 0; transition: all .35s; display: flex; align-items: center; gap: .8em; padding: .5em 1.2em; border-radius: 99px; background: rgba(15,11,8,.92); border: 1px solid var(--bord-or); box-shadow: var(--ombre), 0 0 30px rgba(255,90,42,.25); white-space: nowrap; font-size: 1.05rem; }
.lancer-bandeau.visible { opacity: 1; transform: translate(-50%, 0); }
.lancer-bandeau strong { font: 900 2rem var(--titre); color: #fff3c4; text-shadow: 0 0 14px var(--or); }
.lancer-bandeau em { font: 700 .9rem var(--titre); color: var(--or-clair); } .lancer-bandeau em.rate { color: #ff8a6a; }
.lancer-bandeau small.equite { color: var(--muet); font-size: .75rem; } .lancer-bandeau small.secret { color: #cdb8ff; }
.sceau-equite { color: var(--or-sombre); cursor: help; font-size: .85rem; }
.badge-type { border-color: #7a4a20; color: #ffc89a; }
.appliquer { margin: -.25em 0 .1em .6em; }

/* Équité des dés */
.empreinte { background: #0b0806; border: 1px solid var(--bord-or); border-radius: 8px; padding: .6em .8em; margin: .8em 0; } .empreinte small { display: block; color: var(--muet); }
.empreinte code { display: block; word-break: break-all; background: none; padding: .3em 0 0; font-size: .85rem; }
.histo { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; align-items: end; height: 150px; padding: .4em; background: #0b0806; border: 1px solid var(--bord); border-radius: 8px; }
.histo div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.histo span { width: 100%; background: linear-gradient(var(--or), var(--or-sombre)); border-radius: 3px 3px 0 0; min-height: 2px; }
.histo span.crit { background: linear-gradient(#fff3c4, var(--or)); } .histo span.fumble { background: linear-gradient(#ff7a5a, var(--rouge)); }
.histo small { font-size: .65rem; color: var(--muet); }
.ok { color: #b8e09c; } .ko { color: #ffb3a0; } b.crit { color: #ffd75e; } code.petit { font-size: .75rem; }

/* Étiquettes de monstres (bloc de statistiques) */
.etiquette { max-width: 560px; background: linear-gradient(#f4e9cf, #e8d7b0); color: #2a1a0c; border-radius: 6px; padding: .8em 1em; box-shadow: 0 0 0 3px #6b2416, 0 0 0 5px #c9a54a, var(--ombre); font-size: .95rem; }
.etiquette header h3 { color: #6b1a0e; font: 900 1.6rem var(--titre); margin: 0; font-variant: small-caps; letter-spacing: .02em; }
.etiquette .sous { font-style: italic; margin: 0; color: #4a3020; }
.etiquette .trait { height: 4px; margin: .5em 0; background: linear-gradient(90deg, #8a1e10, #8a1e10 70%, transparent); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.etiquette p { margin: .2em 0; } .etiquette b { color: #6b1a0e; } .etiquette h4 { font: 700 1.05rem var(--titre); color: #6b1a0e; border-bottom: 1px solid #8a1e10; margin: .7em 0 .3em; }
.et-caracs { display: grid; grid-template-columns: repeat(6, 1fr); text-align: center; gap: .2em; }
.et-caracs button { background: none; border: 1px solid transparent; border-radius: 6px; font: inherit; color: #2a1a0c; cursor: pointer; display: flex; flex-direction: column; align-items: center; padding: .2em 0; }
.et-caracs button:hover:not(:disabled) { border-color: #8a1e10; background: #fff6; } .et-caracs small { font: 700 .75rem var(--titre); color: #6b1a0e; } .et-caracs span { font-size: .85rem; }
.et-att { display: flex; justify-content: space-between; gap: .5em; align-items: flex-start; } .et-att span { white-space: nowrap; }
.etiquette .btn-mini { background: #fff8; color: #4a2010; border-color: #b89a5e; } .etiquette small { color: #6a5236; }
.modal .etiquette { margin: 0 auto; }
.defenses { color: #ffc89a; }
.grande-vignette { width: 140px; height: 140px; margin: 0 auto 1em; font-size: 3rem; }
.carte-outils .btn-mini.actif { border-color: var(--rouge-vif); color: #fff; background: rgba(255,90,42,.25); }
.carte-outils input[type=color] { width: 34px; height: 30px; padding: 2px; }
.carte-outils label.petit { display: flex; align-items: center; gap: .25em; color: var(--texte-doux); }
body.impression { background: #fff; display: flex; flex-wrap: wrap; gap: 1.2em; padding: 1em; }
body.impression .etiquette { width: calc(50% - .6em); max-width: none; break-inside: avoid; box-shadow: 0 0 0 2px #6b2416; }
@media print { body.impression { padding: 0; } body.impression .etiquette { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Scènes préparées */
.scenes-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .7em; }
.scene-carte { display: grid; grid-template-columns: 90px 1fr; gap: .7em; padding: .5em; border: 1px solid var(--bord-or); border-radius: 8px; background: #120e0a; }
.scene-carte img, .scene-vide { width: 90px; height: 70px; object-fit: cover; border-radius: 6px; display: grid; place-items: center; background: #1f1812; font-size: 1.6rem; }
.scene-carte small { display: block; color: var(--muet); } .scene-carte .ligne-boutons { margin: .3em 0 0; }
.scene-carte.jouee { opacity: .6; border-color: var(--bord); } .scene-carte.active { border-color: var(--rouge-vif); box-shadow: 0 0 16px rgba(255,90,42,.35); }
.carte-info blockquote { font-size: .95rem; }

/* ================================================================
   MISE EN PAGE « UNE SEULE PAGE » (remplace la grille plein écran)
   La page défile normalement à la molette ; en-tête et onglets restent visibles.
   ================================================================ */
:root { --haut: 58px; --onglets: 50px; }
.app { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto auto 1fr; grid-template-areas: "haut haut" "nav nav" "vue journal"; height: auto; min-height: 100vh; overflow: visible; }
.barre-haut { position: sticky; top: 0; z-index: 30; height: var(--haut); }
.nav-laterale { grid-area: nav; position: sticky; top: var(--haut); z-index: 25; width: auto; height: var(--onglets); flex-direction: row; align-items: center; gap: .2em; padding: 0 .8em; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--bord-or); background: rgba(18,14,10,.96); backdrop-filter: blur(6px); scrollbar-width: thin; }
.nav-laterale button { flex: none; padding: .4em .75em; border-radius: 6px 6px 0 0; }
.nav-laterale button.actif { box-shadow: inset 0 -3px 0 var(--rouge-vif); background: linear-gradient(0deg, rgba(212,174,90,.18), transparent); }
.nav-laterale .lib { display: inline !important; }
.vue { overflow: visible; padding: 1em 1.2em 4em; min-width: 0; }
.journal { position: sticky; top: calc(var(--haut) + var(--onglets)); height: calc(100vh - var(--haut) - var(--onglets)); align-self: start; }
.liste-col, .carte-liste { position: static; max-height: none; overflow: visible; }
.carte-layout { height: auto; }
.carte-principale { height: min(78vh, 900px); min-height: 420px; }
.carte-joueur .carte-principale { height: min(74vh, 860px); }
.bouton-journal { display: none; }

/* Plein écran de la carte */
.carte-principale:fullscreen { height: 100vh; border-radius: 0; background: #0e0b09; }
.carte-aide { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(10,8,6,.85); color: var(--or-clair); border: 1px solid var(--bord-or); padding: .6em 1.1em; border-radius: 99px; pointer-events: none; opacity: 0; transition: opacity .25s; font-size: .95rem; white-space: nowrap; }
.carte-aide.visible { opacity: 1; }

@media (max-width: 1250px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "haut" "nav" "vue"; }
  .journal { position: fixed; top: 0; right: 0; bottom: 0; height: 100vh; width: min(420px, 100vw); z-index: 60; transform: translateX(105%); transition: transform .25s ease; box-shadow: -10px 0 40px rgba(0,0,0,.6); }
  body.journal-ouvert .journal { transform: none; }
  .bouton-journal { display: flex; position: fixed; right: 14px; bottom: 14px; z-index: 55; align-items: center; gap: .4em; padding: .7em 1em; border-radius: 99px; border: 1px solid var(--or); background: linear-gradient(#b48a3a, #7a5a1e); color: #1a1007; font: 700 .95rem var(--titre); box-shadow: 0 6px 24px rgba(0,0,0,.6), 0 0 18px rgba(255,90,42,.3); cursor: pointer; }
  .bouton-journal .pastille-nb { background: var(--rouge); color: #fff; border-radius: 99px; padding: 0 .45em; font: 700 .75rem var(--corps); }
  .journal .fermer-journal { display: inline-block !important; }
}
.journal .fermer-journal { display: none; float: right; }
@media (max-width: 900px) {
  :root { --haut: 52px; --onglets: 46px; }
  .app { grid-template-rows: auto auto 1fr; grid-template-areas: "haut" "nav" "vue"; }
  .nav-laterale { width: auto; flex-direction: row; border-bottom: 1px solid var(--bord-or); }
  .nav-laterale .lib { font-size: .85rem; }
  .vue { padding: .7em .6em 5em; }
  .panneau { padding: .8em; }
  .barre-haut { padding: 0 .6em; } .titre-campagne h1 { font-size: 1rem; } .sceau { font-size: 1.3rem; }
  .actions-haut .btn { padding: .35em .6em; font-size: .8rem; }
  .carte-principale, .carte-joueur .carte-principale { height: 70vh; min-height: 340px; }
  .kpis { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .grille-caracs { grid-template-columns: repeat(3, 1fr); }
  .competences { grid-template-columns: 1fr; }
  .grille-4 { grid-template-columns: 1fr 1fr; }
  .table { font-size: .85rem; } .table-defile { overflow-x: auto; }
  .modal { max-height: 94vh; } .modal-fond { padding: .4em; }
  .lancer-bandeau { font-size: .9rem; white-space: normal; width: 92vw; justify-content: center; flex-wrap: wrap; }
  .de-volant { width: 60px; height: 60px; } .de-volant span { font-size: 1.3rem; }
}
@media (max-width: 560px) {
  .grille-4, .deux-col { grid-template-columns: 1fr; }
  .fiche-tete { grid-template-columns: 70px 1fr; } .portrait { width: 70px; height: 86px; }
  .nom-perso { font-size: 1.2rem; }
  .identite-ligne input { width: 100%; } .identite-ligne label { width: 100%; }
  .actions-haut .role { display: none; }
  .titre-campagne small { display: none; }
}
