/* style.css */
:root {
  --primary: #1C3A7A;
  --secondary: #0E2A57;
  --accent: #13C161;
  --text-light: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: .5rem 1rem;
  z-index: 100;
  border-radius: 0 0 4px 0;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0; /* visible uniquement quand on navigue au clavier */
}


/* NAVIGATION FIXE */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(28, 58, 122, 0.95);
  padding: 0.6rem 1rem;
  z-index: 1000;
}
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
  gap: 0; /* ❌ on supprime le gap pour gérer l’espace manuellement */
}

nav ul li {
  position: relative;
  padding: 0 0.8rem; /* ✅ espace égal de chaque côté */
}

/* Séparateur entre les liens */
nav ul li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 1.1em;
  background: var(--accent); /* ton vert #13C161 */
}

/* Optionnel : retire le séparateur sur mobile si besoin */
@media (max-width: 768px) {
  nav ul li + li::before {
    display: none;
  }
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
}
nav a:hover { color: var(--accent); }

/* HÉRO */
header.hero {
  position: relative;
  min-height: 65vh; /* au lieu de height: 50vh */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  padding: 4rem 1rem 6rem; /* espace en bas pour éviter que le texte touche la bordure */
  box-sizing: border-box;
  /*background: url("img/toit2-ap.jpg") center/cover no-repeat;*/
}
@media (max-width: 768px) {
  header.hero {
    min-height: auto;
    padding: 6rem 1rem 4rem;
  }
}

header.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, var(--primary) 0%, rgba(19,193,97,0.9) 100%);
  opacity: 0.85;
  pointer-events: none; /* ✅ permet aux clics de passer au travers */
}

header.hero .container { position: relative; z-index: 1; padding: 0 1rem; }
header.hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 0.5rem; font-weight: 700; text-transform: uppercase; }
header.hero h2 { font-size: clamp(1rem, 2vw, 1.6rem); margin-bottom: 0.5rem; font-weight: 700; text-transform: uppercase; }
header.hero p  { font-size: 1.25rem; }
header.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: inherit; clip-path: polygon(0 0, 100% 100%, 0 100%); pointer-events:none; }

/* ==== IMAGES D’ILLUSTRATION SOUS LE SLOGAN ==== */
.hero-images {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 0 1rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1.2s ease-out forwards;
}

/* Cadres avec dégradé harmonisé */
.hero-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  max-width: 320px;
}

.hero-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  transition: transform .4s ease, filter .4s ease;
  object-fit: cover;
}

.hero-frame:hover img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

/* Légendes “Avant / Après” */
.hero-frame figcaption {
  margin-top: 0.5rem;
  font-weight: 700;
  color: var(--text-light);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Animation d’apparition */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive mobile */
@media (max-width: 600px) {
  .hero-frame {
    width: min(92%, 420px);
  }
  .hero-frame img {
    width: 100%;
  }
}
/* ==== BOUTONS CONTACT DANS LE HEADER ==== */
.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 2; /* assure que les boutons sont bien au-dessus du dégradé */
}


.hero-cta .btn {
  background: #fff;
  color: var(--primary);
  border-radius: 40px;
  padding: 0.75rem 1.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.hero-cta .btn:hover {
  background: #f2f2f2;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

@media (max-width: 600px) {
  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }
}

.intro-services {
  max-width: 900px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: center;
  color: #444;
}
.intro-services strong {
  color: var(--primary);
}


/* UTILITAIRES */
.container { max-width: 1200px; margin: 0 auto; }
main section { padding: 2rem 1rem; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 2rem; color: var(--primary); }
section { scroll-margin-top: 80px; }

/* SERVICES */
.services-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 carte par ligne en mobile */
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr); /* jusqu'à 2 colonnes pour tablettes */
  }
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr); /* max 3 cartes par ligne sur desktop */
    justify-content: center;
  }
}
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
}
.card::before {
  content: "";
  height: 6px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  display: block;
}
.card h3 { margin: 1rem; font-size: 1.25rem; text-align: center; color: var(--primary); }
.card p  { margin: 0 1rem 1rem; }


/* TARIFS */
.tarif-card {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
}
.tarif-card .banner { height: 8px; background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%); }
.tarif-card p { padding: 2rem; font-size: 1.1rem; }

/* AVANT / APRÈS (checkbox hack) */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, 260px);
  justify-content: center;
  gap: 1rem;
}
/* — FILTRES AVANT/APRÈS — */
/* ==== Filtres "pills" modernisés ==== */
.filters {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;              /* retour à la ligne en mobile */
  gap: .6rem .8rem;             /* row-gap / column-gap */
  margin: 0 1rem 1rem;          /* un peu d’air sur les côtés */
  max-width: 100%;
}

.filters label {
  flex: 0 0 auto;
  padding: .55rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 9999px;        /* pill */
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, transform .06s ease;
  cursor: pointer;
}

.filters label:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,.10);
  transform: translateY(-1px);
}

/* Focus clavier accessible */
.filters label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* État actif (radio :checked) -> pill rempli */
#filter-couvreur:checked ~ .filters label[for="filter-couvreur"],
#filter-facade:checked   ~ .filters label[for="filter-facade"],
#filter-toiture:checked  ~ .filters label[for="filter-toiture"],
#filter-terrasse:checked ~ .filters label[for="filter-terrasse"],
#filter-autre:checked    ~ .filters label[for="filter-autre"],
#filter-all:checked      ~ .filters label[for="filter-all"] {
  background: var(--primary);
  color: var(--text-light);
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(28,58,122,.25);
}

/* Masque d’abord toutes les figures, puis affiche selon filtre */
.gallery figure { display: none; }
#filter-all:checked ~ .gallery figure,
#filter-couvreur:checked ~ .gallery .couvreur,
#filter-facade:checked ~ .gallery .facade,
#filter-toiture:checked ~ .gallery .toiture,
#filter-autre:checked ~ .gallery .autre,
#filter-terrasse:checked ~ .gallery .terrasse {
  display: block;
}

.before-after {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  /* assurer une hauteur uniforme */
  aspect-ratio: 4 / 3;
}
.before-after input { display: none; }
.viewport {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.viewport .after { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity .4s; }
.before-after input:checked + .viewport .after { opacity: 1; }
.before-after input:checked + .viewport .before { opacity: 0; }
.tip {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: .75rem;
  padding: .25rem .5rem;
  border-radius: 4px;
  pointer-events: none;
}
.before-after figcaption { text-align: center; padding: .5rem; background: var(--primary); color: var(--text-light); font-size: .9rem; }

/* PROCESSUS */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.step {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 2rem 1rem;
}
.step .badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 1rem;
}

/* CTA */
.cta {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-light);
}
.cta h2 { font-size: 2rem; margin-bottom: 1rem; }
.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: .75rem 2rem;
  border-radius: 40px;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: #f2f2f2; }


/* MISE EN ÉVIDENCE DES POINTS IMPORTANTS */
/* Ajoute une classe .highlight pour surligner les mots/clause critiques */
.highlight {
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
}

/* Sous-lignage accentué pour les titres clés */
.section-title,
.cta h2 {
  position: relative;
}
.section-title::after,
.cta h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: var(--accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* PIED DE PAGE */
footer {
  background: var(--secondary);
  color: var(--text-light);
  text-align: center;
  padding: 2rem 1rem;
  font-size: .9rem;
}
footer a { color: var(--text-light); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* MEDIA QUERIES */
@media (max-width: 600px) {
  nav ul { gap: .5rem; }
}

/* FAQ */
.faq-list {
  margin: 0;
  padding: 0;
}
.faq-list dt {
  font-weight: 700;
  margin-top: 1rem;
}
.faq-list dd {
  margin: 0.5rem 0 1rem 1rem;
}

/* TESTIMONIAL */
.testimonial {
  max-width: 600px;
  margin: 2rem auto;
  background: #f9f9f9;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  border-radius: 8px;
}
.testimonial blockquote {
  margin: 0;
  font-style: italic;
  position: relative;
  padding-left: 1.5rem;
}
.testimonial blockquote::before {
  content: "“";
  font-size: 3rem;
  position: absolute;
  top: -10px;
  left: 0;
  color: var(--accent);
}
.testimonial cite {
  display: block;
  text-align: right;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}
/* ===== Déplacement : panneaux déroulants ===== */
#zones-deplacement .muted {
  color: #666;
  font-size: .95rem;
  margin: 0 1rem 1rem;
}

#zones-deplacement details {
  background: #f9fafb;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: .5rem .75rem;
  margin: 0 1rem 0.75rem;
  transition: background .2s ease;
}
#zones-deplacement details:hover { background: #f3f5f7; }

#zones-deplacement summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}
#zones-deplacement summary::-webkit-details-marker { display: none; }
#zones-deplacement summary::after {
  content: "▾";
  margin-left: auto;
  transition: transform .2s ease;
  opacity: .7;
}
#zones-deplacement details[open] summary::after { transform: rotate(180deg); }

#zones-deplacement .towns {
  margin: .5rem 0 0.25rem 1rem;
  padding-left: 0;
  list-style: none;
  column-width: 200px;
  column-gap: 1.25rem;
}
#zones-deplacement .towns li {
  break-inside: avoid;
  padding: .15rem 0;
  border-bottom: 1px dashed #e5e7eb;
}
#zones-deplacement .towns li:last-child { border-bottom: 0; }

#zones-deplacement summary::before {
  content: "🚚";
  font-size: 1rem;
  opacity: .9;
}

@media (max-width: 600px) {
  #zones-deplacement .towns {
    column-width: auto;
    column-count: 1;
  }
}

@media (max-width: 400px) {
  .filters label { padding: .5rem .8rem; font-weight: 600; }
}