/* ==========================================================================
   Back-office de la plateforme. Style inspiré de taap.it : fond clair, cartes blanches,
   boutons noirs, accent vert, pastilles pastel, icônes en « touches de clavier ».
   Police : Open Sauce Sans (OFL), auto-hébergée.
   ========================================================================== */
@font-face { font-family: "Open Sauce Sans"; src: url("fonts/open-sauce-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sauce Sans"; src: url("fonts/open-sauce-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Open Sauce Sans"; src: url("fonts/open-sauce-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Open Sauce Sans"; src: url("fonts/open-sauce-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #1d1d1e;
  --ink-2: #3a3a3c;
  --muted: #575757;
  --faint: #8a8a8e;
  --bg: #f8f8f8;
  --card: #ffffff;
  --line: #e9e9ea;
  --line-2: #dcdce0;
  --green: #34d16c;
  --green-ink: #12803a;
  --green-bg: #e7f9ee;
  --red: #e1001a;
  --red-bg: #fdecee;
  --orange: #b25e00;
  --orange-bg: #fef4eb;
  --blue: #1f5fbf;
  --blue-bg: #e5f3fe;
  --purple: #6a4bc4;
  --purple-bg: #efeaff;
  --yellow-bg: #fff7d6;
  --radius: 16px;
  --radius-s: 10px;
  --radius-btn: 8px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 40px rgb(0 0 0 / 0.12), 0 2px 6px rgb(0 0 0 / 0.05);
  --sidebar: 248px;
  --top: 64px;
  --font: "Open Sauce Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.04em; }
h2 { font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico--s { width: 15px; height: 15px; }
.ico--l { width: 22px; height: 22px; }

/* ---------- Mise en page ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--card); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; }
.brand__logo { width: 36px; height: 36px; border-radius: 10px; background: #1a171b; display: grid; place-items: center; flex: none; }
.brand__logo img { width: 26px; height: 26px; }
.brand b { display: block; font-size: 15px; letter-spacing: -0.02em; }
.brand span { display: block; font-size: 12px; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav__titre { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.nav a .badge { margin-left: auto; }
.keycap { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); box-shadow: 0 1.5px 0 var(--line-2); flex: none; }
.keycap .ico { width: 15px; height: 15px; }
.keycap--l { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 2.5px 0 var(--line-2); }
.keycap--l .ico { width: 20px; height: 20px; }
.sidebar__bas { margin-top: auto; padding-top: 14px; display: grid; gap: 8px; }
/* Sélecteur de site (comptes agence, comptes ayant plusieurs sites) */
.site-select { margin: 0 4px 10px; width: calc(100% - 8px); }
/* Contenus d'un site connecté : sections à gauche, formulaire à droite */
.contenus-grille { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .contenus-grille { grid-template-columns: 1fr; } }
.contenus-nav { display: grid; gap: 2px; padding: 8px; }
.contenus-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.contenus-nav a:hover { background: var(--bg); }
.contenus-nav a[aria-current="page"] { background: var(--bg); font-weight: 600; }
/* Tous les sites */
.sites-table td, .sites-table th { white-space: nowrap; }
.sites-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lien-invitation { display: flex; gap: 8px; align-items: center; }
.lien-invitation .code { flex: 1; overflow-x: auto; white-space: nowrap; }
.moi { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--purple-bg); color: var(--purple); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.moi b { display: block; font-size: 13px; }
.moi span { display: block; font-size: 12px; color: var(--muted); }
.moi .icon-btn { margin-left: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgb(248 248 248 / 0.85); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.topbar.is-scrolled { border-color: var(--line); }
.topbar__titre { font-weight: 600; font-size: 15px; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
.page { padding: 28px 28px 80px; max-width: 1180px; width: 100%; }
.page--large { max-width: none; }
.page__head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page__head p { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.page__head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Composants ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__pad { padding: 20px; }
.card__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card__head h2 { font-size: 16px; }
.card__head .actions { margin-left: auto; display: flex; gap: 6px; }
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: var(--gap, 8px); flex-wrap: wrap; }
.spacer { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--radius-btn); border: 1px solid transparent; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background-color .15s, box-shadow .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--noir { background: var(--ink); color: #fff; }
.btn--noir:hover:not(:disabled) { background: #000; box-shadow: 0 4px 14px rgb(0 0 0 / 0.18); }
.btn--vert { background: var(--green); color: #06280f; }
.btn--vert:hover:not(:disabled) { background: #2bc260; }
.btn--blanc { background: var(--card); border-color: var(--line-2); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.btn--blanc:hover:not(:disabled) { background: var(--bg); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover:not(:disabled) { background: rgb(0 0 0 / 0.05); }
.btn--danger { background: var(--card); border-color: #f3c1c7; color: var(--red); }
.btn--danger:hover:not(:disabled) { background: var(--red-bg); }
.btn--s { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn--l { height: 46px; padding: 0 20px; font-size: 15px; }
.btn--plein { width: 100%; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink-2); flex: none; }
.icon-btn:hover:not(:disabled) { background: rgb(0 0 0 / 0.05); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn--bord { border-color: var(--line-2); background: var(--card); }
.icon-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge--vert { background: var(--green-bg); color: var(--green-ink); border-color: #c6efd5; }
.badge--rouge { background: var(--red-bg); color: #b0001a; border-color: #f6cbd1; }
.badge--orange { background: var(--orange-bg); color: var(--orange); border-color: #f8dcc1; }
.badge--bleu { background: var(--blue-bg); color: var(--blue); border-color: #c9e3fb; }
.badge--violet { background: var(--purple-bg); color: var(--purple); border-color: #ddd3fb; }
.badge--jaune { background: var(--yellow-bg); color: #7a5b00; border-color: #f1e2a7; }
.badge--noir { background: var(--ink); color: #fff; border-color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.pill-green { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--green-bg); color: var(--green-ink); font-size: 13px; font-weight: 600; }
.pill-green .dot { background: var(--green); box-shadow: 0 0 0 3px rgb(52 209 108 / 0.25); }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 600; font-size: 13px; color: var(--ink); }
.field .aide { font-size: 12.5px; color: var(--muted); }
.input, .textarea, .select { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-btn); background: var(--card); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input:hover, .textarea:hover, .select:hover { border-color: #c5c5ca; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(29 29 30 / 0.08); }
.input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgb(225 0 26 / 0.08); }
.input--s { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.compteur { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.compteur.est-long { color: var(--orange); }
.compteur.est-trop { color: var(--red); }
.erreur { color: #b0001a; font-size: 13px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.switch { position: relative; width: 38px; height: 22px; flex: none; appearance: none; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: transform .2s; }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(16px); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: #efeff1; }
.segmented button { height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.segmented button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.1); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 13px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Statistiques et listes ---------- */
.stat { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; text-decoration: none; transition: box-shadow .15s, transform .15s; }
a.stat:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.stat__haut { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
.stat__val { font-size: 32px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.stat--peche { background: var(--orange-bg); border-color: #f8e3cf; }
.stat--bleu { background: var(--blue-bg); border-color: #d2e8fb; }
.stat--violet { background: var(--purple-bg); border-color: #e3dbfb; }
.stat--vert { background: var(--green-bg); border-color: #cdeedb; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.liste > li:first-child { border-top: 0; }
.liste .ligne-lien { text-decoration: none; display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.liste .titre { display: block; font-weight: 600; font-size: 14px; }
.liste .sous { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste .info { min-width: 0; flex: 1; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fcfcfc; white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: #fbfbfb; }
.table .non-lu td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.vide { padding: 48px 24px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 12px; }
.vide h3 { color: var(--ink); font-size: 16px; }
.progress { height: 8px; border-radius: 999px; background: #ececef; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .3s; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--blue-bg); color: #123e7a; font-size: 14px; border: 1px solid #d2e8fb; }
.notice--jaune { background: var(--yellow-bg); color: #5c4600; border-color: #f1e2a7; }
.notice--vert { background: var(--green-bg); color: #0c5a28; border-color: #cdeedb; }
.notice--rouge { background: var(--red-bg); color: #8a0014; border-color: #f6cbd1; }
.notice .ico { margin-top: 2px; }
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: #fff; box-shadow: 0 1px 0 var(--line-2); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: #f3f3f5; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; white-space: pre; overflow-x: auto; line-height: 1.6; }
.sep { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; height: 44px; padding: 0 12px; border: 0; background: none; font-weight: 600; font-size: 13.5px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background-color: var(--bg); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; background-position: center; }
.login__box { width: min(420px, 100%); padding: 32px; display: grid; gap: 22px; }
.login__logo { width: 56px; height: 56px; border-radius: 16px; background: #1a171b; display: grid; place-items: center; }
.login__logo img { width: 40px; height: 40px; }
/* Sans logo : initiales du site ou de la plateforme. */
.login__initiales { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.login__logo .login__initiales { font-size: 20px; }
.login h1 { font-size: 26px; }
.login p { color: var(--muted); }

/* ---------- Fenêtres, notifications ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgb(20 20 22 / 0.35); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 20px; animation: fondu .15s ease-out; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--card); border-radius: 18px; box-shadow: var(--shadow-lg); animation: monte .2s cubic-bezier(.2, .9, .3, 1); }
.modal--l { width: min(980px, 100%); }
.modal__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 17px; }
.modal__head .icon-btn { margin-left: auto; }
.modal__body { padding: 20px; overflow-y: auto; display: grid; gap: 16px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fcfcfc; border-radius: 0 0 18px 18px; }
.drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--card); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: glisse .2s cubic-bezier(.2, .9, .3, 1); }
.toasts { position: fixed; z-index: 200; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: monte .2s cubic-bezier(.2, .9, .3, 1); max-width: min(560px, calc(100vw - 32px)); }
.toast--ok .ico { color: var(--green); }
.toast--erreur { background: #8a0014; }
.toast button { margin-left: 6px; color: #fff; background: rgb(255 255 255 / 0.15); border: 0; border-radius: 6px; padding: 3px 8px; font-weight: 600; font-size: 13px; }
@keyframes fondu { from { opacity: 0; } }
@keyframes monte { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes glisse { from { transform: translateX(30px); opacity: 0; } }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: tourne .7s linear infinite; display: inline-block; flex: none; }
@keyframes tourne { to { transform: rotate(360deg); } }
.chargement { display: grid; place-items: center; padding: 80px; color: var(--muted); gap: 12px; }

/* ---------- Pages du site ---------- */
.pages-groupe h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin: 8px 0 10px; }
.page-carte { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.page-carte:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.page-carte b { display: block; font-size: 14.5px; }
.page-carte span.url { display: block; font-size: 12.5px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.page-carte .badge { margin-left: auto; }

/* ---------- Éditeur visuel ---------- */
.editeur { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: 56px minmax(0, 1fr); background: #ececef; }
.editeur__barre { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--card); border-bottom: 1px solid var(--line); min-width: 0; }
.editeur__barre .sep-v { width: 1px; height: 24px; background: var(--line); margin: 0 4px; flex: none; }
.editeur__corps { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; }
.editeur__scene { position: relative; overflow: hidden; display: grid; place-items: start center; padding: 14px; min-height: 0; }
.editeur__cadre { position: relative; width: 100%; height: 100%; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), var(--shadow); overflow: hidden; transition: width .3s cubic-bezier(.2, .9, .3, 1); }
.editeur__cadre iframe { width: 100%; height: 100%; border: 0; display: block; }
.editeur__cadre.tablette { width: 834px; }
.editeur__cadre.mobile { width: 390px; }
.editeur__voile { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(255 255 255 / 0.7); z-index: 5; }
.panneau { background: var(--card); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panneau__corps { overflow-y: auto; padding: 16px; display: grid; gap: 16px; align-content: start; grid-auto-rows: max-content; grid-template-columns: minmax(0, 1fr); flex: 1; min-height: 0; }
.page-select { display: flex; align-items: center; gap: 8px; min-width: 0; }
.page-select select { height: 36px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 30px 0 10px; font-weight: 600; max-width: 260px; background: #fff; }
.etat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.etat .dot { color: var(--green); }
.etat.est-attente .dot { color: #f0a500; }
.etat.est-erreur { color: var(--red); }
.etat.est-erreur .dot { color: var(--red); }
.outils-texte { position: absolute; z-index: 30; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); }
.outils-texte button { height: 30px; min-width: 30px; padding: 0 7px; border: 0; border-radius: 7px; background: transparent; color: #fff; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
.outils-texte button:hover { background: rgb(255 255 255 / 0.15); }
.outils-texte button[aria-pressed="true"] { background: rgb(255 255 255 / 0.22); }
.outils-texte .sep-v { width: 1px; height: 18px; background: rgb(255 255 255 / 0.25); margin: 0 3px; }
.outils-liste { position: absolute; z-index: 29; display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-lg); }
.outils-liste button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; display: grid; place-items: center; color: var(--ink-2); }
.outils-liste button:hover { background: var(--bg); color: var(--ink); }
.outils-liste button.danger:hover { background: var(--red-bg); color: var(--red); }
.outils-liste .lib { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 0 6px 0 8px; display: flex; align-items: center; }
.champ { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.champ.est-actif { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(29 29 30 / 0.06); }
.champ__haut { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.champ__haut .badge { height: 20px; font-size: 11px; }
.champ__haut .actions { margin-left: auto; display: flex; gap: 2px; }
.mini-editeur { min-height: 40px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; line-height: 1.5; font-size: 14px; outline: none; overflow-wrap: anywhere; }
.mini-editeur:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(29 29 30 / 0.08); }
.mini-editeur .cms-token, .cms-token-preview { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--purple-bg); color: var(--purple); font-weight: 600; font-size: .92em; }
.mini-editeur .accent { color: var(--red); }
.vignette { position: relative; border-radius: 10px; overflow: hidden; background: repeating-conic-gradient(#f2f2f4 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); }
.vignette img { width: 100%; height: 100%; object-fit: cover; }
.vignette--focal { cursor: crosshair; aspect-ratio: 16 / 10; }
.vignette--focal img { object-fit: contain; background: #fff; }
.focal-point { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ink), 0 2px 8px rgb(0 0 0 / 0.4); pointer-events: none; }
.section-titre { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-top: 6px; }
.accordeon { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.accordeon + .accordeon { margin-top: 8px; }
.accordeon > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.accordeon > summary::-webkit-details-marker { display: none; }
.accordeon > summary .ico { transition: transform .2s; color: var(--faint); }
.accordeon[open] > summary > .ico:first-child { transform: rotate(90deg); }
.accordeon > summary .badge { margin-left: auto; }
.accordeon__corps { padding: 4px 14px 14px; display: grid; gap: 10px; }
.serp { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-family: Arial, sans-serif; }
.serp__url { font-size: 12px; color: #202124; display: flex; gap: 6px; align-items: center; }
.serp__url span { color: #5f6368; }
.serp__titre { font-size: 18px; color: #1a0dab; line-height: 1.3; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp__desc { font-size: 13px; color: #4d5156; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Médiathèque ---------- */
.medias { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.media { position: relative; display: grid; gap: 6px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: #fff; text-align: left; transition: box-shadow .15s, border-color .15s; }
.media:hover { box-shadow: var(--shadow-lg); }
.media[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(29 29 30 / 0.12); }
.media .vignette { aspect-ratio: 4 / 3; }
.media b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media span { font-size: 11.5px; color: var(--muted); }
.media .badge { position: absolute; top: 14px; left: 14px; height: 20px; font-size: 11px; }
.depot { display: grid; place-items: center; gap: 8px; padding: 28px; border: 1.5px dashed var(--line-2); border-radius: 14px; text-align: center; color: var(--muted); background: #fcfcfc; transition: border-color .15s, background .15s; }
.depot.est-survol { border-color: var(--green); background: var(--green-bg); color: var(--green-ink); }
.depot b { color: var(--ink); }
.envoi { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 12px; border-radius: 10px; background: var(--bg); }
.envoi .progress { flex: 1; }

/* ---------- Tarifs ---------- */
.grille { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.grille th, .grille td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grille thead th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.grille .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-width: 190px; }
.grille .duo label { font-size: 11px; color: var(--muted); font-weight: 600; display: grid; gap: 3px; }
.euro { position: relative; }
.euro input { padding-right: 24px; }
.euro::after { content: "€"; position: absolute; right: 9px; bottom: 7px; color: var(--muted); font-size: 13px; }

/* ---------- Retours ---------- */
.retours { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: 56px minmax(0, 1fr); background: #ececef; }
.retours .editeur__corps { grid-template-columns: minmax(0, 1fr) 440px; }
.commentaire { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.commentaire.est-actif { border-color: var(--ink); }
.commentaire__haut { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.commentaire__haut b { color: var(--ink); }
.commentaire__num { width: 24px; height: 24px; border-radius: 50% 50% 50% 4px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.commentaire.est-fait .commentaire__num { background: var(--green); }
.commentaire p { white-space: pre-wrap; font-size: 14px; }
.reponse { padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: 13.5px; white-space: pre-wrap; }
.reponse b { font-size: 12px; }
.bulle { position: absolute; z-index: 40; width: 320px; padding: 14px; display: grid; gap: 10px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.q-section { display: grid; gap: 14px; }
.q-item { display: grid; gap: 8px; }
.q-item > .label { font-size: 14px; }
.q-item .aide { font-size: 12.5px; color: var(--muted); }
.etoiles { display: flex; gap: 4px; }
.etoiles button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font-weight: 700; }
.etoiles button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.slot .vignette { aspect-ratio: 1; }
.slot__nom { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; word-break: break-all; }
.arbre { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.7; background: #fbfbfc; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; white-space: pre; overflow-x: auto; }

/* ---------- Aide ---------- */
.aide-texte { display: grid; gap: 12px; font-size: 14.5px; line-height: 1.65; }
.aide-texte h3 { font-size: 15.5px; margin-top: 8px; }
.aide-texte ul, .aide-texte ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* ---------- Écrans étroits ---------- */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editeur__corps, .retours .editeur__corps { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; left: 0; width: 280px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .app.menu-ouvert .sidebar { transform: none; }
  .menu-btn { display: inline-grid; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .editeur__corps, .retours .editeur__corps { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 46vh); }
  .panneau { border-left: 0; border-top: 1px solid var(--line); }
  .masque-etroit { display: none !important; }
}
@media (max-width: 520px) {
  .grid--4 { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 24px; }
  .modal__foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
