/* La Boussole — design system commun (noir + jaune ambré Sphère Trail) */
:root {
  --bg: #0c0d10;
  --panel: #14161c;
  --panel-2: #191c23;
  --line: #262a33;
  --texte: #e9e7e1;
  --texte-2: #9aa0ab;
  --ambre: #e0ad4e;
  --ambre-doux: rgba(224, 173, 78, .12);
  --ambre-ligne: rgba(224, 173, 78, .35);
  --vert: #7dbb8a;
  --rouge: #d98a7a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--texte);
  font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--ambre); text-decoration: none; }

/* --- Navigation --- */
.nav {
  display: flex; align-items: center; gap: 26px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #101218, var(--bg));
  position: sticky; top: 0; z-index: 50;
}
.nav .marque { font-size: 20px; font-weight: 500; letter-spacing: .04em; color: var(--texte); }
.nav .marque em { color: var(--ambre); font-style: normal; }
.nav .liens { display: flex; gap: 4px; }
.nav .liens a {
  color: var(--texte-2); font-size: 14px; padding: 8px 14px; border-radius: 8px;
  border-bottom: 2px solid transparent;
}
.nav .liens a:hover { color: var(--texte); }
.nav .liens a.actif { color: var(--ambre); border-bottom-color: var(--ambre); border-radius: 0; }
.nav .etat {
  margin-left: auto; font-size: 12px; color: var(--texte-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap;
}
.nav .etat b { color: var(--ambre); font-weight: 500; }

main { flex: 1; width: 100%; }
.page { max-width: 1080px; margin: 0 auto; padding: 34px 22px 60px; }

/* --- Composants --- */
.panneau { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
h1 { font-weight: 300; font-size: 30px; letter-spacing: .01em; }
h2 { font-weight: 400; font-size: 19px; margin-bottom: 14px; }
.sous { color: var(--texte-2); font-size: 14.5px; line-height: 1.6; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--panel); color: var(--texte-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer;
  font-family: inherit; font-weight: 300;
}
.chip:hover { color: var(--ambre); border-color: var(--ambre-ligne); }
.chip.actif { background: var(--ambre-doux); color: var(--ambre); border-color: var(--ambre-ligne); }

.tag {
  display: inline-block; font-size: 11.5px; color: var(--texte-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px;
}
.tag.ambre { color: var(--ambre); border-color: var(--ambre-ligne); background: var(--ambre-doux); }

.bouton {
  background: var(--ambre); color: #17130a; border: none; border-radius: 10px;
  padding: 10px 18px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
}
.bouton:disabled { opacity: .45; cursor: default; }
.bouton.secondaire {
  background: var(--ambre-doux); color: var(--ambre); border: 1px solid var(--ambre-ligne);
}
.bouton.discret { background: transparent; color: var(--texte-2); border: 1px solid var(--line); }
.bouton.discret:hover { color: var(--texte); }

input[type=text], input[type=password], input[type=url], textarea, select {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--texte); font-family: inherit; font-size: 14.5px; font-weight: 300;
  padding: 11px 14px; outline: none; width: 100%;
}
input:focus, textarea:focus { border-color: var(--ambre-ligne); }
label { font-size: 13px; color: var(--texte-2); display: block; margin-bottom: 6px; }

/* --- Cartes épisode --- */
.carte-ep {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 9px;
}
.carte-ep .haut { display: flex; align-items: baseline; gap: 10px; }
.carte-ep .num { color: var(--ambre); font-weight: 500; font-size: 12.5px; letter-spacing: .06em; white-space: nowrap; }
.carte-ep .titre { font-weight: 400; font-size: 15px; line-height: 1.4; }
.carte-ep .infos { display: flex; gap: 12px; color: var(--texte-2); font-size: 12px; flex-wrap: wrap; }
.carte-ep .resume { color: var(--texte-2); font-size: 13.5px; line-height: 1.55; }
.carte-ep .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.carte-ep .citation {
  padding: 8px 12px; border-left: 2px solid var(--ambre-ligne);
  font-size: 13.5px; line-height: 1.55; font-style: italic; background: rgba(224,173,78,.05);
  border-radius: 0 8px 8px 0;
}
.carte-ep .pied { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.carte-ep .ecouter {
  background: var(--ambre-doux); color: var(--ambre); border: 1px solid var(--ambre-ligne);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.carte-ep .ecouter:hover { background: rgba(224,173,78,.2); }
.carte-ep audio { width: 100%; height: 34px; }
.carte-ep .onde { width: 100%; height: 26px; opacity: .55; }
.carte-ep .onde rect { fill: var(--texte-2); }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

/* --- Divers --- */
.attente { color: var(--texte-2); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.trace { width: 46px; height: 12px; overflow: visible; }
.trace path { fill: none; stroke: var(--ambre); stroke-width: 1.6; stroke-dasharray: 90; stroke-dashoffset: 90; animation: tracer 1.6s linear infinite; }
@keyframes tracer { to { stroke-dashoffset: 0; } }
.curseur { display: inline-block; width: 8px; height: 15px; background: var(--ambre); vertical-align: text-bottom; margin-left: 2px; animation: clignote 1s steps(2) infinite; }
@keyframes clignote { 50% { opacity: 0; } }
.erreur { color: var(--rouge); font-size: 14px; }
.vide { color: var(--texte-2); font-size: 14px; font-style: italic; padding: 18px 0; }

.montagnes { pointer-events: none; opacity: .5; display: block; width: 100%; margin-top: auto; }

table.admin { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin th { text-align: left; color: var(--texte-2); font-weight: 400; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.admin td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }

.statut { font-size: 11.5px; border-radius: 999px; padding: 3px 10px; }
.statut.publiee { color: var(--vert); border: 1px solid rgba(125,187,138,.4); }
.statut.en_attente { color: var(--ambre); border: 1px solid var(--ambre-ligne); }
.statut.masquee { color: var(--texte-2); border: 1px solid var(--line); }

.barre { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.barre > div { height: 100%; background: var(--ambre); border-radius: 999px; transition: width .4s; }

@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  .nav .etat { display: none; }
  h1 { font-size: 24px; }
}
