/* Nuibie — thème sombre ajusté */
:root{
 --ink:#e7e7e7;--blue:#8bb9e8;--line:#383838;--paper:#202020;--muted:#a6a6a6;
 --bg:#181818;--surface:#202020;--surface-2:#292929;--max:1240px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--ink);font-family:Arial,Helvetica,sans-serif;line-height:1.65}
a{color:inherit}
.site-header{background:#0d0d0d;border-bottom:1px solid #292929}
.header-inner{width:min(calc(100% - 48px),var(--max));min-height:112px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:36px}
.brand{display:block;flex:0 1 250px;line-height:0}
.brand img{display:block;width:100%;height:auto;max-height:94px;object-fit:contain}
.nav{display:flex;align-items:center;gap:clamp(12px,2vw,30px)}
.nav a{text-decoration:none;font-size:15px;font-weight:700;white-space:nowrap;padding:12px 0 10px;border-bottom:3px solid transparent;transition:filter .15s,color .15s}
.nav a:nth-child(1){color:#FAC318}
.nav a:nth-child(2){color:#ff7a18}
.nav a:nth-child(3){color:#c45cff}
.nav a:nth-child(4){color:#38bdf8}
.nav a:nth-child(5){color:#f04ca8}
.nav a:hover,.nav a[aria-current=page]{filter:brightness(1.2);border-bottom-color:currentColor}
.menu-toggle{display:none;background:#242424;border:1px solid #414141;border-radius:8px;padding:10px 13px;color:var(--ink);font-size:15px}
main{width:min(calc(100% - 48px),var(--max));margin:0 auto;min-height:calc(100vh - 190px)}
.legal{max-width:820px;margin:24px auto 64px;background:var(--surface);padding:32px;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 36px rgba(0,0,0,.2)}
h1{font-size:clamp(30px,4vw,42px);line-height:1.2;margin:0 0 32px;color:#e7e7e7}
h2{font-size:20px;margin:34px 0 10px;color:#d7d7d7}
p{margin:0 0 14px}
ul{padding-left:22px;margin:8px 0 16px}
.site-footer{border-top:1px solid #292929;background:#0d0d0d}
.footer-inner{width:min(calc(100% - 48px),var(--max));margin:auto;min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:20px;color:#a6a6a6;font-size:14px}
.site-footer a{text-decoration:none;color:#d0d0d0}
.site-footer a:hover{text-decoration:underline}
.home-welcome{width:calc(100% - 32px);max-width:none;margin:34px auto 28px;text-align:center}
.home-welcome h1{margin:0;width:100%;white-space:nowrap;font-size:clamp(12px,4vw,54px);line-height:1.15;color:#e7e7e7}
@media(min-width:1500px){.header-inner{min-height:132px}.brand{flex-basis:290px}.nav a{font-size:16px}.legal{max-width:900px}}
@media(max-width:900px){.header-inner{min-height:94px}.brand{flex-basis:210px}.nav{gap:16px}.nav a{font-size:14px}}
@media(max-width:700px){
 .header-inner{width:calc(100% - 32px);min-height:82px;position:relative}
 .brand{flex-basis:180px}.brand img{max-height:70px}
 .menu-toggle{display:block}
 .nav{display:none;position:absolute;z-index:5;top:calc(100% - 1px);left:-16px;right:-16px;background:#0d0d0d;border-top:1px solid #292929;border-bottom:1px solid #292929;padding:10px 24px 18px;align-items:stretch;gap:0;flex-direction:column}
 .nav.is-open{display:flex}
 .nav a{padding:11px 0;border-bottom:1px solid #292929}
 main{width:calc(100% - 32px)}
 .legal{margin:20px auto 40px;padding:22px 18px;border-radius:8px}
 h1{margin-bottom:26px}
 h2{font-size:18px;margin-top:28px}
 .footer-inner{width:calc(100% - 32px);padding:18px 0;align-items:flex-start;flex-direction:column;gap:4px}
 .home-welcome{margin:24px auto 22px;padding:0 8px}
}

@media screen and (min-width:1200px){
 .home-welcome{width:80vw;max-width:80vw;padding:0;margin-left:auto;margin-right:auto}
}

.home-welcome h1{visibility:hidden}
.home-welcome h1.is-fitted{visibility:visible}

/* Page Présentation */
.presentation h1{color:#ff7a18}


/* Liens vers les séries */
.presentation a.series-link{color:#ff7a18;font-weight:700;text-decoration:none}
.presentation a.series-link:hover{text-decoration:underline}

/* Fiches personnages */
.characters-section{max-width:900px;margin:0 auto 64px;background:var(--surface);padding:32px;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 36px rgba(0,0,0,.2)}
.characters-section h2{margin:0 0 24px;color:#e7e7e7;font-size:28px}
.character-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px}
.character-card{display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 8px;background:#1b1b1b;border:1px solid #383838;border-radius:10px;color:#e7e7e7;font:inherit;cursor:pointer;transition:border-color .15s,transform .15s}
.character-card:hover,.character-card:focus-visible{border-color:#ff7a18;transform:translateY(-3px);outline:none}
.character-card img{display:block;width:100%;max-width:132px;aspect-ratio:1;object-fit:cover;border-radius:8px}
.character-card span{font-weight:700;text-align:center}
.character-modal{position:fixed;inset:0;z-index:1000;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(0,0,0,.78)}
.character-modal.is-open{display:flex}
.character-modal-panel{position:relative;width:min(100%,520px);max-height:min(90vh,760px);overflow:auto;background:#222;border:1px solid #444;border-radius:14px;padding:32px;text-align:center;box-shadow:0 20px 70px rgba(0,0,0,.55)}
.character-modal-close{position:absolute;top:10px;right:12px;width:40px;height:40px;border:0;border-radius:50%;background:#333;color:#fff;font-size:28px;line-height:1;cursor:pointer}
.character-modal-close:hover{background:#ff7a18;color:#111}
.character-modal-panel img{width:min(48%,190px);height:auto;border-radius:10px;margin:8px auto 16px}
.character-modal-panel h2{margin:0 0 12px;color:#ff7a18;font-size:28px}
.character-modal-panel p{color:#c8c8c8;margin:0}
body.modal-open{overflow:hidden}
@media(max-width:800px){.character-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.characters-section{margin:0 auto 40px;padding:22px 18px}.character-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.character-card img{max-width:120px}.character-modal-panel{padding:28px 20px}}

/* Ajustements de la page Présentation */
.presentation.legal{margin-bottom:16px}
.characters-section h2{color:#ff7a18}

/* Contenu des fiches personnages */
.character-modal-content{text-align:left;color:#dedede;line-height:1.6}
.character-modal-content p{margin:0 0 9px}
.character-modal-content .character-bio{margin-top:16px}
.character-modal-content strong{color:#ff7a18}
.character-modal-panel h2{text-align:center}

.character-inline-link{color:#ff7a18;text-decoration:underline;text-decoration-color:rgba(255,122,24,.55);font-weight:700}
.character-inline-link:hover{color:#ffa45f}
.character-modal-content .character-relations{margin-top:16px}
