:root {
  --bg: #f6f3ed;
  --card: #ffffff;
  --ink: #141821;
  --ink-soft: #4a5263;
  --muted: #7b8291;
  --line: #e5dfd3;
  --gold: #b8893b;
  --gold-soft: #f3ead8;
  --side: #10141d;
  --side-ink: #e8e4da;
  --danger: #b4432f;
  --ok: #2f7a54;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 33, .05), 0 8px 24px rgba(20, 24, 33, .06);
  --serif: Georgia, "DejaVu Serif", "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg);
  display: grid; grid-template-columns: 236px 1fr; min-height: 100vh;
}

/* barre latérale */
.sidebar {
  background: var(--side); color: var(--side-ink); padding: 26px 18px;
  display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh;
}
.logo { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font: 700 22px var(--serif); color: var(--side); background: linear-gradient(135deg, #e2c27f, var(--gold));
}
.logo strong { display: block; font: 700 19px var(--serif); letter-spacing: .2px; }
.logo small { color: #9aa0ad; letter-spacing: 3px; text-transform: uppercase; font-size: 10.5px; }
nav { display: flex; flex-direction: column; gap: 3px; }
nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: #b9bdc7; cursor: pointer; user-select: none; transition: background .15s, color .15s;
}
nav a span { width: 18px; text-align: center; color: #6f7686; font-size: 13px; }
nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
nav a.active { background: rgba(184, 137, 59, .16); color: #fff; }
nav a.active span { color: #e2c27f; }
.sidebar-foot { margin-top: auto; padding: 0 8px; font-size: 12.5px; color: #8c92a0; }
.sidebar-foot p { margin: 8px 0 0; }
.pill-local {
  display: inline-block; font-size: 11px; letter-spacing: .5px; padding: 3px 9px; border-radius: 99px;
  border: 1px solid #3a4150; color: #c9ccd4;
}

/* zone principale */
main { padding: 28px 36px 60px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
h1 { font: 700 30px/1.15 var(--serif); margin: 0; letter-spacing: -.2px; }
h2 { font: 700 19px var(--serif); margin: 0 0 14px; }
h3 { font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); margin: 22px 0 10px; }
.muted { color: var(--muted); margin: 4px 0 0; }
.small { font-size: 12.5px; }
.brand-switch { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.brand-switch select { min-width: 230px; }

.layout { display: grid; grid-template-columns: minmax(340px, 440px) 1fr; gap: 24px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.preview { position: sticky; top: 20px; min-height: 420px; }
.preview .empty { display: grid; place-items: center; min-height: 380px; color: var(--muted); text-align: center; }
.preview .empty b { display: block; font: 600 18px var(--serif); color: var(--ink-soft); margin-bottom: 6px; }

/* formulaires */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
input[type=text], input[type=number], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.colors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.colors label { font-size: 11.5px; color: var(--muted); text-align: center; }
.colors input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: #fff; cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; }
.checks input { accent-color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px var(--sans);
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  background: var(--ink); color: #fff; transition: transform .05s, background .15s, opacity .15s;
}
.btn:hover { background: #262c38; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--gold-soft); }
.btn.gold { background: var(--gold); }
.btn.gold:hover { background: #a57a33; }
.btn.danger { background: #fff; color: var(--danger); border-color: #ecc9c1; }
.btn[disabled] { opacity: .55; cursor: progress; }
.ghost { background: none; border: none; color: var(--muted); font: inherit; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.ghost:hover { background: var(--bg); color: var(--ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* choix de modèle */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 13px; background: #fff; }
.tile b { display: block; font: 600 14px var(--serif); }
.tile small { color: var(--muted); }
.tile.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

/* sélection d'image */
.img-slot { display: flex; align-items: center; gap: 10px; }
.img-slot .thumb { width: 54px; height: 54px; border-radius: 9px; background: var(--bg) center/cover; border: 1px dashed var(--line); flex: none; }
.img-slot .thumb.set { border-style: solid; }
.img-slot .lbl { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* listes de diapositives / cases */
.items { display: flex; flex-direction: column; gap: 10px; }
.item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 2px; background: #fdfcf9; }
.item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.item-head b { font: 600 13px var(--sans); color: var(--ink-soft); }
.item-head .ghost { padding: 2px 6px; font-size: 13px; }

/* marques */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.brand-card { cursor: pointer; padding: 0; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.brand-card:hover { transform: translateY(-2px); }
.brand-card.on { outline: 2px solid var(--gold); }
.brand-band { height: 74px; display: flex; align-items: flex-end; padding: 12px 16px; font: 700 17px var(--serif); }
.brand-band img { max-height: 44px; max-width: 70%; }
.brand-card .body { padding: 12px 16px 14px; font-size: 13px; color: var(--ink-soft); }
.swatches { display: inline-flex; gap: 4px; vertical-align: middle; }
.swatches b { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .1); }

/* résultats */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.results.single { grid-template-columns: 1fr; justify-items: center; }
.result { display: flex; flex-direction: column; gap: 8px; }
.result img, .result video { width: 100%; border-radius: 10px; box-shadow: var(--shadow); background: #ddd; }
.results.single .result { max-width: 560px; width: 100%; }
.results.single img, .results.single video { max-height: 72vh; object-fit: contain; }
.dl { display: flex; gap: 8px; flex-wrap: wrap; }
.dl a { font-size: 12.5px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); padding: 5px 10px; border-radius: 99px; background: #fff; }
.dl a:hover { border-color: var(--gold); }
.progress { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; margin: 12px 0; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #e2c27f, var(--gold)); transition: width .3s; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.media-grid button { border: 1px solid var(--line); border-radius: 10px; padding: 0; overflow: hidden; cursor: pointer; background: #fff; aspect-ratio: 1; }
.media-grid button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-grid button:hover { outline: 2px solid var(--gold); }

dialog { border: none; border-radius: 18px; padding: 0; width: min(860px, 94vw); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(16, 20, 29, .45); backdrop-filter: blur(2px); }
.picker-box { padding: 22px; }
.picker-box header { display: flex; justify-content: space-between; align-items: center; }
.picker-box h2 { margin: 0; }
.picker-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0; }

.export-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.export-row:last-child { border-bottom: none; }
.export-row img { width: 90px; height: 90px; object-fit: cover; border-radius: 9px; background: var(--bg); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--gold-soft); color: #7a5a22; margin-right: 6px; }

#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; max-width: 380px; animation: up .2s ease-out; }
.toast.err { background: var(--danger); }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px; gap: 14px; }
  nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { display: none; }
  main { padding: 20px 16px 40px; }
  .layout { grid-template-columns: 1fr !important; }
  .preview { position: static; }
  .topbar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 640px) {
  .row, .row3 { grid-template-columns: 1fr; gap: 0; }
  .tiles { grid-template-columns: 1fr; }
  .colors { grid-template-columns: repeat(3, 1fr); }
  .brand-switch { flex-wrap: wrap; }
  .brand-switch select { min-width: 0; flex: 1; }
  .card { padding: 16px; }
  .export-row { grid-template-columns: 64px 1fr; }
  .export-row img { width: 64px; height: 64px; }
  .export-row .dl { grid-column: 1 / -1; }
}
.layout > *, main { min-width: 0; }

/* import et cadrage des images */
.drop-hint { margin: 0 0 14px; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 12px; font-size: 13px; color: var(--muted); }
.drop-hint kbd { font: inherit; font-size: 11.5px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
#picker.dropping .drop-hint, .img-slot.dropping { border-color: var(--gold); background: rgba(201, 161, 74, .08); }
.img-slot { flex-wrap: wrap; border: 1.5px dashed transparent; border-radius: 10px; }
.framing { flex-basis: 100%; display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.framing[hidden] { display: none; }
.focus-pic { position: relative; display: inline-block; cursor: crosshair; line-height: 0; border-radius: 8px; overflow: hidden; flex: none; }
.focus-pic img { max-width: 170px; max-height: 130px; display: block; }
.focus-pic .dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid #fff; background: var(--gold); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); pointer-events: none; }
.framing .help { display: block; font-size: 12px; color: var(--muted); }
.framing input[type=range] { width: 100%; accent-color: var(--gold); }

/* atelier vidéo */
.atelier { grid-template-columns: minmax(280px, 360px) 1fr; }
.projets { display: grid; gap: 8px; }
.projet { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; }
.projet.on, .projet:hover { border-color: var(--gold); background: var(--gold-soft); }
.ed-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ed-head h2 { margin: 0; }
.ed-grid { display: grid; gap: 6px; margin: 12px 0 4px; }
video.source { width: 100%; max-height: 300px; background: #000; border-radius: 10px; }
#editeur h3 { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); }
.mots { display: flex; flex-wrap: wrap; gap: 5px; max-height: 260px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.mot { font: inherit; font-size: 14px; padding: 3px 6px; border: 1px solid transparent; border-radius: 6px; background: #fff; min-width: 2ch; }
.mot:focus { border-color: var(--gold); outline: none; }
.mot.doute { background: #fff1dc; border-color: #f0c27a; }
table.plans { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 14px; }
table.plans th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px; }
table.plans td { padding: 3px 4px; }
table.plans input, table.plans select { width: 100%; }
.apercu img, .apercu video { max-width: 100%; max-height: 70vh; display: block; margin-top: 12px; border-radius: 10px; background: #000; }
.exports-mp4 { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.exports-mp4 figure { margin: 0; }
.exports-mp4 video { max-height: 340px; max-width: 100%; border-radius: 8px; background: #000; display: block; }
.exports-mp4 figcaption { font-size: 12.5px; margin-top: 4px; }
.job { display: grid; gap: 6px; margin: 10px 0; }
p.err { color: var(--danger); }
@media (max-width: 900px) { .atelier { grid-template-columns: 1fr; } }

/* v0.5 : voix, réseaux sociaux, espace */
.ligne { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ligne:last-child { border-bottom: none; }
.tag.ok { background: #e3f1e9; color: var(--ok); }
.tag.ko { background: #f6e6e2; color: var(--danger); }
.ok { color: var(--ok); }
.phrase { margin: 0; padding: 12px 14px; background: var(--gold-soft); border-radius: 10px; font: italic 15px/1.5 var(--serif); }
.onglets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 14px; cursor: pointer; font: inherit; }
.tab.on { border-color: var(--gold); background: var(--gold-soft); }
.actions-col { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.actions-col input { padding: 6px; border: 1px solid var(--line); border-radius: 8px; }
audio { width: 100%; margin-top: 10px; }
.connexion { max-width: 380px; margin: 12vh auto; }
body:has(.connexion) { display: block; }
@media (max-width: 980px) {
  nav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  nav a { white-space: nowrap; }
}
@media (max-width: 640px) {
  .ligne { grid-template-columns: 1fr; }
  .actions-col { flex-direction: row; flex-wrap: wrap; }
}

/* v0.6 : séquences, archives, calendrier */
.seq { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.vignettes { display: flex; gap: 6px; overflow-x: auto; }
.vignettes figure { margin: 0; flex: none; width: 110px; }
.vignettes img { width: 110px; border-radius: 6px; display: block; }
.vignettes figcaption { font-size: 11px; color: var(--muted); }
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
.arch { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.arch img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: var(--bg); }
.mois { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mois-titre { grid-column: 1 / -1; text-transform: capitalize; font: 600 15px var(--serif); margin-bottom: 4px; }
.jour-nom { font-size: 11px; color: var(--muted); text-align: center; }
.jour { min-height: 54px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; display: flex; flex-wrap: wrap; gap: 2px; align-content: flex-start; }
.jour i { width: 100%; font-style: normal; font-size: 11px; color: var(--muted); }
.jour.auj { border-color: var(--gold); }
.pastille { font-size: 10px; font-weight: 700; border-radius: 99px; padding: 1px 6px; background: var(--gold-soft); color: #7a5a22; }
.pastille.metricool { background: #e7eef8; color: #2d4f7c; }
@media (max-width: 640px) { .jour { min-height: 40px; } }

img.logo-mark { width: 44px; height: 44px; padding: 0; background: none; border-radius: 0; object-fit: contain; }

/* ======================================================================================================
   v0.12 — refonte visuelle premium : identité VisiPub (bleu nuit, bleu électrique, or), typographie
   moderne, espaces généreux, micro-interactions courtes (transform / opacity seulement).
   Les règles ci-dessous remplacent l'apparence ; aucune structure ni fonction n'est modifiée.
   ====================================================================================================== */
:root {
  --bg: #f3f5fa; --card: #ffffff; --ink: #0e1630; --ink-soft: #3d4865; --muted: #6c7794; --line: #e2e7f1;
  --gold: #d99a14; --gold-vif: #f2b736; --gold-soft: #fdf2d8; --bleu: #2f7cf6; --bleu-soft: #e8f0ff;
  --side: #071331; --side-ink: #dfe6fa; --danger: #c2412d; --ok: #1f8a5b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(14, 22, 48, .04), 0 6px 20px rgba(14, 22, 48, .06);
  --shadow-haut: 0 2px 4px rgba(14, 22, 48, .05), 0 16px 40px rgba(14, 22, 48, .12);
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --titre: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
body { font: 15px/1.55 var(--sans); background: var(--bg); grid-template-columns: 248px 1fr; -webkit-font-smoothing: antialiased; }
::selection { background: var(--gold-soft); }

/* barre latérale */
.sidebar { background: linear-gradient(180deg, #0a1a3f 0%, var(--side) 55%, #050d24 100%); padding: 22px 14px; gap: 22px; border-right: 1px solid rgba(127, 178, 255, .12); }
.logo { gap: 10px; padding: 0 6px; }
.logo strong { font: 700 19px var(--titre); color: #fff; letter-spacing: .1px; }
.logo small { color: var(--gold-vif); letter-spacing: 3.5px; font-weight: 700; }
nav { gap: 2px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(127, 178, 255, .25) transparent; }
nav::-webkit-scrollbar { width: 6px; }
nav::-webkit-scrollbar-thumb { background: rgba(127, 178, 255, .25); border-radius: 6px; }
nav .nav-titre { margin: 14px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: #6f7fa8; }
nav a { gap: 11px; padding: 8px 10px; border-radius: 10px; color: #b7c2e0; font-size: 14px; font-weight: 500; position: relative; }
nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; opacity: .85; }
nav a svg .plein { fill: currentColor; stroke: none; }
nav a:hover { background: rgba(127, 178, 255, .08); color: #fff; }
nav a.active { background: linear-gradient(90deg, rgba(242, 183, 54, .18), rgba(242, 183, 54, .04)); color: #fff; }
nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-vif); }
nav a.active svg { color: var(--gold-vif); opacity: 1; }
.sidebar-foot { color: #7f8db3; font-size: 12px; }
.lien-accueil { color: var(--gold-vif); text-decoration: none; font-weight: 600; }
.lien-accueil:hover { text-decoration: underline; }

/* zone principale */
main { padding: 30px clamp(18px, 3vw, 44px) 64px; }
.topbar { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
h1 { font: 700 28px/1.15 var(--titre); letter-spacing: -.4px; color: var(--ink); }
h2 { font: 650 18px var(--titre); letter-spacing: -.1px; color: var(--ink); }
h3 { font: 700 11.5px var(--sans); letter-spacing: 1.4px; color: var(--muted); }
.muted { color: var(--muted); }
.brand-switch select { min-width: 220px; border-radius: 999px; padding: 8px 14px; background: #fff; }
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.preview .empty b { font: 650 17px var(--titre); }
.layout { gap: 26px; }

/* formulaires */
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
input[type=text], input[type=number], input[type=email], input[type=password], textarea, select {
  border: 1px solid #d7deeb; border-radius: 10px; padding: 10px 12px; background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(47, 124, 246, .16); }
input[type=email], input[type=password] { width: 100%; font: inherit; color: var(--ink); }
.connexion { border-radius: 20px; padding: 30px; box-shadow: var(--shadow-haut); }
.connexion h1 { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.connexion h1 img { width: 44px; height: 44px; }
.connexion .btn { width: 100%; margin-top: 6px; }
.checks label { border-color: #d7deeb; transition: border-color .15s, background .15s; }
.checks label:hover { border-color: var(--bleu); background: var(--bleu-soft); }
.checks input { accent-color: var(--bleu); }

/* boutons */
.btn { font: 600 14px var(--sans); padding: 11px 20px; border-radius: 999px; background: var(--ink); transition: transform .12s ease, box-shadow .15s ease, background .15s; }
.btn:hover { background: #1b2650; box-shadow: 0 6px 18px rgba(14, 22, 48, .18); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.gold { background: linear-gradient(180deg, #ffd77a, var(--gold-vif)); color: #1a1405; }
.btn.gold:hover { background: linear-gradient(180deg, #ffe08f, #f6c04a); box-shadow: 0 8px 22px rgba(242, 183, 54, .35); }
.btn.secondary { background: #fff; color: var(--ink); border-color: #d7deeb; }
.btn.secondary:hover { background: var(--bleu-soft); border-color: var(--bleu); box-shadow: none; }
.btn.danger { border-color: #efc7bf; }
.btn:focus-visible, .ghost:focus-visible, nav a:focus-visible, .tb-action:focus-visible, .puce-filtre:focus-visible { outline: 3px solid rgba(47, 124, 246, .45); outline-offset: 2px; }
.ghost:hover { background: var(--bleu-soft); color: var(--ink); }

/* choix, tuiles, éléments */
.tile { border-color: #d7deeb; border-radius: 12px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tile b { font: 650 14px var(--titre); }
.tile:hover { transform: translateY(-1px); border-color: var(--bleu); }
.tile.on { border-color: var(--gold-vif); box-shadow: 0 0 0 3px rgba(242, 183, 54, .22); }
.item { border-color: var(--line); border-radius: 14px; background: #fafbfe; }
.brand-card { border-radius: var(--radius); transition: transform .18s ease, box-shadow .18s ease; }
.brand-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-haut); }
.brand-card.on { outline: 2px solid var(--gold-vif); outline-offset: 2px; }
.brand-band { font: 700 17px var(--titre); }
.tag { background: var(--gold-soft); color: #8a5d00; letter-spacing: .5px; }
.tag.ok { background: #e1f4ea; color: var(--ok); }
.tag.ko { background: #fbe7e3; color: var(--danger); }
.dl a { border-color: #d7deeb; transition: border-color .15s, background .15s; }
.dl a:hover { border-color: var(--bleu); background: var(--bleu-soft); }
.progress i { background: linear-gradient(90deg, var(--bleu), var(--gold-vif)); }
.result img, .result video { border-radius: 12px; }
.toast { border-radius: 12px; background: var(--ink); }
dialog { border-radius: 20px; }
.onglets .tab { border-color: #d7deeb; }
.tab.on { border-color: var(--gold-vif); background: var(--gold-soft); }
.projet.on, .projet:hover { border-color: var(--bleu); background: var(--bleu-soft); }
.phrase { background: var(--gold-soft); font-family: var(--sans); font-style: italic; }
.mois-titre { font-family: var(--titre); }

/* tableau de bord */
.tb-creer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tb-action {
  display: flex; flex-direction: column; gap: 6px; padding: 24px 22px; border-radius: 20px; text-decoration: none;
  color: #fff; background: linear-gradient(140deg, #13285c, #0a1a3f); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease; min-height: 150px;
}
.tb-action:hover { transform: translateY(-3px); box-shadow: var(--shadow-haut); }
.tb-action svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: auto; color: #9cc2ff; }
.tb-action svg .plein { fill: currentColor; stroke: none; }
.tb-action b { font: 700 19px var(--titre); margin-top: 18px; }
.tb-action span { color: rgba(255, 255, 255, .72); font-size: 13.5px; }
.tb-action.or { background: linear-gradient(140deg, #ffd77a, #f2b736 60%, #e09d16); color: #1a1405; }
.tb-action.or svg { color: #1a1405; }
.tb-action.or span { color: rgba(26, 20, 5, .72); }
.tb-action.bleu { background: linear-gradient(140deg, #4a90ff, #2f7cf6 55%, #1c5fd0); }
.tb-action.bleu svg { color: #fff; }
.tb-raccourcis { margin: 14px 2px 0; color: var(--muted); font-size: 14px; }
.tb-raccourcis a { color: var(--bleu); text-decoration: none; font-weight: 600; }
.tb-raccourcis a:hover { text-decoration: underline; }
.tb-bloc { margin-top: 34px; }
.tb-bloc > header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.tb-bloc > header h2 { margin: 0; font-size: 19px; }
.tb-bloc > header a { color: var(--bleu); text-decoration: none; font-weight: 600; font-size: 14px; }
.tb-rangee { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tb-brouillon {
  display: flex; gap: 14px; align-items: center; text-align: left; padding: 10px; border-radius: 16px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font: inherit; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.tb-brouillon:hover { transform: translateY(-2px); box-shadow: var(--shadow-haut); border-color: var(--bleu); }
.tb-brouillon img, .tb-vide { width: 54px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; flex: none; background: #0a1a3f; }
.tb-vide { display: grid; place-items: center; color: #7fb2ff; }
.tb-vide svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tb-brouillon b { display: block; font-weight: 650; }
.tb-brouillon small { color: var(--muted); }
.tb-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.tb-prod {
  position: relative; display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #0a1a3f;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.tb-prod:hover { transform: translateY(-3px); box-shadow: var(--shadow-haut); }
.tb-prod img { width: 100%; height: 100%; object-fit: cover; }
.tb-prod span { position: absolute; inset: auto 0 0; padding: 22px 10px 8px; color: #fff; font-size: 12.5px; font-weight: 600;
  background: linear-gradient(transparent, rgba(5, 13, 36, .85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-etat { margin-top: 34px; padding: 14px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink-soft); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tb-etat .sep { width: 1px; height: 18px; background: var(--line); margin: 0 8px; }

/* bibliothèque */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.puce-filtre { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid #d7deeb; background: #fff; font: 600 14px var(--sans); color: var(--ink-soft); cursor: pointer; transition: border-color .15s, background .15s; }
.puce-filtre span { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0 8px; }
.puce-filtre:hover { border-color: var(--bleu); }
.puce-filtre.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.puce-filtre.on span { background: rgba(255, 255, 255, .16); color: #fff; }
.biblio { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.prod { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.prod:hover { transform: translateY(-3px); box-shadow: var(--shadow-haut); }
.prod-visuel { position: relative; display: block; border-radius: 12px; overflow: hidden; background: #0a1a3f; }
.prod-visuel img { width: 100%; height: 100%; object-fit: cover; }
.f-vertical { aspect-ratio: 9 / 16; max-height: 360px; }
.f-portrait { aspect-ratio: 4 / 5; }
.f-paysage { aspect-ratio: 16 / 9; }
.f-carre { aspect-ratio: 1; }
.prod-vide { display: grid; place-items: center; height: 100%; color: #9cc2ff; font-weight: 600; }
.prod-lecture { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(5, 13, 36, .55); border: 2px solid #ffd77a; color: #ffd77a; transition: transform .18s; }
.prod-lecture svg { width: 22px; height: 22px; margin-left: 3px; }
.prod-lecture svg .plein, .prod-lecture svg path { fill: currentColor; stroke: none; }
.prod:hover .prod-lecture { transform: scale(1.08); }
.prod-info { display: flex; flex-direction: column; gap: 3px; padding: 0 4px; min-width: 0; }
.prod-info b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-info .tag { align-self: flex-start; }
.prod .dl { padding: 0 4px 4px; }

/* aperçus */
.lecteur video { box-shadow: var(--shadow-haut); }

/* tablette et téléphone */
@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .sidebar { padding: 10px 12px; gap: 10px; position: sticky; top: 0; z-index: 20; }
  .logo strong { font-size: 17px; }
  nav .nav-titre { display: none; }
  .sidebar { min-width: 0; max-width: 100vw; }
  nav { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; min-width: 0; width: 100%; flex-wrap: nowrap; }
  nav::-webkit-scrollbar { display: none; }
  nav a { padding: 8px 12px; font-size: 13.5px; }
  nav a.active::before { display: none; }
  .tb-creer { grid-template-columns: 1fr; }
  .tb-action { min-height: 0; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 14px; padding: 18px; }
  .tb-action svg { margin: 0; }
  .tb-action b { margin: 0; flex: 1; }
  .tb-action span { flex-basis: 100%; }
  main { padding: 20px 16px 48px; }
  h1 { font-size: 24px; }
}
@media (max-width: 640px) {
  .biblio { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .prod { padding: 8px; }
  .tb-grille { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- v0.14 : bibliothèque, textes réseaux, ElevenLabs client, administration ---------- */
.biblio-tete { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.biblio-tete .filtres { margin: 0; }
.biblio-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.stock { font-size: 14px; color: var(--ink-soft); }
.biblio-selection { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--bleu); box-shadow: var(--shadow); }
.prod { position: relative; }
.prod.choisi { outline: 2px solid var(--bleu); outline-offset: 2px; }
.prod-coche { position: absolute; top: 8px; left: 8px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); cursor: pointer; }
.prod-coche input { width: 22px; height: 22px; accent-color: var(--bleu); cursor: pointer; }
.textes-btn { width: 100%; margin-top: 8px; }
.textes-reseaux details { border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; background: #fafbfe; }
.textes-reseaux summary { cursor: pointer; padding: 12px 14px; font-weight: 700; min-height: 44px; }
.textes-reseaux .txt { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 14px; border-top: 1px solid var(--line); }
.textes-reseaux .txt > span { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.textes-reseaux .txt p { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.textes-reseaux .copier { align-self: start; border: 1px solid #d7deeb; }
.avert { padding: 10px 12px; border-radius: 10px; background: #fff6e0; border: 1px solid #f2d48a; color: #6b4b00; }
.carte-pro { max-width: 640px; }
.carte-pro ul { padding-left: 18px; line-height: 1.7; }
.adm-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.adm-kpi .card { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.adm-kpi span { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.adm-kpi b { font: 700 24px var(--titre, var(--sans)); }
.adm-kpi small { font-size: 13px; color: var(--muted); }
.table-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 760px; }
.adm-table th, .adm-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- confort sur téléphone et tablette : lisible sans zoom, cibles tactiles de 44 px ---------- */
body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.small { font-size: 13.5px; }
.field > span { font-size: 14px; }
.tag { font-size: 12px; }
.btn { min-height: 44px; }
.ghost { min-height: 40px; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=date], input[type=datetime-local], textarea, select { min-height: 44px; }
@media (max-width: 980px) {
  body { font-size: 16px; }
  /* 16 px minimum dans les champs : iOS ne zoome plus à la saisie */
  input, textarea, select, button { font-size: 16px !important; }
  .small, .muted.small { font-size: 14.5px; }
  .field > span { font-size: 15px; }
  .tag { font-size: 12.5px; }
  .checks label { font-size: 15px; padding: 10px 14px; min-height: 44px; }
  nav a { padding: 12px 14px; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
  .ghost { padding: 10px 12px; min-height: 44px; }
  .dl a { padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
  .puce-filtre { min-height: 44px; font-size: 15px; }
  .tab { min-height: 44px; font-size: 15px; }
  .brand-switch { font-size: 15px; }
  .actions .btn { flex: 1 1 auto; }
  .ligne { flex-wrap: wrap; }
  h3 { font-size: 14px; letter-spacing: .8px; }
  .tile small, .puce-filtre span { font-size: 13px; }
  .tag { font-size: 13px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; flex: none; }
  input[type=file] { font-size: 15px !important; min-height: 44px; max-width: 100%; }
  video, img { max-width: 100%; }
}
@media (max-width: 640px) {
  .biblio { grid-template-columns: 1fr 1fr; }
  .biblio-outils { width: 100%; justify-content: space-between; }
  .biblio-selection .btn { flex: 1 1 100%; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
  .adm-kpi { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 23px; line-height: 1.2; }
  h2 { font-size: 19px; }
}
@media (max-width: 400px) {
  .biblio { grid-template-columns: 1fr; }
  .adm-kpi { grid-template-columns: 1fr; }
}
