/* Démystification — palette ivoire et sauge, 29 octobre 2026.
   Évolutions purement esthétiques : mise en page mobile inchangée.
   Ancienne note : accents colorés discrets et fond de lecture.
   Feuille commune à toutes les pages, chargée EN DERNIER après les styles existants.
   Pour changer la couleur générale, modifier --papier-site. */
:root { --papier-site:#f4f1e8; --papier-carte:#e6efe5; --bordure-carte:#c1d4c4; --vert-texte:#284c3b; --papier-entete:#ebf0e8; --papier-carte-livre:#edf2e9; color-scheme:light; }
html { background-color:var(--papier-site); }
body { background-color:var(--papier-site) !important; }
/* Les sections initialement créées dans Blocs demeurent transparentes pour révéler le fond. */
.page-container, .bloc.l-bloc { background-color:transparent !important; }
/* Barres de navigation et principaux panneaux, avec un contraste sans être criard. */
nav.global, header.site-header { background-color:var(--papier-entete); }
nav.global a:hover,nav.global a:focus-visible,nav.global a[aria-current="page"] { color:var(--vert-texte); }
/* Tuiles des articles : texte descriptif immédiatement sous le titre, pas en bas de la carte. */
.article-card { height:250px; background:var(--papier-carte); border-color:var(--bordure-carte); }
.article-card h3 { margin:7px 0 10px; }
.article-card .excerpt { margin-top:0; }
.article-card:hover,.article-card:focus-visible {background:#dce9dc;border-color:#90ae99;}
/* Autres encadrés : nuance douce cohérente sur les différentes rubriques. */
.people a, .links-grid a, nav.toc, .toc {background-color:var(--papier-carte);} 
.people a, .links-grid a, nav.toc {border-color:var(--bordure-carte);}
/* Conservation de la lisibilité en petit écran : cartes à hauteur naturelle. */
@media(max-width:720px) {
  .article-card {height:auto;min-height:0;padding:18px 18px 20px;}
  .article-card h3 {margin:7px 0 10px;}
  .article-card .excerpt {margin-top:0;}
}
@media print { html,body {background:white !important;} }
/* Mise au point de la lecture sur téléphone pour les deux pages issues de Blocs. */
@media(max-width:575px) {
  #bloc-1 > .container, #bloc-3 > .container {
    padding-top:42px !important;
    padding-bottom:15px !important;
  }
  #bloc-2 > .container {
    padding-top:20px !important;
    padding-bottom:44px !important;
  }
  #bloc-2 p.p-style {
    width:100% !important;
    max-width:100% !important;
    text-align:justify !important;
    hyphens:auto;
    -webkit-hyphens:auto;
    font-size:17px;
    line-height:1.68;
  }
}


/* 29 October — Centrage constant des titres/citation et mise en page tablette.
   Bootstrap's text-lg-center class only centers at >=992px; here we want
   the page headings centered at every viewport width. */
#bloc-1 h1, #bloc-1 p.text-lg-center, #bloc-3 h1 {
  text-align:center !important;
}
/* The book's author presentation heading is centered as well. */
#bloc-4 h2 { text-align:center !important; }

/* Between phone and small desktop: use a genuinely comfortable reading width.
   The original custom .p-style width:56.62% was far too narrow on iPads. */
@media (min-width:576px) and (max-width:1023px) {
  #bloc-2 p.p-style, #bloc-4 p.p-style {
    width:calc(100% - 56px) !important;
    max-width:790px !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
  /* The main title/citation should use the space available, not a narrow
     two-thirds-width Bootstrap column. */
  #bloc-1 .row > [class*="col-"],
  #bloc-3 .row > [class*="col-"] {
    width:100% !important;
    max-width:100% !important;
    flex:0 0 100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
}
/* A slightly wider text area on smaller phones while retaining safe gutters. */
@media (max-width:575px) {
  #bloc-1 h1, #bloc-1 p.text-lg-center, #bloc-3 h1 { text-align:center !important; }
  #bloc-1 .row > [class*="col-"],
  #bloc-3 .row > [class*="col-"] { width:100%; max-width:100%; margin-left:0 !important; }
}


/* --- Les cinq rubriques : contraste doux, accents persistants --- */
/* Fond du bandeau global créé à l'origine dans Blocs. */
#bloc-0.bloc.l-bloc {
  background:var(--papier-entete) !important;
  border-bottom:1px solid #cbdccc;
}
/* La navigation issue des pages historiques et la navigation Blocs sont distinctes. */
nav.global { border-bottom-color:#cfdecf; }
nav.global a:hover, nav.global a:focus-visible,
nav.global a[aria-current="page"] { color:var(--vert-texte); }
.site-navigation .nav-link:hover,
.site-navigation .nav-link:focus-visible,
.site-navigation .nav-link[aria-current="page"] { color:var(--vert-texte) !important; }
/* Une nuance de vert uniquement dans les grands titres, pas dans le corps des livres. */
#bloc-1 h1, #bloc-3 h1, #bloc-4 h2, #bloc-5 h2,
main > h1, .article-index-main > h1, .article-page > h1,
.links-main > h1 { color:#2d4939; }
.year-section h2 { color:#2d4939; border-bottom-color:#cbdcca; }
/* Encadrés d'articles et liens : bordure et ombre très discrètes. */
.article-card {
  box-shadow:0 2px 9px rgba(45,71,46,.055);
  border-radius:7px;
}
.article-card .metadata { color:#506557; }
.article-card h3 { color:#253d30; }
.links-grid a, .people a {
  background:var(--papier-carte);
  border-color:var(--bordure-carte);
  box-shadow:0 2px 7px rgba(37,61,44,.06);
}
.links-grid a:hover, .people a:hover,
.links-grid a:focus-visible, .people a:focus-visible {
  background:#dce9dc;
  border-color:#91af99;
}
/* Livres : légères tuiles derrière les couvertures et les titres,
   sans toucher aux tailles des images ou au nombre de colonnes. */
.tt-catalogue .tt-book-card {
  background:var(--papier-carte-livre);
  border:1px solid #cddccd;
  border-radius:8px;
  padding:12px 12px 19px;
  box-shadow:0 2px 8px rgba(43,67,45,.05);
}
.tt-catalogue .tt-book-card:hover {
  background:#e4ede2;
  border-color:#abc6af;
}
.tt-catalogue .tt-book-title { color:#2c4535; }
/* Sommaires et citations des longues pages : fond léger, texte intact. */
nav.toc, .toc {
  background:var(--papier-carte);
  border-color:var(--bordure-carte);
}
.quotation, .article-content blockquote {
  border-left-color:#779c82;
  background:rgba(230,239,229,.66);
  padding:12px 18px;
  border-radius:0 5px 5px 0;
}
.missing-portrait, .front-placeholder, .warning, .archival-note {
  background:var(--papier-carte);
  border-color:var(--bordure-carte);
}
/* Les documents longs restent lisibles et économes en encre sur papier. */
@media print {
  html, body, #bloc-0.bloc.l-bloc { background:white !important; }
  .article-card, .tt-catalogue .tt-book-card,
  .links-grid a, .people a, nav.toc, .toc,
  .quotation, .article-content blockquote {
    background:white !important; box-shadow:none !important;
  }
}
