/* =========================================================
   Tikeep — design system
   Vert vivant #58B98A · beaucoup d'espace, peu de bordures,
   gros chiffres, boutons très lisibles.
   ========================================================= */

:root {
  --primary: #58B98A;
  --primary-dark: #24744F;
  --primary-soft: #E3F4EA;
  --bg: #F6F7F3;
  --surface: #FFFFFF;
  --surface-2: #EEF1EC;
  --text: #17201B;
  --muted: #6C756F;
  --border: #E3E7E2;

  --yellow: #FFD86B;   --yellow-soft: #FFF4D2;  --yellow-ink: #7A5A00;
  --orange: #FF9B62;   --orange-soft: #FFE8DA;  --orange-ink: #9A4512;
  --purple: #8874E8;   --purple-soft: #ECE8FC;  --purple-ink: #4B3BA8;
  --blue:   #6EB6EE;   --blue-soft:   #E2F1FC;  --blue-ink:   #1F5F8F;
  --red:    #ED6B6B;   --red-soft:    #FDE6E6;  --red-ink:    #A42A2A;

  --r-control: 12px;
  --r-card: 16px;
  --r-hero: 24px;
  --shadow: 0 14px 40px rgba(23, 32, 27, .08);
  --shadow-sm: 0 2px 10px rgba(23, 32, 27, .05);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Nunito", "Inter", system-ui, sans-serif;

  --sidebar-w: 270px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.15; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typo utilitaires ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 800; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.page-title { font-family: var(--font); font-weight: 400; font-size: clamp(28px, 4vw, 36px); letter-spacing: -.02em; margin-top: 6px; }
.section-title { font-size: 20px; font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--r-control); border: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 var(--primary-dark); }
.btn-primary:hover { background: #4FAE80; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-dark); }
.btn-dark { background: var(--text); color: #fff; box-shadow: 0 4px 0 #000; }
.btn-dark:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.btn-ghost { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1.5px var(--border) inset, 0 3px 0 var(--border); }
.btn-ghost:active { transform: translateY(2px); box-shadow: 0 0 0 1.5px var(--border) inset; }
.btn-purple { background: var(--purple); color: #fff; box-shadow: 0 4px 0 var(--purple-ink); }
.btn-purple:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--purple-ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.link-arrow { font-family: var(--font-display); font-weight: 800; color: var(--primary-dark); }

/* ---------- Badges / pastilles ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: 12px; white-space: nowrap;
}
.badge-green  { background: var(--primary-soft); color: var(--primary-dark); }
.badge-purple { background: var(--purple-soft); color: var(--purple-ink); }
.badge-yellow { background: var(--yellow-soft); color: var(--yellow-ink); }
.badge-orange { background: var(--orange-soft); color: var(--orange-ink); }
.badge-blue   { background: var(--blue-soft); color: var(--blue-ink); }
.badge-red    { background: var(--red-soft); color: var(--red-ink); }
.badge-grey   { background: var(--surface-2); color: var(--muted); }

/* indicateur de confiance */
.trust { font-size: 13px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.trust-ok { color: var(--primary-dark); }
.trust-calc { color: var(--blue-ink); }
.trust-ask { color: var(--orange-ink); }

/* ---------- Cartes ---------- */
.card {
  background: var(--surface); border-radius: var(--r-card);
  border: 1px solid var(--border); padding: 22px;
}
.card-hero {
  background: var(--surface); border-radius: var(--r-hero);
  box-shadow: var(--shadow); padding: 30px; border: 1px solid #EEF0EC;
}
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.progress.purple > span { background: var(--purple); }
.progress.yellow > span { background: var(--yellow); }
.progress.red > span { background: var(--red); }

/* =========================================================
   LAYOUT APPLICATION
   ========================================================= */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: #FAFBF8; border-right: 1px solid var(--border);
  padding: 30px 12px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 8px;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 0 12px 30px; color: var(--text); text-decoration: none !important; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; background: var(--primary);
  display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 900; font-size: 20px;
}
.logo-mark::before { content: ""; width: 14px; height: 14px; border: 4px solid #fff; border-radius: 50%; }
.logo-text { font-family: var(--font-display); font-weight: 900; font-size: 26px; letter-spacing: -.02em; }

.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nav a {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  color: var(--text); font-size: 17px; text-decoration: none;
}
.nav a:hover { background: var(--surface-2); }
.nav a .ico { width: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); font-family: var(--font-display); font-weight: 900; }
.nav a[aria-current="page"] .ico { color: var(--primary-dark); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.sidebar .btn { margin-top: 26px; padding: 16px; }
.sidebar-foot { margin-top: auto; padding: 12px; font-size: 13px; color: var(--muted); }

.main { flex: 1; min-width: 0; padding: 40px clamp(16px, 5vw, 86px) 80px; }
.main-inner { max-width: 1230px; margin: 0 auto; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--primary-soft);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; color: var(--text);
  flex-shrink: 0; text-decoration: none !important; border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
.back { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--muted); margin-bottom: 14px; }

/* Barre mobile */
.mobile-header, .tabbar { display: none; }

/* ---------- Dashboard ---------- */
.assist { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.assist h2 { font-size: 27px; font-weight: 900; margin: 8px 0 12px; }
.assist p { color: var(--muted); font-size: 17px; }
.assist .btn { padding: 16px 26px; font-size: 17px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 44px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-hero); padding: 20px; text-decoration: none !important; color: var(--text); transition: transform .12s; }
.stat:hover { transform: translateY(-2px); }
.stat-label { color: var(--muted); font-size: 15px; }
.stat-value { font-family: var(--font-display); font-weight: 900; font-size: 34px; margin-top: 8px; line-height: 1; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 16px; gap: 12px; }

/* ---------- Grille d'objets ---------- */
.grid-objects { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.obj-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-hero);
  padding: 20px; color: var(--text); text-decoration: none !important;
  display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s;
}
.obj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.obj-visual {
  background: var(--surface-2); border-radius: var(--r-card); height: 162px;
  display: grid; place-items: center; font-size: 62px; margin-bottom: 18px;
}
.obj-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.obj-name { font-family: var(--font-display); font-weight: 900; font-size: 19px; }
.obj-meta { color: var(--muted); font-size: 15px; margin: 6px 0 16px; }
.obj-foot { color: var(--muted); font-size: 15px; margin-top: 10px; }

/* ---------- Toolbar recherche / filtres ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 0 16px;
}
.search input { border: 0; outline: 0; padding: 14px 0; width: 100%; background: transparent; }
.search:focus-within { border-color: var(--primary); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }

/* ---------- Listes ---------- */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-hero); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.list-row:first-child { border-top: 0; }
a.list-row:hover { background: #FAFBF8; }
.list-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { color: var(--muted); font-size: 14px; }
.list-side { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ---------- Fiche objet ---------- */
.detail { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.detail-hero { text-align: center; position: sticky; top: 24px; }
.detail-hero .obj-visual { height: 220px; font-size: 96px; }
.detail-hero h1 { font-size: 30px; font-weight: 900; }
.detail-stack { display: flex; flex-direction: column; gap: 18px; }
.block-title { font-family: var(--font-display); font-weight: 900; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; }
.kv + .kv { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 700; grid-column: 1; }
.kv .trust { grid-column: 2; grid-row: 1 / span 2; }

.dpp-card { border: 1.5px solid #D9D2FA; background: linear-gradient(180deg, #F7F5FF 0%, #fff 60%); }
.dpp-card .block-title { color: var(--purple-ink); }
.checklist { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.checklist li::before { content: "✓"; color: var(--purple); font-weight: 900; margin-right: 10px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .t-date { color: var(--muted); font-size: 13px; }
.timeline .t-title { font-weight: 700; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 15px; }
.alert-yellow { background: var(--yellow-soft); color: var(--yellow-ink); }
.alert-blue { background: var(--blue-soft); color: var(--blue-ink); }
.alert-green { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.input, .select, textarea.input {
  width: 100%; padding: 13px 14px; border-radius: var(--r-control);
  border: 1.5px solid var(--border); background: var(--surface); outline: 0;
}
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.switch-row:first-of-type { border-top: 0; }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: relative; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 99px; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ---------- Ajout d'un achat ---------- */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.choice {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-hero);
  padding: 28px 22px; text-align: left; cursor: pointer; box-shadow: 0 4px 0 var(--border);
  transition: transform .08s, box-shadow .08s, border-color .15s;
}
.choice:hover { border-color: var(--primary); }
.choice:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border); }
.choice .c-ico { font-size: 38px; margin-bottom: 14px; }
.choice .c-title { font-family: var(--font-display); font-weight: 900; font-size: 19px; }
.choice .c-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

.dropzone {
  border: 2.5px dashed #CFD6CF; border-radius: var(--r-hero); padding: 40px 20px; text-align: center;
  background: #FAFBF8; cursor: pointer; display: block;
}
.dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.preview-img { max-height: 260px; margin: 0 auto 16px; border-radius: 12px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.steps .dot { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--border); display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.steps li.doing { color: var(--text); }
.steps li.doing .dot { border-color: var(--primary); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps li.done { color: var(--primary-dark); }
.steps li.done .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.steps li.done .dot::after { content: "✓"; font-weight: 900; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-pop { animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 14px 22px; border-radius: 14px; font-weight: 700;
  opacity: 0; transition: .25s; z-index: 100; pointer-events: none; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .e-ico { font-size: 44px; margin-bottom: 10px; }

.demo-note { font-size: 13px; color: var(--blue-ink); background: var(--blue-soft); border-radius: 10px; padding: 8px 12px; display: inline-block; }

/* =========================================================
   SITE VITRINE
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(246, 247, 243, .9); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--border); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.site-nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.site-nav .logo { padding: 0; }
.site-links { display: flex; gap: 28px; align-items: center; }
.site-links a { color: var(--text); font-weight: 600; }
.site-cta { display: flex; gap: 10px; align-items: center; }

.hero { padding: 70px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 50px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 900; letter-spacing: -.03em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero .lead { font-size: 20px; color: var(--muted); margin: 22px 0 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions .btn { padding: 17px 28px; font-size: 17px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }

.mock {
  background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); padding: 22px;
  border: 1px solid #ECEFEA; transform: rotate(1.2deg);
}
.mock-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mock .obj-card { padding: 14px; border-radius: 18px; }
.mock .obj-visual { height: 96px; font-size: 42px; margin-bottom: 12px; }
.mock .obj-name { font-size: 16px; }
.mock .obj-meta { font-size: 13px; margin: 2px 0 10px; }
.mock-scan { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--primary-soft); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.mock-scan b { font-family: var(--font-display); font-weight: 900; }

.section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -.02em; }
.section .sub { color: var(--muted); font-size: 18px; margin-top: 12px; max-width: 640px; }
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.how-step { background: var(--bg); border-radius: var(--r-hero); padding: 30px; }
.how-num { width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; font-family: var(--font-display); font-weight: 900; display: grid; place-items: center; margin-bottom: 18px; font-size: 18px; }
.how-step h3 { font-size: 21px; font-weight: 900; margin-bottom: 8px; }
.how-step p { color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.feature { background: var(--surface); border-radius: var(--r-hero); padding: 32px; border: 1px solid var(--border); }
.feature .f-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; margin-bottom: 18px; }
.feature h3 { font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.feature p { color: var(--muted); }

.flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-top: 40px; }
.flow span { background: var(--bg); border-radius: 999px; padding: 10px 18px; font-weight: 700; }
.flow i { color: var(--muted); font-style: normal; }

.trust-demo { max-width: 560px; margin: 40px auto 0; text-align: left; }

.faq { max-width: 780px; margin: 40px auto 0; }
.faq details { background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--border); padding: 20px 24px; margin-bottom: 12px; }
.faq summary { font-family: var(--font-display); font-weight: 800; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary-dark); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 12px; }

.cta-band { background: var(--text); color: #fff; border-radius: 32px; padding: 60px 30px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #B9C3BC; margin: 14px 0 28px; font-size: 18px; }

.site-footer { padding: 50px 0 40px; color: var(--muted); font-size: 14px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; align-items: center; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }

/* Pages simples (connexion, onboarding, légal) */
.simple { min-height: 100vh; display: flex; flex-direction: column; }
.simple-top { padding: 24px 20px; }
.simple-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 16px 60px; }
.simple-card { width: 100%; max-width: 460px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 14px; padding: 4px; margin-bottom: 22px; }
.tabs button { border: 0; background: transparent; padding: 10px; border-radius: 11px; font-weight: 700; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.ob-progress { height: 14px; background: var(--surface-2); border-radius: 99px; overflow: hidden; max-width: 460px; margin: 0 auto; }
.ob-progress span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s ease; }
.ob-step { text-align: center; }
.ob-step h1 { font-size: 34px; font-weight: 900; margin: 18px 0 10px; }
.ob-step .big { font-size: 72px; }
.ob-options { display: grid; gap: 10px; text-align: left; margin: 26px 0; }
.ob-option { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 2px solid var(--border); border-radius: 16px; padding: 14px 18px; cursor: pointer; font-weight: 700; box-shadow: 0 3px 0 var(--border); }
.ob-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 3px 0 var(--primary); }
.ob-option input { width: 20px; height: 20px; accent-color: var(--primary); }

.legal { max-width: 780px; margin: 0 auto; padding: 40px 20px 80px; }
.legal h1 { font-size: 38px; font-weight: 900; margin-bottom: 24px; }
.legal h2 { font-size: 22px; font-weight: 800; margin: 32px 0 10px; }
.legal p, .legal li { color: #3B4540; margin-bottom: 10px; }
.todo { background: var(--yellow-soft); padding: 1px 6px; border-radius: 6px; }


/* ---------- Langue, compte, formulaires (v2) ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 0 4px 0 10px; font-size: 14px; }
.lang-switch select { border: 0; background: transparent; padding: 8px 4px; font-weight: 600; cursor: pointer; outline: 0; }
.lang-switch:focus-within { border-color: var(--primary); }
.sidebar-foot { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.sidebar-user { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; box-shadow: none; border-width: 0; }
.sidebar-email { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary-dark); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.form-error { color: var(--red-ink); font-size: 14px; font-weight: 600; }
.form-error:empty { display: none; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; word-break: break-all; }
.empty-hero { text-align: center; padding: 48px 24px; }
.empty-hero .e-ico { font-size: 56px; margin-bottom: 12px; }
.empty-hero h2 { font-size: 26px; font-weight: 900; margin-bottom: 8px; }
.empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.demo-banner { margin-bottom: 22px; }
.pwd-wrap { position: relative; }
.pwd-wrap .input { padding-right: 92px; }
.pwd-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: var(--surface-2); border: 0; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted); }
.login-msg { border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.login-msg.error { background: var(--red-soft); color: var(--red-ink); }
.login-msg.info { background: var(--blue-soft); color: var(--blue-ink); }
.login-msg:empty { display: none; }
.simple-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field label > span + .trust { margin-left: auto; }


/* ---------- Stockage serveur (v3) ---------- */
.list-ico.thumb { padding: 0; overflow: hidden; background: var(--surface-2); }
.list-ico.thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-title a, .list-sub a { color: inherit; }
.list-title a:hover, .list-sub a:hover { color: var(--primary-dark); }
.doc-actions { flex-direction: row; align-items: center; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-size: 15px; }
.icon-btn:hover { border-color: var(--red); background: var(--red-soft); }
.usage { background: var(--bg); border-radius: 14px; padding: 14px 16px; margin-bottom: 6px; }
.usage-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 8px; color: var(--muted); }
.usage-head strong { color: var(--text); }
.danger-card { border-color: #F3CACA; }
.danger-card .block-title { color: var(--red-ink); }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-ink); }
.btn-danger:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-ink); }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 80px 20px; color: var(--muted); font-weight: 600; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.is-busy { opacity: .7; pointer-events: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; }
  .detail-hero { position: static; }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 20px 16px 120px; }
  .mobile-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; background: rgba(250,251,248,.95); backdrop-filter: blur(8px);
    position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border);
  }
  .mobile-header .logo { padding: 0; }
  .mobile-header .logo-text { font-size: 22px; }
  .mobile-header .logo-mark { width: 32px; height: 32px; }
  .app { flex-direction: column; }
  .topbar .avatar { display: none; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--border);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 6px 0; }
  .tabbar a .ico { font-size: 18px; }
  .tabbar a[aria-current="page"] { color: var(--primary-dark); }
  .tabbar .tab-add .ico {
    width: 54px; height: 54px; border-radius: 18px; background: var(--primary); color: #fff;
    display: grid; place-items: center; font-size: 28px; font-weight: 900; margin-top: -26px;
    box-shadow: 0 4px 0 var(--primary-dark), 0 8px 20px rgba(36,116,79,.35);
  }

  .assist { flex-direction: column; align-items: stretch; }
  .assist .btn { width: 100%; }
  .card-hero { padding: 22px; }
  .stats { gap: 12px; margin-bottom: 32px; }
  .stat { padding: 16px; border-radius: var(--r-card); }
  .stat-value { font-size: 28px; }
  .choices { grid-template-columns: 1fr; }
  .choice { display: flex; gap: 16px; align-items: center; padding: 18px; }
  .choice .c-ico { margin: 0; font-size: 32px; }

  .site-links { display: none; }
  .site-cta .lang-switch { padding-left: 6px; }
  .site-cta .lang-switch > span[aria-hidden] { display: none; }
  .hero { padding: 40px 0; }
  .hero-grid, .how, .features { grid-template-columns: 1fr; }
  .mock { transform: none; }
  .section { padding: 56px 0; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .site-cta .btn-ghost { display: none; }
  .mock-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mock .obj-visual { height: 72px; font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Bonus Réparation */
.repair-card a { font-weight: 700; text-decoration: underline; }
.repair-card p { line-height: 1.55; }

/* Pop-up */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(20, 28, 24, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 24px; padding: 28px 24px 22px; max-width: 400px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-ico { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.modal h2 { font-family: var(--font-display); font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.modal p { color: var(--muted, #5b625e); margin-bottom: 20px; line-height: 1.5; }
