/* ==========================================================================
   AURA FINANCES — DESIGN SYSTEM LUXE & MOBILE-FIRST
   Couleurs officielles: Bleu Nuit #062b55, Or #f5b51b / #d99b13, Bleu Royal #0875d1
   ========================================================================== */

:root {
  /* Palette Chromatique Officielle */
  --navy: #062b55;
  --navy-dark: #031d3b;
  --navy-light: #0b477f;
  --navy-subtle: #0f3d6b;
  
  --gold: #f5b51b;
  --gold-dark: #d99b13;
  --gold-light: #ffd866;
  --gold-bg: #fffbf0;
  
  --blue: #0875d1;
  --blue-light: #eef6ff;
  --blue-hover: #065ea8;
  
  --emerald: #0a9b72;
  --emerald-light: #eafaf4;
  --emerald-border: #b8e7d5;
  
  --crimson: #d92d3d;
  --crimson-light: #fff0f2;
  --crimson-border: #ffc0c9;
  
  --amber: #f59e0b;
  --amber-light: #fff8e5;
  --amber-border: #f4d47d;

  --purple: #6b35c8;
  --purple-light: #f4efff;
  
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --border: #e2e8f0;
  --border-subtle: #edf2f7;
  
  --text-main: #0e1e33;
  --text-muted: #5c6f84;
  --text-light: #8e9eaf;
  --text-inverse: #ffffff;
  
  /* Typographie & Échelle */
  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Ombres & Élévations */
  --shadow-sm: 0 2px 6px rgba(6, 43, 85, 0.05);
  --shadow-md: 0 6px 18px rgba(6, 43, 85, 0.08);
  --shadow-lg: 0 14px 35px rgba(6, 43, 85, 0.12);
  --shadow-gold: 0 8px 24px rgba(245, 181, 27, 0.35);
  --shadow-navy: 0 10px 30px rgba(6, 43, 85, 0.25);
  
  /* Rayons de courbure */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & STRUCTURE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* ==========================================================================
   LAYOUT CONTAINERS & GRIDS
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.container-narrow {
  max-width: 860px;
}

.grid-1 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ==========================================================================
   TOP BAR & NAVIGATION PRINCIPALE
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--text-inverse);
  box-shadow: 0 4px 20px rgba(3, 29, 59, 0.35);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 46px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  color: #dcecff;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sélecteur de langue */
.locale-switcher {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px;
  border-radius: var(--radius-pill);
}

.locale-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  color: #cfe2ff;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.locale-btn.active {
  background: var(--gold);
  color: var(--navy-dark);
}

/* ==========================================================================
   HERO BANNER IMMERSIF
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  color: var(--text-inverse);
  border-radius: var(--radius-xl);
  padding: 48px 42px;
  margin-top: 24px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-navy);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 181, 27, 0.18) 0%, rgba(245, 181, 27, 0) 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 36px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
}

.text-gold {
  color: var(--gold);
}

.hero-description {
  font-size: 1.12rem;
  color: #dceeff;
  margin-bottom: 28px;
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-card-side {
  background: var(--surface-glass);
  color: var(--text-main);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   BOUTONS & INTERACTIONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

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

.btn-primary {
  background-color: var(--navy);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background-color: var(--navy-light);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #0b1f36;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}

/* Bouton secondaire (exports, fiches, actions annexes) : utilisé partout mais jamais défini,
   il s'affichait comme du texte nu. Fond blanc, bordure et ombre légère : il se lit comme un bouton. */
.btn-secondary {
  background: var(--surface);
  color: var(--navy);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  border-color: var(--navy-light);
  background: var(--blue-light);
  box-shadow: var(--shadow-md);
}
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.btn-outline-white {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

.btn-green {
  background-color: var(--emerald);
  color: #fff;
}
.btn-green:hover { background-color: #087f5d; }

.btn-red {
  background-color: var(--crimson);
  color: #fff;
}
.btn-red:hover { background-color: #b5202e; }

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1.08rem;
  border-radius: var(--radius-md);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ==========================================================================
   CARTES PRODUITS & COMPOSANTS
   ========================================================================== */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-top: 6px solid var(--blue);
  overflow: hidden;
}

.product-card.green { border-color: var(--emerald); }
.product-card.blue { border-color: var(--blue); }
.product-card.purple { border-color: var(--purple); }
.product-card.gold { border-color: var(--gold-dark); }

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background-color: var(--bg);
  margin-bottom: 14px;
}

.product-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 4px;
}

.product-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.product-price-range {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--blue-light);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-uses-list {
  list-style: none;
  margin-bottom: 22px;
  flex: 1;
}

.product-uses-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.product-uses-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: 900;
}

/* ==========================================================================
   SIMULATEUR DE CRÉDIT RÉACTIF
   ========================================================================== */
.simulator-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.range-slider-wrapper {
  margin: 18px 0;
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: #cbd8e6;
  outline: none;
  transition: var(--transition);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--navy);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.sim-result-card {
  background: linear-gradient(135deg, #eef9f5 0%, #e1f4ed 100%);
  border: 1px solid var(--emerald-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.sim-total-amount {
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--emerald);
  margin: 6px 0 16px;
  font-variant-numeric: tabular-nums;
}

.sim-breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(10, 155, 114, 0.25);
  font-size: 0.95rem;
}

/* ==========================================================================
   FORMULAIRES & STEPPER
   ========================================================================== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd8e6;
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 117, 209, 0.15);
}

/* Stepper 5 étapes */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 30px;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  height: 3px;
  background-color: var(--border);
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--surface);
  border: 3px solid var(--border);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  transition: var(--transition);
}

.step-item.active .step-circle {
  border-color: var(--navy);
  background-color: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(6, 43, 85, 0.15);
}

.step-item.completed .step-circle {
  border-color: var(--emerald);
  background-color: var(--emerald);
  color: #fff;
}

.step-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ==========================================================================
   SCORING GAUGE CIRCULAIRE & KPIS
   ========================================================================== */
.score-card {
  display: flex;
  align-items: center;
  gap: 22px;
}

.score-circle-gauge {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--emerald) calc(var(--score, 0) * 1%), #e2e8f0 0);
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
}

.score-circle-gauge::after {
  content: "";
  position: absolute;
  inset: 10px;
  background-color: var(--surface);
  border-radius: 50%;
}

.score-gauge-val {
  position: relative;
  z-index: 2;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--navy);
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--navy);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   BADGES DE STATUT
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
}

.badge-green { background-color: var(--emerald-light); color: var(--emerald); border: 1px solid var(--emerald-border); }
.badge-blue { background-color: var(--blue-light); color: var(--blue); border: 1px solid #bfdbfe; }
.badge-gold { background-color: var(--gold-bg); color: var(--gold-dark); border: 1px solid var(--amber-border); }
.badge-red { background-color: var(--crimson-light); color: var(--crimson); border: 1px solid var(--crimson-border); }
.badge-orange { background-color: var(--amber-light); color: #b45309; border: 1px solid var(--amber-border); }
.badge-purple { background-color: var(--purple-light); color: var(--purple); border: 1px solid #ddd6fe; }
.badge-muted { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge-slate { background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* ==========================================================================
   TABLEAUX DE DONNÉES
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th, .table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table th {
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: var(--surface-alt);
}

.table tr:hover td {
  background-color: rgba(244, 247, 251, 0.6);
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: #ffffff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 750;
  gap: 3px;
  transition: var(--transition);
}

.mobile-nav-item.active {
  color: var(--navy);
}

.mobile-nav-icon {
  font-size: 1.25rem;
}

/* ==========================================================================
   BANDEAU PWA D'INSTALLATION
   ========================================================================== */
.pwa-banner {
  position: fixed;
  bottom: 74px;
  left: 16px;
  right: 16px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  animation: slideUp 0.35s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   DOCUMENTS ADMINISTRATIFS OFFICIELS & PRINT MODE
   ========================================================================== */
.document-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 820px;
  margin: 20px auto;
  padding: 36px 42px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  position: relative;
  font-size: 0.88rem;
  color: #10243d;
}

.doc-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-bottom: 3px solid var(--navy);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.doc-logo-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-coords {
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.doc-main-title {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: #ffffff;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  margin: 16px 0;
  text-transform: uppercase;
}

.doc-ref-badge {
  text-align: right;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.doc-section-title {
  background-color: #f1f6fb;
  border-left: 4px solid var(--navy);
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--navy);
  margin: 14px 0 8px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.doc-table th, .doc-table td {
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.doc-table th {
  background-color: #062b55;
  color: #fff;
  font-weight: 800;
}

.doc-signatures-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.doc-signature-box {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 8px;
  min-height: 90px;
  text-align: center;
  font-size: 0.75rem;
  background-color: #fafbfc;
}

.doc-seal-stamp {
  width: 120px;
  height: 120px;
  position: absolute;
  bottom: 40px;
  right: 50px;
  opacity: 0.85;
  pointer-events: none;
}

.doc-footer-tagline {
  margin-top: 24px;
  padding-top: 10px;
  border-top: 2px solid var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--navy);
}

/* ==========================================================================
   BARRE DE DÉMONSTRATION MULTI-RÔLES
   ========================================================================== */
.demo-role-bar {
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 101;
  border-bottom: 1px solid #334155;
}

.demo-role-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.demo-pill {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: var(--transition);
}

.demo-pill:hover, .demo-pill.active {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold);
}

/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.3rem; }
}

@media (max-width: 768px) {
  .header-inner { height: 64px; }
  .main-nav { display: none; } /* Remplacé par bottom-nav sur mobile */
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: 74px; } /* Espace pour la bottom nav */
  
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-section { padding: 30px 20px; }
  .hero-title { font-size: 1.85rem; }
  .document-sheet { padding: 20px 16px; margin: 10px auto; }
  .doc-signatures-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   MODE IMPRESSION OFFICIEL (@media print)
   ========================================================================== */
@media print {
  .site-header, .mobile-bottom-nav, .demo-role-bar, .pwa-banner, .btn-no-print {
    display: none !important;
  }
  
  body {
    background: #ffffff !important;
    padding: 0 !important;
    color: #000000 !important;
  }
  
  .document-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

/* Simulateur : sélecteur de produit en grille uniforme (2 colonnes mobile, 4 desktop) */
.sim-product-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
@media (min-width: 900px) {
  .sim-product-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sim-product-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 76px;
  padding: 10px 8px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  color: var(--navy);
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.sim-product-tab:hover { border-color: var(--navy); transform: translateY(-1px); }
.sim-product-tab:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sim-product-tab-icon { font-size: 1.2rem; line-height: 1; }
.sim-product-tab-name { font-weight: 800; font-size: 0.86rem; letter-spacing: .2px; }
.sim-product-tab-range { font-size: 0.72rem; font-weight: 600; color: #64748b; font-variant-numeric: tabular-nums; }
.sim-product-tab.is-active {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fff8e6 0%, #ffefc7 100%);
  box-shadow: 0 6px 18px rgba(245, 181, 27, 0.28);
}
.sim-product-tab.is-active .sim-product-tab-range { color: #92400e; }

/* ===== Messages flash (site public) ===== */
.flash-stack { position: fixed; top: 88px; right: 16px; left: 16px; z-index: 300; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.flash { pointer-events: auto; max-width: 440px; width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 0.88rem; font-weight: 650; box-shadow: 0 10px 30px rgba(3, 29, 59, 0.18); border: 1px solid; animation: flash-in .25s ease; }
.flash-success { background: var(--emerald-light); color: #065f46; border-color: var(--emerald-border); }
.flash-error { background: var(--crimson-light); color: #9f1239; border-color: var(--crimson-border); }
.flash-info { background: var(--blue-light); color: #0b4a85; border-color: #bcdcfb; }
.flash-warning { background: var(--amber-light); color: #92400e; border-color: var(--amber-border); }
.flash-close { margin-left: auto; background: none; border: 0; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; opacity: .6; padding: 0 2px; }
.flash-close:hover { opacity: 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ===== Pages d'authentification ===== */
.auth-shell { min-height: calc(100vh - 260px); display: grid; place-items: center; padding: 48px 16px 96px; background: radial-gradient(circle at 15% 10%, rgba(245,181,27,.10), transparent 40%), radial-gradient(circle at 85% 90%, rgba(8,117,209,.10), transparent 45%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 20px; padding: 36px 30px 30px; box-shadow: 0 24px 60px rgba(3, 29, 59, 0.14); border: 1px solid #e6edf5; }
.auth-card h1 { font-size: 1.5rem; font-weight: 900; color: var(--navy); margin: 0 0 6px; }
.auth-card .auth-lead { color: #64748b; font-size: 0.92rem; margin: 0 0 24px; line-height: 1.55; }
.auth-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); color: #fff; margin-bottom: 18px; box-shadow: 0 8px 20px rgba(6,43,85,.25); }
.form-error { display: block; color: var(--crimson); font-size: 0.8rem; font-weight: 650; margin-top: 6px; }
.form-control.is-invalid { border-color: var(--crimson); }
.input-with-action { position: relative; }
.input-with-action .form-control { padding-right: 52px; }
.input-action { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: #64748b; font-size: 0.8rem; font-weight: 700; }
.input-action:hover { background: #f1f5f9; color: var(--navy); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 20px; font-size: 0.86rem; }
.auth-row label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: #334155; font-weight: 600; }
.auth-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy); }
.auth-link { color: var(--blue); font-weight: 700; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-footer { margin-top: 22px; padding-top: 18px; border-top: 1px solid #eef2f7; text-align: center; font-size: 0.86rem; color: #64748b; }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 0.76rem; color: #94a3b8; }
.auth-demo { margin-top: 20px; padding: 14px; border-radius: 12px; background: var(--gold-bg); border: 1px dashed var(--amber-border); }
.auth-demo-title { font-size: 0.74rem; font-weight: 900; letter-spacing: .6px; color: #92400e; text-transform: uppercase; margin-bottom: 10px; }
.auth-demo-list { display: flex; flex-wrap: wrap; gap: 6px; }
.auth-demo-list button { border: 1px solid var(--amber-border); background: #fff; color: var(--navy); border-radius: 999px; padding: 7px 12px; font-size: 0.78rem; font-weight: 700; cursor: pointer; min-height: 34px; }
.auth-demo-list button:hover { background: var(--gold); }

[x-cloak] { display: none !important; }

/* Pastilles de statut (portail client, modales) : alignées sur les documents officiels */
.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.2px; border: 1px solid transparent; white-space: nowrap; }
.status-pill-green { background: #dcfce7; color: #15803d; border-color: #86efac; }
.status-pill-red { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.status-pill-blue { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.status-pill-gold, .status-pill-orange, .status-pill-amber, .status-pill-yellow { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-pill-gray, .status-pill-slate { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

/* ===== PWA : installation, mise à jour, état réseau ===== */
.pwa-toast { position: fixed; left: 16px; right: 16px; bottom: 86px; max-width: 460px; margin: 0 auto; z-index: 1000; display: flex; align-items: center; gap: 12px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 14px 16px; box-shadow: 0 18px 48px rgba(3, 29, 59, .22); opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; }
.pwa-toast.is-visible { opacity: 1; transform: none; }
.pwa-toast img { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.pwa-toast-body { flex: 1; min-width: 0; }
.pwa-toast-body b { display: block; color: var(--navy); font-size: .9rem; }
.pwa-toast-body span { display: block; color: #64748b; font-size: .78rem; line-height: 1.4; }
.pwa-toast-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.pwa-toast-close { background: none; border: 0; color: #94a3b8; font-size: 1.2rem; cursor: pointer; padding: 6px 8px; border-radius: 8px; min-width: 36px; min-height: 36px; }
.pwa-toast-close:hover { background: #f1f5f9; color: var(--navy); }
.pwa-toast--update { border-color: var(--gold); }
.pwa-net { position: fixed; top: 0; left: 0; right: 0; z-index: 1100; text-align: center; padding: 8px 16px; font-size: .82rem; font-weight: 700; background: #1e293b; color: #fff; transform: translateY(-100%); transition: transform .25s ease, background .25s ease; }
.pwa-net.is-visible { transform: none; }
.pwa-net.is-online { background: var(--emerald); }
@media (min-width: 960px) { .pwa-toast { bottom: 24px; right: 24px; left: auto; margin: 0; max-width: 540px; } }
.pwa-net--session { top: auto; bottom: 0; background: var(--navy); transform: translateY(100%); padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }

/* L'attribut hidden doit toujours l'emporter : sans cette règle, un display: flex (guide, bandeaux)
   laissait un calque invisible posé sur la page, qui bloquait tous les clics. */
[hidden] { display: none !important; }

/* Guide d'installation (fenêtre en bas d'écran sur mobile, centrée sur ordinateur) */
.pwa-sheet { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center; background: rgba(3, 29, 59, .55); opacity: 0; transition: opacity .25s ease; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.pwa-sheet.is-visible { opacity: 1; }
.pwa-sheet-panel { position: relative; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; background: #ffffff; border-radius: 24px 24px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -18px 48px rgba(3, 29, 59, .25); transform: translateY(24px); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.pwa-sheet.is-visible .pwa-sheet-panel { transform: none; }
.pwa-sheet-close { position: absolute; top: 12px; right: 12px; }
.pwa-sheet-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; padding-right: 36px; }
.pwa-sheet-head img { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; box-shadow: 0 6px 16px rgba(6, 43, 85, .2); }
.pwa-sheet-head h2 { font-size: 1.15rem; color: var(--navy); margin: 0 0 4px; }
.pwa-sheet-head p { font-size: .85rem; color: var(--text-muted); margin: 0; line-height: 1.45; }
.pwa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.pwa-steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; font-size: .92rem; color: var(--text-main); line-height: 1.5; }
.pwa-step-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #ffffff; font-weight: 800; font-size: .8rem; display: grid; place-items: center; margin-top: 1px; }
.pwa-ico { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin: 0 2px; vertical-align: -7px; border-radius: 7px; background: #e8f1fb; color: var(--blue); }
.pwa-ico svg { width: 18px; height: 18px; }
.pwa-sheet-copy { width: 100%; margin-top: 16px; justify-content: center; }
.pwa-pointer { position: absolute; left: 50%; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); color: var(--gold); font-size: 2rem; font-weight: 900; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); animation: pwa-point 1.2s ease-in-out infinite; pointer-events: none; }
.pwa-sheet:has(.pwa-pointer:not([hidden])) .pwa-sheet-panel { margin-bottom: 44px; border-radius: 24px; }
@keyframes pwa-point { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
@media (min-width: 720px) { .pwa-sheet { align-items: center; } .pwa-sheet-panel { border-radius: 24px; } .pwa-pointer { display: none; } }
@media (prefers-reduced-motion: reduce) { .pwa-sheet, .pwa-sheet-panel { transition: none; } .pwa-pointer { animation: none; } }
html.pwa-sheet-open { overflow: hidden; }
.pwa-footer-install { background: none; border: 1px solid #2a4f78; color: #d8e7f6; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; min-height: 36px; }
.pwa-footer-install:hover, .pwa-footer-install:focus-visible { border-color: var(--gold); color: var(--gold); }
html.is-pwa .pwa-footer-install { display: none; }
html.is-pwa .demo-role-bar { display: none; }
@media print { .pwa-toast, .pwa-net { display: none !important; } }

/* Encoches iPhone en mode application installée (status bar translucide) */
.site-header { padding-top: env(safe-area-inset-top, 0px); }
.mobile-bottom-nav { padding-bottom: env(safe-area-inset-bottom, 0px); height: calc(64px + env(safe-area-inset-bottom, 0px)); }

/* ===== Infobulles (composant <x-info>) ===== */
.aura-tip { position: relative; display: inline-flex; vertical-align: middle; margin-left: 6px; }
.aura-tip-btn { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: #64748b; font: 800 11px/1 Georgia, 'Times New Roman', serif; font-style: italic; display: inline-grid; place-items: center; cursor: help; padding: 0; opacity: .8; transition: color .15s ease, opacity .15s ease, background .15s ease; }
.aura-tip-btn::before { content: ''; position: absolute; inset: -12px; } /* zone tactile élargie (44 px) */
.aura-tip-btn:hover, .aura-tip-btn:focus-visible { opacity: 1; color: var(--blue); }
.aura-tip-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.aura-tip-bubble { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(calc(-50% + var(--tip-shift, 0px)), 4px); width: max-content; max-width: min(280px, calc(100vw - 32px)); padding: 10px 12px; border-radius: 10px; background: #0f172a; color: #f8fafc; font: 500 0.8rem/1.45 Inter, system-ui, sans-serif; text-transform: none; letter-spacing: 0; text-align: left; white-space: normal; box-shadow: 0 12px 28px rgba(3, 29, 59, .28); display: none; pointer-events: none; z-index: 1200; }
.aura-tip-bubble::after { content: ''; position: absolute; top: 100%; left: calc(50% - var(--tip-shift, 0px)); margin-left: -6px; border: 6px solid transparent; border-top-color: #0f172a; }
.aura-tip:hover .aura-tip-bubble, .aura-tip:focus-within .aura-tip-bubble { display: block; transform: translate(calc(-50% + var(--tip-shift, 0px)), 0); animation: aura-tip-in .15s ease; }
@keyframes aura-tip-in { from { opacity: 0; } to { opacity: 1; } }
.aura-tip.is-below .aura-tip-bubble { bottom: auto; top: calc(100% + 10px); }
.aura-tip.is-below .aura-tip-bubble::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #0f172a; }
@media print { .aura-tip { display: none !important; } }

/* Barre démo (local) : compacte sur téléphone */
@media (max-width: 640px) {
  .demo-role-bar { flex-wrap: wrap; gap: 8px; }
  .demo-role-bar > div { flex-wrap: wrap; min-width: 0; }
  .demo-role-bar > div:last-child span { display: none; }
}

/* ===== Signature électronique du contrat (espace client) ===== */
.contract-sign { background: #fff; border: 2px solid var(--gold); border-radius: 18px; padding: 22px; margin-bottom: 24px; box-shadow: 0 10px 28px rgba(245, 181, 27, .18); }
.contract-sign-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.contract-sign-head strong { display: block; color: var(--navy); font-size: 1.08rem; font-weight: 900; }
.contract-sign-head span { display: block; color: #64748b; font-size: .8rem; }
.contract-sign-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--gold-bg); display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.contract-sign-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.contract-sign-grid > div { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: 10px 12px; }
.contract-sign-grid dt { font-size: .74rem; color: #64748b; font-weight: 600; }
.contract-sign-grid dd { margin: 2px 0 0; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.contract-sign-grid dd.is-total { color: var(--emerald); }
.contract-sign-note { font-size: .82rem; color: #475569; line-height: 1.5; margin: 0 0 14px; }
.contract-sign-check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: #1e293b; line-height: 1.5; cursor: pointer; }
.contract-sign-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); flex-shrink: 0; }
.contract-sign-legal { display: block; margin-top: 10px; font-size: .74rem; color: #94a3b8; text-align: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 420px) { .contract-sign-grid { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Cartes KPI (composant <x-kpi>) : dégradés pastel, cliquables vers le détail
   ========================================================================== */
:root {
  --kpi-sky-from: #def6fc;   --kpi-sky-to: #c4ecf8;   --kpi-sky-ink: #0b84b5;
  --kpi-violet-from: #efecff; --kpi-violet-to: #ddd6fe; --kpi-violet-ink: #6d5ce8;
  --kpi-mint-from: #e1fbf1;  --kpi-mint-to: #c4f2df;  --kpi-mint-ink: #0a9b72;
  --kpi-pink-from: #fbe8fc;  --kpi-pink-to: #f2d2f6;  --kpi-pink-ink: #b5309f;
  --kpi-gold-from: #fff6dc;  --kpi-gold-to: #ffe6a6;  --kpi-gold-ink: #b07a06;
  --kpi-navy-from: #e6eefb;  --kpi-navy-to: #cddcf3;  --kpi-navy-ink: #0b477f;
}

.aura-kpi {
  --kpi-from: var(--kpi-sky-from);
  --kpi-to: var(--kpi-sky-to);
  --kpi-ink: var(--kpi-sky-ink);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--kpi-from) 0%, var(--kpi-to) 100%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}
/* Reflet doux en haut à droite : profondeur sans alourdir */
.aura-kpi::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -40%;
  right: -25%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), transparent 65%);
  pointer-events: none;
}
.aura-kpi--sky { --kpi-from: var(--kpi-sky-from); --kpi-to: var(--kpi-sky-to); --kpi-ink: var(--kpi-sky-ink); }
.aura-kpi--violet { --kpi-from: var(--kpi-violet-from); --kpi-to: var(--kpi-violet-to); --kpi-ink: var(--kpi-violet-ink); }
.aura-kpi--mint { --kpi-from: var(--kpi-mint-from); --kpi-to: var(--kpi-mint-to); --kpi-ink: var(--kpi-mint-ink); }
.aura-kpi--pink { --kpi-from: var(--kpi-pink-from); --kpi-to: var(--kpi-pink-to); --kpi-ink: var(--kpi-pink-ink); }
.aura-kpi--gold { --kpi-from: var(--kpi-gold-from); --kpi-to: var(--kpi-gold-to); --kpi-ink: var(--kpi-gold-ink); }
.aura-kpi--navy { --kpi-from: var(--kpi-navy-from); --kpi-to: var(--kpi-navy-to); --kpi-ink: var(--kpi-navy-ink); }
/* Bleu trop foncé pour un emoji (💱, 🏁, 🏦 disparaissaient) : pastille blanche cerclée de bleu */
.aura-kpi--navy .aura-kpi-icon { background: var(--surface); box-shadow: inset 0 0 0 2px var(--kpi-navy-ink), 0 6px 14px color-mix(in srgb, var(--kpi-navy-ink) 25%, transparent); }

.aura-kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.aura-kpi-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.15rem;
  background: var(--kpi-ink); color: var(--surface);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--kpi-ink) 35%, transparent);
}
.aura-kpi-value {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.aura-kpi-label { font-size: 0.82rem; font-weight: 700; color: var(--navy-light); display: flex; align-items: center; flex-wrap: wrap; }
.aura-kpi-sub { font-size: 0.75rem; color: var(--text-muted); }
.aura-kpi-trend {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: var(--radius-pill);
  font-size: 0.74rem; font-weight: 800;
  background: rgba(255, 255, 255, 0.75);
}
.aura-kpi-trend.is-up { color: var(--emerald); }
.aura-kpi-trend.is-down { color: var(--crimson); }
.aura-kpi-cta {
  margin-top: 6px; font-size: 0.76rem; font-weight: 800; color: var(--kpi-ink);
  opacity: 0; transform: translateX(-4px);
  transition: opacity var(--motion-fast, 160ms) ease, transform var(--motion-fast, 160ms) var(--ease-out-expo, ease);
}

.aura-kpi--link { cursor: pointer; transition: transform var(--motion-fast, 160ms) var(--ease-out-expo, ease), box-shadow var(--motion-fast, 160ms) ease; }
.aura-kpi--link:hover,
.aura-kpi--link:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 30px color-mix(in srgb, var(--kpi-ink) 25%, transparent); }
.aura-kpi--link:hover .aura-kpi-cta,
.aura-kpi--link:focus-visible .aura-kpi-cta { opacity: 1; transform: none; }
.aura-kpi--link:active { transform: translateY(-1px) scale(0.99); }
.aura-kpi--link:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
/* Écrans tactiles : le lien reste visible (pas de survol) */
@media (hover: none) { .aura-kpi-cta { opacity: 1; transform: none; } }

.aura-kpi.is-current { outline: 3px solid var(--kpi-ink); outline-offset: 2px; }
.aura-kpi.is-current .aura-kpi-cta { opacity: 1; transform: none; }
.aura-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 14px; }

@media (prefers-reduced-motion: reduce) {
  .aura-kpi--link, .aura-kpi-cta { transition: none; }
  .aura-kpi--link:hover, .aura-kpi--link:focus-visible { transform: none; }
}

/* ===== Recouvrement : fiche dossier, agenda, chronologie, formulaire de relance ===== */
.rcv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.rcv-aside { position: sticky; top: 16px; }
@media (max-width: 1100px) { .rcv-layout { grid-template-columns: 1fr; } .rcv-aside { position: static; } }

.rcv-form { display: flex; flex-direction: column; gap: 4px; }
.rcv-form .form-group { margin-bottom: 10px; }
.rcv-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .rcv-form-row { grid-template-columns: 1fr; } }
.rcv-toggle { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 700; color: var(--navy); margin: 4px 0 10px; cursor: pointer; min-height: 32px; }
.rcv-toggle input { width: 18px; height: 18px; accent-color: var(--navy); }

.rcv-agenda { list-style: none; margin: 0; padding: 0; }
.rcv-agenda-item { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 24px; border-bottom: 1px solid #f1f5f9; border-left: 4px solid transparent; }
.rcv-agenda-item:last-child { border-bottom: 0; }
.rcv-agenda-item--broken { border-left-color: var(--crimson); background: #fff7f8; }
.rcv-agenda-item--promise_today { border-left-color: var(--emerald); }
.rcv-agenda-item--follow_up { border-left-color: var(--gold); }
.rcv-agenda-kind { font-size: .8rem; font-weight: 800; color: var(--navy); }
.rcv-agenda-main a { color: var(--navy); }
.rcv-agenda-detail { display: block; font-size: .8rem; color: #64748b; margin-top: 2px; }
.rcv-agenda-phone { font-size: .82rem; font-weight: 700; color: #475569; white-space: nowrap; }
.rcv-agenda-btn { padding: 6px 12px; font-size: .78rem; }
@media (max-width: 760px) {
  .rcv-agenda-item { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .rcv-agenda-btn { justify-self: start; }
}

.rcv-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.rcv-timeline::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: #e2e8f0; }
.rcv-timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.rcv-timeline li:last-child { padding-bottom: 0; }
.rcv-timeline-dot { position: relative; z-index: 1; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid #e2e8f0; display: grid; place-items: center; font-size: .95rem; }
.rcv-timeline-body { flex: 1; min-width: 0; background: #f8fafc; border: 1px solid #edf2f7; border-radius: 12px; padding: 12px 14px; }
.rcv-timeline-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .86rem; color: var(--navy); }
.rcv-timeline-head span { font-size: .76rem; color: #64748b; }

/* ===== Application & caches (superadmin) ===== */
.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; align-items: start; }
.sys-card { padding: 22px; background: #fff; }
.sys-card--wide { grid-column: 1 / -1; }
.sys-title { font-size: 1.05rem; font-weight: 900; color: var(--navy); margin: 0 0 6px; }
.sys-text { font-size: .84rem; color: #64748b; margin: 0 0 16px; line-height: 1.5; }
.sys-note { font-size: .8rem; color: #b45309; background: var(--amber-light); border-radius: 10px; padding: 8px 12px; margin: 14px 0 0; }
.sys-actions { display: flex; flex-direction: column; gap: 10px; }
.sys-action { display: flex; gap: 14px; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: var(--surface-alt); }
.sys-action div { min-width: 0; }
.sys-action strong { display: block; font-size: .9rem; color: var(--navy); }
.sys-action span { display: block; font-size: .78rem; color: #64748b; line-height: 1.45; margin-top: 2px; }
.sys-action .btn { flex-shrink: 0; padding: 9px 16px; font-size: .85rem; }
.sys-action--strong { border-color: var(--navy-light); background: var(--blue-light); }
@media (max-width: 520px) { .sys-action { flex-direction: column; align-items: stretch; } }
.sys-checks { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.sys-checks li { font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 5px 12px; }
.sys-checks--stack { flex-direction: column; margin: 0; }
.sys-checks--stack li { border-radius: 12px; padding: 10px 14px; font-weight: 400; border-left: 4px solid transparent; }
.sys-checks--stack strong { display: block; font-size: .86rem; color: var(--navy); }
.sys-checks--stack span { font-size: .78rem; color: #64748b; }
.sys-checks .is-ok { background: var(--emerald-light); color: var(--emerald); border-left-color: var(--emerald); }
.sys-checks .is-warn { background: var(--amber-light); color: #b45309; border-left-color: var(--amber); }
.sys-links { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .84rem; }
.sys-links a { color: var(--blue); font-weight: 700; }
.sys-platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 18px; }
.sys-platform { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: #64748b; }
.sys-platform strong { color: var(--navy); font-size: .9rem; }
.sys-platform-icon { font-size: 1.3rem; }
.sys-bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding: 0 2px; border-bottom: 2px solid var(--border); }
.sys-bar { flex: 1; min-width: 3px; height: max(var(--h), 3px); background: linear-gradient(180deg, var(--gold), var(--gold-dark)); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: sys-grow .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes sys-grow { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .sys-bar { animation: none; } }
.sys-bars-legend { display: flex; justify-content: space-between; font-size: .74rem; color: #94a3b8; margin-top: 6px; }
.sys-history { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: .84rem; }
.sys-history:last-child { border-bottom: 0; }
.sys-history strong { color: var(--navy); }
.sys-history span { font-size: .76rem; color: #64748b; }

/* ===== Pages d'accès premium (connexion, mot de passe oublié, réinitialisation) =====
   Écran unique : ni en-tête, ni pied de page (body.is-bare), tout tient dans la hauteur visible.
   Les espacements suivent la hauteur de l'écran (vh) ; le décoratif s'efface sur les écrans bas. */
body.is-bare { padding-bottom: 0; min-height: 100dvh; }
.auth-split { min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: clamp(10px, 2.5vh, 28px) 20px; background:
  radial-gradient(circle at 12% 8%, rgba(245, 181, 27, .12), transparent 38%),
  radial-gradient(circle at 92% 92%, rgba(8, 117, 209, .12), transparent 42%), var(--bg); }
.auth-split-frame { width: 100%; max-width: 1120px; height: min(760px, calc(100dvh - 2 * clamp(10px, 2.5vh, 28px)));
  display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; border-radius: 28px; overflow: hidden; border: 1px solid #e6edf5;
  box-shadow: 0 40px 90px -30px rgba(3, 29, 59, .35), 0 10px 30px rgba(3, 29, 59, .08);
  animation: auth-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(18px) scale(.99); } }

/* Panneau de marque */
.auth-brand { position: relative; overflow: hidden; color: #fff; padding: clamp(24px, 5vh, 44px) clamp(28px, 3.5vw, 48px);
  display: flex; flex-direction: column; gap: clamp(16px, 3.5vh, 30px);
  background: radial-gradient(circle at 85% 12%, rgba(245, 181, 27, .22), transparent 42%), linear-gradient(150deg, #031d3b 0%, #062b55 55%, #0b477f 100%); }
.auth-brand::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.3px); background-size: 24px 24px; pointer-events: none; }
.auth-brand-arcs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.auth-brand > :not(.auth-brand-arcs) { position: relative; }
.auth-brand-logo { display: inline-block; align-self: flex-start; border-radius: 10px; }
.auth-brand-logo:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.auth-brand-logo img { height: clamp(48px, 7vh, 64px); width: auto; display: block; }
.auth-brand-body h2 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.15; font-weight: 900; letter-spacing: -.02em; margin: 0 0 clamp(12px, 2.5vh, 22px); color: #fff; max-width: 420px; }
.auth-brand-points { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(8px, 1.5vh, 12px); }
.auth-brand-points li { display: flex; align-items: center; gap: 12px; font-size: .95rem; color: #d8e7f6; line-height: 1.4; }
.auth-brand-points li span { flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.05rem;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); }
.auth-brand-preview { margin-top: auto; max-width: 340px; background: rgba(255, 255, 255, .97); color: var(--navy); border-radius: 18px; padding: 16px 20px;
  box-shadow: 0 24px 50px rgba(0, 8, 20, .35); transform: rotate(-2deg); animation: auth-float 6s ease-in-out infinite; }
@keyframes auth-float { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-6px); } }
.auth-preview-head { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: #64748b; font-weight: 600; }
.auth-preview-badge { background: var(--emerald-light); color: var(--emerald); border-radius: 999px; padding: 3px 9px; font-weight: 800; font-size: .72rem; }
.auth-brand-preview strong { display: block; font-size: 1.6rem; font-weight: 900; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.auth-preview-track { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.auth-preview-track span { display: block; height: 100%; width: 65%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-dark)); animation: auth-fill 1.4s cubic-bezier(.2, .8, .2, 1) .4s both; }
@keyframes auth-fill { from { width: 0; } }
.auth-preview-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: .8rem; color: #64748b; }
.auth-preview-foot b { color: var(--navy); }
.auth-brand-trust { margin: 0; font-size: .8rem; color: #93b5d8; }

/* Panneau du formulaire (défile seul en dernier recours, sur un écran minuscule) */
.auth-panel { display: flex; align-items: center; justify-content: center; padding: clamp(18px, 4vh, 44px) clamp(24px, 4vw, 52px); overflow-y: auto; }
.auth-panel-inner { width: 100%; max-width: 400px; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-dark); background: var(--gold-bg); border: 1px solid #f6e3b0; border-radius: 999px; padding: 5px 12px; }
.auth-heading { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 900; color: var(--navy); letter-spacing: -.02em; margin: clamp(8px, 1.6vh, 14px) 0 6px; }
.auth-panel-lead { color: #64748b; font-size: .95rem; line-height: 1.5; margin: 0 0 clamp(12px, 2.5vh, 24px); }
.auth-alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 14px; margin-bottom: clamp(10px, 2vh, 18px); font-size: .86rem; line-height: 1.45;
  background: var(--crimson-light); border: 1px solid var(--crimson-border); color: #9f1d2b; animation: auth-shake .4s ease both; }
.auth-alert--ok { background: var(--emerald-light); border-color: var(--emerald-border); color: #06684c; animation: none; }
@keyframes auth-shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.auth-form { display: flex; flex-direction: column; gap: clamp(10px, 2vh, 18px); }
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.auth-label { font-size: .86rem; font-weight: 800; color: var(--navy); }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input > svg { position: absolute; left: 15px; width: 20px; height: 20px; color: #94a3b8; pointer-events: none; transition: color .2s ease; }
.auth-input input { width: 100%; min-height: clamp(46px, 6.4vh, 54px); padding: 10px 52px 10px 46px; font-size: 16px; /* 16 px : pas de zoom automatique sur iPhone */
  font-family: inherit; color: var(--text-main); background: var(--surface-alt); border: 1.5px solid var(--border); border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.auth-input input::placeholder { color: #a6b4c4; }
.auth-input input:hover { border-color: #cbd5e1; }
.auth-input input:focus { outline: none; background: #fff; border-color: var(--navy-light); box-shadow: 0 0 0 4px rgba(11, 71, 127, .12); }
.auth-input:focus-within > svg { color: var(--navy-light); }
.auth-input input[aria-invalid="true"] { border-color: var(--crimson); background: #fffafb; }
.auth-eye { position: absolute; right: 4px; width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: #64748b; display: grid; place-items: center; }
.auth-eye svg { width: 21px; height: 21px; }
.auth-eye:hover { background: #eef2f7; color: var(--navy); }
.auth-eye:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.auth-hint { margin: 0; font-size: .78rem; }
.auth-hint--warn { color: #b45309; font-weight: 700; }
.auth-link--small { font-size: .82rem; }
.auth-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: .9rem; color: #334155; font-weight: 600; min-height: 44px; user-select: none; }
.auth-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.auth-switch-track { position: relative; flex-shrink: 0; width: 44px; height: 26px; border-radius: 999px; background: #cbd5e1; transition: background .2s ease; }
.auth-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(3, 29, 59, .25); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.auth-switch input:checked + .auth-switch-track { background: var(--navy); }
.auth-switch input:checked + .auth-switch-track::after { transform: translateX(18px); }
.auth-switch input:focus-visible + .auth-switch-track { outline: 3px solid var(--gold); outline-offset: 2px; }
.auth-submit { min-height: clamp(48px, 6.6vh, 56px); border-radius: 14px; font-size: 1.02rem; gap: 10px; }
.auth-submit[disabled] { opacity: .85; cursor: progress; transform: none; }
.auth-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: auth-spin .7s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-rules { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.auth-rules li { font-size: .74rem; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 4px 10px; transition: background .2s ease, color .2s ease; }
.auth-rules li::before { content: "○ "; }
.auth-rules li.is-ok { background: var(--emerald-light); color: var(--emerald); }
.auth-rules li.is-ok::before { content: "✓ "; }
.auth-panel .auth-secure { margin-top: clamp(8px, 1.6vh, 16px); }
.auth-panel-footer { margin-top: clamp(12px, 2.4vh, 24px); padding-top: clamp(10px, 2vh, 18px); border-top: 1px solid #eef2f7; text-align: center; font-size: .88rem; color: #64748b; }
.auth-panel-footer a { margin-left: 4px; }

/* Écrans peu hauts (ordinateurs portables 768 px, téléphones en paysage) : le décoratif s'efface */
@media (max-height: 820px) { .auth-brand-preview { display: none; } .auth-brand-trust { margin-top: auto; } }
@media (max-height: 700px) { .auth-panel-lead, .auth-eyebrow { display: none; } .auth-heading { margin-top: 0; } }

/* Tablette et mobile : bandeau de marque (logo seul), formulaire en carte remontée */
@media (max-width: 959px) {
  .auth-split { display: block; padding: 0; background: var(--bg); }
  .auth-split-frame { display: flex; flex-direction: column; height: auto; min-height: 100dvh; max-width: none; border-radius: 0; border: 0; box-shadow: none; background: transparent; animation: none; }
  .auth-brand { flex: 0 0 auto; padding: calc(env(safe-area-inset-top, 0px) + clamp(16px, 3vh, 28px)) 20px clamp(52px, 8vh, 72px); align-items: center; text-align: center; gap: 10px; }
  .auth-brand-logo { align-self: center; }
  .auth-brand-logo img { height: clamp(40px, 6vh, 54px); }
  .auth-brand-body h2 { font-size: clamp(1.05rem, 2.6vh, 1.3rem); margin: 0; }
  .auth-brand-points, .auth-brand-preview, .auth-brand-trust { display: none; }
  .auth-panel { flex: 1 0 auto; align-items: flex-start; padding: 0 14px calc(env(safe-area-inset-bottom, 0px) + clamp(12px, 2vh, 24px)); margin-top: calc(-1 * clamp(38px, 6vh, 56px)); overflow: visible; }
  .auth-panel-inner { max-width: 480px; background: #fff; border-radius: 24px; padding: clamp(18px, 3vh, 28px) clamp(18px, 5vw, 26px); border: 1px solid #e6edf5;
    box-shadow: 0 24px 60px -20px rgba(3, 29, 59, .3); animation: auth-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
}
@media (max-width: 959px) and (max-height: 740px) {
  .auth-brand-body { display: none; }
  .auth-panel-lead, .auth-eyebrow { display: none; }
  .auth-heading { margin-top: 0; font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-split-frame, .auth-panel-inner, .auth-brand-preview, .auth-preview-track span, .auth-alert { animation: none; }
}

/* ===== Rapports du portefeuille ===== */
.rpt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.rpt-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rpt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.rpt-card { padding: 22px; background: #fff; min-width: 0; }
.rpt-card--wide { grid-column: 1 / -1; }
@media (max-width: 1100px) { .rpt-grid { grid-template-columns: 1fr; } }
.rpt-title { font-size: 1.08rem; font-weight: 900; color: var(--navy); margin: 0 0 4px; }
.rpt-text { font-size: .84rem; color: #64748b; margin: 0 0 16px; }
.rpt-b-current { --c: var(--emerald); } .rpt-b-d1_30 { --c: var(--gold); } .rpt-b-d31_60 { --c: #f97316; } .rpt-b-d61_90 { --c: var(--crimson); } .rpt-b-d90 { --c: var(--purple); }
.rpt-stack { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: #eef2f7; margin-bottom: 16px; }
.rpt-stack-seg { width: var(--w); background: var(--c); transform-origin: left; animation: rpt-grow .9s cubic-bezier(.2, .8, .2, 1) both; }
.rpt-stack-empty { margin: auto; font-size: .74rem; color: #94a3b8; }
.rpt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 8px; vertical-align: 0; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.rpt-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: #64748b; padding: 10px 12px; border-bottom: 2px solid #e2e8f0; }
.rpt-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; color: var(--text-main); }
.rpt-table td:first-child { white-space: nowrap; }
.rpt-table tfoot td { font-weight: 800; color: var(--navy); border-bottom: 0; border-top: 2px solid #e2e8f0; }
.rpt-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rpt-table--rows th:first-child, .rpt-table--rows td:first-child { padding-left: 22px; }
.rpt-table--rows th:last-child, .rpt-table--rows td:last-child { padding-right: 22px; }
.rpt-ref { font-family: var(--font-mono); font-weight: 800; color: var(--navy); }
.rpt-days { display: inline-block; font-weight: 800; font-size: .78rem; color: #fff; background: var(--c); border-radius: 999px; padding: 3px 10px; }
.rpt-products { display: flex; flex-direction: column; gap: 14px; }
.rpt-product-head, .rpt-product-foot { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; }
.rpt-product-head strong { color: var(--navy); }
.rpt-product-head span { font-weight: 800; font-variant-numeric: tabular-nums; }
.rpt-product-foot { font-size: .76rem; color: #64748b; margin-top: 6px; }
.rpt-product-foot .is-ok { color: var(--emerald); font-weight: 800; } .rpt-product-foot .is-warn { color: #b45309; font-weight: 800; } .rpt-product-foot .is-bad { color: var(--crimson); font-weight: 800; }
.rpt-bar { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin-top: 6px; }
.rpt-bar span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--navy-light), var(--navy)); transform-origin: left; animation: rpt-grow .9s cubic-bezier(.2, .8, .2, 1) both; }
.rpt-legend { display: flex; gap: 16px; font-size: .78rem; color: #475569; margin: 6px 0 14px; }
.rpt-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rpt-sw--out, .rpt-flow-out { background: var(--navy-light); } .rpt-sw--in, .rpt-flow-in { background: var(--gold); }
.rpt-flows { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; }
.rpt-flow { display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: 8px; outline-offset: 2px; }
.rpt-flow:focus-visible { outline: 3px solid var(--gold); }
.rpt-flow-bars { display: flex; align-items: flex-end; gap: 2px; height: 150px; width: 100%; justify-content: center; }
.rpt-flow-bars span { width: 42%; max-width: 14px; height: max(var(--h), 2px); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: rpt-rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.rpt-flow-label { font-size: .66rem; color: #94a3b8; white-space: nowrap; }
@media (max-width: 560px) { .rpt-flow-label { writing-mode: vertical-rl; transform: rotate(180deg); } .rpt-flow-bars { height: 120px; } }
@keyframes rpt-grow { from { transform: scaleX(0); } }
@keyframes rpt-rise { from { transform: scaleY(0); } }
.rpt-defs dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: .86rem; }
.rpt-defs dt { font-weight: 800; color: var(--navy); }
.rpt-defs dd { margin: 0; color: #475569; line-height: 1.5; }
@media (max-width: 640px) { .rpt-defs dl { grid-template-columns: 1fr; } .rpt-defs dd { margin-bottom: 8px; } }
@media (prefers-reduced-motion: reduce) { .rpt-stack-seg, .rpt-bar span, .rpt-flow-bars span { animation: none; } }
/* Impression (dossier pour la direction ou la BCC) : seul le rapport */
@media print {
  .admin-sidebar, .admin-topbar, .admin-flash, .rpt-actions, .demo-role-bar { display: none !important; }
  .admin-main, .admin-content { margin: 0 !important; padding: 0 !important; }
  .rpt-grid { grid-template-columns: 1fr 1fr; }
  .rpt-card { break-inside: avoid; box-shadow: none !important; border: 1px solid #e2e8f0; }
}

/* ===== En-tête des pages publiques (produits, simulateur, demande, documents) =====
   Badge, titre, introduction et repères sur un même axe centré, quelle que soit la largeur. */
.text-center { text-align: center; }
.page-hero { position: relative; overflow: hidden; color: #fff; text-align: center; padding: clamp(40px, 7vw, 72px) 20px clamp(36px, 6vw, 60px);
  border-bottom: 3px solid var(--gold);
  background: radial-gradient(circle at 82% 0%, rgba(245, 181, 27, .2), transparent 42%), radial-gradient(circle at 10% 110%, rgba(8, 117, 209, .28), transparent 45%),
    linear-gradient(150deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%); }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.3px); background-size: 24px 24px; pointer-events: none; }
.page-hero-arcs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.page-hero-inner { position: relative; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.page-hero-eyebrow { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-light); background: rgba(245, 181, 27, .14); border: 1px solid rgba(245, 181, 27, .38); border-radius: 999px; padding: 6px 14px; margin-bottom: 18px; }
.page-hero-title { font-size: clamp(1.75rem, 4.2vw, 2.85rem); line-height: 1.12; font-weight: 900; letter-spacing: -.02em; color: #fff; margin: 0 0 14px; text-wrap: balance; }
.page-hero-lead { font-size: clamp(.98rem, 1.6vw, 1.1rem); line-height: 1.6; color: #c3d6ea; max-width: 680px; margin: 0; text-wrap: pretty; }
.page-hero-points { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.page-hero-points li { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: #e6eff8;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 7px 14px; }
.aura-js .page-hero-inner > * { animation: hero-in .7s cubic-bezier(.2, .8, .2, 1) both; }
.aura-js .page-hero-inner > :nth-child(2) { animation-delay: .06s; }
.aura-js .page-hero-inner > :nth-child(3) { animation-delay: .12s; }
.aura-js .page-hero-inner > :nth-child(4) { animation-delay: .18s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .aura-js .page-hero-inner > * { animation: none; } }
@media (max-width: 480px) { .page-hero-points li { font-size: .78rem; padding: 6px 12px; } }
