/* ─────────────────────────────────────────────────────────────
   Acteev Clipping — feuille de style (mobile d'abord)
   Fond #0C0A12 · accent #2EE59D · Space Grotesk (titres) · Inter (texte)
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #0c0a12;
  --surface: #15121d;
  --surface-2: #1c1826;
  --border: #2a2433;
  --text: #f4f2f7;
  --muted: #a39dae;
  --accent: #2ee59d;
  --accent-ink: #0c0a12;
  --accent-soft: rgba(46, 229, 157, 0.12);
  --red: #ff5c7a;
  --red-soft: rgba(255, 92, 122, 0.12);
  --yellow: #ffc857;
  --yellow-soft: rgba(255, 200, 87, 0.12);
  --blue: #7aa7ff;
  --blue-soft: rgba(122, 167, 255, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --font-title: 'Space Grotesk', system-ui, sans-serif;
  --font-text: 'Inter', system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.inline { display: inline; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── En-tête ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: rgba(12, 10, 18, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { color: var(--text); display: flex; }
.brand:hover { text-decoration: none; }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo svg { height: 18px; width: auto; }
.logo-tag { font: 700 .7rem/1 var(--font-title); letter-spacing: .18em; color: var(--accent); border: 1px solid var(--accent); padding: 4px 6px; border-radius: 6px; }
.topnav { display: flex; align-items: center; gap: 14px; font-size: .92rem; }
.topnav a { color: var(--muted); }
.topnav a.on, .topnav a:hover { color: var(--text); text-decoration: none; }
.topnav a.btn { color: var(--accent-ink); }
.linklike { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; display: flex; }
.linklike:hover { color: var(--text); }

/* ── Structure ───────────────────────────────────────────── */
.shell { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; }
.main { padding: 20px 16px 40px; min-width: 0; }
.with-nav .main { padding-bottom: calc(var(--nav-h) + 32px); }

/* Navigation d'espace : barre du bas sur mobile, colonne sur ordinateur */
.sidenav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  background: rgba(21, 18, 29, 0.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.sidenav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: .68rem; padding: 6px 2px; border-radius: 10px;
}
.sidenav a.on { color: var(--accent); }
.sidenav a:hover { text-decoration: none; color: var(--text); }
.sidenav.admin { overflow-x: auto; justify-content: flex-start; }
.sidenav.admin a { flex: 0 0 auto; min-width: 76px; }

@media (min-width: 900px) {
  .with-nav { display: grid; grid-template-columns: 220px 1fr; gap: 8px; }
  .sidenav {
    position: sticky; top: 64px; bottom: auto; align-self: start;
    flex-direction: column; justify-content: flex-start; gap: 2px;
    background: none; border: 0; padding: 20px 12px; height: calc(100vh - 64px);
  }
  .sidenav a { flex: 0 0 auto; flex-direction: row; gap: 10px; font-size: .92rem; padding: 10px 12px; }
  .sidenav a.on { background: var(--accent-soft); }
  .with-nav .main { padding: 28px 24px 48px; }
}

/* ── Pied de page ────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 28px 16px calc(28px + var(--nav-h)); text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: .88rem; margin-bottom: 12px; }
.footer-links a { color: var(--muted); }
.disclaimer { font-size: .8rem; color: var(--muted); max-width: 560px; margin: 0 auto 6px; }
@media (min-width: 900px) { .footer { padding-bottom: 28px; } }
body.area-public .footer { padding-bottom: 28px; }

/* ── Boutons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  font: 700 .95rem/1 var(--font-text); cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-warn { background: transparent; color: var(--yellow); border-color: var(--yellow); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ── Cartes et grilles ───────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
.stack > * + * { margin-top: 16px; }
.section { margin-top: 32px; }

.pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.pagehead h1 { margin-bottom: 4px; }
.pagehead p { margin: 0; }
.back { display: inline-block; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }

/* Statistiques */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; }
.stat-value { font: 700 1.5rem/1.2 var(--font-title); margin-top: 6px; }
.stat-hint { color: var(--muted); font-size: .75rem; margin-top: 2px; }

/* ── Campagnes ───────────────────────────────────────────── */
.ccard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: border-color .15s; }
.ccard:hover { border-color: var(--accent); text-decoration: none; }
.ccard-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1d1530, #0f2a22); position: relative; }
.ccard-cover img { width: 100%; height: 100%; object-fit: cover; }
.ccard-cover .badge { position: absolute; top: 10px; left: 10px; }
.ccard-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ccard-title { font: 600 1.1rem/1.25 var(--font-title); margin: 0; }
.cpm { font: 700 1.35rem/1 var(--font-title); color: var(--accent); }
.cpm small { font: 500 .8rem var(--font-text); color: var(--muted); }

.hero { padding: 36px 0 12px; }
.hero h1 { font-size: clamp(2rem, 8vw, 3.4rem); max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }
.steps { counter-reset: step; display: grid; gap: 12px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.step::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 .9rem var(--font-title); margin-bottom: 10px; }
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }

.cover-lg { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 7; background: linear-gradient(135deg, #1d1530, #0f2a22); margin-bottom: 20px; }
.cover-lg img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; }
.fact span { display: block; color: var(--muted); font-size: .78rem; }
.fact strong { font: 600 1.05rem var(--font-title); }
.prose { max-width: 70ch; }
.prose p, .prose li { color: #dcd8e3; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.tip { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 12px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 16px 0; }
.warn { background: var(--yellow-soft); border-left: 3px solid var(--yellow); padding: 12px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 16px 0; }

/* Budget */
.budget-track { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.budget.compact .budget-track { height: 6px; }
.budget-fill { height: 100%; background: linear-gradient(90deg, #1fb87c, var(--accent)); border-radius: 99px; }
.budget-fill.hot { background: linear-gradient(90deg, var(--yellow), var(--red)); }
.budget-legend { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; margin-top: 6px; }

/* Puces, badges */
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.chip-youtube { color: #ff6b6b; }
.chip-tiktok { color: #25f4ee; }
.chip-instagram { color: #ff6fa8; }
.chip-x { color: #e7e9ea; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.badge-green { background: var(--accent-soft); color: var(--accent); }
.badge-yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-grey { background: var(--surface-2); color: var(--muted); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }

/* Messages */
.flash { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .93rem; border: 1px solid; }
.flash-ok { background: var(--accent-soft); border-color: rgba(46, 229, 157, .4); }
.flash-error { background: var(--red-soft); border-color: rgba(255, 92, 122, .4); }
.flash-info { background: var(--blue-soft); border-color: rgba(122, 167, 255, .4); }

.empty { text-align: center; padding: 32px 16px; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-title { font: 600 1.05rem var(--font-title); margin-bottom: 6px; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks li .icon { flex: 0 0 auto; margin-top: 3px; }
.checks .ok .icon { color: var(--accent); }
.checks .ko .icon { color: var(--red); }
.checks .todo .icon { color: var(--yellow); }

/* ── Formulaires ─────────────────────────────────────────── */
.form { display: grid; gap: 16px; }
.form-narrow { max-width: 440px; margin: 0 auto; }
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; font-size: .9rem; }
.hint { color: var(--muted); font-size: .8rem; margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number],
input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: 16px var(--font-text); /* 16px : évite le zoom automatique sur iPhone */
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input[type=file] { color: var(--muted); font-size: .9rem; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.checkgroup { display: flex; flex-wrap: wrap; gap: 8px; }
.checkgroup label { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 8px 14px; font-size: .9rem; cursor: pointer; }
.checkgroup input { accent-color: var(--accent); }
.row { display: grid; gap: 16px; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: repeat(3, 1fr); } }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0; }
legend { font: 600 1rem var(--font-title); padding: 0 6px; }
.auth-card { max-width: 440px; margin: 16px auto 0; }

/* ── Listes et tableaux ──────────────────────────────────── */
.list { display: grid; gap: 10px; }
.item { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; color: var(--text); }
a.item:hover { border-color: var(--muted); text-decoration: none; }
.item-thumb { width: 56px; height: 72px; border-radius: 8px; background: var(--surface-2); object-fit: cover; flex: 0 0 auto; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { color: var(--muted); font-size: .8rem; display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.item-side { text-align: right; flex: 0 0 auto; }
.item-side strong { display: block; font-family: var(--font-title); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.tabs a { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); font-size: .88rem; white-space: nowrap; }
.tabs a.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }

.videopick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .videopick { grid-template-columns: repeat(4, 1fr); } }
.videopick button { all: unset; cursor: pointer; display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.videopick button:hover, .videopick button:focus-visible { border-color: var(--accent); }
.videopick img { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.videopick span { display: block; padding: 8px; font-size: .78rem; line-height: 1.3; }

.code-box { font: 700 1.4rem var(--font-title); letter-spacing: .12em; background: var(--surface-2); border: 1px dashed var(--accent); color: var(--accent); padding: 12px; border-radius: var(--radius-sm); text-align: center; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.spark { width: 100%; height: 80px; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 2; }
.spark .area { fill: var(--accent-soft); stroke: none; }
details summary { cursor: pointer; font-weight: 600; }

/* En-tête compact sur téléphone : liens secondaires dans le pied de page / l'accueil */
.topnav .btn { white-space: nowrap; }
@media (max-width: 600px) {
  .topnav { gap: 10px; }
  .topnav .hide-sm { display: none; }
  .logo svg { height: 15px; }
  .logo-tag { font-size: .6rem; padding: 3px 5px; }
}
