/* ═══════════════════════════════════════════════════════
   AZUR COUVERTURE — couvreur français moderne & rassurant
   Base claire, marine profond, bleu ardoise
   ═══════════════════════════════════════════════════════ */

:root {
  --fond: #F7F8FA;
  --blanc: #FFFFFF;
  --gris-doux: #EEF1F5;
  --marine: #16324F;
  --marine-fonce: #0F2438;
  --bleu: #2069A8;
  --bleu-fonce: #17527F;
  --texte: #22303E;
  --texte-doux: #5A6B7C;
  --bord: #DCE2EA;
  --rouge: #B3372B;
  --or: #E5A33D;
  --titres: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --corps: "Barlow", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--corps);
  background: var(--fond);
  color: var(--texte);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.conteneur { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-grise { background: var(--gris-doux); }

h1, h2, h3 { font-family: var(--titres); font-weight: 700; line-height: 1.12; color: var(--marine); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); margin-bottom: 1rem; text-wrap: balance; }
.sous-titre { color: var(--texte-doux); font-size: 1.05rem; max-width: 60ch; margin-bottom: 1.6rem; }

.etiquette {
  display: inline-block;
  font-family: var(--titres);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bleu);
  border-bottom: 2px solid var(--bleu);
  padding-bottom: 0.3em;
  margin-bottom: 1.2rem;
}

.etoiles { color: var(--or); letter-spacing: 0.1em; }

/* ─────────── Boutons ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.85em 1.7em;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.btn-bleu { background: var(--bleu); color: #fff; box-shadow: 0 4px 14px rgba(32, 105, 168, 0.3); }
.btn-bleu:hover, .btn-bleu:focus-visible { background: var(--bleu-fonce); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(32, 105, 168, 0.4); }
.btn-blanc { background: #fff; color: var(--marine); border: 1.5px solid var(--bord); }
.btn-blanc:hover, .btn-blanc:focus-visible { border-color: var(--bleu); color: var(--bleu); }
.btn-petit { padding: 0.55em 1.2em; font-size: 0.92rem; }
.btn-large { width: 100%; font-size: 1.1rem; }
.btn:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }

/* ─────────── Bandeau haut ─────────── */
.bandeau-haut {
  background: var(--marine-fonce);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 24px;
}
.bandeau-urgence { color: #fff; font-weight: 600; text-decoration: none; }
.bandeau-urgence:hover, .bandeau-urgence:focus-visible { text-decoration: underline; }

/* ─────────── Entête ─────────── */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bord);
}
.entete-inner { max-width: 1240px; margin: 0 auto; padding: 0.7rem 24px; display: flex; align-items: center; gap: 1.8rem; }
.logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; margin-right: auto; }
.logo-nom { font-family: var(--titres); font-weight: 700; font-size: 1.3rem; color: var(--marine); line-height: 1.05; }
.logo-nom em { font-style: normal; color: var(--bleu); }
.logo-nom small { display: block; font-family: var(--corps); font-weight: 500; font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-doux); margin-top: 2px; }

.nav { display: flex; gap: 1.5rem; }
.nav a { font-weight: 500; font-size: 0.95rem; color: var(--texte); text-decoration: none; transition: color 0.2s ease; }
.nav a:hover, .nav a:focus-visible { color: var(--bleu); }

.entete-actions { display: flex; align-items: center; gap: 1rem; }
.tel-lien {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--titres); font-weight: 700; font-size: 1.05rem;
  color: var(--marine); text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.tel-lien:hover, .tel-lien:focus-visible { color: var(--bleu); }

.burger { display: none; background: none; border: none; width: 44px; height: 44px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { width: 22px; height: 2px; background: var(--marine); display: block; transition: transform 0.25s ease, opacity 0.25s ease; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────── Héro ─────────── */
.hero { background: var(--blanc); border-bottom: 1px solid var(--bord); padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.hero-grille {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.surtitre {
  font-family: var(--titres);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bleu);
  margin-bottom: 1.2rem;
}
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); margin-bottom: 1.2rem; }
.hero-phrase { font-size: 1.08rem; color: var(--texte-doux); max-width: 54ch; margin-bottom: 1.8rem; }
.hero-boutons { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.6rem; }
.hero-points { list-style: none; display: grid; gap: 0.55rem; font-size: 0.98rem; }
.hero-points li { padding-left: 1.7rem; position: relative; }
.hero-points li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  width: 1.25em; height: 1.25em;
  display: grid; place-items: center;
  font-size: 0.8em; font-weight: 700;
  color: #fff; background: var(--bleu);
  border-radius: 50%;
}

.hero-visuel { position: relative; }
.hero-visuel img, .hero-video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}
.hero-video { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.hero-video.visible { opacity: 1; }
.hero-avis {
  position: absolute;
  left: 18px; bottom: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--bord);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(22, 50, 79, 0.18);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--bord);
  border-radius: 10px;
  background: var(--blanc);
  overflow: hidden;
}
.stat { padding: 1.5rem 1.2rem; text-align: center; }
.stat + .stat { border-left: 1px solid var(--bord); }
.stat-nombre { font-family: var(--titres); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--bleu); display: block; line-height: 1.1; }
.stat-libelle { font-size: 0.86rem; color: var(--texte-doux); }

/* ─────────── Services ─────────── */
.services-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
.carte-service {
  background: var(--blanc);
  border: 1px solid var(--bord);
  border-radius: 10px;
  padding: 1.8rem 1.6rem;
  display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.carte-service:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(22, 50, 79, 0.12); border-color: rgba(32, 105, 168, 0.4); }
.carte-icone {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--bleu);
  background: rgba(32, 105, 168, 0.09);
  margin-bottom: 1.2rem;
}
.carte-service.urgence .carte-icone { color: var(--rouge); background: rgba(179, 55, 43, 0.09); }
.carte-service h3 { font-size: 1.22rem; margin-bottom: 0.5rem; }
.carte-service p { color: var(--texte-doux); font-size: 0.96rem; margin-bottom: 1.2rem; }
.carte-lien {
  margin-top: auto;
  font-family: var(--titres);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bleu);
  text-decoration: none;
}
.carte-lien:hover, .carte-lien:focus-visible { text-decoration: underline; }
.badge {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em;
  background: rgba(179, 55, 43, 0.1); color: var(--rouge);
  border: 1px solid rgba(179, 55, 43, 0.3);
  padding: 0.2em 0.6em; border-radius: 100px;
  vertical-align: middle; margin-left: 0.4em;
}

/* ─────────── Comparateur ─────────── */
.comparateur {
  position: relative;
  max-width: 920px;
  margin: 2.4rem auto 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--bord);
  aspect-ratio: 3 / 2;
  user-select: none;
  touch-action: pan-y;
  box-shadow: 0 16px 40px rgba(22, 50, 79, 0.14);
}
.comparateur img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.comparateur-apres-cadre { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 0 0 50%); }
.comparateur-poignee {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.comparateur-poignee span {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.comparateur-poignee span::before { content: "⟷"; color: var(--marine); font-size: 1.2rem; font-weight: 700; }
.comparateur-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.comparateur-tag {
  position: absolute; top: 12px;
  font-family: var(--titres); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.35em 0.9em; border-radius: 100px;
  background: rgba(255, 255, 255, 0.92); color: var(--marine);
}
.tag-avant { left: 12px; }
.tag-apres { right: 12px; color: var(--bleu); }

/* ─────────── Réalisations ─────────── */
.realisations-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
.realisation { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--bord); background: var(--blanc); }
.realisation img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform 0.5s ease; }
.realisation:hover img { transform: scale(1.04); }
.realisation figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 2.2rem 1.1rem 0.9rem;
  background: linear-gradient(transparent, rgba(15, 36, 56, 0.88));
  display: flex; flex-direction: column;
  color: #fff;
}
.realisation strong { font-family: var(--titres); font-size: 1rem; }
.realisation span { font-size: 0.82rem; opacity: 0.85; }

/* ─────────── À propos ─────────── */
.apropos-grille { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.apropos-photo img { border-radius: 10px; border: 1px solid var(--bord); }
.garanties { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.8rem; }
.garanties li { border-left: 3px solid var(--bleu); padding-left: 0.9rem; }
.garanties strong { font-family: var(--titres); display: block; font-size: 1rem; color: var(--marine); }
.garanties span { font-size: 0.86rem; color: var(--texte-doux); }

/* ─────────── Avis ─────────── */
.avis-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
.avis-grille blockquote {
  background: var(--blanc);
  border: 1px solid var(--bord);
  border-radius: 10px;
  padding: 1.7rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.9rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.avis-grille blockquote:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(22, 50, 79, 0.1); }
.avis-grille p { font-size: 0.98rem; }
.avis-grille footer { margin-top: auto; font-size: 0.88rem; color: var(--texte-doux); }
.avis-grille cite { font-style: normal; font-weight: 600; color: var(--texte); }

/* ─────────── Zone ─────────── */
.zone-grille { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.zone-liste { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--bord); }
.zone-liste li {
  font-weight: 500;
  padding: 0.7rem 0.3rem 0.7rem 1.6rem;
  border-bottom: 1px solid var(--bord);
  position: relative;
}
.zone-liste li::before { content: ""; position: absolute; left: 0.3rem; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 50%; background: var(--bleu); }

/* ─────────── Bandeau urgence ─────────── */
.urgence-bandeau { background: var(--marine); color: #fff; padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.urgence-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.urgence-bandeau h2 { color: #fff; margin-bottom: 0.4rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.urgence-bandeau p { color: rgba(255, 255, 255, 0.75); max-width: 52ch; }
.btn-grand-tel { font-size: 1.25rem; padding: 0.85em 1.6em; white-space: nowrap; }

/* ─────────── Contact ─────────── */
.contact-grille { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.contact-coordonnees { display: grid; gap: 1rem; margin-top: 1.8rem; }
.contact-coordonnees p { display: grid; }
.contact-coordonnees strong { font-family: var(--titres); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texte-doux); }
.contact-coordonnees a, .contact-coordonnees span { font-size: 1.08rem; color: var(--texte); text-decoration: none; }
.contact-coordonnees a:hover, .contact-coordonnees a:focus-visible { color: var(--bleu); }

.formulaire {
  background: var(--blanc);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  display: grid; gap: 1.25rem;
  box-shadow: 0 16px 40px rgba(22, 50, 79, 0.1);
}
.champ { display: grid; gap: 0.4rem; }
.champ-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.champ label { font-family: var(--titres); font-weight: 600; font-size: 0.95rem; color: var(--marine); }
.champ input, .champ select, .champ textarea {
  font-family: var(--corps);
  font-size: 1rem;
  color: var(--texte);
  background: var(--fond);
  border: 1px solid var(--bord);
  border-radius: 7px;
  padding: 0.72em 0.9em;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.champ select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A6B7C' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9em center; }
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(32, 105, 168, 0.16);
}
.champ .erreur { display: none; font-size: 0.82rem; color: var(--rouge); }
.champ.invalide input, .champ.invalide select { border-color: var(--rouge); }
.champ.invalide .erreur { display: block; }
.form-note { font-size: 0.84rem; color: var(--texte-doux); text-align: center; }
.form-succes { background: #EAF4EC; border: 1px solid #9CC7A5; color: #2C5E38; padding: 1rem 1.2rem; border-radius: 7px; font-size: 0.95rem; }

/* ─────────── Pied ─────────── */
.pied { background: var(--marine-fonce); color: rgba(255, 255, 255, 0.75); padding: 4rem 0 5rem; font-size: 0.93rem; }
.pied-grille { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr; gap: 2.5rem; }
.pied-logo { font-family: var(--titres); font-weight: 700; font-size: 1.3rem; color: #fff; margin-bottom: 0.6rem; }
.pied-logo em { font-style: normal; color: #7FB3DC; }
.pied-titre { font-family: var(--titres); font-weight: 600; color: #fff; margin-bottom: 0.7rem; }
.pied a { color: #7FB3DC; text-decoration: none; }
.pied a:hover, .pied a:focus-visible { text-decoration: underline; }
.pied-mention { text-align: center; margin-top: 3rem; padding: 1.4rem 24px 0; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.82rem; }
.pied-mention a { text-decoration: underline; }

/* ─────────── Barre mobile ─────────── */
.barre-mobile {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  display: none; grid-template-columns: 1fr 1fr;
  box-shadow: 0 -5px 20px rgba(15, 36, 56, 0.3);
}
.barre-mobile a {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--titres); font-weight: 700; font-size: 1.02rem;
  text-decoration: none;
  padding: 1rem 0.5rem calc(1rem + env(safe-area-inset-bottom));
}
.barre-tel { background: var(--marine); color: #fff; }
.barre-devis { background: var(--bleu); color: #fff; }

/* ─────────── Apparitions ─────────── */
.apparition { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.apparition.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .apparition { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ═══════════ Responsive ═══════════ */
@media (max-width: 1024px) {
  .services-grille, .realisations-grille, .avis-grille { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--bord); }
}

@media (max-width: 900px) {
  .bandeau-haut { justify-content: center; }
  .bandeau-haut p { display: none; }

  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--blanc);
    border-bottom: 1px solid var(--bord);
    flex-direction: column; gap: 0;
    padding: 0.6rem 0;
  }
  .nav.ouverte { display: flex; }
  .nav a { padding: 0.95rem 24px; font-size: 1.02rem; }
  .burger { display: flex; }
  .entete-actions { display: none; }

  .hero-grille { grid-template-columns: 1fr; }
  .hero-visuel { order: -1; }
  .zone-grille, .apropos-grille, .contact-grille { grid-template-columns: 1fr; }
  .apropos-photo { max-width: 520px; }
  .urgence-inner { flex-direction: column; align-items: flex-start; }

  .barre-mobile { display: grid; }
  body { padding-bottom: 64px; }
  .pied { padding-bottom: 7rem; }
}

@media (max-width: 560px) {
  .services-grille, .realisations-grille, .avis-grille { grid-template-columns: 1fr; }
  .hero-boutons .btn { width: 100%; }
  .champ-duo { grid-template-columns: 1fr; }
  .garanties { grid-template-columns: 1fr; }
  .pied-grille { grid-template-columns: 1fr; }
  .zone-liste { grid-template-columns: 1fr; }
  .comparateur { aspect-ratio: 4 / 3; }
}
