@font-face{font-family:AtlasRoman;src:local("Palatino Linotype"),local("Palatino"),local("Book Antiqua");font-display:swap}
:root{color-scheme:dark;--ink:#111c19;--panel:#17231f;--gold:#d6b77a;--line:#756345;--ivory:#eee4c9;--muted:#b9b7a2;--serif:AtlasRoman,Georgia,serif;--sans:"Segoe UI",Arial,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--ivory);font-family:var(--serif);height:100dvh;min-height:300px;display:flex;flex-direction:column;overflow:hidden}button,input,select{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none}button:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:2px solid #f8d896;outline-offset:-3px}button:hover{color:#fff4cf}button:disabled{cursor:default;opacity:.48}svg:not(.defs){width:19px;height:19px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.45;flex:none}.defs,.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}.mast{flex:0 0 72px;display:flex;align-items:center;gap:22px;padding:0 clamp(14px,2.4vw,42px);background:linear-gradient(100deg,#12201d,#101a18 68%,#17221e);border-bottom:1px solid #967747;z-index:6}
.brand{display:flex;align-items:center;gap:11px;padding:0;color:var(--gold);text-transform:uppercase;letter-spacing:.15em;font-size:clamp(23px,2.25vw,35px);line-height:1}.brand img{width:43px;height:43px}.brand span{margin-top:3px}.sub{text-transform:uppercase;letter-spacing:.19em;font-size:clamp(9px,.78vw,13px);color:var(--gold);border-left:1px solid #806c46;padding:6px 0 6px 20px;font-weight:600}.mast nav{display:flex;align-self:stretch;gap:22px;margin-left:auto}.mast nav button{font-size:16px;position:relative;padding:0 2px;color:#cec8b1;white-space:nowrap}.mast nav .active{color:#ecd39b}.mast nav .active:after{content:"";position:absolute;bottom:14px;left:0;right:0;height:1px;background:#caa768}
.find{position:relative;width:clamp(180px,18vw,280px);height:37px;border:1px solid #6f6246;border-radius:3px;background:#0e1916;display:flex;align-items:center;padding:0 9px;gap:8px;color:var(--gold)}.find svg{width:16px;height:16px}.find input{width:100%;min-width:0;background:none;border:0;color:var(--ivory);outline:0;font-family:var(--serif);font-size:14px;height:100%}.find input::placeholder{color:#b4aa91;font-style:italic}.find kbd{font:11px var(--sans);border:1px solid #5c5746;padding:0 4px;border-radius:2px;color:#b4aa91}.popup,.floating,.drawer,.tooltip{background:linear-gradient(125deg,rgba(27,38,31,.98),rgba(12,23,20,.98));color:var(--ivory);border:1px solid #897449;box-shadow:0 4px 18px #070c0960;border-radius:3px}
main{position:relative;flex:1;min-height:0;overflow:hidden;background:#1a3533}canvas{position:absolute;width:100%;height:100%;inset:0;touch-action:none;cursor:grab;display:block}canvas.drag{cursor:grabbing}.frame{position:absolute;inset:4px;pointer-events:none;border:1px solid #b49a63;outline:1px solid #372e1a;box-shadow:inset 0 0 0 2px #342d22a6,inset 0 0 0 3px #d6bc8090}.frame i{position:absolute;width:31px;height:31px;border-left:3px double #d5b97b;border-top:3px double #d5b97b;color:#6f562a;filter:drop-shadow(0 1px 1px #17140b)}.frame i:before{content:"❧";font-size:24px;line-height:21px;position:absolute;top:-1px;left:0;color:#e1c28c;transform:rotate(-35deg)}.frame i:nth-child(1){top:0;left:0}.frame i:nth-child(2){top:0;right:0;transform:rotate(90deg)}.frame i:nth-child(3){bottom:0;right:0;transform:rotate(180deg)}.frame i:nth-child(4){bottom:0;left:0;transform:rotate(270deg)}
.territories{position:absolute;top:22px;left:22px;min-width:144px}.territories>button,.key-wrap>button{display:flex;align-items:center;justify-content:center;gap:10px;height:41px;padding:0 14px;letter-spacing:.02em}.territories>button{width:100%;justify-content:space-between}.territories svg,.key-wrap svg,.tools svg{color:var(--gold);width:17px;height:17px}.chev{width:13px!important}#realm-menu{border-top:1px solid #605640;padding:5px}#realm-menu button{width:100%;text-align:left;padding:7px 8px;display:flex;align-items:center;gap:10px}#realm-menu button:hover,.results button:hover,.entry:hover,.entry:focus-visible{background:#b6a4731c}#realm-menu i,.realm-dot{width:9px;height:9px;display:inline-block;transform:rotate(45deg);border:1px solid #dfce9770}
.wind{position:absolute;top:26px;right:27px;display:grid;justify-items:center;width:82px;line-height:.85;color:#f2d495;font-size:16px;text-shadow:0 1px 4px black;pointer-events:none}.wind img{width:100%;filter:drop-shadow(0 1px 2px #282317)}.wind span:last-child{font-size:11px}
.key-wrap{position:absolute;left:22px;bottom:22px}.legend{padding:17px 18px 13px;width:242px;margin-bottom:8px}.legend h2,.drawer h2{font-weight:400;margin:0 0 13px}.legend h2{font-size:23px}.legend p{display:flex;align-items:center;gap:12px;font:13px var(--sans);margin:9px 0;color:#ddd8c5}.sig{width:26px;display:inline-flex;justify-content:center;color:#e5c486}.sig.road,.sig.water,.sig.border,.sig.contested{height:0;border-top:2px solid #c28354}.sig.water{border-color:#74aab1}.sig.border{border-top:2px dashed #c5ae81}.sig.contested{border-top:2px dotted #b56f55}.sig.city{font-size:10px}.legend-actions{border-top:1px solid #695c42;margin-top:14px;padding-top:9px}.legend-actions label{display:block;font:12px/1.9 var(--sans)}input[type=checkbox]{accent-color:#c4a361;vertical-align:middle}.text-action{font:13px var(--sans);color:var(--gold);padding:8px 0}.text-action span{margin-left:8px}
.tools{position:absolute;right:22px;bottom:22px;display:flex;flex-direction:column;align-items:center;padding:2px}.tools button,.close{display:grid;place-items:center;width:37px;height:37px}.tools button:hover,.close:hover,.key-wrap button:hover,#realm-toggle:hover{background:#c3a77522}.tools span{width:22px;height:1px;background:#6c5a3a;margin:2px 0}.tooltip{position:absolute;pointer-events:none;padding:5px 9px;white-space:nowrap;font-size:13px}
footer{height:32px;flex:none;display:flex;align-items:center;gap:10px;padding:0 23px;background:#121e1a;border-top:1px solid #5d5039;color:#c5c1ac;font:11px var(--sans);letter-spacing:.035em}.spacer{flex:1}.status-dot{width:5px;height:5px;background:#c6a867;transform:rotate(45deg)}.foot-rule{height:10px;width:1px;background:#655e47}.scale-bar{display:inline-block;width:50px;height:5px;border:1px solid #af9c75;border-top:0}.scale-bar:before{content:"";display:block;width:50%;height:4px;background:#9a8964}footer button{color:var(--gold);border:1px solid #7f7252;border-radius:50%;font:italic 12px Georgia;width:17px;height:17px;padding:0;margin-left:4px}
.drawer{position:absolute;right:18px;top:18px;width:min(348px,calc(100% - 36px));max-height:calc(100% - 36px);overflow:auto;scrollbar-color:#716346 #17231f;z-index:3}.close{position:sticky;float:right;margin-bottom:-40px;top:7px;right:7px;margin-right:7px;margin-top:7px;background:#15241eeb;border:1px solid #8974498c;border-radius:50%;z-index:2;width:30px;height:30px}.close svg{width:15px;height:15px}#contents{padding:23px 22px 20px}.drawer .plate-banner{display:grid;place-items:center;margin:-23px -22px 18px;background:radial-gradient(ellipse,#e3d2aa 20%,#ab936a);height:164px;border-bottom:2px double #c8ac73;overflow:hidden}.plate-banner img{height:100%;max-width:100%;object-fit:contain}.plate-banner.region img{width:100%;height:100%;object-fit:cover}.drawer h2{font-size:30px;line-height:1.12;letter-spacing:.01em;color:#f2e3c0;padding-right:20px;margin-bottom:10px}.drawer h3{color:var(--gold);font-size:16px;font-weight:normal;margin:17px 0 7px}.drawer p{font-size:15px;line-height:1.5;margin:9px 0;color:#e0ddca}.drawer .meta,.drawer .small,.source,.drawer .no-results{font:12px/1.55 var(--sans);color:var(--muted)}.meta{text-transform:uppercase;letter-spacing:.11em;margin-bottom:6px!important}.source{border-top:1px solid #645b42;padding-top:12px;margin-top:15px}.source b{display:block;color:var(--gold);font-weight:500}.primary{margin-top:14px;padding:9px 13px;border:1px solid #a68e60;background:#b29b6620;color:#f3dfad;font-size:15px}.primary:hover{background:#b29b6638}.entry{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;gap:10px;border-bottom:1px solid #6c644033;padding:9px 2px;color:#eadcb9}.entry small{font:11px var(--sans);color:var(--muted);text-align:right}.filters{display:flex;gap:7px;margin:14px 0}.filters select,.index-input{width:100%;padding:7px 6px;background:#101d19;color:var(--ivory);border:1px solid #75684b;border-radius:2px;font:13px var(--sans)}.index-input{margin:5px 0}.results{position:absolute;top:calc(100% + 8px);right:0;min-width:100%;width:300px;max-height:min(60vh,380px);overflow:auto;padding:6px}.results button{padding:9px;width:100%;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:10px}.results small{font:11px var(--sans);color:var(--muted)}.results p{padding:0 8px;font:13px var(--sans)}.drawer details{margin-top:12px;font:13px var(--sans);color:#c5bea8}.drawer summary{cursor:pointer;color:var(--gold)}.drawer-open .wind,.drawer-open .tools{right:min(390px,34vw)}.drawer-open .wind{display:none}.drawer ul{padding-left:19px;font-size:14px;line-height:1.5}
@media(max-width:940px){.mast{gap:14px}.sub{max-width:135px;line-height:1.5;padding-left:13px}.mast nav{gap:15px}.brand{font-size:25px}.find{width:185px}.wind{width:66px}.mast nav button{font-size:14px}}
@media(max-width:700px){.mast{height:89px;flex-basis:89px;display:grid;grid-template-columns:1fr auto;grid-template-rows:40px 36px;gap:2px 8px;padding:5px 12px 6px}.brand{justify-self:start;font-size:21px;gap:6px}.brand img{width:30px;height:30px}.sub{display:none}.mast nav{grid-row:1;grid-column:2;gap:13px;margin:0}.mast nav .active:after{bottom:2px}.find{grid-row:2;grid-column:1/-1;width:100%;height:32px}.find input{font-size:16px}.results{width:100%;z-index:8}.find kbd{display:none}.territories{top:13px;left:13px;min-width:118px}.territories>button,.key-wrap>button{height:38px;padding:0 10px;font-size:14px}.key-wrap{bottom:13px;left:13px}.wind{width:50px;top:15px;right:16px}.tools{right:13px;bottom:13px}.tools button{width:36px;height:36px}footer{font-size:10px;padding:0 12px;height:28px;gap:7px}.frame{inset:3px}.drawer{top:auto;right:8px;bottom:8px;width:calc(100% - 16px);max-height:55%;box-shadow:0 -6px 22px #0e16167a}.drawer .plate-banner{float:left;width:83px;height:80px;margin:0 12px 7px 0;border:1px solid #887551}.drawer #contents{padding:16px}.drawer .plate-banner~.source{clear:both}.drawer h2{font-size:24px}.drawer-open .tools,.drawer-open .key-wrap{visibility:hidden}.drawer-open .wind{display:grid;right:16px}.drawer .meta{padding-right:24px;font-size:10px}.scale-bar{max-width:62px}.legend{max-height:calc(100dvh - 210px);overflow:auto}}
@media(max-height:470px) and (orientation:landscape){.mast{flex-basis:42px}.wind{width:40px}.tools{flex-direction:row}.drawer{max-height:calc(100% - 16px);top:8px;right:8px;bottom:auto}.key-wrap{bottom:10px}.legend{max-height:48vh;overflow:auto}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Fil du récit */
.tabs{display:flex;gap:4px;margin:6px 0 10px;border-bottom:1px solid #6b5a3c55}
.tabs button{background:none;border:0;border-bottom:2px solid transparent;color:inherit;font:inherit;padding:6px 10px;cursor:pointer;opacity:.75}
.tabs button[aria-selected="true"]{border-bottom-color:#d8b46a;opacity:1}
.tome-switch{display:flex;gap:8px;align-items:flex-start;font-size:.82em;opacity:.85;margin:0 0 10px;cursor:pointer}
.recit-list h3{margin:16px 0 4px}
.carton{font-style:italic;opacity:.85;border-left:2px solid #b8924f;padding-left:10px}
.pov .link{background:none;border:0;padding:0;color:#e6c47a;font:inherit;text-decoration:underline;cursor:pointer}
.chapter-nav{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;margin:16px 0 6px}

/* Encyclopédie */
.encyclo h3{margin:18px 0 6px}
.theme-bar{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 8px}
.chip{background:#2a2a22;border:1px solid #6b5a3c88;color:inherit;border-radius:10px;padding:1px 8px;font:inherit;font-size:.76em;cursor:pointer}
.chip.on{background:#6b5a3c;border-color:#d8b46a}
.fact{border-left:2px solid #6b5a3c66;padding:2px 0 2px 10px;margin:8px 0}
.fact p{margin:3px 0}
.fact-head{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.badge{font-size:.68em;text-transform:uppercase;letter-spacing:.06em;border-radius:3px;padding:1px 5px;background:#3c4a3a}
.badge.témoignage{background:#5a4630}
.badge.état{background:#5a2e2a}
.alerts summary{color:#e3b26a}
.registre p{margin:5px 0}

/* Vues d'artiste */
.concept{margin:14px 0}
.concept img{width:100%;border:1px solid #6b5a3c;cursor:zoom-in;display:block}
.concept figcaption{font-size:.74em;opacity:.8;margin-top:4px}
.lightbox{position:fixed;inset:0;z-index:50;background:#0b1210ee;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:zoom-out;padding:24px}
.lightbox img{max-width:96vw;max-height:86vh;border:1px solid #8b7350}
.lightbox p{color:#d8c9a2;font-size:.85em;max-width:900px;text-align:center}

/* États selon la période */
.periode{display:flex;gap:8px;align-items:center;margin:6px 0;font-size:.85em}
.periode select{background:#1c1f1a;color:inherit;border:1px solid #6b5a3c;padding:2px 4px;font:inherit}
.etat{border:1px solid #6b5a3c;padding:6px 10px;margin:10px 0;background:#ffffff08}
.etat p{margin:3px 0}
.etat.ruine{border-color:#8a3b2e;background:#8a3b2e22}
.etat.occupe{border-color:#7a5a8a}
