/* ===== KUBE — direction artistique =====
   Symbole : un K construit sur un carré, coupé par une verticale et une diagonale (pente 2/3).
   Couleurs : Forêt #12332F · Papier #F0EDE7 · Carte #FAF8F4 · Trait #5E8074 · Brume #A9BDB4 · Laiton #B8863B
   Typo : Space Grotesk (titres, chiffres) · Inter (texte). Polices hébergées sur le site (rapide en 3G). */
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url(/fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url(/fonts/space-grotesk-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format("woff2"); }
:root {
  --k-forest: #12332F; --k-forest-2: #1E4A43; --k-paper: #F0EDE7; --k-card: #FAF8F4; --k-sage: #5E8074; --k-mist: #A9BDB4; --k-wash: #E3E9E4; --k-brass: #B8863B;
  --brand: #12332F; --brand-d: #0B2420; --brand-l: #E3E9E4;
  --bg: #F0EDE7; --card: #FAF8F4; --ink: #142824; --ink2: #33504A; --muted: #5E716B; --line: #D6DBD3;
  --green: #2F7D5B; --amber: #A8752C; --red: #B3412E; --blue: #2D5E7E;
  --r: 8px; --shadow: 0 1px 2px rgba(18,51,47,.05), 0 8px 24px rgba(18,51,47,.06);
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 Inter, "Segoe UI", system-ui, sans-serif; font-feature-settings: "cv11", "ss01"; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.noscroll { overflow: hidden; }
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 1.6rem; margin: 0 0 .3rem; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 1.1rem; margin: 0 0 .7rem; }
h3 { font-size: 1rem; margin: .4rem 0; }
p { margin: .3rem 0 .6rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.row { display: flex; align-items: center; } .gap { gap: .5rem; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

.btn { appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: .65rem 1rem; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; text-align: center; transition: transform .08s, filter .15s; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--k-brass); outline-offset: 3px; }
.btn:active { transform: scale(.98); } .btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn.danger { background: transparent; color: var(--red); border-color: transparent; }
.btn.block { width: 100%; } .btn.big { padding: .9rem 1.2rem; font-size: 1.05rem; } .btn.small { padding: .4rem .7rem; font-size: .85rem; border-radius: 5px; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }

label { display: block; font-size: .85rem; font-weight: 650; color: var(--ink2); margin: .6rem 0; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .65rem .75rem; margin-top: .3rem; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.check { display: flex; align-items: center; gap: .55rem; font-weight: 550; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.err { color: var(--red); font-size: .9rem; min-height: 1.2em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.pill { display: inline-block; font-size: .74rem; font-weight: 750; padding: .2rem .55rem; border-radius: 99px; white-space: nowrap; }
.pill.blue { background: #dbeafe; color: #1e40af; } .pill.amber { background: #fef3c7; color: #92400e; } .pill.green { background: #dcfce7; color: #166534; }
.pill.slate { background: #e7e5e4; color: #44403c; } .pill.red { background: #fee2e2; color: #991b1b; } .pill.brand { background: var(--brand-l); color: var(--brand-d); }

.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(12,10,9,.5); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .18s; }
.sheet-wrap.in { opacity: 1; }
.sheet { position: relative; background: var(--card); border-radius: 22px 22px 0 0; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; transform: translateY(40px); transition: transform .2s; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-body { padding: 1.3rem 1.2rem calc(1.3rem + var(--safe-b)); }
.sheet-x { position: absolute; top: .7rem; right: .7rem; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg); cursor: pointer; z-index: 2; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }

#toasts { position: fixed; left: 50%; bottom: calc(1.2rem + var(--safe-b)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 12px; font-weight: 650; font-size: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); text-align: center; }
.toast.err { background: #991b1b; } .toast.out { opacity: 0; transition: opacity .3s; }

.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 80; background: #92400e; color: #fff; text-align: center; font-size: .85rem; font-weight: 650; padding: .35rem; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Titres et chiffres en Space Grotesk, comme le logotype */
h1, h2, h3, .display, .bignum, .bigtotal, .onum, .kpi b, .price .amount { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
.pill { border-radius: 4px; letter-spacing: .01em; }
.pill.brand { background: var(--brand-l); color: var(--brand); }
.btn.primary:hover { filter: none; background: var(--brand-d); border-color: var(--brand-d); }
::selection { background: var(--k-mist); color: var(--k-forest); }
/* Motif : la coupe diagonale du K (pente 2/3) */
.k-cut { position: relative; }
.k-cut::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(146.3deg, transparent calc(50% - .5px), rgba(94,128,116,.35) 50%, transparent calc(50% + .5px)); }
