/* ==========================================================================
   Bibliotheque PLR - feuille de style
   ========================================================================== */

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #f0efea;
  --ink: #17181c;
  --ink-2: #3b3d45;
  --muted: #6d6f78;
  --line: #e4e2dc;
  --line-strong: #d3d0c8;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: #ecebff;
  --ok: #15803d;
  --danger: #c2410c;
  --shadow-sm: 0 1px 2px rgba(23, 24, 28, .06);
  --shadow-md: 0 8px 24px -8px rgba(23, 24, 28, .18);
  --shadow-lg: 0 24px 64px -16px rgba(23, 24, 28, .35);
  --radius: 14px;
  --radius-sm: 10px;
  --topbar: 64px;
  --sidebar: 296px;

  --c-gsheets: #188038;
  --c-excel: #107c41;
  --c-notion: #2f3437;
  --c-printable: #7c3aed;
  --c-worksheet: #d97706;
  --c-digital: #db2777;
  --c-ebook: #b45309;
  --c-social: #e11d48;
  --c-course: #0e7490;
  --c-cv: #2563eb;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111215;
    --surface: #1a1b20;
    --surface-2: #22242a;
    --ink: #f1f0ec;
    --ink-2: #d2d1cc;
    --muted: #9a9ba3;
    --line: #2c2e35;
    --line-strong: #3a3d45;
    --accent: #8b85ff;
    --accent-ink: #0f0f14;
    --accent-soft: #25244a;
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, .8);
    --c-notion: #d4d4d4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111215;
  --surface: #1a1b20;
  --surface-2: #22242a;
  --ink: #f1f0ec;
  --ink-2: #d2d1cc;
  --muted: #9a9ba3;
  --line: #2c2e35;
  --line-strong: #3a3d45;
  --accent: #8b85ff;
  --accent-ink: #0f0f14;
  --accent-soft: #25244a;
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, .8);
  --c-notion: #d4d4d4;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
code, pre, kbd { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .86em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Boutons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn--small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--danger { color: var(--danger); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.link-btn:hover { color: var(--ink); }

/* --- Pages courtes (installation, connexion) ------------------------------ */
.page-auth {
  min-height: 100vh;
  background:
    radial-gradient(1000px 500px at 10% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(800px 500px at 110% 110%, color-mix(in srgb, var(--c-digital) 14%, transparent), transparent 60%),
    var(--bg);
}
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card {
  width: 100%; max-width: 420px; padding: 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg);
}
.auth-card--wide { max-width: 560px; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.auth-brand h1 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.auth-kicker { margin: 0 0 2px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.check-list { list-style: none; margin: 0 0 20px; padding: 14px; display: grid; gap: 8px; background: var(--surface-2); border-radius: var(--radius-sm); }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check-list small { display: block; color: var(--danger); }
.check-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--ok); }
.is-ko .check-dot { background: var(--danger); }

.form { display: grid; gap: 14px; }
.form--inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .form select, .form input[type="file"] {
  width: 100%; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 15px; font-weight: 500;
}
.form--inline select, .form--inline input[type="file"] { width: auto; }
.form input[type="file"] { padding: 9px 12px; }
.field input:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.alert { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.alert--error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.alert--ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.muted { color: var(--muted); }

/* --- Parametres ------------------------------------------------------------- */
.admin-top { display: flex; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.admin-wrap { max-width: 820px; margin: 0 auto; padding: 32px 16px 64px; }
.admin-wrap h1 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 20px; }
.panel h2 { margin: 0 0 6px; font-size: 18px; }
.stat-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 16px 0 8px; }
.stat-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-gsheets), var(--accent)); }
.details { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; }
.details summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.steps { padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.code-box { position: relative; margin-bottom: 14px; }
.code-box .btn { position: absolute; top: 8px; right: 8px; }
.code-box pre { margin: 0; padding: 16px; max-height: 320px; overflow: auto; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 12px; }
.path-list { max-height: 260px; overflow: auto; font-size: 12px; color: var(--muted); padding-left: 18px; }

/* --- Application ------------------------------------------------------------ */
.page-app { overflow: hidden; }
.app {
  height: 100vh; height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  grid-template-rows: var(--topbar) minmax(0, 1fr);
  grid-template-areas: "top top" "side main";
}

.topbar {
  grid-area: top; z-index: 30;
  display: flex; align-items: center; gap: 16px; padding: 0 16px 0 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; width: calc(var(--sidebar) - 36px); flex: none; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search {
  flex: 1; max-width: 640px; display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid transparent; color: var(--muted);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.search:focus-within { background: var(--surface); border-color: var(--line-strong); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; color: var(--ink); }
.search kbd { padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 11px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); margin-right: 6px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Menu lateral */
.sidebar { grid-area: side; overflow-y: auto; border-right: 1px solid var(--line); background: var(--surface); padding: 14px 12px 40px; scrollbar-width: thin; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.sidebar-tools { display: flex; gap: 10px; text-transform: none; letter-spacing: 0; }
.nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.nav-cat, .nav-subs ul li { min-width: 0; }
.nav-subs ul { grid-template-columns: minmax(0, 1fr); }
.nav-all, .nav-cat-btn, .nav-sub {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 0; background: none; text-align: left; text-decoration: none; color: var(--ink-2);
  border-radius: 10px;
}
.nav-all { padding: 9px 10px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.nav-cat { border-radius: 12px; }
.nav-cat-row { display: flex; align-items: center; border-radius: 10px; }
.nav-cat-row:hover, .nav-all:hover, .nav-sub:hover { background: var(--surface-2); }
.nav-cat-btn { flex: 1; min-width: 0; padding: 9px 4px 9px 10px; font-weight: 650; color: var(--ink); }
.nav-icon { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: 15px; background: var(--surface-2); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.nav-count { flex: none; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-toggle { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 8px; }
.nav-toggle:hover { color: var(--ink); background: var(--line); }
.nav-toggle svg { transition: transform .2s; }
.nav-cat.is-open .nav-toggle svg { transform: rotate(90deg); }
.nav-subs { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.nav-cat.is-open .nav-subs { grid-template-rows: 1fr; }
.nav-subs-inner { overflow: hidden; }
.nav-subs ul { list-style: none; margin: 2px 0 8px 23px; padding: 0 0 0 12px; border-left: 1px solid var(--line); display: grid; gap: 1px; }
.nav-sub { padding: 6px 10px; font-size: 13.5px; }
.nav-sub .nav-label { font-size: 13.5px; }
.is-current, .is-current:hover { background: var(--accent-soft) !important; color: var(--accent) !important; }
.is-current .nav-count { color: var(--accent); }
.nav-sub.is-empty { opacity: .45; }

/* Zone principale */
.main { grid-area: main; overflow-y: auto; outline: none; scroll-behavior: smooth; }
.content { max-width: 1480px; margin: 0 auto; padding: 28px 28px 80px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.page-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.page-title h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: -.035em; }
.page-title .count { color: var(--muted); font-weight: 600; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ink-2); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dt, var(--muted)); }
.chip .n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.is-on .n { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.chip.is-on .dot { box-shadow: 0 0 0 2px var(--bg); }
.chip[disabled] { opacity: .4; cursor: default; }
.select {
  height: 34px; padding: 0 30px 0 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236d6f78' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none; font-size: 13px; font-weight: 600;
}
.clear-filters { font-size: 13px; }

/* Sous-categories en vignettes (vue categorie) */
.sub-tiles { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: -4px 0 18px; scrollbar-width: thin; }
.sub-tile {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.sub-tile:hover { border-color: var(--line-strong); color: var(--ink); }
.sub-tile span { color: var(--muted); font-weight: 500; }

/* Grille produits */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  text-align: left; padding: 0; color: inherit; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .3s; }
.card-media img.is-loading { opacity: 0; }
.card:hover .card-media img { transform: scale(1.04); }
.card-badges { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.card-lang, .card-kind {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 8px; border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  background: rgba(17, 18, 21, .78); color: #fff; backdrop-filter: blur(6px);
}
.card-kind { top: auto; bottom: 10px; right: 10px; font-weight: 700; letter-spacing: 0; }
.card-body { display: grid; gap: 8px; padding: 14px 16px 16px; }
.card-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { margin: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dt-row { display: flex; flex-wrap: wrap; gap: 5px; }
.dt {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--dt); background: color-mix(in srgb, var(--dt) 12%, transparent);
}
.card-links { flex: none; font-size: 11.5px; font-weight: 600; color: var(--muted); }

.dt-gsheets { --dt: var(--c-gsheets); }
.dt-excel { --dt: var(--c-excel); }
.dt-notion { --dt: var(--c-notion); }
.dt-printable { --dt: var(--c-printable); }
.dt-worksheet { --dt: var(--c-worksheet); }
.dt-digital { --dt: var(--c-digital); }
.dt-ebook { --dt: var(--c-ebook); }
.dt-social { --dt: var(--c-social); }
.dt-course { --dt: var(--c-course); }
.dt-cv { --dt: var(--c-cv); }
.dt-canva { --dt: #6d28d9; }
.dt-canva_edit { --dt: #00a3b0; }
.dt-coll2027 { --dt: #c2410c; }
.dt-youtube { --dt: #ff0000; }
.card-yt { position: absolute; left: 10px; bottom: 10px; display: grid; place-items: center; width: 34px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); }
.chip-yt svg { flex: none; }
.chip-yt.is-on { background: #ff0000; border-color: #ff0000; color: #fff; }
.chip-yt.is-on .n { color: rgba(255, 255, 255, .8); }
.chips-sep { flex-basis: 100%; height: 0; }
.chips-sep { display: block; font-size: 0; }

.more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.empty { display: grid; place-items: center; gap: 10px; text-align: center; padding: 80px 20px; color: var(--muted); }
.empty strong { color: var(--ink); font-size: 18px; }

.loading { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Accueil */
.hero {
  position: relative; overflow: hidden;
  padding: 28px; margin-bottom: 26px; border-radius: 22px;
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--c-digital) 10%, var(--surface)));
  border: 1px solid var(--line);
}
.hero h1 { margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.04em; line-height: 1.05; }
.hero p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.stat { padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 20px; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 34px; }
.cat-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s;
}
.cat-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.cat-card .nav-icon { width: 44px; height: 44px; font-size: 22px; border-radius: 12px; }
.cat-card b { display: block; font-size: 15px; line-height: 1.25; }
.cat-card span { font-size: 12.5px; color: var(--muted); }
.section-title { font-size: 18px; letter-spacing: -.02em; margin: 0 0 14px; }

/* --- Fiche produit (panneau) ----------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(12, 12, 16, .5); backdrop-filter: blur(3px); animation: fade .2s ease; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(1120px, 100%);
  background: var(--surface); box-shadow: var(--shadow-lg); overflow-y: auto;
  animation: slide .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 3; background: var(--surface); box-shadow: var(--shadow-md); border-radius: 50%; }
.product { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 36px; padding: 28px 36px 36px; }

.gallery { position: sticky; top: 24px; align-self: start; display: grid; gap: 12px; }
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .9); color: #17181c; box-shadow: var(--shadow-md);
}
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-count { position: absolute; bottom: 10px; right: 12px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(17, 18, 21, .72); color: #fff; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); }
.thumbs button.is-on { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.info { display: grid; gap: 22px; align-content: start; min-width: 0; }
.info-head { display: grid; gap: 10px; }
.info-head .crumbs { margin: 0; }
.info h2 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.12; letter-spacing: -.035em; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.pill--warn { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.summary { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }

.block-title { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

/* Actions (liens d'edition / telechargement) */
.actions { display: grid; gap: 10px; }
.action {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 12px 12px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.action:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.action-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--dt); }
.dt-notion .action-icon { color: var(--surface); }
.action-text { min-width: 0; }
.action-text b { display: block; font-size: 15px; }
.action-text span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-btns { display: flex; align-items: center; gap: 6px; }
.action .btn--primary { background: var(--dt); border-color: var(--dt); color: #fff; }
.dt-notion.action .btn--primary { color: var(--surface); }
.action .btn--primary:hover { filter: brightness(1.08); }
.parts { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.parts a {
  display: grid; place-items: center; min-width: 40px; height: 38px; padding: 0 12px;
  font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; border-left: 1px solid var(--line-strong);
}
.parts a:first-child { border-left: 0; }
.parts a:hover { background: var(--dt); color: #fff; }
.copy-btn { width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.action--off { background: var(--surface-2); border-style: dashed; }
.action--off .action-icon { background: var(--line-strong); }

.files { grid-column: 1 / -1; display: grid; gap: 4px; margin-top: 2px; }
.file {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px;
}
.file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file a { flex: none; font-weight: 700; font-size: 12.5px; text-decoration: none; color: var(--dt); }
.file--off { color: var(--muted); }

.extra-links { display: flex; flex-wrap: wrap; gap: 8px; }
.extra-links .btn { min-height: 34px; font-size: 13px; }

.highlights { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.highlights li { position: relative; padding-left: 26px; color: var(--ink-2); }
.highlights li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%234f46e5' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
}
.includes { display: flex; flex-wrap: wrap; gap: 6px; }
.includes span { padding: 5px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.aliases { font-size: 12px; color: var(--muted); }

.related { position: relative; z-index: 1; margin: 0 36px 48px; border-top: 1px solid var(--line); padding-top: 26px; background: var(--surface); }
@media (max-width: 1100px) { .related { margin: 0 20px 40px; } }
.related .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: fade .2s ease;
}

.only-mobile { display: none; }
.scrim { position: fixed; inset: var(--topbar) 0 0 0; background: rgba(0, 0, 0, .45); z-index: 25; }

/* --- Responsive --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .product { grid-template-columns: 1fr; padding: 20px 20px 40px; gap: 24px; }
  .gallery { position: static; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .only-mobile { display: inline-grid; }
  .only-desktop { display: none; }
  .brand { width: auto; }
  .brand span { display: none; }
  .sidebar {
    position: fixed; top: var(--topbar); bottom: 0; left: 0; z-index: 26; width: min(320px, 86vw);
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
  }
  .app.nav-open .sidebar { transform: none; }
  .content { padding: 20px 16px 64px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .seg { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-body { padding: 10px 12px 12px; }
  .chips { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .chip { flex: none; }
  .drawer-close { position: fixed; top: 10px; right: 10px; margin: 0; }
  .card-title { font-size: 14px; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; }
  .topbar-actions .icon-btn[href="admin.php"] { display: none; }
  .action { grid-template-columns: 40px minmax(0, 1fr); }
  .action-icon { width: 40px; height: 40px; }
  .action-btns { grid-column: 1 / -1; flex-wrap: wrap; }
  .action-btns .btn--primary { flex: 1; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.file em { font-style: normal; font-size: 12px; color: var(--muted); flex: none; }

/* Canva : apercu + edition / copie */
.btn--soft { background: var(--surface-2); border-color: transparent; color: var(--ink-2); }
.btn--soft:hover { background: var(--line); border-color: transparent; color: var(--ink); }
.file-btns { display: inline-flex; gap: 6px; flex: none; overflow: visible !important; }
.canva-parts .file { padding: 6px 6px 6px 12px; }
.canva-parts .file > span:first-child { font-weight: 700; }
.canva-parts .btn--small { min-height: 30px; font-size: 12.5px; padding: 0 11px; }

/* --- Bundles ------------------------------------------------------------------ */
.nav-bundles { margin-top: -2px; }
.bundles-head { align-items: center; }
.bundles-create { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.bundle-form { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 22px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.bundle-form input { flex: 1; min-width: 220px; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 15px; }
.bundle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.bundle-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.bundle-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.bundle-thumbs { display: grid; grid-template-columns: repeat(2, 1fr); aspect-ratio: 16 / 10; background: var(--surface-2); gap: 2px; text-decoration: none; }
.bundle-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.bundle-thumbs img:only-child { grid-column: 1 / -1; grid-row: span 2; }
.bundle-empty-thumb { grid-column: 1 / -1; display: grid; place-items: center; font-size: 42px; }
.bundle-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.bundle-name { font-weight: 800; font-size: 16px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.bundle-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
.bundle-actions { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.bundle-actions .icon-btn { width: 34px; height: 34px; }
.bundle-actions .icon-btn:last-child:hover { color: var(--danger); }
.bundle-item { position: relative; }
.bundle-item .card { height: 100%; }
.bundle-remove { position: absolute; top: 8px; left: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(17, 18, 21, .78); color: #fff; opacity: 0; transition: opacity .15s; }
.bundle-item:hover .bundle-remove, .bundle-remove:focus-visible { opacity: 1; }
.bundle-remove:hover { background: var(--danger); }
@media (hover: none) { .bundle-remove { opacity: 1; } }
.bundle-picker { position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bundle-chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.bundle-menu { position: absolute; top: 46px; left: 0; z-index: 5; width: min(340px, 100%); padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); display: grid; gap: 2px; }
.bundle-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.bundle-option:hover { background: var(--surface-2); }
.bundle-option input { width: 17px; height: 17px; accent-color: var(--accent); }
.bundle-option span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bundle-option small { color: var(--muted); font-weight: 600; }
.bundle-menu-empty { margin: 4px 8px; font-size: 13px; color: var(--muted); }
.bundle-quick { display: flex; gap: 6px; padding: 8px 4px 2px; margin-top: 4px; border-top: 1px solid var(--line); }
.bundle-quick input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; }

/* --- Personnalisation : categories, editeur, modale ---------------------------- */
.link-btn--accent { color: var(--accent); }
.new-product-btn { margin-right: 6px; }
.title-row { display: flex; align-items: flex-start; gap: 12px; }
.title-row h2 { flex: 1; min-width: 0; }
.edit-btn { flex: none; margin-top: 4px; }
.pill--accent { background: var(--accent-soft); color: var(--accent); }
.content--narrow { max-width: 980px; }
.muted { color: var(--muted); }

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(12, 12, 16, .5); backdrop-filter: blur(3px); animation: fade .15s ease; }
.modal-panel { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; gap: 14px;
  padding: 24px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); animation: fade .15s ease; }
.modal-panel h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.modal-panel p { margin: 0; font-size: 14px; }
.modal-fields { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.modal-warning { padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  background: color-mix(in srgb, #f59e0b 16%, transparent); color: var(--ink); border: 1px solid color-mix(in srgb, #f59e0b 40%, transparent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.btn--danger-fill { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important; }
.field input, .field select, .field textarea, .ed-link select, .ed-link input {
  width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500;
}
.field textarea { padding: 10px 12px; line-height: 1.5; resize: vertical; }
.field select:focus, .field textarea:focus, .ed-link input:focus, .ed-link select:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.field--icon input { text-align: center; font-size: 20px; }

.cm-help { margin: -8px 0 20px; max-width: 70ch; font-size: 14px; }
.cm-list { display: grid; gap: 14px; }
.cm-cat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px; }
.cm-cat--orphan { border-style: dashed; }
.cm-row { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 2px 8px; border-radius: 10px; }
.cm-row:hover { background: var(--surface-2); }
.cm-row--cat { font-weight: 700; }
.cm-label { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-label:hover { color: var(--accent); }
.cm-count { color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cm-note { font-size: 12px; color: var(--muted); font-weight: 500; }
.cm-tools { display: flex; align-items: center; gap: 2px; }
.cm-tools .icon-btn { width: 34px; height: 34px; }
.cm-danger:hover { color: var(--danger); }
.cm-subs { list-style: none; margin: 2px 0 4px 44px; padding: 0 0 0 10px; border-left: 1px solid var(--line); display: grid; gap: 1px; font-size: 14px; }

.editor { display: grid; gap: 16px; }
.editor .panel { margin: 0; display: grid; gap: 14px; }
.editor .panel h2 { margin: 0; }
.editor .panel > .muted { margin: -8px 0 0; font-size: 13px; }
.check-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer; font-size: 13px; font-weight: 600; }
.check-chip input { accent-color: var(--dt, var(--accent)); }
.check-chip:has(input:checked) { border-color: var(--dt, var(--accent)); background: color-mix(in srgb, var(--dt, var(--accent)) 10%, transparent); }
.ed-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ed-image { position: relative; margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--surface-2); }
.ed-image.is-default { border-color: var(--accent); }
.ed-image img { width: 100%; height: 100%; object-fit: cover; }
.ed-default { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.ed-img-btn { position: absolute; top: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(17, 18, 21, .75); color: #fff; font-size: 15px; }
.ed-star { left: 6px; }
.ed-star:hover { background: #f59e0b; }
.ed-del { right: 6px; }
.ed-del:hover { background: var(--danger); }
.ed-del svg { width: 14px; height: 14px; }
.ed-upload { cursor: pointer; justify-self: start; }
.ed-upload-status { font-size: 13px; }
.ed-placeholder { max-width: 320px; }
.ed-links { display: grid; gap: 8px; }
.ed-link { display: grid; grid-template-columns: 230px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.ed-link-add { display: flex; flex-wrap: wrap; gap: 6px; }
.editor-bar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px;
  border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.editor-spacer { flex: 1; }
@media (max-width: 700px) {
  .ed-link { grid-template-columns: 1fr 40px; }
  .ed-link select { grid-column: 1 / -1; }
  .new-product-btn span { display: none; }
  .modal-fields { grid-template-columns: 70px 1fr; }
}
.field .check-chip input, .bundle-option input { width: 16px; height: 16px; min-height: 0; padding: 0; flex: none; }
.check-chip span { white-space: nowrap; }
.sidebar-tools { gap: 8px; white-space: nowrap; }
.sidebar-tools .link-btn { font-size: 11.5px; }
.sidebar-head { flex-wrap: wrap; row-gap: 4px; column-gap: 10px; }
/* Outils du menu en bas : Tout ouvrir / Tout fermer / Gérer */
.sidebar { display: flex; flex-direction: column; padding-bottom: 0; }
.sidebar .nav { flex: 1 0 auto; }
.sidebar-foot {
  position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: space-between; gap: 8px;
  margin: 12px -12px 0; padding: 12px 22px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); white-space: nowrap;
}
.sidebar-foot .link-btn { font-size: 12.5px; }

/* --- Barre de filtres alignee ------------------------------------------------- */
.toolbar { display: grid; gap: 10px; margin-bottom: 22px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.filter-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: start; gap: 12px; }
.filter-row + .filter-row { padding-top: 10px; border-top: 1px dashed var(--line); }
.filter-label { padding-top: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toolbar .chips { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.chip { height: 34px; gap: 8px; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dt, var(--muted)); flex: none; }
.chip .n { min-width: 18px; text-align: right; }
.chip-yt svg { flex: none; }
.filter-selects { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-row--end .filter-label { padding-top: 7px; }
.clear-filters svg { width: 14px; height: 14px; }
.sub-tiles { scrollbar-width: none; }
.sub-tiles::-webkit-scrollbar { display: none; }
@media (max-width: 900px) {
  .toolbar { padding: 12px; }
  .filter-row { grid-template-columns: 1fr; gap: 6px; }
  .filter-label { padding-top: 0; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
}

/* Zone de filtres repliable */
.toolbar { gap: 0; }
.toolbar-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 0 12px; border: 0; background: none; color: var(--ink); text-align: left; }
.toolbar-toggle-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.toolbar-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; letter-spacing: 0; }
.toolbar-toggle-hint { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.toolbar-toggle svg { flex: none; width: 18px; height: 18px; color: var(--muted); transform: rotate(-90deg); transition: transform .2s ease; }
.toolbar-toggle:hover .toolbar-toggle-hint, .toolbar-toggle:hover svg { color: var(--ink); }
.toolbar-body { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.toolbar.is-collapsed .toolbar-toggle { padding-bottom: 0; }
.toolbar.is-collapsed .toolbar-toggle svg { transform: rotate(90deg); }
.toolbar.is-collapsed .toolbar-body { display: none; }

/* Gestion des tags */
.manage-tags { margin-left: auto; color: var(--muted); }
.manage-tags:hover { color: var(--ink); }
.cm-subs--flat { margin-left: 8px; padding-left: 0; border-left: 0; }
.tag-swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.tag-preview { pointer-events: none; height: 30px; }
.cm-subs--flat .cm-label { flex: 1; }
.modal-fields--tag { grid-template-columns: 1fr 90px; }
.field--color input { padding: 4px; height: 42px; cursor: pointer; }

/* --- Corbeille ---------------------------------------------------------------- */
.title-row .btn--danger:hover { border-color: var(--danger); }
.trash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trash-item { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.trash-item img { width: 64px; height: 64px; flex: none; object-fit: cover; border-radius: 10px; background: var(--line); opacity: .75; }
.trash-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.trash-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-body .muted { font-size: 13px; }
.trash-tools { display: flex; align-items: center; gap: 6px; flex: none; }
@media (max-width: 560px) { .trash-item { flex-wrap: wrap; } .trash-tools { width: 100%; justify-content: flex-end; } }

.panel--row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel--row p { margin: 0; }

/* Suppression : en bas de la fiche, a l ecart des actions */
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 13px; }

/* --- Mise en ligne FTP (Parametres, localhost uniquement) ---------------------- */
.deploy-form { display: grid; gap: 14px; }
.deploy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.deploy-grid label, .deploy-checks label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.deploy-grid input { min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; }
.deploy-checks { display: grid; gap: 8px; }
.deploy-checks label { grid-template-columns: auto 1fr; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.deploy-checks input { width: 16px; height: 16px; accent-color: var(--accent); }
.deploy-sep { margin: 20px 0 14px; border: 0; border-top: 1px dashed var(--line); }
.deploy-progress { margin-top: 14px; display: grid; gap: 8px; }
.deploy-errors { max-height: 160px; overflow: auto; margin: 0; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--ink); font-size: 12px; white-space: pre-wrap; }

.deploy-clean { margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.deploy-clean summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.deploy-clean p { margin: 10px 0; }
.deploy-clean input { min-height: 40px; min-width: 220px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
