:root{
  --bg:#0D0624;
  --bg2:#0D0624;
  --paper:#ffffff;
  --paper2:#f7f2ea;
  --ink:#130b2b;
  --muted:#5d3717;
  --accent:#ff821c;
  --accent2:#f66411;
  --line:rgba(19,11,43,.18);
  --shadow: 0 10px 40px rgba(0,0,0,.35);
  --radius: 22px;
  --max: 980px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Merriweather", Georgia, serif;
  background: var(--bg);
  color: var(--ink);
  background:#0D0624;
}

a{color:inherit}

.bg{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:200vh; /* augmente si tu veux que l'image dure plus longtemps */
  z-index:-1;
  pointer-events:none;

  /* image par défaut (toutes les pages) */
  background-image:url("../images/bg-default.png");
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center top;

  filter:saturate(.9) contrast(1.05);
}

/* image spécifique HOME */
body.bghome .bg{
  background-image:url("../images/home-bg.png");
}

.home-void{
  flex: 1;
  min-height: 350px; /* ajuste si tu veux plus/moins d’air */
}

/* CTA row */
.home-cta{
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: center;
  padding: 10px 0 20px;
}

.home-cta .btn{
  font-size: 1.0rem;        /* texte plus grand */
  padding: 16px 30px;        /* bouton plus épais */
  border-radius: 999px;      /* garde l'effet capsule */
  min-width: 320px;          /* plus large */
  font-weight: 600;          /* un peu plus affirmé */
}

/* responsive */
@media (max-width: 720px){
  .home-cta{
    flex-direction: column;
    gap: 12px;
  }
  .home-cta .btn{
    width: min(360px, 88vw);
    min-width: unset;
  }
}

.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:40px 18px 120px;
}

.topbar{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:20px 28px;
  min-height:72px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  color:var(--paper);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  margin-bottom:120px;
}

.brand{
  display:flex;
  gap:10px;
  align-items:center;
  letter-spacing:.3px;
}
.brand .sigil{
  width:36px;height:36px;border-radius:12px;
  background: linear-gradient(135deg, rgba(255,130,28,.95), rgba(246,100,17,.85));
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
}
.brand .title{
  font-weight:800;
  font-size:14px;
  line-height:1.1;
}
.brand .subtitle{
  font-weight:300;
  font-size:12px;
  opacity:.9;
}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
}
.nav a{
  text-decoration:none;
  font-size:12px;
  padding:8px 12px;
  border-radius:999px;

  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  position:relative;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.nav a::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:6px;
  height:1px;
  background: rgba(255,255,255,.75);
  transform: scaleX(0);
  transform-origin:left;
  transition: transform .2s ease;
  opacity:.0;
}

.nav a:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 10px 22px rgba(0,0,0,.30);
}

.nav a:hover::after{
  transform: scaleX(1);
  opacity:1;
}

.nav a[aria-current="page"]{
  background: rgba(255,130,28,.22);
  border-color: rgba(255,130,28,.55);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(246,100,17,.22);
}

.nav a[aria-current="page"]::after{
  background: rgba(255,130,28,.9);
  transform: scaleX(1);
  opacity:1;
}

.hero{
  margin-top:20px;
  padding:28px 28px;
  border-radius: var(--radius);

  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--paper);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: var(--shadow);
}

.hero h1{
  margin:0 0 10px;
  margin-bottom: 0.5rem;
  padding: 0rem 1,2rem;
  font-size:30px;
  letter-spacing:.2px;
}
.hero p{
  margin:0, 1;
  font-size:14px;
  line-height:1.65;
  color: rgba(255,255,255,.82);
}
.hero .cta{
  margin-top:16px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  text-decoration:none;
  padding:10px 16px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;

  border:1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #ffffff;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: all .25s ease;
}

.btn:hover{
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

.btn.primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #0b061a;

  box-shadow: 0 10px 24px rgba(246,100,17,.28);
}

.btn.primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #0b061a;

  box-shadow: 0 10px 24px rgba(246,100,17,.28);
}


.section{
  margin-top:18px;
  padding:20px 20px 22px;
  border-radius: var(--radius);

  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--paper);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: var(--shadow);
}

.section h2{
  margin:0 0 10px;
  font-size:18px;
}
.muted{
  color: rgba(255,255,255,.78);
  font-size:13px;
  line-height:1.6
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}
.card{
  grid-column: span 4;
  display:flex;
  gap:18px;
  align-items:center;

  padding:14px;
  border-radius:18px;

  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 14px 30px rgba(0,0,0,.35);

  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.card:hover{
  transform: translateY(-3px);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 18px 40px rgba(0,0,0,.45);
}
.card img{
  width:200px;
  height:200px;
  object-fit:cover;
  border-radius:14px;
  flex-shrink:0;

  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}


.card .pad{padding:14px 14px 16px}
.card h3{ color: rgba(255,255,255,.92); }
.card p{
  margin:0;
  font-size:12px;
  line-height:1.6;
  color: rgba(255,255,255,.78);
}
@media (max-width: 920px){
  .card{grid-column: span 6}
}
@media (max-width: 640px){
  .topbar{border-radius:22px; padding:12px 14px}
  .nav{justify-content:flex-start}
  .hero h1{font-size:24px}
  .card{grid-column: span 12}
  .card img{height:200px}
}

/* Episodes list & compilation */
.episode-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}
.episode-item{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:12px 12px;
  border-radius:16px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.episode-date{
  min-width:96px;
  font-size:12px;
  font-weight:800;
  color: rgba(255,255,255,.78);
}
.episode-meta{flex:1}

.episode-meta a{
  font-weight:800;
  text-decoration:none;
  color: rgba(255,255,255,.92);
  position:relative;
  transition: all .2s ease;
}

.episode-meta a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-3px;
  width:0%;
  height:1px;
  background: rgba(255,255,255,.8);
  transition: width .2s ease;
}

.episode-meta a:hover{
  transform: translateY(-2px);
}

.episode-meta a:hover::after{
  width:100%;
}
.episode-meta .summary{
  margin-top:4px;
  font-size:12px;
  line-height:1.6;
  color: rgba(255,255,255,.78);
}


.back-button {
  display: inline-block;
  margin-top : 2 2rem;
  padding: 0.6rem 1.2rem;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  text-decoration: none;
  color: #f6f0e6;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: rgba(0,0,0,0.85);
  transform: translateX(-3px);
}

/* Dépliage des épisodes */

.tools{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.14);
}

.compile{
  margin-top:14px;
  padding-top:14px;
  border-top:1px dashed rgba(255,255,255,.22);
}

.compile article{
  padding:14px 12px;
  margin:0 0 12px;
  border-radius:18px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.compile article h3{
  margin:0 0 6px;
  font-size:16px;
}
.compile article .small{
  font-size:12px;
  font-weight:700;
  color: rgba(255,255,255,.72);
  margin-bottom:10px;
}
.compile article .content{
  font-size:13px;
  line-height:1.75;
  color: rgba(255,255,255,.86);
}

/* =========================
   CODEX (tags + filtres)
   ========================= */

.codex-controls{
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.2fr .8fr auto;
  gap: 14px;
  align-items: end;
}

.field label{
  display:block;
  font-size: .82rem;
  font-weight: 700;
  opacity: .9;
  margin-bottom: 6px;
}

.input, .select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;

  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.92);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  outline: none;
}

.input::placeholder{
  color: rgba(255,255,255,.55);
}

.input:focus {
  box-shadow: 0 0 0 3px rgba(255,130,28,.22);
  border-color: rgba(255,130,28,.55);
}

select.select,
.select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-color: rgba(255,255,255,.07);
  color: rgba(255,255,255,.92);
}

/* Menu déroulant (options) — support variable selon navigateur/OS */
select.select option,
.select option{
  background-color: #130b2b;           /* fond sombre lisible */
  color: rgba(255,255,255,.92);        /* texte blanc */
}

/* Option sélectionnée (quand le navigateur respecte) */
select.select option:checked,
.select option:checked{
  background-color: rgba(255,130,28,.35);
  color: #ffffff;
}

.field.buttons{
  display:flex;
  gap: 10px;
  justify-content: flex-end;
}

.codex-meta{
  margin-top: 14px;
  display:flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);

  color: rgba(255,255,255,.90);
  font-weight: 700;
  font-size: .86rem;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.chips{
  margin-top: 14px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.90);

  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: .86rem;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.chip:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.34);
}

.chip.is-active{
  background: rgba(255,130,28,.18);
  border-color: rgba(255,130,28,.55);
  box-shadow: 0 0 0 3px rgba(255,130,28,.16);
}

.grid{
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.codex-card, .card{
  background: linear-gradient(
    to bottom,
    rgba(19,11,43,0.82),
    rgba(19,11,43,0.76)
  );

  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 14px 30px rgba(0,0,0,0.45);

  color: rgba(255,255,255,0.94);
}

/* Tags container */
.codex-card .card-tags{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.codex-card,
.codex-card h2,
.codex-card h3,
.codex-card p,
.codex-card small,
.codex-card span{
  color: rgba(255,255,255,0.95);
}

.tag{
  border: 1px dashed rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.90);

  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: .82rem;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.tag:hover{
  border-style: solid;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.40);
  transform: translateY(-1px);
}

.card-actions{ margin-top: 12px; }

.card-body{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.14);
}

.entry-content, .codex-card{
  color: rgba(255,255,255,.90);
}

.loading, .error{
  padding: 12px 14px;
  border-radius: 16px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.90);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.error{
  background: rgba(255,130,28,.12);
  border-color: rgba(255,130,28,.35);
}

.empty{
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.90);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 860px){
  .codex-controls{ grid-template-columns: 1fr; }
  .field.buttons{ justify-content: flex-start; }
  .grid{ grid-template-columns: 1fr; }
}



/* =========================
   PERSONNAGES INDEX.HTML (layout clean)
   ========================= */

.character{
  display: flex;
  gap: 28px;
  align-items: center;

  padding: 28px;
  border-radius: 28px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);

  margin-bottom: 28px;
}

.character img{
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.character-content{
  flex: 1;
}

.character-content h3{
  margin-top: 0;
  margin-bottom: 12px;
}

@media (max-width: 768px){
  .character{
    flex-direction: column;
    text-align: center;
  }

  .character img{
    width: 150px;
    height: 150px;
  }
}


/* =========================
   HEADER FICHE PERSONNAGE
   ========================= */

.sheet-header{
  display: flex;
  gap: 40px;
  align-items: center;

  padding: 36px;
  margin-bottom: 50px;

  border-radius: 32px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.sheet-header img{
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
}

.sheet-header-info h1{
  margin: 0 0 10px 0;
  font-size: 2.2rem;
}

.sheet-meta{
  margin: 4px 0;
  font-weight: 600;
}

.sheet-flavor{
  margin-top: 18px;
  font-style: italic;
  opacity: .85;
}

/* Zoom portrait — fiche détaillée (sheet-header) */
.sheet-header{
  overflow: hidden; /* optionnel, mais propre */
}

.sheet-header img{
  transition: transform .35s ease;
  will-change: transform;
}

.sheet-header:hover img{
  transform: scale(1.08);
}
/* Responsive */
@media (max-width: 900px){
  .sheet-header{
    flex-direction: column;
    text-align: center;
  }
}

/* =========================
   FICHE PERSONNAGE — 2 COLONNES
   ========================= */
.character-sheet{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.sheet-left,
.sheet-right{
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sheet-card{
  padding: 28px;
  border-radius: 24px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

/* Stats */
.stats-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 30px;
  margin-top: 16px;
}

.stats-grid div{
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 6px 0;
}

/* Responsive */
@media (max-width: 900px){
  .character-sheet{
    grid-template-columns: 1fr;
  }
}


/* =========================
   FOOTER
   ========================= */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px 20px;
  min-height: 42px;

  border-radius: 999px;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--paper);

  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);

  margin: 60px auto 30px auto;
  max-width: 720px; /* plus étroit que la topbar */
  text-align: center;
  font-size: 0.85rem;
}

.footer p {
  margin: 0;
  opacity: 0.8;
}