/* ─── Police : Trebuchet MS (police système, aucun fichier à charger) ──── */
:root {
  --brand: #284799;       /* bleu marine du logo */
  --brand-dark: #0e003e;  /* fond indigo (logo fond bleu) */
  --brand-light: #5fa8ec; /* bleu ciel de la goutte */
  --font-display: 'Trebuchet MS', 'Segoe UI', Verdana, sans-serif;
  --font-body: 'Trebuchet MS', 'Segoe UI', Verdana, sans-serif;
}

body {
  background-color: #f4f7fb;
  background-image: url('../images/background-pattern.png');
  background-repeat: repeat;
  font-family: var(--font-body);
  color: #1a2238;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand, .public-topbar-brand,
.hero-title, .btn, .step-eyebrow, .service-card-title,
.kpi-value, .card-app h4, .card-app h5, .card-app h6 {
  font-family: var(--font-display);
}

h4 { font-weight: 700; letter-spacing: -0.01em; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.bg-brand { background-color: var(--brand-dark) !important; }

/* Aligner Bootstrap sur la couleur de marque réelle (logo) plutôt que le bleu par défaut */
.btn-primary {
  background-color: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(40,71,153,0.28);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(14,0,62,0.32);
}
.btn-outline-primary {
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline-primary:hover {
  background-color: var(--brand);
  border-color: var(--brand);
}
.text-primary { color: var(--brand) !important; }
a { color: var(--brand); }
.btn-check:checked + .btn-outline-secondary,
.btn-check:checked + .btn-outline-primary {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.card-app {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(20,30,60,0.06);
  transition: box-shadow .18s ease, transform .18s ease;
}

.card-app:hover {
  box-shadow: 0 8px 24px rgba(20,30,60,0.10);
}

.kpi-value { font-size: 1.9rem; font-weight: 700; }

.auth-card {
  max-width: 460px;
  margin: 50px auto;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.badge { font-weight: 500; }

.tarifs-table thead th {
  background: #eaf1fd;
  color: var(--brand);
  font-size: 0.8rem;
  vertical-align: middle;
}
.tarifs-table thead th i { font-size: 1.1rem; }
.tarifs-table td, .tarifs-table th { font-size: 0.85rem; }

.app-logo { height: 64px; width: auto; }

/* ─── Hero (bandeau d'accueil) ───────────────────────────────────────── */
.hero-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(14,0,62,0.94) 0%, rgba(40,71,153,0.88) 100%),
    url('../images/services/fuite-canalisation.jpg');
  background-size: cover;
  background-position: center 30%;
  border-radius: 24px 24px 0 0;
  padding: 64px 32px 84px;
  margin-bottom: 0;
  color: #fff;
  text-align: center;
  animation: heroReveal .7s ease-out both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(95,168,236,0.35) 0%, rgba(95,168,236,0) 70%);
  border-radius: 50%;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(95,168,236,0.2) 0%, rgba(95,168,236,0) 70%);
  border-radius: 50%;
}

/* Vague signature : transition eau entre le hero et le contenu */
.hero-wave {
  position: relative;
  margin-top: -40px;
  margin-bottom: 32px;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 44px; display: block; }
.hero-wave path { fill: #f4f7fb; }
.hero-content { position: relative; z-index: 1; }
.hero-logo { height: 56px; width: auto; margin-bottom: 16px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.25)); }
.hero-title { font-weight: 800; font-size: 2.1rem; margin-bottom: 6px; letter-spacing: -0.01em; }
.hero-subtitle { color: rgba(255,255,255,0.88); font-size: 1.05rem; margin-bottom: 0; }

/* Variante hero deux colonnes (accueil) */
.hero-split { text-align: left; padding: 48px 32px 84px; }
.hero-title-split {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 18px 0 14px;
}
.hero-split .hero-subtitle { max-width: 46ch; }
.hero-split .hero-badge { margin-top: 0; }

.hero-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  color: #fff;
}
.hero-stat-card:last-child { margin-bottom: 0; }
.hero-stat-card i { font-size: 1.3rem; color: var(--brand-light); margin-top: 2px; }
.hero-stat-card .small { color: rgba(255,255,255,0.72); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  margin-top: 18px;
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.hero-trust-item .bi { color: var(--brand-light); }

/* ─── Onglets d'étape (navigation visuelle 01/02/03) ─────────────────── */
.step-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0 20px;
  flex-wrap: wrap;
}
.step-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.step-tab:hover { border-color: var(--brand); color: var(--brand); }
.step-tab-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand);
  font-size: 0.78rem;
}

/* ─── Grille formulaire principal + panneau récapitulatif ────────────── */
.demande-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.demande-main { min-width: 0; }
@media (min-width: 992px) {
  .demande-grid { flex-direction: row; align-items: flex-start; }
  .demande-main { flex: 1 1 auto; }
  .demande-sidebar { flex: 0 0 320px; width: 320px; position: sticky; top: 20px; }
}

.recap-card {
  background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand) 100%);
  border-radius: 16px;
  padding: 22px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(14,0,62,0.25);
}
.recap-eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
}
.recap-list { margin: 0 0 16px; }
.recap-list > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem;
}
.recap-list dt { color: rgba(255,255,255,0.6); font-weight: 400; }
.recap-list dd { margin: 0; font-weight: 600; text-align: right; }

.recap-estimation {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  margin-bottom: 4px;
}
.recap-estimation-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  margin: 2px 0;
}

.recap-trust {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: #475569;
}
.recap-trust li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.recap-trust i { color: var(--brand); margin-top: 2px; }

/* ─── Sélecteur de niveau d'urgence ───────────────────────────────────── */
.urgence-group { display: flex; flex-wrap: wrap; gap: 8px; }
.urgence-radio {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.urgence-pill {
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.urgence-badge { font-size: 0.72rem; opacity: 0.7; }
.urgence-radio:checked + .urgence-pill {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.urgence-radio:focus-visible + .urgence-pill { outline: 2px solid var(--brand); outline-offset: 2px; }
.public-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e9f0;
  margin-bottom: 24px;
}

.public-topbar-brand { color: var(--brand); font-size: 1.05rem; }

/* ─── Formulaire de demande : étapes ──────────────────────────────────── */
.step-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: #eaf1fd;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ─── Pied de page ────────────────────────────────────────────────────── */
.footer-wave {
  margin-top: 40px;
  line-height: 0;
  transform: rotate(180deg);
}
.footer-wave svg { width: 100%; height: 32px; display: block; }
.footer-wave path { fill: var(--brand-dark); }

.site-footer {
  background: var(--brand-dark);
  color: rgba(255,255,255,0.6);
  margin-top: -1px;
}

/* ─── Cartes de sélection de service (image + légende) ──────────────────── */
.service-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.service-card {
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.service-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(20,30,60,0.14);
}

.service-card-img {
  display: block;
  width: 100%;
  height: 0;
  padding-top: 75%; /* ratio 4:3, compatible avec anciens navigateurs (pas d'aspect-ratio requis) */
  background-size: cover;
  background-position: center;
  background-color: #dbeafe;
  transition: transform .35s ease;
}

.service-card:hover .service-card-img { transform: scale(1.06); }

.service-card-body {
  display: block;
  padding: 10px 12px 12px;
}

.service-card-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: #1f2937;
}

.service-card-desc {
  display: block;
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 2px;
}

.service-card-price {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  background: #eaf1fd;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 6px;
}

/* ─── Cartes de sélection du profil client ───────────────────────────── */
.segment-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.segment-card {
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 12px 6px;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.2;
  transition: border-color .15s ease, background-color .15s ease;
}

.segment-card .bi { font-size: 1.3rem; color: var(--brand); }

.segment-card:hover { border-color: var(--brand); }

.segment-radio:checked + .segment-card {
  border-color: var(--brand);
  background: #eaf1fd;
}

.segment-radio:focus-visible + .segment-card {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.service-radio:checked + .service-card {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.15);
}

.service-radio:checked + .service-card .service-card-title { color: var(--brand); }

.service-radio:focus-visible + .service-card {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
