/*
Theme Name: DAT-Elec
Theme URI: https://dat-elec.be
Author: Kevin Baeck
Description: Thème one-page ultra-léger pour DAT-Elec, électricien agréé en Belgique
Version: 1.0
License: Proprietary
Text Domain: dat-elec
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --red:       #C0392B;
  --red-dark:  #9B2D23;
  --blue:      #1F3A8F;
  --blue-dark: #162A6B;
  --cream:     #F8F6F2;
  --white:     #FFFFFF;
  --dark:      #0F1826;
  --text:      #1C1C2E;
  --muted:     #6B7280;
  --border:    #E5E1D8;
  /* Surfaces : fonds de page et de sections. Séparés de --white/--cream
     parce que ces deux-là servent aussi de couleur de TEXTE (boutons, footer).
     Réglables depuis Apparence → Personnaliser → Couleurs du site. */
  --surface:     var(--white);
  --surface-alt: var(--cream);
  --radius:    8px;
  --shadow:    0 4px 24px rgba(0,0,0,0.10);
  --transition: 0.25s ease;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

/* Anti double-tap zoom iOS Safari — sur tous les éléments interactifs */
a, button, input, select, textarea, label, [role="button"] {
  touch-action: manipulation;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

section { scroll-margin-top: 92px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }

.section-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
  color: var(--blue);
}

.section-sub {
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 48px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(192,57,43,0.3); }

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: rgba(31,58,143,0.35);
}
.btn-outline:hover { background: rgba(31,58,143,0.06); border-color: var(--blue); }

.btn-urgence {
  background: var(--red);
  color: var(--white);
  padding: 10px 20px;
  font-size: 0.85rem;
  border-radius: 50px;
  animation: pulse-red 2s infinite;
}
.btn-urgence:hover { background: var(--red-dark); animation: none; transform: scale(1.04); }

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

#site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.10); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 32px;
  overflow: hidden;
}

.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  order: 3;
}

.site-logo img { height: 64px; width: auto; max-width: 210px; object-fit: contain; }

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

.site-nav { display: flex; align-items: center; gap: 4px; order: 1; margin-right: auto; }

.site-nav a {
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.site-nav a:hover, .site-nav a.active { background: var(--surface-alt); color: var(--blue); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Texte mobile du bouton urgence — caché sur desktop */
.btn-urgence-mobile { display: none; }

/* Mobile nav */
@media (max-width: 900px) {
  /* Header réduit pour ne pas couper le logo */
  .header-inner {
    height: 64px;
    gap: 8px;
  }

  .site-logo img {
    height: 40px;
  }

  .site-nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 20px 24px 32px;
    border-bottom: 1px solid var(--border);
    /* Fermé : entièrement au-dessus de l'écran (sa hauteur + celle de l'en-tête)
       et masqué. Avec -110 %, le bas du panneau (26 px) restait visible par-dessus
       l'en-tête et coupait le bouton Contacter et le logo (vu le 01/10). */
    transform: translateY(calc(-100% - 64px));
    visibility: hidden;
    transition: transform var(--transition), visibility 0s linear 0.25s;
    gap: 4px;
    align-items: flex-start;
    box-shadow: var(--shadow);
  }
  .site-nav.open { transform: translateY(0); visibility: visible; transition: transform var(--transition); }
  .site-nav a { width: 100%; padding: 12px 16px; font-size: 1rem; }
  .burger { display: flex; }

  /* Bouton urgence : cache le long texte, affiche "Contacter" */
  .btn-urgence-text   { display: none; }
  .btn-urgence-mobile { display: inline; }
  .btn-urgence {
    padding: 8px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

/* Halo rouge discret, côté texte */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 40%, rgba(192,57,43,0.07) 0%, transparent 42%);
  pointer-events: none;
}

/* Trame électrique — sombre et très légère sur fond clair */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28,28,46,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,28,46,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Deux colonnes : texte à gauche, visuel à droite, chiffres en pleine largeur */
.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  grid-template-areas:
    "content media"
    "stats   stats";
  align-items: center;
  column-gap: 64px;
  row-gap: 0;
}

.hero-content { grid-area: content; max-width: 640px; }
.hero-media   { grid-area: media; }
.hero-stats   { grid-area: stats; }

.hero-media img {
  width: 100%;
  /* 4/5 = format natif de la photo (Dat au micro, 1120×1400) : rien n'est coupé */
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15,24,38,0.16);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(192,57,43,0.10);
  border: 1px solid rgba(192,57,43,0.28);
  color: var(--red-dark);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#hero h1 { color: var(--text); margin-bottom: 20px; }
#hero h1 span { color: var(--red); }

.hero-sub {
  color: #4B5563;
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 560px;
}
.hero-sub strong { color: var(--text); }

/* Adage de Dat, tout en haut du hero (le bloc complet reste plus bas, au-dessus du bandeau mots-clés) */
.hero-adage {
  margin: 0 0 24px;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--text);
}
.hero-adage-mark {
  color: var(--red, #C0392B);
  font-style: normal;
  font-weight: 800;
}
.hero-adage-mark:first-child { margin-right: 0.25em; }
.hero-adage-mark:last-child  { margin-left: 0.25em; }
[data-theme="dark"] .hero-adage      { color: #ffffff; }
[data-theme="dark"] .hero-adage-mark { color: #F87171; }

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.hero-stat .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}

.hero-stat .label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Le visuel passe sous le texte, avant les chiffres */
@media (max-width: 900px) {
  #hero {
    min-height: 0;
    padding: 104px 0 64px;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "content"
      "media"
      "stats";
    row-gap: 40px;
  }

  .hero-content { max-width: none; }
  .hero-media   { max-width: 360px; }
  .hero-media img { aspect-ratio: 4 / 5; }
  .hero-stats   { margin-top: 0; }
}

/* ============================================================
   SERVICES
   ============================================================ */
#services {
  padding: 100px 0;
  background: var(--surface);
}

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

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

.service-card {
  padding: 36px 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(192,57,43,0.12), rgba(31,58,143,0.12));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-icon svg { width: 24px; height: 24px; stroke: var(--blue); }

.service-card h3 { color: var(--blue); margin-bottom: 10px; font-size: 1.1rem; }
.service-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.7; }

/* ============================================================
   RÉALISATIONS
   ============================================================ */
#realisations {
  padding: 100px 0;
  background: var(--surface-alt);
}

/* Grille « masonry » : chaque photo garde son format naturel
   (verticale = haute, horizontale = large), aucune coupure. */
.gallery-grid {
  columns: 3;
  column-gap: 16px;
}

@media (max-width: 768px) { .gallery-grid { columns: 2; } }
@media (max-width: 480px) { .gallery-grid { columns: 1; } }

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #D1D5DB;
  break-inside: avoid;
  margin-bottom: 16px;
}

.gallery-item img {
  width: 100%;
  height: auto;
}

/* Les placeholders (galerie vide) n'ont pas d'image pour donner leur hauteur */
.gallery-item-placeholder { aspect-ratio: 4/3; }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,24,38,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay span {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Placeholder gallery items */
.gallery-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #D1D5DB 0%, #9CA3AF 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6B7280;
}
.gallery-placeholder svg { width: 32px; height: 32px; }
.gallery-placeholder span { font-size: 0.75rem; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 4px; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: none;
  color: white; font-size: 2rem;
  cursor: pointer; line-height: 1;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white; cursor: pointer;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-caption {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

/* ============================================================
   RÉASSURANCE (Pourquoi nous)
   ============================================================ */
#reassurance {
  padding: 100px 0;
  background: var(--blue);
  color: var(--white);
}

#reassurance .section-title { color: var(--white); }
#reassurance .section-label { color: rgba(255,255,255,0.6); }

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

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

.reassurance-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 24px 22px;
  transition: background var(--transition), border-color var(--transition);
}
.reassurance-item:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }

.reassurance-num {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
}

.reassurance-item h3 { color: var(--white); margin-bottom: 8px; font-size: 1.05rem; }
.reassurance-item p { color: rgba(255,255,255,0.7); font-size: 0.9rem; line-height: 1.7; }

/* ============================================================
   PROCESSUS — FRISE A→Z
   ============================================================ */
#processus {
  padding: 100px 0;
  background: var(--surface-alt);
}

.timeline {
  position: relative;
  max-width: 780px;
  margin-top: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  display: flex;
  gap: 24px;
  padding-bottom: 32px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--blue);
}
.timeline-item:first-child .timeline-marker,
.timeline-item:last-child .timeline-marker { border-color: var(--red); color: var(--red); }

.timeline-body h3 { color: var(--blue); font-size: 1.05rem; margin-bottom: 6px; }
.timeline-body p { color: var(--muted); font-size: 0.9rem; line-height: 1.7; }

[data-theme="dark"] #processus { background: var(--surface-alt); }
[data-theme="dark"] .timeline::before { background: rgba(255,255,255,0.1); }
[data-theme="dark"] .timeline-marker { background: #1e293b; border-color: rgba(255,255,255,0.12); color: #93c5fd; }
[data-theme="dark"] .timeline-item:first-child .timeline-marker,
[data-theme="dark"] .timeline-item:last-child .timeline-marker { border-color: #f87171; color: #f87171; }
[data-theme="dark"] .timeline-body h3 { color: #93c5fd; }
[data-theme="dark"] .timeline-body p { color: #b8c9df; }

/* ============================================================
   TÉMOIGNAGES
   ============================================================ */
#temoignages {
  padding: 100px 0;
  background: var(--surface);
}

.temoignages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

/* 1 seul témoignage : on centre au lieu d'étirer la carte sur toute la largeur.
   Dès 2, la grille auto-fit les place côte à côte. */
.temoignages-grid.is-few {
  max-width: 680px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}
.temoignages-grid.is-few .temoignage-card blockquote { font-size: 1rem; }

.temoignage-card {
  display: flex;
  flex-direction: column; /* auteur calé en bas : photos alignées quel que soit la longueur du texte */
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
}

.stars { color: #F59E0B; font-size: 1rem; margin-bottom: 16px; letter-spacing: 2px; }
.temoignage-card blockquote { font-size: 0.92rem; color: var(--muted); line-height: 1.8; margin-bottom: 24px; font-style: italic; }
.temoignage-author { display: flex; align-items: center; gap: 18px; margin-top: auto; }
.author-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--blue));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 1.6rem;
  overflow: hidden;
  flex-shrink: 0;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.author-name { font-weight: 600; font-size: 0.9rem; }
.author-city { font-size: 0.8rem; color: var(--muted); }

/* Add testimonials placeholder */
.temoignages-placeholder {
  text-align: center;
  padding: 60px;
  background: var(--surface-alt);
  border-radius: 12px;
  border: 2px dashed var(--border);
  color: var(--muted);
}

/* ============================================================
   PRÉSENTATION (À Propos)
   ============================================================ */
#presentation {
  padding: 100px 0;
  background: var(--surface-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; gap: 48px; } }

.about-photo {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: #D1D5DB;
  position: relative;
}

.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: #9CA3AF;
}

.about-tag {
  position: absolute;
  bottom: 24px; left: 24px;
  background: var(--red);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
}

.about-content .section-sub { margin-bottom: 32px; }

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

.about-value {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.about-value-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  background: rgba(192,57,43,0.1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.about-value-icon svg { width: 16px; height: 16px; stroke: var(--red); }
.about-value p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.about-value strong { color: var(--text); }

/* ============================================================
   INFO COMMERCIALE
   ============================================================ */
#info-commerciale {
  padding: 100px 0;
  background: var(--surface);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
/* 4 cartes : la dernière (Zones d'intervention) prend toute la largeur */
.info-grid > .info-card:last-child { grid-column: 1 / -1; }

@media (max-width: 900px) {
  /* 2 colonnes : 4 cartes = 2×2, plus besoin de la pleine largeur */
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid > .info-card:last-child { grid-column: auto; }
}
@media (max-width: 600px) { .info-grid { grid-template-columns: 1fr; } }

.info-card {
  padding: 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.info-card .info-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, rgba(192,57,43,0.1), rgba(31,58,143,0.1));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.info-card .info-icon svg { width: 22px; height: 22px; stroke: var(--blue); }
.info-card h3 { font-size: 0.95rem; color: var(--blue); margin-bottom: 8px; }
.info-card p, .info-card ul li { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }
.info-card ul { padding-left: 0; }
.info-card ul li::before { content: '✓ '; color: var(--red); font-weight: 700; }

.zones-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.zone-tag {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: var(--text);
}

/* ============================================================
   BLOG
   ============================================================ */
/* En-tête du blog — la photo de Volt à gauche du titre.
   Sans fichier images/volt.webp, index.php n'écrit pas l'image et
   l'en-tête reprend simplement sa mise en page habituelle. */
.blog-heading {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 48px;
}

.blog-heading-text .section-label { margin-bottom: 6px; }
.blog-heading-text .section-title { margin-bottom: 12px; }
.blog-heading-text .section-sub   { margin: 0; max-width: 560px; }

/* Portrait de Volt (carré, entier : oreilles et signature du photographe),
   à gauche du bloc titre + intro : un seul ensemble, pas de vide au milieu */
.volt-photo {
  width: 200px;
  max-width: 40%;
  height: auto;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 12px 32px rgba(15,24,38,0.16);
}

@media (max-width: 600px) {
  .blog-heading { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 32px; }
  .volt-photo { width: 100%; max-width: 280px; }
}

#blog {
  padding: 100px 0;
  background: var(--surface-alt);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.blog-card-thumb {
  /* c'est un <a> : sans display:block, aspect-ratio est ignoré et la vignette
     prend la hauteur naturelle de l'image (mesuré : ratio 1,09 au lieu de 1,78). */
  display: block;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--blue), var(--red));
  overflow: hidden;
}
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.blog-card-body { padding: 24px; }
.blog-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 8px;
}
.blog-card-body h3 { font-size: 1rem; margin-bottom: 10px; color: var(--text); line-height: 1.4; }
.blog-card-body p { font-size: 0.85rem; color: var(--muted); line-height: 1.7; margin-bottom: 16px; }
/* .blog-cat est un <p> : sans cette règle, `.blog-card-body p` (plus spécifique)
   écrase le rouge de la charte et la catégorie s'affiche en gris. Mesuré. */
.blog-card-body p.blog-cat { color: var(--red); font-size: 0.75rem; margin-bottom: 8px; }
.blog-link { font-size: 0.85rem; color: var(--blue); font-weight: 600; }
.blog-link:hover { color: var(--red); }

.blog-empty {
  text-align: center;
  padding: 72px 40px;
  background: var(--surface);
  border-radius: 16px;
  border: 2px dashed var(--border);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}
.blog-empty-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  color: var(--blue);
}
.blog-empty-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.blog-empty p {
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto 28px;
}
.blog-empty-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.blog-empty-tags span {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
  background: var(--surface-alt);
  color: var(--blue);
  border: 1px solid var(--border);
  letter-spacing: 0.03em;
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  padding: 100px 0;
  background: var(--dark);
  color: var(--white);
}

#contact .section-title { color: var(--white); }
#contact .section-label { color: rgba(255,255,255,0.5); }
#contact .section-sub { color: rgba(255,255,255,0.65); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}

/* minmax(0, 1fr) et non 1fr : sinon la colonne prend la largeur minimale de son
   contenu (captcha, champs) et la page déborde sur les petits écrans. */
@media (max-width: 768px) { .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } }

.contact-info { display: flex; flex-direction: column; gap: 24px; }

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-item-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.contact-item-icon svg { width: 20px; height: 20px; stroke: rgba(255,255,255,0.8); }
.contact-item-label { font-size: 0.78rem; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.contact-item-value { font-size: 0.95rem; color: var(--white); font-weight: 500; }

/* Form */
.contact-form {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 40px;
}

@media (max-width: 480px) { .contact-form { padding: 24px; } }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
}
.form-group select option { background: var(--dark); color: var(--white); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(192,57,43,0.6);
  background: rgba(255,255,255,0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.3); }

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

.file-upload {
  background: rgba(255,255,255,0.05);
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition);
}
.file-upload:hover { border-color: rgba(192,57,43,0.5); }
.file-upload input[type="file"] { display: none; }
.file-upload-label { cursor: pointer; font-size: 0.85rem; color: rgba(255,255,255,0.55); }
.file-upload-label span { color: var(--white); font-weight: 500; }
.file-upload svg { width: 24px; height: 24px; stroke: rgba(255,255,255,0.4); margin: 0 auto 8px; }

.form-submit { margin-top: 8px; }
.form-submit .btn { width: 100%; justify-content: center; }

.form-notice {
  margin-top: 24px;
  padding: 16px;
  background: rgba(192,57,43,0.15);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  display: none;
}
.form-notice.success { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.3); color: rgba(255,255,255,0.85); display: block; }
.form-notice.error { display: block; }

/* ============================================================
   COOKIE BANNER — Conforme APD Belgique (Décision Mediahuis 2024)
   Règle critique : bouton refuser = même poids visuel qu'accepter
   ============================================================ */
#cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9998;
    background: var(--dark);
    border-top: 2px solid var(--blue);
    padding: 20px 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
    animation: slide-up 0.4s ease;
}

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

#cookie-banner[hidden] { display: none !important; }

.cookie-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.cookie-title {
    font-weight: 700;
    color: var(--white);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.cookie-text p:last-child {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    max-width: 640px;
    line-height: 1.6;
}

.cookie-link {
    color: #93C5FD;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* CRITIQUE APD : les deux boutons ont exactement le même poids visuel */
.cookie-btn {
    padding: 11px 24px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    min-width: 130px;
    text-align: center;
}

/* Refuser : même couleur, même taille, même importance */
.cookie-btn-secondary {
    background: transparent;
    border-color: rgba(255,255,255,0.4);
    color: var(--white);
}
.cookie-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

/* Accepter : même traitement visuel que refuser */
.cookie-btn-primary {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}
.cookie-btn-primary:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
}

@media (max-width: 768px) {
    .cookie-inner { flex-direction: column; gap: 16px; }
    .cookie-actions { width: 100%; }
    .cookie-btn { flex: 1; }
}

/* ============================================================
   RGPD CHECKBOX (formulaire)
   ============================================================ */
.form-rgpd { margin-top: 8px; }

.rgpd-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0;
}

.rgpd-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--red);
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 3px;
}

.rgpd-label span {
    font-size: 0.80rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

.rgpd-label a {
    color: #93C5FD;
    text-decoration: underline;
}

/* ============================================================
   PAGES LÉGALES (mentions légales, confidentialité, cookies)
   ============================================================ */
.legal-page {
    padding: 120px 0 80px;
    min-height: 70vh;
    background: var(--surface-alt);
}

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

.legal-back {
    margin-bottom: 32px;
}

.legal-back a {
    font-size: 0.88rem;
    color: var(--blue);
    font-weight: 600;
}
.legal-back a:hover { color: var(--red); }

.legal-page h1 {
    color: var(--blue);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 8px;
}

.legal-date {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 32px;
}

.legal-intro {
    background: var(--surface);
    border-left: 4px solid var(--blue);
    padding: 20px 24px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 40px;
}
.legal-intro p { color: var(--text); line-height: 1.7; font-size: 0.95rem; }

.legal-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.legal-section h2 {
    color: var(--blue);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.legal-section h3 {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 20px 0 12px;
}

.legal-section p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 12px;
}

.legal-section a { color: var(--blue); text-decoration: underline; }
.legal-section a:hover { color: var(--red); }

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.legal-table th,
.legal-table td {
    padding: 10px 14px;
    text-align: left;
    border: 1px solid var(--border);
    line-height: 1.5;
    vertical-align: top;
}

.legal-table th {
    background: var(--surface-alt);
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    width: 38%;
}

.legal-table td { color: var(--muted); }

/* Mobile : les intitulés en nowrap poussaient le tableau à 439 px sur un écran de 390 */
@media (max-width: 600px) {
    .legal-table th { white-space: normal; }
    .legal-table th, .legal-table td { padding: 8px 10px; overflow-wrap: anywhere; }
}

.legal-list {
    padding-left: 0;
    margin-bottom: 12px;
}

.legal-list li {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.7;
    padding: 4px 0 4px 20px;
    position: relative;
}

.legal-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--red);
    font-weight: 700;
}

.legal-highlight {
    background: rgba(31,58,143,0.06);
    border: 1px solid rgba(31,58,143,0.2);
    border-radius: 8px;
    padding: 20px 24px;
    margin-top: 20px;
}
.legal-highlight p { margin: 0; font-size: 0.88rem; line-height: 1.7; color: var(--text); }
.legal-highlight a { color: var(--blue); font-weight: 600; }

/* ============================================================
   SEO CITIES (invisible visuellement, indexable)
   ============================================================ */
.seo-cities {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ============================================================
   SECTION EXPERTISE (SEO keywords)
   ============================================================ */
#expertise {
  padding: 80px 0;
  background: var(--surface-alt);
}

[data-theme="dark"] #expertise { background: var(--surface-alt); }

/* 5 cartes : grille en 6 unités — 3 cartes de span 2 en haut,
   2 cartes de span 3 en bas. Aucun vide, la grille est pleine. */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.expertise-grid > * { grid-column: span 2; }
.expertise-grid > *:nth-child(n+4) { grid-column: span 3; }

@media (max-width: 900px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .expertise-grid > *,
  .expertise-grid > *:nth-child(n+4) { grid-column: auto; }  /* même spécificité que la règle desktop, sinon span 3 déborde */
  /* 5e carte seule sur sa rangée → pleine largeur */
  .expertise-grid > *:last-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  #expertise { padding: 48px 0; }
  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 28px;
  }
  .expertise-grid > *,
  .expertise-grid > *:nth-child(n+4) { grid-column: auto; }
}

.expertise-block {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
}

@media (max-width: 600px) {
  .expertise-block { padding: 18px; }
}

[data-theme="dark"] .expertise-block {
  background: #0f1e35;
  border-color: rgba(255,255,255,0.07);
}

.expertise-block h3 {
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 12px;
}

[data-theme="dark"] .expertise-block h3 { color: #7fa6f5; }

.expertise-block p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

[data-theme="dark"] .expertise-block p { color: rgba(255,255,255,0.6); }

.expertise-block strong {
  color: var(--text);
  font-weight: 600;
}

[data-theme="dark"] .expertise-block strong { color: rgba(255,255,255,0.85); }

/* Adage / citation */
.adage {
  margin-top: 40px;
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.adage blockquote {
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 600;
  font-style: italic;
  color: var(--blue);
  line-height: 1.4;
  max-width: 760px;
  margin: 0 auto 12px;
}
.adage figcaption {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--red);
}
[data-theme="dark"] .adage blockquote { color: #93c5fd; }
[data-theme="dark"] .adage { border-color: rgba(255,255,255,0.08); }

/* Bandeau mots-clés secondaires */
.keywords-band {
  margin-top: 36px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 2;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 600px) {
  .keywords-band {
    font-size: 0.75rem;
    padding: 14px 16px;
    line-height: 1.9;
    margin-top: 20px;
  }
}

[data-theme="dark"] .keywords-band {
  background: #0f1e35;
  border-color: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.5);
}

.keywords-band strong {
  color: var(--blue);
  font-weight: 500;
}

[data-theme="dark"] .keywords-band strong { color: #7fa6f5; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: #070D18;
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo img { height: 36px; }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.35); }
.footer-copy a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-copy a:hover { color: rgba(255,255,255,0.7); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.78rem; color: rgba(255,255,255,0.35); }
.footer-links a:hover { color: rgba(255,255,255,0.7); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* ============================================================
   DARK MODE — TOGGLE + OVERRIDES
   ============================================================ */

/* Toggle dark/light — pill discret noir/blanc, fixe bas-droite */
.dark-mode-toggle {
  position: fixed !important;
  bottom: 24px;
  right: 24px;
  /* Sous le bandeau cookies (9998) : sinon le bouton recouvrait « Accepter tout »
     sur mobile. Il réapparaît dès que le bandeau est fermé. */
  z-index: 9997;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.theme-switch { cursor: pointer; display: inline-block; }
.theme-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.theme-switch-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 68px;
  height: 34px;
  border-radius: 50px;
  background: #0e1524;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 4px 14px rgba(0,0,0,0.28), inset 0 1px 3px rgba(0,0,0,0.45);
  transition: border-color var(--transition);
}

.theme-switch-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: rgba(255,255,255,0.4);
  transition: color 0.3s ease;
}
.theme-switch-icon svg { width: 15px; height: 15px; }

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 31px;
  height: 28px;
  border-radius: 50px;
  /* Dégradé rouge → bleu du logo DAT-Elec */
  background: linear-gradient(135deg, #C0392B 0%, #8f3555 55%, #1F3A8F 100%);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 1;
}

/* checked = lumière ON = LIGHT : pouce à gauche, soleil actif */
/* décoché  = lumière OFF = DARK : pouce à droite, lune active   */
.theme-switch input:not(:checked) + .theme-switch-track .theme-switch-thumb { transform: translateX(31px); }
.theme-switch input:checked + .theme-switch-track .sun       { color: #fff; }
.theme-switch input:not(:checked) + .theme-switch-track .moon { color: #fff; }
.theme-switch:hover .theme-switch-track { border-color: rgba(192,57,43,0.65); }

/* ============================================================
   FILTRES GALERIE (réalisations)
   ============================================================ */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}
.gallery-filter {
  padding: 8px 18px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.gallery-filter:hover { border-color: var(--red); color: var(--red); }
.gallery-filter.active { background: var(--red); border-color: var(--red); color: #fff; }
.gallery-item.hide { display: none; }

[data-theme="dark"] .gallery-filter { background: #1e293b; border-color: rgba(255,255,255,0.1); color: #e2e8f0; }
[data-theme="dark"] .gallery-filter:hover { border-color: var(--red); color: #fca5a5; }
[data-theme="dark"] .gallery-filter.active { background: var(--red); border-color: var(--red); color: #fff; }

/* --- DARK MODE OVERRIDES --- */
/* Switch ON (checked) = lumière allumée = LIGHT mode  */
/* Switch OFF          = lumière éteinte = DARK mode   */

[data-theme="dark"] {
  --white:  #111827;
  --cream:  #0f172a;
  --surface:     #0b1120;
  --surface-alt: #0f172a;
  --text:   #e2e8f0;
  --muted:  #b8c9df;
  --border: rgba(255,255,255,0.07);
}

[data-theme="dark"] body                    { background: var(--surface); }
[data-theme="dark"] #site-header            { background: rgba(11,17,32,0.97); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .site-nav a             { color: #e2e8f0; }
[data-theme="dark"] .site-nav a:hover,
[data-theme="dark"] .site-nav a.active      { background: rgba(255,255,255,0.07); color: #93c5fd; }
[data-theme="dark"] .section-title          { color: #93c5fd; }
[data-theme="dark"] .section-label          { color: #f87171; }
[data-theme="dark"] .section-sub            { color: #b8c9df; }

/* Services */
[data-theme="dark"] .service-card           { background: #1e293b; border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .service-card h3        { color: #93c5fd; }
[data-theme="dark"] .service-icon           { background: rgba(147,197,253,0.08); }
[data-theme="dark"] .service-icon svg       { stroke: #93c5fd; }

/* Galerie */
[data-theme="dark"] #realisations           { background: var(--surface-alt); }

/* Réassurance — déjà sombre, ajuster légèrement */
[data-theme="dark"] #reassurance            { background: #162032; }

/* Témoignages */
[data-theme="dark"] .temoignage-card        { background: #1e293b; border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .temoignage-card blockquote { color: #b8c9df; }
[data-theme="dark"] .temoignages-placeholder { background: #1e293b; border-color: rgba(255,255,255,0.08); }

/* Présentation */
[data-theme="dark"] #presentation           { background: var(--surface-alt); }
[data-theme="dark"] .about-photo-placeholder { background: #1e293b; }
[data-theme="dark"] .about-value p          { color: #b8c9df; }

/* Info commerciale */
[data-theme="dark"] #info-commerciale       { background: var(--surface); }
[data-theme="dark"] .info-card              { background: #1e293b; border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .info-card h3           { color: #93c5fd; }
[data-theme="dark"] .info-card p,
[data-theme="dark"] .info-card ul li        { color: #b8c9df; }
[data-theme="dark"] .info-card .info-icon   { background: rgba(147,197,253,0.08); }
[data-theme="dark"] .info-card .info-icon svg { stroke: #93c5fd; }
[data-theme="dark"] .zone-tag               { background: #162032; border-color: rgba(255,255,255,0.07); color: #e2e8f0; }

/* Blog */
[data-theme="dark"] #blog                   { background: var(--surface-alt); }
[data-theme="dark"] .volt-photo             { border-color: #1e293b; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
[data-theme="dark"] .blog-card              { background: #1e293b; border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .blog-card-body h3      { color: #e2e8f0; }
[data-theme="dark"] .blog-card-body p       { color: #b8c9df; }
[data-theme="dark"] .blog-empty             { background: #1e293b; border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .blog-empty-icon        { background: #162032; color: #93c5fd; }
[data-theme="dark"] .blog-empty-title       { color: #e2e8f0; }
[data-theme="dark"] .blog-empty-tags span   { background: #162032; color: #93c5fd; border-color: rgba(255,255,255,0.07); }

/* Footer */
[data-theme="dark"] #site-footer            { background: #050c16; }
[data-theme="dark"] .footer-copy            { color: rgba(255,255,255,0.55); }
[data-theme="dark"] .footer-links a         { color: rgba(255,255,255,0.55); }

/* Pages légales */
[data-theme="dark"] .legal-page             { background: var(--surface-alt); }
[data-theme="dark"] .legal-section          { background: #1e293b; border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .legal-section h2       { color: #93c5fd; border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .legal-section p,
[data-theme="dark"] .legal-section ul li    { color: #b8c9df; }
[data-theme="dark"] .legal-table th         { background: #162032; color: #e2e8f0; border-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .legal-table td         { border-color: rgba(255,255,255,0.07); color: #b8c9df; }
[data-theme="dark"] .legal-intro            { background: #162032; border-color: #93c5fd; }
[data-theme="dark"] .legal-highlight        { background: rgba(147,197,253,0.06); border-color: rgba(147,197,253,0.2); }

/* Hero — fond clair en mode clair, il redevient sombre ici via --cream.
   Seules restent à reprendre les couleurs écrites en dur côté clair. */
[data-theme="dark"] #hero h1               { color: #ffffff; }
[data-theme="dark"] #hero h1 span          { color: #F87171; }
[data-theme="dark"] .hero-sub              { color: rgba(255,255,255,0.75); }
[data-theme="dark"] .hero-sub strong       { color: #ffffff; }
[data-theme="dark"] .hero-stat .number     { color: #e2e8f0; }
[data-theme="dark"] .hero-badge {
  background: rgba(192,57,43,0.2);
  border-color: rgba(192,57,43,0.4);
  color: #F87171;
}
[data-theme="dark"] .hero-badge::before    { background: #F87171; }
[data-theme="dark"] .hero-media img        { box-shadow: 0 18px 48px rgba(0,0,0,0.55); }
/* Trame : sombre sur fond clair, claire sur fond sombre */
[data-theme="dark"] #hero::after {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
}
[data-theme="dark"] #hero::before {
  background-image:
    radial-gradient(circle at 12% 40%, rgba(192,57,43,0.12) 0%, transparent 42%);
}

/* Sections à fond TOUJOURS sombre — restaurer texte blanc (--white = #111827 en dark, inutilisable comme texte) */

[data-theme="dark"] .gallery-overlay span  { color: #ffffff; }

/* Réassurance (fond bleu permanent) */
[data-theme="dark"] #reassurance           { color: #e2e8f0; }
[data-theme="dark"] #reassurance .section-title { color: #ffffff; }
[data-theme="dark"] .reassurance-num       { color: #e2e8f0; }
[data-theme="dark"] .reassurance-item h3   { color: #e2e8f0; }

/* Contact (fond sombre permanent) */
[data-theme="dark"] #contact               { color: #e2e8f0; }
[data-theme="dark"] #contact .section-title { color: #ffffff; }
[data-theme="dark"] .contact-item-value    { color: #e2e8f0; }

/* Cookie banner (fond sombre permanent) */
[data-theme="dark"] .cookie-title          { color: #ffffff; }
[data-theme="dark"] .cookie-btn-secondary  { color: #e2e8f0; border-color: rgba(255,255,255,0.5); }
[data-theme="dark"] .cookie-btn-primary    { color: #ffffff; }

/* Boutons (texte sur fond coloré rouge/bleu) */
[data-theme="dark"] .btn-primary           { color: #ffffff; }
[data-theme="dark"] .btn-outline           { color: #e2e8f0; border-color: rgba(255,255,255,0.55); }
[data-theme="dark"] .btn-outline:hover     { background: rgba(255,255,255,0.1); border-color: #ffffff; }
[data-theme="dark"] .btn-urgence           { color: #ffffff; }

/* Transition douce sur tout le site */
body, #site-header, .service-card, .blog-card, .info-card,
.temoignage-card, .legal-section, .legal-page, #blog, #realisations,
#info-commerciale, #presentation, .zone-tag {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

/* ============================================================
   RESPONSIVE MISC
   ============================================================ */
@media (max-width: 900px) {
  section { scroll-margin-top: 64px; }
}

@media (max-width: 768px) {
  section { scroll-margin-top: 64px; }
  .hero-stats { gap: 24px; }
  .contact-form { padding: 24px; }
  .dark-mode-toggle {
    bottom: 16px !important;
    right: 16px !important;
  }
}

/* ============================================================
   ARTICLES DE BLOG — contenu rédactionnel (single.php)
   ============================================================ */
.entry-content > * + * { margin-top: 20px; }
.entry-content h2 {
  font-size: 1.5rem;
  color: var(--blue);
  line-height: 1.3;
  margin-top: 48px;
  scroll-margin-top: 90px;
}
.entry-content h3 { font-size: 1.12rem; color: var(--text); margin-top: 32px; }
.entry-content p, .entry-content li { font-size: 1rem; line-height: 1.8; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content li + li { margin-top: 8px; }
.entry-content strong { color: var(--text); font-weight: 600; }
.entry-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--red); }

/* Chapô */
.entry-content .chapo {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text);
  border-left: 3px solid var(--red);
  padding-left: 18px;
}

/* Tableau (ex. 30 mA / 300 mA par pièce) */
.entry-content .table-wrap { overflow-x: auto; }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 460px;
}
.entry-content th, .entry-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.entry-content th { background: var(--surface-alt); font-weight: 600; color: var(--blue); }

/* Encadré « à retenir » */
.entry-content .encadre {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.entry-content .encadre p + p { margin-top: 10px; }

/* FAQ — le balisage alimente aussi le schema FAQPage (functions.php) */
.entry-content .faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.entry-content .faq-item + .faq-item { margin-top: 12px; }
.entry-content h3.faq-q { margin-top: 0; font-size: 1rem; color: var(--blue); }
.entry-content .faq-a { margin-top: 8px; }
.entry-content .faq-a p { font-size: 0.95rem; }

/* CTA de fin d'article */
.entry-content .article-cta {
  background: var(--blue);
  color: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  margin-top: 48px;
}
.entry-content .article-cta h2 { color: #fff; margin-top: 0; font-size: 1.25rem; }
.entry-content .article-cta p { color: rgba(255,255,255,0.88); margin-top: 10px; }
.entry-content .article-cta a.btn-cta {
  display: inline-block;
  margin-top: 18px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.entry-content .article-cta a.btn-cta:hover { background: var(--red-dark); color: #fff; }

/* Dark mode */
[data-theme="dark"] .entry-content h2 { color: #93c5fd; }
[data-theme="dark"] .entry-content h3 { color: #e2e8f0; }
[data-theme="dark"] .entry-content p,
[data-theme="dark"] .entry-content li { color: #b8c9df; }
[data-theme="dark"] .entry-content strong { color: #e2e8f0; }
[data-theme="dark"] .entry-content a { color: #93c5fd; }
[data-theme="dark"] .entry-content .chapo { color: #cbd5e1; }
[data-theme="dark"] .entry-content th { background: #1e293b; color: #93c5fd; }
[data-theme="dark"] .entry-content th,
[data-theme="dark"] .entry-content td { border-color: rgba(255,255,255,0.10); }
[data-theme="dark"] .entry-content .encadre,
[data-theme="dark"] .entry-content .faq-item {
  background: #1e293b;
  border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .entry-content h3.faq-q { color: #93c5fd; }

@media (max-width: 768px) {
  .entry-content h2 { font-size: 1.3rem; margin-top: 36px; }
  .entry-content .article-cta { padding: 24px; }
}

/* ============================================================
   FIL D'ARIANE
   ============================================================ */
.fil-ariane { margin-bottom: 32px; }
.fil-ariane ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
}
.fil-ariane li { display: flex; align-items: center; gap: 8px; }
.fil-ariane li + li::before {
  content: "›";
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}
.fil-ariane a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.fil-ariane a:hover { color: var(--red); border-bottom-color: currentColor; }
.fil-ariane a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
/* page courante : jamais un lien, et tronquée si le titre est long */
.fil-ariane [aria-current="page"] {
  color: var(--muted);
  max-width: 46ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="dark"] .fil-ariane a { color: #93c5fd; }
[data-theme="dark"] .fil-ariane a:hover { color: #f0a8a0; }
[data-theme="dark"] .fil-ariane [aria-current="page"],
[data-theme="dark"] .fil-ariane li + li::before { color: #94a3b8; }

@media (max-width: 600px) {
  .fil-ariane { margin-bottom: 24px; }
  .fil-ariane [aria-current="page"] { max-width: 22ch; }
}

/* Widget Turnstile dans le formulaire de contact */
.form-turnstile { display: flex; justify-content: flex-start; }
.form-turnstile:empty { display: none; }
@media (max-width: 400px) {
  .form-turnstile { transform: scale(0.92); transform-origin: left center; }
}
