/* ============================================================
   SEB — Espace commande · feuille de style
   Thème JOUR : bleu encre (SaaS épuré)
   Thème NUIT : anthracite / orange (atelier)
   ============================================================ */
:root {
  /* Couleurs de marque (jour — bleu encre) */
  --accent: #1f6feb;
  --accent-dark: #1a5fd0;
  --on-accent: #ffffff;
  --ink: #0f2742;          /* texte principal */
  --ink-soft: #5b6b7f;     /* texte secondaire */
  --ink-faint: #8a97a6;
  --paper: #f4f7fb;        /* fond de page */
  --card: #ffffff;         /* cartes / surfaces */
  --card-2: #fbfdff;
  --header: #ffffff;
  --header-txt: #0f2742;
  --line: #e3e9f0;
  --line-strong: #cfd9e4;
  --ok-bg: #ecf6f0;
  --ok-txt: #1f7a4d;
  --login-a: #14406e;
  --login-b: #0a2440;
  --shadow: 0 10px 30px rgba(20, 40, 70, 0.10);
  --radius: 12px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --accent: #f0a020;
  --accent-dark: #d98e10;
  --on-accent: #1b1e23;
  --ink: #e9e7e2;
  --ink-soft: #a3a9b2;
  --ink-faint: #767c85;
  --paper: #14161a;
  --card: #1c1f24;
  --card-2: #21252b;
  --header: #14161a;
  --header-txt: #f0a020;
  --line: #2c313a;
  --line-strong: #3a414b;
  --ok-bg: #1a2a20;
  --ok-txt: #5bd08a;
  --login-a: #1d2127;
  --login-b: #0c0d10;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  transition: background .25s ease, color .25s ease;
}
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); font-size: 0.85rem; }
.mt { margin-top: 1.4rem; }

/* ---------- Logo ---------- */
.logo-mark {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  letter-spacing: 0.5px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 1.25rem;
}
.logo-mark.small { width: 38px; height: 38px; font-size: 0.95rem; border-radius: 9px; }

/* ---------- Boutons ---------- */
.btn {
  border: none; border-radius: 9px; padding: 0.7rem 1.2rem;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--card-2); }
.btn-block { width: 100%; display: block; }

/* ---------- Champs ---------- */
.input, .select {
  width: 100%; padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong); border-radius: 9px;
  font-family: inherit; font-size: 0.95rem; background: var(--card); color: var(--ink);
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); margin: 0.9rem 0 0.35rem; }
textarea.input { resize: vertical; }

/* ============================================================
   CONNEXION
   ============================================================ */
.login-screen {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.2rem;
  background: linear-gradient(160deg, var(--login-a) 0%, var(--login-b) 100%);
  padding: 2rem;
}
.login-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 2.2rem; width: 100%; max-width: 420px; }
.login-brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.login-brand h1 { font-size: 1.2rem; line-height: 1.2; }
.login-brand p { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: 0.85rem; }
.login-intro { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0.5rem; }
.login-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 1rem; background: var(--paper); padding: 0.7rem 0.85rem; border-radius: 10px; }
.login-foot { color: rgba(255,255,255,0.75); font-size: 0.8rem; }
#lg-btn { margin-top: 1rem; }
.auth-title { font-size: 1.15rem; margin-bottom: 0.6rem; }
.auth-error { color: var(--on-accent); background: #c0392b; border-radius: 8px; padding: 0.5rem 0.7rem; font-size: 0.82rem; margin: 0.6rem 0 0; }
.auth-or { display: flex; align-items: center; gap: 0.6rem; color: var(--ink-faint); font-size: 0.78rem; margin: 0.8rem 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-google::before { content: "G"; font-weight: 800; color: #4285F4; }
.auth-switch { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.9rem; text-align: center; }
.auth-switch a { color: var(--accent); font-weight: 600; cursor: pointer; }
.auth-switch a:hover { text-decoration: underline; }
.demo-hint { font-size: 0.74rem; color: var(--ink-soft); margin-top: 1rem; background: var(--paper); padding: 0.6rem 0.7rem; border-radius: 10px; }
.demo-btn { border: 1px solid var(--line-strong); background: var(--card); color: var(--accent); border-radius: 7px; padding: 0.2rem 0.5rem; font-size: 0.74rem; font-weight: 600; cursor: pointer; margin: 0 0.1rem; }
.demo-btn:hover { background: var(--card-2); }
.auth-center { text-align: center; }
.pending-ic { font-size: 2.6rem; margin: 0.3rem 0 0.4rem; }
#view-pending .btn { margin-top: 1.2rem; }

/* ============================================================
   BARRE DU HAUT
   ============================================================ */
.topbar {
  display: flex; align-items: center; gap: 1.2rem;
  background: var(--header); border-bottom: 1px solid var(--line);
  padding: 0.7rem 1.4rem; position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 0.7rem; }
.topbar-title { font-weight: 700; font-size: 0.95rem; color: var(--header-txt); }
.topbar-search { flex: 1; max-width: 520px; }
.topbar-right { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; }
.client-badge { font-size: 0.82rem; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 0.35rem 0.7rem; border-radius: 999px; }
.icon-btn { background: var(--card-2); border: 1px solid var(--line); border-radius: 9px; width: 38px; height: 38px; cursor: pointer; font-size: 1.05rem; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--card); border-color: var(--line-strong); }
.cart-btn { position: relative; background: var(--card-2); border: 1px solid var(--line); border-radius: 9px; padding: 0.5rem 0.7rem; font-size: 1.05rem; cursor: pointer; color: var(--ink); }
.cart-count { position: absolute; top: -7px; right: -7px; background: var(--accent); color: var(--on-accent); font-size: 0.7rem; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.info-banner { background: var(--ok-bg); color: var(--ok-txt); font-size: 0.82rem; padding: 0.5rem 1.4rem; border-bottom: 1px solid var(--line); }
.info-banner .muted { color: color-mix(in srgb, var(--ok-txt) 70%, var(--ink-soft)); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 1.6rem; max-width: 1280px; margin: 1.4rem auto; padding: 0 1.4rem; }
.sidebar h3 { font-size: 1rem; margin-bottom: 0.6rem; }
.category-list { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.category-list li { padding: 0.55rem 0.7rem; border-radius: 9px; cursor: pointer; font-size: 0.9rem; color: var(--ink-soft); display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.category-list li:hover { background: var(--card); }
.category-list li.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.cat-count { font-size: 0.72rem; background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 999px; padding: 0.05rem 0.45rem; }
.category-list li.active .cat-count { background: color-mix(in srgb, var(--on-accent) 25%, transparent); }
.category-list .subcat-list { list-style: none; margin: 0.2rem 0 0.5rem; padding: 0 0 0 0.6rem; border-left: 2px solid var(--line); }
.category-list .subcat-item { padding: 0.4rem 0.7rem; border-radius: 8px; cursor: pointer; font-size: 0.83rem; color: var(--ink-soft); justify-content: flex-start; }
.category-list .subcat-item:hover { background: var(--card); }
.category-list .subcat-item.active { color: var(--accent); font-weight: 600; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.sidebar-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.sidebar-card h4 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.sidebar-card .acct-row { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 0.2rem 0; color: var(--ink-soft); }
.sidebar-card .acct-row strong { color: var(--ink); }
.encours-bar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 0.4rem 0 0.2rem; }
.encours-bar span { display: block; height: 100%; background: var(--accent); }

/* ---------- Catalogue ---------- */
.catalog-head { display: flex; align-items: baseline; gap: 0.7rem; margin-bottom: 1rem; }
.catalog-head h2 { font-size: 1.3rem; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }

.product-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.product-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--card-2); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.thumb-zoom { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.55); color: #fff; font-size: 0.72rem; padding: 0.2rem 0.5rem; border-radius: 999px; }
.best-badge { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--on-accent); font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 999px; letter-spacing: .2px; }
.product-card .body { padding: 0.85rem; display: flex; flex-direction: column; flex: 1; }
.product-card .pref { font-size: 0.72rem; color: var(--accent); font-weight: 700; letter-spacing: .4px; }
.product-card .pname { font-size: 0.95rem; font-weight: 600; margin: 0.15rem 0 0.4rem; line-height: 1.25; color: var(--ink); }
.product-card .pmeta { font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
.product-card .pbottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.product-card .pprice { font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.product-card .pprice small { font-weight: 500; color: var(--ink-soft); }
.pprice.on-demand { color: var(--ink-soft); font-weight: 600; font-size: 0.8rem; font-style: italic; }
.mini-add { background: var(--accent); color: var(--on-accent); border: none; border-radius: 8px; padding: 0.35rem 0.6rem; font-size: 0.8rem; cursor: pointer; font-weight: 600; white-space: nowrap; }
.mini-add:hover { background: var(--accent-dark); }

/* ============================================================
   MODALES
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 20, 35, 0.55); backdrop-filter: blur(2px); }
.modal-card { position: relative; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); max-width: 920px; width: 100%; max-height: 90vh; overflow: auto; padding: 1.6rem; z-index: 1; border: 1px solid var(--line); }
.modal-close { position: absolute; top: 0.9rem; right: 0.9rem; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 0.9rem; z-index: 2; color: var(--ink); }
.modal-close:hover { background: var(--card); }

.product-modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.zoom-stage { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); cursor: zoom-in; }
.zoom-img { width: 100%; height: 100%; object-fit: cover; transition: transform .08s ease-out; transform-origin: center center; }
.zoom-lens { position: absolute; width: 150px; height: 150px; border: 2px solid var(--accent); border-radius: 50%; pointer-events: none; display: none; box-shadow: 0 0 0 2000px rgba(0,0,0,0.04); background-repeat: no-repeat; }
.zoom-controls { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.7rem; }
.zoom-ctrl { background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; min-width: 34px; height: 34px; cursor: pointer; font-size: 1rem; font-weight: 700; color: var(--ink); }
.zoom-ctrl.wide { width: auto; padding: 0 0.8rem; font-size: 0.82rem; font-weight: 600; margin-left: auto; }
.zoom-ctrl:hover { background: var(--card); }
.zoom-level { font-size: 0.82rem; color: var(--ink-soft); min-width: 44px; text-align: center; }
.zoom-hint { font-size: 0.76rem; color: var(--ink-soft); margin-top: 0.5rem; }

.product-detail { display: flex; flex-direction: column; }
.pd-ref { font-size: 0.78rem; color: var(--accent); font-weight: 700; letter-spacing: .4px; }
#pd-nom { font-size: 1.35rem; margin: 0.2rem 0 0.5rem; }
.pd-desc { color: var(--ink-soft); font-size: 0.9rem; }
.pd-attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; margin: 1rem 0; padding: 0.9rem; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; }
.pd-attr { font-size: 0.82rem; }
.pd-attr .k { color: var(--ink-soft); display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .4px; }
.pd-attr .v { font-weight: 600; }
.pd-price-row { display: flex; align-items: center; justify-content: space-between; margin: 0.4rem 0 1rem; }
.pd-price { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.pd-price-note { font-size: 0.78rem; color: var(--ink-soft); }
.pd-qty { display: flex; align-items: center; gap: 0.3rem; }
.qty-btn { width: 34px; height: 34px; border: 1px solid var(--line-strong); background: var(--card-2); border-radius: 8px; cursor: pointer; font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.qty-input { width: 56px; height: 34px; text-align: center; border: 1px solid var(--line-strong); border-radius: 8px; font-family: inherit; font-size: 0.95rem; background: var(--card); color: var(--ink); }
.pd-trace { font-size: 0.76rem; color: var(--ink-soft); margin-top: 0.7rem; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(8, 12, 18, 0.94); display: flex; align-items: center; justify-content: center; }
.lightbox-stage { width: 90vw; height: 78vh; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: grab; }
.lightbox-stage.grabbing { cursor: grabbing; }
.lightbox-img { max-width: 100%; max-height: 100%; transform-origin: center center; transition: transform .05s linear; user-select: none; -webkit-user-drag: none; }
.lightbox-close { position: absolute; top: 1.2rem; right: 1.4rem; background: rgba(255,255,255,0.15); color: #fff; border: none; border-radius: 8px; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; }
.lightbox-hint { position: absolute; top: 1.4rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.7); font-size: 0.82rem; }
.lightbox-controls { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; align-items: center; background: rgba(0,0,0,0.4); padding: 0.5rem 0.7rem; border-radius: 12px; }
.lightbox-controls .zoom-level { color: #fff; }
.lightbox-controls .zoom-ctrl { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); color: #fff; }

/* ============================================================
   PANIER (drawer)
   ============================================================ */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(10,20,35,0.5); }
.drawer-panel { position: absolute; top: 0; right: 0; height: 100%; width: 100%; max-width: 420px; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.15rem; }
.cart-items { flex: 1; overflow: auto; padding: 1rem 1.4rem; }
.cart-empty { color: var(--ink-soft); text-align: center; margin-top: 3rem; }
.cart-item { display: flex; gap: 0.8rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 60px; height: 60px; border-radius: 9px; object-fit: cover; background: var(--card-2); }
.cart-item .ci-body { flex: 1; }
.cart-item .ci-name { font-size: 0.88rem; font-weight: 600; }
.cart-item .ci-meta { font-size: 0.76rem; color: var(--ink-soft); }
.cart-item .ci-controls { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.4rem; }
.cart-item .ci-controls button { width: 26px; height: 26px; border: 1px solid var(--line-strong); background: var(--card-2); border-radius: 6px; cursor: pointer; color: var(--ink); }
.cart-item .ci-controls .qn { min-width: 28px; text-align: center; font-size: 0.85rem; }
.cart-item .ci-price { font-weight: 700; color: var(--ink); font-size: 0.9rem; text-align: right; }
.ci-remove { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 0.75rem; text-decoration: underline; margin-top: 0.3rem; }
.cart-summary { border-top: 1px solid var(--line); padding: 1.2rem 1.4rem; }
.cart-line { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 0.2rem 0; color: var(--ink-soft); }
.cart-line.total { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-top: 0.4rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.cart-line.total span:last-child { color: var(--accent); }
#checkout-btn { margin-top: 0.9rem; }
.quote-note { font-size: 0.78rem; color: var(--ink-soft); background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.7rem; margin: 0.5rem 0 0.2rem; }

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-card { max-width: 760px; }
.checkout-card h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.6rem; }
.checkout-main h3 { font-size: 1rem; margin-bottom: 0.6rem; }
.pay-pending { border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem; background: var(--card-2); }
.pay-pending strong { font-size: 0.92rem; }
.pay-future { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.6rem; font-size: 0.84rem; }
.pay-future span span { color: var(--accent); font-weight: 600; }
.checkout-side { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; }
.checkout-side h3 { font-size: 1rem; margin-bottom: 0.7rem; }
.checkout-recap { font-size: 0.84rem; }
.recap-item { display: flex; justify-content: space-between; padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
#confirm-btn { margin-top: 1rem; }

.batter-card { max-width: 460px; }
.batter-card h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.batter-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.2rem; }

.confirm-card { max-width: 480px; text-align: center; }
.confirm-check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-txt); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0.4rem auto 1rem; }
.confirm-num { font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.confirm-ebp { background: var(--ok-bg); color: var(--ok-txt); font-size: 0.82rem; text-align: left; padding: 0.9rem; border-radius: 12px; margin: 1.2rem 0; }
.confirm-actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* ---------- Espace « Mon compte & factures » (drawer) ---------- */
.acct-space { padding: 0.4rem 0.2rem; overflow-y: auto; }
.acct-h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); margin: 1.2rem 0 0.5rem; }
.acct-h3:first-child { margin-top: 0.2rem; }
.acct-block .acct-row { display: flex; justify-content: space-between; gap: 0.8rem; font-size: 0.85rem; padding: 0.35rem 0; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.acct-block .acct-row strong { color: var(--ink); text-align: right; }
.regl-row { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.65rem 0.75rem; margin-bottom: 0.5rem; }
.regl-row.paid { border-color: var(--ok-txt); }
.regl-num { font-weight: 600; font-size: 0.86rem; }
.regl-meta { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.12rem; }
.regl-paid { color: var(--ok-txt); font-weight: 600; }
.acct-order { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--line); }
.acct-badge { background: var(--ok-bg); color: var(--ok-txt); font-size: 0.72rem; font-weight: 600; padding: 0.22rem 0.6rem; border-radius: 999px; white-space: nowrap; }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: 0.7rem 1.2rem; border-radius: 10px; font-size: 0.9rem; z-index: 90; box-shadow: var(--shadow); }

/* ---------- Tutoriel d'accueil ---------- */
.onboard { position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.onboard-card { background: var(--card); border-radius: 18px; width: 100%; max-width: 460px; padding: 2rem 1.8rem 1.5rem; text-align: center; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: onboard-in 0.25s ease; }
@keyframes onboard-in { from { transform: translateY(20px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.onboard-skip { position: absolute; top: 1rem; right: 1.2rem; background: none; border: none; color: var(--ink-soft); font-size: 0.88rem; cursor: pointer; }
.onboard-skip:hover { color: var(--ink); }
.onboard-ic { font-size: 3.4rem; line-height: 1; margin: 0.2rem 0 0.7rem; }
.onboard-card h2 { font-size: 1.4rem; margin: 0 0 0.6rem; }
.onboard-card .muted { font-size: 0.97rem; line-height: 1.55; min-height: 4.2em; }
.onboard-dots { display: flex; justify-content: center; gap: 0.45rem; margin: 1.3rem 0; }
.onboard-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: all 0.2s; }
.onboard-dot.active { background: var(--accent); width: 24px; border-radius: 5px; }
.onboard-nav { display: flex; gap: 0.7rem; }
.onboard-nav .btn { flex: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .product-modal-body { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
}

/* ============================================================
   ACCESSIBILITÉ (recommandations skill ui-ux-pro-max)
   ============================================================ */
/* Focus clavier visible sur les éléments interactifs */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.product-card:focus-visible, .category-list li:focus-visible { outline-offset: -2px; }

/* ===================== Inscription : mention + champ requis ===================== */
.signup-note { font-size: 0.82rem; color: var(--ink-soft); background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.7rem; margin: 0.7rem 0; }
.field-label .req { color: #c0392b; }

/* ===================== Mes factures (sidebar) ===================== */
.invoice-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 0.4rem; text-decoration: none; color: var(--ink); background: var(--card-2); }
.invoice-row:hover { border-color: var(--accent); }
.invoice-row .inv-ic { font-size: 1.1rem; }
.invoice-row .inv-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.invoice-row .inv-name { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invoice-row .inv-date { font-size: 0.72rem; color: var(--ink-soft); }
.invoice-row .inv-dl { color: var(--accent); font-weight: 700; }

/* ===================== Notifications ===================== */
#notif-btn { position: relative; }
.notif-list { flex: 1; overflow-y: auto; padding: 0.8rem 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.notif-tools { display: flex; justify-content: flex-end; }
.notif-clear { background: none; border: none; color: var(--accent); font-family: inherit; font-size: 0.8rem; cursor: pointer; padding: 0.1rem 0.2rem; }
.notif-clear:hover { text-decoration: underline; }
.notif-item { position: relative; border: 1px solid var(--line); border-radius: 11px; padding: 0.7rem 2rem 0.7rem 0.85rem; background: var(--card-2); }
.notif-item.unread { border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card-2)); }
.notif-del { position: absolute; top: 0.5rem; right: 0.5rem; background: none; border: none; color: var(--ink-soft); font-size: 0.9rem; cursor: pointer; line-height: 1; padding: 0.2rem; border-radius: 6px; }
.notif-del:hover { background: var(--card); color: var(--ink); }
.notif-pay { cursor: pointer; }
.notif-pay-btn { margin-top: 0.5rem; }
.notif-paid { margin-top: 0.4rem; font-size: 0.82rem; font-weight: 700; color: var(--ok-txt, #1a7f4b); }

/* Écran de paiement (simulation Stripe) */
.pay-card { max-width: 420px; }
.pay-brand { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 0.8rem; }
.pay-powered { float: right; font-style: italic; }
.pay-recap { background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; margin-bottom: 1rem; }
.pay-line { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 0.2rem 0; }
.pay-total { border-top: 1px solid var(--line); margin-top: 0.3rem; padding-top: 0.5rem; font-size: 1.05rem; }
.pay-total strong { color: var(--accent); }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.pay-note { font-size: 0.74rem; color: var(--ink-soft); margin-top: 0.6rem; text-align: center; }
.pay-done { text-align: center; padding: 0.5rem 0; }
.notif-title { font-weight: 700; font-size: 0.92rem; }
.notif-text { font-size: 0.86rem; color: var(--ink); margin-top: 0.2rem; white-space: pre-wrap; word-break: break-word; }
.notif-date { font-size: 0.72rem; color: var(--ink-soft); margin-top: 0.35rem; }

/* ===================== Chat client ↔ SEB ===================== */
#chat-btn { position: relative; }
.chat-intro { font-size: 0.82rem; padding: 0 1.1rem; }
.chat-thread { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.chat-msg { max-width: 80%; display: flex; flex-direction: column; gap: 0.15rem; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.them { align-self: flex-start; align-items: flex-start; }
.chat-bubble { padding: 0.5rem 0.75rem; border-radius: 14px; font-size: 0.88rem; line-height: 1.35; white-space: pre-wrap; word-break: break-word; }
.chat-msg.me .chat-bubble { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.chat-msg.them .chat-bubble { background: var(--card-2); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-time { font-size: 0.68rem; color: var(--ink-soft); }
.chat-input { display: flex; gap: 0.5rem; padding: 0.8rem 1.1rem; border-top: 1px solid var(--line); }
.chat-input .input { flex: 1; }

/* Respect de prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .product-card:hover { transform: none; }
  .product-card:hover .thumb img { transform: none; }
}
