/* Localee — socle commun (site, app, espace adhérent)
   Contraste doux : jamais de blanc ni de noir purs, tons chauds. */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-var.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f5eee3;
  --paper-2: #ede4d5;
  --card: #fbf6ee;
  --ink: #2b241f;
  --ink-2: #5d5249;
  --ink-3: #8b7f74;
  --line: #e0d4c2;
  --line-2: #d3c5b1;

  --brand: #cf5230;          /* tomate brique : l'offre chaude */
  --brand-2: #b8441f;
  --brand-ink: #fbf1e6;
  --brand-soft: #f5d9c8;
  --forest: #2f5a4b;         /* vert sapin : le local, le quartier */
  --forest-soft: #d6e2d8;
  --cold: #5b7c93;
  --cold-soft: #d8e2e8;
  --gold: #c08a26;
  --ok: #3f7a52;
  --ok-soft: #d8e8d9;
  --warn: #b7791f;
  --danger: #b0413e;

  --display: "Bricolage", "Inter", system-ui, sans-serif;
  --ui: "Inter", system-ui, -apple-system, sans-serif;

  --r-s: 8px;
  --r: 14px;
  --r-l: 22px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 28px -12px rgba(60, 40, 20, .22);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1d1916;
    --paper-2: #25201c;
    --card: #2a2420;
    --ink: #ece2d4;
    --ink-2: #bfb2a3;
    --ink-3: #8f8376;
    --line: #3a322c;
    --line-2: #4a4038;
    --brand: #e0653f;
    --brand-2: #ea7852;
    --brand-ink: #221a15;
    --brand-soft: #4a2c20;
    --forest: #7fae98;
    --forest-soft: #263a31;
    --cold: #8fb0c6;
    --cold-soft: #26323a;
    --ok: #86c095;
    --ok-soft: #22352a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 30px -12px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1d1916;
  --paper-2: #25201c;
  --card: #2a2420;
  --ink: #ece2d4;
  --ink-2: #bfb2a3;
  --ink-3: #8f8376;
  --line: #3a322c;
  --line-2: #4a4038;
  --brand: #e0653f;
  --brand-2: #ea7852;
  --brand-ink: #221a15;
  --brand-soft: #4a2c20;
  --forest: #7fae98;
  --forest-soft: #263a31;
  --cold: #8fb0c6;
  --cold-soft: #26323a;
  --ok: #86c095;
  --ok-soft: #22352a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 30px -12px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 var(--ui);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin: 0; }

.eyebrow {
  font: 600 11px/1.2 var(--ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.hair { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .15s ease, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-brand { background: var(--brand); color: var(--brand-ink); }
.btn-brand:hover { background: var(--brand-2); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-soft { background: var(--paper-2); color: var(--ink); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* Champs */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 12px;
  font-size: 16px; /* 16 px : iOS ne zoome pas */
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Pastilles */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent;
  font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--paper-2); color: var(--ink-2);
}
.tag-brand { background: var(--brand-soft); color: var(--brand-2); }
.tag-forest { background: var(--forest-soft); color: var(--forest); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-cold { background: var(--cold-soft); color: var(--cold); }

/* Température « à la Dealabs » */
.temp { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.temp svg { width: 14px; height: 14px; }
.temp.hot { color: var(--brand); }
.temp.warm { color: var(--gold); }
.temp.cold { color: var(--cold); }

/* Prix */
.price { font-family: var(--display); font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.price-old { color: var(--ink-3); text-decoration: line-through; font-weight: 500; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 28px; height: 28px; flex: none; }
.logo-word { font: 800 22px/1 var(--display); letter-spacing: -.04em; }

/* Notifications éphémères */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 14px;
  font-weight: 500; font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 1000; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fbf1e6; }

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