/* =========================================================
   RM Plomberie — feuille de style unique
   Organisation : variables, base, typographie, composants,
   sections, formulaires, pied de page, utilitaires, responsive.
   ========================================================= */

/* ---------- 1. Variables ---------- */
:root {
  /* Couleurs */
  --marine: #0b1b2b;
  --bleu-profond: #123a63;
  --bleu-action: #0b63ce;
  --bleu-action-fonce: #094ea3;
  --gris-fond: #f5f6f7;
  --gris-filet: #d8dce0;
  --gris-texte: #5a646e;
  --gris-image: #e9ecef;
  --blanc: #ffffff;
  --vert-dispo: #3fb27f; /* pastille de disponibilité uniquement */

  /* Typographie */
  --police-titre: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --police-texte: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Échelle (mobile) */
  --t-h1: 2.125rem;   /* 34px */
  --t-h2: 1.625rem;   /* 26px */
  --t-h3: 1.25rem;    /* 20px */
  --t-corps: 1.0625rem; /* 17px */
  --t-legende: 0.875rem;

  /* Rythme base 8 */
  --e1: 8px;
  --e2: 16px;
  --e3: 24px;
  --e4: 32px;
  --e5: 48px;
  --e6: 64px;
  --e7: 96px;
  --e8: 128px;

  --conteneur: 1200px;
  --rayon: 4px;
  --transition: 180ms ease;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--blanc);
  color: var(--marine);
  font-family: var(--police-texte);
  font-size: var(--t-corps);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: var(--bleu-action); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--bleu-action);
  outline-offset: 2px;
}

/* Lien d'évitement clavier */
.evitement {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--marine);
  color: var(--blanc);
  padding: var(--e2);
  z-index: 200;
}
.evitement:focus { left: 0; }

/* ---------- 3. Typographie ---------- */
h1, h2, h3, h4 {
  font-family: var(--police-titre);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 var(--e3);
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 700; letter-spacing: -0.015em; }

p { margin: 0 0 var(--e3); max-width: 68ch; }
.lede { font-size: 1.1875rem; color: var(--gris-texte); }
.legende { font-size: var(--t-legende); color: var(--gris-texte); }

ul.liste { padding-left: 1.1em; margin: 0 0 var(--e3); max-width: 68ch; }
ul.liste li { margin-bottom: var(--e1); }

/* ---------- 4. Structure ---------- */
.conteneur {
  width: 100%;
  max-width: var(--conteneur);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: var(--e6) 0; }
.section--gris { background: var(--gris-fond); }
.section--marine { background: var(--marine); color: var(--blanc); }
.section--marine h2, .section--marine h3 { color: var(--blanc); }
.section--marine p, .section--marine li { color: #c6ced6; }
.section--filet { border-top: 1px solid var(--gris-filet); }

.grille { display: grid; gap: var(--e3); }
.grille--2 { grid-template-columns: 1fr; }
.grille--3 { grid-template-columns: 1fr; }

/* ---------- 5. Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e1);
  min-height: 52px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--rayon);
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.btn:hover { text-decoration: none; }
.btn--action { background: var(--bleu-action); color: var(--blanc); }
.btn--action:hover { background: var(--bleu-action-fonce); }
.btn--contour {
  background: transparent;
  color: var(--marine);
  border-color: var(--marine);
}
.btn--contour:hover { background: var(--marine); color: var(--blanc); }
.btn--clair {
  background: transparent;
  color: var(--blanc);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn--clair:hover { background: var(--blanc); color: var(--marine); }
.btn--bloc { width: 100%; }

.actions { display: flex; flex-direction: column; gap: var(--e2); }

/* ---------- 6. En-tête ---------- */
.entete {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--blanc);
  border-bottom: 1px solid var(--gris-filet);
}
.entete__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e2);
  min-height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 32px; width: auto; }
.logo__texte {
  font-family: var(--police-titre);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--marine);
  font-size: 1.0625rem;
}
.entete__droite { display: flex; align-items: center; gap: var(--e1); }

.tel-entete {
  display: none;
  font-weight: 600;
  color: var(--marine);
  min-height: 48px;
  align-items: center;
  padding: 0 var(--e1);
}

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: none;
  border: 1px solid var(--gris-filet);
  border-radius: var(--rayon);
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--marine);
  position: relative;
}
.burger span::before, .burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--marine);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }

/* Menu mobile */
.menu {
  display: none;
  border-top: 1px solid var(--gris-filet);
  padding: var(--e2) 0 var(--e3);
  background: var(--blanc);
}
.menu.est-ouvert { display: block; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--marine);
  font-weight: 500;
  border-bottom: 1px solid var(--gris-filet);
}
.menu a[aria-current="page"] { color: var(--bleu-action); }
.menu__langue { margin-top: var(--e2); font-size: var(--t-legende); }

/* ---------- 7. Hero ---------- */
.hero { background: var(--marine); color: var(--blanc); }
.hero__texte { padding: var(--e5) 0 var(--e6); }
.hero h1 { color: var(--blanc); }
.hero p { color: #cbd4dd; }
.hero__zone {
  font-size: var(--t-legende);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8fa6bd;
  margin-bottom: var(--e2);
  font-weight: 600;
}
.hero__tel {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--blanc);
  font-family: var(--police-titre);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: var(--e3);
}

/* Emplacements photo (fond neutre uni en attendant les vraies images) */
.photo {
  background: var(--gris-image);
  width: 100%;
  display: block;
  position: relative;
}
.photo::after {
  content: attr(data-legende);
  position: absolute;
  left: 16px;
  bottom: 16px;
  right: 16px;
  font-size: 0.8125rem;
  color: #8d959c;
  font-family: var(--police-texte);
}
.photo--4x5 { aspect-ratio: 4 / 5; }
.photo--3x2 { aspect-ratio: 3 / 2; }
.photo--16x9 { aspect-ratio: 16 / 9; }

/* ---------- 8. Bandeau de réassurance ---------- */
.reassurance { border-bottom: 1px solid var(--gris-filet); }
.reassurance ul {
  list-style: none;
  margin: 0;
  padding: var(--e4) 0;
  display: grid;
  gap: var(--e3);
}
.reassurance li { border-left: 2px solid var(--bleu-action); padding-left: var(--e2); }
.reassurance strong { display: block; font-family: var(--police-titre); letter-spacing: -0.015em; }
.reassurance span { color: var(--gris-texte); font-size: var(--t-legende); }

/* ---------- 9. Services ---------- */
.service {
  border-top: 1px solid var(--gris-filet);
  padding: var(--e3) 0;
}
.service h3 { margin-bottom: var(--e1); }
.service p { margin-bottom: var(--e1); color: var(--gris-texte); }

/* ---------- 10. Étapes ---------- */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e4); }
.etapes li { border-top: 2px solid var(--marine); padding-top: var(--e2); }
.section--marine .etapes li { border-top-color: var(--bleu-action); }
.etapes .rang {
  font-family: var(--police-titre);
  font-size: var(--t-legende);
  letter-spacing: 0.08em;
  color: var(--gris-texte);
  display: block;
  margin-bottom: var(--e1);
}
.section--marine .etapes .rang { color: #8fa6bd; }

/* ---------- 11. Carte ---------- */
#carte {
  height: 340px;
  width: 100%;
  background: var(--gris-image);
  border: 1px solid var(--gris-filet);
}
.carte-remplacement {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--e3);
  text-align: left;
  color: var(--gris-texte);
  font-size: var(--t-legende);
}
.villes { list-style: none; padding: 0; margin: var(--e3) 0 0; display: grid; gap: var(--e1); grid-template-columns: 1fr 1fr; }
.villes a { color: var(--marine); text-decoration: underline; display: inline-flex; min-height: 44px; align-items: center; }

/* ---------- 12. Avis ---------- */
.avis {
  border: 1px solid var(--gris-filet);
  padding: var(--e3);
  min-height: 160px;
}
.avis p { color: var(--gris-texte); margin: 0; }

/* ---------- 13. FAQ ---------- */
.faq details {
  border-bottom: 1px solid var(--gris-filet);
  padding: var(--e2) 0;
}
.faq summary {
  cursor: pointer;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  min-height: 48px;
  display: flex;
  align-items: center;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-weight: 400; font-size: 1.5rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: var(--e1) 0 0; color: var(--gris-texte); }

/* ---------- 14. Formulaires ---------- */
.champ { margin-bottom: var(--e3); }
.champ label { display: block; font-weight: 600; margin-bottom: var(--e1); }
.champ input, .champ select, .champ textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--gris-filet);
  border-radius: var(--rayon);
  font-family: var(--police-texte);
  font-size: 1rem;
  color: var(--marine);
  background: var(--blanc);
}
.champ textarea { min-height: 140px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--bleu-action); }
.champ .erreur { display: block; color: #a4161a; font-size: var(--t-legende); margin-top: 6px; min-height: 1px; }
.champ.est-invalide input, .champ.est-invalide select, .champ.est-invalide textarea { border-color: #a4161a; }

.choix { display: flex; gap: var(--e3); }
.choix label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; min-height: 48px; }
.consentement { display: flex; gap: 12px; align-items: flex-start; }
.consentement input { width: 24px; height: 24px; min-height: 24px; margin-top: 4px; flex: 0 0 auto; }
.consentement label { font-weight: 400; font-size: var(--t-legende); }
.pot-de-miel { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.message-envoi { margin-top: var(--e2); font-weight: 600; }

/* ---------- 15. Pied de page ---------- */
.pied { background: var(--marine); color: #c6ced6; padding: var(--e6) 0 140px; }
.pied h2, .pied h3 { color: var(--blanc); font-size: 1rem; letter-spacing: 0; }
.pied a { color: var(--blanc); }
.pied ul { list-style: none; margin: 0 0 var(--e4); padding: 0; }
.pied li a { display: inline-flex; min-height: 44px; align-items: center; }
.pied__bas {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--e3);
  font-size: var(--t-legende);
}
.reseaux { display: flex; gap: var(--e2); margin-bottom: var(--e3); }
.reseaux a {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--rayon);
}
.reseaux svg { width: 20px; height: 20px; fill: var(--blanc); }

/* ---------- 16. Barre d'action fixe (mobile) ---------- */
.barre-action {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 95;
  display: flex;
  gap: var(--e1);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--blanc);
  border-top: 1px solid var(--gris-filet);
  box-shadow: 0 -4px 16px rgba(11, 27, 43, 0.08);
}
.barre-action .btn { flex: 1; min-height: 52px; font-size: 1rem; }

/* ---------- 17. Bandeau cookies ---------- */
.cookies {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 120;
  background: var(--blanc);
  border-top: 1px solid var(--gris-filet);
  padding: var(--e3) 0 calc(var(--e3) + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(11, 27, 43, 0.12);
}
.cookies[hidden] { display: none; }
.cookies p { font-size: var(--t-legende); margin-bottom: var(--e2); }
.cookies__actions { display: grid; gap: var(--e1); }
.cookies__detail { margin-top: var(--e3); border-top: 1px solid var(--gris-filet); padding-top: var(--e2); }

/* ---------- 18. Fil d'Ariane ---------- */
.ariane { font-size: var(--t-legende); color: var(--gris-texte); padding: var(--e2) 0; }
.ariane a { color: var(--gris-texte); }

/* ---------- 19. Apparition discrète ---------- */
.apparait { opacity: 0; transform: translateY(12px); transition: opacity 240ms ease, transform 240ms ease; }
.apparait.est-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .apparait { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 20. Responsive ---------- */
@media (min-width: 700px) {
  :root {
    --t-h1: 3rem;
    --t-h2: 2rem;
    --t-h3: 1.375rem;
    --t-corps: 1.125rem;
  }
  .grille--2 { grid-template-columns: 1fr 1fr; gap: var(--e5); }
  .grille--3 { grid-template-columns: repeat(3, 1fr); gap: var(--e4); }
  .reassurance ul { grid-template-columns: repeat(3, 1fr); }
  .etapes { grid-template-columns: repeat(3, 1fr); }
  .actions { flex-direction: row; }
  .cookies__actions { grid-template-columns: repeat(3, auto); justify-content: start; }
  #carte { height: 460px; }
}

@media (min-width: 1000px) {
  :root { --t-h1: 4rem; --t-h2: 2.5rem; }
  .section { padding: var(--e8) 0; }
  .hero__texte { padding: var(--e8) var(--e6) var(--e8) 0; }
  .hero .conteneur { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--e6); }
  .hero .photo--4x5 { aspect-ratio: 3 / 4; }
  .barre-action { display: none; }
  .pied { padding-bottom: var(--e6); }
  .tel-entete { display: inline-flex; }
  .burger { display: none; }
  .menu {
    display: block;
    border-top: 0;
    padding: 0;
  }
  .menu ul { display: flex; gap: var(--e3); align-items: center; }
  .menu a { border-bottom: 0; min-height: 44px; font-size: 0.9375rem; }
  .entete__barre { min-height: 76px; }
  .menu__langue { margin: 0 0 0 var(--e2); }
  .villes { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 12. Blocs pilotés par data/site.js ---------- */
/* Ces blocs restent masqués tant que la donnée n'est pas fournie. */
[hidden] { display: none !important; }

/* Bande de preuves : une ligne de faits, sans carte ni icône */
.preuves {
  border-bottom: 1px solid var(--gris-filet);
  background: var(--blanc);
  padding: var(--e2) 0;
}
.preuves__ligne {
  margin: 0;
  font-size: var(--t-legende);
  color: var(--gris-texte);
  line-height: 1.6;
}
.preuves__ligne a { color: var(--bleu-action); }
.preuves__ligne span { color: var(--gris-filet); margin: 0 4px; }

/* Avis */
.avis cite {
  display: block;
  margin-top: var(--e2);
  font-style: normal;
  font-size: var(--t-legende);
  color: var(--marine);
}
.avis cite time { color: var(--gris-texte); }

/* Chantiers */
.chantiers {
  list-style: none;
  margin: var(--e4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--e3);
}
.chantier img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--gris-image);
}
.chantier__legende {
  margin: var(--e1) 0 0;
  font-size: var(--t-legende);
  color: var(--gris-texte);
}

/* Tarifs dans la FAQ */
.tarifs { margin: 0 0 var(--e2); }
.tarifs dt {
  font-weight: 600;
  color: var(--marine);
  margin-top: var(--e1);
}
.tarifs dd {
  margin: 0;
  color: var(--gris-texte);
}

@media (min-width: 768px) {
  .chantiers { grid-template-columns: repeat(3, 1fr); }
  .tarifs { display: grid; grid-template-columns: max-content 1fr; column-gap: var(--e3); }
  .tarifs dt { margin-top: 0; padding-top: var(--e1); }
  .tarifs dd { padding-top: var(--e1); }
}

/* ---------- 21. Bandeau de disponibilité (tout en haut) ---------- */
/* Conversion : rassurer sur la disponibilité avant même le logo. */
.dispo {
  margin: 0;
  max-width: none;
  background: var(--marine);
  color: var(--blanc);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.dispo__point {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--vert-dispo);
  box-shadow: 0 0 0 0 rgba(63, 178, 127, 0.6);
  animation: pulsation 2s ease-out infinite;
  flex: 0 0 auto;
}
@keyframes pulsation {
  0%   { box-shadow: 0 0 0 0 rgba(63, 178, 127, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(63, 178, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 178, 127, 0); }
}
@media (prefers-reduced-motion: reduce) { .dispo__point { animation: none; } }

/* ---------- 22. Héros : numéro géant, prix, réassurance ---------- */
.hero__tel--geant {
  font-size: 2.25rem;
  line-height: 1.1;
  margin: var(--e3) 0 var(--e2);
  display: block;
}
.hero__tel--geant:hover { text-decoration: none; }
.hero__prix {
  margin-top: var(--e3);
  font-size: var(--t-legende);
  color: #cbd4dd;
  border-left: 2px solid var(--bleu-action);
  padding-left: var(--e2);
}
.hero__prix strong { color: var(--blanc); }

/* Barre de réassurance sous les actions : icônes en trait fin, aucun badge coloré. */
.rassure {
  list-style: none;
  margin: var(--e4) 0 0;
  padding: var(--e3) 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  gap: var(--e2);
}
.rassure li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--t-legende); color: #cbd4dd; }
.rassure strong { color: var(--blanc); font-weight: 600; }
.rassure svg {
  width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px;
  fill: none; stroke: #8fa6bd; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.rassure a { color: var(--blanc); text-decoration: underline; }

/* Visuel du héros : voile sombre pour rester cohérent avec le fond. */
.hero__media { position: relative; padding-bottom: var(--e6); }
.photo--sombre { background: #16293c; }
.photo--sombre::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 27, 43, 0.15), rgba(11, 27, 43, 0.65));
}
.photo--sombre::after { color: #7d8c9b; }
.encart {
  position: absolute;
  left: var(--e2); bottom: var(--e5);
  margin: 0;
  background: var(--blanc);
  color: var(--marine);
  font-size: var(--t-legende);
  font-weight: 600;
  padding: 10px 14px;
  border-left: 3px solid var(--bleu-action);
}

/* ---------- 23. Cartes services ---------- */
.cartes { list-style: none; margin: var(--e4) 0 var(--e3); padding: 0; display: grid; gap: var(--e2); }
.carte { border: 1px solid var(--gris-filet); padding: var(--e3); }
.carte h3 { margin-bottom: var(--e1); }
.carte h3 a { color: var(--marine); }
.carte p { color: var(--gris-texte); margin-bottom: var(--e2); }
.carte__infos { display: flex; flex-wrap: wrap; gap: var(--e1) var(--e2); font-size: var(--t-legende); }
.carte__delai { color: var(--marine); font-weight: 600; }
.carte__prix { color: var(--gris-texte); }
.carte__appel {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 600; color: var(--bleu-action);
}

/* ---------- 24. Responsive des nouveaux blocs ---------- */
@media (min-width: 700px) {
  .rassure { grid-template-columns: 1fr 1fr; gap: var(--e2) var(--e3); }
  .cartes { grid-template-columns: 1fr 1fr; gap: var(--e3); }
  .hero__tel--geant { font-size: 3rem; }
}
@media (min-width: 1000px) {
  .hero__grille { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--e6); }
  .hero__media { padding-bottom: 0; }
  .encart { bottom: var(--e4); left: calc(-1 * var(--e3)); }
  .cartes { grid-template-columns: repeat(3, 1fr); }
  .hero__tel--geant { font-size: 3.5rem; }
}
