:root{
  --bg:#0b0f14;--panel:#0f1621;--muted:#9fb3c8;--text:#e8eef4;
  --brand:#60a5fa;--brand2:#a78bfa;--line:rgba(255,255,255,.12);--shadow:0 12px 32px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,Arial,sans-serif;color:var(--text);background:var(--bg)}
.container{width:min(1200px,94vw);margin:0 auto}

/* Header */
.header{position:sticky;top:0;height:64px;z-index:40;background:rgba(10,14,20,.7);backdrop-filter:none;border-bottom:1px solid var(--line)}
.nav-wrap{display:flex;align-items:center;justify-content:space-between;height:100%;padding:0 16px}
.brand{font-weight:800;text-decoration:none;color:var(--text)}
.nav a{margin-left:16px;color:var(--muted);text-decoration:none;font-weight:600}
.nav a.active,.nav a:hover{color:var(--text)}

/* Hero */
.hero{position:relative;min-height:34vh;display:grid;place-items:center;text-align:center}
.hero-mini{min-height:28vh}
.hero-bg{position:absolute;inset:0;background:url('assets/hero.jpg') center/cover no-repeat fixed}
.hero-overlay{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.hero-inner{position:relative;z-index:1}
.btn{display:inline-block;padding:10px 14px;border-radius:10px;border:1px solid var(--line);cursor:pointer;text-decoration:none;color:var(--text);background:rgba(255,255,255,.06)}
.btn.primary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#07121a;border:none}

/* Gate */
.gate{position:fixed;inset:0;display:grid;place-items:center;background:rgba(5,10,20,.92);z-index:60}
.gate-card{background:rgba(255,255,255,.06);padding:24px;border-radius:12px;text-align:center;border:1px solid var(--line)}
.error{color:#ff9f9f;min-height:1.2em}
body.locked main, body.locked .header, body.locked .hero{filter:none;pointer-events:none;user-select:none}

/* Sheet layout */
.sheet{display:grid;grid-template-columns: 1fr 320px;gap:18px;margin-top:18px}
@media (max-width:980px){ .sheet{grid-template-columns:1fr} .summary{order:-1} }

.content{min-width:0}
.stickybar{position:sticky;top:70px;background:linear-gradient(180deg, rgba(10,14,20,.85), rgba(10,14,20,.65));backdrop-filter:none;
  border:1px solid var(--line); border-radius:12px; padding:10px; z-index:30}
.fiche-toolbar .row{display:flex;gap:12px;flex-wrap:wrap;align-items:end}
.fiche-toolbar label{display:flex;flex-direction:column;gap:6px;min-width:180px}
.fiche-toolbar input{padding:10px;border-radius:10px;border:1px solid var(--line);background:rgba(255,255,255,.06);color:var(--text)}

/* Accordions grid */
.calc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px;margin-top:16px}
.calc-card{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:rgba(255,255,255,.05);box-shadow:var(--shadow)}
.calc-card[open]{background:rgba(255,255,255,.06)}
.calc-card summary{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:rgba(255,255,255,.08);cursor:pointer;list-style:none;border-bottom:1px solid var(--line)}
.calc-card h3{margin:0}
.calc-card .sum{font-weight:800}
.table-wrap{max-height:420px;overflow:auto}
.calc-table{width:100%;border-collapse:collapse;table-layout:fixed}
.calc-table col.col-name{width:56%} .calc-table col.col-price{width:18%} .calc-table col.col-qty{width:14%} .calc-table col.col-sub{width:12%}
.calc-table th,.calc-table td{padding:10px;border-bottom:1px dashed var(--line);vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.calc-table th{position:sticky;top:0;background:rgba(15,22,33,.95);z-index:1}
.calc-table input{width:100%;padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:rgba(255,255,255,.06);color:var(--text);text-align:right}
.calc-table input.qty{text-align:center}
.calc-table .subtotal{text-align:right;font-weight:700}
@media (max-width:560px){ .calc-table col.col-sub{width:0} .calc-table .subtotal{display:none} }

/* Summary panel */
.summary{position:sticky;top:70px;height:max-content;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px;box-shadow:var(--shadow)}
.summary h3{margin:0 0 8px}
.recap{list-style:none;margin:0;padding:0}
.recap li{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px dashed var(--line)}
.recap li:last-child{border-bottom:none}
.totals{margin-top:10px;display:grid;gap:8px}
.totals > div{display:flex;justify-content:space-between}
.totals .grand{font-size:1.2rem;font-weight:900}
.notes textarea{width:100%;margin-top:6px;padding:10px;border-radius:10px;border:1px solid var(--line);background:rgba(255,255,255,.06);color:var(--text)}

/* === Patch: afficher les noms en entier sur toutes les pages === */
:root {
  --text-wrap-anywhere: anywhere;
}
/* Tables et cellules */
table, .table, .calc-table { table-layout: auto !important; }
table th, table td, .table th, .table td, .calc-table th, .calc-table td {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word !important;
}
/* Champs de saisie des noms */
input[type="text"], .name, .product-name, .title-input {
  width: 100% !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word !important;
}
/* Titres et libellés susceptibles d'être ellipsés */
h1, h2, h3, h4, h5, h6,
.card-title, .product-title, .item-title, .line-name, .label, label,
.nav a, .breadcrumb, .badge, .pill, .summary h3, .cat-name {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word !important;
}
/* Cartes, lignes, grilles — laissez la largeur respirer */
.card, .calc-card, .row, .grid, .list, .item, details.calc-card summary h3 {
  min-width: 0;
}
/* Empêcher les ellipses forcées */
.ellipsis, .truncate, .text-ellipsis, .line-clamp {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
/* Inputs nombre + TVA prennent la place nécessaire sans couper le nom */
.calc-table td input[type="number"] {
  max-width: 140px;
}
/* Empêcher que des conteneurs imposent un overflow:hidden global */
*[style*="overflow:hidden"] {
  overflow: visible !important;
}


/* === Boutons pro & cohérents (patch global) === */
:root {
  --btn-bg: #23262f;
  --btn-bg-hover: #2b2f3a;
  --btn-border: #2a2f3a;
  --btn-fg: #ffffff;
  --btn-primary-bg: linear-gradient(180deg, #5b7cff 0%, #3a53ff 100%);
  --btn-primary-border: #3a53ff;
  --btn-ghost-border: rgba(255,255,255,.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: 12px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;           /* pas de retour à la ligne dans les boutons */
  user-select: none;
  cursor: pointer;
  transition: transform .02s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 6px 16px rgba(0,0,0,.25);
}
.btn:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.primary { background: var(--btn-primary-bg); border-color: var(--btn-primary-border); color: #fff; }
.btn.ghost   { background: transparent; border-color: var(--btn-ghost-border); box-shadow: none; }
.btn.danger  { background: #3a2020; border-color: #5a2b2b; color: #fff; }

.btn.small { padding: .35rem .6rem; font-size: .875rem; border-radius: 10px; }
.btn.icon  { aspect-ratio: 1 / 1; min-width: 2.25rem; justify-content: center; padding: .45rem; }

.btn-group { display:flex; flex-wrap:wrap; gap:.4rem; }

/* Actions dans les tableaux */
.calc-table td .btn { font-weight: 600; }
.calc-table td .btn.small { min-width: 2.5rem; }

/* Empêche que le style anti-ellipsis casse les boutons */
button, .btn { white-space: nowrap !important; overflow: visible !important; text-overflow: clip !important; }


/* === Patch en-têtes de tableaux : empêcher "Pri x" / "Qt é" === */
.calc-table thead th,
.table thead th,
table thead th {
  white-space: nowrap !important;
  word-break: keep-all !important;
  hyphens: manual !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Largeur minimale pour les colonnes prix/qté courtes afin d'éviter les retours à la ligne */
.calc-table thead th:nth-child(3),
.calc-table thead th:nth-child(4),
.calc-table thead th:nth-child(5),
.table thead th:nth-child(2),
.table thead th:nth-child(3) {
  min-width: 64px;
  text-align: center;
}


/* === Styles Accueil === */
.hero {
  background: url("hero.jpg") no-repeat center center/cover;
  height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  color: white;
  text-align: center;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.logo {
  max-width: 220px;
  margin-bottom: 20px;
}

.content {
  position: relative;
  z-index: 1;
}

.menu {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.menu .btn {
  font-size: 18px;
  padding: 14px 30px;
  border-radius: 30px;
  font-weight: 700;
}


/* === Accueil (hero) === */
.hero {
  background: url("hero.jpg") no-repeat center center/cover;
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  color: #fff;
  text-align: left;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.content { position: relative; z-index: 1; }

.logo { max-width: 200px; margin: 0 0 10px 0; }

.home h1 { font-size: 40px; margin: 10px 0; }
.home p { opacity: .95; margin-bottom: 18px; }

.menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.home-btn {
  background: linear-gradient(45deg, #ff6a00, #ee0979);
  color: #fff;
  padding: 14px 26px;
  border-radius: 28px;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

.home-btn:hover { transform: translateY(-2px); opacity: .95; }

/* Footer */
footer {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
}


/* === Modal centré style (uniforme) === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;            /* affiché via JS */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.65);
  z-index: 10000;
}

.modal.glass {
  background: rgba(25,25,25,.85);
  color: #fff;
  width: min(92vw, 520px);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.08);
  text-align: left;
}

.modal h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.modal p { margin: 0 0 14px; opacity: .95; }

.modal .input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.modal .input-wrap input {
  flex: 1;
  height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  outline: none;
}

.modal .btn {
  background: linear-gradient(45deg, #ff6a00, #ee0979);
  border: none;
  padding: 12px 22px;
  border-radius: 24px;
  font-weight: 800;
}

.modal .error { display:none; margin-top: 10px; color:#ff9aa2; font-weight:700; }


/* === Thème Diamond (couleurs logo) === */
:root{
  --diamond-pink: #ee0979;
  --diamond-orange: #ff6a00;
  --diamond-dark: #121316;
  --diamond-panel: rgba(15,16,20,0.85);
  --diamond-border: rgba(255,255,255,0.08);
  --diamond-text: #e9ecf1;
}

body {
  color: var(--diamond-text);
}

.page-center .card, 
.page-center .panel, 
.page-center .box, 
.page-center aside, 
.page-center section {
  background: var(--diamond-panel);
  border: 1px solid var(--diamond-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* Titres de sections / cartes */
.page-center h2, .page-center h3, .page-center .title {
  color: #fff;
  font-weight: 800;
}

/* En-têtes de tableaux */
.page-center table thead th {
  background: linear-gradient(90deg, var(--diamond-orange), var(--diamond-pink));
  color: #fff;
  border: none;
}

/* Corps de tableaux */
.page-center table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}
.page-center table tbody tr:nth-child(even){
  background: rgba(255,255,255,0.03);
}
.page-center table td, 
.page-center table th{
  padding: 8px 10px;
  border-bottom: 1px solid var(--diamond-border);
}

/* Champs de saisie */
.page-center input[type="text"],
.page-center input[type="number"],
.page-center input[type="date"],
.page-center select, 
.page-center textarea {
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid var(--diamond-border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

/* Badges onglets (1. Fiche, 2. Éditeur, 3. Récap) */
nav .badge, .tabs .badge {
  background: linear-gradient(90deg, var(--diamond-pink), var(--diamond-orange));
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
}

/* Boutons (déjà unifiés) */
button,
input[type="button"],
input[type="submit"],
a.btn,
.btn {
  background: linear-gradient(45deg, var(--diamond-orange), var(--diamond-pink));
  color: #fff !important;
  padding: 12px 24px;
  border: none;
  border-radius: 26px;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
a.btn:hover,
.btn:hover {
  transform: translateY(-2px);
  opacity: .96;
  box-shadow: 0 14px 30px rgba(0,0,0,.45);
}

/* Récapitulatif panel */
.page-center .recap, .page-center .recapitulatif, .page-center .summary {
  background: rgba(20,22,26,0.9);
  border: 1px solid var(--diamond-border);
  border-radius: 14px;
  padding: 12px;
}
.page-center .recap .title, .page-center .recapitulatif .title { 
  color:#fff; 
}


/* Gate styles */
body.locked { overflow: hidden; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.65);
  z-index: 10000;
}
.modal.glass {
  background: rgba(25,25,25,.85);
  color: #fff;
  width: min(92vw, 520px);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.08);
}
.modal h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.modal p { margin: 0 0 14px; opacity: .95; }
.modal .input-wrap { display:flex; gap:10px; align-items:center; }
.modal .input-wrap input {
  flex:1; height:44px; padding:10px 14px; border-radius:12px;
  border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.08);
  color:#fff; outline:none;
}
.modal .btn { background: linear-gradient(45deg,#ff6a00,#ee0979); border:none; padding:12px 22px; border-radius:24px; font-weight:800; }
.modal .error { display:none; margin-top:10px; color:#ff9aa2; font-weight:700; }


/* Sécurité: pas de filtre flou global */
body.locked { overflow: hidden; }

/* Modal backdrop (pas d'effet sur l'accueil quand fermé) */
.modal-backdrop { display:none; position:fixed; inset:0; align-items:center; justify-content:center; background:rgba(0,0,0,.65); z-index:10000; }

.modal.glass { background:rgba(25,25,25,.85); color:#fff; width:min(92vw, 520px); border-radius:16px; padding:22px; box-shadow:0 20px 50px rgba(0,0,0,.55); border:1px solid rgba(255,255,255,.08); }

.modal .input-wrap { display:flex; gap:10px; align-items:center; }
.modal .input-wrap input { flex:1; height:44px; padding:10px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.08); color:#fff; outline:none; }
.modal .btn { background: linear-gradient(45deg,#ff6a00,#ee0979); border:none; padding:12px 22px; border-radius:24px; font-weight:800; }

/* === Table manuelle === */
.manual-card{ background: rgba(20,22,26,0.9); border:1px solid rgba(255,255,255,.08); border-radius:14px; padding:12px; margin-top:16px; }
.manual-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.manual-table{ width:100%; border-collapse: collapse; }
.manual-table th, .manual-table td{ border-bottom:1px solid rgba(255,255,255,.08); padding:8px 10px; }
.manual-table input{ width:100%; border-radius:10px; border:1px solid rgba(255,255,255,.15); background:rgba(255,255,255,.06); color:#fff; padding:8px 10px; outline:none; }
.manual-table .del-row{ padding:8px 12px; }


/* Fix: overlay must not block clicks */
.overlay { pointer-events: none; z-index: 0; }
.content { position: relative; z-index: 1; }

/* Correction: plus de flou global */
body.locked { overflow: hidden; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display:none; pointer-events:none; z-index:0; }
.content { position: relative; z-index:1; }


/* --- Anti-blur & safe overlays --- */
body.locked { overflow: hidden; } /* no filter blur here */

.content { filter: none !important; } /* force remove any residual blur */
.page-center { filter: none !important; }

/* Hero overlay shouldn't block clicks and shouldn't be fixed */
.overlay { pointer-events: none; z-index: 0; filter: none !important; }

/* Modal backdrop is separate (darken only when open) */
.modal-backdrop { display:none; position:fixed; inset:0; align-items:center; justify-content:center; background:rgba(0,0,0,.65); z-index:10000; }
.modal.glass { background:rgba(25,25,25,.85); color:#fff; width:min(92vw,520px); border-radius:16px; padding:22px; box-shadow:0 20px 50px rgba(0,0,0,.55); border:1px solid rgba(255,255,255,.08); }
.modal .input-wrap { display:flex; gap:10px; align-items:center; }
.modal .input-wrap input { flex:1; height:44px; padding:10px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.08); color:#fff; outline:none; }
.modal .btn { background: linear-gradient(45deg,#ff6a00,#ee0979); border:none; padding:12px 22px; border-radius:24px; font-weight:800; }


/* Hard override: never blur page when locked */
body.locked main,
body.locked .header,
body.locked .hero {
  filter: none !important;
}


/* === Boutique pro === */
.category-pills{
  display:flex; flex-wrap:wrap; gap:8px;
}
.category-pills .pill{
  border:none; border-radius:999px; padding:10px 16px; font-weight:600;
  cursor:pointer;
  background: linear-gradient(90deg, #ff512f, #dd2476);
  color:#fff; box-shadow:0 2px 8px rgba(0,0,0,.15);
}
.category-pills .pill:hover{ filter:brightness(1.05); transform: translateY(-1px); }
.catalog-sections{ display:flex; flex-direction:column; gap:24px; margin-top:8px; }
.catalog-section{ scroll-margin-top: 90px; }
.catalog-section h4{ margin:8px 0 12px; font-size:1.1rem; }
.product-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
  gap:12px;
}
.product-card{
  border-radius:14px; padding:14px; background:#1b1f2a; color:#fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  display:flex; flex-direction:column; gap:8px;
}
.product-card .title{ font-weight:700; }
.product-card .meta{ font-size:.9rem; opacity:.9; display:flex; gap:8px; flex-wrap:wrap; }
.badge{ padding:2px 8px; border-radius:999px; background:#2a3142; }
.product-card button{
  align-self:flex-start; border:none; border-radius:10px; padding:8px 12px;
  background:#00c853; color:#fff; font-weight:600; cursor:pointer;
}
.product-card button:hover{ filter:brightness(1.05); transform: translateY(-1px); }


/* === PRO THEME APPEND === */

/* ===============================
   Design System — The Lounge PRO
   =============================== */
:root{
  --bg: #0b0f1a;
  --bg-soft: #121829;
  --bg-elev: #0f1524;
  --card: #11182a;
  --muted: #aab2c8;
  --text: #f2f5ff;
  --primary: #6c7cff;
  --primary-600: #5869ff;
  --primary-700: #4455ff;
  --accent: #00d793;
  --danger: #ff5470;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 20px;
  --radius-sm: 12px;
  --ring: 0 0 0 2px rgba(108,124,255,.25);
}

*{ box-sizing:border-box; }

html, body{ height:100%; }

body.theme-pro{
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(108,124,255,.07), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(0,215,147,.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.35;
}

/* Layout */
.container.sheet{
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.content{ display:flex; flex-direction:column; gap: 16px; }

/* Cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.card header{ padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.card h3{ margin:0; font-size: 1.05rem; letter-spacing:.2px; }
.card .table-wrap{ padding: 12px; }

/* Toolbar */
.fiche-toolbar{
  background: transparent;
  gap: 10px;
}
.fiche-toolbar .row{
  display:flex; flex-wrap:wrap; gap:12px; align-items:end;
  padding: 10px 12px; background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.06); border-radius: var(--radius);
}

/* Inputs */
label{ color: var(--muted); font-size:.92rem; display:flex; flex-direction:column; gap:6px; }
input, select, textarea{
  background: #0f1524;
  border: 1px solid rgba(255,255,255,.07);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}
input:focus, select:focus, textarea:focus{ box-shadow: var(--ring); border-color: var(--primary); }

/* Buttons */
.btn{
  border: 0; border-radius: 12px;
  padding: 10px 14px; font-weight: 600; color: #0b0f1a; background: var(--primary);
  cursor: pointer; transition: .15s ease;
}
.btn.primary{ background: var(--primary); color:#fff; }
.btn.ghost{ background: rgba(255,255,255,.06); color: var(--text); }
.btn:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.btn.ghost:hover{ background: rgba(255,255,255,.1); }

/* Category pills */
.category-pills{ display:flex; flex-wrap:wrap; gap:8px; padding: 12px 16px; }
.pill{
  border:1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, #151d33, #0e1526);
  color: var(--text); border-radius: 999px; padding: 10px 16px; font-weight:700;
  box-shadow: var(--shadow); cursor: pointer;
}
.pill:hover{ border-color: rgba(108,124,255,.4); box-shadow: 0 8px 24px rgba(108,124,255,.18); }
.pill:active{ transform: translateY(1px); }

/* Product grid */
.catalog-sections{ display:flex; flex-direction:column; gap:18px; padding: 0 12px 12px; }
.catalog-section{ scroll-margin-top: 90px; }
.catalog-section h4{
  margin:4px 6px 10px; font-size:1.05rem; color: var(--muted);
  font-weight: 700; letter-spacing:.3px;
}
.product-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap:14px;
}
.product-card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border:1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 14px;
  display:flex; flex-direction:column; gap:10px;
}
.product-card .title{ font-weight:700; }
.product-card .meta{ font-size:.92rem; opacity:.95; display:flex; gap:8px; flex-wrap:wrap; }
.badge{ padding:4px 10px; border-radius: 999px; background:#1b2238; color:#cfe0ff; border:1px solid rgba(255,255,255,.06); }
.product-card button{ background: var(--accent); color:#00140d; }
.product-card button:hover{ box-shadow: 0 8px 20px rgba(0,215,147,.3); }

/* Table (Panier) */
.manual-table{ width:100%; border-collapse: separate; border-spacing:0; }
.manual-table thead th{
  text-align:left; font-weight:700; font-size:.9rem; color:#e7ebff;
  background: linear-gradient(180deg, #1b2238, #141b2e);
  padding:12px; border-top-left-radius: 12px; border-top-right-radius:12px;
}
.manual-table thead th+th{ border-left:1px solid rgba(255,255,255,.06); }
.manual-table tbody td{
  background:#0f1524; border-top:1px solid rgba(255,255,255,.06);
  padding: 8px 10px; vertical-align: middle;
}
.manual-table tbody tr:last-child td{
  border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;
}
.manual-table input{ width:100%; }

/* Summary */
.summary{
  position: sticky; top: 16px;
  height: fit-content;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border:1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.summary h3{ margin-top:0; }
.summary .recap{ list-style:none; padding:0; margin:0 0 12px 0; display:flex; flex-direction:column; gap:8px; }
.summary .recap li{ display:flex; justify-content:space-between; align-items:center; }
.summary .grand{ margin-top:12px; padding-top:12px; border-top:1px dashed rgba(255,255,255,.12); font-weight:700; font-size:1.05rem; }
.summary .notes textarea{ width:100%; margin-top:6px; }

/* Divider */
hr.section{ height:1px; border:0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent); margin: 6px 0 2px; }

/* Logo refinement */
.logo-center{ height: 90px; filter: drop-shadow(0 6px 22px rgba(0,0,0,.3)); }

@media (max-width: 1000px){
  .container.sheet{ grid-template-columns: 1fr; }
  .summary{ position: static; }
}


/* === Sticky Table Header === */

/* Sticky header for product table */
.manual-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.manual-table thead{
  position: sticky;
  top:0;
  z-index:2;
}



/* Sticky header for the cart table */
#cart-card .manual-table thead{
  position: sticky;
  top: 8px;
  z-index: 10;
}
#cart-card .manual-header{
  position: sticky;
  top: 0;
  z-index: 11;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  backdrop-filter: blur(6px);
}
/* Allow page scrolling while header stays visible */
#cart-card{ position: relative; }



/* === Floating Cart Dock (Pro) === */
.cart-dock{
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(1180px, 94vw);
  z-index: 1000;
  pointer-events: none; /* so only inner handles events */
}
.cart-dock .dock-inner{
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.dock-header{
  display:flex; justify-content:space-between; align-items:center;
  gap: 12px; padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(12,18,36,.9), rgba(12,18,36,.8));
}
.dock-title{ display:flex; align-items:center; gap:10px; font-size:1rem; }
.count-badge{ display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; padding:0 8px; border-radius:999px; background:#00d793; color:#00140d; font-weight:800; font-size:.85rem; }
.dock-actions .btn{ padding:8px 12px; border-radius:10px; }
.dock-table-wrap{ max-height: 260px; overflow:auto; padding: 8px 10px; }

/* Clean table inside dock */
#items-table{ width:100%; border-collapse:separate; border-spacing:0; }
#items-table thead th{
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(180deg, #1b2238, #141b2e);
  padding:10px; font-weight:700; font-size:.9rem;
}
#items-table tbody td{ background: #0f1524; border-top:1px solid rgba(255,255,255,.06); padding:8px 10px; }
#items-table input{ width:100%; }



/* === Clean PRO pass === */
:root{
  --bg: #0b0f14;
  --surface: #0f141d;
  --elev: #131a25;
  --line: rgba(255,255,255,.08);
  --text: #e8ecf4;
  --muted: #9aa6bf;
  --primary: #6c7cff;
  --accent: #21d39a;
  --danger: #ff5d6c;
  --radius: 16px;
  --shadow: 0 10px 28px rgba(0,0,0,.32);
}

.container.sheet{ gap: 24px; }
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.card header{ background: linear-gradient(180deg, rgba(255,255,255,.02), transparent); }

/* Boutique sections framed */
.catalog-section{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
}
.catalog-section h4{ margin: 0 0 8px; color: var(--text); opacity:.9; }
.product-card{
  background: var(--elev);
  border: 1px solid var(--line);
}

/* Cart header */
#cart-card .cart-header{
  display:flex; justify-content:space-between; align-items:center; padding: 10px 12px;
}
#cart-card h3{ display:flex; align-items:center; gap:8px; margin:0; }
.cart-count-badge{
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 28px; height: 28px; padding: 0 8px;
  border-radius: 999px; background: #1b2233; color:#cfe0ff; border:1px solid var(--line);
  font-size:.9rem; font-weight:700;
}

/* Sticky head inside cart */
#cart-card .manual-header{ position: sticky; top: 0; z-index: 15; background: var(--surface); border-bottom: 1px solid var(--line); }
#cart-card .manual-table thead{ position: sticky; top: 52px; z-index: 10; }

/* Table */
.manual-table thead th{ background: #182233; border-bottom: 1px solid var(--line); }
.manual-table tbody td{ background: #0f1521; }
.manual-table tbody tr:hover td{ background:#111a2b; }
.manual-table td:last-child{ text-align:right; }

/* Inputs in table */
.manual-table input{
  background:#0c111b; border:1px solid var(--line); border-radius:10px; padding:8px 10px;
}

/* Quantity stepper */
.stepper{
  display:inline-flex; align-items:center; border:1px solid var(--line);
  border-radius:10px; overflow:hidden; background:#0c111b;
}
.stepper button{ background:transparent; color:var(--text); padding:6px 10px; border:0; cursor:pointer; }
.stepper input{ width:58px; border:0; text-align:center; background:transparent; padding:8px 0; }

/* Summary clean */
.summary{ background: var(--surface); border:1px solid var(--line); }
.summary .recap li{ padding: 2px 0; }
.summary .grand{ border-top:1px solid var(--line); }



/* Ensure product cards are always clickable */
.product-card{ position: relative; z-index: 1; }



/* === Sticky top toolbar === */
.fiche-toolbar{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  box-shadow: 0 4px 20px rgba(0,0,0,.45);
  border-bottom: 1px solid var(--line);
}
.fiche-toolbar .row{
  background: transparent;
  border: 0;
}
body{ margin-top: 0; }



/* === Toast styles === */
.toast{
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1e2533;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s ease;
  z-index: 9999;
  font-size: 0.95rem;
}
.toast.success{ border-left: 4px solid #21d39a; }
.toast.error{ border-left: 4px solid #ff5d6c; }
.toast.visible{ opacity: 1; transform: translateY(0); }

