/* ---------------------------------------------------------------
   Opale Électricité industrielle
   Feuille de style unique. Charte : vert opale, anthracite,
   Source Sans 3. Tout est ici, il n'y a pas d'autre fichier CSS.
   --------------------------------------------------------------- */

/* --- Police, servie depuis ce dossier, aucun appel extérieur --- */
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --- Couleurs de la charte. Ne change que ces lignes. --- */
:root {
  --opale: #7CD2B4;
  --vert: #1F7A5A;
  --vert-survol: #1B6A4E;
  --vert-appui: #186248;
  --anthracite: #231F20;
  --texte: #2D2D31;
  --vert-pale: #D8F0DD;
  --blanc-casse: #F7FAF5;
  --gris-motif: #E7E6E3;

  /* Intensité du schéma en filigrane derrière les titres de page.
     0 = invisible, 1 = plein. Monter ou descendre par pas de 0.05. */
  --filigrane: 0.3;

  --largeur: 1080px;
  --prose: 68ch;
  --rythme: 1.6;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: #fff;
  color: var(--texte);
  font-family: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: var(--rythme);
  -webkit-text-size-adjust: 100%;
}
@media (max-width: 640px) { body { font-size: 17px; } }

img, svg { max-width: 100%; height: auto; }

/* --- Titres --- */
h1, h2, h3 {
  color: var(--anthracite);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.75rem); margin-top: 2.2em; }
h3 { font-size: 1.22rem; margin-top: 1.8em; }
h2 + h3, h1 + h2 { margin-top: 1.2em; }

p, ul, ol { margin: 0 0 1.1em; }
p, li { max-width: var(--prose); }

a { color: var(--vert-appui); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--vert-survol); }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: 2px;
}

/* --- Gabarit --- */
.bande { padding: 3.2rem 1.25rem; }
.bande--pale { background: var(--blanc-casse); }
.bande--vert { background: var(--vert-pale); }
.bande--serre { padding-top: 2rem; padding-bottom: 2rem; }
.large { max-width: var(--largeur); margin-inline: auto; }
.large > h2:first-child { margin-top: 0; }
#contenu { scroll-margin-top: 5.5rem; }

/* --- En-tête --- */
.entete {
  border-bottom: 1px solid var(--gris-motif);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.entete__interieur {
  max-width: var(--largeur);
  margin-inline: auto;
  padding: .55rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.entete__logo { display: inline-flex; line-height: 0; margin-right: auto; }
.entete__logo img { width: 140px; }
.tel-court { display: none; }
@media (max-width: 600px) {
  .entete__logo img { width: 118px; }
  .tel-long { display: none; }
  .tel-court { display: inline; }
}

.menu { display: flex; gap: 1.4rem; align-items: center; }
.menu a {
  color: var(--anthracite);
  text-decoration: none;
  font-weight: 600;
  font-size: .97rem;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.menu a:hover { border-bottom-color: var(--opale); }
.menu a[aria-current="page"] { border-bottom-color: var(--vert); }

.bascule {
  display: none;
  background: #fff;
  border: 1px solid var(--gris-motif);
  border-radius: 3px;
  padding: .45rem .7rem;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  color: var(--anthracite);
  cursor: pointer;
}

@media (max-width: 900px) {
  .bascule { display: inline-block; }
  .menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    order: 3;
    border-top: 1px solid var(--gris-motif);
    margin-top: .6rem;
    padding-top: .4rem;
  }
  .menu.ouvert { display: flex; }
  .menu a { width: 100%; padding: .65rem 0; border-bottom: none; }
  .menu a[aria-current="page"] { color: var(--vert-appui); }
}

/* --- Boutons --- */
.bouton {
  display: inline-block;
  background: var(--vert);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: .72rem 1.25rem;
  border-radius: 3px;
  border: 2px solid var(--vert);
  transition: background-color .15s ease, border-color .15s ease;
}
.bouton:hover { background: var(--vert-survol); border-color: var(--vert-survol); color: #fff; }
.bouton--creux { background: #fff; color: var(--vert-appui); }
.bouton--creux:hover { background: var(--vert-pale); color: var(--vert-appui); border-color: var(--vert-survol); }
.bouton--compact { padding: .45rem .9rem; font-size: .95rem; }

.boutons { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 0; max-width: none; }

/* --- Accroche --- */
.accroche { padding: 3.4rem 1.25rem 2.6rem; position: relative; overflow: hidden; isolation: isolate; }

/* Schéma électrique en filigrane, calé à droite, qui s'efface vers le texte */
.accroche::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* ancré en haut, en pixels : même position sur toutes les pages, quelle que soit la hauteur du bloc */
  background: url("filigrane-schema.webp") no-repeat right -60px top 0 / 1250px auto;
  opacity: var(--filigrane);
  -webkit-mask-image: linear-gradient(to right, transparent 25%, #000 70%);
  mask-image: linear-gradient(to right, transparent 25%, #000 70%);
  pointer-events: none;
}
/* Pas de filigrane sur les pages où la zone de titre ne contient que le titre */
.accroche--simple::before { content: none; }

@media (max-width: 640px) {
  .accroche::before {
    background-size: 900px auto;
    background-position: right -330px top 0;
    opacity: calc(var(--filigrane) * 0.6);
  }
}
.accroche p { font-size: 1.1rem; }
.accroche .intro { max-width: 62ch; }

/* --- Bandeau urgence, le seul moment appuyé du site --- */
.urgence { background: var(--anthracite); color: #fff; padding: 1.8rem 1.25rem; }
.urgence__interieur {
  max-width: var(--largeur);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.urgence p { margin: 0; max-width: 46ch; color: #fff; }
.urgence strong { color: var(--opale); font-weight: 600; }
.urgence .tel {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid var(--opale);
  padding-bottom: 2px;
  margin-left: auto;
}
.urgence .tel:hover { color: var(--opale); }

/* --- Blocs de prestations. Un filet vert, comme un repérage. --- */
.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.6rem 2.2rem;
  margin-top: 1.6rem;
}
.grille > div { border-left: 3px solid var(--opale); padding-left: 1.1rem; }
.grille h3 { margin-top: 0; font-size: 1.1rem; }
.grille p { margin-bottom: 0; }

/* --- Sections repérées (pages internes) --- */
.repere { border-left: 3px solid var(--opale); padding-left: 1.4rem; margin-bottom: 2.6rem; }
.repere h2 { margin-top: 0; }
.repere > :last-child { margin-bottom: 0; }

/* --- Listes --- */
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .4rem; }
ol.etapes { counter-reset: etape; list-style: none; padding-left: 0; }
ol.etapes li {
  counter-increment: etape;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: .8rem;
}
ol.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: .1rem;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  background: var(--vert-pale);
  color: var(--vert-appui);
  font-weight: 600;
  font-size: .95rem;
  border-radius: 50%;
}

/* --- Fiche chantier --- */
.chantier {
  background: var(--blanc-casse);
  border: 1px solid var(--gris-motif);
  border-left: 3px solid var(--vert);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.6rem;
}
.chantier h3 { margin-top: 0; }
.chantier dl { margin: 0; }
.chantier dt { font-weight: 600; color: var(--anthracite); margin-top: .8rem; }
.chantier dt:first-child { margin-top: 0; }
.chantier dd { margin: .15rem 0 0; max-width: var(--prose); }

/* --- Coordonnées --- */
.coord { font-size: 1.35rem; font-weight: 600; }
.coord a { color: var(--vert-appui); text-decoration: none; border-bottom: 2px solid var(--opale); }
.coord a:hover { color: var(--vert-survol); }

/* --- Formulaire --- */
.form { max-width: 640px; margin-top: 1.4rem; }
.form p { margin-bottom: 1rem; max-width: none; }
.form label { display: block; font-weight: 600; color: var(--anthracite); margin-bottom: .25rem; }
.form .facultatif { font-weight: 400; color: #5c5c62; }
.form input[type="text"],
.form input[type="tel"],
.form input[type="email"],
.form textarea,
.form input[type="file"] {
  width: 100%;
  font: inherit;
  color: var(--texte);
  padding: .6rem .7rem;
  border: 1px solid #9a9a9e;
  border-radius: 3px;
  background: #fff;
}
.form textarea { min-height: 9rem; resize: vertical; }
.form .cache { position: absolute; left: -9999px; }
.mention { font-size: .93rem; color: #4a4a50; max-width: var(--prose); }

/* --- Pied de page --- */
.pied { background: var(--anthracite); color: #e8e8e6; padding: 2.8rem 1.25rem 2rem; margin-top: 3rem; }
.pied__interieur {
  max-width: var(--largeur);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.8rem 2.4rem;
}
.pied h2 { color: var(--opale); font-size: 1rem; margin: 0 0 .6rem; }
.pied p, .pied li { color: #e8e8e6; max-width: 34ch; }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: .35rem; }
.pied a { color: #e8e8e6; }
.pied a:hover { color: var(--opale); }
.pied__logo img { width: 160px; margin-bottom: .9rem; }
.pied__bas {
  max-width: var(--largeur);
  margin: 2.2rem auto 0;
  padding-top: 1.1rem;
  border-top: 1px solid #45413f;
  font-size: .92rem;
  color: #b9b7b3;
}
.pied__bas p { color: #b9b7b3; max-width: none; margin: 0; }

/* --- Accès clavier --- */
.evite {
  position: absolute;
  left: -9999px;
  background: var(--anthracite);
  color: #fff;
  padding: .7rem 1rem;
  z-index: 50;
}
.evite:focus { left: .5rem; top: .5rem; }

/* --- Pages légales --- */
.legal h2 { font-size: 1.25rem; }
.legal p { max-width: var(--prose); }
