/* ============================================================
   Replaud — thème « studio audio » sombre & chaleureux
   Display: Bricolage Grotesque · Texte: Satoshi
   ============================================================ */

:root {
  --bg:        #100e0c;          /* presque noir, chaud */
  --bg-2:      #16130f;
  --panel:     #1c1814;
  --panel-2:   #221d18;
  --line:      #322a22;
  --ink:       #f4ece0;          /* blanc cassé chaud */
  --ink-soft:  #b7aa98;
  --ink-dim:   #7c6f60;
  --rec:       #ff4530;          /* rouge REC */
  --rec-glow:  rgba(255, 69, 48, .45);
  --amber:     #ffb454;
  --gold:      #f5d76e;
  --radius:    18px;
  --radius-sm: 11px;
  --shadow:    0 24px 60px -20px rgba(0,0,0,.75);
  --font-disp: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Satoshi", system-ui, sans-serif;
}

/* ---- Thème clair (jour) ---- */
html[data-theme="light"] {
  --bg:        #f4efe6;
  --bg-2:      #efe8dc;
  --panel:     #ffffff;
  --panel-2:   #faf6ee;
  --line:      #e4dbcd;
  --ink:       #241d14;
  --ink-soft:  #5d5446;
  --ink-dim:   #978b77;
  --rec:       #e63a26;
  --rec-glow:  rgba(230, 58, 38, .30);
  --shadow:    0 20px 50px -26px rgba(80, 55, 25, .28);
}
html[data-theme="light"] body {
  background-image:
    radial-gradient(1100px 700px at 78% -10%, rgba(230,58,38,.07), transparent 60%),
    radial-gradient(900px 600px at -5% 110%, rgba(255,180,84,.08), transparent 55%);
}
html[data-theme="light"] .studio-grain {
  background-image: radial-gradient(rgba(0,0,0,.04) 1px, transparent 1px);
  opacity: .5;
}
html[data-theme="light"] .btn-generate,
html[data-theme="light"] .auth-btn { color: #2a1d0c; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  /* texture d'ambiance : halo chaud + grain léger */
  background-image:
    radial-gradient(1100px 700px at 78% -10%, rgba(255,80,48,.10), transparent 60%),
    radial-gradient(900px 600px at -5% 110%, rgba(255,180,84,.06), transparent 55%);
  background-attachment: fixed;
}

::selection { background: var(--rec); color: #fff; }

/* ---------- Bannière config ---------- */
.config-banner {
  background: #3a1410;
  color: #ffd9d2;
  padding: 12px 20px;
  font-size: 14px;
  border-bottom: 1px solid #5c2018;
  text-align: center;
}
.config-banner code {
  background: rgba(0,0,0,.35);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12.5px;
}

/* ---------- Grille appli ---------- */
.app {
  display: grid;
  grid-template-columns: 312px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 26px 20px 18px;
  gap: 18px;
  overflow: hidden;
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 13px;
  background: radial-gradient(circle at 35% 30%, #2c2620, #15110d);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.rec-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 0 4px rgba(255,69,48,.18), 0 0 14px var(--rec-glow);
}
.brand-name {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -.02em;
  line-height: 1;
}
.brand-tag {
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: .22em;
  margin-top: 4px;
}

.btn-new {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: .18s;
  text-align: left;
}
.btn-new:hover {
  border-color: var(--rec);
  color: #fff;
  box-shadow: 0 0 0 1px var(--rec), 0 8px 24px -12px var(--rec-glow);
}

.search input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  outline: none;
  transition: .18s;
}
.search input:focus { border-color: var(--amber); }
.search input::placeholder { color: var(--ink-dim); }

.history {
  flex: 1;
  overflow-y: auto;
  margin: 0 -8px;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.history-empty { color: var(--ink-dim); font-size: 13px; padding: 10px 4px; }

.hist-item {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  cursor: pointer;
  transition: .15s;
  position: relative;
}
.hist-item:hover { background: var(--panel); border-color: var(--line); }
.hist-item.is-active {
  background: var(--panel);
  border-color: var(--rec);
}
.hist-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 3px; background: var(--rec);
}
.hist-title {
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hist-meta {
  font-size: 11.5px;
  color: var(--ink-dim);
  margin-top: 3px;
  display: flex; gap: 8px; align-items: center;
}
.hist-badge {
  font-size: 10px;
  color: var(--gold);
  border: 1px solid rgba(245,215,110,.3);
  border-radius: 5px;
  padding: 1px 5px;
}
.hist-del {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--ink-dim);
  cursor: pointer; font-size: 15px; opacity: 0;
  transition: .15s; padding: 4px;
}
.hist-item:hover .hist-del { opacity: 1; }
.hist-del:hover { color: var(--rec); }

.sidebar-foot { padding-top: 12px; border-top: 1px solid var(--line); }
.powered {
  font-size: 11px; color: var(--ink-dim);
  letter-spacing: .12em; text-transform: uppercase;
}
.user-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.user-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(145deg, var(--amber), var(--rec));
  color: #1a120a; font-weight: 800; font-family: var(--font-disp);
  display: grid; place-items: center; font-size: 15px;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-email {
  font-size: 12.5px; color: var(--ink); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
.user-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.user-link {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line);
  color: var(--ink-soft); cursor: pointer; text-decoration: none;
  font-size: 15px; transition: .15s;
}
.user-link:hover { border-color: var(--rec); color: var(--ink); }

/* Bascule thème jour/nuit */
.theme-toggle {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line);
  color: var(--ink-soft); cursor: pointer; font-size: 15px; transition: .15s;
  line-height: 1;
}
.theme-toggle:hover { border-color: var(--amber); color: var(--ink); }
.theme-toggle--float {
  position: fixed; top: 18px; right: 18px; z-index: 60;
  width: 38px; height: 38px; border-radius: 10px; font-size: 17px;
  box-shadow: var(--shadow);
}
/* Bouton export compte rendu (.docx) */
.exp--docx { color: var(--rec); border-color: rgba(230,58,38,.4); font-weight: 700; }
.exp--docx:hover { border-color: var(--rec); color: var(--rec); background: rgba(230,58,38,.06); }
.exp--docx:disabled { opacity: .5; cursor: wait; }

/* ============================================================
   MAIN
   ============================================================ */
.main {
  overflow-y: auto;
  padding: 34px clamp(24px, 5vw, 70px) 60px;
}

/* ---------- Panneau studio ---------- */
.studio {
  position: relative;
  background:
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 36px 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.studio-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image: radial-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 4px 4px;
}

.studio-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.studio-title {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.02em;
  color: var(--ink);
  outline: none;
  min-height: 1.2em;
}
.studio-title:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-dim);
}
.studio-meta {
  font-size: 12.5px;
  color: var(--amber);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Onde */
.wave {
  display: flex; align-items: center; justify-content: center;
  gap: 3px; height: 96px; margin: 18px 0 6px;
}
.wave span {
  width: 4px; height: 8px; border-radius: 4px;
  background: linear-gradient(var(--amber), var(--rec));
  opacity: .35;
  transition: height .08s ease;
}
.wave.is-live span { opacity: 1; }

.timer {
  text-align: center;
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 40px;
  letter-spacing: .02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Contrôles */
.controls {
  display: flex; align-items: center; justify-content: center;
  gap: 22px; margin-top: 18px; position: relative;
}
.rec-btn {
  width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6a55, var(--rec));
  border: 4px solid #2a1411;
  cursor: pointer; position: relative;
  box-shadow: 0 0 0 6px rgba(255,69,48,.12), 0 14px 32px -10px var(--rec-glow);
  transition: .2s;
  display: grid; place-items: center;
}
.rec-btn:hover { transform: scale(1.05); }
.rec-btn-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; transition: .2s;
}
.rec-btn.is-recording { animation: pulse 1.4s infinite; }
.rec-btn.is-recording .rec-btn-icon {
  width: 24px; height: 24px; border-radius: 5px; /* carré stop */
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 6px rgba(255,69,48,.12), 0 14px 32px -10px var(--rec-glow); }
  50%     { box-shadow: 0 0 0 14px rgba(255,69,48,0), 0 14px 32px -10px var(--rec-glow); }
}

.controls-side { display: flex; flex-direction: column; gap: 10px; }
.ctrl {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.ctrl:hover:not(:disabled) { border-color: var(--amber); color: var(--ink); }
.ctrl:disabled { opacity: .4; cursor: not-allowed; }

.hint {
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
  margin-top: 20px;
}

/* ---------- Barre de statut ---------- */
.status-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 14px;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--rec);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RÉSULTATS
   ============================================================ */
.results { margin-top: 26px; animation: rise .4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.results-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-bottom: 18px;
}
.tabs { display: flex; gap: 4px; background: var(--bg); padding: 5px; border-radius: 12px; border: 1px solid var(--line); }
.tab {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft);
  background: none; border: none;
  padding: 8px 17px; border-radius: 8px;
  cursor: pointer; transition: .15s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

.exports { display: flex; gap: 6px; }
.exp {
  font-family: var(--font-body);
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 11px;
  cursor: pointer; transition: .15s;
}
.exp:hover { border-color: var(--gold); color: var(--gold); }

.panel { display: none; }
.panel.is-active { display: block; animation: rise .3s ease both; }

/* Transcription */
.transcript {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
  white-space: pre-wrap;
  box-shadow: var(--shadow);
}

/* Résumé (markdown) */
.summary-actions { margin-bottom: 18px; }
.btn-generate {
  font-family: var(--font-body);
  font-weight: 700; font-size: 14.5px;
  color: #1a120a;
  background: linear-gradient(180deg, var(--gold), var(--amber));
  border: none; border-radius: var(--radius-sm);
  padding: 13px 22px; cursor: pointer;
  transition: .18s;
  box-shadow: 0 12px 28px -12px rgba(245,215,110,.5);
}
.btn-generate:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-generate:disabled { opacity: .55; cursor: wait; transform: none; }

.prose {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 32px 28px;
  box-shadow: var(--shadow);
}
.prose:empty { display: none; }
.prose h2 {
  font-family: var(--font-disp);
  font-weight: 700; font-size: 21px;
  color: var(--ink);
  margin: 26px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.prose h3 { font-family: var(--font-disp); font-size: 17px; margin: 18px 0 8px; color: var(--amber); }
.prose p { color: var(--ink-soft); line-height: 1.8; margin: 10px 0; }
.prose ul, .prose ol { color: var(--ink-soft); line-height: 1.8; padding-left: 22px; margin: 8px 0; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--rec); }
.prose strong { color: var(--ink); }

/* Carte mentale */
.mindmap-wrap {
  background:
    radial-gradient(circle at 50% 40%, rgba(255,180,84,.05), transparent 65%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: 560px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
#mindmapSvg { width: 100%; height: 100%; cursor: grab; touch-action: none; display: block; }
#mindmapSvg.grabbing { cursor: grabbing; }
.mindmap-hint { color: var(--ink-dim); font-size: 13.5px; margin-top: 14px; text-align: center; }

/* Rendu carte mentale (SVG maison) */
.mm-link { fill: none; stroke-width: 2; opacity: .5; }
.mm-rect { fill: var(--panel-2); stroke-width: 1.5; }
.mm-node:hover .mm-rect { fill: #2a231b; }
.mm-text { fill: var(--ink); font-family: var(--font-body); font-size: 14px; dominant-baseline: middle; pointer-events: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-left: 3px solid var(--rec);
  border-radius: 10px; padding: 13px 20px; font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: .3s; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-left-color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 30% 0 0; z-index: 50; transform: translateX(-100%); transition: .3s; }
  .sidebar.open { transform: none; }
  .main { padding: 24px 18px 50px; }
}

/* ============================================================
   AUTH (login.php)
   ============================================================ */
.auth-body {
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.auth-wrap {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 410px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 36px 34px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.auth-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--rec));
}
.auth-brand { margin-bottom: 26px; }
.auth-title {
  font-family: var(--font-disp); font-weight: 700; font-size: 26px;
  letter-spacing: -.02em; margin-bottom: 6px;
}
.auth-sub { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin-bottom: 22px; }
.auth-label {
  display: block; font-size: 12px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--ink-dim); margin-bottom: 8px;
}
.auth-input {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 15px;
  color: var(--ink); font-family: var(--font-body); font-size: 15px;
  outline: none; transition: .18s; margin-bottom: 18px;
}
.auth-input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,180,84,.12); }
.auth-code {
  text-align: center; font-size: 30px; letter-spacing: .5em;
  font-family: var(--font-disp); font-weight: 600; padding-left: .5em;
}
.auth-btn {
  width: 100%; font-family: var(--font-body); font-weight: 700; font-size: 15px;
  color: #1a120a; background: linear-gradient(180deg, var(--gold), var(--amber));
  border: none; border-radius: var(--radius-sm); padding: 14px;
  cursor: pointer; transition: .18s;
  box-shadow: 0 12px 28px -12px rgba(245,215,110,.5);
}
.auth-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.auth-btn:disabled { opacity: .6; cursor: wait; }
.auth-msg { font-size: 13.5px; margin-top: 14px; min-height: 18px; color: var(--ink-soft); }
.auth-msg.err { color: #ff8a7a; }
.auth-back {
  display: block; width: 100%; margin-top: 16px; background: none; border: none;
  color: var(--ink-dim); font-family: var(--font-body); font-size: 13px;
  cursor: pointer; transition: .15s;
}
.auth-back:hover { color: var(--amber); }
.auth-foot { color: var(--ink-dim); font-size: 12px; margin-top: 24px; letter-spacing: .08em; }
.dev-code {
  background: rgba(245,215,110,.08); border: 1px dashed rgba(245,215,110,.4);
  border-radius: 10px; padding: 11px 14px; margin-bottom: 18px;
  color: var(--gold); font-size: 14px; text-align: center;
}
.dev-code b { font-family: var(--font-disp); font-size: 18px; letter-spacing: .15em; }

/* ============================================================
   ADMIN (admin.php)
   ============================================================ */
.admin-body { padding: 0; }
.admin-wrap { max-width: 920px; margin: 0 auto; padding: 36px 24px 60px; }
.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 14px;
}
.admin-head h1 {
  font-family: var(--font-disp); font-weight: 800; font-size: 28px; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 12px;
}
.admin-back-link {
  color: var(--ink-soft); text-decoration: none; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 15px; transition: .15s;
}
.admin-back-link:hover { border-color: var(--amber); color: var(--ink); }

.admin-add {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px;
}
.admin-add input[type=email] {
  flex: 1; min-width: 220px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 14px; color: var(--ink);
  font-family: var(--font-body); font-size: 14px; outline: none;
}
.admin-add input[type=email]:focus { border-color: var(--amber); }
.admin-add label { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 14px; cursor: pointer; }
.admin-add .auth-btn { width: auto; padding: 11px 20px; }

.admin-table {
  width: 100%; border-collapse: collapse;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.admin-table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-dim); padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600;
}
.admin-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.015); }
.admin-email { color: var(--ink); font-weight: 500; }
.tag {
  font-size: 11px; padding: 3px 9px; border-radius: 6px; border: 1px solid;
  display: inline-block;
}
.tag-admin { color: var(--gold); border-color: rgba(245,215,110,.4); }
.tag-active { color: #7ee0a0; border-color: rgba(126,224,160,.35); }
.tag-off { color: var(--ink-dim); border-color: var(--line); }
.admin-actions { display: flex; gap: 6px; }
.mini-btn {
  font-family: var(--font-body); font-size: 12px; color: var(--ink-soft);
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 10px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.mini-btn:hover { border-color: var(--amber); color: var(--ink); }
.mini-btn.danger:hover { border-color: var(--rec); color: var(--rec); }
.admin-self { color: var(--ink-dim); font-size: 12px; font-style: italic; }

/* ---- Section coûts API ---- */
.admin-h2 {
  font-family: var(--font-disp); font-weight: 700; font-size: 21px;
  letter-spacing: -.01em; margin: 30px 0 14px; display: flex; align-items: baseline; gap: 10px;
}
.admin-h3 { font-family: var(--font-disp); font-weight: 600; font-size: 15px; color: var(--ink-soft); margin: 0 0 10px; }
.cost-cur { font-family: var(--font-body); font-size: 12px; color: var(--ink-dim); font-weight: 500; letter-spacing: 0; }
.cost-section { margin-bottom: 10px; }

.cost-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.cost-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px;
  position: relative; overflow: hidden;
}
.cost-card::before { content:""; position:absolute; top:0; left:0; right:0; height:2px; background: linear-gradient(90deg, var(--amber), var(--rec)); opacity:.7; }
.cost-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-dim); }
.cost-val { font-family: var(--font-disp); font-weight: 700; font-size: 24px; color: var(--ink); letter-spacing: -.01em; }

.cost-chart-wrap {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 24px;
}
.cost-chart-label { font-size: 11.5px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.cost-chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.cost-chart .bar {
  flex: 1; min-height: 2px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--amber), var(--rec)); opacity: .55; transition: opacity .15s;
}
.cost-chart .bar:hover { opacity: 1; }

.cost-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; margin-bottom: 8px; }
.cost-grid .admin-table { font-size: 13px; }
.cost-grid .admin-table th, .cost-grid .admin-table td { padding: 10px 13px; }
.cost-cell { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 600; }
.cell-empty { text-align: center; color: var(--ink-dim); }
.cell-dim { color: var(--ink-dim); font-size: 12px; }
.tag-kind { color: var(--amber); border-color: rgba(255,180,84,.35); }

@media (max-width: 760px) {
  .cost-cards { grid-template-columns: repeat(2, 1fr); }
  .cost-grid { grid-template-columns: 1fr; }
}

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #463b30; }
