/* =====================================================================
   SOCOREBAT – Refonte v2 des pages ville × service
   ---------------------------------------------------------------------
   À charger APRÈS /CSS/socorebat-france.css :
     <link rel="stylesheet" href="/CSS/v2.css?v=1">

   Activation section par section : chaque bloc n'agit que si sa classe
   est présente sur <html>. Rien ne change tant qu'aucune classe n'est posée.
     v2-base     typo, couleurs, boutons (à activer en premier)
     v2-header   en-tête, fil d'Ariane, bouton téléphone
     v2-haut     bannière + formulaire de devis
     v2-cards    les 4 sections de contenu (#card_1 à #card_4) + tableaux
     v2-ent      L'ENTREPRISE
     v2-fonc     Notre fonctionnement
     v2-faq      FAQ
     v2-contact  chargé d'affaires / zone d'intervention
     v2-liens    autres activités, villes proches, départements
   Exemple : <html lang="fr" class="v2-base v2-cards v2-faq">
   ===================================================================== */

:root {
  --sc-noir: #0E0E0E;
  --sc-or: #DFAF59;
  --sc-or-fonce: #7A5718;   /* or lisible sur fond clair (contraste AA) */
  --sc-creme: #FBF4E6;
  --sc-gris: #F8F6F4;
  --sc-bord: #ECE7DE;
  --sc-texte: #3A3A3A;
  --sc-titre: "Chau Philomene One", sans-serif;
  --sc-max: 1240px;
  --sc-pad: max(24px, calc((100% - var(--sc-max)) / 2)); /* marge latérale pleine largeur */
}

/* ---------------------------------------------------------------- BASE */
html.v2-base body { color: var(--sc-texte); font-size: 16px; line-height: 1.65; }
html.v2-base h1, html.v2-base h2, html.v2-base h3, html.v2-base h4 { color: var(--sc-noir); }
html.v2-base .texte_vignette a, html.v2-base .text_pres_ent > div a, html.v2-base .reponse_faq a { color: var(--sc-or-fonce); }
html.v2-base *, html.v2-base *::before, html.v2-base *::after { box-sizing: border-box; }

/* -------------------------------------------------------------- HEADER */
html.v2-header header { box-shadow: 0 1px 0 var(--sc-bord), 0 8px 24px rgba(0,0,0,.06); }
html.v2-header #logo_hab_presta { height: 64px; width: auto; }
html.v2-header #fil_ariane { font-size: 13px; color: #6B6B6B; }
html.v2-header #fil_ariane a { color: #6B6B6B; text-decoration: none; }
html.v2-header #fil_ariane a:hover { color: var(--sc-noir); }
@media (min-width: 769px) {
html.v2-header #texte_tel, html.v2-header #texte_tel_port {
  display: inline-flex; align-items: center; gap: 10px; background: var(--sc-or); color: var(--sc-noir);
  font-weight: 700; border-radius: 999px; padding: 12px 20px; min-height: 44px; cursor: pointer;
}
html.v2-header #texte_tel svg, html.v2-header #texte_tel_port svg { font-size: 16px; }
}

/* ------------------------------------------------------ HAUT DE PAGE */
html.v2-haut #haut {
  height: auto; min-height: 640px; background: var(--sc-noir); overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 48px; align-items: center;
  padding: 150px var(--sc-pad) 64px;
}
html.v2-haut #haut .fond-banniere { position: absolute; inset: 0; z-index: -1; margin: 0; }
html.v2-haut #haut .fond-banniere img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
html.v2-haut #haut h1 {
  position: static; transform: none; margin: 0; text-align: left; color: #fff;
  font-family: var(--sc-titre); font-weight: 400; text-transform: uppercase;
  font-size: clamp(38px, 5vw, 64px); line-height: 1.02; text-shadow: none;
}
html.v2-haut #haut h1 a { color: inherit; text-decoration: none; }
html.v2-haut #haut .contact-form {
  position: static; margin: 0; max-width: none; width: 100%;
  border-radius: 20px; padding: 0 28px 24px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
html.v2-haut #haut .contact-form h2 {
  margin: 0 -28px 18px; padding: 16px 28px; border-radius: 20px 20px 0 0;
  font-family: var(--sc-titre); font-weight: 400; font-size: 21px; line-height: 1.2; color: var(--sc-noir);
}
html.v2-haut .contact-form .form-row { gap: 12px; }
html.v2-haut .contact-form label { font-weight: 600; font-size: 13px; color: var(--sc-noir); }
html.v2-haut .contact-form input:not([type=checkbox]):not([type=hidden]),
html.v2-haut .contact-form textarea { width: 100%; border: 1px solid #D9D3C8; border-radius: 10px; padding: 11px 12px; }
html.v2-haut .contact-form button {
  width: 100%; margin-top: 12px; background: var(--sc-noir); color: var(--sc-or); border: 0; border-radius: 999px;
  padding: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
html.v2-haut .contact-form button:hover { background: #2A2824; }

/* ----------------------------------------- SECTIONS DE CONTENU (#cards) */
/* 1) Neutralise l'empilement animé et les zones de texte à ascenseur */
html.v2-cards #cards {
  display: block; padding: 0; margin: 0; outline: 0; background: none;
  view-timeline-name: none; grid-template-rows: none;
}
html.v2-cards #cards .card { position: static; height: auto; padding: 0; margin: 0; top: auto; }
html.v2-cards #card_2, html.v2-cards #card_4 { background: var(--sc-gris); }
html.v2-cards .card__content {
  animation: none !important; transform: none !important; will-change: auto;
  box-shadow: none; border-radius: 0; background: transparent; overflow: visible; color: var(--sc-texte);
  max-width: var(--sc-max); margin: 0 auto; padding: 88px 24px;
  display: grid; gap: 0 56px; align-items: start;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "img titre" "img texte";
}
html.v2-cards #card_2 .card__content, html.v2-cards #card_4 .card__content {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "titre img" "texte img";
}
html.v2-cards .card__content > img {
  grid-area: img; float: none; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 24px; position: sticky; top: 120px; margin: 0;
}
html.v2-cards .card__content > h2 {
  grid-area: titre; margin: 0 0 20px; font-family: var(--sc-titre); font-weight: 400;
  font-size: clamp(28px, 3.2vw, 42px); line-height: 1.1; color: var(--sc-noir);
  background: none; padding: 0; border-radius: 0; width: auto; display: block; text-align: left; box-shadow: none;
}
html.v2-cards .texte_vignette { grid-area: texte; max-height: none; overflow: visible; padding: 0; color: var(--sc-texte); }
html.v2-cards .texte_vignette, html.v2-cards .texte_vignette p { font-size: 16px; line-height: 1.65; }
html.v2-cards .texte_vignette p { margin: 0 0 14px; }
html.v2-cards .texte_vignette strong { color: var(--sc-noir); }
html.v2-cards .texte_vignette h3 {
  margin: 32px 0 14px; font-family: var(--sc-titre); font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--sc-noir);
}

/* 2) Tableaux (écrase les styles en ligne de l'éditeur) */
html.v2-cards .texte_vignette table {
  width: 100% !important; height: auto !important; margin: 24px 0 !important;
  border-collapse: separate !important; border-spacing: 0 !important;
  border: 1px solid var(--sc-bord) !important; border-radius: 18px; overflow: hidden;
  background: #fff; font-size: 14.5px; line-height: 1.5;
}
html.v2-cards .texte_vignette tr,
html.v2-cards .texte_vignette th,
html.v2-cards .texte_vignette td { height: auto !important; }
html.v2-cards .texte_vignette th,
html.v2-cards .texte_vignette td {
  border: 0 !important; border-top: 1px solid var(--sc-bord) !important;
  padding: 14px 18px !important; text-align: left; vertical-align: top; color: var(--sc-texte);
}
html.v2-cards .texte_vignette tr:first-child th {
  border-top: 0 !important; background: var(--sc-noir); color: var(--sc-or);
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
}
html.v2-cards .texte_vignette td:first-child { font-weight: 700; color: var(--sc-noir); }
html.v2-cards .texte_vignette th p, html.v2-cards .texte_vignette td p { margin: 0; font-size: inherit; }
html.v2-cards .texte_vignette col { width: auto !important; }

/* 3) Listes à puces du contenu → cartes (ex. usages des combles) */
html.v2-cards .texte_vignette ul {
  list-style: none; padding: 0; margin: 22px 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
}
html.v2-cards .texte_vignette li {
  background: #fff; border: 1px solid var(--sc-bord); border-radius: 16px; padding: 18px 20px; font-size: 15px; line-height: 1.6;
}
html.v2-cards #card_2 .texte_vignette li, html.v2-cards #card_4 .texte_vignette li { border-color: #E5DED2; }
html.v2-cards .texte_vignette li::before {
  content: ""; display: block; width: 28px; height: 4px; border-radius: 2px; background: var(--sc-or); margin-bottom: 12px;
}

/* --------------------------------------------------------- L'ENTREPRISE */
html.v2-ent #presentation { background: var(--sc-creme); margin: 0; padding: 96px var(--sc-pad); }
html.v2-ent #pres_ent { width: auto; margin: 0; }
html.v2-ent .text_pres_ent { background: none; padding: 0; margin: 0; }  /* retire la bande dorée de fond */
html.v2-ent #pres_ent h2 {
  background: none; text-decoration: none; padding: 0; margin: 0 0 24px; color: var(--sc-noir);
  font-family: var(--sc-titre); font-weight: 400; font-size: clamp(40px, 5vw, 56px); line-height: 1;
}
html.v2-ent .text_pres_ent > div { display: flex; flex-direction: column; gap: 0; }
html.v2-ent .text_pres_ent > div > p:first-child { font-size: 18px; color: #1F1F1F; max-width: 860px; margin: 0 0 32px; }
html.v2-ent .text_pres_ent > div > p:nth-of-type(2),
html.v2-ent .text_pres_ent > div > p:nth-of-type(3) { font-weight: 700; color: var(--sc-noir); font-size: 17px; margin: 8px 0 14px; }
/* Prestations : liste à coches sur 2 colonnes */
html.v2-ent .text_pres_ent ul:nth-of-type(1) {
  list-style: none; margin: 0 0 32px; padding: 26px 28px; background: #fff; border-radius: 20px;
  columns: 2 280px; column-gap: 36px;
}
html.v2-ent .text_pres_ent ul:nth-of-type(1) li { break-inside: avoid; position: relative; padding: 0 0 10px 36px; }
html.v2-ent .text_pres_ent ul:nth-of-type(1) li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--sc-or) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E0E0E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
/* Pourquoi choisir : 4 cartes numérotées */
html.v2-ent .text_pres_ent ul:nth-of-type(2) {
  list-style: none; margin: 0 0 32px; padding: 0; counter-reset: why;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
}
html.v2-ent .text_pres_ent ul:nth-of-type(2) li {
  counter-increment: why; background: #fff; border-radius: 16px; padding: 20px; font-size: 14.5px;
}
html.v2-ent .text_pres_ent ul:nth-of-type(2) li::before {
  content: "0" counter(why); display: block; font-family: var(--sc-titre); color: var(--sc-or-fonce); font-size: 24px; line-height: 1; margin-bottom: 10px;
}
/* Phrase devis → encadré noir */
html.v2-ent .text_pres_ent > div > p:nth-of-type(4) {
  margin: 0; background: var(--sc-noir); color: #fff; font-weight: 600; border-radius: 20px; padding: 22px 26px;
}
/* "N'hésitez plus…" → bandeau doré ; villes → pastilles */
html.v2-ent .text_pres_ent > p {
  margin: 24px 0 14px; background: var(--sc-or); color: var(--sc-noir); border-radius: 20px; padding: 22px 26px;
  font-family: var(--sc-titre); font-size: 22px; line-height: 1.3;
}
html.v2-ent .text_pres_ent > a {
  display: inline-block; margin: 0 6px 8px 0; padding: 6px 14px; border-radius: 999px;
  border: 1px solid #E2D3B4; background: #fff; color: var(--sc-noir); text-decoration: none; font-size: 13.5px; font-weight: 400;
}

/* ------------------------------------------------- NOTRE FONCTIONNEMENT */
html.v2-fonc #fonctionnement { padding: 96px var(--sc-pad); background: #fff; }
html.v2-fonc #fonctionnement > h3 {
  margin: 0 0 40px; font-family: var(--sc-titre); font-weight: 400; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; text-align: left;
  background: none; padding: 0; border-radius: 0; display: block; width: auto; color: var(--sc-noir); box-shadow: none;
}
html.v2-fonc #tt_vignette_fonc { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
html.v2-fonc .vign_fonc {
  float: none; width: auto; margin: 0; padding: 0; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--sc-bord) !important; border-radius: 20px !important; overflow: hidden;
}
html.v2-fonc .vign_fonc img { order: -1; width: 100%; height: 170px; object-fit: cover; display: block; }
html.v2-fonc .num_etapes {
  width: auto; background: none; border-radius: 0; text-shadow: none; text-align: left;
  font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sc-or-fonce); padding: 20px 22px 0;
}
html.v2-fonc .text_fonc { padding: 6px 22px 24px; font-size: 14.5px; color: #444; }
html.v2-fonc .text_fonc h4 { margin: 0 0 10px; font-family: var(--sc-titre); font-weight: 400; font-size: 21px; line-height: 1.2; text-decoration: none; color: var(--sc-noir); background: none; padding: 0; }
html.v2-fonc .text_fonc a { display: inline; background: none; padding: 0; margin: 0; width: auto; border-radius: 0; color: var(--sc-or-fonce); font-weight: 700; text-decoration: underline; }
html.v2-fonc #btn_ddd { margin-top: 32px; text-align: center; }
html.v2-fonc #btn_ddd a {
  display: inline-block; background: var(--sc-noir); color: var(--sc-or); text-decoration: none;
  font-weight: 700; padding: 14px 28px; border-radius: 999px;
}

/* ----------------------------------------------------------------- FAQ */
html.v2-faq #faq { background: var(--sc-gris); padding: 96px max(24px, calc((100% - 900px) / 2)); }
html.v2-faq #titre_faq {
  text-align: left; margin: 0 0 28px; font-family: var(--sc-titre); font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; color: var(--sc-noir);
}
html.v2-faq .question_faq {
  background: #fff; border: 1px solid var(--sc-bord); border-radius: 16px; margin: 0 0 12px; padding: 20px 24px;
  font-size: 16.5px; line-height: 1.5; color: var(--sc-noir); cursor: pointer;
}
html.v2-faq .question_faq:hover { border-color: var(--sc-or); }
html.v2-faq .question_faq svg { color: var(--sc-or); margin-left: 16px; }
html.v2-faq .question_faq br { display: none; }
html.v2-faq .reponse_faq { padding-top: 12px; color: #444; font-size: 15.5px; line-height: 1.65; }

/* ------------------------------------------- CHARGÉ D'AFFAIRES / ZONE */
html.v2-contact #cont_inter { padding: 64px var(--sc-pad); }
html.v2-contact #int_cont_inter { background: var(--sc-noir); color: #D8D2C6; border-radius: 20px; padding: 28px; }
html.v2-contact #int_cont_inter h4 { color: #fff; font-family: var(--sc-titre); font-weight: 400; font-size: 21px; line-height: 1.25; margin: 0 0 16px; }
html.v2-contact #tel_inter_presta { font-family: var(--sc-titre); font-size: 26px; color: var(--sc-or); }
html.v2-contact #secteur_inter { background: #1A1917; border-radius: 14px; padding: 14px 16px; color: #EDE8DF; margin-top: 16px; }
html.v2-contact #secteur_inter h5 { color: var(--sc-or); font-size: 14px; margin: 16px 0 4px; }
html.v2-contact #lien_ss_map a { font-size: 13px; color: #6B6B6B; }

/* ------------------------------------------------- LIENS DE MAILLAGE */
html.v2-liens #situe_soco { padding: 48px var(--sc-pad); }
html.v2-liens #titre_situe { font-weight: 700; color: var(--sc-noir); font-size: 16px; margin: 24px 0 12px; }
html.v2-liens #lien_soco a, html.v2-liens #lien_soco3 a {
  display: inline-block; margin: 0 6px 8px 0; padding: 6px 14px; border-radius: 999px;
  border: 1px solid #D9D3C8; color: var(--sc-noir); text-decoration: none; font-size: 13.5px;
}
html.v2-liens #lien_soco a:hover, html.v2-liens #lien_soco3 a:hover { border-color: var(--sc-or); }

/* -------------------------------------------------------------- MOBILE */
@media (max-width: 768px) {
  html.v2-haut #haut { grid-template-columns: minmax(0, 1fr); padding: 120px 20px 40px; gap: 28px; min-height: 0; }
  html.v2-haut #haut .contact-form { padding: 0 20px 20px; }
  html.v2-haut #haut .contact-form h2 { margin: 0 -20px 16px; padding: 14px 20px; }
  html.v2-cards .card__content,
  html.v2-cards #card_2 .card__content,
  html.v2-cards #card_4 .card__content {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "titre" "img" "texte"; padding: 56px 20px;
  }
  html.v2-cards .card__content > img { position: static; margin: 0 0 24px; aspect-ratio: 16 / 10; }
  html.v2-cards .texte_vignette table { display: block; overflow-x: auto; }
  html.v2-cards .texte_vignette table tbody { display: table; width: 100%; min-width: 560px; }
  html.v2-ent #presentation, html.v2-fonc #fonctionnement, html.v2-faq #faq { padding-top: 64px; padding-bottom: 64px; }
}
