/* =========================================================
   Manélec – feuille de styles du site public
   Contrastes vérifiés AA (texte ≥ 4,5:1, grands textes ≥ 3:1)
   ========================================================= */

@font-face { font-family: "Outfit"; font-weight: 400; font-display: swap; src: url("../fonts/outfit-400.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 500; font-display: swap; src: url("../fonts/outfit-500.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url("../fonts/outfit-600.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 800; font-display: swap; src: url("../fonts/outfit-800.woff2") format("woff2"); }

:root {
  --vert-nuit: #0f2414;
  --vert-fonce: #1f5d2a;   /* texte sur clair : 7,9:1 */
  --vert: #2b7a35;         /* boutons, liens : 5,3:1 sur blanc */
  --vert-vif: #5dae2e;     /* décoratif uniquement */
  --citron: #b9ee7a;       /* décoratif / texte sur fond nuit */
  --bleu: #1e5fbf;         /* 6,2:1 sur blanc */
  --jaune: #ffb627;        /* décoratif */
  --rouge: #b42318;        /* 6,5:1 sur blanc */
  --rouge-fond: #fdecea;
  --fond: #f4f7f0;
  --carte: #ffffff;
  --texte: #1b2420;        /* 15:1 */
  --texte-doux: #4b5563;   /* 7,5:1 */
  --bord: #cfdcc5;
  --ombre: 0 10px 30px rgba(15, 36, 20, 0.08);
  --rayon: 18px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
}
img, svg { max-width: 100%; }
a { color: var(--vert); text-underline-offset: 3px; }
a:hover { color: var(--vert-fonce); }
h1, h2, h3 { line-height: 1.15; color: var(--vert-nuit); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.6rem; }
h3 { font-size: 1.2rem; font-weight: 600; margin: 0 0 0.3rem; }
p { margin: 0 0 1rem; }

:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 6px; }

.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lien-evitement {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--vert-nuit); color: #fff; padding: 0.75rem 1rem; border-radius: 10px; font-weight: 600;
}
.lien-evitement:focus { top: 1rem; color: #fff; }

.conteneur { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* ---------------- En-tête ---------------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bord);
}
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 60px; }
.marque { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--vert-fonce); }
.marque svg { width: 36px; height: 44px; flex: none; }
.marque-nom { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.marque-nom span { color: var(--vert); }
.marque-sous { display: block; font-size: 0.68rem; letter-spacing: 0.18em; font-weight: 600; color: var(--bleu); margin-top: 3px; }
.entete-actions { display: flex; align-items: center; gap: 0.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.3rem;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(0.97); }
.btn-principal { background: var(--vert); color: #fff; box-shadow: 0 6px 18px rgba(43, 122, 53, 0.3); }
.btn-principal:hover { background: var(--vert-fonce); color: #fff; }
.btn-secondaire { background: #fff; color: var(--vert-fonce); border-color: var(--vert); }
.btn-secondaire:hover { background: #eef6e8; color: var(--vert-fonce); }
.btn-appel { background: var(--vert-nuit); color: #fff; }
.btn-appel:hover { background: #000; color: #fff; }
.btn-son {
  background: #fff; color: var(--vert-fonce); border-color: var(--bord);
  padding: 0.55rem 0.9rem; min-width: 48px;
}
.btn-son[aria-pressed="true"] { background: #fff7e0; border-color: var(--jaune); }
.btn-son .etat { font-size: 0.9rem; }
@media (max-width: 560px) {
  .btn-appel .btn-texte, .btn-son .btn-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .btn-appel, .btn-son { padding: 0.6rem; }
  .marque-sous { display: none; }
}

/* ---------------- Bandeau du haut (accroche + formulaire visibles d'emblée) ---------------- */
.haut { padding: 14px 0 clamp(1.5rem, 4vw, 3rem); }
.haut-grille { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.haut-texte { display: flex; flex-direction: column; gap: 0.75rem; padding-top: clamp(0px, 2vw, 18px); }
.haut h1 { font-size: clamp(2rem, 5.2vw, 3.5rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin: 0; }
.manu { display: flex; align-items: center; gap: 0.75rem; }
.manu-photo { flex: none; padding: 0; border: 3px solid #fff; border-radius: 50%; background: none; cursor: pointer; box-shadow: 0 0 0 2px var(--vert), 0 6px 16px rgba(15,36,20,.18); transition: transform .15s; }
.manu-photo:hover { transform: scale(1.05); }
.photo { display: grid; place-items: end center; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #dff3c9, #a9d97d); color: #4e9a35; }
.photo svg { width: 88%; height: 88%; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.grande { width: 96px; height: 96px; flex: none; }
.bulle {
  position: relative; margin: 0; padding: 0.55rem 0.9rem; border-radius: 16px; background: #fff; border: 2px solid var(--vert);
  font-weight: 700; color: var(--vert-fonce); font-size: 1.02rem; line-height: 1.25;
}
/* pointe de la bulle : un triangle vert (le contour) recouvert d'un triangle blanc décalé */
.bulle::before, .bulle::after { content: ""; position: absolute; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-style: solid; }
.bulle::before { left: -12px; border-width: 9px 12px 9px 0; border-color: transparent var(--vert) transparent transparent; }
.bulle::after { left: -9px; border-width: 7px 10px 7px 0; border-color: transparent #fff transparent transparent; }
.chapeau { margin: 0; font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--texte-doux); line-height: 1.5; }
.chapeau strong { color: var(--vert-fonce); }
.colonne-plus { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 0.3rem; }
.colonne-plus .pastilles { margin: 0; }
.carte-appel { display: flex; align-items: center; gap: 1rem; background: var(--vert-nuit); color: #fff; border-radius: 20px; padding: 0.9rem 1.1rem; text-decoration: none; }
.carte-appel:hover { color: #fff; background: #000; }
.carte-appel .picto { width: 40px; height: 49px; flex: none; }
.carte-appel .petit { display: block; color: #d6e4cd; font-size: 0.95rem; }
.carte-appel .numero { display: block; font-size: 1.65rem; font-weight: 800; color: var(--citron); letter-spacing: 0.01em; }
.seulement-mobile { display: none !important; }
@media (max-width: 860px) {
  .haut-grille { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .seulement-large { display: none !important; }
  .seulement-mobile { display: revert !important; }
  .haut-texte { gap: 0.55rem; padding-top: 0; }
  .photo { width: 50px; height: 50px; }
  .bulle { font-size: 0.95rem; padding: 0.45rem 0.75rem; }
}
.pastilles { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.pastilles li {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.8rem;
  background: #fff; border: 1px solid var(--bord); border-radius: 999px; font-size: 0.92rem; font-weight: 500; color: var(--vert-fonce);
}
.pastilles svg { width: 18px; height: 18px; color: var(--vert); }

/* ---------------- Bandeau sécurité ---------------- */
.securite {
  display: flex; gap: 0.9rem; align-items: flex-start;
  background: var(--rouge-fond); border: 2px solid #f4b4ad; color: #5a130d;
  border-radius: var(--rayon); padding: 1rem 1.2rem;
}
.securite svg { width: 28px; height: 28px; color: var(--rouge); flex: none; margin-top: 2px; }
.securite p { margin: 0; }
.securite strong { color: var(--rouge); }

/* ---------------- Sections ---------------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-tete { max-width: 46rem; margin-bottom: 1.8rem; }
.section-tete p { color: var(--texte-doux); font-size: 1.12rem; }
.surtitre {
  display: inline-block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bleu); margin-bottom: 0.4rem;
}

/* ---------------- Formulaire ---------------- */
.bloc-demande {
  background: var(--carte); border-radius: 26px; box-shadow: var(--ombre);
  border: 1px solid var(--bord); padding: clamp(1rem, 3vw, 1.8rem); scroll-margin-top: 80px;
}
.demande-tete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.demande-tete h2 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.55rem); }
.mini-pile { display: flex; align-items: center; gap: 0.45rem; font-weight: 700; color: var(--vert-fonce); font-size: 0.92rem; flex: none; }
.mini-pile-corps { position: relative; width: 44px; height: 20px; border: 2px solid var(--vert-nuit); border-radius: 5px; padding: 2px; box-sizing: border-box; display: flex; }
.mini-pile-corps::after { content: ""; position: absolute; right: -6px; top: 4px; width: 3px; height: 8px; background: var(--vert-nuit); border-radius: 0 2px 2px 0; }
.mini-pile-niveau { width: 0%; background: linear-gradient(90deg, #5dae2e, #b9ee7a); border-radius: 2px; transition: width .5s cubic-bezier(.2,.9,.3,1.2); }
.mini-pile.pleine .mini-pile-corps { box-shadow: 0 0 0 4px rgba(255, 182, 39, 0.4); }
.securite-ligne { margin: 0 0 0.9rem; font-size: 0.92rem; color: #8a1c12; }
.securite-ligne strong { color: var(--rouge); }
.securite-ligne a { color: #8a1c12; }

.mention-obligatoire { color: var(--texte-doux); font-size: 0.95rem; }
.champ { margin-bottom: 1.05rem; }
.ligne-champs { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0.7rem; }
@media (min-width: 861px) { .ligne-champs.trois { grid-template-columns: minmax(0, 1fr) 130px minmax(0, 0.8fr); } .ligne-champs.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ligne-champs .champ { min-width: 0; }
.champ > label, .champ legend { display: block; font-weight: 600; margin-bottom: 0.35rem; color: var(--vert-nuit); }
.champ fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.champ legend { padding: 0; }
.requis { color: var(--rouge); font-weight: 800; margin-left: 2px; }
.aide { font-size: 0.93rem; color: var(--texte-doux); margin: -0.15rem 0 0.45rem; }
.erreur-champ {
  display: flex; gap: 0.4rem; align-items: center;
  color: var(--rouge); font-weight: 600; font-size: 0.95rem; margin: 0.4rem 0 0;
}
.erreur-champ[hidden] { display: none; }
.erreur-champ svg { width: 18px; height: 18px; flex: none; }

input[type="text"], input[type="tel"], input[type="email"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; min-height: 50px; padding: 0.7rem 0.9rem;
  font: inherit; color: var(--texte); background: #fbfdf9;
  border: 2px solid #8fa688; border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 140px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--vert); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(30, 95, 191, 0.22); }
[aria-invalid="true"] { border-color: var(--rouge) !important; background: #fff8f7; }

.choix-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
@media (min-width: 1400px) { .choix-grille { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.choix { position: relative; }
.choix input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choix label {
  display: flex; align-items: center; gap: 0.6rem; min-height: 62px; height: 100%; line-height: 1.15;
  padding: 0.55rem 0.7rem; border: 2px solid var(--bord); border-radius: 14px; background: #fbfdf9;
  cursor: pointer; font-weight: 500; transition: border-color 0.15s, background-color 0.15s, transform 0.1s;
}
.choix label:hover { border-color: var(--vert); }
.choix .choix-titre { display: block; font-weight: 700; font-size: 1rem; color: var(--vert-nuit); }
.choix .choix-sous { display: block; font-size: 0.84rem; color: var(--texte-doux); }
.choix.urgence .choix-titre { color: #8a1c12; }
.choix .pictochoix { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #e8f4dd; color: var(--vert-fonce); }
.choix .pictochoix svg { width: 22px; height: 22px; }
.choix input:checked + label { border-color: var(--vert); background: #eef8e6; box-shadow: inset 0 0 0 1px var(--vert); }
.choix input:focus-visible + label { outline: 3px solid var(--bleu); outline-offset: 2px; }
.choix.urgence .pictochoix { background: var(--rouge-fond); color: var(--rouge); }
.choix.urgence input:checked + label { border-color: var(--rouge); background: #fff4f2; box-shadow: inset 0 0 0 1px var(--rouge); }

.cases { display: grid; gap: 0.5rem; }
.case { display: flex; gap: 0.7rem; align-items: flex-start; }
.case input { width: 24px; height: 24px; margin: 0.15rem 0 0; accent-color: var(--vert); flex: none; }
.case label { font-weight: 400; }
.consentement { background: #f6faf2; border: 1px solid var(--bord); border-radius: 14px; padding: 0.9rem 1rem; }

.alerte-urgence { margin: 0.8rem 0 0; }
.alerte-urgence[hidden] { display: none; }

.pot-de-miel { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.resume-erreurs {
  border: 2px solid var(--rouge); background: #fff8f7; border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1.4rem;
}
.resume-erreurs h3 { color: var(--rouge); margin-bottom: 0.4rem; }
.resume-erreurs ul { margin: 0; padding-left: 1.2rem; }
.resume-erreurs a { color: var(--rouge); font-weight: 600; }

.zone-envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.zone-envoi .btn { font-size: 1.1rem; padding-inline: 1.8rem; }
.zone-envoi .btn[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
#turnstile { min-height: 65px; }
.message-global { font-weight: 600; color: var(--rouge); margin-top: 0.8rem; }
.message-global:empty { display: none; }
.chargement { color: var(--texte-doux); }

/* Réussite */
.reussite { text-align: center; padding: 1rem 0; }
.reussite svg.ampoule { width: 140px; height: auto; }
.reussite h2 { margin-top: 0.6rem; }
.reussite .ref { display: inline-block; font-weight: 800; font-size: 1.3rem; background: #eef8e6; color: var(--vert-fonce); padding: 0.3rem 0.9rem; border-radius: 10px; letter-spacing: 0.06em; }
.reussite .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.2rem; }

/* ---------------- Présentation ---------------- */
.artisan { display: grid; grid-template-columns: 300px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 760px) { .artisan { grid-template-columns: 1fr; } }
.portrait { margin: 0; padding: 0; border: 0; cursor: pointer; aspect-ratio: 4 / 5; width: 100%; max-width: 300px; border-radius: 28px; overflow: hidden; box-shadow: var(--ombre); background: none; }
.portrait .photo { width: 100%; height: 100%; border-radius: 28px; }
.portrait:hover { transform: translateY(-3px); transition: transform .2s; }
.atouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; list-style: none; padding: 0; margin: 1.4rem 0 0; }
@media (max-width: 560px) { .atouts { grid-template-columns: 1fr; } }
.atouts li { background: #fff; border: 1px solid var(--bord); border-radius: 16px; padding: 0.9rem 1rem; }
.atouts strong { display: block; color: var(--vert-fonce); font-size: 1.05rem; }
.atouts span { color: var(--texte-doux); font-size: 0.95rem; }

/* ---------------- Prestations ---------------- */
.prestations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
@media (max-width: 900px) { .prestations { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .prestations { grid-template-columns: 1fr; } }
.prestation {
  background: #fff; border: 1px solid var(--bord); border-radius: 20px; padding: 1.3rem 1.3rem 1.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.prestation:hover { transform: translateY(-4px); box-shadow: var(--ombre); }
.prestation .icone {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 0.8rem;
  background: linear-gradient(145deg, #e9f7da, #c9eba2); color: var(--vert-fonce);
}
.prestation .icone svg { width: 28px; height: 28px; }
.prestation p { color: var(--texte-doux); margin: 0; }

/* ---------------- Zone ---------------- */
.zone { background: var(--vert-nuit); color: #e8f2e0; border-radius: 22px; padding: 1rem 1.2rem 0.8rem; }
.zone .surtitre { color: var(--citron); margin: 0; }
.zone-titre { margin: 0.1rem 0 0.4rem; color: #fff; font-weight: 800; font-size: 1.2rem; }
.carte-zone { width: 100%; height: auto; display: block; }
.carte-zone .fil { stroke-dasharray: 520; stroke-dashoffset: 520; }
.allume .carte-zone .fil { animation: tracer 2.2s ease-out 0.4s forwards; }
@keyframes tracer { to { stroke-dashoffset: 0; } }

/* ---------------- Fenêtres (présentation, porte) ---------------- */
.fenetre { border: 0; border-radius: 24px; padding: 1.4rem; width: min(92vw, 30rem); box-shadow: 0 24px 70px rgba(0,0,0,.35); color: var(--texte); }
.fenetre::backdrop { background: rgba(15, 36, 20, 0.6); }
.fenetre-tete { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.9rem; }
.fenetre-tete h2 { margin: 0 0 0.4rem; font-size: 1.5rem; }
.fenetre .bulle { display: inline-block; font-size: 0.95rem; }
.fenetre .bulle::before, .fenetre .bulle::after { display: none; }
.pres-texte { white-space: pre-line; color: var(--texte); }
.fenetre-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-end; margin-top: 1rem; }
.fenetre.petite { width: min(92vw, 22rem); }
.fenetre.petite h2 { font-size: 1.2rem; }
.fenetre.petite label { display: block; font-weight: 600; margin: 0.4rem 0 0.3rem; }
.fenetre.petite input { width: 100%; min-height: 48px; border: 2px solid #8fa688; border-radius: 12px; padding: 0.5rem 0.8rem; font: inherit; }

/* ---------------- Adresse assistée ---------------- */
.saisie-assistee { position: relative; }
.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 0.3rem; list-style: none;
  background: #fff; border: 2px solid var(--vert); border-radius: 14px; box-shadow: var(--ombre); max-height: 280px; overflow-y: auto;
}
.suggestions[hidden] { display: none; }
.suggestions li { padding: 0.6rem 0.7rem; border-radius: 10px; cursor: pointer; line-height: 1.3; }
.suggestions li small { display: block; color: var(--texte-doux); }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: #eef8e6; }
.distance { display: flex; align-items: center; gap: 0.4rem; margin: -0.4rem 0 1rem; font-weight: 600; color: var(--vert-fonce); font-size: 0.95rem; }
.distance:empty { display: none; }
.distance.loin { color: #8a4b00; }
.distance svg { width: 18px; height: 18px; flex: none; }

/* ---------------- Pied de page ---------------- */
.pied { background: #fff; border-top: 1px solid var(--bord); padding: 2.5rem 0 2rem; margin-top: 2rem; font-size: 0.97rem; }
.pied .conteneur { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .pied .conteneur { grid-template-columns: 1fr; } }
.pied h2 { font-size: 1.05rem; letter-spacing: 0; margin-bottom: 0.6rem; }
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.pied .credits { grid-column: 1 / -1; border-top: 1px solid var(--bord); padding-top: 1rem; color: var(--texte-doux); font-size: 0.9rem; }
.pied-marque { display: flex; align-items: center; gap: 0.7rem; }
.pied-marque p { margin: 0; line-height: 1.2; }
.pied-marque .marque-nom { font-size: 1.4rem; font-weight: 800; color: var(--vert-fonce); letter-spacing: -0.03em; }
.pied-marque .marque-nom span { color: var(--vert); }
.pied .slogan { color: var(--texte-doux); }
.porte { width: 40px; height: 49px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }

/* ---------------- Pages de contenu (légal) ---------------- */
.page-texte { background: #fff; border-radius: 24px; border: 1px solid var(--bord); padding: clamp(1.25rem, 4vw, 3rem); margin: 2rem auto; max-width: 52rem; }
.page-texte h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin-top: 0; }
.page-texte h2 { font-size: 1.4rem; margin-top: 2rem; }
.page-texte h3 { margin-top: 1.2rem; }
.page-texte table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.97rem; }
.page-texte th, .page-texte td { text-align: left; border: 1px solid var(--bord); padding: 0.55rem 0.7rem; vertical-align: top; }
.page-texte th { background: #f1f7ec; }
.a-completer { background: #fff3cd; color: #5c4400; padding: 0 0.3rem; border-radius: 4px; font-weight: 600; }
.maj { color: var(--texte-doux); font-size: 0.95rem; }

/* ---------------- 404 ---------------- */
.page-404 { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 3rem 1rem; }
.page-404 h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; margin: 1rem 0 0.5rem; }
.page-404 svg.ampoule { width: 150px; height: auto; animation: vacille 3s steps(1) infinite; }
@keyframes vacille {
  0%, 9%, 13%, 60%, 64%, 100% { filter: grayscale(1) brightness(0.8); }
  10%, 12%, 61%, 63% { filter: none; }
}

/* ---------------- Réduction des animations ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .carte-zone .fil { stroke-dashoffset: 0; }
  .page-404 svg.ampoule { animation: none; filter: grayscale(1); }
}

/* ---------------- Impression ---------------- */
@media print {
  .entete, .zone-envoi, .btn-son { display: none !important; }
  body { background: #fff; }
}
svg[hidden], [hidden] { display: none !important; }
.btn-petit { min-height: 44px; padding: 0.45rem 0.95rem; font-size: 0.95rem; }
@media (max-width: 860px) { .ligne-champs.trois > .champ:first-child { grid-column: 1 / -1; } .ligne-champs.deux { grid-template-columns: minmax(0, 1fr); gap: 0; } }
@media (min-width: 861px) { .ligne-champs.trois > .champ:first-child { grid-column: auto; } }

.ligne-champs .aide { margin: 0.35rem 0 0; }
@media (max-width: 860px) {
  .bloc-demande { padding: 0.9rem 0.85rem; border-radius: 22px; }
  .champ { margin-bottom: 0.8rem; }
  .champ > label, .champ legend { margin-bottom: 0.25rem; }
  .choix label { min-height: 56px; }
  .securite-ligne { margin-bottom: 0.7rem; }
  .haut { padding-top: 10px; }
}

/* ---------------- Carrousel des prestations ---------------- */
.prestations-section { padding: clamp(1.5rem, 4vw, 2.5rem) 0; }
.carrousel-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.carrousel-tete h2 { margin: 0; }
.carrousel-nav { display: flex; gap: 0.5rem; flex: none; }
.carrousel-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--vert); background: #fff; color: var(--vert-fonce);
  display: grid; place-items: center; cursor: pointer; transition: background-color .15s, opacity .15s;
}
.carrousel-btn svg { width: 20px; height: 20px; }
.carrousel-btn[data-carrousel="prec"] svg { transform: rotate(180deg); }
.carrousel-btn:hover:not(:disabled) { background: #eef8e6; }
.carrousel-btn:disabled { opacity: 0.35; cursor: default; }
.carrousel {
  list-style: none; margin: 0; padding: 0.3rem 0.1rem 0.8rem; display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 0.9rem) / 3); gap: 0.9rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carrousel::-webkit-scrollbar { display: none; }
.carrousel:focus-visible { outline: 3px solid var(--bleu); outline-offset: 4px; border-radius: 20px; }
.carrousel .prestation {
  scroll-snap-align: start; display: flex; gap: 0.9rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--bord); border-radius: 20px; padding: 1.1rem 1.1rem;
}
.carrousel .prestation:hover { transform: none; box-shadow: var(--ombre); }
.carrousel .prestation .icone { flex: none; margin: 0; }
.carrousel .prestation h3 { margin: 0 0 0.2rem; font-size: 1.08rem; }
.carrousel .prestation p { margin: 0; font-size: 0.97rem; }
@media (max-width: 900px) { .carrousel { grid-auto-columns: calc((100% - 0.9rem) / 2); } }
@media (max-width: 560px) { .carrousel { grid-auto-columns: 84%; } .carrousel-btn { width: 44px; height: 44px; } }

/* ---------------- Pied de page compact ---------------- */
.pied { padding: 1.1rem 0; margin-top: 1.5rem; }
.pied .conteneur.pied-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; }
.pied-marque { gap: 0.6rem; }
.pied-marque .marque-nom { font-size: 1.25rem; }
.pied-marque .slogan { margin-left: 0.3rem; }
.porte { width: 34px; height: 42px; }
.pied-liens { margin: 0; color: var(--texte-doux); font-size: 0.92rem; }
.ligne-champs.cp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ligne-champs.deux.toujours { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.7rem !important; }
.saisie-assistee input { width: 100%; }

/* ---------------- Effet « courant qui file » ---------------- */
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes courant-tourne { to { --angle: 360deg; } }
/* une étincelle qui fait le tour du contour : dégradé conique masqué pour ne garder que la bordure */
.courant, .carrousel .prestation::after {
  content: ""; position: absolute; pointer-events: none; border-radius: inherit;
  background: conic-gradient(from var(--angle), transparent 0deg 280deg, rgba(255, 196, 0, 0.6) 315deg, #ffc400 338deg, #fff6c2 350deg, transparent 360deg);
  filter: drop-shadow(0 0 3px rgba(255, 196, 0, 0.9));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: courant-tourne 3.2s linear infinite;
}
.courant { inset: -3px; padding: 3px; }
.fenetre .courant { display: none; }
.carrousel .prestation { position: relative; }
.carrousel .prestation::after { inset: -1px; padding: 2px; animation-duration: 6s; }
.carrousel .prestation:nth-child(2)::after { animation-delay: -1s; }
.carrousel .prestation:nth-child(3)::after { animation-delay: -2s; }
.carrousel .prestation:nth-child(4)::after { animation-delay: -3s; }
.carrousel .prestation:nth-child(5)::after { animation-delay: -4s; }
.carrousel .prestation:nth-child(6)::after { animation-delay: -5s; }
/* l'étincelle qui court le long du câble Toulouse – Lavaur – Albi */
.etincelle-fil, .etincelle-halo { stroke-dashoffset: 0; opacity: 0; }
.allume .etincelle-fil, .allume .etincelle-halo { animation: etincelle-court 2.8s linear 2.4s infinite; }
.allume .etincelle-halo { animation-name: etincelle-court-halo; }
@keyframes etincelle-court { 0% { stroke-dashoffset: 5; opacity: 1; } 90% { opacity: 1; } 100% { stroke-dashoffset: -100; opacity: 0; } }
@keyframes etincelle-court-halo { 0% { stroke-dashoffset: 6; opacity: 1; } 90% { opacity: 1; } 100% { stroke-dashoffset: -101; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .courant, .carrousel .prestation::after, .etincelle-fil, .etincelle-halo { animation: none !important; display: none; }
}

/* ---------------- Disjoncteurs des champs ---------------- */
.champ > label, .champ legend { display: flex; align-items: center; gap: 0.25rem; min-height: 36px; }
.champ legend { width: 100%; }
/* module de tableau électrique : boîtier blanc, voyant, manette qui monte quand le champ est bon */
.inter {
  position: relative; flex: none; margin-left: auto; width: 24px; height: 36px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 0 2px;
  background: linear-gradient(180deg, #ffffff, #e9ece6); border: 1px solid #9aa596; border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), inset 0 -2px 0 rgba(0,0,0,.05);
}
.inter-voyant { width: 12px; height: 5px; border-radius: 1px; background: #c8322a; transition: background-color .2s; }
.inter-fente { position: relative; width: 13px; height: 20px; border-radius: 2px; background: #3b423c; }
.inter-levier {
  position: absolute; left: 1px; right: 1px; height: 10px; bottom: 1px; border-radius: 2px;
  background: linear-gradient(180deg, #f5f5f2, #c9ccc5); box-shadow: 0 1px 1px rgba(0,0,0,.4);
  transition: bottom .22s cubic-bezier(.3,1.6,.5,1);
}
.inter.on .inter-voyant { background: #3fae2a; box-shadow: 0 0 6px #7fe05a; }
.inter.on .inter-levier { bottom: 9px; }
.inter.on::after {
  content: ""; position: absolute; inset: -5px; border-radius: 6px; border: 2px solid #ffc400; opacity: 0;
  animation: inter-flash .5s ease-out;
}
@keyframes inter-flash { 0% { opacity: 1; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .inter.on::after { display: none; } }

/* ---------------- Petits écrans et texte agrandi ----------------
   Les tuiles « De quoi avez-vous besoin ? » s'adaptent à la place réellement disponible
   (requêtes de conteneur en rem : elles suivent aussi la taille de texte choisie sur le téléphone). */
.etiq { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.choix-zone { container-type: inline-size; }
.choix label > span:last-child { min-width: 0; }
.choix .choix-titre, .choix .choix-sous { overflow-wrap: break-word; hyphens: auto; }
@container (max-width: 20rem) {
  .choix label { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.3rem; padding: 0.5rem 0.6rem; }
  .choix .pictochoix { width: 28px; height: 28px; border-radius: 8px; }
  .choix .pictochoix svg { width: 18px; height: 18px; }
}
@container (max-width: 16rem) {
  .choix-grille { grid-template-columns: minmax(0, 1fr); }
  .choix label { flex-direction: row; align-items: center; min-height: 48px; }
}
@media (max-width: 380px) {
  .conteneur { width: min(100% - 1.25rem, var(--max)); }
  .entete .conteneur { gap: 0.4rem; }
  .marque-nom { font-size: 1.3rem; }
  .marque svg { width: 30px; height: 37px; }
  .entete-actions { gap: 0.35rem; }
  .entete-actions .btn { min-height: 44px; min-width: 44px; padding: 0.5rem 0.7rem; }
  .bloc-demande { padding: 0.8rem 0.65rem; }
}
