/* Finition de l'accueil uniquement : le hero, le header et le footer gardent leur palette. */
body.csb-home {
  --home-titre: #171717;
  --home-texte: #262626;
  --home-meta: #454545;
  --home-trait: rgba(23, 23, 23, .15);
}
body.csb-home main :is(.csb-ap, .csb-rea, .csb-fz, .csb-fv-cal-accueil, .csb-fr, .csb-videos, .v4-produits, .v4-actus, .csb-faq, .csb-home-contact) :is(h2, h3, h4):not(#csb) { color: var(--home-titre); }
body.csb-home main :is(.csb-ap, .csb-rea, .csb-fz, .csb-fv-cal-accueil, .csb-fr, .csb-videos, .v4-produits, .v4-actus, .csb-faq, .csb-home-contact) :is(p, dd, li):not(#csb):not(.csb-fv-statut) { color: var(--home-texte); }
body.csb-home main :is(.csb-ap, .csb-rea, .csb-fz, .csb-fv-cal-accueil, .csb-fr, .csb-videos, .v4-produits, .v4-actus, .csb-faq) :is(time, small, .v4-actu-meta, .csb-fv-public, .csb-fz-meta):not(#csb) { color: var(--home-meta); }
body.csb-home main :is(.csb-ap, .csb-rea, .csb-fz, .csb-fr, .csb-videos, .v4-produits, .v4-actus, .csb-faq) :is(.common-subtitle span, .csb-rea-surtitre, .csb-rea-repere, .v4-prod-label):not(#csb) { color: var(--home-titre); }
body.csb-home main .csb-cn-phrase:not(#csb) { color: var(--home-texte); }
body.csb-home main .csb-cn-demarche strong:not(#csb) { color: var(--home-titre); }
body.csb-home main :is(.csb-rea-lien, .csb-fv-lien, .csb-fv-cta, .v4-cta, .v4-prod-lien):not(#csb) { color: var(--home-titre); text-decoration-color: #d6ad39; }
body.csb-home main :is(.csb-rea-lien, .csb-fv-lien, .csb-fv-cta, .v4-prod-lien):is(:hover, :focus-visible) { color: #004540; }
body.csb-home main .csb-fv-statut.is-passe:not(#csb) { color: var(--home-meta); }

/* Le centre : hauteur pilotée par le contenu, avec le lecteur étiré dans la colonne. */
@media (min-width: 1200px) {
  body.csb-home .csb-cn-grille { grid-template-columns: minmax(0, 54fr) minmax(0, 46fr); align-items: stretch; }
  body.csb-home .csb-cn-texte { align-self: stretch; }
  body.csb-home .csb-cn-colonne { display: flex; align-self: stretch; height: 100%; min-height: 0; position: static; }
  body.csb-home .csb-cn-video { flex: 1 1 auto; height: 100%; min-height: 0; aspect-ratio: auto; }
}
body.csb-home .csb-cn-video .csb-ap-video { object-fit: cover; }
@media (max-width: 1199px) {
  body.csb-home .csb-cn-colonne, body.csb-home .csb-cn-video { height: auto; }
  body.csb-home .csb-cn-video { aspect-ratio: 16 / 10; }
}
@media (max-width: 767px) {
  body.csb-home .csb-cn-video { aspect-ratio: 4 / 3; }
  body.csb-home .csb-cn-presentation p { text-align: left; hyphens: none; }
}

/* Agenda : la variation éditoriale reste sans photographie. */
body.csb-home .csb-fv-cal-accueil .csb-fv-rdv time { color: var(--home-titre); }
body.csb-home .csb-fv-cal-accueil .csb-fv-rdv h3 { color: var(--home-titre); }
body.csb-home .csb-fv-vide { align-self: center; padding: 20px 0; border-top: 1px solid var(--home-trait); border-bottom: 1px solid var(--home-trait); }

/* Actualités : trois miniatures carrées, sans transformer les lignes en cartes. */
body.csb-home .v4-mini { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: start; gap: 17px; padding-block: 14px; }
body.csb-home .v4-mini .v4-visuel { display: block; width: 84px; height: 84px; aspect-ratio: 1; overflow: hidden; border-radius: 5px; }
body.csb-home .v4-mini .v4-visuel img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.csb-home .v4-mini-titre:not(#csb) { font-family: var(--csb-font-titre, Georgia, serif); color: var(--home-titre); }
body.csb-home .v4-mini .v4-actu-meta { color: var(--home-meta); }
@media (max-width: 575px) {
  body.csb-home .v4-mini { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  body.csb-home .v4-mini .v4-visuel { width: 76px; height: 76px; }
}

/* Formulaire de contact : grille ouverte, labels visibles et états accessibles. */
body.csb-home .csb-home-contact { padding: clamp(64px, 7vw, 96px) 0; background: #fafaf7; border-top: 1px solid var(--home-trait); }
body.csb-home .csb-home-contact-grille { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(32px, 5vw, 72px); align-items: start; max-width: 1240px; }
body.csb-home .csb-home-contact-label:not(#csb) { margin: 0 0 10px; padding-left: 15px; border-left: 3px solid #e7c455; color: var(--home-titre); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
body.csb-home .csb-home-contact h2:not(#csb) { margin: 0 0 18px; font: 600 clamp(30px, 2.4vw, 40px)/1.16 var(--csb-font-titre, Georgia, serif); color: var(--home-titre); }
body.csb-home .csb-home-contact-intro > p:not(.csb-home-contact-label):not(#csb) { max-width: 47ch; margin: 0; line-height: 1.65; color: var(--home-texte); }
.csb-home-contact-coord { margin: 30px 0 0; }
.csb-home-contact-coord > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--home-trait); }
.csb-home-contact-coord dt { color: var(--home-meta); font-size: 14px; }
.csb-home-contact-coord dd { margin: 0; overflow-wrap: anywhere; line-height: 1.5; }
.csb-home-contact a { color: var(--home-titre); text-decoration: underline; text-decoration-color: #d6ad39; text-underline-offset: 4px; }
.csb-home-contact a:is(:hover, :focus-visible) { color: #004540; }
.csb-home-contact-whatsapp { display: inline-flex; gap: 6px; margin-top: 20px; font-weight: 600; }
.csb-home-contact-form { min-width: 0; }
.csb-home-contact-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.csb-home-contact-champs > div { min-width: 0; }
.csb-home-contact-champs label { display: block; margin-bottom: 7px; color: var(--home-titre); font-size: 14px; font-weight: 650; }
.csb-home-contact-facultatif { font-weight: 400; color: var(--home-meta); }
.csb-home-contact-champs :is(input, select, textarea) { display: block; width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid #b8bdb6; border-radius: 4px; background: #fff; color: var(--home-titre); font: inherit; line-height: 1.4; }
.csb-home-contact-champs :is(input, select, textarea)::placeholder { color: #626862; opacity: 1; }
.csb-home-contact-champs :is(input, select, textarea):focus-visible { border-color: #004540; outline: 2px solid #004540; outline-offset: 2px; }
.csb-home-contact-message { grid-column: 1 / -1; }
.csb-home-contact-message textarea { resize: vertical; min-height: 125px; }
.csb-home-contact-piege { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.csb-home-contact-fin { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 20px; }
body.csb-home .csb-home-contact-fin button { display: inline-flex; align-items: center; gap: 14px; min-height: 48px; padding: 11px 20px; border: 0; border-radius: 4px; background: #ffe175; color: #171717; font-weight: 700; cursor: pointer; transition: background-color .2s ease; }
body.csb-home .csb-home-contact-fin button:hover:not(:disabled) { background: #f5d355; }
body.csb-home .csb-home-contact-fin button:focus-visible { outline: 2px solid #004540; outline-offset: 3px; }
body.csb-home .csb-home-contact-fin button:disabled { opacity: .65; cursor: wait; }
body.csb-home .csb-home-contact-fin p:not(#csb) { flex: 1 1 210px; margin: 0; color: var(--home-meta); font-size: 13px; line-height: 1.45; }
body.csb-home .csb-home-contact-etat:not(#csb) { min-height: 24px; margin: 12px 0 0; font-size: 14px; font-weight: 600; }
body.csb-home .csb-home-contact-etat.is-error:not(#csb) { color: #a1271d; }
body.csb-home .csb-home-contact-etat.is-success:not(#csb) { color: #006044; }
@media (max-width: 991px) { body.csb-home .csb-home-contact-grille { grid-template-columns: 1fr; } }
@media (max-width: 575px) {
  body.csb-home .csb-home-contact-grille { width: min(100% - 40px, 1240px); padding-inline: 0; }
  .csb-home-contact-champs { grid-template-columns: 1fr; }
  .csb-home-contact-coord > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { body.csb-home .csb-home-contact-fin button { transition: none; } }

/* Messages d'erreur par champ du formulaire de l'accueil (branchement sur le système de contact existant, 15 nov. 2026) */
body.csb-home p.csb-home-contact-err:not(#csb) { min-height: 0; margin: 6px 0 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: #a1271d; }
body.csb-home p.csb-home-contact-err:empty:not(#csb) { display: none; }
body.csb-home .csb-home-contact-form [aria-invalid="true"] { border-color: #a1271d; }

/* Section « Le centre » : paragraphes justifiés sur ordinateur (césure automatique en français : pas de grands blancs), alignés à gauche sur mobile */
@media (min-width: 992px) {
  body.csb-home .csb-cn-presentation p:not(#csb) { text-align: justify; text-justify: inter-word; -webkit-hyphens: auto; hyphens: auto; }
}
@media (max-width: 991px) {
  body.csb-home .csb-cn-presentation p:not(#csb) { text-align: left; hyphens: manual; }
}

/* La vie du centre : la vignette des actualités secondaires prend toute la hauteur du bloc texte ; résumé justifié (15 nov. 2026) */
body.csb-home .v4-mini { align-items: stretch; }
body.csb-home .v4-mini .v4-visuel { position: relative; width: 84px; height: auto; min-height: 84px; aspect-ratio: auto; align-self: stretch; }
body.csb-home .v4-mini .v4-visuel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.csb-home .v4-mini .v4-mini-texte:not(#csb) { text-align: justify; text-justify: inter-word; -webkit-hyphens: auto; hyphens: auto; }
@media (max-width: 575px) {
  body.csb-home .v4-mini .v4-visuel { width: 76px; min-height: 76px; }
}

/* Actualités secondaires (retour du 15 nov. 2026) : vignette carrée de taille normale ; le texte se réduit (titre sur 2 lignes, résumé sur 1 ligne, sans « Lire l'article » : toute la ligne est le lien) pour avoir la même hauteur */
body.csb-home .v4-mini { align-items: start; }
body.csb-home .v4-mini .v4-visuel { width: 96px; height: 96px; min-height: 0; aspect-ratio: 1; align-self: start; }
body.csb-home .v4-mini > span:last-child, body.csb-home .v4-mini > div { display: flex; flex-direction: column; justify-content: center; min-height: 96px; }
body.csb-home main .v4-mini .v4-cta:not(#csb) { display: none; }
body.csb-home main .v4-mini .v4-mini-titre:not(#csb) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 15.5px; line-height: 1.3; }
body.csb-home main .v4-mini .v4-mini-texte:not(#csb) { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font-size: 14px; line-height: 1.4; }
@media (max-width: 575px) {
  body.csb-home .v4-mini { grid-template-columns: 88px minmax(0, 1fr); }
  body.csb-home .v4-mini .v4-visuel { width: 88px; height: 88px; min-height: 0; }
  body.csb-home .v4-mini > span:last-child, body.csb-home .v4-mini > div { min-height: 88px; }
}
/* Résumé sur une seule ligne : alignement à gauche (la justification d'une ligne coupée crée de grands blancs) */
body.csb-home main .v4-mini .v4-mini-texte:not(#csb) { text-align: left; }

/* La vie du centre, ordinateur : colonnes alignées en haut et en bas, sans blancs (15 nov. 2026).
   La grande photo de gauche absorbe la hauteur disponible ; les trois actualités de droite gardent leur taille et se répartissent sans grand vide. */
@media (min-width: 992px) {
  body.csb-home .v4-actus-grille { align-items: stretch; }
  body.csb-home .v4-une { display: flex; flex-direction: column; height: 100%; }
  body.csb-home .v4-une .v4-visuel { flex: 1 1 auto; aspect-ratio: auto; min-height: 300px; }
  body.csb-home .v4-minis li { flex: 1 1 auto; }
  body.csb-home .v4-mini { align-items: center; padding-block: 24px; }
  body.csb-home .v4-minis > li:first-child .v4-mini { padding-top: 0; }
  body.csb-home .v4-minis > li:last-child .v4-mini { padding-bottom: 0; }
}
@media (min-width: 992px) {
  body.csb-home .v4-une .v4-visuel { flex: 1 1 0; }
  body.csb-home .v4-une .v4-visuel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
}
body.csb-home .v4-mini { column-gap: 18px; }
