/* ============================================================
   DSS — Diaspora Solar Solutions
   Palette « Nuit africaine » — extrait de dss_site_complet_v8.html
   Lignes 11-1048 de la maquette source.
   SPA selectors removed: .page { display:none }, .page.active { display:block },
   .portal-page { display:none }, .portal-page.active { display:block }
   ============================================================ */

/* ============================================================
   DESIGN TOKENS — Palette Option A : Nuit africaine
   ============================================================ */
:root {
  --bg1: #0D1117;
  --bg2: #111827;
  --bg3: #161B22;
  --bg4: #1E2A3A;
  --or: #F97316;
  --or-d: #EA580C;
  --or-l: rgba(249,115,22,.1);
  --or-b: rgba(249,115,22,.22);
  --or-text: #FB923C;
  --red: #DC2626;
  --grad: linear-gradient(135deg, #F97316 0%, #DC2626 100%);
  --white: #F9FAFB;
  --text1: #F9FAFB;
  --text2: #9CA3AF;
  --text3: #6B7280;
  --border: #2A3850;
  --border2: #3F4D63;
  --green: #10B981;
  --green-l: rgba(16,185,129,.1);
  --green-text: #6EE7B7;
  --blue-l: rgba(59,130,246,.1);
  --blue-c: #93C5FD;
  --red-l: rgba(220,38,38,.1);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  /* Titres : Sora (remplace Syne, jugée trop large/« aplatie ») — proportions
     plus hautes, même esprit géométrique. Inter en corps. */
  --font-title: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ============================================================ RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg1); color: var(--text1); line-height: 1.6; min-height: 100vh; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ============================================================ UTILS */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
/* NOTE: .page et .portal-page (SPA routing) retirés volontairement — remplacés par le routing Django */

/* ============================================================ NAVBAR */
.navbar {
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-logo img { height: 34px; width: auto; object-fit: contain; }
.nav-links { display: flex; gap: 2px; }
.nl {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 14px;
  font-family: var(--font-body);
  padding: 7px 11px;
  border-radius: var(--r-sm);
  transition: all .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nl:hover, .nl.on { background: var(--or-l); color: var(--or); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.btn-portal {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 13px;
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  font-size: 13px; font-family: var(--font-body);
  color: var(--text2);
  background: none;
  transition: all .15s;
  text-decoration: none;
}
.btn-portal:hover { border-color: var(--or); color: var(--or); }
.btn-portal i { font-size: 15px; }

/* ── Déroulants navbar (DSAS-92) — motif disclosure clic + clavier ── */
.nav-dd { position: relative; display: inline-flex; }
.nav-dd-toggle { gap: 4px; cursor: pointer; }
.nav-dd-caret { font-size: 15px; transition: transform .15s; }
.nav-dd.open .nav-dd-caret { transform: rotate(180deg); }
.nav-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  flex-direction: column;
  gap: 2px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  z-index: 200;
}
/* Affiché uniquement via le JS (.open) — aria-expanded fait foi pour l'a11y. */
.nav-dd.open > .nav-dd-menu { display: flex; }
/* Menu Compte ancré à droite (évite le débordement hors viewport). */
.nav-dd--right .nav-dd-menu { left: auto; right: 0; }
.nav-dd-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: none;
  border-radius: var(--r-sm);
  color: var(--text2);
  font-size: 14px; font-family: var(--font-body);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
  cursor: pointer;
}
.nav-dd-item i { font-size: 16px; flex-shrink: 0; }
.nav-dd-item:hover, .nav-dd-item.on { background: var(--or-l); color: var(--or); }
.nav-dd-item--logout { color: var(--text3); }
.nav-dd-item--logout:hover { background: var(--red-l); color: #fff; }
.nav-dd-logout-form { margin: 0; padding: 0; }

/* Focus clavier visible sur tous les éléments interactifs de la nav (DSAS-92 a11y). */
.nl:focus-visible, .nav-dd-toggle:focus-visible, .nav-dd-item:focus-visible,
.btn-portal:focus-visible, .btn-cta:focus-visible, .lang-opt:focus-visible {
  outline: 2px solid var(--or); outline-offset: 2px;
}
.btn-cta {
  background: var(--grad);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: opacity .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-cta:hover { opacity: .9; }

/* CTA secondaire « Devenir installateur » (suivi UX navbar) — bordé accent orange
   pour ressortir sans concurrencer le CTA Devis (dégradé plein). Visible desktop ;
   masqué ≤1199px où il est relayé par `.nav-installateur-mobile` dans le menu hamburger. */
.btn-installateur {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--or);
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; font-family: var(--font-body);
  color: var(--or);
  background: none;
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-installateur:hover { background: var(--or-l); }
.btn-installateur i { font-size: 16px; }
.btn-installateur:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }

/* Bouton « Connexion » en icône seule (libellé via aria-label/title). Carré compact. */
.btn-portal--icon { padding: 6px 10px; }

/* Lien installateurs du menu mobile : masqué sur desktop, révélé ≤1199px (cf. @media). */
.nav-installateur-mobile { display: none; }

/* ============================================================ LANGUE — TOGGLE FR | EN (DSAS-92) */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.lang-toggle-form { display: inline-flex; margin: 0; padding: 0; }
.lang-sep { width: 1px; align-self: stretch; background: var(--border2); }
.lang-opt {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 5px 11px;
  cursor: pointer;
  transition: all .15s;
}
.lang-opt:hover { color: var(--or); }
.lang-opt--active { background: var(--or); color: #fff; cursor: default; }
.lang-opt--active:hover { color: #fff; }

/* ============================================================ WHATSAPP FLOATING */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,.35);
  transition: background .15s, box-shadow .15s;
}
.wa-float:hover { background: #1DA851; box-shadow: 0 6px 24px rgba(37,211,102,.5); }
.wa-float i { font-size: 19px; }

/* ============================================================ BUTTONS */
.btn-grad {
  background: var(--grad);
  color: #fff; border: none;
  padding: 10px 22px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600;
  font-family: var(--font-body);
  transition: opacity .15s;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
}
.btn-grad:hover { opacity: .9; }
.btn-ghost {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: var(--font-body);
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--or); color: var(--or); }
.btn-sm {
  padding: 5px 12px;
  border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500;
  font-family: var(--font-body);
  border: none;
  transition: all .15s;
}
.btn-accept { background: var(--grad); color: #fff; }
.btn-accept:hover { opacity: .9; }
.btn-outline { background: rgba(255,255,255,.04); color: var(--text2); border: 1px solid var(--border2) !important; }
.btn-outline:hover { border-color: var(--or) !important; color: var(--or); }
.btn-validate { background: var(--green-l); color: var(--green-text); border: 1px solid rgba(16,185,129,.25) !important; }
.btn-refuse { background: var(--red-l); color: #FCA5A5; border: 1px solid rgba(220,38,38,.25) !important; }
.wa-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25D366; color: #fff; border: none;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
}
.wa-btn:hover { background: #1DA851; }

/* ============================================================ BADGES */
.bdg {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: var(--font-body);
}
.bdg-or { background: var(--or-l); color: var(--or-text); border: 1px solid var(--or-b); }
.bdg-gn { background: var(--green-l); color: var(--green-text); border: 1px solid rgba(16,185,129,.2); }
.bdg-rd { background: var(--red-l); color: #FCA5A5; border: 1px solid rgba(220,38,38,.2); }
.bdg-bl { background: var(--blue-l); color: var(--blue-c); border: 1px solid rgba(59,130,246,.2); }

/* ============================================================ CARDS */
.card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.card-hover { transition: border-color .15s, box-shadow .15s; }
.card-hover:hover { border-color: var(--or); box-shadow: 0 4px 12px rgba(0,0,0,.35); }

/* ============================================================ SECTIONS */
.section { padding: 3.6rem 2rem; }
.section-dark { background: var(--bg2); }
.section-darker { background: var(--bg1); }
.sec-label {
  font-family: var(--font-title);
  font-size: 12px; font-weight: 700;
  color: var(--or);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.sec-title {
  font-family: var(--font-title);
  font-size: 27px; font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.2;
}
.sec-sub { font-size: 15px; color: var(--text2); margin-bottom: 2rem; }

/* ============================================================ HERO */
.hero {
  background: var(--bg1);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(249,115,22,.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--or), var(--red), transparent);
}
.hero-badge {
  display: inline-block;
  background: rgba(249,115,22,.08);
  border: 1px solid rgba(249,115,22,.2);
  color: var(--or-text);
  font-size: 13px; font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  letter-spacing: .5px;
}
.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1rem;
  position: relative;
}
.hero h1 em {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}
.hero-sub {
  font-size: 19px;
  color: var(--text2);
  margin-bottom: 2.5rem;
  font-weight: 400;
  letter-spacing: .5px;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-btns .btn-ghost {
  border-color: rgba(156,163,175,.28);
  font-weight: 400;
}
.hero-btns .btn-ghost:hover { border-color: var(--or); color: var(--or); }

/* ============================================================ TRUST BAR */
.trust-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text3);
}
.trust-item i { color: var(--or); font-size: 16px; }

/* ============================================================ STEPS */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.step-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  text-align: center;
}
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-family: var(--font-title);
}
.step-card h4 { font-family: var(--font-title); font-size: 15px; font-weight: 600; color: var(--white); margin-bottom: 6px; }
.step-card p { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* ============================================================ SOLUTIONS */
.sol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.sol-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all .2s;
}
.sol-card:hover, .sol-card.featured { border-color: var(--or); }
.sol-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--or-l);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.sol-icon i { font-size: 19px; color: var(--or); }
.sol-card h4 { font-family: var(--font-title); font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.sol-card p { font-size: 12px; color: var(--text2); }
.sol-badge {
  display: inline-block;
  margin-top: 8px;
  background: var(--or-l);
  border: 1px solid var(--or-b);
  color: var(--or-text);
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ============================================================ RÉALISATIONS */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 1.5rem; }
.stat-item {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  text-align: center;
}
.stat-num {
  font-family: var(--font-title);
  font-size: 29px; font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-lbl { font-size: 12px; color: var(--text2); margin-top: 3px; }
.real-featured {
  background: var(--bg3);
  border: 1px solid var(--or);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1.25rem;
}
.rf-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--border); }
.rf-photo { display: flex; align-items: center; justify-content: center; font-size: 29px; min-height: 90px; }
.rf-photo:first-child { grid-column: span 2; }
.rf-body { padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between; }
.rf-quote {
  font-size: 12px; color: var(--text2);
  font-style: italic; line-height: 1.6;
  padding: 8px 10px;
  background: rgba(249,115,22,.04);
  border-left: 2px solid var(--or);
  border-radius: 0 5px 5px 0;
  margin: 10px 0;
}
.real-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.real-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s;
}
.real-card:hover { border-color: var(--or); }
.rc-photo {
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  font-size: 33px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.rc-badge {
  position: absolute; top: 7px; right: 8px;
  background: rgba(0,0,0,.55);
  font-size: 11px; font-weight: 500;
  padding: 2px 7px;
  border-radius: 8px; color: #fff;
  display: flex; align-items: center; gap: 3px;
}
.rc-badge i { font-size: 11px; color: var(--or); }
.rc-body { padding: 12px; }
.rc-city { font-size: 12px; font-weight: 600; color: var(--or); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.rc-city i { font-size: 12px; }
.rc-title { font-family: var(--font-title); font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 6px; line-height: 1.3; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.rc-tag {
  font-size: 11px; color: var(--text2);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border2);
  padding: 2px 7px;
  border-radius: 4px;
  display: flex; align-items: center; gap: 3px;
}
.rc-tag i { font-size: 11px; color: var(--or); }
.rc-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; border-top: 1px solid var(--border); }
.rc-date { font-size: 11px; color: var(--text3); }
.rc-dia { font-size: 11px; color: var(--text2); display: flex; align-items: center; gap: 3px; }
.rc-dia i { font-size: 12px; }

/* ── Accordéon réalisations (DSAS-66) — natif <details>/<summary> ── */
.real-accordion {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.real-acc-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-family: var(--font-title);
  font-size: 16px; font-weight: 700;
  color: var(--white);
  transition: color .15s;
}
.real-acc-head::-webkit-details-marker { display: none; }
.real-acc-head:hover { color: var(--or); }
.real-acc-title { display: flex; align-items: center; gap: 9px; }
.real-acc-title i { color: var(--or); font-size: 19px; }
.real-acc-count { color: var(--text2); font-weight: 500; font-size: 14px; }
.real-acc-chevron { color: var(--text2); font-size: 19px; transition: transform .2s; }
.real-accordion[open] .real-acc-chevron { transform: rotate(180deg); }
.real-acc-list {
  max-height: 65vh;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.real-acc-empty {
  text-align: center; color: var(--text2);
  padding: 2.5rem 1.25rem; font-size: 14px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  margin-bottom: 1.5rem;
}
.real-item { border-bottom: 1px solid var(--border); }
.real-item:last-child { border-bottom: none; }
.real-item-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 1.25rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .15s;
}
.real-item-head::-webkit-details-marker { display: none; }
.real-item-head:hover,
.real-item[open] > .real-item-head { background: rgba(249, 115, 22, .05); }
.real-item-photo {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: var(--r-sm);
  background: rgba(249, 115, 22, .06);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.real-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.real-item-photo i { font-size: 23px; color: rgba(249, 115, 22, .45); }
.real-item-titles { flex: 1 1 auto; min-width: 0; }
.real-item-title {
  display: block;
  font-family: var(--font-title);
  font-size: 14px; font-weight: 600; color: var(--white);
  line-height: 1.3;
}
.real-item-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--or);
  background: rgba(249, 115, 22, .12);
  border: 1px solid rgba(249, 115, 22, .35);
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: middle;
  margin-left: 4px;
}
.real-item-badge i { font-size: 10px; }
.real-item-meta {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  font-size: 12px; color: var(--text2); margin-top: 2px;
}
.real-item-meta i { font-size: 12px; color: var(--or); }
.real-item-chevron {
  flex: 0 0 auto;
  color: var(--text3); font-size: 17px;
  transition: transform .2s;
}
.real-item[open] .real-item-chevron { transform: rotate(180deg); }
.real-item-detail { padding: 2px 1.25rem 1.1rem; }
.real-item-cover {
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 12px;
  max-height: 240px;
}
.real-item-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.real-item-detail .rc-tags { margin-bottom: 10px; }
.real-item-desc {
  font-size: 12.5px; color: var(--text2);
  line-height: 1.7; margin-bottom: 10px;
}
.real-item-eco {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--green);
  margin-bottom: 4px;
}
.real-item-eco i { font-size: 15px; }
.real-item-quote cite {
  display: block; margin-top: 6px;
  font-size: 12px; color: var(--text3); font-style: normal;
}

/* ============================================================ TESTIMONIALS */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.testi-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.25rem;
}
.testi-stars { color: var(--or); font-size: 14px; margin-bottom: 8px; }
.testi-card p { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 10px; font-style: italic; }
.testi-name { font-family: var(--font-title); font-size: 13px; font-weight: 600; color: var(--white); }
.testi-loc { font-size: 11px; color: var(--text3); }

/* ============================================================ CTA SECTION */
.cta-section {
  background: var(--bg1);
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.cta-section h3 { font-family: var(--font-title); font-size: 25px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.cta-section p { color: var(--text2); font-size: 15px; margin-bottom: 1.5rem; }

/* ============================================================ SERVICES TL */
.tl-list { padding: 2rem; display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 1rem; position: relative; padding-bottom: 4px; }
.tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 13px; top: 26px;
  width: 1px; bottom: 0;
  background: var(--border2);
}
.tl-item.done::before { background: var(--or); }
.tl-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  background: var(--bg1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.tl-dot.done { background: var(--or-l); border-color: var(--or); }
.tl-dot i { font-size: 13px; color: var(--border2); }
.tl-dot.done i { color: var(--or); }
.tl-body { padding: 2px 0 1.5rem; }
.tl-label { font-family: var(--font-title); font-size: 15px; font-weight: 600; color: var(--white); }
.tl-sub { font-size: 13px; color: var(--text2); margin-top: 3px; line-height: 1.5; }
.tl-badge {
  display: inline-block;
  background: var(--or-l); border: 1px solid var(--or-b);
  color: var(--or-text); font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 8px; margin-top: 6px;
}

/* ============================================================ FORMULAIRE */
.form-wrapper {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
}
.form-progress { height: 3px; background: var(--border); }
.form-progress-fill { height: 100%; background: var(--grad); transition: width .3s; }
.form-steps-bar {
  display: flex;
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
}
.form-step {
  flex: 1; padding: 10px 4px; text-align: center;
  font-size: 11px; font-weight: 500; color: var(--text3);
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.form-step.active { color: var(--or); border-bottom-color: var(--or); }
.form-step.done { color: rgba(249,115,22,.5); border-bottom-color: rgba(249,115,22,.25); }
.form-body { padding: 1.75rem; }
.form-panel { display: none; }
.form-panel.active { display: block; }
.form-heading {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 1.25rem;
}
.form-heading-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--or-l);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.form-heading-icon i { color: var(--or); }
.form-heading h3 { font-family: var(--font-title); font-size: 16px; font-weight: 600; color: var(--white); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text2); margin-bottom: 5px; }
.field label .req { color: var(--or); }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  font-size: 14px; color: var(--white);
  background: var(--bg3);
  font-family: var(--font-body);
  transition: border-color .15s;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--or); }
.field textarea { resize: vertical; min-height: 80px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Validation client (form.js) — champ invalide + message d'erreur (DSAS-69) */
.field .input-error { border-color: var(--red); }
.js-field-error { color: var(--red); font-size: 12px; margin-top: 5px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.chip {
  padding: 6px 13px;
  border: 1px solid var(--border2);
  border-radius: 20px;
  font-size: 13px; font-weight: 500;
  color: var(--text2);
  background: none;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-body);
}
.chip:hover { border-color: var(--or); }
.chip.on { background: var(--or-l); border-color: var(--or); color: var(--or-text); }
.form-nav { display: flex; gap: 10px; margin-top: 1.5rem; }
.form-nav .btn-grad { flex: 1; justify-content: center; }
.equip-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 12px; }
.equip-table th {
  text-align: left; padding: 8px 10px;
  font-size: 12px; font-weight: 600; color: var(--text2);
  border-bottom: 1px solid var(--border2);
}
.equip-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; }
.equip-table input[type=number] {
  width: 60px; padding: 4px 6px;
  border: 1px solid var(--border2);
  border-radius: 4px; font-size: 13px;
  background: var(--bg2); color: var(--white); text-align: center;
}
.del-btn { background: none; border: none; color: #EF4444; font-size: 17px; cursor: pointer; padding: 2px 6px; }
.add-equip-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 10px;
  background: var(--bg3); border: 1px dashed var(--border2);
  border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: var(--or);
  cursor: pointer; transition: border-color .15s;
  font-family: var(--font-body);
}
.add-equip-btn:hover { border-color: var(--or); }
.conso-total {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg1); border-radius: var(--r-sm);
  padding: 12px 16px; margin-top: 10px;
}
.conso-total .ct-label { font-size: 13px; color: var(--text2); }
.conso-total .ct-value { font-family: var(--font-title); font-size: 23px; font-weight: 700; color: var(--or); }

/* ── Équipements — cellules table (DSAS-61) ── */
.equip-td-nom { color: var(--text1); font-size: 14px; }
.equip-td-whj { color: var(--or); font-weight: 600; font-size: 14px; }

/* ── Modal Équipements (DSAS-61) ── */
.equip-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.equip-modal-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  width: 100%; max-width: 480px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.equip-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.equip-modal-header h4 {
  font-family: var(--font-title); font-size: 15px; font-weight: 600;
  color: var(--white); margin: 0;
}
.equip-modal-close {
  background: none; border: none;
  color: var(--text2); font-size: 19px;
  padding: 2px 6px; border-radius: var(--r-sm);
  transition: color .15s;
}
.equip-modal-close:hover { color: var(--or); }
.equip-modal-cats {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.equip-cat-tab {
  background: none;
  border: 1px solid var(--border2);
  color: var(--text2); font-size: 13px;
  font-family: var(--font-body);
  padding: 5px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .15s;
}
.equip-cat-tab:hover { border-color: var(--or); color: var(--or); }
.equip-cat-tab.active { background: var(--or-l); border-color: var(--or); color: var(--or-text); }
.equip-modal-list {
  flex: 1; overflow-y: auto;
  padding: 10px 16px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.equip-appareil-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color .15s;
  font-family: var(--font-body);
  text-align: left;
}
.equip-appareil-btn:hover { border-color: var(--or); }
.equip-appareil-nom { font-size: 14px; color: var(--text1); }
.equip-appareil-w { font-size: 13px; color: var(--text2); flex-shrink: 0; margin-left: 8px; }

/* Mobile-first — tablette et +  */
@media (min-width: 480px) {
  .equip-modal-list { display: grid; grid-template-columns: 1fr 1fr; }
}

.budget-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.budget-card {
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 12px;
  cursor: pointer; text-align: center;
  background: var(--bg3);
  transition: all .15s;
}
.budget-card:hover { border-color: var(--or); }
.budget-card.on { border-color: var(--or); background: var(--or-l); }
.budget-card .bc-price { font-family: var(--font-title); font-size: 14px; font-weight: 600; color: var(--white); }
.budget-card .bc-eur { font-size: 12px; color: var(--text2); margin-top: 2px; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1rem; }
.upload-zone {
  border: 1.5px dashed var(--border2);
  border-radius: var(--r-md);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg3);
  transition: border-color .15s;
  position: relative;
}
.upload-zone:hover { border-color: var(--or); }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.upload-zone.done { border-color: var(--green); background: var(--green-l); }
.upload-zone .uz-icon { font-size: 23px; margin-bottom: 5px; display: block; }
.upload-zone .uz-icon i { font-size: 23px; color: var(--text2); }
.upload-zone.done .uz-icon i { color: var(--green); }
.upload-zone .uz-lbl { font-size: 12px; font-weight: 500; color: var(--white); }
.upload-zone .uz-sub { font-size: 11px; color: var(--text2); margin-top: 2px; }
.success-screen { text-align: center; padding: 3rem 2rem; }
.success-icon { font-size: 49px; margin-bottom: 1rem; display: block; }
.success-icon i { font-size: 57px; color: var(--green); }

/* ======================================================= RECAP DSAS-62 */
.recap-section {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 1.25rem;
}
.form-heading-sub {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--or);
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.recap-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border2);
  font-size: 13px;
  line-height: 1.5;
}
.recap-row:last-child { border-bottom: none; }
.recap-key {
  color: var(--text2);
  flex-shrink: 0;
  min-width: 120px;
}
.recap-val {
  color: var(--white);
  text-align: right;
}

/* ============================================================ FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq-q {
  padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--white);
  font-family: var(--font-body);
  background: none; border: none; width: 100%; text-align: left;
  transition: background .15s;
}
.faq-q:hover { background: rgba(255,255,255,.02); }
.faq-q i { font-size: 17px; color: var(--text2); transition: transform .2s; flex-shrink: 0; }
.faq-a { padding: 0 16px 14px; font-size: 13px; color: var(--text2); line-height: 1.7; display: none; }
.faq-a.open { display: block; }

/* ============================================================ CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 1.5rem; }
.contact-info-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.contact-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text2); margin-bottom: 12px; }
.contact-row i { font-size: 17px; color: var(--or); flex-shrink: 0; }
.wa-block {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
}
.contact-form-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}

/* ============================================================ BLOG */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.blog-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s;
}
.blog-card:hover { border-color: var(--or); }
.blog-img {
  height: 80px;
  display: flex; align-items: center; justify-content: center;
  font-size: 29px;
  border-bottom: 1px solid var(--border);
}
.blog-body { padding: 1rem; }
.blog-tag { font-size: 11px; font-weight: 700; color: var(--or); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 5px; }
.blog-body h4 { font-family: var(--font-title); font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 4px; line-height: 1.35; }
.blog-body p { font-size: 12px; color: var(--text2); }

/* DSAS-78 — blog cards as links (supprime le style ancre par défaut) */
.blog-card--link { text-decoration: none; display: block; color: inherit; }
.blog-card--link:hover { border-color: var(--or); }

/* DSAS-78 — image réelle dans .blog-img */
.blog-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-img--placeholder { background: var(--bg3); }

/* DSAS-78 — extrait tronqué sur 2 lignes */
.blog-extrait { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-meta { margin-top: 6px; font-size: 12px; color: var(--text2); }

/* DSAS-78 — état vide de la grille blog */
.blog-empty { grid-column: 1 / -1; text-align: center; color: var(--text2); padding: 2rem 0; font-size: 15px; }

/* DSAS-78 — pagination blog */
.blog-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.blog-pagination-info { font-size: 14px; color: var(--text2); }
.btn-secondary { display: inline-flex; align-items: center; padding: .5rem 1rem; border-radius: var(--r-md); background: var(--bg3); border: 1px solid var(--border2); color: var(--white); font-size: 14px; font-family: var(--font-title); font-weight: 500; text-decoration: none; transition: border-color .15s; cursor: pointer; }
.btn-secondary:hover { border-color: var(--or); color: var(--or); }
.btn-secondary--disabled { opacity: .4; cursor: default; pointer-events: none; }

/* DSAS-78 — breadcrumb article */
.article-breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: 13px; color: var(--text2); margin-bottom: 1.5rem; flex-wrap: wrap; }
.article-breadcrumb a { color: var(--text2); text-decoration: none; }
.article-breadcrumb a:hover { color: var(--or); }
.article-breadcrumb-sep { color: var(--border2); }

/* DSAS-78 — en-tête article */
.article-header { margin-bottom: 2rem; }
.article-title { font-family: var(--font-title); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--white); line-height: 1.25; margin: .5rem 0 .75rem; }
.article-meta { font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.article-meta-sep { color: var(--border2); }
.article-cover { margin-top: 1.5rem; border-radius: var(--r-lg); overflow: hidden; max-height: 400px; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* DSAS-78 — corps de l'article (rendu Markdown) */
.article-contenu { line-height: 1.8; font-size: 16px; color: var(--text); max-width: 720px; }
.article-contenu h2 { font-family: var(--font-title); font-size: 1.3rem; font-weight: 700; color: var(--white); margin: 2rem 0 .75rem; }
.article-contenu h3 { font-family: var(--font-title); font-size: 1.1rem; font-weight: 600; color: var(--white); margin: 1.5rem 0 .5rem; }
.article-contenu p { margin-bottom: 1rem; }
.article-contenu ul, .article-contenu ol { margin: .75rem 0 1rem 1.25rem; }
.article-contenu li { margin-bottom: .35rem; }
.article-contenu strong { color: var(--white); font-weight: 600; }
.article-contenu a { color: var(--or); text-decoration: underline; }
.article-contenu a:hover { color: var(--white); }
.article-contenu blockquote { border-left: 3px solid var(--or); margin: 1.5rem 0; padding: .75rem 1rem; background: var(--bg3); border-radius: 0 var(--r-md) var(--r-md) 0; font-style: italic; color: var(--text2); }

/* DSAS-78 — pied de l'article */
.article-footer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ============================================================ FOOTER */
.footer {
  background: #060A10;
  /* DSAS-107 : footer public allégé/aéré — padding-top 2.5rem→4rem (bottom
     reste 2.5rem pour conserver le calage bord-à-bord de .footer-bottom),
     gap 2rem→3rem (vaut aussi le row-gap mobile = 48px en 1 colonne). */
  padding: 4rem 2rem 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  border-top: 1px solid var(--border);
}
.footer-brand { font-family: var(--font-title); color: var(--or); font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.footer p { font-size: 13px; color: var(--text3); line-height: 1.7; }
.footer h5 { font-size: 11px; font-weight: 600; color: var(--text3); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1.2px; }
.footer a { display: block; font-size: 13px; color: var(--text3); margin-bottom: 8px; cursor: pointer; text-decoration: none; }
.footer a:hover { color: var(--or); }
.footer-bottom {
  /* Le parent `.footer` est un grid 2fr/1fr/1fr ; sans ces règles, ce bandeau
     se range dans la 1ère colonne (visuel « collé à gauche » signalé en QA).
     `grid-column: 1 / -1` → toute la largeur du grid ; margin négatifs →
     annule le padding latéral et bas du parent (2.5rem 2rem) pour aller bord
     à bord. Layout flex space-between : copyright à gauche + liens légaux à
     droite, identique au .footer-auth de l'espace client pour cohérence
     visuelle 100% (les 11 liens du 3 col du haut restent INTACTS — aucune
     perte d'info, juste affinage visuel du bandeau bottom). */
  grid-column: 1 / -1;
  margin: 0 -2rem -2.5rem;
  background: #040709;
  padding: 12px 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  border-top: 1px solid var(--border);
}
.footer-bottom span { font-size: 12px; color: var(--text3); }
/* Gouttière droite : empêche le bandeau légal (aligné à droite) de passer sous le
   bouton WhatsApp flottant (.wa-float — fixed bottom/right, pill desktop ~140px). */
.footer-bottom { padding-right: 210px; }
@media (max-width: 768px) {
  /* Pastille ronde 48px (right:16px) sur mobile/tablette : gouttière réduite. */
  .footer-bottom { padding-right: 76px; }
}
/* Mobile <480px : stack vertical centré, comme .footer-auth (cohérence DSAS-95). */
@media (max-width: 480px) {
  /* Bandeau empilé/centré : la gouttière droite n'a plus lieu d'être ; on réserve
     plutôt sous le contenu pour passer au-dessus de la pastille WhatsApp (bottom 16 + 48). */
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; padding-right: 2rem; padding-bottom: 64px; }
  .footer-bottom .footer-auth-links { justify-content: center; }
}

/* ============================================================ FOOTER AUTH (DSAS-94) */
/* Footer ultra-minimal des pages authentifiées /mon-espace/* + auth.
   Pleine largeur bord-à-bord : copyright à gauche / liens légaux à droite. */
.footer-auth {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 12px 2rem;
  background: #060A10;
  border-top: 1px solid var(--border);
}
.footer-auth-copy { font-size: 12px; color: var(--text3); }
.footer-auth-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.footer-auth-links a { font-size: 12px; color: var(--text3); text-decoration: none; }
.footer-auth-links a:hover { color: var(--or); }
.footer-auth-sep { font-size: 12px; color: var(--text3); }
/* Mobile <480px : empilement vertical centré (DSAS-95). Avant : aligné à
   gauche → copyright collé au bord + « Cookies » orphelin à gauche quand les
   liens passent à la ligne. justify-content centre les liens enveloppés. */
@media (max-width: 480px) {
  .footer-auth { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
  .footer-auth-links { justify-content: center; }
}

/* ============================================================ PORTAL LAYOUT */
.portal-layout { display: grid; grid-template-columns: 200px 1fr; min-height: calc(100vh - 60px); }
.portal-sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 1.25rem 10px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.portal-user {
  padding: 10px 8px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.portal-user .pu-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 14px; font-weight: 700; color: #fff;
  margin-bottom: 8px;
}
.portal-user .pu-name { font-size: 13px; font-weight: 500; color: var(--white); }
.portal-user .pu-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }
.portal-nav-sec { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; padding: 0 8px; margin: 12px 0 5px; }
.portal-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--text2);
  cursor: pointer;
  margin-bottom: 2px;
  background: none; border: none;
  width: 100%; text-align: left;
  font-family: var(--font-body);
  transition: all .15s;
}
.portal-nav-item i { font-size: 16px; flex-shrink: 0; }
.portal-nav-item:hover { background: var(--bg3); color: var(--text1); }
.portal-nav-item.on { background: var(--or-l); color: var(--or); }
.portal-nav-item.on i { color: var(--or); }
.pni-badge { margin-left: auto; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
.pni-badge-rd { margin-left: auto; background: var(--red-l); color: #FCA5A5; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; border: 1px solid rgba(220,38,38,.2); }
.portal-main { padding: 1.75rem; background: var(--bg1); overflow-y: auto; }
.portal-header { margin-bottom: 1.5rem; }
.portal-header h2 { font-family: var(--font-title); font-size: 23px; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.portal-header p { font-size: 14px; color: var(--text2); }

/* ============================================================ PORTAL PAGES */
.sub-page { display: none; }
.sub-page.active { display: block; }

/* ============================================================ METRIC CARDS */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 1.5rem; }
.metric-card {
  background: var(--bg3);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
}
.metric-card .mc-label { font-size: 12px; color: var(--text2); margin-bottom: 5px; }
.metric-card .mc-value { font-family: var(--font-title); font-size: 27px; font-weight: 700; color: var(--white); }
.metric-card .mc-sub { font-size: 12px; margin-top: 3px; }
.mc-sub-or { color: var(--or); }
.mc-sub-gn { color: var(--green); }
.mc-sub-rd { color: #EF4444; }

/* ============================================================ PROJECT TIMELINE */
.ptl { display: flex; flex-direction: column; }
.ptl-item { display: flex; gap: 10px; position: relative; padding-bottom: 2px; }
.ptl-item:not(:last-child)::before { content: ''; position: absolute; left: 9px; top: 20px; width: 1px; bottom: 0; background: var(--border2); }
.ptl-item.done::before { background: var(--or); }
.ptl-dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border2); background: var(--bg1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.ptl-dot.done { background: var(--or-l); border-color: var(--or); }
.ptl-dot.cur { background: var(--or-l); border-color: var(--or); }
.ptl-dot i { font-size: 11px; color: var(--border2); }
.ptl-dot.done i, .ptl-dot.cur i { color: var(--or); }
.ptl-body { padding: 1px 0 14px; }
.ptl-label { font-size: 14px; font-weight: 500; color: var(--white); }
.ptl-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ============================================================ DOC LIST */
.doc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.25rem; }
.doc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--r-md);
  transition: border-color .15s;
}
.doc-row:hover { border-color: var(--or); }
.doc-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-icon i { font-size: 18px; }
.doc-icon.pdf { background: rgba(220,38,38,.1); }
.doc-icon.pdf i { color: #EF4444; }
.doc-icon.cert { background: var(--green-l); }
.doc-icon.cert i { color: var(--green); }
.doc-name { font-size: 14px; font-weight: 500; color: var(--white); flex: 1; }
.doc-meta { font-size: 12px; color: var(--text2); margin-top: 2px; }
.doc-dl { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text2); background: var(--bg2); border: 1px solid var(--border2); padding: 5px 10px; border-radius: var(--r-sm); cursor: pointer; }
.doc-dl:hover { border-color: var(--or); color: var(--or); }

/* ============================================================ PHOTO GALLERY */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1.25rem; }
.photo-slot {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border2);
}
.photo-slot-img { height: 80px; display: flex; align-items: center; justify-content: center; font-size: 27px; border-bottom: 1px solid var(--border); }
.photo-slot-lbl { font-size: 11px; padding: 5px 9px; color: var(--text2); background: var(--bg3); }

/* ============================================================ TICKET */
.ticket-form {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.ticket-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 10px;
}
.ticket-card.urgent { border-left: 2px solid var(--red); }
.tc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.tc-title { font-family: var(--font-title); font-size: 14px; font-weight: 600; color: var(--white); }
.tc-date { font-size: 11px; color: var(--text2); margin-top: 2px; }
.tc-body { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 10px; }
.tc-footer { display: flex; justify-content: space-between; align-items: center; }
.tc-meta { font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 5px; }
.tc-meta i { font-size: 13px; }

/* ============================================================ INSTALLER DEMAND */
.demand-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.demand-card:hover { border-color: var(--or); }
.demand-card.urgent { border-left: 2px solid var(--or); }
.dc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.dc-name { font-family: var(--font-title); font-size: 14px; font-weight: 600; color: var(--white); }
.dc-date { font-size: 11px; color: var(--text2); margin-top: 2px; }
.dc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dc-mp { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text2); }
.dc-mp i { font-size: 13px; color: var(--or); }
.dc-actions { display: flex; gap: 7px; }

/* ============================================================ PROG ROW */
.proj-row {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 10px;
}
.pr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pr-name { font-family: var(--font-title); font-size: 14px; font-weight: 600; color: var(--white); }
.pr-sub { font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.pr-steps { display: flex; gap: 3px; }
.pr-step { flex: 1; height: 6px; border-radius: 3px; background: var(--border2); }
.pr-step.done { background: var(--green); }
.pr-step.cur { background: var(--or); }
.pr-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.pr-label { font-size: 12px; color: var(--text2); }
.pr-actions { display: flex; gap: 6px; }

/* ============================================================ PHOTO UPLOAD SLOT */
.photo-upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 1rem; }
.pug-slot {
  border: 1.5px dashed var(--border2);
  border-radius: var(--r-md);
  height: 80px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .15s;
  background: var(--bg3);
  position: relative;
}
.pug-slot:hover { border-color: var(--or); }
.pug-slot.filled { border-color: var(--green); background: var(--green-l); }
.pug-slot i { font-size: 21px; color: var(--text2); margin-bottom: 5px; }
.pug-slot.filled i { color: var(--green); }
.pug-slot span { font-size: 11px; color: var(--text2); text-align: center; padding: 0 4px; }
.pug-slot.filled span { color: var(--white); }

/* ============================================================ ADMIN ROWS */
.admin-row {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.admin-row:hover { border-color: var(--or); }
.admin-row.urgent { border-left: 2px solid var(--or); }
.ar-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.ar-name { font-family: var(--font-title); font-size: 14px; font-weight: 600; color: var(--white); }
.ar-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ar-mp { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text2); }
.ar-mp i { font-size: 13px; color: var(--or); }
.ar-btns { display: flex; gap: 7px; flex-wrap: wrap; }
.progress-bar { height: 6px; background: var(--border2); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--grad); }
.progress-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text2); }

/* ============================================================ ZONE BARS */
.zone-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.zr-name { font-size: 13px; color: var(--white); width: 110px; flex-shrink: 0; }
.zr-bar { flex: 1; height: 6px; background: var(--border2); border-radius: 3px; overflow: hidden; }
.zr-fill { height: 100%; border-radius: 3px; background: var(--grad); }
.zr-val { font-size: 12px; color: var(--text2); width: 25px; text-align: right; flex-shrink: 0; }

/* ============================================================ FUNNEL */
.funnel-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg3); border-radius: var(--r-sm); margin-bottom: 6px; }
.fr-label { font-size: 13px; color: var(--white); }
.fr-val { font-family: var(--font-title); font-size: 16px; font-weight: 700; color: var(--or); }

/* ============================================================ INFO BOX */
.info-box {
  background: var(--or-l);
  border-left: 2px solid var(--or);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 14px;
  font-size: 13px; color: var(--text2);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.info-box strong { color: var(--or); }
.info-box-green {
  background: var(--green-l);
  border-left: 2px solid var(--green);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 14px;
  font-size: 13px; color: var(--text2);
  margin-bottom: 1rem;
}
.info-box-green strong { color: var(--green); }
.divider { height: 1px; background: var(--border); margin: 1.25rem 0; }

/* ============================================================ HAMBURGER MOBILE */
/* Déclaré AVANT le bloc @media : à specificité égale, la cascade fait gagner
   la dernière règle — la règle @media (display:flex) doit donc venir après
   cette base (display:none). Sinon le hamburger reste masqué sur mobile
   (correctif recette V1 — DSAS-67). */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all .2s;
}

/* ============================================================ RESPONSIVE */
@media (max-width: 768px) {
  .steps-grid, .testi-grid, .real-grid, .blog-grid { grid-template-columns: 1fr; }
  .metric-grid, .stats-band { grid-template-columns: 1fr 1fr; }
  .footer { grid-template-columns: 1fr; }
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar { position: relative; height: auto; top: 0; }
  .real-featured { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  /* WhatsApp flottant : pastille icône seule sur mobile — évite le
     chevauchement des champs de formulaire (correctif recette V1 — DSAS-67). */
  .wa-float { padding: 0; width: 48px; height: 48px; justify-content: center; border-radius: 50%; bottom: 16px; right: 16px; }
  .wa-float span { display: none; }
}

/* Navbar : bascule en menu hamburger dès que la barre inline ne tient plus.
   Breakpoint séparé du 768px (contenu) — sinon débordement horizontal de tout
   le document, relevé en QA (DSAS-74). Conservé tel quel à la refonte DSAS-92. */
@media (max-width: 1199px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg1); border-bottom: 1px solid var(--border); padding: 1rem; z-index: 99; }
  .nav-hamburger { display: flex; }
  /* Le CTA desktop « Devenir installateur » cède la place au lien du menu hamburger. */
  .btn-installateur { display: none; }
  .nav-links .nav-installateur-mobile {
    display: block; width: 100%;
    padding: 9px 0;
    color: var(--or); font-weight: 600; font-size: 15px;
    text-decoration: none;
  }
  .nav-links .nav-installateur-mobile:hover { color: var(--white); }
  /* Déroulants N1 (Solutions / Découvrir) : accordéons inline dans le menu mobile
     (DSAS-92). Le menu n'est plus absolu mais empilé sous son toggle pleine largeur. */
  .nav-links .nav-dd { display: block; width: 100%; }
  .nav-links .nav-dd-toggle { width: 100%; justify-content: space-between; }
  .nav-links .nav-dd-caret { margin-left: auto; }
  .nav-links .nav-dd-menu {
    position: static;
    min-width: 0;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 4px 0 4px 14px;
  }
}

/* Très petits écrans (≤480px) : .nav-right cumule CTA devis + Connexion/Compte +
   toggle langue + hamburger. On dégraisse dans la lignée DSAS-89 : Connexion/Compte
   en icône seule (libellé conservé via aria), CTA et langue compactés — sans masquer
   le CTA de devis. (Le menu Compte ▾ garde son chevron pour signaler le déroulant.) */
@media (max-width: 480px) {
  .navbar { padding: 0 .9rem; }
  .nav-right { gap: 6px; }
  .nav-right .btn-portal { padding: 7px 9px; }
  .nav-right .btn-portal > span { display: none; }
  .nav-right .btn-portal i { font-size: 17px; }
  .btn-cta { padding: 7px 12px; font-size: 13px; }
  .lang-opt { padding: 5px 8px; }
  /* Déroulant « Compte ▾ » : il vit dans .nav-right (hors hamburger) et son bouton
     n'est pas tout à droite (suivi du toggle langue + hamburger). Ancré en absolu à
     droite de ce bouton, son panneau (min-width 210px) débordait le bord gauche du
     viewport à ≤320px. On le repositionne en fixed, calé au bord droit de l'écran et
     borné à la largeur dispo → toujours entièrement visible (suivi recette DSAS-92, lignée DSAS-89). */
  .nav-dd--right .nav-dd-menu {
    position: fixed;
    top: 64px;
    right: .9rem;
    left: auto;
    min-width: 0;
    width: max-content;
    max-width: calc(100vw - 1.8rem);
  }
}

/* ============================================================ KITS SOLAIRES */
.kits-hero { background: var(--bg1); padding: 3.5rem 2rem 2.5rem; text-align: center; border-bottom: 1px solid var(--border); }
.kits-hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.25); border-radius: 20px; padding: 4px 14px; font-size: 12px; font-weight: 600; color: var(--green); margin-bottom: 1.2rem; }
.kits-hero-title { font-family: var(--font-title); font-size: clamp(22px,4vw,36px); font-weight: 800; line-height: 1.25; margin-bottom: .75rem; }
.kits-hero-title span { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.kits-hero-sub { font-size: 15px; color: var(--text2); max-width: 560px; margin: 0 auto 1.5rem; line-height: 1.7; }
.kits-pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.kits-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--bg2); border: 1px solid var(--border2); border-radius: 20px; padding: 5px 12px; font-size: 12px; color: var(--text2); }
.kits-pill i { font-size: 14px; color: var(--or); }

.kits-body { padding: 2.5rem 2rem; background: var(--bg2); }

.kits-filters { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.kits-filter-btn { padding: 7px 18px; border-radius: 20px; font-size: 13px; font-weight: 500; border: 1px solid var(--border2); background: none; color: var(--text2); cursor: pointer; font-family: var(--font-body); transition: all .15s; }
.kits-filter-btn:hover, .kits-filter-btn.on { background: var(--or); color: #fff; border-color: var(--or); }

.kits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 2rem; }
@media (max-width: 900px) { .kits-grid { grid-template-columns: 1fr; } }

.kit-card { background: var(--bg1); border: 1px solid var(--border2); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.kit-card:hover { border-color: var(--or); }
.kit-card.featured { border: 2px solid var(--or); }

.kit-header { background: var(--bg1); padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--border); }
.kit-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; margin-bottom: .75rem; }
.kit-badge-entry { background: rgba(16,185,129,.12); color: var(--green); border: 1px solid rgba(16,185,129,.25); }
.kit-badge-pop { background: rgba(249,115,22,.12); color: var(--or); border: 1px solid rgba(249,115,22,.25); }
.kit-badge-prem { background: rgba(139,92,246,.12); color: #A78BFA; border: 1px solid rgba(139,92,246,.25); }
.kit-name { font-family: var(--font-title); font-size: 19px; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.kit-type { font-size: 12px; color: var(--text3); margin-bottom: .85rem; }
.kit-power-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.kit-power-item { background: var(--bg2); border-radius: var(--r-sm); padding: 6px 8px; text-align: center; }
.kit-power-val { font-size: 15px; font-weight: 700; color: var(--or); display: block; }
.kit-power-lab { font-size: 10px; color: var(--text3); }

.kit-body { padding: 1.1rem 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.kit-section-lbl { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }
.kit-equip-list, .kit-usage-list { display: flex; flex-direction: column; gap: 4px; }
.kit-equip-item, .kit-usage-item { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: var(--text1); line-height: 1.5; }
.kit-equip-dot { width: 15px; height: 15px; border-radius: 50%; background: rgba(16,185,129,.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.kit-equip-dot i { font-size: 10px; color: var(--green); }
.kit-usage-item i { font-size: 14px; color: var(--or); flex-shrink: 0; margin-top: 1px; }
.kit-info-row { display: flex; gap: 6px; }
.kit-info-chip { display: flex; align-items: center; gap: 5px; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--r-sm); padding: 5px 8px; font-size: 12px; color: var(--text2); flex: 1; }
.kit-info-chip i { font-size: 13px; color: var(--or); }

.kit-footer { padding: .9rem 1.25rem; border-top: 1px solid var(--border); }
.kit-payment { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); margin-bottom: .75rem; }
.kit-payment i { font-size: 14px; color: var(--green); }
.kit-cta-main { width: 100%; padding: 10px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; font-family: var(--font-body); border: none; background: var(--grad); color: #fff; cursor: pointer; transition: opacity .15s; }
.kit-cta-main:hover { opacity: .88; }
.kit-cta-outline { width: 100%; padding: 10px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; font-family: var(--font-body); border: 1px solid var(--or); background: none; color: var(--or); cursor: pointer; transition: all .15s; }
.kit-cta-outline:hover { background: var(--or-l); }
.kit-cta-prem { width: 100%; padding: 10px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; font-family: var(--font-body); border: none; background: linear-gradient(135deg,#7C3AED,#5B21B6); color: #fff; cursor: pointer; transition: opacity .15s; }
.kit-cta-prem:hover { opacity: .88; }

.kits-common-block { background: var(--bg1); border: 1px solid var(--border2); border-radius: var(--r-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.kits-common-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 1rem; }
@media (max-width: 700px) { .kits-common-grid { grid-template-columns: 1fr; } }
.kits-common-item { display: flex; align-items: flex-start; gap: 10px; }
.kits-common-icon { width: 32px; height: 32px; border-radius: var(--r-sm); background: rgba(16,185,129,.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kits-common-icon i { font-size: 17px; color: var(--green); }
.kits-common-title { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 2px; }
.kits-common-desc { font-size: 12px; color: var(--text2); line-height: 1.5; }

.kits-note { background: var(--bg1); border: 1px solid var(--border2); border-radius: var(--r-md); padding: 1rem 1.25rem; display: flex; gap: 10px; align-items: flex-start; }
.kits-note i { font-size: 19px; color: var(--or); flex-shrink: 0; margin-top: 1px; }
.kits-note p { font-size: 13px; color: var(--text2); line-height: 1.7; }
.kits-note strong { color: var(--white); }

/* ============================================================
   KIT DETAIL — page fiche détaillée (DSAS-47)
   ============================================================ */
.kit-detail-link { display: block; text-align: center; margin-top: .5rem; font-size: 12px; color: var(--text2); text-decoration: none; }
.kit-detail-link:hover { color: var(--or); }

.kit-detail-page { background: var(--bg2); min-height: 100vh; }
.kit-detail-hero { background: var(--bg1); border-bottom: 1px solid var(--border); padding: 2.5rem 2rem 2rem; max-width: 860px; margin: 0 auto; }
.kit-detail-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); text-decoration: none; margin-bottom: 1.25rem; }
.kit-detail-back:hover { color: var(--or); }
.kit-detail-back i { font-size: 15px; }
.kit-detail-body { max-width: 860px; margin: 0 auto; padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.kit-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 700px) { .kit-detail-stats { grid-template-columns: repeat(2, 1fr); } }
.kit-detail-stat { background: var(--bg1); border: 1px solid var(--border2); border-radius: var(--r-md); padding: 1rem; text-align: center; }
.kit-detail-stat-val { font-size: 21px; font-weight: 700; color: var(--or); display: block; font-family: var(--font-title); }
.kit-detail-stat-lab { font-size: 11px; color: var(--text3); margin-top: 2px; display: block; }
.kit-detail-onduleur { background: var(--bg1); border: 1px solid var(--border2); border-radius: var(--r-md); padding: 1rem 1.25rem; font-size: 14px; color: var(--text1); }
.kit-detail-onduleur span { color: var(--text3); font-size: 12px; display: block; margin-bottom: 3px; }
.kit-detail-section { background: var(--bg1); border: 1px solid var(--border2); border-radius: var(--r-md); padding: 1.25rem; }
.kit-detail-cta { background: var(--bg1); border: 1px solid var(--border2); border-radius: var(--r-md); padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
@media (min-width: 600px) { .kit-detail-cta { flex-direction: row; align-items: center; justify-content: space-between; } }
.kit-detail-cta-text { font-size: 14px; color: var(--text1); }
.kit-detail-cta-text strong { color: var(--white); display: block; font-size: 16px; margin-bottom: 2px; }

/* ============================================================
   PAGES LÉGALES — mentions / polconf / cookies (DSAS-47)
   ============================================================ */
.legal-page { background: var(--bg2); min-height: 100vh; }
.legal-content { max-width: 800px; margin: 0 auto; padding: 2.5rem 2rem; }
.legal-title { font-family: var(--font-title); font-size: clamp(20px,3vw,30px); font-weight: 800; color: var(--white); margin-bottom: 2rem; }
.legal-section { margin-bottom: 2rem; }
.legal-section h2 { font-family: var(--font-title); font-size: 16px; font-weight: 700; color: var(--or); margin-bottom: .6rem; text-transform: uppercase; letter-spacing: .4px; }
.legal-section p, .legal-section li { font-size: 14px; color: var(--text2); line-height: 1.8; margin-bottom: .4rem; }
.legal-section ul { padding-left: 1.25rem; }
.legal-section a { color: var(--or); text-decoration: underline; }
.legal-section strong { color: var(--white); }

/* ============================================================
   AUTH PAGES — DSAS-81 V2.A
   Mobile-first : carte centrée, palette Nuit africaine
   ============================================================ */
.auth-section {
  min-height: calc(100vh - 60px);
  display: flex;
  /* DSAS-116 : flex-start + margin:auto sur la carte → recentrage vertical
     quand il y a de la place (connexion/reset), ancrage haut sinon
     (inscription = formulaire long). Évite que le submit tombe sous le pli
     à cause du centrage qui pousse le bas de la carte hors viewport. */
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  margin: auto; /* DSAS-116 : centre si place, ancre en haut si carte > viewport */
}

.auth-card h1 {
  font-family: var(--font-title);
  font-size: 23px;
  font-weight: 700;
  color: var(--or);
  margin-bottom: .5rem;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 1rem; /* DSAS-116 : était 1.5rem — compactage vertical */
  line-height: 1.6;
}

.auth-hint {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* Carte info (done / error) — sans form, centrée */
.auth-card-info {
  text-align: center;
}

.auth-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.auth-icon-success {
  background: var(--green-l);
  border: 1.5px solid rgba(16,185,129,.3);
}

.auth-icon-success i {
  font-size: 29px;
  color: var(--green);
}

.auth-icon-error {
  background: var(--red-l);
  border: 1.5px solid rgba(220,38,38,.3);
}

.auth-icon-error i {
  font-size: 29px;
  color: #EF4444;
}

/* Champs dans les pages auth — réutilise .field existant + variantes */
.auth-card .field {
  margin-bottom: .7rem; /* DSAS-116 : était 1rem — compactage vertical du formulaire */
}

.auth-card .field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 4px; /* DSAS-116 : était 5px — compactage vertical (laptop 720px) */
}

.auth-card .field input:not([type=checkbox]),
.auth-card .field select {
  width: 100%;
  padding: 9px 12px; /* DSAS-116 : vertical 10→9px — compactage (laptop 720px) */
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--white);
  background: var(--bg3);
  font-family: var(--font-body);
  transition: border-color .15s;
  outline: none;
}

.auth-card .field input:focus,
.auth-card .field select:focus {
  border-color: var(--or);
}

/* Champ requis — astérisque orange */
.auth-card .req {
  color: var(--or);
}

/* RGPD — checkbox + label inline */
.auth-rgpd {
  margin-bottom: 1rem; /* DSAS-116 : était 1.25rem — compactage vertical */
}

.auth-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  font-weight: 400;
}

.auth-checkbox-label input[type=checkbox] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--or);
  margin-top: 1px;
}

/* Bouton de soumission */
.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 12px 24px;
  font-size: 15px;
  margin-bottom: 1.25rem;
}

/* Liens secondaires (connexion, inscription, mdp oublié) */
.auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text2);
  margin-top: .25rem;
}

.auth-links a {
  color: var(--or);
  text-decoration: none;
  transition: opacity .15s;
}

.auth-links a:hover {
  opacity: .8;
  text-decoration: underline;
}

.auth-links-sep {
  color: var(--text3);
}

/* Erreurs de champ */
.field-error {
  color: #EF4444;
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 0;
}

/* Erreurs non-champ (bloc global) */
.form-error-global {
  background: var(--red-l);
  border-left: 2px solid var(--red);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 14px;
  margin-bottom: 1rem;
}

.form-error-global .field-error {
  margin: 0;
}

/* Message succès (inscription réussie, etc.) */
.form-success {
  background: var(--green-l);
  border-left: 2px solid var(--green);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--green-text);
  margin-bottom: 1rem;
}

/* Desktop — le champ RGPD garde son layout flex même sur petits écrans */
@media (min-width: 480px) {
  .auth-card {
    padding: 1.75rem 2rem; /* DSAS-116 : était 2.5rem 2rem — réduit l'empreinte verticale desktop */
  }
}

/* Grille 2 colonnes sur tablet+ pour les paires de champs */
@media (min-width: 600px) {
  .auth-card .field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* === DSAS-91 VÉRIF EMAIL === */

/* Bandeau informatif sur la page login — email non vérifié */
.auth-verify-banner {
  background: rgba(249, 115, 22, .08);
  border-left: 2px solid var(--or);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 12px 14px;
  margin-bottom: 1rem;
}

.auth-verify-banner p {
  font-size: 14px;
  color: var(--text2);
  margin: 0 0 8px;
  line-height: 1.5;
}

.auth-verify-banner form {
  margin: 0;
}

/* Bouton renvoi email — interstitiel email_verification_sent */
.auth-resend-btn {
  width: 100%;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  margin-bottom: 1rem;
}

/* Formulaire renvoi dans l'interstitiel */
.auth-verify-resend-form {
  margin: 1.5rem 0 .5rem;
}

/* === FIN DSAS-91 === */

/* ============================================================
   DASHBOARD CLIENT — DSAS-82 V2.B
   Mobile-first, variables CSS exclusivement
   ============================================================ */

/* (La déconnexion navbar vit désormais dans le menu Compte ▾ — cf. .nav-dd-item--logout,
   section NAVBAR. L'ancien .btn-portal--logout a été retiré à la refonte DSAS-92.) */

/* Section principale du dashboard */
.dashboard {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.dashboard-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.dashboard-header h1 {
  font-family: var(--font-title);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-header p {
  font-size: 14px;
  color: var(--text2);
  margin-top: 6px;
}

/* Badge email non vérifié */
.badge-email-unverified {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--or-l);
  border: 1px solid var(--or-b);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--or);
  margin-bottom: 1.25rem;
}

.badge-email-unverified i {
  font-size: 17px;
  flex-shrink: 0;
}

/* Compteur de dossiers */
.dashboard-count {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 1.25rem;
}

/* Liste des dossiers */
.dossier-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.dossier-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  transition: border-color .15s;
}

.dossier-card:hover {
  border-color: var(--or);
}

.dossier-ref {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  flex-shrink: 0;
}

.dossier-ville {
  font-size: 14px;
  color: var(--text2);
  flex: 1 1 auto;
}

.dossier-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  background: var(--blue-l);
  color: var(--blue-c);
  border: 1px solid rgba(59,130,246,.2);
}

/* États spécifiques */
.dossier-status--nouveau {
  background: var(--green-l);
  color: var(--green);
  border-color: rgba(16,185,129,.25);
}

.dossier-status--annule {
  background: rgba(107,114,128,.12);
  color: var(--text3);
  border-color: rgba(107,114,128,.25);
}

/* État vide */
.dashboard-empty {
  font-size: 14px;
  color: var(--text3);
  padding: 2rem;
  text-align: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

/* Responsive — les cartes passent en colonne complète sur mobile */
@media (max-width: 768px) {
  .dashboard {
    padding: 1.5rem 1rem;
  }

  .dossier-card {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }

  .dossier-ville {
    flex: none;
  }
}

/* ============================================================
   DSAS-83 — V2.C Dashboard client riche
   Détail dossier + timeline + cartes + liens rapides
   ============================================================ */

/* --- Dossier card cliquable (dashboard liste) --- */
.dossier-card--link {
  display: flex;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.dossier-card-arrow {
  margin-left: auto;
  color: var(--text3);
  font-size: 17px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color .15s, transform .15s;
}

.dossier-card--link:hover .dossier-card-arrow {
  color: var(--or);
  transform: translateX(3px);
}

/* --- États de statut supplémentaires --- */
.dossier-status--devis_envoye {
  background: var(--blue-l);
  color: var(--blue-c);
  border: 1px solid rgba(59,130,246,.2);
}

.dossier-status--valide_client {
  background: var(--green-l);
  color: var(--green);
  border-color: rgba(16,185,129,.25);
}

.dossier-status--installation_planifiee {
  background: var(--or-l);
  color: var(--or);
  border-color: var(--or-b);
}

.dossier-status--installation_en_cours {
  background: var(--or-l);
  color: var(--or);
  border-color: var(--or-b);
}

.dossier-status--livre {
  background: var(--green-l);
  color: var(--green);
  border-color: rgba(16,185,129,.25);
}

.dossier-status--maintenance {
  background: var(--blue-l);
  color: var(--blue-c);
  border: 1px solid rgba(59,130,246,.2);
}

/* --- Page détail — structure principale --- */
.dossier-detail {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* --- Header détail --- */
.dossier-detail-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
}

.dossier-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  margin-bottom: .75rem;
  transition: color .15s;
}

.dossier-detail-back:hover {
  color: var(--or);
}

.dossier-detail-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-bottom: .35rem;
}

.dossier-detail-ref {
  font-family: var(--font-title);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--white);
}

.dossier-detail-date {
  font-size: 14px;
  color: var(--text2);
}

/* --- Bannière dossier annulé --- */
.dossier-banner-cancelled {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(107,114,128,.1);
  border: 1px solid rgba(107,114,128,.25);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  color: var(--text2);
}

.dossier-banner-cancelled > i {
  font-size: 23px;
  color: var(--text3);
  flex-shrink: 0;
  margin-top: 1px;
}

.dossier-banner-cancelled strong {
  display: block;
  color: var(--text1);
  font-size: 15px;
  margin-bottom: .25rem;
}

.dossier-banner-cancelled p {
  font-size: 14px;
  color: var(--text2);
}

/* --- Section avec titre --- */
.dossier-detail-section {
  margin-bottom: 2rem;
}

.dossier-detail-section-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--or);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 1rem;
}

/* --- Timeline --- */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border2);
}

.timeline-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .5rem 0;
}

.timeline-step-dot {
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  background: var(--bg2);
  flex-shrink: 0;
  z-index: 1;
}

.timeline-step-label {
  font-size: 14px;
  line-height: 1.4;
  padding: .25rem 0;
}

/* État : étape passée */
.timeline-step--done .timeline-step-dot {
  background: var(--green);
  border-color: var(--green);
}

.timeline-step--done .timeline-step-label {
  color: var(--text2);
}

/* État : étape courante */
.timeline-step--current .timeline-step-dot {
  background: var(--or);
  border-color: var(--or);
  box-shadow: 0 0 0 3px var(--or-l);
  width: 16px;
  height: 16px;
  left: calc(-1.5rem - 1px);
}

.timeline-step--current .timeline-step-label {
  color: var(--white);
  font-weight: 600;
}

/* État : étape à venir */
.timeline-step--upcoming .timeline-step-dot {
  background: var(--bg2);
  border-color: var(--border2);
}

.timeline-step--upcoming .timeline-step-label {
  color: var(--text3);
}

/* --- Grille des cartes détail --- */
.dossier-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.dossier-card-detail {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.dossier-card-detail-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--or-l);
  color: var(--or);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 19px;
}

.dossier-card-kit .dossier-card-detail-icon {
  background: var(--green-l);
  color: var(--green);
}

.dossier-card-contact .dossier-card-detail-icon {
  background: var(--blue-l);
  color: var(--blue-c);
}

.dossier-card-detail-body {
  min-width: 0;
}

.dossier-card-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: .35rem;
}

.dossier-card-detail-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: .25rem;
}

.dossier-card-detail-sub {
  font-size: 14px;
  color: var(--text2);
  margin-top: .2rem;
}

/* --- Liens contact dans la carte --- */
.dossier-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  transition: color .15s;
}

.dossier-contact-link:hover {
  color: var(--or);
}

.dossier-contact-wa:hover {
  color: #25D366;
}

/* --- Liens rapides modules D/E/F --- */
.dossier-quick-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.dossier-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  background: var(--bg2);
  transition: border-color .15s, color .15s;
}

a.dossier-quick-link:hover {
  border-color: var(--or);
  color: var(--or);
}

/* --- Liens désactivés (modules non livrés) --- */
.link-disabled {
  opacity: .55;
  cursor: not-allowed;
}

.link-disabled-tag {
  font-size: 11px;
  font-weight: 600;
  font-style: normal;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text3);
  padding: 1px 6px;
  border-radius: 10px;
}

/* --- Timeline : vue desktop horizontale (≥900px) --- */
@media (min-width: 900px) {
  .timeline {
    flex-direction: row;
    align-items: flex-start;
    padding-left: 0;
    gap: 0;
  }

  .timeline::before {
    left: 0;
    right: 0;
    top: 7px;
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .timeline-step {
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 0;
    text-align: center;
  }

  .timeline-step-dot {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin-bottom: .5rem;
    z-index: 1;
  }

  .timeline-step--current .timeline-step-dot {
    left: auto;
  }

  .timeline-step-label {
    padding: 0;
    font-size: 13px;
  }
}

/* --- Responsive mobile --- */
@media (max-width: 768px) {
  .dossier-detail {
    padding: 1.5rem 1rem 2.5rem;
  }

  .dossier-cards-grid {
    grid-template-columns: 1fr;
  }

  .dossier-quick-links {
    flex-direction: column;
  }

  .dossier-quick-link {
    width: 100%;
  }
}


/* ============================================================ DOCUMENTS V2.D */

/* Lien retour + sous-titre dossier */
.documents-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  margin-bottom: .75rem;
  transition: color .15s;
}

.documents-back:hover {
  color: var(--or);
}

.documents-dossier-ref {
  font-size: 14px;
  color: var(--text2);
  margin-top: 4px;
}

/* Groupe de documents par type */
.doc-group {
  margin-bottom: 2rem;
}

.doc-group-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  color: var(--or);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

/* Liste d'items dans un groupe (nom unique — évite la collision avec le
   bloc .doc-list pré-existant, non utilisé par ce template) */
.doc-group-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.doc-item {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: .875rem 1.125rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  transition: border-color .15s;
}

.doc-item:hover {
  border-color: var(--or);
}

/* Infos textuelles du document */
.doc-item-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.doc-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.doc-item-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.doc-item-date {
  font-size: 12px;
  color: var(--text3);
}

/* Actions : badge + bouton téléchargement */
.doc-item-actions {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-shrink: 0;
}

/* Badges vu / nouveau */
.doc-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: var(--font-body);
}

.doc-badge--vu {
  background: var(--green-l);
  color: var(--green-text);
  border: 1px solid rgba(16,185,129,.2);
}

.doc-badge--nouveau {
  background: var(--or-l);
  color: var(--or-text);
  border: 1px solid var(--or-b);
}

/* Lien Documents dans les cartes du dashboard */
.doc-link {
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
}

.doc-link:hover {
  border-color: var(--or);
  color: var(--or);
}

/* Bouton téléchargement : .btn-sm met border:none → on restaure la bordure ghost
   (sélecteur plus tardif que .btn-sm, même spécificité → l'emporte). */
.doc-download {
  border: 1px solid var(--border2);
}

.doc-download:hover {
  border-color: var(--or);
}

/* Responsive documents — mobile-first */
@media (max-width: 768px) {
  .doc-item {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }

  .doc-item-actions {
    width: 100%;
    justify-content: space-between;
  }

  .doc-download {
    flex: 1 1 auto;
    justify-content: center;
  }
}


/* ============================================================ TICKETS V2.F */

/* Lien retour (même pattern que .documents-back) */
.tickets-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  margin-bottom: .75rem;
  transition: color .15s;
}

.tickets-back:hover {
  color: var(--or);
}

/* En-tête tickets : titre + bouton sur la même ligne */
.tickets-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

/* Messages Django (succès / erreur) */
.tickets-messages {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.tickets-message {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  background: var(--green-l);
  color: var(--green);
  border: 1px solid rgba(16,185,129,.25);
}

.tickets-message--error {
  background: var(--red-l);
  color: #FCA5A5;
  border-color: rgba(220,38,38,.25);
}

/* ─── Liste de tickets ─── */
.ticket-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.ticket-item {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  transition: border-color .15s;
}

.ticket-item:hover {
  border-color: var(--or);
}

.ticket-item-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1.125rem;
  text-decoration: none;
  color: inherit;
}

.ticket-item-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  width: 100%;
}

.ticket-item-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.ticket-numero {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--or);
  letter-spacing: .5px;
  flex-shrink: 0;
}

.ticket-sujet {
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-item-meta {
  font-size: 13px;
  color: var(--text3);
}

.ticket-item-arrow {
  font-size: 17px;
  color: var(--text3);
  flex-shrink: 0;
  margin-left: auto;
}

/* ─── Badge statut ─── */
.ticket-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  flex-shrink: 0;
  background: var(--blue-l);
  color: var(--blue-c);
  border: 1px solid rgba(59,130,246,.2);
}

.ticket-status--ouvert {
  background: var(--green-l);
  color: var(--green);
  border-color: rgba(16,185,129,.25);
}

.ticket-status--en_cours {
  background: var(--or-l);
  color: var(--or);
  border-color: var(--or-b);
}

.ticket-status--resolu {
  background: var(--blue-l);
  color: var(--blue-c);
  border-color: rgba(59,130,246,.2);
}

.ticket-status--ferme {
  background: rgba(107,114,128,.12);
  color: var(--text3);
  border-color: rgba(107,114,128,.25);
}

/* ─── Badge priorité urgente ─── */
.ticket-priorite {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  flex-shrink: 0;
  color: var(--text2);
  background: var(--bg3);
  border: 1px solid var(--border);
}

.ticket-priorite--urgente {
  background: var(--red-l);
  color: #FCA5A5;
  border-color: rgba(220,38,38,.25);
}

.ticket-priorite--haute {
  background: var(--or-l);
  color: var(--or);
  border-color: var(--or-b);
}

/* ─── Badge SLA urgent ─── */
.ticket-sla-badge--urgent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  flex-shrink: 0;
  background: var(--red-l);
  color: #FCA5A5;
  border: 1px solid rgba(220,38,38,.25);
}

/* ─── Formulaire ticket ─── */
.ticket-form-wrapper {
  max-width: 620px;
}

.ticket-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ticket-form-errors {
  background: var(--red-l);
  border: 1px solid rgba(220,38,38,.25);
  border-radius: var(--r-md);
  padding: 10px 14px;
}

.ticket-form-error-item {
  font-size: 14px;
  color: #FCA5A5;
}

.ticket-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ticket-form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text1);
}

.ticket-form-required {
  color: var(--or);
  margin-left: 2px;
}

.ticket-form-field input,
.ticket-form-field select,
.ticket-form-field textarea {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 8px 12px;
  color: var(--text1);
  font-size: 15px;
  width: 100%;
  transition: border-color .15s;
}

.ticket-form-field input:focus,
.ticket-form-field select:focus,
.ticket-form-field textarea:focus {
  outline: none;
  border-color: var(--or);
}

.ticket-form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.ticket-form-field--error input,
.ticket-form-field--error select,
.ticket-form-field--error textarea {
  border-color: var(--red);
}

.ticket-form-field-errors {
  list-style: none;
}

.ticket-form-field-error {
  font-size: 13px;
  color: #FCA5A5;
}

.ticket-form-help {
  font-size: 13px;
  color: var(--text3);
}

.ticket-form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── Détail ticket ─── */
.ticket-detail-numero {
  font-family: var(--font-title);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--white);
}

.ticket-detail-meta {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.ticket-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 120px;
}

.ticket-meta-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text3);
}

.ticket-meta-value {
  font-size: 14px;
  color: var(--white);
}

.ticket-meta-sla-urgent {
  color: #FCA5A5;
}

.ticket-detail-section {
  margin-bottom: 2rem;
}

.ticket-section-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  color: var(--or);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Message / Thread ─── */
.ticket-message {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
}

.ticket-message--dss {
  border-left: 3px solid var(--or);
}

.ticket-message-content {
  font-size: 15px;
  color: var(--text1);
  white-space: pre-wrap;
  line-height: 1.7;
}

.ticket-thread {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ticket-thread-item {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.ticket-thread-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.ticket-thread-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--or);
}

.ticket-thread-date {
  font-size: 13px;
  color: var(--text3);
}

/* ─── Responsive tickets ─── */
@media (max-width: 768px) {
  .tickets-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticket-item-main {
    gap: .4rem;
  }

  .ticket-detail-meta {
    gap: .75rem 1.5rem;
  }

  .ticket-meta-item {
    min-width: 100px;
  }

  .ticket-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ticket-form-actions .btn-cta,
  .ticket-form-actions .btn-ghost {
    text-align: center;
    justify-content: center;
  }
}

/* ===== PHOTOS GALLERY V2.E (DSAS-85) ===== */

/* Groupe de photos par phase — réutilise .doc-group-title pour le titre */
.photo-group {
  margin-bottom: 2.5rem;
}

/* Grille responsive : 3 colonnes → 2 → 1 */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .photos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .photos-grid {
    grid-template-columns: 1fr;
  }
}

/* Vignette cliquable */
.photo-card {
  display: block;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  transition: border-color .15s;
  background: var(--bg3);
}

.photo-card:hover {
  border-color: var(--or);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Légende courte sous la vignette */
.photo-card-legend {
  display: block;
  padding: .4rem .6rem;
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--border);
}

/* Overlay lightbox — masqué par défaut, affiché via :target */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(13, 17, 23, .93);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--r-md);
}

/* Bouton fermer — coin supérieur droit */
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border2);
  color: var(--text2);
  text-decoration: none;
  font-size: 17px;
  transition: border-color .15s, color .15s;
}

.lightbox-close:hover {
  border-color: var(--or);
  color: var(--or);
}

/* Légende dans la lightbox */
.lightbox-caption {
  font-size: 14px;
  color: var(--text2);
  text-align: center;
  max-width: 80vw;
}

/* ============================================================
   COCKPIT ADMIN — DSAS-101 V3.E
   Page de pilotage /back-office/ — mobile-first, variables CSS exclusivement
   ============================================================ */

/* --- Conteneur principal --- */
.cockpit {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* --- En-tête page --- */
.cockpit-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
}

.cockpit-title {
  font-family: var(--font-title);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .3rem;
}

.cockpit-title i {
  color: var(--or);
  font-size: 1.1em;
}

.cockpit-subtitle {
  font-size: 14px;
  color: var(--text2);
}

/* --- Section (cartouche) --- */
.cockpit-section {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Accentuation visuelle pour la section tickets SLA */
.cockpit-section--alert {
  border-color: var(--red);
  background: var(--bg2);
}

.cockpit-section--alert .cockpit-section-title {
  color: var(--white);
}

.cockpit-section--alert .cockpit-section-title i {
  color: var(--red);
}

/* --- Titre de section --- */
.cockpit-section-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

.cockpit-section-title i {
  font-size: 17px;
  color: var(--or);
  flex-shrink: 0;
}

/* Badge total dans le titre de section */
.cockpit-section-total {
  margin-left: auto;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  padding: 2px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* Variante : avertissement (BdC en attente non vide) */
.cockpit-total--warn {
  background: var(--or-l);
  border-color: var(--or-b);
  color: var(--or-text);
}

/* Variante : alerte (tickets SLA imminents non vide) */
.cockpit-total--alert {
  background: var(--red-l);
  border-color: rgba(220,38,38,.25);
  color: #FCA5A5;
}

/* --- Grille statuts dossier --- */
.cockpit-status-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .6rem;
}

.cockpit-status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  padding: .75rem .5rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border2);
  background: var(--bg3);
  text-align: center;
  /* Les classes dossier-status--<value> existantes assurent la couleur via
     héritage du background/color ; on surcharge uniquement border pour la cohérence. */
}

.cockpit-status-count {
  /* Inter (police de corps) + tabular-nums : les chiffres en Syne 800
     paraissaient « aplatis » (zéro ovale, fûts très larges). Inter donne des
     chiffres droits, lisibles et alignés en colonne. */
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-size: 23px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
}

.cockpit-status-label {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.3;
}

/* --- Liste générique (BdC / tickets / installateurs) --- */
.cockpit-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.cockpit-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  padding: .75rem 1rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  transition: border-color .15s;
}

.cockpit-list-item:hover {
  border-color: var(--or);
}

/* Variante alerte — accentuation à gauche (même motif que .ticket-card.urgent) */
.cockpit-list-item--alert {
  border-left: 3px solid var(--red);
}

/* Partie gauche : référence + sous-titre */
.cockpit-list-main {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  flex: 1 1 160px;
  min-width: 0;
}

.cockpit-list-ref {
  /* Référence chiffrée (BDC-2026-001, DSS-DOSS-…) → Inter + tabular-nums
     pour des chiffres nets et alignés (idem .cockpit-status-count). */
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cockpit-list-sub {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}

.cockpit-list-sub i {
  font-size: 13px;
  color: var(--or);
  flex-shrink: 0;
}

/* Partie centrale : métas (date / note / utilisateur) */
.cockpit-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .75rem;
}

.cockpit-list-meta-item {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: 12px;
  color: var(--text2);
}

.cockpit-list-meta-item i {
  font-size: 13px;
  color: var(--text3);
  flex-shrink: 0;
}

/* Variante méta avertissement (expire bientôt) */
.cockpit-meta--warn {
  color: var(--or-text);
}

.cockpit-meta--warn i {
  color: var(--or);
}

/* Variante méta alerte (SLA imminent) */
.cockpit-meta--alert {
  color: #FCA5A5;
}

.cockpit-meta--alert i {
  color: var(--red);
}

/* Variante méta succès (note installateur) */
.cockpit-meta--success {
  color: var(--green-text);
}

.cockpit-meta--success i {
  color: var(--green);
}

/* Badge statut côté droit */
.cockpit-list-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Message liste vide --- */
.cockpit-empty {
  font-size: 14px;
  color: var(--text3);
  padding: 1.5rem;
  text-align: center;
  background: var(--bg3);
  border: 1px dashed var(--border2);
  border-radius: var(--r-md);
}

/* --- Section actions rapides --- */
.cockpit-actions-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .6rem;
}

.cockpit-action-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}

.cockpit-action-link:hover {
  border-color: var(--or);
  color: var(--or);
}

.cockpit-action-link > i:first-child {
  font-size: 17px;
  color: var(--or);
  flex-shrink: 0;
}

.cockpit-action-link span {
  flex: 1;
}

.cockpit-action-arrow {
  color: var(--text3);
  font-size: 15px;
  transition: transform .15s, color .15s;
}

.cockpit-action-link:hover .cockpit-action-arrow {
  color: var(--or);
  transform: translateX(3px);
}

/* --- Responsive — tablette (≥600px) --- */
@media (min-width: 600px) {
  .cockpit-status-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cockpit-list-item {
    flex-wrap: nowrap;
  }
}

/* --- Responsive — desktop (≥960px) --- */
@media (min-width: 960px) {
  .cockpit {
    padding: 2.5rem 2rem 3rem;
  }

  .cockpit-status-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .cockpit-actions-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* === FIN DSAS-101 COCKPIT ADMIN === */

/* ============================================================
   DSAS-112 — V3.L Cockpit admin enrichi
   Barre raccourcis + tables SAV / BdC / Demandes
   ============================================================ */

/* --- Barre de raccourcis modules --- */
.cockpit-shortcuts {
  margin-bottom: 1.25rem;
}

.cockpit-shortcuts-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.cockpit-shortcut-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .85rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}

.cockpit-shortcut-link i {
  font-size: 16px;
  color: var(--or);
  flex-shrink: 0;
}

.cockpit-shortcut-link:hover {
  border-color: var(--or);
  color: var(--or);
}

/* --- Lien "Voir tout" dans les titres de section --- */
.cockpit-section-link {
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  color: var(--or);
  text-decoration: none;
  flex-shrink: 0;
}

.cockpit-section-link:hover {
  text-decoration: underline;
}

/* --- Tables cockpit (SAV / BdC / Demandes) --- */
.cockpit-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cockpit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cockpit-table th {
  text-align: left;
  padding: .5rem .75rem;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text3);
  border-bottom: 1px solid var(--border2);
  white-space: nowrap;
}

.cockpit-table td {
  padding: .55rem .75rem;
  color: var(--text2);
  border-bottom: 1px solid var(--border2);
  vertical-align: middle;
}

.cockpit-table tbody tr:last-child td {
  border-bottom: none;
}

.cockpit-table tbody tr:hover td {
  background: var(--bg3);
}

.cockpit-table a {
  color: var(--or);
  text-decoration: none;
  font-weight: 600;
}

.cockpit-table a:hover {
  text-decoration: underline;
}

/* Ligne urgence SLA — bordure gauche rouge */
.cockpit-table tbody tr.sla-urgent td:first-child {
  border-left: 3px solid var(--red);
}

.cockpit-table tbody tr.sla-urgent {
  background: var(--red-l);
}

/* --- Quick-action "Marquer traitée" --- */
.cockpit-inline-form {
  display: inline;
}

.cockpit-btn-traiter {
  padding: .3rem .7rem;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.cockpit-btn-traiter:hover {
  border-color: var(--green);
  color: var(--green-text);
}

/* --- Responsive — mobile (< 600px) : tables avec scroll horizontal --- */
@media (max-width: 599px) {
  .cockpit-table th,
  .cockpit-table td {
    white-space: nowrap;
  }
}

/* === FIN DSAS-112 COCKPIT ENRICHI === */

/* ============================================================
   DSAS-104 — V3.H Statistiques & reporting
   ============================================================ */

/* --- Grille KPIs financiers (3 tuiles, responsive) --- */
.stats-kpi-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.stats-kpi-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
}

.stats-kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text3);
}

.stats-kpi-value {
  font-size: 23px;
  font-weight: 700;
  color: var(--or);
  font-variant-numeric: tabular-nums;
}

/* --- Sous-titre (mois) --- */
.stats-sub-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text3);
  margin: 1.25rem 0 .5rem;
}

/* --- Liste dossiers par mois --- */
.stats-month-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.stats-month-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .45rem .75rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  font-size: 14px;
}

.stats-month-label {
  color: var(--text2);
  font-variant-numeric: tabular-nums;
}

.stats-month-count {
  font-weight: 700;
  color: var(--or);
  min-width: 2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Responsive — tablette (≥600px) --- */
@media (min-width: 600px) {
  .stats-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-month-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .4rem;
  }
}

/* --- Responsive — desktop (≥960px) --- */
@media (min-width: 960px) {
  .stats-month-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === FIN DSAS-104 STATS REPORTING === */

/* ============================================================
   DSAS-98 — V3.B Bons de commande installateur
   Templates : bdc_liste.html · bdc_detail.html
   ============================================================ */

/* --- Badges d'expiration --- */
.bdc-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.bdc-badge--expire-soon {
  background: var(--or-l);
  color: var(--or);
  border: 1px solid var(--or-b);
}

.bdc-badge--expire {
  background: var(--red-l);
  color: var(--red);
  border: 1px solid rgba(220,38,38,.25);
}

/* --- Lien retour (liste & détail) --- */
.bdc-back-link {
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  transition: color .15s;
}

.bdc-back-link:hover {
  color: var(--or);
}

/* --- Lien « Voir le détail » dans la liste --- */
.bdc-detail-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--or);
  text-decoration: none;
  margin-left: auto;
  flex-shrink: 0;
  transition: opacity .15s;
}

.bdc-detail-link:hover {
  opacity: .8;
}

/* --- Éléments de la carte liste (montant, expiration) --- */
.bdc-montant {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.bdc-expire {
  font-size: 13px;
  color: var(--text2);
}

/* --- Lien « Voir tous mes bons de commande » (dashboard) --- */
.bdc-voir-tous {
  margin-top: 1.25rem;
  font-size: 14px;
  text-align: right;
}

.bdc-voir-tous a {
  color: var(--or);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .15s;
}

.bdc-voir-tous a:hover {
  opacity: .8;
}

/* --- Carte détail BdC --- */
.bdc-detail-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 1.5rem;
}

.bdc-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.bdc-section:last-child {
  border-bottom: none;
}

.bdc-section-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--or);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .75rem;
}

/* --- Liste définition (clé / valeur) --- */
.bdc-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: .5rem;
  column-gap: 1rem;
  font-size: 14px;
}

.bdc-dl dt {
  color: var(--text2);
  font-size: 13px;
}

.bdc-dl dd {
  color: var(--white);
  font-weight: 500;
  margin: 0;
}

.bdc-dl--materiel dt {
  font-size: 13px;
  color: var(--text3);
}

.bdc-empty-field {
  font-size: 14px;
  color: var(--text3);
  font-style: italic;
}

.bdc-motif-refus {
  color: var(--red) !important;
}

/* --- Bloc actions (formulaires accepter / refuser) --- */
.bdc-actions {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bdc-action-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

/* --- Champ textarea motif refus --- */
.bdc-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.bdc-field label {
  font-size: 14px;
  color: var(--text2);
}

.bdc-field textarea,
.bdc-field input[type="text"] {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--white);
  padding: .6rem .85rem;
  font-size: 14px;
  width: 100%;
  resize: vertical;
  transition: border-color .15s;
}

.bdc-field textarea:focus,
.bdc-field input[type="text"]:focus {
  outline: none;
  border-color: var(--or);
}

.bdc-field-errors {
  list-style: none;
  font-size: 13px;
  color: var(--red);
}

/* --- Boutons accepter / refuser --- */
.bdc-btn {
  display: inline-block;
  padding: .65rem 1.5rem;
  border: none;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  align-self: flex-start;
}

.bdc-btn:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.bdc-btn--accepter {
  background: var(--green);
  color: var(--bg1);
}

.bdc-btn--refuser {
  background: var(--bg3);
  color: var(--red);
  border: 1px solid rgba(220,38,38,.35);
}

.bdc-btn--refuser:hover {
  background: var(--red-l);
}

/* --- Bloc état final (offre répondue / expirée) --- */
.bdc-etat-final {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg2);
}

.bdc-etat-msg {
  font-size: 14px;
  line-height: 1.6;
}

.bdc-etat-msg--expire {
  color: var(--text3);
}

.bdc-etat-msg--accepte {
  color: var(--green-text);
}

.bdc-etat-msg--refuse {
  color: var(--red);
}

/* --- Messages Django (succès / erreur) --- */
.bdc-messages {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.bdc-message {
  font-size: 14px;
  padding: .75rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
}

.bdc-message--success {
  background: var(--green-l);
  color: var(--green-text);
  border-color: rgba(16,185,129,.25);
}

.bdc-message--error {
  background: var(--red-l);
  color: var(--red);
  border-color: rgba(220,38,38,.25);
}

.bdc-message--warning {
  background: var(--or-l);
  color: var(--or-text);
  border-color: var(--or-b);
}

.bdc-message--info {
  background: var(--blue-l);
  color: var(--blue-c);
  border-color: rgba(59,130,246,.2);
}

/* --- Responsive --- */
@media (min-width: 640px) {
  .bdc-actions {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .bdc-action-form {
    flex: 1 1 260px;
  }
}

@media (max-width: 480px) {
  .bdc-dl {
    grid-template-columns: 1fr;
  }

  .bdc-btn {
    width: 100%;
    text-align: center;
    align-self: stretch;
  }
}

/* === FIN DSAS-98 BONS DE COMMANDE INSTALLATEUR === */

/* ============================================================
   ORDRE DE SERVICE — DSAS-99 V3.C
   Page détail chantier installateur — mobile-first, variables CSS exclusivement
   ============================================================ */

/* --- Messages Django (succès / erreur) --- */
.os-messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.os-message {
  padding: .75rem 1rem;
  border-radius: var(--r-sm);
  font-size: 15px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text1);
}

.os-message--success {
  background: var(--green-l);
  border-color: var(--green);
  color: var(--green-text);
}

.os-message--error {
  background: var(--red-l);
  border-color: var(--red);
  color: #FCA5A5;
}

/* --- Référence dossier sous le titre --- */
.os-dossier-ref {
  font-size: 15px;
  color: var(--text2);
  margin: .5rem 0 0;
}

/* --- Barre d'avancement --- */
.os-avancement {
  margin: 1.5rem 0;
}

.os-avancement__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .5rem;
}

.os-avancement__label {
  font-size: 14px;
  color: var(--text2);
}

.os-avancement__pct {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  color: var(--or);
}

.avancement-bar {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.avancement-bar__fill {
  height: 100%;
  border-radius: 5px;
  background: var(--or);
  transition: width .3s ease;
}

/* À 100 % : passe en vert succès */
.avancement-bar__fill--complete {
  background: var(--green);
}

/* --- Sections internes de la page OS --- */
.os-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.os-section-title {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 1rem;
}

/* --- Formulaires internes OS --- */
.os-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.os-form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.os-form-label {
  font-size: 14px;
  color: var(--text2);
  font-weight: 500;
}

.os-form-group input,
.os-form-group select,
.os-form-group textarea {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text1);
  padding: .6rem .75rem;
  font-size: 15px;
  transition: border-color .15s;
}

.os-form-group input:focus,
.os-form-group select:focus,
.os-form-group textarea:focus {
  outline: none;
  border-color: var(--or);
}

.os-form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.os-file-input {
  padding: .5rem 0;
  color: var(--text2);
  font-size: 14px;
}

.os-field-errors {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.os-field-errors li {
  font-size: 13px;
  color: #FCA5A5;
}

.os-form-help {
  font-size: 13px;
  color: var(--text3);
  margin: 0;
}

.os-form-actions {
  display: flex;
  justify-content: flex-end;
}

/* --- Badges % avancement dans la liste chantiers du dashboard --- */
.os-pct-badge {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--or);
  margin-left: auto;
}

/* --- Bouton CTA compact dans les cards dashboard --- */
.btn-cta--sm {
  font-size: 14px;
  padding: .45rem .9rem;
}

/* --- Form inline dans une card dashboard (créer OS) --- */
.dossier-card-action {
  margin-top: .5rem;
}

/* --- Statuts OS (complète les statuts dossier existants) --- */
.dossier-status--demarre {
  background: var(--or-l);
  color: var(--or-text);
  border: 1px solid var(--or-b);
}

.dossier-status--en_cours {
  background: rgba(59,130,246,.1);
  color: #93C5FD;
  border: 1px solid rgba(59,130,246,.25);
}

.dossier-status--termine {
  background: var(--green-l);
  color: var(--green-text);
  border: 1px solid rgba(16,185,129,.25);
}

.dossier-status--valide_admin {
  background: rgba(139,92,246,.1);
  color: #C4B5FD;
  border: 1px solid rgba(139,92,246,.25);
}

.dossier-status--accepte {
  background: var(--green-l);
  color: var(--green-text);
  border: 1px solid rgba(16,185,129,.25);
}

/* --- Responsive desktop --- */
@media (min-width: 768px) {
  .os-form {
    max-width: 560px;
  }

  .os-avancement {
    max-width: 560px;
  }
}

/* === FIN DSAS-99 ORDRE DE SERVICE === */

/* ============================================================
   DSAS-100 — V3.D Rapports d'intervention SAV (installateur)
   Réutilise dossier-* / ticket-form-* ; tokens « Nuit africaine ».
   ============================================================ */

/* --- Accès rapide SAV (dashboard installateur) --- */
.dashboard-nav-sav {
  margin: 1rem 0 1.5rem;
}
.dashboard-nav-sav a {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--or);
  text-decoration: none;
  padding: 6px 14px;
  background: var(--or-l);
  border: 1px solid var(--or-b);
  border-radius: var(--r-sm);
  transition: border-color .15s;
}
.dashboard-nav-sav a:hover {
  border-color: var(--or);
}

/* --- Statuts ticket (liste interventions) --- */
.dossier-status--ouvert {
  background: var(--blue-l);
  color: var(--blue-c);
  border: 1px solid rgba(59,130,246,.2);
}
.dossier-status--en_cours {
  background: var(--or-l);
  color: var(--or);
  border-color: var(--or-b);
}
.dossier-status--resolu {
  background: var(--green-l);
  color: var(--green);
  border-color: rgba(16,185,129,.25);
}
.dossier-status--ferme {
  background: rgba(107,114,128,.12);
  color: var(--text3);
  border-color: rgba(107,114,128,.25);
}

/* --- Carte ticket : info secondaire + zone d'actions --- */
.dossier-info {
  font-size: 13px;
  color: var(--text3);
  flex: 1 1 auto;
}
.dossier-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* --- Badges rapport --- */
.dossier-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border2);
}
.dossier-badge--success {
  background: var(--green-l);
  color: var(--green);
  border-color: rgba(16,185,129,.25);
}
.dossier-badge--rapport {
  background: var(--or-l);
  color: var(--or);
  border-color: var(--or-b);
}
.dossier-badge--pending {
  background: rgba(107,114,128,.12);
  color: var(--text3);
  border-color: rgba(107,114,128,.25);
}

/* --- Variantes compactes de boutons --- */
.btn-cta--sm,
.btn-ghost--sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* --- Avertissement formulaire rapport --- */
.ticket-form-warning {
  display: block;
  margin: 0 0 1.25rem;
  padding: .75rem 1rem;
  font-size: 14px;
  color: var(--or);
  background: var(--or-l);
  border: 1px solid var(--or-b);
  border-radius: var(--r-sm);
}

/* --- Détail rapport : champs lecture seule --- */
.rapport-field {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.rapport-field:last-child {
  border-bottom: none;
}
.rapport-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text3);
}
.rapport-text {
  margin: 0;
  font-size: 15px;
  color: var(--text1);
  white-space: pre-line;
}
.rapport-pieces-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 15px;
  color: var(--text2);
}
.rapport-pieces-list li {
  margin: .15rem 0;
}

/* --- Galerie photos rapport --- */
.rapport-photos {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.rapport-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border2);
}

/* === FIN DSAS-100 RAPPORTS SAV === */

/* ============================================================
   DSAS-111 — V3.K Formulaire public inscription installateur
   Layout 2 colonnes : colonne principale + sidebar sticky.
   ============================================================ */

/* --- Layout général --- */
.installer-form-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-areas: "main sidebar";
  gap: 2rem;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem 3rem;
  align-items: start;
}

/* --- Colonne principale --- */
.installer-form-main {
  grid-area: main;
  min-width: 0;
}

/* --- Erreurs globales --- */
.installer-form-errors {
  background: var(--red-l);
  border: 1px solid rgba(220,38,38,.3);
  border-radius: var(--r-sm);
  padding: .75rem 1rem;
  margin: 0 0 1.5rem;
  color: var(--red);
  font-size: .875rem;
}
.installer-form-errors p {
  margin: 0;
}

/* --- Section du formulaire --- */
.installer-form-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 80px;
}

.installer-form-section__title {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text1);
  margin: 0 0 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--or);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.installer-form-section__title i {
  color: var(--or);
  font-size: 1.1rem;
}

/* --- Champ individuel --- */
.installer-form-field {
  margin-bottom: 1.25rem;
}

.installer-form-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: .375rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.installer-form-required {
  color: var(--or);
}

.installer-form-field input[type="text"],
.installer-form-field input[type="email"],
.installer-form-field input[type="tel"],
.installer-form-field input[type="number"],
.installer-form-field select,
.installer-form-field textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text1);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: .65rem .85rem;
  transition: border-color .15s, box-shadow .15s;
}
.installer-form-field input[type="file"] {
  width: 100%;
  background: var(--bg3);
  border: 1px dashed var(--border2);
  border-radius: var(--r-sm);
  color: var(--text2);
  font-family: var(--font-body);
  font-size: .875rem;
  padding: .65rem .85rem;
  cursor: pointer;
  transition: border-color .15s;
}
.installer-form-field input:focus,
.installer-form-field select:focus,
.installer-form-field textarea:focus {
  outline: none;
  border-color: var(--or);
  box-shadow: 0 0 0 3px var(--or-l);
}
.installer-form-field input[type="file"]:hover,
.installer-form-field input[type="file"]:focus {
  border-color: var(--or);
  outline: none;
}

/* --- Champ en erreur --- */
.installer-form-field--error input,
.installer-form-field--error select,
.installer-form-field--error textarea {
  border-color: var(--red);
}

.installer-form-error-msg {
  font-size: .8rem;
  color: var(--red);
  margin: .3rem 0 0;
}

/* --- Texte d'aide --- */
.installer-form-help {
  font-size: .8rem;
  color: var(--text3);
  margin: .3rem 0 0;
}

/* --- Checkboxes spécialités --- */
.installer-form-field--checkboxes .installer-form-label {
  margin-bottom: .75rem;
}
.installer-form-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}
.installer-form-checkbox-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--text2);
  cursor: pointer;
  padding: .5rem .85rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  transition: border-color .15s, color .15s;
}
.installer-form-checkbox-label:hover {
  border-color: var(--or);
  color: var(--or-text);
}
.installer-form-checkbox-label input[type="checkbox"] {
  width: auto;
  accent-color: var(--or);
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Ligne côte-à-côte (nom + prénom) --- */
.installer-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* --- Zone de soumission bas de formulaire --- */
.installer-form-submit {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.installer-form-notice {
  font-size: .8rem;
  color: var(--text3);
  margin: .75rem 0 0;
  line-height: 1.5;
}
.installer-form-notice a {
  color: var(--or-text);
  text-decoration: none;
}
.installer-form-notice a:hover {
  text-decoration: underline;
}

/* --- Sidebar sticky --- */
.installer-form-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 76px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.25rem 1.5rem;
}

.installer-form-sidebar__title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text3);
  margin: 0 0 .75rem;
}

.installer-form-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-bottom: 1.25rem;
}

.installer-form-sidebar__link {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--text2);
  text-decoration: none;
  padding: .5rem .75rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: all .15s;
}
.installer-form-sidebar__link i {
  font-size: 1rem;
  flex-shrink: 0;
}
.installer-form-sidebar__link:hover {
  background: var(--or-l);
  color: var(--or-text);
  border-color: var(--or-b);
}
.installer-form-sidebar__link.active {
  background: var(--or-l);
  color: var(--or);
  border-color: var(--or-b);
  font-weight: 600;
}

.installer-form-sidebar__cta {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* --- Intro section (sec-sub) --- */
.sec-sub {
  color: var(--text2);
  font-size: .95rem;
  line-height: 1.7;
  padding: 0 1rem 2rem;
}

/* --- Responsive : ≤767px → 1 colonne, sidebar en dessous (masquée au profit du btn submit) --- */
@media (max-width: 767px) {
  .installer-form-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "sidebar";
    padding: 0 1rem 2rem;
    gap: 1rem;
    margin-top: 1rem;
  }

  .installer-form-sidebar {
    position: static;
    display: none;
  }

  .installer-form-section {
    padding: 1.25rem 1rem;
  }

  .installer-form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   DSAS-120 — Dashboard installateur enrichi
   ============================================================ */

/* Encart statistiques installateur */
.stat-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* Étoiles note moyenne */
.stat-stars {
  color: var(--or);
  font-size: 1.15rem;
  font-weight: 600;
}

/* Statut facture — montant dû */
.facture-status--due {
  color: var(--red);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Statut facture — payée */
.facture-status--payee {
  color: var(--green);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Responsive mobile-first : stat-card pleine largeur sur mobile */
@media (min-width: 768px) {
  .stat-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
  }
}

/* Pills priorité ticket SAV (interventions récentes) */
.dossier-status--urgente {
  background: var(--red-l);
  color: var(--red);
  border-color: rgba(220,38,38,.25);
}
.dossier-status--haute {
  background: var(--or-l);
  color: var(--or);
  border-color: var(--or-b);
}
.dossier-status--normale {
  background: var(--blue-l);
  color: var(--blue-c);
  border-color: rgba(59,130,246,.2);
}
.dossier-status--basse {
  background: rgba(107,114,128,.12);
  color: var(--text3);
  border-color: rgba(107,114,128,.25);
}

/* Badge niveau installateur (statistiques perso) */
.dossier-badge--or {
  background: var(--or-l);
  color: var(--or);
  border-color: var(--or-b);
}
.dossier-badge--argent {
  background: rgba(148,163,184,.14);
  color: #CBD5E1;
  border-color: rgba(148,163,184,.3);
}
.dossier-badge--debutant {
  background: var(--green-l);
  color: var(--green);
  border-color: rgba(16,185,129,.25);
}

/* ============================================================
   DSAS-114 — RGPD export + suppression compte
   ============================================================ */

/* Boutons génériques (base commune btn-primary / btn-danger) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.625rem 1.25rem;
  border-radius: var(--r-md);
  border: none;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, background .15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
}
.btn-primary:hover { opacity: .88; }

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover { opacity: .88; }

/* Champs de formulaire */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
}

.form-group input[type="password"],
.form-group input[type="text"] {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text1);
  padding: 0.5rem 0.75rem;
  font-size: 15px;
  width: 100%;
  transition: border-color .15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--or);
}

/* Checkbox de confirmation */
.form-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.form-check input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--or);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.form-check label {
  font-size: 14px;
  color: var(--text2);
  cursor: pointer;
}

/* Messages d'erreur formulaire */
.form-errors {
  background: var(--red-l);
  border: 1px solid rgba(220,38,38,.3);
  border-radius: var(--r-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.form-error {
  font-size: 14px;
  color: #FCA5A5;
  margin: 0 0 4px;
}
.form-error:last-child { margin-bottom: 0; }

/* Notice RGPD générique */
.rgpd-notice {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  font-size: 15px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Variante avertissement (rate-limit export) */
.rgpd-notice--warning {
  background: var(--or-l);
  border-color: var(--or-b);
  color: var(--or-text);
}

/* Variante danger (suppression irréversible) */
.rgpd-notice--danger {
  background: var(--red-l);
  border-color: rgba(220,38,38,.3);
  color: #FCA5A5;
}

.rgpd-notice--danger strong {
  display: block;
  margin-bottom: 4px;
  color: #F87171;
}

/* Lien retour dashboard */
.rgpd-back {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.rgpd-back a {
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  transition: color .15s;
}

.rgpd-back a:hover { color: var(--or); }

/* Sections spécifiques (export / suppression) */
.rgpd-export form,
.suppression-compte form {
  margin-bottom: 1.5rem;
}

/* Mobile */
@media (max-width: 640px) {
  .btn {
    width: 100%;
    justify-content: center;
  }

  .rgpd-export form,
  .suppression-compte form {
    display: flex;
    flex-direction: column;
  }
}

/* === FIN DSAS-111 FORMULAIRE INSTALLATEUR === */

/* ============================================================
   DSAS-115 — V3 finition recette : responsive mobile cockpit + stats
   Garde-fou anti-régression : test E2E xfail→pass à 375px.

   Cause racine bug : à <768px, les tables `.cockpit-table` (5 colonnes,
   `white-space: nowrap`) et certaines listes `.cockpit-list-item` ont
   un min-content qui dépasse le viewport. Le `.cockpit-table-wrapper`
   a `overflow-x: auto` mais comme `.cockpit-section` parent est un
   block sans contrainte de largeur, il grandit avec son contenu
   intrinsèque — provoquant un overflow document de ~355px à 375px.

   Fix mobile-first (<768px) :
   1. `.cockpit` : `overflow-x: hidden` de sécurité (clippe tout débord
      résiduel — viewport est la dernière ligne de défense).
   2. `.cockpit-section` : `min-width: 0` + `overflow: hidden` pour que
      le wrapper de table interne (avec son `overflow-x: auto`) reste
      la seule zone scrollable horizontalement.
   3. `.cockpit-table-wrapper` : `max-width: 100%` explicite pour borner
      le scroll horizontal au conteneur de section.
   4. `.cockpit-list-item`, `.cockpit-list-main`, `.cockpit-list-meta` :
      `min-width: 0` pour permettre aux enfants d'écraser (`text-overflow:
      ellipsis` sur `.cockpit-list-ref` fonctionne enfin).
   5. `.cockpit-shortcuts-list` : déjà `flex-wrap: wrap`, on s'assure que
      les boutons restent tactiles (min-height 44px) — déjà OK via padding.
   6. `.stats-kpi-card` : pas de fix nécessaire (grid-template-columns: 1fr
      en mobile-first), mais on ajoute la garde `min-width: 0`.
   ============================================================ */

@media (max-width: 767px) {
  /* Conteneur cockpit : clip de sécurité — empêche tout débord
     résiduel d'une cartouche de polluer le document scrollWidth. */
  .cockpit {
    overflow-x: hidden;
  }

  /* Sections : isolent leur overflow horizontal interne (le wrapper
     de table interne devient la seule zone à scroller horizontalement,
     sans contaminer le document). */
  .cockpit-section {
    min-width: 0;
    overflow: hidden;
  }

  /* Wrapper de table : borné à 100% de sa section (la scrollbar est
     interne au wrapper). */
  .cockpit-table-wrapper {
    max-width: 100%;
    min-width: 0;
  }

  /* Items de liste : autorise l'ellipsis sur les références longues
     (sans `min-width: 0` sur le flex item, ellipsis ne se déclenche pas). */
  .cockpit-list-item,
  .cockpit-list-main,
  .cockpit-list-meta {
    min-width: 0;
  }

  /* Badge statut à droite : peut wrapper à la ligne sur très petits
     écrans (override du `white-space: nowrap` pour libellés longs type
     « INSTALLATION EN COURS »). */
  .cockpit-list-status {
    white-space: normal;
    max-width: 100%;
  }

  /* KPI cards stats : déjà 1 colonne en mobile-first via .stats-kpi-grid,
     on borne juste la valeur (montants longs en XAF). */
  .stats-kpi-card {
    min-width: 0;
  }

  .stats-kpi-value {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Raccourcis : déjà flex-wrap, on assure une zone tactile suffisante. */
  .cockpit-shortcut-link {
    min-height: 36px;
  }
}

/* === FIN DSAS-115 RESPONSIVE COCKPIT + STATS MOBILE === */


/* ============================================================ BANNIÈRE COOKIES (RGPD)
   Bandeau fixe bas, thème Nuit africaine. Affiché par cookie-consent.js tant
   qu'aucun choix n'est enregistré. */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  background: var(--bg2);
  border-top: 1px solid var(--border2);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .45);
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
  animation: cookie-slide-up .25s ease-out;
}
/* Le [hidden] doit l'emporter sur display:flex ci-dessous (sinon resterait visible). */
.cookie-banner[hidden] { display: none; }

@keyframes cookie-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cookie-banner-text { flex: 1 1 360px; min-width: 0; }

.cookie-banner-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .35rem;
}
.cookie-banner-title i { color: var(--or); font-size: 1.1em; }

.cookie-banner-text p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0;
}
.cookie-banner-text a { color: var(--or); text-decoration: underline; }

/* Panneau « Personnaliser » */
.cookie-customize {
  margin-top: .85rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.cookie-customize[hidden] { display: none; }

.cookie-cat {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.45;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: .6rem .75rem;
  cursor: pointer;
}
.cookie-cat strong { color: var(--white); font-weight: 600; }
.cookie-cat input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--or);
  flex-shrink: 0;
}
.cookie-cat input:disabled { opacity: .6; cursor: not-allowed; }

/* Actions */
.cookie-banner-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: .6rem 1.15rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .15s, border-color .15s, background .15s;
}
.cookie-btn--ghost {
  background: transparent;
  border-color: var(--border2);
  color: var(--white);
}
.cookie-btn--ghost:hover { border-color: var(--or); }
.cookie-btn--accept {
  background: linear-gradient(135deg, var(--or) 0%, var(--red) 100%);
  color: #fff;
}
.cookie-btn--accept:hover { filter: brightness(1.08); }
.cookie-btn--save[hidden] { display: none; }

/* Mobile : pile verticale, boutons pleine largeur */
@media (max-width: 640px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: .85rem; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .cookie-btn { flex: 1 1 auto; text-align: center; }
}

/* Respect de prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .cookie-banner { animation: none; }
}
/* === FIN BANNIÈRE COOKIES === */

/* ─── DSAS-142 — Bouton 👁 « voir le mot de passe » sur tous les input[type=password]
   (UX inscription mobile + login). Wrapper créé dynamiquement par
   `static/js/dss-password-toggle.js`. Couleur accent orange Nuit africaine. */
.pwd-toggle-wrapper {
  position: relative;
  display: block;
}
.pwd-toggle-wrapper input[type="password"],
.pwd-toggle-wrapper input[type="text"] {
  padding-right: 44px; /* place pour le bouton oeil */
  width: 100%;
}
.pwd-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--or);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pwd-toggle-btn:hover { color: var(--red); }
.pwd-toggle-btn:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 2px;
}
