/* Famille blog : lecture. Colonne de 68 caractères, sommaire collant, schéma de tête propre à chaque article. */
.bl { --bl-col: 68ch; --bl-pad: clamp(16px, 4vw, 64px); }
.bl a { text-underline-offset: 0.2em; }

/* Barre de progression de lecture */
.bl-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.bl-progress i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* Texte des schémas */
.bl-svg { display: block; width: 100%; height: auto; overflow: visible; }
.bl-t { font: 400 28px/1 var(--font-display); }
.bl-s { font: 500 20px/1 var(--font); }

/* Tête d'article (variantes par sujet) */
.bl-head { padding: clamp(28px, 5vw, 72px) var(--bl-pad) clamp(40px, 6vw, 88px); display: grid; gap: clamp(28px, 4vw, 56px); }
.bl-head h1 { font: 800 clamp(1.5rem, 4.6vw, 5.5rem)/1.04 var(--font-display); letter-spacing: -0.03em; text-wrap: balance; }
.bl-lead { font-size: var(--step-lead); line-height: 1.4; max-width: 44ch; }
.bl-meta { margin-top: 24px; font-size: var(--step-small); color: var(--muted); }
.bl-meta a { color: var(--ink); font-weight: 600; }
.bl-fig { min-width: 0; }

/* Mesure : texte à gauche, entonnoir à droite */
@media (min-width: 960px) {
  .bl-head h1 { grid-column: 1 / -1; }
  .bl--mesure .bl-head { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: end; }
}
/* Marque : titre large, planche avant/après en dessous sur un fond de papier */
.bl--marque .bl-head__txt { max-width: 64rem; }
.bl-head__txt { display: grid; gap: 22px; align-content: start; }
.bl--mesure .bl-head h1, .bl--flux .bl-head h1 { text-wrap: pretty; }
.bl--marque .bl-fig { background: var(--surface); border-radius: var(--r-lg); padding: clamp(14px, 4vw, 56px); }
.bl--marque .bl-t { font-size: 34px; }
.bl--marque .bl-s { font-size: 26px; }
/* Flux : bandeau nuit pleine largeur, texte puis schéma côte à côte */
.bl--flux .bl-head { background: var(--night); color: var(--night-ink); margin: 0 var(--m); border-radius: var(--r-lg); padding: clamp(32px, 6vw, 88px) clamp(20px, 5vw, 72px); color-scheme: dark; }
.bl--flux .bl-meta { color: var(--night-muted); }
.bl--flux .bl-meta a { color: var(--night-ink); }
.bl--flux .bl-fig { color: var(--night-ink); }
@media (min-width: 960px) {
  .bl--flux .bl-head { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; }
}

/* Corps : sommaire collant + colonne de lecture */
.bl-body { display: grid; grid-template-columns: minmax(0, var(--bl-col)); justify-content: center; column-gap: clamp(40px, 6vw, 112px); padding: clamp(40px, 6vw, 88px) var(--bl-pad) clamp(40px, 6vw, 96px); }
.bl-toc { display: none; }
@media (min-width: 1100px) {
  .bl-body { grid-template-columns: 230px minmax(0, var(--bl-col)); }
  .bl-toc { display: block; position: sticky; top: 104px; align-self: start; font-size: var(--step-small); }
  .bl-toc p { font-weight: 700; margin-bottom: 14px; }
  .bl-toc ul { display: grid; gap: 2px; }
  .bl-toc a { position: relative; display: block; padding: 6px 0 6px 20px; color: var(--muted); text-decoration: none; line-height: 1.3; transition: color 150ms; }
  .bl-toc a::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 11px; height: 11px; background: var(--accent); -webkit-mask: var(--sym) center / contain no-repeat; mask: var(--sym) center / contain no-repeat; opacity: 0; scale: 0.6; transition: opacity 150ms, scale 200ms var(--ease-out); }
  .bl-toc a:hover { color: var(--ink); }
  .bl-toc a[aria-current="true"] { color: var(--ink); font-weight: 600; }
  .bl-toc a[aria-current="true"]::before { opacity: 1; scale: 1; }
}

/* Typographie de lecture */
.bl-art { min-width: 0; font-size: var(--step-body); line-height: 1.72; }
.bl-art > p, .bl-art li { max-width: var(--bl-col); }
.bl-art > p { margin-top: 1.15em; }
.bl-art h2 { margin-top: 2.6em; font: 800 clamp(1.45rem, 1.15rem + 1vw, 2.05rem)/1.15 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; scroll-margin-top: 104px; }
.bl-art h2 + p { margin-top: 0.8em; }
.bl-art a { color: var(--accent); text-decoration-thickness: 1.5px; }
.bl-art a:hover { color: var(--ink); }
.bl-q { background: var(--pastel); padding: 0.05em 0.3em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* L'essentiel */
.bl-key { background: var(--pastel); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 36px); margin-bottom: 0.5em; }
.bl-key h2 { margin: 0 0 14px; font-size: var(--step-lead); scroll-margin-top: 104px; }
.bl-key ul { display: grid; }
.bl-key li { position: relative; padding: 12px 0 12px 32px; border-top: 2px solid rgb(14 20 51 / 0.18); font-weight: 500; line-height: 1.45; }
.bl-key li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 16px; height: 16px; background: var(--accent); -webkit-mask: var(--sym) center / contain no-repeat; mask: var(--sym) center / contain no-repeat; }

/* Sources */
.bl-src { margin-top: 3.2em; padding-top: 1.4em; border-top: 2px solid var(--ink); }
.bl-src h2 { margin-top: 0; font: 700 var(--step-small)/1.2 var(--font); letter-spacing: 0.04em; text-transform: uppercase; }
.bl-src ul { margin-top: 12px; display: grid; gap: 4px; font-size: var(--step-small); line-height: 1.5; }
.bl-src li { padding: 10px 0; border-bottom: 2px solid rgb(14 20 51 / 0.18); }
.bl-src a { font-weight: 600; }
.bl-src a::after { content: " ↗"; }
.bl-back { display: inline-block; margin-top: 2em; font-weight: 600; }
.bl-art .art-back { display: inline-block; margin-top: 2em; font-weight: 600; color: var(--ink); }

/* À lire aussi : lignes éditoriales */
.bl-next { padding: 0 var(--bl-pad) clamp(48px, 6vw, 96px); max-width: 1280px; margin-inline: auto; }
.bl-next h2 { font: 800 var(--step-lead)/1.1 var(--font-display); margin-bottom: 16px; }
.bl-next ul { border-top: 2px solid var(--ink); }
.bl-next li { border-bottom: 2px solid rgb(14 20 51 / 0.25); }
.bl-next a { display: grid; gap: 6px 40px; padding: 22px 0; text-decoration: none; transition: padding 220ms var(--ease-out); }
.bl-next a:hover, .bl-next a:focus-visible { padding-left: 14px; }
.bl-next h3 { font: 800 clamp(1.2rem, 1rem + 0.8vw, 1.7rem)/1.2 var(--font-display); letter-spacing: -0.015em; }
.bl-next p { color: var(--muted); }
@media (min-width: 800px) { .bl-next a { grid-template-columns: 1.4fr 1fr; align-items: baseline; } }

/* Fin : un appel sobre */
.bl-end { margin: 0 var(--m) var(--m); padding: clamp(32px, 5vw, 72px); background: var(--accent); color: var(--accent-ink); border-radius: var(--r-lg); display: grid; gap: 16px 40px; align-items: center; }
.bl-end h2 { font: 800 clamp(1.7rem, 1.2rem + 2vw, 3rem)/1.05 var(--font-display); letter-spacing: -0.025em; }
.bl-end .btn { justify-self: start; background: var(--bg); color: var(--ink); }
.bl-end .btn:hover { background: var(--night); color: var(--night-ink); }
@media (min-width: 800px) { .bl-end { grid-template-columns: 1fr auto; } .bl-end p { grid-column: 1; } .bl-end .btn { grid-column: 2; grid-row: 1 / span 2; } }

/* Liste : composition de magazine */
.bl-mast { padding: clamp(32px, 6vw, 96px) var(--bl-pad) clamp(32px, 4vw, 56px); display: grid; gap: 24px; max-width: 1440px; margin-inline: auto; }
.bl-mast h1 { font: 800 clamp(1.9rem, 0.6rem + 4.6vw, 5.4rem)/0.98 var(--font-display); letter-spacing: -0.04em; text-wrap: balance; max-width: 22ch; }
.bl-mast p { font-size: var(--step-lead); max-width: 34ch; color: var(--muted); }
@media (min-width: 900px) { .bl-mast { grid-template-columns: 1fr auto; align-items: end; } .bl-mast p { padding-bottom: 0.6em; } }

.bl-mag { padding: 0 var(--bl-pad) clamp(40px, 6vw, 88px); max-width: 1440px; margin-inline: auto; display: grid; gap: clamp(28px, 3vw, 48px); }
.bl-mag__h { font: 700 var(--step-small)/1.2 var(--font); letter-spacing: 0.04em; text-transform: uppercase; padding-top: 14px; border-top: 2px solid var(--ink); }
.bl-card { display: grid; gap: 18px; text-decoration: none; color: inherit; }
.bl-card h3 { font: 800 clamp(1.25rem, 1rem + 1vw, 1.9rem)/1.15 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.bl-card p { color: var(--muted); max-width: 40ch; margin-top: 10px; }
.bl-card__t { display: inline-block; margin-top: 16px; font-size: var(--step-small); font-weight: 600; }
.bl-card__fig { display: block; min-width: 0; }
.bl-card h3 { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 0.2em; transition: text-decoration-color 200ms; }
.bl-card:hover h3, .bl-card:focus-visible h3 { text-decoration-color: currentColor; }
/* À la une : champ nuit, schéma grand */
.bl-card--flux { background: var(--night); color: var(--night-ink); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 44px); gap: clamp(20px, 3vw, 40px); }
.bl-card--flux p { color: var(--night-muted); }
.bl-card--flux .bl-card__fig { color: var(--night-ink); }
.bl-card--flux h3 { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 3.1rem); line-height: 1.05; }
/* Les deux autres : texte d'abord, vignette réduite */
.bl-mag__side { display: grid; gap: clamp(28px, 3vw, 48px); align-content: start; }
.bl-mag__side .bl-card { padding-top: 22px; border-top: 2px solid rgb(14 20 51 / 0.3); grid-template-columns: minmax(0, 1fr); }
.bl-mag__side .bl-card__fig { order: 2; max-width: 360px; }
.bl-mag__side .bl-card--marque .bl-card__fig { background: var(--surface); padding: 14px; border-radius: var(--r-md); }
@media (min-width: 960px) {
  .bl-mag { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(32px, 5vw, 80px); }
  .bl-mag__h { grid-column: 1 / -1; }
}

/* Mouvement : une seule animation signature par page (le schéma de tête se dessine) */
@media (prefers-reduced-motion: no-preference) {
  .bl-head .bl-grow { transform-box: fill-box; transform-origin: 50% 50%; animation: bl-grow 700ms var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 200ms); }
  @keyframes bl-grow { from { transform: scaleX(0.2); opacity: 0; } }
  .bl-head .bl-draw { animation: bl-fade 800ms var(--ease-out) 300ms both; }
  @keyframes bl-fade { from { opacity: 0; } }
  .bl-head .bl-dot { animation: bl-run 3.2s var(--ease) 600ms infinite; }
  @keyframes bl-run { 0% { transform: translate(0, 90px); opacity: 0; } 8% { opacity: 1; } 40% { transform: translate(265px, 90px); } 72% { transform: translate(530px, 90px); opacity: 1; } 100% { transform: translate(530px, 90px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .bl-next a { transition: none; } }

.bl-card .bl-dot { display: none; }
.bl-mag__main { display: grid; }
.bl-mag__main .bl-card { align-content: space-between; }
.bl-mast p { text-wrap: pretty; max-width: 40ch; }

/* Images de projets en bande, après l'article */
.bl-shots { padding: 0 var(--bl-pad) clamp(40px, 6vw, 88px); max-width: 1280px; margin-inline: auto; }
.bl-shots ul { display: flex; justify-content: center; align-items: flex-end; gap: clamp(12px, 3vw, 40px); padding: clamp(24px, 4vw, 56px) clamp(16px, 3vw, 40px) 0; background: var(--pastel); border-radius: var(--r-lg); overflow: hidden; }
.bl-shots li { flex: 0 1 260px; min-width: 0; }
.bl-shots li:nth-child(2) { margin-bottom: clamp(16px, 3vw, 40px); }
.bl-shots img { width: 100%; height: auto; }
.bl-shots--flux ul { padding: clamp(24px, 4vw, 56px); }
.bl-shots--flux li { flex: 0 1 900px; }
.bl-shots--flux img { border-radius: var(--r-md); }
.bl-mast__tels { display: none; }
@media (min-width: 900px) {
  .bl-mast { grid-template-columns: minmax(0, 1fr) minmax(0, 580px); }
  .bl-mast h1 { grid-column: 1; }
  .bl-mast p { grid-column: 1; }
  .bl-mast__tels { display: flex; gap: 16px; grid-column: 2; grid-row: 1 / span 2; align-self: end; height: 420px; overflow: hidden; align-items: flex-start; }
  .bl-mast__tels li { flex: 1 1 0; min-width: 0; }
  .bl-mast__tels li:nth-child(even) { margin-top: 36px; }
  .bl-mast__tels img { width: 100%; height: auto; }
}

.bl-shots--flux ul { flex-wrap: wrap; }
.bl-shots--flux .bl-shots__wide { flex: 1 1 100%; }
.bl-shots--flux li:not(.bl-shots__wide) { flex: 0 1 200px; }
.bl-shots--flux li:nth-child(2) { margin-bottom: 0; }
.bl-shots li:nth-child(even) { margin-bottom: clamp(16px, 3vw, 40px); }
.bl-shots--flux li:nth-child(even) { margin-bottom: 0; }

/* v28b — mobile : rien ne reste collé, images de téléphone à taille de lecture, sections moins hautes */
@media (max-width: 900px) {
  main [class*="__t"], main [class*="__h"], main [class*="-ctx"], main [class*="__head"], main .fg-shop > div, main .fk-stage { position: static !important; top: auto !important; }
  main img[src*="projets/tel-"] { max-width: min(240px, 64vw); height: auto; margin-inline: auto; }
  main img[src*="-ecran-"], main img[src*="mijo-comparateur"], main img[src*="pactapp-signer"] { max-width: min(280px, 74vw); height: auto; margin-inline: auto; display: block; }
}
@media (max-width: 900px) {
  .bl-shots ul { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px; }
  .bl-shots__wide { grid-column: 1 / -1; }
  .bl-shots img.tel-pic { max-width: 100%; }
}
