/* ============================================================
   RETROFIT — aligne les pages migrées (gabarit v1) sur le
   design system v2 sans toucher à leur contenu ni à leur JS.
   Chargé APRÈS le <style> embarqué de chaque page : à
   spécificité égale, ces règles l'emportent.
   ============================================================ */

:root {
  /* Palette v2 injectée dans les variables v1 */
  --fond:           #faf7f0;
  --bleu:           #1a3a5c;
  --bleu-clair:     #2e6da4;
  --bordeaux:       #6b2737;
  --bordeaux-clair: #8a4b5a;
  --orange:         #9c4a1e;   /* cuivre v2 */
  --orange-clair:   #b3651f;
  --gris:           #5f5a52;   /* pierre v2, AA */
  --gris-clair:     #5f5a52;   /* corrige le #999 non conforme */
  --ligne:          #e6e0d4;
  /* Typographie v2 */
  --serif: 'Spectral', Georgia, serif;
  --sans:  'Inter', 'Helvetica Neue', Arial, sans-serif;
}

body { font-size: 19px; }

h1, h2, h3,
.carte-titre, .article-titre {
  font-family: 'Fraunces', Georgia, serif;
}

/* Justification du texte courant, césure française */
p, .faq dd, dd, blockquote, .references li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
nav p, .nav-note { text-align: left; }

/* Plancher de lisibilité : plus rien d'important sous 0,9 rem */
.carte-meta, .carte-lire, .rubrique-titre,
.orientation-entree, .orientation-fin p,
.article-meta, .ressource-kicker, .vigilance-num,
.hero-auteur, .hero-label, .newsletter-note,
.ressources-tout, .vigilance-tout, .nav-note,
.retour-rubrique, .breadcrumb, .tag, .kicker {
  font-size: 0.9rem !important;
}
small, .small { font-size: 0.9rem !important; }

/* Navigation v1 : pastilles lisibles */
nav .nav-pill { font-size: 0.85rem !important; }
@media (max-width: 780px) {
  .nav-links .nav-pill { flex: 1 1 calc(33.333% - 0.35rem); }
}

/* Footer-plan v2 injecté dans les pages migrées */
footer { font-size: 0.95rem !important; color: rgba(250, 247, 240, 0.8) !important; text-align: left !important; }
footer .footer-plan {
  max-width: 1080px;
  margin: 0 auto 2.4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  font-family: var(--sans);
}
footer .footer-plan h4 {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 247, 240, 0.55);
  margin-bottom: 0.8rem;
}
footer .footer-plan ul { list-style: none; margin: 0; padding: 0; }
footer .footer-plan li { margin-bottom: 0.45rem; }
footer .footer-plan a {
  color: rgba(250, 247, 240, 0.85) !important;
  text-decoration: none;
  border-bottom: none !important;
  font-size: 0.95rem !important;
}
footer .footer-plan a:hover { color: #fff !important; border-bottom: 1px solid rgba(255,255,255,0.5) !important; }
footer .footer-signature {
  max-width: 1080px;
  margin: 0 auto;
  border-top: 1px solid rgba(250, 247, 240, 0.2);
  padding-top: 1.4rem;
  color: rgba(250, 247, 240, 0.7);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-family: var(--sans);
}
footer .footer-signature a { color: rgba(250, 247, 240, 0.85) !important; border-bottom: none !important; font-size: 0.95rem !important; }
footer .footer-signature a:hover { color: #fff !important; }
@media (max-width: 900px) { footer .footer-plan { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { footer .footer-plan { grid-template-columns: 1fr; } }

/* Sélection de texte aux couleurs v2 */
::selection { background: #9c4a1e; color: #faf7f0; }

/* ============================================================
   PLANCHER GÉNÉRALISÉ — surcharges générées par inventaire des
   styles embarqués v1 : aucune taille sous 0,9 rem (étiquettes)
   ni 0,95 rem (texte courant). !important requis : les gabarits
   v1 utilisent eux-mêmes !important dans leurs correctifs mobiles.
   ============================================================ */
.acte,
.answer-letter,
.article-accroche,
.article-date { font-size: 0.9rem !important; }
.article-meta,
.article-suivant-label,
.book-page h2,
.bottom-nav { font-size: 0.9rem !important; }
.btn,
.btn-retour,
.btn-send,
.btn-subscribe { font-size: 0.9rem !important; }
.cadre-label,
.carte-dates,
.carte-meta,
.competence-label { font-size: 0.9rem !important; }
.cta-row a,
.day-map th,
.dg-n,
.dg-q { font-size: 0.9rem !important; }
.dg-qt,
.dimension h3,
.entree-ref,
.epitaphe-label { font-size: 0.9rem !important; }
.essay-page h2,
.etape-duree,
.etape-num,
.famille-num { font-size: 0.9rem !important; }
.famille-posture,
.fiche-badges span,
.fiche-grid dt,
.form-error { font-size: 0.9rem !important; }
.hero-back,
.hero-dates,
.hero-label,
.hero-meta { font-size: 0.9rem !important; }
.hero-num,
.heure,
.hint,
.insight-label { font-size: 0.9rem !important; }
.lang-switch.nav-pill,
.legend-item,
.lettre-index,
.md { font-size: 0.9rem !important; }
.meme-esprit,
.mesh-card small,
.mesh-label,
.meta-label { font-size: 0.9rem !important; }
.method-callout-label,
.mt,
.nav-actions a,
.nav-actions span { font-size: 0.9rem !important; }
.nav-bas .tous,
.nav-bas a,
.nav-pill,
.notif { font-size: 0.9rem !important; }
.orateur,
.orientation,
.orientation-entree,
.pie-center { font-size: 0.9rem !important; }
.piece,
.principe-titre,
.principle h3,
.profile-card h3 { font-size: 0.9rem !important; }
.progress-meta,
.question-label,
.question-number,
.r-centre-txt { font-size: 0.9rem !important; }
.r-label,
.r-sous-label,
.ref-groupe-titre,
.regime h3 { font-size: 0.9rem !important; }
.reponse-label,
.result-block h3,
.result-label,
.retour a { font-size: 0.9rem !important; }
.retour-propos a,
.retour-propos-label,
.retour-sommaire,
.rubrique-nom { font-size: 0.9rem !important; }
.scroll-hint,
.section-kicker,
.section-marker,
.site-footer { font-size: 0.9rem !important; }
.site-name,
.sommaire-titre,
.sources-titre,
.stage h3 { font-size: 0.9rem !important; }
.step-card h3,
.step-num,
.synthese-titre,
.tab-btn { font-size: 0.9rem !important; }
.workshop-kicker,
label { font-size: 0.9rem !important; }
/* h2 nu volontairement exclu : sur 8 gabarits d'essais v1, h2 est une
   étiquette à 0,88 rem (écart imperceptible) ; une règle générique
   écraserait les intertitres normaux des autres pages.
   footer exclu : déjà fixé à 0,95 rem plus haut. */
nav .site-name { font-size: 0.9rem !important; }
.about-link a,
.about-link-label,
.article-lire-plus,
.atelier-cta-label { font-size: 0.95rem !important; }
.atelier-cta-link,
.atelier-pave-kicker,
.atelier-pave-text,
.avertissement p { font-size: 0.95rem !important; }
.enjeux-lien,
.entree-lien,
.liens a,
.liens-label { font-size: 0.95rem !important; }
.links a,
.links-label,
.livre-bandeau .label,
.livre-lien { font-size: 0.95rem !important; }
.livre-note,
.mesh-card p,
.method-callout-link,
.modalite { font-size: 0.95rem !important; }
.nav-note,
.note,
.note-auteur,
.note-vigilance { font-size: 0.95rem !important; }
.prevnext-lien,
.privacy-note,
.resource-line,
.sommaire-lien { font-size: 0.95rem !important; }
.sources p,
.sources-liste li,
.synthese ol li,
nav .nav-links a { font-size: 0.95rem !important; }

/* Navigation mobile compacte : une ligne de marque, une ligne de liens scrollable. */
@media (max-width: 780px) {
  nav,
  .main-nav {
    min-height: 0 !important;
    height: auto !important;
    padding: 0.5rem 0.9rem 0.45rem !important;
    gap: 0.35rem 0.7rem !important;
    align-items: center !important;
  }

  nav .site-name,
  .main-nav .site-name {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
  }

  nav .nav-actions,
  .main-nav .nav-actions {
    order: 2 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    gap: 0.35rem !important;
  }

  nav .nav-links,
  .main-nav .nav-links {
    order: 3 !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.55rem !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  nav .nav-links::-webkit-scrollbar,
  .main-nav .nav-links::-webkit-scrollbar { display: none; }

  nav .nav-links .nav-pill,
  .main-nav .nav-links .nav-pill,
  nav .nav-links a,
  .main-nav .nav-links a {
    flex: 0 0 auto !important;
    min-width: auto !important;
    min-height: 1.9rem !important;
    padding: 0.34rem 0.55rem !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.045em !important;
    white-space: nowrap !important;
  }

  nav .nav-actions .nav-pill,
  .main-nav .nav-actions .nav-pill,
  nav .lang-switch,
  .main-nav .lang-switch {
    min-height: 1.9rem !important;
    padding: 0.34rem 0.55rem !important;
    font-size: 0.68rem !important;
    white-space: nowrap !important;
  }
}
