:root {
  --bg: #faf9f6;
  --ink: #2a2723;
  --muted: #7a7468;
  --line: #e2ddd2;
  --accent: #3c5b4e;
  --ok: #3c5b4e;
  --warn: #a5501f;
  --warn-bg: #f7e9de;
  --unknown-bg: #ece9e2;
  --card-bg: #ffffff;
  --radius: 6px;
  --red: #c0392b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

header.site-header {
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: #fff;
}

header.site-header .brand { font-weight: 700; letter-spacing: 0.04em; display: flex; align-items: center; gap: 10px; align-self: center; }
header.site-header .brand-logo { height: 36px; width: auto; display: block; }

/* Logo texte "Restomobilier" (29/07/2026) : police Pacifico (Google Fonts), rouge, oblique,
   sur toutes les occurrences visibles du mot (en-tête, page d'accueil, page de connexion). */
.brand-name {
  font-family: 'Pacifico', cursive;
  font-weight: 400;
  font-style: italic;
  letter-spacing: normal;
  color: var(--red);
}
header.site-header .brand-name { font-size: 22px; }

.toggle-prix-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.toggle-prix-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.devis-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  cursor: pointer;
}
.devis-btn.active { background: var(--accent); color: #fff; }

.add-devis-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.add-devis-btn:hover { background: var(--accent); color: #fff; }

/* --- Panneau Devis --- */
.devis-sheet { max-width: 760px; }
.devis-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 20px;
}
.devis-meta-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.devis-meta-field input {
  font-size: 14px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  color: var(--ink);
}

.devis-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.devis-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
}
.devis-table td { padding: 8px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.devis-qte-input { width: 52px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; }
.devis-prix-input { width: 80px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; }
.devis-designation { color: var(--muted); font-size: 12px; max-width: 220px; }
.devis-line-total { font-weight: 600; white-space: nowrap; }
.devis-remove-btn {
  border: none; background: var(--unknown-bg); border-radius: 50%;
  width: 26px; height: 26px; cursor: pointer; font-size: 13px; color: var(--muted);
}

.devis-remise-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
}
.devis-remise-input {
  width: 70px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
}
.devis-remise-row select {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
}

.devis-sous-total { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.devis-remise-amount { display: flex; justify-content: flex-end; font-size: 13px; color: var(--warn); margin-top: 4px; }

.devis-grand-total {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  font-size: 17px;
}
.devis-grand-total-amount { font-weight: 700; }
.devis-tva-row { font-size: 14px; color: var(--muted); }
.devis-ttc-row { margin-top: 4px; font-size: 19px; padding-top: 8px; }
.devis-ttc-note { text-align: right; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Coloris "bleu ardoise" du détail quantitatif (option D validée par Philippe le 22/07/2026) --
   demandé à l'écran ET à l'impression/PDF (23/07/2026, plus limité au print comme au départ).
   -webkit-print-color-adjust/print-color-adjust/color-adjust doivent être posés directement sur
   l'élément qui porte le fond (le <tr>, pas seulement la <table> ou les <td>) : certains moteurs
   d'export PDF (ex. celui utilisé par Philippe) ignorent sinon le fond des lignes concernées --
   bug identifié le 23/07/2026 sur un PDF où seul le total TTC ressortait coloré. */
.devis-table thead tr {
  background: #2f4a63;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color-adjust: exact;
}
.devis-table thead th {
  color: #eef2f5;
}
.devis-table tbody tr:nth-child(even) {
  background: #e6ebef;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color-adjust: exact;
}
.devis-grand-total.devis-ttc-row {
  background: #2f4a63;
  color: #eef2f5;
  padding: 8px 10px;
  border-top: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color-adjust: exact;
}
.devis-grand-total.devis-ttc-row .devis-grand-total-amount {
  color: #eef2f5;
}

.devis-email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.devis-email-input {
  min-width: 260px;
  flex: 1 1 260px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}

.devis-disclaimer-wrap {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 0.5px solid var(--line);
}
.devis-disclaimer {
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  font-style: italic;
}
.devis-disclaimer:last-child { margin-bottom: 0; }
.devis-disclaimer-warning { color: var(--red); }

.devis-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.devis-email-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.devis-clear-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--warn);
  background: #fff;
  color: var(--warn);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

/* Mode "sans prix" : masque les prix partout (grille + fiches) tant que le bouton est actif */
body.prix-masques .card-price,
body.prix-masques .sheet-price,
body.prix-masques .sheet-price-ttc,
body.prix-masques .sheet-price-detail {
  display: none !important;
}
/* Navigation commune Intérieur / Extérieur / Réception (décidé le 23/07/2026) */
.main-nav { display: flex; gap: 4px; }
.nav-item { position: relative; }
.nav-item .nav-label {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: default;
  border-radius: var(--radius);
}
.nav-item.active .nav-label { color: var(--accent); }
.nav-item:hover .nav-label { background: var(--unknown-bg); }
.nav-item-direct {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius);
}
.nav-item-direct:hover { background: var(--unknown-bg); }
.nav-item-direct.active { color: var(--accent); }
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  min-width: 170px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  padding: 6px 0;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { display: block; }
.nav-dropdown a,
.nav-dropdown span.nav-soon {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
}
.nav-dropdown a:hover { background: var(--bg); }
.nav-dropdown a.current { color: var(--accent); font-weight: 700; }
.nav-dropdown span.nav-soon { color: var(--muted); font-style: italic; cursor: default; }

/* Recherche par nom (24/07/2026), à côté du menu dans le bandeau supérieur -- toutes les pages */
.site-search {
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 200px;
  color: var(--ink);
}
.site-search:focus {
  outline: none;
  border-color: var(--accent);
}

/* Déconnexion (29/07/2026) : lien discret, volontairement à l'écart du menu principal
   (Intérieur/Extérieur/Réception/Bonnes affaires/Documentations) pour ne pas encombrer les
   onglets -- placé après le champ de recherche, en texte petit et sobre. */
.logout-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  white-space: nowrap;
}
.logout-link:hover { color: var(--accent); }

/* Recherche généralisée site entier (29/07/2026, search.js) : liste déroulante de résultats sous
   #site-search, indépendante du filtrage local déjà en place sur les pages catalogue -- couvre
   les 154 produits du site, pas seulement ceux de la page courante. .search-wrap (posé par
   search.js autour du champ) sert de repère de positionnement, pour que la dropdown s'aligne
   sous le CHAMP et non sous tout le bandeau #site-header (bug corrigé le 29/07/2026 -- la
   dropdown apparaissait sous le logo, à l'opposé du champ, donc invisible en pratique). */
.search-wrap { position: relative; display: inline-block; }
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  min-width: 260px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(0,0,0,0.1);
  margin-top: 4px;
}
.search-dropdown-item {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.search-dropdown-item:last-child { border-bottom: none; }
.search-dropdown-item:hover { background: var(--bg); color: var(--accent); }
.search-dropdown-empty {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* Marges d'impression (28/07/2026) : ce qui est réellement pilotable en CSS pour l'en-tête/pied de
   page d'impression -- réduit l'espace réservé, sans effet sur le titre/URL ajoutés par le
   navigateur lui-même (cf. commentaire détaillé dans app.js, écouteur "beforeprint"). */
@page {
  margin: 1.2cm;
}

@media print {
  .main-nav { display: none; }
  .site-search { display: none; }
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 24px 32px 64px;
  max-width: 1280px;
  margin: 0 auto;
}

.filters {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  align-self: start;
  position: sticky;
  top: 16px;
}

.filters h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; color: var(--muted); }

.filter-group { margin-bottom: 18px; }
.filter-group h3 { font-size: 13px; margin: 0 0 8px; }
.filter-group label { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 4px; cursor: pointer; }
.filter-group input[type="range"] { width: 100%; }
.price-range-values { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }

.reset-filters {
  font-size: 12px;
  color: var(--accent);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }

.card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; display: block; }

.card .card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card .card-name { font-weight: 600; font-size: 14px; }
.card .card-sub { font-size: 12px; color: var(--muted); }
.card .card-price { font-size: 14px; font-weight: 600; margin-top: auto; }
.card .card-price .from { font-weight: 400; font-size: 11px; color: var(--muted); }

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}
.badge.ok { background: #e4ede8; color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.unknown { background: var(--unknown-bg); color: var(--muted); }

.type-meuble-tag {
  display: inline-block;
  width: fit-content;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #efe7da;
  color: #7a5a2a;
}
.sheet .type-meuble-tag { margin: -8px 0 14px; }

.empty-state { padding: 48px 0; text-align: center; color: var(--muted); }
.empty-state-logo { height: 64px; width: auto; opacity: .5; margin-bottom: 12px; }

/* --- Fiche produit (modal) --- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(20,18,15,.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  z-index: 100;
}
.overlay.open { display: flex; }

.sheet {
  background: #fff;
  border-radius: 8px;
  max-width: 880px;
  width: 100%;
  padding: 28px 32px 32px;
  position: relative;
}

.lightbox {
  position: fixed; inset: 0;
  background: rgba(15,13,10,.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px;
  z-index: 200;
}
.lightbox.open { display: flex; }
/* Zoom avancer/reculer en lightbox (23/07/2026) : molette (ou boutons +/-) pour zoomer, glisser
   pour se déplacer une fois zoomé, clic pour un zoom rapide x2, double-usage du clic pour revenir
   à 100%. wrap = zone de clic "fond" (letterboxing autour de l'image) qui ferme la lightbox ;
   l'image elle-même ne ferme plus au clic (elle sert désormais à zoomer/déplacer). Généralisé à
   toute photo ouverte en lightbox -- fiche produit et photo d'ambiance -- existante et future,
   puisque openLightbox() est la seule porte d'entrée utilisée partout sur le site. */
.lightbox-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  transform: translate(0px, 0px) scale(1);
  transition: transform .15s ease;
}
.lightbox .close-btn {
  position: fixed; top: 20px; right: 24px;
  border: none; background: #fff; border-radius: 50%;
  width: 36px; height: 36px; cursor: pointer; font-size: 16px; line-height: 1;
  z-index: 6;
}
.lightbox-zoom-controls {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,.55);
  border-radius: 24px;
  padding: 6px 8px;
  z-index: 5;
}
.lightbox-zoom-controls button {
  background: transparent; border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-zoom-controls button:hover { background: rgba(255,255,255,.18); }
#lightbox-zoom-reset { width: auto; padding: 0 10px; font-size: 12px; font-weight: 600; }

.sheet .close-btn {
  position: absolute; top: 16px; right: 16px;
  border: none; background: var(--unknown-bg); border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer; font-size: 16px; line-height: 1;
}

.sheet .print-btn {
  position: absolute; top: 16px; right: 58px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink);
}

/* Bug corrigé le 28/07/2026 (signalé par Philippe, capture à l'appui) : les 2 boutons "Imprimer"
   du Détail quantitatif (.devis-print-btn) se chevauchaient exactement dans le coin en haut à
   droite du panneau, juste à côté du bouton fermer. Cause : .devis-print-btn { position: static }
   (ancienne règle, désormais supprimée) avait une spécificité CSS plus faible (1 classe) que
   .sheet .print-btn ci-dessus (2 classes : .sheet + .print-btn) qui s'applique aussi à eux
   puisque .devis-sheet porte la classe .sheet. La spécificité l'emportant toujours sur l'ordre
   d'écriture, .sheet .print-btn gagnait malgré tout et forçait position:absolute sur les deux
   boutons du détail quantitatif, qui atterrissaient donc aux mêmes coordonnées. Ce correctif
   utilise une sélection de spécificité égale (.devis-sheet + .print-btn), placée après la règle
   fautive : à spécificité égale, la dernière règle du fichier l'emporte, donc celle-ci gagne. */
.devis-sheet .print-btn {
  position: static;
  top: auto;
  right: auto;
}

/* --- Bandeau photo d'ambiance (bloc éditorial en haut de fiche) --- */
.ambiance-block { margin: 14px 0 4px; }
.ambiance-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  cursor: zoom-in;
  transition: opacity .15s ease;
}
.ambiance-photo:hover { opacity: .92; }
.ambiance-caption { font-size: 12px; color: var(--muted); margin: 6px 0 0; font-style: italic; }

/* Effet loupe sur le bandeau ambiance (23/07/2026) : reprend .img-zoom-wrap mais garde le style
   bandeau (bords arrondis, sans bordure, image recadrée en "cover" plutôt que "contain"). */
.img-zoom-wrap.ambiance-zoom-wrap {
  height: 320px;
  border-radius: 8px;
  border: none;
}

/* --- Galerie "Photos complémentaires" (détail technique, 27/07/2026) --- */
.complementary-photos-block { margin: 18px 0; }
.complementary-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.complementary-photo-item { text-align: center; }
.complementary-photo-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  display: block;
  transition: opacity .15s ease;
}
.complementary-photo-thumb:hover { opacity: .88; }
.complementary-photo-caption { font-size: 11px; color: var(--muted); margin: 5px 0 0; }
.img-zoom-wrap.ambiance-zoom-wrap img {
  object-fit: cover;
}
.img-zoom-wrap.ambiance-zoom-wrap:hover img { transform: scale(1.6); }

.sheet-grid { display: grid; grid-template-columns: 320px 1fr; gap: 28px; margin-top: 8px; }

.img-zoom-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: zoom-in;
}
.img-zoom-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .15s ease-out;
  transform-origin: center center;
  transform: scale(1);
}
.img-zoom-wrap:hover img { transform: scale(2.2); }

.image-caption { font-size: 12px; color: var(--muted); margin: 8px 0 0; display: none; }

.sheet h2 { margin: 0 0 4px; font-size: 22px; }
.sheet .pattern-tag { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; display: block; }

.selector-group { margin-bottom: 16px; }
.selector-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}
.swatch.selected { border-color: var(--accent); background: #eef2ef; font-weight: 600; }
.swatch.disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

.assise-preview { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; }
.assise-preview span { font-size: 11px; color: var(--muted); }

.img-zoom-wrap.small { width: 64px; height: 64px; border-radius: var(--radius); flex-shrink: 0; }

.sheet-price { font-size: 24px; font-weight: 700; margin: 18px 0 0; }
.sheet-price-detail { font-size: 12px; font-weight: 400; color: var(--muted); margin: 2px 0 2px; }
.sheet-price-ttc { font-size: 14px; font-weight: 500; color: var(--ink); margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sheet-price-ttc span { font-weight: 400; color: var(--muted); font-size: 12px; }
.sheet-stock { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sheet-meta { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.sheet-ref { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* --- Bloc Description --- */
.description-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.description-text { font-size: 14px; line-height: 1.6; margin: 0; color: var(--ink); }

/* --- Bloc caractéristiques techniques --- */
.tech-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.tech-title { font-size: 15px; margin: 0 0 14px; }
.tech-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
.tech-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 6px; }
.tech-table { border-collapse: collapse; width: 100%; }
.tech-table td { padding: 3px 0; font-size: 13px; vertical-align: top; }
.tech-table td.tech-label { color: var(--muted); padding-right: 10px; white-space: nowrap; }
.tech-table td.tech-value { font-weight: 500; }

/* Liens "Plateaux compatibles" -> fiche du plateau, à la bonne dimension (28/07/2026) */
.plateau-compat-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
}
.plateau-compat-link:hover { text-decoration-style: solid; }

/* Bloc "Option" rattachée à une fiche précise (28/07/2026 -- ex. Jacky + poubelle PVC, à terme
   Modena/Kyoto + câbles antivol/cadenas). Encadré distinct du reste de la fiche : c'est un ajout
   séparé, pas une caractéristique du produit principal, d'où la bordure et le fond légèrement
   différenciés plutôt qu'un simple bloc de plus dans le flux normal. */
.product-option-block {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--unknown-bg);
}
.product-option-title { margin: 0 0 6px; font-size: 14px; }
.product-option-desc { margin: 0 0 8px; font-size: 13px; color: var(--ink); }
.product-option-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.product-option-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.product-option-price-ht { font-size: 18px; font-weight: 700; }
.product-option-price-ttc { font-size: 13px; color: var(--ink); }
.product-option-price-ttc span { color: var(--muted); font-size: 11px; }
.product-option-ref { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.product-option-note { font-size: 11px; color: var(--muted); font-style: italic; margin: 0 0 10px; }
.product-option-add-btn { width: auto; padding: 8px 16px; font-size: 12px; }
.cert-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cert-tag {
  font-size: 11px;
  background: #eef2ef;
  color: var(--accent);
  border-radius: 4px;
  padding: 4px 8px;
}

/* Bouton menu "hamburger" (30/07/2026) : masqué sur écran large, la nav/recherche/déconnexion
   restant visibles en ligne comme avant. N'apparaît qu'en-dessous de 720px, cf. media query
   plus bas. Piloté par mobile-nav.js (bascule body.nav-open). */
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .sheet-grid { grid-template-columns: 1fr; }
  .filters { position: static; }

  /* En-tête : le menu (Accueil/Intérieur/Extérieur/Réception/Bonnes affaires/Documentations),
     la recherche et Déconnexion débordaient à droite sur écran étroit, sans repli prévu --
     signalé par Philippe après test en mode responsive. Repliés derrière un bouton "hamburger"
     (affiché uniquement ici), dépliés en panneau plein écran sous le logo quand body.nav-open. */
  header.site-header {
    flex-wrap: wrap;
    padding: 12px 16px;
    row-gap: 10px;
  }
  .nav-toggle {
    display: block;
    order: 1;
    margin-left: auto;
  }
  .brand { order: 0; }
  .toggle-prix-btn, .devis-btn { order: 2; }

  .main-nav, .site-search, .logout-link {
    display: none;
    width: 100%;
  }
  body.nav-open .main-nav,
  body.nav-open .site-search,
  body.nav-open .logout-link {
    display: block;
    order: 3;
  }
  body.nav-open .site-search { margin-top: 4px; }
  body.nav-open .logout-link { margin: 8px 0 0; }

  .main-nav { display: flex; flex-direction: column; gap: 0; }
  .nav-item, .nav-item-direct { width: 100%; }

  /* Sous-menus (Intérieur ▾, Extérieur ▾, Réception ▾) : pas de survol/tap-to-expand sur mobile,
     toujours dépliés à plat sous leur rubrique -- plus simple et plus fiable au toucher qu'un
     second niveau de dépliage. */
  .nav-dropdown {
    display: block !important;
    position: static;
    min-width: 0;
    border: none;
    box-shadow: none;
    padding: 0 0 4px 16px;
  }

  /* Fiche produit / détail quantitatif : réduit les marges pour laisser plus de place au
     contenu sur un écran étroit (photo/texte déjà empilés en 1 colonne, cf. .sheet-grid
     ci-dessus). */
  .overlay { padding: 16px 8px; }
  .sheet { padding: 18px 16px 24px; }
}

/* --- Impression : fiche produit sans prix (bouton "Imprimer sans prix" sur la fiche) ---
   S'applique à tous les articles du site : les règles ciblent des classes génériques
   (.card-price, .sheet-price...), pas des produits précis. */
@media print {
  /* Le prix est toujours retiré à l'impression, indépendamment du mode "sans prix" écran */
  .card-price,
  .sheet-price,
  .sheet-price-ttc,
  .sheet-price-detail {
    display: none !important;
  }

  /* Si une fiche est ouverte au moment de l'impression, on n'imprime qu'elle (pas la grille,
     les filtres ni le bandeau derrière) */
  body.sheet-open .site-header,
  body.sheet-open .layout,
  body.sheet-open .lightbox,
  body.sheet-open #devis-overlay {
    display: none !important;
  }
  body.sheet-open .overlay {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }
  body.sheet-open .sheet {
    max-width: 100% !important;
    box-shadow: none !important;
  }
  .sheet .close-btn,
  .sheet .print-btn,
  .add-devis-btn {
    display: none !important;
  }

  /* Fiche produit en 2 pages à l'impression (28/07/2026, CORRIGÉ le 29/07/2026 -- la 1ère version
     coupait après TOUT .sheet-grid, ce qui envoyait la photo de référence sur la page 2 avec le
     texte au lieu de la garder page 1 avec la photo d'ambiance comme demandé ; signalé par
     Philippe, non pris en compte au premier essai). Page 1 = photo d'ambiance + photo de la
     référence (.sheet-photo-col, posée en JS sur les 5 gabarits de fiche) ; page 2 = tout le
     texte (.sheet-text-col : caractéristiques, description, prix -- retiré de toute façon
     ci-dessus --, stock...). Le grid passe en 1 seule colonne à l'impression (empile photo puis
     texte au lieu de les mettre côte à côte) pour que le saut de page entre les deux soit
     possible. Repli automatique sur 1 seule page quand il n'y a pas de photo d'ambiance : le
     sélecteur ".ambiance-block + .sheet-grid" ne cible .sheet-text-col QUE lorsque .sheet-grid
     suit immédiatement un bloc ambiance dans le DOM, ce qui n'arrive que sur les fiches qui en
     ont une (cf. renderAmbianceBlock(), appelé de façon identique dans les 5 gabarits). */
  body.sheet-open .sheet-grid {
    grid-template-columns: 1fr;
  }
  body.sheet-open .ambiance-block + .sheet-grid .sheet-text-col {
    break-before: page;
    page-break-before: always;
  }

  /* Idem pour le devis : n'imprime que le panneau devis (pas la grille/filtres/fiche derrière) */
  body.devis-open .site-header,
  body.devis-open .layout,
  body.devis-open .lightbox,
  body.devis-open #overlay {
    display: none !important;
  }
  body.devis-open #devis-overlay {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }
  body.devis-open .devis-sheet {
    max-width: 100% !important;
    box-shadow: none !important;
  }
  .devis-actions,
  .devis-remove-btn,
  .devis-remise-row,
  .devis-email-row,
  #devis-overlay .close-btn {
    display: none !important;
  }
  .devis-qte-input,
  .devis-prix-input,
  .devis-meta-field input {
    border: none !important;
    padding: 0 !important;
  }

  /* "Imprimer sans prix" pour le Détail quantitatif (26/07/2026, demande de Philippe : "Prévoir
     un onglet Détail quantitatif sans prix") -- classe posée sur <body> juste avant impression
     par le bouton dédié (cf. printSansPrixBtn dans app.js), retirée après impression via
     l'évènement "afterprint". Masque les 2 colonnes prix du tableau (classes explicites
     devis-col-prix/devis-col-total, posées en JS -- pas de nth-child fragile) et tout le
     récapitulatif de totaux (sous-total/remise/frais de port/TVA/TTC), sans toucher aux
     quantités, désignations ni à la mention légale. */
  body.devis-sans-prix .devis-col-prix,
  body.devis-sans-prix .devis-col-total,
  body.devis-sans-prix .devis-sous-total,
  body.devis-sans-prix .devis-remise-amount,
  body.devis-sans-prix .devis-grand-total {
    display: none !important;
  }
}

/* --- Page de connexion (login.html, reconstruite le 28/07/2026) --- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-box {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.login-logo { width: 100%; height: auto; border-radius: var(--radius); margin: 0 auto 16px; display: block; }
.login-title { margin: 0 0 4px; font-size: 20px; }
.login-sub { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
}
.login-submit {
  padding: 10px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.login-submit:hover { opacity: .92; }
.login-error { color: var(--warn); font-size: 13px; margin: 14px 0 0; }
.login-note { color: var(--muted); font-size: 11px; margin: 20px 0 0; line-height: 1.5; }

/* --- Page d'accueil dédiée, Documentations, Bonnes affaires (28/07/2026) --- */
.home-hero { margin: 0; position: relative; }
.home-hero-slider { position: relative; width: 100%; max-height: 380px; overflow: hidden; }
.hero-slide { display: none; }
.hero-slide.active { display: block; }
.hero-slide img { width: 100%; max-height: 380px; object-fit: cover; display: block; }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0; background: rgba(255, 255, 255, .55); cursor: pointer; }
.hero-dot.active { background: #fff; }
.home-hero-caption { text-align: center; padding: 24px 32px 8px; }
.home-hero-title { font-size: 44px; margin: 0 0 6px; }
.home-hero-sub { color: var(--muted); margin: 0; }

.home-section { padding: 24px 32px 40px; max-width: 1100px; margin: 0 auto; }
.home-section-title { font-size: 18px; margin: 0 0 16px; }

.nouveautes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.nouveaute-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card-bg); transition: box-shadow .15s; }
.nouveaute-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.nouveaute-thumb-wrap { position: relative; }
.nouveaute-thumb { width: 100%; height: 140px; object-fit: cover; display: block; background: var(--unknown-bg); }
.badge-nouveau { position: absolute; top: 8px; left: 8px; background: #fff; color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; }
.nouveaute-name { padding: 10px 12px; font-size: 13px; font-weight: 600; }

.home-callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.callout-card { display: block; text-decoration: none; color: inherit; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-bg); }
.callout-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.callout-title { font-weight: 700; margin: 0 0 6px; }
.callout-sub { color: var(--muted); font-size: 13px; margin: 0; }

.doc-list { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.doc-item { display: flex; align-items: center; gap: 16px; padding: 16px 4px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.doc-item:hover { background: var(--bg); }
.doc-icon { flex: none; width: 26px; height: 26px; color: var(--ink); }
.doc-icon svg { width: 100%; height: 100%; }
.doc-label { font-weight: 600; font-size: 14px; letter-spacing: .02em; }

.placeholder-msg { color: var(--muted); font-style: italic; }
