/* home.css : blocs bh-jf- de la home de Journal Finance (sable, Sigmar + Kanit, accent #86333a) */
.bh-jf-home { display: block; }
.jf-bloc { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.jf-tete-bloc { text-align: center; max-width: 46rem; margin: 0 auto 2rem; }
.jf-tete-bloc h2 { margin: 0; padding: 0; font-size: clamp(1.75rem, 3.5vw, 2.6rem); line-height: 1.15; text-wrap: balance; }
.jf-intro { margin: .6rem auto 0 !important; max-width: 40rem; font-size: 1.05rem; color: var(--jf-texte-2); }

/* hero : jumbo-banner du thème, texte à gauche, visuel à droite, pleine largeur et plein écran sous le header */
.bh-jf-hero { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 1.5rem; width: 100vw; margin-inline: calc(50% - 50vw); padding-inline: max(var(--jf-marge), calc((100vw - var(--jf-largeur)) / 2)); padding-block: 1rem 1.5rem; box-sizing: border-box; min-height: calc(100svh - var(--header-h, 7.5rem)); }
@media (min-width: 48rem) { .bh-jf-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 3rem; padding-block: 2rem; } }
.bh-jf-hero h1 { margin: 0; padding: .25rem 0 .75rem; font-size: clamp(2.6rem, 6.5vw, 5rem); }
.bh-jf-hero-phrase { margin: 0 0 1.25rem !important; font-size: clamp(1.05rem, 1.7vw, 1.3rem); max-width: 34rem; }
.bh-jf-signature { display: inline-flex; align-items: center; gap: .85rem; font-weight: 400; text-decoration: none; }
.bh-jf-signature img { width: 56px; height: 56px; border-radius: 9999px; object-fit: cover; object-position: 50% 22%; box-shadow: 0 0 0 3px var(--jf-creme), 0 0 0 4px var(--jf-filet); }
.bh-jf-hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.75rem; }
.bh-jf-hero-visuel { position: relative; height: 26svh; min-height: 11rem; border-radius: 2rem; overflow: hidden; background: linear-gradient(180deg, #fdfcfb 0%, #e2d1c3 100%); box-shadow: var(--o-carte); }
/* bureau et tablette : le visuel occupe toute la hauteur du hero (aucun vide sous le contenu) */
@media (min-width: 48rem) { .bh-jf-hero { align-items: stretch; align-content: stretch; grid-template-rows: minmax(0, 1fr); } .bh-jf-hero-texte { align-self: center; } .bh-jf-hero-visuel { align-self: stretch; height: auto; min-height: 22rem; } }
.bh-jf-hero-repli { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; }
.bh-jf-hero-lottie { position: absolute; left: 1rem; bottom: 1rem; width: min(46%, 15rem); aspect-ratio: 1; border-radius: 1.5rem; background: rgb(253 252 251 / .88); backdrop-filter: blur(12px); box-shadow: var(--o-carte); opacity: 0; transition: opacity .4s ease; }
.bh-jf-hero-lottie:has(svg, canvas) { opacity: 1; }
@media (max-width: 47.99rem) { .bh-jf-hero-lottie { width: auto; height: calc(100% - 2rem); top: 1rem; } }

/* à la une : magazine, une grande carte puis deux petites */
.bh-jf-une-grille { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .bh-jf-une-grille--2, .bh-jf-une-grille--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bh-jf-une-grille--3 > :first-child { grid-column: 1 / -1; } }
/* bureau : petites cartes horizontales compactes (image 160 px à gauche), la grande carte prend la hauteur des deux,
   son image remplit ce qui reste au-dessus du texte (cover, 480 px au plus) : ni vide dessous, ni carte étirée à vide */
/* 72rem : en dessous, la colonne de texte des petites cartes passerait sous 300 px (colonne étroite) */
@media (min-width: 72rem) {
  .bh-jf-une-grille--3 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .bh-jf-une-grille--3 > :first-child { grid-column: 1; grid-row: 1 / span 2; align-self: stretch; }
  .bh-jf-une-grille--3 > :first-child .jf-carte-img { flex: 1 1 0; aspect-ratio: auto; height: 0; min-height: 16rem; max-height: 480px; object-fit: cover; }
  .bh-jf-une-grille--3 > .jf-carte--petite { flex-direction: row; align-items: stretch; }
  .bh-jf-une-grille--3 > .jf-carte--petite .jf-carte-img { flex: 0 0 130px; width: 130px; height: auto; aspect-ratio: auto; margin: .5rem 0 .5rem .5rem; object-fit: cover; }
  .bh-jf-une-grille--3 > .jf-carte--petite .jf-carte-corps { padding: .9rem 1rem; justify-content: center; }
  .bh-jf-une-grille--3 > .jf-carte--petite .jf-carte-titre { font-size: 1.1rem; }
  .bh-jf-une-grille--3 > .jf-carte--petite .jf-carte-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* mot de l'autrice : encadré en pointillés du Subscribe du thème */
.bh-jf-mot-cadre { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; max-width: 54rem; margin-inline: auto; padding: 2rem; border: 1px dashed #6b7280; border-radius: 1rem; }
.bh-jf-mot-cadre { justify-items: center; text-align: center; }
.bh-jf-mot-cadre .jf-eyebrow { justify-content: center; }
.bh-jf-mot-cadre h2 { margin: 0 0 .75rem; padding: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.bh-jf-mot-bio { margin: 0 0 1.25rem; font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.6; }
.bh-jf-mot-liens { margin: 0 !important; }

/* rubriques en pastilles avec compteurs */
.bh-jf-rubriques-liste { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); max-width: var(--jf-largeur); }
@media (min-width: 40rem) { .bh-jf-rubriques-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bh-jf-rubriques-liste > li { display: flex; }
.bh-jf-rub-carte { flex: 1; gap: .75rem; padding: 1.5rem; text-decoration: none; color: var(--jf-texte); background: var(--jf-carte); border-radius: 1rem; }
.bh-jf-rub-carte:hover { box-shadow: 0 0 0 1px var(--jf-accent); }
.bh-jf-rub-nom { font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.bh-jf-rub-carte .bh-jf-compte { margin-left: 0; align-self: flex-start; }
.bh-jf-rub-chapo { font-size: .95rem; line-height: 1.55; color: var(--jf-texte); }
.jf-pastille--grande { width: 100%; box-sizing: border-box; justify-content: flex-start; flex-wrap: wrap; padding: .75rem 1.25rem; font-size: 1.05rem; min-height: 3.25rem; text-decoration: none; transition: background .2s ease; }
.jf-pastille--grande .jf-ico { color: var(--jf-accent); }
.bh-jf-compte { margin-left: auto; background: var(--jf-sable); border-radius: 9999px; padding: .1rem .7rem; font-size: .85rem; color: var(--jf-texte); }
.jf-pastille--grande:hover { background: var(--jf-surligne); color: #1c1917 !important; }

/* calculateur des frais */
.bh-jf-calcul-grille { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .bh-jf-calcul-grille { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } .bh-jf-calcul-grille--seul { grid-template-columns: minmax(0, 1fr); max-width: 46rem; margin-inline: auto; } }
.bh-jf-calcul-cadre { background: var(--jf-carte); border-radius: 1rem; padding: 1.5rem; box-shadow: var(--o-carte); }
.bh-jf-champs { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .bh-jf-champs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bh-jf-champs label { display: grid; gap: .35rem; font-weight: 400; font-size: .92rem; }
.bh-jf-champs input { font: inherit; font-size: 1rem; font-weight: 300; min-height: 44px; padding: .5rem 1.1rem; border: 1px solid #6b7280; border-radius: 9999px; background: rgb(253 252 251 / .85); box-sizing: border-box; width: 100%; }
.bh-jf-champs input:focus { outline: 2px solid var(--jf-accent); outline-offset: 1px; }
.bh-jf-resultats { margin-top: 1.5rem; border-top: 1px dashed var(--jf-filet); }
.bh-jf-resultats p { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; margin: 0 !important; padding: .75rem 0; border-bottom: 1px dashed var(--jf-filet); font-weight: 400; }
.bh-jf-resultats output { font-weight: 700; font-size: 1.15rem; }
.bh-jf-ecart output { font-weight: 400; font-size: clamp(1.4rem, 3vw, 1.9rem); background: var(--jf-surligne); color: #1c1917; padding: .1rem .6rem; border-radius: .4rem; }
.bh-jf-mention { margin: 1rem 0 0 !important; font-size: .85rem; color: var(--jf-texte-2); }
.bh-jf-calcul-article .jf-eyebrow { margin-bottom: .75rem; }
.bh-jf-calcul-cadre label, .bh-jf-calcul-cadre input, .bh-jf-resultats output:not(.sigmar-ff) { font-family: "Kanit", system-ui, sans-serif; }
.bh-jf-calcul-cadre label { font-weight: 400; }
/* À 390 px, le padding-inline de section (da.css) s'ajoutait à celui de main : la mention du
   calculateur tombait à 278 px et la description de carte à 286 px, sous les 300 px de la règle
   colonne_etroite. main porte déjà la marge, on la retire ici pour redonner la largeur de lecture. */
@media (max-width: 47.99rem) { .bh-jf-home .bh-jf-calcul { padding-inline: 0; } }
.bh-jf-resultats output:not(.sigmar-ff) { color: var(--jf-texte); font-weight: 700; }
.bh-jf-ecart output.sigmar-ff { font-family: "Sigmar", sans-serif; }

/* frise : l'année des comptes */
.bh-jf-frise-liste { list-style: none; margin: 0 auto; padding: 0; max-width: 48rem; display: grid; gap: .85rem; }
.bh-jf-frise-liste li { background: var(--jf-carte); border-radius: .75rem; padding: 1rem 1.25rem; box-shadow: 0 0 0 1px rgb(0 0 0 / .05); }
.bh-jf-jalon { display: inline-block; font-weight: 700; color: var(--jf-accent); font-size: .95rem; }
.bh-jf-frise-liste h3 { margin: .15rem 0 .25rem; font-size: 1.1rem; }
.bh-jf-frise-liste p { margin: 0 !important; }

/* onglets : lire les comptes */
.bh-jf-onglets-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 1.25rem; }
.bh-jf-onglets-tabs button.button-link { background: transparent; color: var(--jf-texte); border-color: #000; }
.bh-jf-onglets-tabs button.button-link[aria-selected="true"], .bh-jf-onglets-tabs button.button-link.kv-actif { background: #000; color: #f5f5f5; }
.bh-jf-panneau { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); background: var(--jf-carte); border-radius: 1rem; padding: 1.5rem; box-shadow: var(--o-carte); }
@media (min-width: 48rem) { .bh-jf-panneau { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; } }
.bh-jf-panneau h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; font-size: 1.35rem; color: var(--jf-accent); }
.bh-jf-panneau p { margin: 0 0 .85rem; }
.bh-jf-panneau-img { width: 100%; aspect-ratio: 4 / 3; max-height: 320px; object-fit: cover; border-radius: .75rem; }

/* blocs de rubrique (Marchés, Décryptages) */
.bh-jf-rubrique-grille { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) {
  .bh-jf-rubrique-grille--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bh-jf-rubrique-grille--1 > .jf-carte { flex-direction: row; align-items: center; }
  .bh-jf-rubrique-grille--1 .jf-carte-img { width: 42%; margin: .5rem; aspect-ratio: 300 / 167; }
}
.bh-jf-decryptages .jf-tete-bloc, .bh-jf-marches .jf-tete-bloc { margin-bottom: 1.75rem; }

/* quiz vrai / faux */
.bh-jf-quiz-cadre { max-width: 46rem; margin-inline: auto; padding: 2rem; border: 1px dashed #6b7280; border-radius: 1rem; }
.bh-jf-quiz-cadre [data-question-texte] { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 400; }
.bh-jf-quiz-cadre button { font: inherit; font-weight: 400; min-height: 44px; padding: .5rem 1.5rem; border: 1px solid #000; border-radius: 9999px; background: transparent; color: var(--jf-texte); cursor: pointer; transition: color .2s, border-color .2s; }
.bh-jf-quiz-cadre button:hover { border-color: var(--jf-accent); color: var(--jf-accent); }
.bh-jf-quiz-cadre [data-quiz] { --kv-accent: var(--jf-accent); }

/* charte et repères : cartes en 2 x 2 */
.bh-jf-charte { background: rgb(226 209 195 / .4); border-radius: 2rem; padding-inline: clamp(1rem, 3vw, 2.5rem); }
.bh-jf-charte-grille, .bh-jf-reperes-grille { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .bh-jf-charte-grille, .bh-jf-reperes-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bh-jf-formule { display: inline-block; margin: 0 0 .6rem !important; padding: .15rem .5rem; background: var(--jf-surligne); color: #1c1917; font-weight: 400; border-radius: .3rem; }
.bh-jf-reperes h3 .jf-ico { color: var(--jf-accent); }

/* la rédaction : 3 puis 2 cartes */
.bh-jf-redaction-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.bh-jf-auteur { position: relative; flex: 1 1 100%; box-sizing: border-box; text-align: center; display: flex; flex-direction: column; align-items: center; }
@media (min-width: 40rem) { .bh-jf-auteur { flex: 0 1 calc((100% - 2 * 1.25rem) / 3); } }
.bh-jf-auteur h3 { justify-content: center; margin: .75rem 0 .15rem; }
.bh-jf-auteur h3 a { text-decoration: none; }
.bh-jf-auteur h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 1rem; }
.bh-jf-auteur:hover { box-shadow: var(--o-carte); }
.bh-jf-role { color: var(--jf-accent); font-weight: 400; margin: 0 0 .5rem !important; }
.bh-jf-phrase { font-size: .95rem; }

/* appel final */
.bh-jf-appel-cadre { max-width: 46rem; margin-inline: auto; padding: 2rem; display: flex; flex-direction: column; align-items: center; text-align: center; border: 1px dashed #6b7280; border-radius: 1rem; }
.bh-jf-appel-cadre h2 { margin: .75rem 0 .5rem; padding: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.bh-jf-appel-cadre p { max-width: 34rem; }

/* mobile : encadrés moins rembourrés pour garder au moins 300 px de texte */
@media (max-width: 39.99rem) {
  .bh-jf-mot-cadre, .bh-jf-appel-cadre, .bh-jf-quiz-cadre { padding: 1.25rem 1rem; }
  .bh-jf-charte { padding-inline: 0; background: transparent; }
  .bh-jf-charte .jf-boite, .bh-jf-reperes .jf-boite, .bh-jf-auteur { padding: 1.25rem 1rem; }
}

/* archives de la home : articles restants groupés par mois réel + index des mois du carnet */
.bh-jf-archives-grille { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
/* liste seule sur toute la largeur (index des mois retiré : socle home-sans-mois-annee) */
.bh-jf-archives-groupe + .bh-jf-archives-groupe { margin-top: 1.75rem; }
/* un intertitre de mois (mois seul, socle home-sans-mois-annee) puis une carte de lignes par mois */
.bh-jf-archives .bh-jf-archives-t { font-family: "Kanit", sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.3; color: #86333a; padding: 0; margin: 1.5rem 0 .5rem; }
.bh-jf-archives .bh-jf-archives-groupe:first-child .bh-jf-archives-t { margin-top: 0; }
.bh-jf-archives .bh-jf-archives-groupe + .bh-jf-archives-groupe { margin-top: 0; }
.bh-jf-archives .jf-liste-filets { margin-top: 0; background: rgb(253 252 251 / .7); border-radius: 1rem; border-top: 0; box-shadow: 0 0 0 1px rgb(0 0 0 / .05); overflow: hidden; }
.bh-jf-archives .jf-liste-filets li { padding: .75rem 1.5rem; }
.bh-jf-archives .jf-liste-filets li:last-child { border-bottom: 0; }
.bh-jf-archives-index { background: var(--jf-carte); border: 1px dashed rgb(107 114 128); border-radius: 1rem; padding: 1.25rem 1.5rem; }
.bh-jf-archives-index-t { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin: 0 0 .5rem; color: var(--jf-accent); }
.bh-jf-archives-index ul { list-style: none; margin: 0; padding: 0; }
.bh-jf-archives-index a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 44px; border-bottom: 1px solid var(--jf-filet); text-transform: capitalize; }
.bh-jf-archives-index li:last-child a { border-bottom: 0; }
.bh-jf-archives-n { text-transform: none; font-size: .85rem; color: var(--jf-texte-2); white-space: nowrap; }
/* onglets pédagogiques : mini-schéma des grandes masses de chaque document (aucun chiffre) */
.bh-jf-schema { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); margin: 0; }
.bh-jf-schema--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bh-jf-schema-col { background: #fdfcfb; border-radius: .75rem; padding: 1rem 1.1rem; box-shadow: 0 0 0 1px rgb(0 0 0 / .06); }
.bh-jf-schema-t { margin: 0 0 .5rem !important; font-weight: 700; color: var(--jf-accent); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.bh-jf-schema ol { list-style: none; margin: 0; padding: 0; }
.bh-jf-schema li { padding: .45rem .6rem; border-left: 3px solid var(--jf-sable); font-size: .95rem; }
.bh-jf-schema li + li { margin-top: .3rem; }
.bh-jf-schema li:last-child { border-left-color: var(--jf-accent); font-weight: 700; }
.bh-jf-schema--2 li:last-child { border-left-color: var(--jf-sable); font-weight: 400; }
.bh-jf-schema figcaption { grid-column: 1 / -1; font-size: .85rem; color: var(--jf-texte-2); }
.bh-jf-panneau-icone { display: grid; place-items: center; padding: 2.5rem 1rem; border-radius: .75rem; background: var(--jf-sable); color: var(--jf-accent); }
