/* DA Colibee (maquettes espace consultant) : DM Sans, prune + or, cartes 14px à bordure fine.
   Mise en page : bandeau prune dégradé avec halo doré, contenus en cartes blanches. */
:root {
  --prune: #2f0b33;
  --prune-mid: #4a1d50;
  --prune-light: #5c2866;
  --gold: #d4a853;
  --gold-hover: #b8913e;
  --gold-muted: rgba(212, 168, 83, .14);
  --gold-ink: #7a5a17;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f1f5;
  --text: #1a1a1a;
  --text-secondary: #888888;
  --text-tertiary: #666666;
  --heading: #2f0b33;
  --accent: #4a1d50;
  --border: rgba(0, 0, 0, .08);
  --border-strong: rgba(47, 11, 51, .22);
  --tint: rgba(47, 11, 51, .05);
  --success: #2d8a4e;
  --success-bg: rgba(45, 138, 78, .12);
  --warn: #a8661a;
  --warn-bg: rgba(212, 140, 40, .14);
  --danger: #b4233c;
  --danger-bg: rgba(180, 35, 60, .1);
  --on-prune: #ffffff;
  --overlay: rgba(26, 10, 28, .55);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(47, 11, 51, .10);
  color-scheme: light;

  /* alias utilisés par les pages */
  --plum-950: var(--prune); --plum-900: var(--heading); --plum-800: var(--prune-mid); --plum-700: var(--prune-light);
  --plum-500: var(--gold-hover); --plum-100: var(--gold-muted);
  --paper: var(--surface); --tile: var(--surface-2); --ink: var(--text); --muted: var(--text-secondary); --line: var(--border-strong);
  --ok: var(--success); --ok-bg: var(--success-bg);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1018; --surface: #261a2a; --surface-2: #2f2233; --text: #f0eaed; --text-secondary: #998e94; --text-tertiary: #b0a5ab;
    --heading: #f0eaed; --accent: #c9a0d0; --border: rgba(255, 255, 255, .08); --border-strong: rgba(255, 255, 255, .16); --tint: rgba(255, 255, 255, .05);
    --gold-ink: #e7c47e; --success: #5cc488; --success-bg: rgba(92, 196, 136, .14); --warn: #e8a75a; --danger: #ef7d8f; --danger-bg: rgba(239, 125, 143, .12);
    --shadow: 0 8px 28px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1018; --surface: #261a2a; --surface-2: #2f2233; --text: #f0eaed; --text-secondary: #998e94; --text-tertiary: #b0a5ab;
  --heading: #f0eaed; --accent: #c9a0d0; --border: rgba(255, 255, 255, .08); --border-strong: rgba(255, 255, 255, .16); --tint: rgba(255, 255, 255, .05);
  --gold-ink: #e7c47e; --success: #5cc488; --success-bg: rgba(92, 196, 136, .14); --warn: #e8a75a; --danger: #ef7d8f; --danger-bg: rgba(239, 125, 143, .12);
  --shadow: 0 8px 28px rgba(0, 0, 0, .35); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.wrap.wide { max-width: 1240px; }

/* ---------- bandeau ---------- */
.band {
  background: linear-gradient(135deg, #2f0b33 0%, #4a1d50 60%, #5c2866 100%);
  color: var(--on-prune);
  padding-top: env(safe-area-inset-top);
  position: relative; overflow: hidden;
}
.band::before {
  content: ""; position: absolute; top: -140px; right: -80px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 83, .16) 0%, transparent 70%); pointer-events: none;
}
.band > * { position: relative; }
.band .wrap { padding-block: 18px 20px; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: #fff; }
.wordmark::before {
  content: "C"; width: 28px; height: 28px; border-radius: 6px; background: var(--gold); color: #2f0b33;
  display: inline-grid; place-items: center; font-weight: 700; font-size: 14px;
}
.badge-gold {
  display: inline-block; background: rgba(212, 168, 83, .15); color: var(--gold); font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(212, 168, 83, .25);
}
.eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.band h1 { font-size: clamp(26px, 6.5vw, 42px); font-weight: 700; letter-spacing: -.5px; margin-top: 4px; color: #fff; }

/* ---------- boutons & champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 8px; padding: 12px 18px; font-weight: 600; cursor: pointer;
  background: var(--prune); color: #fff; min-height: 46px; text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--prune-mid); }
.btn.gold { background: var(--gold); color: #2f0b33; }
.btn.gold:hover { background: var(--gold-hover); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--heading); border: 1px solid var(--border-strong); }
.btn.ghost:hover { background: var(--tint); }
.btn.danger { background: var(--danger-bg); color: var(--danger); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
label.field, div.field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--heading); }
.input, textarea.input {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; padding: 12px 14px;
  background: var(--paper); font-size: 16px; font-weight: 400; color: var(--ink);
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-muted); }
textarea.input { resize: vertical; min-height: 84px; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.error { color: var(--danger); font-size: 13.5px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px;
  font-size: 11.5px; font-weight: 600; background: var(--tint); color: var(--heading); white-space: nowrap;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.gold { background: var(--gold-muted); color: var(--gold-ink); }
.pill.muted { background: var(--surface-2); color: var(--text-secondary); }

/* ---------- barre de progression ---------- */
.progress { height: 10px; background: rgba(255,255,255,.18); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: inherit; transition: width .5s ease; }
.progress.light { background: var(--surface-2); }
.progress.light > span { background: var(--accent); }
.progress.light.done > span { background: var(--ok); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: #2f0b33; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- feuille modale ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--paper); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 20px 20px 0 0; padding: 22px max(18px, env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  animation: up .22s ease;
}
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 20px; } }
@keyframes up { from { transform: translateY(30px); opacity: .4; } }
.sheet h2 { font-size: 19px; color: var(--heading); }
.sheet .stack { display: grid; gap: 16px; margin-top: 16px; }
.sheet-close { float: right; border: 0; background: var(--surface-2); color: var(--text); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; }

.photo-pick {
  border: 1.5px dashed var(--gold); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer;
  color: var(--gold-ink); font-weight: 600; background: var(--gold-muted); display: block;
}
.photo-pick input { display: none; }
.photo-preview { position: relative; border-radius: 12px; overflow: hidden; background: var(--tile); }
.photo-preview img { width: 100%; max-height: 300px; object-fit: cover; }
.photo-preview button { position: absolute; top: 8px; right: 8px; }

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