/* Home AEON clair : blocs bh-avs-* (les tokens viennent de da.css) */
.bh-avs-cont { width: min(var(--largeur), 100% - 40px); margin-inline: auto; }
.bh-avs-etroit { width: min(860px, 100% - 40px); }
.bh-avs-bloc { padding: 88px 0; }
.bh-avs-alt { background: var(--c-surface-2); }
.bh-avs-centre { text-align: center; }
.bh-avs-titre { text-align: center; margin: 0 auto 44px; max-width: 26ch; }
.bh-avs-bloc h2, .bh-avs-hero h1 { font-family: var(--f-titre); text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; color: var(--c-texte); }
.bh-avs-bloc h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 800; }
.bh-avs-bloc h3 { font-size: 1.15rem; margin: 0 0 8px; line-height: 1.3; }
.bh-avs-suite { margin: 36px 0 0; }
.bh-avs-boutons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.bh-avs-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; background: color-mix(in srgb, var(--c-primaire) 16%, var(--c-surface)); color: var(--c-primaire-texte); }
.bh-avs-ico .ico { width: 26px; height: 26px; }

/* 1. Hero */
.bh-avs-hero { position: relative; display: grid; grid-template-columns: 52% 1fr; min-height: calc(100svh - var(--entete-h, 76px) - var(--bandeau-h, 44px)); background: var(--c-fond); overflow: hidden; isolation: isolate; }
.bh-avs-hero::after { content: ""; position: absolute; z-index: -1; right: 0; top: 10%; width: 48%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c-primaire) 28%, transparent), transparent 65%); pointer-events: none; }
.bh-avs-hero-media { position: relative; min-height: 100%; }
.bh-avs-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bh-avs-hero-texte { align-self: center; padding: 56px clamp(24px, 5vw, 88px); max-width: 680px; }
.bh-avs-hero h1 { font-size: clamp(2.2rem, 4.4vw, 4rem); font-weight: 800; margin: 10px 0 18px; }
.bh-avs-hero-chapo { font-size: 1.12rem; color: var(--c-texte-2); max-width: 52ch; margin: 0; }
.bh-avs-hero-chiffres { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 1px solid var(--c-filet); padding-top: 22px; }
.bh-avs-hero-chiffres li { display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; color: var(--c-texte-2); }
.bh-avs-nb { font-family: var(--f-titre); font-weight: 800; font-size: 1.9rem; color: var(--c-texte); }

/* 2. Chiffres */
.bh-avs-chiffres { padding: 64px 0; background: var(--c-surface); }
.bh-avs-stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.bh-avs-stats li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 12px; border-top: 3px solid var(--c-primaire); }
.bh-avs-stats li:last-child { border-top-color: var(--c-secondaire); }
.bh-avs-stat-nb { font-family: var(--f-titre); font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--c-texte); }
.bh-avs-stat-lib { font-size: 15px; color: var(--c-texte-2); }

/* Grilles sans orpheline */
.bh-avs-grille2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.bh-avs-grille3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bh-avs-grille4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* 3. Services */
.bh-avs-service { display: flex; gap: 20px; padding: 28px; align-items: flex-start; }
.bh-avs-service p { margin: 0; color: var(--c-texte-2); }

/* 4. Calculateur */
.bh-avs-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.bh-avs-calc { background: var(--c-surface-2); }
.bh-avs-calc-texte h2 { margin: 8px 0 18px; }
.bh-avs-calc-texte p { color: var(--c-texte-2); max-width: 60ch; }
.bh-avs-calc-texte a { color: var(--c-primaire-texte); font-weight: 700; }
.bh-avs-calc-panneau { padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.bh-avs-calc-panneau input { width: 100%; min-height: 48px; font: inherit; font-size: 1.05rem; padding: 10px 14px; border: 1px solid var(--c-filet); background: var(--c-fond); color: var(--c-texte); }
.bh-avs-resultats { margin: 6px 0 0; display: grid; gap: 10px; }
.bh-avs-resultats div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--c-filet); }
.bh-avs-resultats dt { color: var(--c-texte-2); font-size: 15px; }
.bh-avs-resultats dd { margin: 0; font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.bh-avs-net dd { font-family: var(--f-titre); font-size: 1.4rem; color: var(--c-primaire-texte); }
.bh-avs-note { margin: 0; font-size: 14px; color: var(--c-texte-2); }

/* 6. Bascule */
.bh-avs-bascule { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.bh-avs-bascule .bh-avs-grille2 { width: 100%; }
.bh-avs-inter button { min-height: 44px; padding: 8px 22px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; background: transparent; color: var(--c-texte); cursor: pointer; }
.bh-avs-inter button[aria-pressed="true"], .bh-avs-inter button.kv-actif { background: var(--c-sombre); color: #fff; }
.bh-avs-regime { padding: 30px; border-top: 4px solid var(--c-primaire); }
.bh-avs-regime.bh-avs-or { border-top-color: var(--c-secondaire); }
.bh-avs-regime p { margin: 0 0 8px; color: var(--c-texte-2); }
.bh-avs-montant { font-family: var(--f-titre); font-weight: 800; font-size: clamp(2rem, 3.6vw, 2.8rem); color: var(--c-texte) !important; }
.bh-avs-selon { max-width: 70ch; margin: 0; color: var(--c-texte-2); }
.bh-avs-selon a { color: var(--c-primaire-texte); font-weight: 700; }

/* 7. Étapes */
.bh-avs-etapes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.bh-avs-etapes img { width: 100%; height: 100%; max-height: 480px; object-fit: cover; box-shadow: var(--ombre); }
.bh-avs-etapes ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bh-avs-etapes li { display: flex; gap: 18px; padding: 16px 18px; background: var(--c-surface); border-left: 3px solid transparent; cursor: pointer; }
.bh-avs-etapes li.kv-actif, .bh-avs-etapes li[aria-current] { border-left-color: var(--c-primaire); box-shadow: var(--ombre); }
.bh-avs-etapes li p { margin: 0; color: var(--c-texte-2); }
.bh-avs-num { font-family: var(--f-titre); font-weight: 800; font-size: 1.3rem; color: var(--c-primaire-texte); }

/* 8. Cas clients (bande navy) */
.bh-avs-sombre { background: var(--c-sombre); color: #f3ede0; }
.bh-avs-sombre h2, .bh-avs-sombre .micro { color: #fff; }
.bh-avs-cas { display: flex; gap: 18px; padding: 26px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .04); }
.bh-avs-cas h3 { color: #fff; }
.bh-avs-cas p { margin: 0; color: #dde4ec; }
.bh-avs-cas .bh-avs-ico { background: rgba(74, 158, 255, .2); color: #cfe3ff; }
.bh-avs-btn-clair { background: #fff9ef; color: var(--c-sombre); }
.bh-avs-btn-clair:hover { background: var(--c-secondaire); color: var(--c-sombre); }
.bh-avs-btn-bord { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .7); }

/* 9. Onglets */
.bh-avs-onglets { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.bh-avs-onglets [role="tablist"] { flex-wrap: wrap; justify-content: center; }
.bh-avs-onglets [role="tablist"] button { min-height: 44px; padding: 8px 20px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; background: transparent; color: var(--c-texte); cursor: pointer; white-space: nowrap; }
.bh-avs-onglets [role="tablist"] button[aria-selected="true"] { background: var(--c-sombre); color: #fff; }
.bh-avs-panneau { width: 100%; max-width: 860px; padding: 30px; }
.bh-avs-panneau ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.bh-avs-panneau li { display: flex; gap: 12px; align-items: flex-start; color: var(--c-texte-2); }
.bh-avs-panneau li .ico { flex: none; color: var(--c-primaire-texte); margin-top: 2px; }
.bh-avs-onglets ~ .bh-avs-suite a, .bh-avs-bloc .bh-avs-suite > a:not(.btn) { color: var(--c-primaire-texte); font-weight: 700; }

/* 10. Quiz */
.bh-avs-quiz { padding: 32px; }
.bh-avs-quiz [data-question-texte] { font-size: 1.2rem; font-weight: 700; color: var(--c-texte); }
.bh-avs-quiz [data-explication] { color: var(--c-texte-2); }
.bh-avs-quiz button { min-height: 44px; }

/* 11. Frise */
.bh-avs-frise { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; }
.bh-avs-frise::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: var(--c-filet); }
.bh-avs-frise li { position: relative; padding-top: 52px; max-height: 320px; }
.bh-avs-frise li::before { content: ""; position: absolute; top: 14px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--c-primaire); box-shadow: 0 0 0 5px var(--c-fond); }
.bh-avs-annee { font-family: var(--f-titre); font-weight: 800; font-size: 1.5rem; color: var(--c-texte); display: block; margin-bottom: 6px; }
.bh-avs-frise p { margin: 0; color: var(--c-texte-2); font-size: 15px; }

/* 12. Rubriques */
.bh-avs-rubs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.bh-avs-rub { grid-column: span 2; position: relative; display: block; min-height: 240px; max-height: 320px; overflow: hidden; text-decoration: none; color: #fff; }
.bh-avs-rub:nth-child(4) { grid-column: 2 / span 2; }
.bh-avs-rub img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.bh-avs-rub::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 30, 46, .15) 0%, rgba(14, 30, 46, .88) 100%); }
.bh-avs-rub:hover img { transform: scale(1.04); }
.bh-avs-rub-corps { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.bh-avs-rub-corps .tag { background: rgba(255, 249, 239, .94); color: var(--c-texte); }
.bh-avs-rub-titre { font-family: var(--f-titre); text-transform: uppercase; font-weight: 800; font-size: 1.35rem; color: #fff; }

/* 13. Avis */
.bh-avs-avis { margin: 0; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.bh-avs-avis > .ico { color: var(--c-primaire-texte); width: 28px; height: 28px; }
.bh-avs-avis blockquote { margin: 0; flex: 1; }
.bh-avs-avis blockquote p { margin: 0; color: var(--c-texte); font-size: 15.5px; }
.bh-avs-avis figcaption { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--c-texte-2); }
.bh-avs-avis figcaption a { color: var(--c-primaire-texte); }

/* 14. Équipe */
.bh-avs-auteur { display: flex; gap: 20px; padding: 20px; align-items: center; }
.bh-avs-auteur img { width: 132px; height: 165px; object-fit: cover; flex: none; }
.bh-avs-auteur h3 a { color: var(--c-texte); text-decoration: none; }
.bh-avs-auteur h3 a:hover { color: var(--c-primaire-texte); }
.bh-avs-auteur p { margin: 0 0 6px; color: var(--c-texte-2); }

/* 16. Dernières publications */
.bh-avs-lignes { list-style: none; padding: 0; margin: 0 auto; max-width: 900px; }
.bh-avs-lignes li { display: grid; grid-template-columns: 110px 150px 1fr; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--c-filet); }
.bh-avs-lignes time { font-size: 14.5px; color: var(--c-texte-2); }
.bh-avs-lignes a { color: var(--c-texte); font-weight: 700; text-decoration: none; }
.bh-avs-lignes a:hover { color: var(--c-primaire-texte); text-decoration: underline; }

/* 17. Appel final */
.bh-avs-appel { background: var(--c-sombre); color: #f3ede0; position: relative; overflow: hidden; isolation: isolate; }
.bh-avs-appel::before { content: ""; position: absolute; z-index: -1; left: -10%; top: -40%; width: 55%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(74, 158, 255, .35), transparent 65%); }
.bh-avs-appel h2 { color: #fff; margin: 8px 0 14px; }
.bh-avs-appel .micro { color: var(--c-secondaire); }
.bh-avs-appel p { max-width: 60ch; color: #dde4ec; }
.bh-avs-appel-ligne { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.bh-avs-lottie { width: 100%; max-width: 360px; aspect-ratio: 1; margin-inline: auto; }

@media (max-width: 1100px) {
  .bh-avs-grille4 { grid-template-columns: repeat(2, 1fr); }
  .bh-avs-frise { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .bh-avs-frise::before { display: none; }
  .bh-avs-frise li:last-child { grid-column: 1 / -1; }
  .bh-avs-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .bh-avs-bloc { padding: 64px 0; }
  .bh-avs-hero { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .bh-avs-hero-media { min-height: 0; aspect-ratio: 16 / 10; max-height: 52svh; }
  .bh-avs-hero-texte { padding: 36px 20px 48px; }
  .bh-avs-deux, .bh-avs-etapes, .bh-avs-appel-ligne { grid-template-columns: 1fr; gap: 32px; }
  .bh-avs-etapes img { max-height: 360px; }
  .bh-avs-grille3 { grid-template-columns: 1fr; }
  .bh-avs-rubs { grid-template-columns: repeat(2, 1fr); }
  .bh-avs-rub, .bh-avs-rub:nth-child(4) { grid-column: auto; }
  .bh-avs-rub:last-child { grid-column: 1 / -1; }
  .bh-avs-lottie { max-width: 240px; }
}
@media (max-width: 680px) {
  .bh-avs-grille2, .bh-avs-grille4, .bh-avs-rubs, .bh-avs-frise { grid-template-columns: 1fr; }
  .bh-avs-rub:last-child { grid-column: auto; }
  .bh-avs-hero-chiffres { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .bh-avs-nb { font-size: 1.5rem; }
  .bh-avs-service, .bh-avs-cas { flex-direction: column; }
  .bh-avs-auteur { flex-direction: column; align-items: flex-start; }
  .bh-avs-auteur img { width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 420px; }
  .bh-avs-lignes li { grid-template-columns: 1fr; gap: 6px; }
  .bh-avs-stats { gap: 12px; }
}
/* Pré-contrôle : hero = écran moins le header mesuré, frise en liste verticale, textes jamais sous 300 px */
.bh-avs-hero { min-height: calc(100svh - var(--entete-h, 120px)); }
.bh-avs-frise { grid-template-columns: 1fr; max-width: 860px; margin-inline: auto; gap: 0; padding-left: 34px; }
.bh-avs-frise::before { left: 8px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
.bh-avs-frise li, .bh-avs-frise li:last-child { grid-column: auto; display: grid; grid-template-columns: 140px 1fr; column-gap: 24px; padding: 18px 0; max-height: none; border-bottom: 1px solid var(--c-filet); }
.bh-avs-frise li::before { top: 24px; left: -34px; }
.bh-avs-frise .bh-avs-annee { grid-row: 1 / span 2; margin: 0; }
.bh-avs-frise h3 { margin: 0 0 4px; }
.bh-avs-lottie [data-lottie-render], .bh-avs-lottie [data-lottie-fallback] { display: grid; place-items: center; width: 100%; height: 100%; color: var(--c-primaire-texte); }
.bh-avs-lottie [data-lottie-render] svg, .bh-avs-lottie [data-lottie-fallback] svg { width: min(180px, 75%); height: auto; }
.bh-avs-lottie [hidden] { display: none; }
@media (max-width: 900px) {
  .bh-avs-hero { grid-template-rows: none; }
  .bh-avs-hero-media { position: absolute; inset: 0; aspect-ratio: auto; max-height: none; z-index: -2; }
  .bh-avs-hero-media::after { content: ""; position: absolute; inset: 0; background: rgba(243, 237, 224, .9); }
  .bh-avs-hero-texte { align-self: center; padding: 32px 20px; }
}
@media (max-width: 680px) {
  .bh-avs-cont, .bh-avs-etroit { width: calc(100% - 32px); }
  .bh-avs-hero-chiffres { display: none; }
  .bh-avs-service, .bh-avs-calc-panneau, .bh-avs-regime, .bh-avs-panneau, .bh-avs-quiz, .bh-avs-cas { padding: 16px; }
  .bh-avs-etapes li { flex-direction: column; gap: 4px; padding: 14px 16px; }
  .bh-avs-frise { padding-left: 24px; }
  .bh-avs-frise li, .bh-avs-frise li:last-child { grid-template-columns: 1fr; }
  .bh-avs-frise li::before { left: -24px; }
  .bh-avs-frise .bh-avs-annee { grid-row: auto; }
  .bh-avs-panneau li { flex-direction: column; gap: 6px; }
}
/* Avis : 2 colonnes larges au lieu de 4 colonnes de 210 px */
.bh-avs-bloc[data-bloc="avis"] .bh-avs-grille4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1100px; margin-inline: auto; }
@media (max-width: 760px) { .bh-avs-bloc[data-bloc="avis"] .bh-avs-grille4 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .bh-avs-rub img, .bh-avs-bloc * { transition: none !important; animation: none !important; }
  .bh-avs-rub:hover img { transform: none; }
}
/* Tour builder-3 : résultats du calculateur en bleu foncé, barres capital / droits / net, icônes et chiffres des cas. */
[data-usine-bloc="calculateur"] .bh-avs-resultats dd, [data-usine-bloc="calculateur"] .bh-avs-resultats output { color: #16283a; }
[data-usine-bloc="calculateur"] .bh-avs-net dd, [data-usine-bloc="calculateur"] .bh-avs-net output { color: #1d5fa8; }
[data-usine-bloc="calculateur"] .bh-avs-barres { display: grid; gap: 10px; }
[data-usine-bloc="calculateur"] .bh-avs-barre { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 12px; font-size: 14px; color: #16283a; }
[data-usine-bloc="calculateur"] .bh-avs-barre i { display: block; height: 12px; min-width: 2px; background: #4a9eff; transition: width .5s ease; }
@media (prefers-reduced-motion: reduce) { [data-usine-bloc="calculateur"] .bh-avs-barre i { transition: none; } }
[data-usine-bloc="cas"] .bh-avs-cas-ico, [data-usine-bloc="cas"] .bh-avs-cas-ico .ico { color: #fff9ef; }
[data-usine-bloc="cas"] .bh-avs-cas-chiffre { margin-top: 12px; color: #fff9ef; }
[data-usine-bloc="cas"] .bh-avs-cas-chiffre strong { display: block; font-family: var(--f-titre); font-size: 1.6rem; line-height: 1.2; color: #fff9ef; }
/* Tour builder-4 : chiffres sur une ligne, cas de même hauteur, hero mobile avec photo nette au-dessus du texte. */
[data-usine-bloc="chiffres"] .bh-avs-stat-nb { white-space: nowrap; line-height: 1.2; }
/* Le 4e chiffre (« 152 500 € ») est le seul assez long pour déborder de sa case : il est réduit, jamais
   sous 24 px (plancher de lisibilité, contrôle socle:stats-lisibles), et passe sur une colonne sous 380 px
   (13/11/2026 : la réduction à 17 px le rendait illisible à 390). */
[data-usine-bloc="chiffres"] .bh-avs-stats li:nth-child(4) .bh-avs-stat-nb { font-size: clamp(1.5rem, 2vw, 2.2rem); }
@media (max-width: 1100px) { [data-usine-bloc="chiffres"] .bh-avs-stats li:nth-child(4) .bh-avs-stat-nb { font-size: clamp(1.5rem, 6.1vw, 2.2rem); } }
@media (max-width: 379px) { [data-usine-bloc="chiffres"] .bh-avs-stats { grid-template-columns: 1fr; } }
[data-usine-bloc="cas"] .bh-avs-grille2 { align-items: stretch; }
[data-usine-bloc="cas"] .bh-avs-cas > div { display: flex; flex-direction: column; flex: 1; }
[data-usine-bloc="cas"] .bh-avs-cas-chiffre { margin-top: auto; padding-top: 12px; }
[data-usine-bloc="cas"] .bh-avs-cas-chiffre strong { white-space: nowrap; }
@media (max-width: 767px) {
  [data-usine-bloc="hero"].bh-avs-hero { display: flex; flex-direction: column; min-height: 0; height: calc(100svh - var(--entete-h, 120px)); }
  [data-usine-bloc="hero"] .bh-avs-hero-media { position: relative; inset: auto; z-index: auto; flex: 1 1 0; aspect-ratio: auto; max-height: none; min-height: 160px; }
  [data-usine-bloc="hero"] .bh-avs-hero-texte { flex: none; }
  [data-usine-bloc="hero"] .bh-avs-hero-media::after { content: none; }
  [data-usine-bloc="hero"] .bh-avs-hero-media img { opacity: 1; filter: none; }
  [data-usine-bloc="hero"] .bh-avs-hero-texte { padding: 28px 20px 36px; }
}
