/* ============================================================
   MEDERREG · Règles de mise en page du livret (M-regles, 04/11/2026)
   Chargée en dernier (après site.css et les <style> des pages) :
   elle transpose au site les règles de livret-src/css_typo.css.
   1  texte ferré à gauche, sans césure
   3  quatre couples taille / interligne pour le texte
   4  titres : une taille par niveau, partie colorée en italique semibold
   5  kickers sans trait
   6  aucun numéro devant pôle, section ou étape
   7  légendes sous les photos, calées à droite
   8  grands chiffres dans la couleur d'accent des titres, sans filet
   9  colonnes : filets verticaux fins entre les colonnes
   10 tableaux et listes clé / valeur centrés verticalement
   11 grille commune (.wrap 1180 px)
   13 légendes de graphique en bas
   ============================================================ */

:root{
  /* Texte : 4 couples, identiques à toutes les largeurs d'écran */
  --fs-c:16px;  --lh-c:26px;    /* courant (Inter) */
  --fs-l:19px;  --lh-l:29px;    /* chapô (Source Serif 4) */
  --fs-cap:13px;--lh-cap:20px;  /* légende, source, mention */
  --fs-k:11px;  --lh-k:16px;    /* petites capitales */
  /* Titrage : une taille par niveau */
  --fs-h1:clamp(40px,5vw,68px); --lh-h1:1.04;
  --fs-h2:clamp(30px,3.8vw,48px); --lh-h2:1.1;
  --fs-h3:22px; --lh-h3:28px;
  /* Espaces : entre paragraphes, entre un intertitre et son texte */
  --sp-p:16px; --sp-it:10px;
}

/* ─── 1 · Ferré à gauche, sans césure ─── */
body, body *{hyphens:none!important;-webkit-hyphens:none!important}
p, li, dd, dt, td, th, blockquote, .section-subtitle, .section-title{text-align:left}
[style*="text-align:center"], [style*="text-align: center"], [style*="justify"]:not([style*="justify-content"]):not([style*="justify-items"]):not([style*="justify-self"]){text-align:left!important}
section[style*="text-align:center"] .section-title{margin-left:0!important;margin-right:0!important}

/* ─── 3 · Courant ─── */
.prose p, .prose li, .prose td, .prose ol li, .prose ul li,
.feature-card p, .feature-card li, .choisir-card p, .rse-card p,
.metier-overlay p, .real-info p, .actu-body p, .offre p, .offre li,
.step p, .spec-row, .spec-row dd, .fiche-row dd, .pres-text p, .rejoindre-text p, .rejoindre-point p,
.lv-table, .lv-table td, .lv-timeline p, .lv-org li, .lv-legend .row, .lv-legend p, .lv-logi p, .lv-tf1 p,
.notice p, .cta-band p, .form-card-sub, .contact-form-sub, .footer-brand p, .footer-col a, .sitemap-col a,
.stat-box .note, .toc li, .article-meta, .no-result, .site-footer{
  font-size:var(--fs-c)!important; line-height:var(--lh-c)!important;
}
/* ─── 3 · Chapô ─── */
.section-subtitle, .page-hero p, .hero-desc, .err-wrap p, .c-item p, .acces-infos dd, .footer-contact,
.plaquette-text strong{
  font-size:var(--fs-l)!important; line-height:var(--lh-l)!important;
}
/* ─── 3 · Légende ─── */
figcaption, .pole-gallery figcaption, .lv-source, .chart-key, .form-note, .consent, .footer-bottom,
.stat-box .stat-tooltip, .lv-stack span, .lv-legend .row span{
  font-size:var(--fs-cap)!important; line-height:var(--lh-cap)!important;
}
.lv-legend .row span{font-size:var(--fs-c)!important; line-height:var(--lh-c)!important}
/* ─── 3 · Petites capitales ─── */
.section-label, .hero-badge, .breadcrumb, .stat-box .lbl, .real-info .real-client, .actu-date, .actu-more, .actu-btn,
.badge, .real-tag, .rse-standard, .metier-tags span, .fiche-row dt, .fiche-panel h3, .c-item h4, .acces-infos dt,
.footer-col h4, .bar-heading, .lv-kicker, .lv-org .lv-org-n, .lv-table th, .prose th, .step h3, .toc h2,
.plaquette-text small, .rejoindre-values-title, .rejoindre-stat .r-lbl, .hero-pole h3, .real-filter-btn, .lv-ops tr.lv-group th{
  font-size:var(--fs-k)!important; line-height:var(--lh-k)!important;
  font-weight:600; letter-spacing:.2em; text-transform:uppercase;
}

/* Espaces entre paragraphes : les mêmes partout */
.prose p, .pres-text p, .rejoindre-text p{margin:0 0 var(--sp-p)!important}
section p + p, .offre p + p, .notice p + p, .lv-legend p{margin-top:var(--sp-p)!important}
.prose h2 + p, .prose h3 + p, .prose h3 + ul, .feature-card h3 + p, .choisir-card h3 + p, .rse-card h3 + p,
.lv-org h3 + p, .lv-timeline h3 + p, .step h3 + p, .offre-head + p{margin-top:var(--sp-it)!important}
.feature-card h3, .choisir-card h3, .rse-card h3, .prose h3, .lv-org h3, .lv-timeline h3, .step h3, .real-info h4, .actu-body h3, .metier-overlay h3{margin-bottom:0!important}
.real-info h4 + p, .actu-body h3 + p, .metier-overlay h3 + p{margin-top:var(--sp-it)!important}

/* ─── 4 · Titres : une taille par niveau ─── */
.page-hero h1, .hero h1, .err-wrap h1{font-size:var(--fs-h1)!important; line-height:var(--lh-h1)!important}
.section-title, .prose h2, .cta-band h2, .form-card-title, .contact-form-title, .pres-text h3{
  font-family:var(--serif); font-weight:300; letter-spacing:-.015em;
  font-size:var(--fs-h2)!important; line-height:var(--lh-h2)!important;
}
.feature-card h3, .choisir-card h3, .rse-card h3, .metier-overlay h3, .real-info h4, .actu-body h3, .offre-head h3,
.sitemap-col h2, .lv-org h3, .prose h3, .rejoindre-point h4, .lv-timeline h3, .spec-row dt, .pole-block > h3{
  font-family:var(--serif); font-weight:400; letter-spacing:0; text-transform:none;
  font-size:var(--fs-h3)!important; line-height:var(--lh-h3)!important;
}
/* Partie colorée : italique semibold, couleur d'origine conservée */
h1 em, h2 em, h3 em, h4 em, .section-title em, .err-code{font-style:italic; font-weight:600!important; font-variation-settings:'opsz' 60,'wght' 600}

/* ─── 5 · Kickers sans trait ─── */
.section-label::before, .hero-badge::before{content:none!important; display:none!important}
.section-label, .hero-badge{gap:0!important}

/* ─── 6 · Aucun numéro devant pôle, section, étape ; pas de pastille sur les photos ─── */
.step-num, .lv-num, .real-count{display:none!important}
.metier-overlay h3::before, .hero-pole h3::before, .toc li::before{content:none!important; display:none!important}
.toc li{grid-template-columns:1fr!important}
.metier-overlay h3{gap:0!important}

/* ─── 7 · Légendes sous la photo, calées sur son bord droit ─── */
figcaption, .pole-gallery figcaption{display:block; margin-top:8px!important; text-align:right!important; color:var(--muted); opacity:1!important; text-wrap:balance}

/* ─── 8 · Grands chiffres en couleur d'accent, sans filet ─── */
.stat-box .num, .rejoindre-stat .r-num, .lv-timeline .y, .lv-legend .row b{color:var(--red)!important}
.cta-band .num{color:var(--accent-lt)!important}
.stats-grid, .rejoindre-stat-bar{border-top:0!important}
.stat-box::before{content:none!important}
.stats-grid .stat-box{border-top:0!important; margin-top:0!important}
.stat-box{padding-top:0!important}

/* ─── 9 · Blocs en colonnes : filets verticaux fins entre les colonnes ─── */
.card-grid, .choisir-grid, .rse-grid, .steps, .stats-grid, .lv-org, .lv-timeline, .sitemap-grid,
.metiers-grid, .realisations-grid, .actu-grid, .lv-logi{
  border-top:0!important; overflow-x:clip; position:relative;
}
.card-grid{--cg:36px} .choisir-grid,.rse-grid{--cg:36px} .steps{--cg:28px} .stats-grid{--cg:28px}
.lv-org{--cg:32px} .lv-timeline{--cg:22px} .sitemap-grid{--cg:36px} .metiers-grid,.realisations-grid,.actu-grid{--cg:32px}
.lv-logi{--cg:48px}
.card-grid > *, .choisir-grid > *, .rse-grid > *, .steps > *, .stats-grid > *, .lv-org > *, .lv-timeline > *,
.sitemap-grid > *, .metiers-grid > *, .realisations-grid > *, .actu-grid > *, .lv-logi > *{
  position:relative; border-top:0!important;
}
.feature-card, .choisir-card, .rse-card, .sitemap-col, .lv-org .col{padding-top:0!important}
.metier-overlay, .real-info, .actu-body{border-top:0!important}
.feature-card::before, .choisir-card::before, .rse-card::before{content:none!important}
.card-grid > *::after, .choisir-grid > *::after, .rse-grid > *::after, .steps > *::after, .stats-grid > *::after,
.lv-org > *::after, .lv-timeline > *::after, .sitemap-grid > *::after, .metiers-grid > *::after,
.realisations-grid > *::after, .actu-grid > *::after, .lv-logi > *::after{
  content:''; position:absolute; top:0; bottom:0; left:calc(var(--cg) / -2); width:0;
  border-left:1px solid var(--rule); pointer-events:none;
}
/* étapes et repères : le point orange reste, sans le filet horizontal */
.steps > .step::before, .lv-timeline li::before{top:0!important}
.steps > .step, .lv-timeline li{padding-top:26px!important}
/* la carte métier ne rogne plus son contenu (le filet sort dans la gouttière) : la photo ne zoome plus au survol */
.metier-card{overflow:visible!important}
.metier-card img, .metier-card:hover img, .metier-card:focus-visible img,
html.js .fade-in.metier-card img, html.js .fade-in .metier-card img{transform:none!important; scale:none!important}
.metier-card:hover, .metier-card:focus-visible{transform:translateY(-3px)}
.metier-card{transition:transform var(--dur) var(--ease)}
/* repères : filet de la frise retiré aussi en tablette */
@media (max-width:1100px){.lv-timeline li{border-top:0!important}}

/* Mobile : une colonne, filet horizontal fin entre les blocs */
@media (max-width:768px){
  .card-grid, .choisir-grid, .rse-grid, .steps, .lv-org, .lv-timeline, .sitemap-grid,
  .metiers-grid, .realisations-grid, .actu-grid, .lv-logi{grid-template-columns:1fr!important; row-gap:48px!important; --rg:48px}
  .steps .step:nth-child(n+2){margin-top:0!important}
  .card-grid > *::after, .choisir-grid > *::after, .rse-grid > *::after, .steps > *::after,
  .lv-org > *::after, .lv-timeline > *::after, .sitemap-grid > *::after, .metiers-grid > *::after,
  .realisations-grid > *::after, .actu-grid > *::after, .lv-logi > *::after{
    top:calc(var(--rg) / -2); bottom:auto; left:0; right:0; width:auto; border-left:0; border-top:1px solid var(--rule);
  }
  .card-grid > :first-child::after, .choisir-grid > :first-child::after, .rse-grid > :first-child::after, .steps > :first-child::after,
  .lv-org > :first-child::after, .lv-timeline > :first-child::after, .sitemap-grid > :first-child::after, .metiers-grid > :first-child::after,
  .realisations-grid > :first-child::after, .actu-grid > :first-child::after, .lv-logi > :first-child::after{content:none}
  .lv-logi{gap:48px!important}
  .stats-grid{row-gap:32px!important}
}
@media (max-width:400px){
  .stats-grid{grid-template-columns:1fr!important; --rg:32px}
  .stats-grid > *::after{top:calc(var(--rg) / -2); bottom:auto; left:0; right:0; width:auto; border-left:0; border-top:1px solid var(--rule)}
  .stats-grid > :first-child::after{content:none}
  .stats-grid .stat-box:nth-child(n+2){border-top:0!important; margin-top:0!important}
}

/* ─── 10 · Tableaux et listes clé / valeur : cellules centrées verticalement ─── */
td, th, .prose th, .prose td, .lv-table th, .lv-table td{vertical-align:middle!important}
.fiche-row, .spec-row, .lv-legend .row, .c-item{align-items:center!important}
.fiche-row dt{padding-top:0!important}
.c-icon{margin-top:0!important}

/* ─── 11 · Grille commune : tout part de la colonne de 1 180 px ─── */
.wrap-narrow{max-width:1180px!important}
.wrap-narrow > *{max-width:820px}
.wrap-narrow > .toc, .wrap-narrow > .prose{max-width:820px}
.center-header{margin-bottom:48px}
.chiffres-center, .choisir-header, .rse-header, .realisations-header, .actualites-header{margin-bottom:48px!important}

/* ─── 13 · Légende du graphique, sous le graphique ─── */
.chart-key-b{justify-content:flex-end; margin-top:16px; color:var(--muted)}
.chart-key-b span{display:inline-flex; align-items:center}

/* Grille : les tableaux clé / valeur des pages étroites occupent toute la colonne de 1 180 px */
.wrap-narrow > .spec-list, .wrap-narrow > .lv-table-wrap, .wrap-narrow > table{max-width:none}
/* Bloc qui suit le chapô de section : même blanc partout */
.section-subtitle + *{margin-top:48px}
.section-title + .card-grid, .section-title + .stats-grid, .section-title + .steps{margin-top:40px}
/* Pas de grand blanc entre deux sections de même fond : le blanc du bas de la première suffit */
body:not(:has(.hero)) section:not([style*="background"]):not(.cta-band):not(.page-hero) + section:not([style*="background"]):not(.cta-band):not(.page-hero),
body:not(:has(.hero)) section[style*="cream"] + section[style*="cream"],
.actualites + .clients{padding-top:0!important}
.metier-tags{gap:2px 16px!important}.metier-tags span+span::before{content:none!important}

/* gouttière imposée = --cg : le filet vertical tombe au milieu de la gouttière */
.card-grid, .choisir-grid, .rse-grid, .steps, .stats-grid, .lv-org, .lv-timeline, .sitemap-grid, .metiers-grid, .realisations-grid, .actu-grid, .lv-logi{column-gap:var(--cg)!important}

/* ═══ Qualifications (entreprise, d'après la p. 71 du livret) : rangée des 5 logos au-dessus du tableau ═══ */
.q-logos{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:24px 40px; margin:48px 0 40px!important}
.q-lg{display:flex; align-items:center; height:72px}
.q-lg img{display:block; width:auto; max-width:100%; object-fit:contain}
.lv-table td.rge{color:var(--accent-ink); font-weight:600; letter-spacing:.18em; font-size:var(--fs-k)!important; white-space:nowrap}
.section-subtitle + .q-logos{margin-top:48px!important}
@media (max-width:768px){
  .q-logos{display:grid; grid-template-columns:repeat(3, 1fr); gap:24px 20px; justify-items:start}
  .q-lg{height:56px}
  .q-lg img{max-height:56px}
}
@media (max-width:1024px){ .card-grid.cols-4{grid-template-columns:repeat(2, 1fr)} }
