/* ==========================================================================
   Modèle lisse — feuille de style principale
   Mobile-first : tout part d'une colonne, le multi-colonnes vit dans les
   media queries min-width: 768px.
   ========================================================================== */

:root {
  --c-brand: #2B5CE6;
  --c-brand-dark: #1B45B8;
  --c-brand-darker: #122F80;
  --c-brand-soft: #EEF3FF;
  --c-accent: #17C8A0;
  --c-accent-dark: #12A382;
  --c-ink: #0C1526;
  --c-ink-soft: #2C3A55;
  --c-muted: #63718A;
  --c-line: #E3E9F3;
  --c-line-soft: #EFF3FA;
  --c-bg: #F5F7FC;
  --c-white: #ffffff;
  --c-warn: #E08A0B;
  --c-warn-soft: #FFF7E6;
  --c-danger: #D93A45;
  --c-danger-soft: #FDEEEF;
  --c-ok: #12915C;
  --c-ok-soft: #E8F8F0;

  --r-xs: 8px;
  --r-sm: 11px;
  --r: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(12, 21, 38, .04), 0 2px 10px rgba(12, 21, 38, .05);
  --sh-2: 0 4px 16px rgba(12, 21, 38, .07);
  --sh-3: 0 14px 44px rgba(12, 21, 38, .12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

img { max-width: 100%; display: block; }

a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.75rem, 6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 4.6vw, 2.15rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* --------------------------------------------------------------- splash --- */
#app-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #2B5CE6;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}
#app-splash img { border-radius: 22px; }
#app-splash.show { display: flex; animation: splashOut .4s ease 1.2s forwards; }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }

/* --------------------------------------------------------------- topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--c-line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--c-ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { border-radius: 10px; flex: none; }
.brand-text { font-size: 1.02rem; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 46vw; }
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -------------------------------------------------------------- buttons --- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--c-brand); color: #fff; box-shadow: 0 4px 14px rgba(43, 92, 230, .28); }
.btn-primary:hover { background: var(--c-brand-dark); }
.btn-accent { background: var(--c-accent); color: #06301F; box-shadow: 0 4px 14px rgba(23, 200, 160, .3); }
.btn-accent:hover { background: var(--c-accent-dark); color: #fff; }
.btn-outline { border-color: var(--c-line); background: #fff; color: var(--c-ink); }
.btn-outline:hover { border-color: var(--c-brand); color: var(--c-brand); }
.btn-ghost { background: transparent; color: var(--c-ink-soft); }
.btn-ghost:hover { background: var(--c-brand-soft); color: var(--c-brand-dark); }
.btn-danger { background: var(--c-danger-soft); color: var(--c-danger); border-color: #F6D2D5; }
.btn-danger:hover { background: var(--c-danger); color: #fff; }
.btn-sm { padding: 8px 13px; font-size: .875rem; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- cards --- */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-1);
}
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }

/* --------------------------------------------------------------- alerts --- */
.alert {
  border-radius: var(--r);
  padding: 13px 15px;
  font-size: .93rem;
  border: 1px solid transparent;
  margin-bottom: 14px;
}
.alert-info { background: var(--c-brand-soft); border-color: #D6E2FF; color: #14357F; }
.alert-ok { background: var(--c-ok-soft); border-color: #C7EEDB; color: #0B5F3E; }
.alert-warn { background: var(--c-warn-soft); border-color: #F7E3BC; color: #8A5606; }
.alert-danger { background: var(--c-danger-soft); border-color: #F6D2D5; color: #9C222B; }

/* --------------------------------------------------------------- badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--r-pill);
  padding: 4px 10px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .01em;
  background: var(--c-line-soft);
  color: var(--c-ink-soft);
  white-space: nowrap;
}
.badge-ok { background: var(--c-ok-soft); color: var(--c-ok); }
.badge-warn { background: var(--c-warn-soft); color: var(--c-warn); }
.badge-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.badge-brand { background: var(--c-brand-soft); color: var(--c-brand-dark); }
.badge-muted { background: #EEF1F7; color: var(--c-muted); }

/* --------------------------------------------------------------- layout --- */
.section { padding: 44px 0; }
.section-tight { padding: 26px 0; }
.section-head { max-width: 720px; margin-bottom: 22px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--c-brand);
  margin-bottom: 10px;
}
.section-title { margin-bottom: .35em; }
.section-text { color: var(--c-muted); font-size: 1.02rem; margin-bottom: 0; }

.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }

/* ----------------------------------------------------------------- hero --- */
.hero {
  position: relative;
  background: radial-gradient(120% 100% at 8% 0%, #2B5CE6 0%, #1B45B8 45%, #0F2A6E 100%);
  color: #fff;
  overflow: hidden;
  padding: 34px 0 42px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(80% 70% at 70% 20%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 70% at 70% 20%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero-text { color: rgba(255,255,255,.86); font-size: 1.05rem; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 26px; }
.hero .btn-outline { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,.2); color: #fff; border-color: #fff; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.stat {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r);
  padding: 12px 14px;
}
.stat-value { font-size: 1.3rem; font-weight: 700; display: block; }
.stat-label { font-size: .78rem; color: rgba(255,255,255,.78); }
.hero-visual {
  margin-top: 26px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(6, 18, 48, .35);
}
.hero-visual img { width: 100%; height: 220px; object-fit: cover; }

/* --------------------------------------------------------------- visual --- */
.compare { display: grid; grid-template-columns: 1fr; gap: 12px; }
.compare-col {
  border-radius: var(--r);
  border: 1px solid var(--c-line);
  background: #fff;
  overflow: hidden;
}
.compare-col header {
  padding: 9px 14px;
  font-size: .82rem;
  font-weight: 700;
  border-bottom: 1px solid var(--c-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.compare-col.before header { background: #FFF6F6; color: #9C222B; }
.compare-col.after header { background: var(--c-ok-soft); color: #0B5F3E; }
.compare-body { padding: 14px; }
.compare-list { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.compare-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--c-line); }
.compare-list li:last-child { border-bottom: 0; }
.compare-list strong { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- figures --- */
.gallery { display: grid; grid-template-columns: 1fr; gap: 12px; }
.gallery-item {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-line);
  background: #fff;
  box-shadow: var(--sh-1);
}
.gallery-item img { width: 100%; height: 190px; object-fit: cover; }
.gallery-item figcaption { padding: 12px 14px; font-size: .88rem; color: var(--c-muted); }
.gallery-item figcaption strong { color: var(--c-ink); display: block; font-size: .95rem; }

/* ----------------------------------------------------------------- flow --- */
.flow { display: grid; grid-template-columns: 1fr; gap: 12px; counter-reset: flow; }
.flow-step {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--sh-1);
}
.flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-brand-soft);
  color: var(--c-brand-dark);
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 8px;
}
.flow-step h3 { font-size: 1rem; margin-bottom: .25em; }
.flow-step p { font-size: .89rem; color: var(--c-muted); margin: 0; }

.feature-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-1); }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-brand-soft);
  color: var(--c-brand);
  margin-bottom: 10px;
}
.feature-card h3 { font-size: 1.02rem; margin-bottom: .3em; }
.feature-card p { font-size: .9rem; color: var(--c-muted); margin: 0; }

.cta-band {
  background: linear-gradient(120deg, #122F80, #2B5CE6 65%, #17C8A0 130%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 26px 20px;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); }

/* ------------------------------------------------------------ studio app --- */
.studio-head { padding: 22px 0 6px; }
.studio-title { margin-bottom: .2em; }
.studio-sub { color: var(--c-muted); margin-bottom: 18px; }
.step-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
.step-nav::-webkit-scrollbar { display: none; }
.step-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  padding: 7px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-muted);
}
.step-pill.is-active { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.step-pill.is-done { border-color: #BFE9D8; color: var(--c-ok); background: var(--c-ok-soft); }
.step-pill-num {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.07);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700;
}
.step-pill.is-active .step-pill-num { background: rgba(255,255,255,.28); }

.upload-zone {
  border: 2px dashed #C6D3EE;
  border-radius: var(--r-xl);
  background: #fff;
  padding: 30px 18px;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
  cursor: pointer;
}
.upload-zone:active { transform: scale(.99); }
.upload-zone.is-over { border-color: var(--c-brand); background: var(--c-brand-soft); }
.upload-icon {
  width: 58px; height: 58px;
  border-radius: 18px;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-brand-soft);
  color: var(--c-brand);
}
.upload-zone h2 { font-size: 1.12rem; margin-bottom: .3em; }
.upload-hint { color: var(--c-muted); font-size: .88rem; margin: 0 0 16px; }
.upload-formats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.file-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--c-brand-soft);
  border: 1px solid #D6E2FF;
  border-radius: var(--r);
  padding: 11px 13px;
  margin-bottom: 12px;
  font-size: .9rem;
}
.file-chip strong { display: block; word-break: break-all; }
.file-chip .btn { margin-left: auto; }

.progress { height: 6px; border-radius: 999px; background: #E8EDF7; overflow: hidden; }
.progress-bar { height: 100%; background: var(--c-brand); width: 0; transition: width .3s ease; }
.progress-bar.is-done { background: var(--c-accent); }

.score-ring {
  --p: 0;
  width: 108px; height: 108px;
  border-radius: 50%;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--ring-color, var(--c-brand)) calc(var(--p) * 1%), #E8EDF7 0);
  position: relative;
}
.score-ring::after {
  content: "";
  position: absolute; inset: 9px;
  border-radius: 50%;
  background: #fff;
}
.score-ring span { position: relative; z-index: 1; font-size: 1.5rem; font-weight: 700; }
.score-summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric {
  background: var(--c-line-soft);
  border-radius: var(--r-sm);
  padding: 11px 12px;
}
.metric-value { font-weight: 700; font-size: 1rem; display: block; font-variant-numeric: tabular-nums; }
.metric-label { font-size: .76rem; color: var(--c-muted); }

.issues { list-style: none; padding: 0; margin: 0; }
.issue {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-line);
  font-size: .92rem;
}
.issue:last-child { border-bottom: 0; }
.issue-label { flex: 1; }
.issue-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.sev-critique { color: var(--c-danger); }
.sev-moyen { color: var(--c-warn); }
.sev-info { color: var(--c-muted); }

.options { display: grid; gap: 14px; }
.field { display: block; }
.field > .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font: inherit;
  font-size: .95rem;
  color: var(--c-ink);
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(43, 92, 230, .14);
}
.textarea { min-height: 120px; resize: vertical; }
.help { font-size: .8rem; color: var(--c-muted); margin: 6px 0 0; }

.segmented { display: grid; grid-template-columns: 1fr; gap: 8px; }
.segmented label {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 12px 13px;
  cursor: pointer;
  background: #fff;
  transition: border-color .16s ease, background .16s ease;
}
.segmented input { margin: 3px 0 0; accent-color: var(--c-brand); flex: none; }
.segmented label:hover { border-color: #C6D3EE; }
.segmented label:has(input:checked) { border-color: var(--c-brand); background: var(--c-brand-soft); }
.segmented strong { display: block; font-size: .93rem; }
.segmented small { color: var(--c-muted); font-size: .8rem; }

.log { list-style: none; padding: 0; margin: 0; }
.log-item {
  display: flex; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--c-line);
  font-size: .9rem;
}
.log-item:last-child { border-bottom: 0; }
.log-mark {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #EDF1F9;
  color: var(--c-muted);
}
.log-item.is-ok .log-mark { background: var(--c-ok-soft); color: var(--c-ok); }
.log-item.is-run .log-mark { background: var(--c-brand-soft); color: var(--c-brand); }
.log-item strong { display: block; font-size: .9rem; }
.log-item span { color: var(--c-muted); font-size: .83rem; }

.viewer {
  position: relative;
  background: linear-gradient(160deg, #0E1B33, #1C2E52);
  border-radius: var(--r-lg);
  overflow: hidden;
  touch-action: none;
}
.viewer canvas { display: block; width: 100%; height: 300px; }
.viewer-toolbar {
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: space-between; align-items: center;
}
.viewer-toolbar .btn {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.24);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.viewer-toolbar .btn:hover { background: rgba(255,255,255,.26); color: #fff; }
.viewer-hint {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,255,255,.14);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 5px 11px;
  font-size: .74rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.viewer-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  text-align: center;
  padding: 20px;
}

.download-band {
  background: linear-gradient(120deg, #12A382, #17C8A0 60%, #2B5CE6 140%);
  color: #062E22;
  border-radius: var(--r-xl);
  padding: 22px 18px;
  text-align: center;
}
.download-band h2 { margin-bottom: .25em; }
.download-band p { margin-bottom: 16px; font-size: .92rem; }
.download-band .btn { background: #fff; color: #0B5F3E; box-shadow: var(--sh-2); }

/* --------------------------------------------------------------- tables --- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 520px; }
table.table th, table.table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--c-line); }
table.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); background: #FAFBFE; }
table.table tr:last-child td { border-bottom: 0; }
table.table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.list-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
.model-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 15px; box-shadow: var(--sh-1); }
.model-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.model-card h3 { font-size: 1rem; margin: 0 0 4px; word-break: break-word; }
.model-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.model-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.empty {
  text-align: center;
  padding: 34px 18px;
  border: 1px dashed #CBD8EE;
  border-radius: var(--r-lg);
  color: var(--c-muted);
  background: #fff;
}

.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pager span { font-size: .85rem; color: var(--c-muted); }

/* ------------------------------------------------------------------ faq --- */
.faq { display: grid; gap: 10px; grid-template-columns: 1fr; }
.faq-item { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r); padding: 4px 16px; box-shadow: var(--sh-1); }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 13px 0; list-style: none; position: relative; padding-right: 26px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.25rem; color: var(--c-brand); line-height: 1;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 0 14px; color: var(--c-muted); font-size: .93rem; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- footer --- */
.site-footer { background: #0C1526; color: rgba(255,255,255,.74); padding: 30px 0 22px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand img { border-radius: 12px; flex: none; }
.footer-brand strong { color: #fff; display: block; margin-bottom: 4px; }
.footer-brand p { font-size: .85rem; margin: 0; }
.footer-nav { display: flex; flex-direction: column; gap: 9px; }
.footer-nav a { color: rgba(255,255,255,.78); font-size: .9rem; }
.footer-nav a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 7px; font-size: .9rem; }
.footer-contact span { color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; font-weight: 700; }
.footer-contact a { color: #fff; }
.footer-bottom {
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 22px; padding-top: 16px;
  font-size: .78rem;
}
.footer-note { color: rgba(255,255,255,.5); }

/* ----------------------------------------------------------- bottom nav --- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid rgba(12,21,38,.08);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bottom-nav { background: rgba(255,255,255,.97); }
}
.bottom-nav-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 2px;
  border-radius: var(--r);
  color: var(--c-muted);
  font-size: .68rem;
  font-weight: 600;
  transition: transform .12s ease, background .18s ease, color .18s ease;
}
.bottom-nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom-nav-item:hover { text-decoration: none; color: var(--c-brand-dark); }
.bottom-nav-item:active { transform: scale(.97); }
.bottom-nav-item.is-active { background: var(--c-brand); color: #fff; }

/* -------------------------------------------------------- install sheet --- */
.install-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 15, 30, .55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.install-card {
  position: relative;
  background: #fff;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 22px 18px calc(26px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 520px;
  box-shadow: var(--sh-3);
  animation: sheetUp .28s ease;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.install-close {
  position: absolute; top: 12px; right: 12px;
  border: 0; background: var(--c-line-soft); color: var(--c-ink-soft);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.install-lead { color: var(--c-muted); font-size: .92rem; }
.install-steps { display: grid; gap: 10px; margin: 14px 0; }
.install-step { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin: 0; }
.install-num {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--c-brand-soft); color: var(--c-brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
}
.install-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.install-badge {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  padding: 7px 13px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-ink-soft);
}

/* --------------------------------------------------------------- toasts --- */
.toast-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 440px);
  pointer-events: none;
}
.toast {
  background: #0C1526;
  color: #fff;
  border-radius: var(--r);
  padding: 12px 15px;
  font-size: .9rem;
  box-shadow: var(--sh-3);
  animation: toastIn .22s ease;
}
.toast.is-ok { background: #0F6B47; }
.toast.is-error { background: #9C222B; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner-dark { border-color: rgba(43,92,230,.25); border-top-color: var(--c-brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.modal {
  position: fixed; inset: 0; z-index: 220;
  background: rgba(8,15,30,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--sh-3);
  max-height: 86vh;
  overflow-y: auto;
}
.modal-card h2 { font-size: 1.15rem; }

.muted { color: var(--c-muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-12 { margin-top: 12px; }
.mt-18 { margin-top: 18px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================== 768px + ===== */
@media (min-width: 768px) {
  body { padding-bottom: 40px; }
  .wrap { padding: 0 24px; }
  .section { padding: 64px 0; }
  .hero { padding: 60px 0 70px; }
  .hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: center; }
  .hero-visual { margin-top: 0; }
  .hero-visual img { height: 380px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { margin-bottom: 0; }

  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .compare { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .grid { gap: 18px; }
  .faq { grid-template-columns: 1fr; }
  .list-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }

  .install-sheet { align-items: center; padding: 20px; }
  .install-card { border-radius: var(--r-xl); }

  .segmented { grid-template-columns: repeat(3, 1fr); }
  .options { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .viewer canvas { height: 420px; }

  .bottom-nav {
    max-width: 560px;
    margin: 0 auto;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-left: 1px solid rgba(12,21,38,.08);
    border-right: 1px solid rgba(12,21,38,.08);
    gap: 6px;
    padding: 8px 10px 10px;
  }
  .bottom-nav-item { font-size: .74rem; }
  .toast-wrap { bottom: 24px; }
}

@media (min-width: 1024px) {
  .grid-4 { gap: 20px; }
  .studio-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Administration
   ========================================================================== */
.kpi { text-align: left; padding: 16px; }
.kpi-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.kpi-label { display: block; font-size: .78rem; color: var(--c-muted); margin-top: 3px; }
.admin-body .eyebrow { color: var(--c-brand); }
.admin-body .list-cards { grid-template-columns: 1fr; }
.admin-body .model-card p { white-space: pre-line; }

@media (min-width: 768px) {
  .admin-body .list-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------- barre du haut : mobile --- */
.brand { min-width: 0; flex: 0 1 auto; }
.brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { flex: 0 0 auto; }
.only-sm { display: inline; }
.only-lg { display: none; }
@media (max-width: 619px) {
  .hide-sm { display: none !important; }
  .brand-text { font-size: .95rem; }
}
@media (min-width: 620px) {
  .only-sm { display: none; }
  .only-lg { display: inline; }
}
