body.admin {
  font-size: 15px;
  --pad: 28px;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
}

.tester-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; background: var(--brand-light); color: var(--brand-dark);
  border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600; text-align: center;
}

.shell { display: flex; min-height: 100svh; }

.rail {
  width: 224px; flex: none; background: #F6F1EA;
  border-right: 1px solid var(--line); padding: 26px 0;
  display: flex; flex-direction: column;
}
.rail__brand { padding: 0 var(--pad) 26px; }
.rail__brand .studio { font-size: 11px; color: var(--brand-dark); }
.rail__out-brand { display: none; }
.rail__nav { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
.rail__nav a {
  min-height: 38px; padding: 0 14px; border-radius: 6px; display: flex; align-items: center; gap: 10px;
  color: var(--ink-2); font-size: 14px; text-decoration: none; font-weight: 500;
  transition: all .15s ease;
}
.rail__nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.7); }
.rail__nav a[aria-current="page"] {
  background: #FFFFFF; color: var(--ink); font-weight: 600;
  box-shadow: 0 2px 6px rgba(40, 30, 20, 0.05);
}
.rail__nav i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); flex: none; }
.rail__nav a[aria-current="page"] i { background: var(--brand); }
.rail__foot {
  margin: 20px 12px 0; padding: 14px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #FFFFFF;
}
.rail__out { width: 100%; justify-content: center; }
.rail__out-icon { display: none; }

.plan-card {
  border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: #FFFFFF;
}
.plan-card--active { background: #F0F7F3; border-color: #C2E2D0; }
.plan-card__price { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.plan-card--active .plan-card__price { color: var(--ok); }
.plan-card__price .unit { font-weight: 500; color: var(--ink-3); font-size: 11px; }
.plan-card__desc { margin: 4px 0 0; font-size: 12px; line-height: 1.4; color: var(--ink-2); }
.plan-choice { display: flex; flex-direction: column; gap: 8px; }

.plan-choice--row { flex-direction: row; gap: 14px; }
.plan-choice--row .plan-card { flex: 1 1 0; padding: 18px 20px; }
.plan-choice--row .plan-card__price { font-size: 20px; }
.plan-choice--row .plan-card__desc { font-size: 13px; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: var(--ground); }

.head {
  padding: 26px var(--pad) 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: #FFFFFF;
}
.head h1.display { color: var(--ink); font-size: 32px; font-weight: 500; }
.head .tiny { color: var(--ink-2); font-size: 13.5px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.pill {
  height: 24px; padding: 0 11px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
}
.pill--open   { background: #EDF7F1; border: 1px solid #C4E2D1; color: var(--ok); }
.pill--draft  { background: #FBF5EA; border: 1px solid #EAD8B8; color: #9E742E; }
.pill--closed { background: #F0EDE8; border: 1px solid #DDD7CE; color: var(--ink-2); }
.pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.kpi { background: #FFFFFF; padding: 20px var(--pad); display: flex; flex-direction: column; gap: 6px; }
.kpi--hi { background: #FDF9F5; }
.kpi__lab { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.kpi__val { font-size: 28px; font-weight: 700; letter-spacing: -.028em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--ink); }
.kpi--hi .kpi__val { color: var(--brand); }
.kpi__sub { font-size: 12px; color: var(--ink-3); }
.kpi__sub--ok { color: var(--ok); }

.cols { flex: 1 1 auto; display: flex; gap: 24px; padding: 24px var(--pad) 34px; align-items: flex-start; flex-wrap: wrap; }
.col-main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.col-side { flex: 0 1 344px; min-width: 280px; display: flex; flex-direction: column; gap: 18px; }

.panel { border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; overflow: hidden; box-shadow: 0 2px 12px rgba(40, 30, 20, 0.04); }
.panel__head {
  padding: 16px 20px; border-bottom: 1px solid var(--line); background: #FAF7F2;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.panel__title { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-dark); font-weight: 600; }
.panel__body { padding: 20px; color: var(--ink); }
.panel--brand { border-color: #E8D4C0; background: #FDF9F5; }
.panel--info  { border-color: #D3E0EA; background: #F4F8FA; }

table.rows { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rows th {
  text-align: left; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 600; padding: 12px 18px; background: #FAF7F2; border-bottom: 1px solid var(--line);
}
table.rows td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
table.rows tr:last-child td { border-bottom: 0; }
table.rows .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 500; }
table.rows .dim { color: var(--ink-3); font-size: 13px; }

.btn-sm {
  min-height: 36px; padding: 0 15px; border-radius: 6px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line-2); background: #FFFFFF; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  box-shadow: 0 1px 3px rgba(40, 30, 20, 0.03);
  transition: all .15s ease;
}
.btn-sm:hover { background: var(--sunk); border-color: var(--brand); }
.btn-sm--go {
  border: 0; background: linear-gradient(135deg, #C59B6D 0%, #B88655 100%); color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(184, 134, 85, 0.25);
}
.btn-sm--go:hover { background: linear-gradient(135deg, #BA8E5E 0%, #A87544 100%); }
.btn-sm--ok { border-color: #C4E2D1; background: #EDF7F1; color: var(--ok); }
.btn-sm--danger { border-color: #E8BDB4; background: #FDF3F0; color: #9E3524; }
.btn-sm--danger:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm--new__plus { display: none; }
.menu-toggle { display: none; }
.back-icon { display: none; }

.snippet {
  padding: 14px 16px; background: #F8F5F0; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; line-height: 1.55; color: var(--ink-2);
}
.snippet .ph { color: var(--ink-3); }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 14px; }
.mod-card { display: flex; flex-direction: column; gap: 8px; }
.mod-card img { width: 100%; height: 104px; object-fit: cover; border-radius: 6px; display: block; background: #EDE6DD; border: 1px solid var(--line); }
.mod-actions { display: flex; gap: 6px; }
.mod-actions form { flex: 1 1 auto; display: flex; }
.mod-actions .btn-sm { width: 100%; justify-content: center; }
.mod-actions .no { flex: 0 0 34px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); font-weight: 600; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 0 16px; border-radius: 6px;
  border: 1px solid var(--line-2); background: #FFFFFF; color: var(--ink);
  font-family: var(--sans); font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(184, 134, 85, 0.15);
}
.field input[disabled] {
  background: #F6F1EA !important; color: #7A7268 !important; opacity: 1 !important; border-color: var(--line) !important;
}
.field .tiny { color: var(--ink-2); font-size: 13px; line-height: 1.45; }

.err { padding: 14px 16px; border-radius: 6px; background: #FDF3F0; border: 1px solid #E8BDB4; color: #9E3524; font-size: 13.5px; }
.ok  { padding: 14px 16px; border-radius: 6px; background: #EDF7F1; border: 1px solid #C4E2D1; color: var(--ok); font-size: 13.5px; }
.flash { padding: 14px 16px; border-radius: 6px; background: #EDF7F1; border: 1px solid #C4E2D1; color: var(--ok); font-size: 13.5px; }

.copy-ok { color: var(--ok) !important; border-color: #C4E2D1 !important; }

/* --- Aperçu Téléphone Réduit --- */
.pv-frame {
  width: 240px; height: 520px; margin: 0 auto; overflow: hidden;
  border-radius: 26px; border: 4px solid #DCD0C0; background: #FAF8F5;
  box-shadow: 0 16px 40px -6px rgba(40, 30, 20, 0.16);
  position: relative;
}
.pv-screen {
  width: 375px; height: 812px; flex: none;
  transform: scale(.64); transform-origin: top left;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; background: #FAF8F5;
}
.pv-screen .hero__glow {
  height: 430px; position: absolute; inset: 0 0 auto 0; pointer-events: none;
  background:
    radial-gradient(42% 35% at 74% 22%, rgba(196, 146, 104, 0.22) 0%, transparent 70%),
    radial-gradient(90% 70% at 24% 14%, #F5EAE0 0%, #FAF8F5 70%);
  opacity: .95;
}
.pv-screen .hero__fade {
  top: 210px; height: 240px; position: absolute; left: 0; right: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, #FAF8F5 90%);
}
.pv-screen .display { font-size: 46px; color: var(--ink); }
.pv-screen .qrblock { pointer-events: none; }
.pv-screen .muted { color: var(--ink-2); }
.pv-screen .eyebrow { color: var(--brand-dark); }
.pv-screen .card { background: #FFFFFF; border: 1px solid var(--line); }

/* --- panneaux repliables --- */
.panel--pliant > summary {
  cursor: pointer; list-style: none;
  flex-wrap: nowrap; user-select: none;
  border-bottom-color: transparent;
  transition: border-color .15s ease;
}
.panel--pliant > summary::-webkit-details-marker { display: none; }
.panel--pliant > summary:hover .panel__title { color: var(--brand); }
.panel--pliant[open] > summary { border-bottom-color: var(--line); }
.panel--brand.panel--pliant[open] > summary { border-bottom-color: #E8D4C0; }

.panel__chev {
  flex: none; color: var(--ink-3);
  transition: transform .18s ease;
}
.panel--pliant[open] > summary .panel__chev { transform: rotate(180deg); }
.panel--pliant > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* --- questions fréquentes --- */
.faq { border-bottom: 1px solid var(--line); }
.faq:last-child { border-bottom: 0; }
.faq > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; cursor: pointer; list-style: none; user-select: none;
  font-size: 14.5px; line-height: 1.45; color: var(--ink); font-weight: 500;
}
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary:hover { background: #FAF7F2; }
.faq > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.faq[open] > summary { color: var(--brand); font-weight: 600; }
.faq[open] > summary .panel__chev { transform: rotate(180deg); }
.faq__rep {
  padding: 0 20px 20px; font-size: 14px; line-height: 1.6; color: var(--ink-2);
  max-width: 68ch;
}
.faq__rep b { color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .panel__chev { transition: none; }
}

body.admin .legales {
  justify-content: flex-start;
  padding: 26px var(--pad) 32px;
  border-top: 1px solid var(--line);
  margin: 0;
  background: var(--ground);
}

@media (max-width: 860px) {
  body.admin { --pad: 18px; }
  .shell { flex-direction: column; }
  .rail { width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 0; }
  .rail__nav { flex-direction: row; overflow-x: auto; padding: 0 calc(var(--pad) - 12px); }
  .rail__foot { display: none; }
  .rail__brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .rail__out-brand { display: block; }
  .rail__out-brand button {
    width: 36px; height: 36px; padding: 0; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-2); border-radius: 6px; background: #FFFFFF; color: var(--ink);
  }
}

@media (max-width: 640px) {
  .head { flex-direction: column; align-items: stretch; gap: 16px; }
  .head-actions { flex-direction: column; }
  .head-actions > .btn-sm { width: 100%; justify-content: center; min-height: 44px; }
  .plan-choice--row { flex-direction: column; }
  .head--inline { flex-direction: row; align-items: center; }
  .head--inline .head-actions { flex-direction: row; }
  .head--inline .head-actions > .btn-sm { width: auto; }
  .btn-sm--new__full { display: none; }
  .btn-sm--new__plus { display: inline; font-size: 20px; line-height: 1; font-weight: 700; }
  .head { position: relative; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex: none; margin-left: auto;
    border: 1px solid var(--line-2); border-radius: 6px; background: #FFFFFF; color: var(--ink);
  }
  .head-actions--menu {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 8px;
    padding: 8px; border-radius: 8px; background: #FFFFFF; border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(40, 30, 20, .15); min-width: 220px; z-index: 30;
  }
  .head-actions--menu.menu-open { display: flex; }
  #back-link { display: none; }
  .back-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; flex: none; margin-right: 1px;
    color: var(--ink-2);
  }
  .panel__head { align-items: stretch; }
  .panel__head > div:last-child { display: flex; gap: 8px; }
  .panel__head .btn-sm { flex: 1 1 0; justify-content: center; min-height: 40px; }
  .btn-sm { min-height: 40px; }
  .field input, .field select, .field textarea { font-size: 16px; }

  table.rows, table.rows tbody, table.rows tr, table.rows td { display: block; width: auto; }
  table.rows thead { display: none; }
  table.rows tr { padding: 15px var(--pad); border-bottom: 1px solid var(--line); }
  table.rows tr:last-child { border-bottom: 0; }
  table.rows td { padding: 0; border: 0; }

  table.rows td[data-lab] {
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    text-align: left; margin-top: 8px;
  }
  table.rows td[data-lab]::before {
    content: attr(data-lab); flex: none;
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  }
  table.rows td.num { text-align: right; }
  table.rows td.cle { overflow-wrap: anywhere; }

  table.rows td.act { margin-top: 14px; text-align: left !important; }
  table.rows td.act .btn-sm { width: 100%; justify-content: center; min-height: 42px; }
  table.rows td[colspan] { margin-top: 0; text-align: center; }
}