/* Idées & Nations — mood board « Atlas & frontières »
   Prata (titres) / Piazzolla (texte) / Onest (interface), toutes avec cyrillique. */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
input, button, textarea, select { font: inherit; }

/* ---------- Tokens ---------- */
:root {
  --atlas: #E8EDEE;
  --atlas-clair: #F3F6F6;
  --prusse: #1C2A4A;
  --prusse-80: rgba(28, 42, 74, 0.8);
  --prusse-60: rgba(28, 42, 74, 0.62);
  --prusse-15: rgba(28, 42, 74, 0.15);
  --prusse-08: rgba(28, 42, 74, 0.08);
  --ambre: #C4861A;
  --ambre-texte: #9A6510; /* contraste AA sur --atlas (≈ 5,4:1) */
  --frontiere: #A8362C;
  --lichen: #93A898;
  --lichen-clair: #DCE3DD;
  --lichen-fonce: #4F6655;

  --cat-histoire: #1C2A4A;
  --cat-idees: #9A6510;
  --cat-litterature: #A8362C;
  --cat-langues: #4F6655;
  --cat-traditions: #6B4E2E;
  --cat-voyage: #3E5A7A;

  --ff-display: 'Prata', 'Georgia', serif;
  --ff-body: 'Piazzolla', 'Georgia', serif;
  --ff-ui: 'Onest', system-ui, sans-serif;

  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.125rem;
  --t-lg: 1.3125rem;
  --t-xl: 1.75rem;
  --t-2xl: 2.25rem;
  --t-3xl: clamp(2.25rem, 4.5vw + 1rem, 3.75rem);

  --measure-article: 70ch;
  --largeur: 74rem;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
  --espace: clamp(3rem, 6vw, 5.5rem);
}

/* ---------- Base ---------- */
body {
  background: var(--atlas);
  color: var(--prusse);
  font-family: var(--ff-body);
  font-size: var(--t-base);
  line-height: 1.7;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 400;
  line-height: 1.18;
  color: var(--prusse);
  text-wrap: balance;
}
h1 { font-size: var(--t-3xl); letter-spacing: -0.005em; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-xl); }
a { color: var(--ambre-texte); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--frontiere); }
:focus-visible { outline: 2px solid var(--ambre); outline-offset: 3px; }
::selection { background: var(--lichen-clair); }
strong { font-weight: 600; }

.saut-contenu {
  position: absolute; left: -9999px; top: 0;
  background: var(--prusse); color: var(--atlas); padding: 0.6rem 1rem;
  font-family: var(--ff-ui); z-index: 10;
}
.saut-contenu:focus { left: 1rem; }
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.conteneur { max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere); }
.colonne { max-width: var(--measure-article); }

/* Séparateur « frontière » */
.frontiere, hr {
  border: 0;
  border-top: 2px dashed var(--frontiere);
  opacity: 0.55;
  margin: var(--espace) 0;
}

/* ---------- Images : wrappers anti-distorsion ---------- */
.img-hero, .img-card, .img-body, .img-interview, .img-portrait { overflow: hidden; background: var(--lichen-clair); }
.img-hero { aspect-ratio: 16 / 9; }
.img-card, .img-body { aspect-ratio: 3 / 2; }
.img-interview { aspect-ratio: 1 / 1; }
.img-portrait { aspect-ratio: 1 / 1; border-radius: 50%; }
.img-hero img, .img-card img, .img-body img, .img-interview img, .img-portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}

/* ---------- En-tête ---------- */
.entete {
  border-bottom: 1px solid var(--prusse-15);
  background: var(--atlas);
}
.entete__barre {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding-top: 1.1rem; padding-bottom: 1.1rem;
}
.marque { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--prusse); }
.marque:hover { color: var(--prusse); }
.marque__monogramme { width: 2.4rem; height: 2.4rem; flex: none; }
.marque__nom { font-family: var(--ff-display); font-size: 1.45rem; line-height: 1; }
.marque__sous { display: block; font-family: var(--ff-ui); font-size: var(--t-xs); color: var(--prusse-60); margin-top: 0.3rem; }

.nav { font-family: var(--ff-ui); font-size: var(--t-sm); }
.nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.nav a { color: var(--prusse); text-decoration: none; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ambre); color: var(--prusse); }
.nav__bascule { display: none; }

@media (max-width: 62rem) {
  .nav__bascule {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--ff-ui); font-size: var(--t-sm);
    background: none; border: 1px solid var(--prusse-15); color: var(--prusse);
    padding: 0.45rem 0.8rem; border-radius: 2px; cursor: pointer;
  }
  .nav { position: relative; }
  .nav ul {
    display: none; position: absolute; right: 0; top: calc(100% + 0.6rem); z-index: 5;
    flex-direction: column; gap: 0; min-width: 15rem;
    background: var(--atlas-clair); border: 1px solid var(--prusse-15); padding: 0.5rem 1rem;
    box-shadow: 0 10px 30px var(--prusse-08);
  }
  .nav[data-ouvert="true"] ul { display: flex; }
  .nav li a { display: block; padding: 0.55rem 0; }
}

/* ---------- Pied de page ---------- */
.pied {
  background: var(--prusse); color: var(--atlas);
  margin-top: var(--espace); padding: 3.5rem 0 2rem;
  font-family: var(--ff-ui); font-size: var(--t-sm);
  border-top: 3px dashed var(--ambre);
}
.pied a { color: var(--atlas); }
.pied a:hover { color: var(--ambre); }
.pied__grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.pied__titre { font-family: var(--ff-display); font-size: 1.35rem; margin-bottom: 0.6rem; }
.pied p { color: rgba(232, 237, 238, 0.78); max-width: 34ch; line-height: 1.6; }
.pied ul { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.pied h2 { font-family: var(--ff-ui); font-size: var(--t-sm); font-weight: 600; color: var(--atlas); margin-bottom: 0.8rem; }
.pied__bas { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(232, 237, 238, 0.18); color: rgba(232, 237, 238, 0.6); }
@media (max-width: 48rem) { .pied__grille { grid-template-columns: 1fr; } }

/* ---------- Ariane ---------- */
.ariane { font-family: var(--ff-ui); font-size: var(--t-xs); color: var(--prusse-60); padding: 1.4rem 0 0; }
.ariane ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ariane li + li::before { content: "/"; margin-right: 0.3rem; color: var(--prusse-15); }
.ariane a { color: var(--prusse-60); }

/* ---------- Tête d'article / pilier avec silhouette ---------- */
.tete { position: relative; padding: 2.5rem 0 2rem; isolation: isolate; }
.silhouette {
  position: absolute; z-index: -1; pointer-events: none;
  right: -2%; top: -0.5rem; width: min(46rem, 70%); height: auto;
  color: var(--lichen); opacity: 0.38;
}
.silhouette__frontiere { stroke: var(--frontiere); opacity: 0.7; }
.tete h1 { max-width: 22ch; }
.tete__resume { font-size: var(--t-lg); line-height: 1.55; max-width: 52ch; margin-top: 1.1rem; color: var(--prusse-80); }
.tete__meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: center;
  font-family: var(--ff-ui); font-size: var(--t-xs); color: var(--prusse-60);
  margin-top: 1.3rem;
}
.categorie { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--prusse); font-weight: 500; text-decoration: none; }
.categorie::before { content: ""; width: 0.6rem; height: 0.6rem; background: var(--cat, var(--prusse)); flex: none; }
.cat-histoire { --cat: var(--cat-histoire); }
.cat-idees { --cat: var(--cat-idees); }
.cat-litterature { --cat: var(--cat-litterature); }
.cat-langues { --cat: var(--cat-langues); }
.cat-traditions { --cat: var(--cat-traditions); }
.cat-voyage { --cat: var(--cat-voyage); }

.tete__image { margin-top: 2rem; }
.tete__image figcaption, figure figcaption {
  font-family: var(--ff-ui); font-size: var(--t-xs); color: var(--prusse-60);
  margin-top: 0.55rem; line-height: 1.5;
}
.tete__image--carre { max-width: 34rem; }

/* ---------- Corps d'article ---------- */
.article { display: grid; grid-template-columns: minmax(0, var(--measure-article)) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.article__corps { grid-column: 1; grid-row: 1; min-width: 0; }
.article__lateral {
  grid-column: 2; grid-row: 1; min-width: 0;
  position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto;
  font-family: var(--ff-ui); font-size: var(--t-sm);
}
.article:not(:has(.article__lateral)) > .article__corps { grid-column: 1 / -1; }
@media (max-width: 62rem) {
  .article { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .article__corps, .article__lateral { grid-column: 1; grid-row: auto; }
  .article__lateral { position: static; max-height: none; overflow: visible; margin-bottom: 2rem; }
}
.prose { overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.4em; font-size: var(--t-2xl); }
.prose h3 { margin-top: 1.8em; font-size: var(--t-xl); }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.4em; }
.prose ul li::marker { color: var(--ambre); }
.prose ol li::marker { font-family: var(--ff-ui); color: var(--ambre-texte); font-size: 0.9em; }
.prose blockquote {
  border-left: 3px solid var(--lichen); padding: 0.2rem 0 0.2rem 1.3rem;
  font-style: italic; color: var(--prusse-80);
}
.prose figure { margin-top: 2.2em; margin-bottom: 2.2em; }
.prose img { width: 100%; }
.prose pre { white-space: pre-wrap; font-family: var(--ff-body); background: none; }

/* Tableaux : défilement horizontal sur mobile */
.prose table, .table-defile table {
  width: 100%; border-collapse: collapse;
  font-family: var(--ff-ui); font-size: var(--t-sm); line-height: 1.5;
}
.prose table { display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--prusse-15); }
.prose thead th { border-bottom: 2px solid var(--prusse); font-weight: 600; }
.prose tbody tr:nth-child(even) { background: var(--prusse-08); }

/* Citation bilingue */
.citation-bilingue { border-left: 3px solid var(--ambre); padding: 0.3rem 0 0.3rem 1.3rem; }
.citation-bilingue__origine { font-family: var(--ff-body); font-style: italic; font-size: var(--t-lg); }
.citation-bilingue__traduction { margin-top: 0.5rem; color: var(--prusse-80); }
.citation-bilingue__source { margin-top: 0.4rem; font-family: var(--ff-ui); font-size: var(--t-xs); color: var(--prusse-60); }

/* Encadré Repères */
.reperes {
  background: var(--lichen-clair); padding: 1.4rem 1.5rem;
  border-top: 2px dashed var(--frontiere);
  font-family: var(--ff-ui); font-size: var(--t-sm); line-height: 1.5;
}
.reperes__titre { font-family: var(--ff-display); font-size: 1.3rem; margin-bottom: 0.3rem; }
.reperes__lieu { color: var(--prusse-60); margin-bottom: 0.9rem; }
.reperes ol { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.reperes li { display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.6rem; }
.reperes__date { font-weight: 600; color: var(--ambre-texte); font-variant-numeric: tabular-nums; }

.article-sommaire { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--prusse-15); }
.article-sommaire__titre { font-weight: 600; margin-bottom: 0.5rem; }
.article-sommaire ol { padding-left: 1.1rem; display: grid; gap: 0.35rem; }
.article-sommaire a { color: var(--prusse-80); text-decoration: none; }
.article-sommaire a:hover { color: var(--ambre-texte); text-decoration: underline; }

/* Expert (interviews) */
.expert { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.1rem; align-items: center; padding: 1.2rem 0; border-top: 1px solid var(--prusse-15); border-bottom: 1px solid var(--prusse-15); margin-bottom: 2rem; }
.expert__nom { font-family: var(--ff-display); font-size: 1.25rem; }
.expert__fonction { font-family: var(--ff-ui); font-size: var(--t-sm); color: var(--prusse-60); }
.expert__bio { font-size: var(--t-sm); margin-top: 0.3rem; }

/* FAQ */
.faq { margin-top: var(--espace); }
.faq h2 { margin-bottom: 1rem; }
.faq__item { border-top: 1px solid var(--prusse-15); }
.faq__item:last-child { border-bottom: 1px solid var(--prusse-15); }
.faq__question {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
  font-family: var(--ff-display); font-size: 1.2rem; line-height: 1.35;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question::after {
  content: "+"; position: absolute; right: 0.2rem; top: 0.9rem;
  font-family: var(--ff-ui); color: var(--ambre-texte); font-size: 1.3rem;
}
.faq__item[open] .faq__question::after { content: "−"; }
.faq__reponse { padding: 0 0 1.2rem; max-width: var(--measure-article); }

/* Auteur, liens connexes */
.signature { margin-top: 3rem; font-family: var(--ff-ui); font-size: var(--t-sm); color: var(--prusse-60); border-top: 1px solid var(--prusse-15); padding-top: 1rem; }
.connexes { margin-top: 3rem; }
.connexes h2 { font-size: var(--t-xl); margin-bottom: 0.8rem; }
.connexes ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.connexes a { font-family: var(--ff-display); font-size: 1.15rem; color: var(--prusse); text-decoration-color: var(--ambre); }
.connexes a:hover { color: var(--ambre-texte); }

/* ---------- Accueil ---------- */
.une { position: relative; background: var(--prusse); color: var(--atlas); }
.une__image { aspect-ratio: 16 / 9; max-height: 78vh; width: 100%; overflow: hidden; }
.une__image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.une__cartouche {
  position: relative; margin-top: -9rem; z-index: 1;
  background: var(--prusse); padding: 2.2rem clamp(1.2rem, 3vw, 2.6rem) 2.4rem;
  max-width: 44rem; margin-left: auto; border-top: 3px dashed var(--ambre);
}
.une__cartouche h1 { color: var(--atlas); font-size: clamp(2.3rem, 5vw + 0.5rem, 4.2rem); line-height: 1.05; }
.une__cartouche p { font-size: var(--t-lg); line-height: 1.55; margin-top: 1rem; color: rgba(232, 237, 238, 0.85); max-width: 46ch; }
.une__legende { font-family: var(--ff-ui); font-size: var(--t-xs); color: rgba(232, 237, 238, 0.6); padding: 1.2rem 0 1.5rem; }
@media (max-width: 40rem) {
  .une__image { aspect-ratio: 4 / 5; }
  .une__image img { object-position: 22% top; }
  .une__cartouche { margin-top: -5rem; }
}

.section { padding-top: var(--espace); }
.section__tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.section__tete p { font-family: var(--ff-ui); font-size: var(--t-sm); color: var(--prusse-60); max-width: 44ch; }

/* Piliers en liste éditoriale */
.piliers { list-style: none; padding: 0; border-top: 2px solid var(--prusse); }
.pilier-ligne { border-bottom: 1px solid var(--prusse-15); }
.pilier-ligne a {
  display: grid; grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: center;
  padding: 1.3rem 0; text-decoration: none; color: var(--prusse);
}
.pilier-ligne svg { width: 7rem; height: 4.2rem; color: var(--lichen); }
.pilier-ligne__titre { font-family: var(--ff-display); font-size: 1.55rem; line-height: 1.2; }
.pilier-ligne__desc { color: var(--prusse-80); font-size: var(--t-sm); line-height: 1.55; }
.pilier-ligne a:hover .pilier-ligne__titre { color: var(--ambre-texte); }
.pilier-ligne a:hover svg { color: var(--ambre); }
@media (max-width: 48rem) {
  .pilier-ligne a { grid-template-columns: 4.5rem 1fr; }
  .pilier-ligne svg { width: 4.5rem; height: 2.8rem; }
  .pilier-ligne__desc { grid-column: 2; }
}

/* Cartes d'articles : une grande + liste */
.grille-articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.6rem 2rem; }
.carte { display: flex; flex-direction: column; gap: 0.75rem; }
.carte[hidden] { display: none; }
.carte a { text-decoration: none; color: var(--prusse); }
.carte__titre { font-family: var(--ff-display); font-size: 1.3rem; line-height: 1.25; }
.carte a:hover .carte__titre { color: var(--ambre-texte); }
.carte__meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-family: var(--ff-ui); font-size: var(--t-xs); color: var(--prusse-60); }
.carte__date { white-space: nowrap; }
.carte__resume { font-size: var(--t-sm); line-height: 1.6; color: var(--prusse-80); }
.grille-articles .carte:first-child { grid-column: span 2; grid-row: span 2; }
.grille-articles .carte:first-child .carte__titre { font-size: var(--t-2xl); }
@media (max-width: 62rem) {
  .grille-articles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille-articles .carte:first-child { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 40rem) {
  .grille-articles { grid-template-columns: 1fr; }
  .grille-articles .carte:first-child { grid-column: auto; }
}
.grille-articles--plate .carte:first-child { grid-column: auto; grid-row: auto; }
.grille-articles--plate .carte:first-child .carte__titre { font-size: 1.3rem; }

/* Bloc méthode */
.methode { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 3rem; background: var(--lichen-clair); padding: clamp(1.5rem, 4vw, 3rem); border-top: 2px dashed var(--frontiere); }
.methode ul { padding-left: 1.2rem; display: grid; gap: 0.6rem; }
.methode ul li::marker { color: var(--ambre); }
@media (max-width: 48rem) { .methode { grid-template-columns: 1fr; gap: 1.2rem; } }

/* Filtres blog */
.filtres { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.2rem; font-family: var(--ff-ui); }
.filtre {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: var(--t-sm); background: transparent; color: var(--prusse);
  border: 1px solid var(--prusse-15); border-radius: 2px; padding: 0.45rem 0.85rem; cursor: pointer;
}
.filtre:hover { border-color: var(--prusse); }
.filtre[aria-pressed="true"] { background: var(--prusse); color: var(--atlas); border-color: var(--prusse); }
.filtre .categorie { color: inherit; }

/* Boutons et formulaires */
.bouton {
  display: inline-block; font-family: var(--ff-ui); font-size: var(--t-sm); font-weight: 500;
  background: var(--prusse); color: var(--atlas); border: 0; border-radius: 2px;
  padding: 0.8rem 1.4rem; text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--ambre-texte); color: var(--atlas); }
.bouton:disabled { opacity: 0.6; cursor: wait; }
.lien-discret { font-family: var(--ff-ui); font-size: var(--t-sm); }

.formulaire { display: grid; gap: 1.2rem; max-width: 38rem; font-family: var(--ff-ui); }
.champ { display: grid; gap: 0.35rem; }
.champ__label { font-size: var(--t-sm); font-weight: 500; }
.champ__aide { font-size: var(--t-xs); color: var(--prusse-60); }
.formulaire input, .formulaire textarea, .formulaire select {
  font-size: 1rem; padding: 0.7rem 0.8rem; border: 1px solid var(--prusse-15);
  border-radius: 2px; background: var(--atlas-clair); color: var(--prusse); width: 100%;
}
.formulaire input:focus, .formulaire textarea:focus, .formulaire select:focus { border-color: var(--prusse); }
.pot-de-miel { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formulaire__retour { font-size: var(--t-sm); padding: 0.7rem 0.9rem; border-left: 3px solid; }
.formulaire__retour--succes { border-color: var(--lichen-fonce); background: var(--lichen-clair); }
.formulaire__retour--erreur { border-color: var(--frontiere); background: rgba(168, 54, 44, 0.08); }

/* Page texte (utilitaires) */
.page-texte { padding-bottom: 1rem; }

/* 404 */
.introuvable { padding: var(--espace) 0; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
