/* =============================================================
   L'Atelier de littérature de jeunesse — Design System
   ============================================================= */

/* --- Variables -------------------------------------------- */
:root {
  --bg:         #faf8f4;
  --bg-surface: #f2ede4;
  --border:     #ddd8cc;
  --text:       #1c1c1a;
  --text-muted: #6b6559;
  --accent:     #3d5a4a;
  --accent-hover: #2d4438;
  --accent-light: #e8f0eb;

  /* Format badges */
  --traverse-color: #8a5c1a;
  --traverse-bg:    #fdf0dc;
  --station-color:  #3d5a4a;
  --station-bg:     #e8f0eb;
  --parcours-color: #2d3f6e;
  --parcours-bg:    #e4e9f5;
  --horizon-color:  #7a4b63;

  --font-title: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:  'DM Sans', 'Helvetica Neue', sans-serif;

  --radius: 3px;
  --max-content: 72ch;
  --max-layout:  1200px;
  --reading-col: 68ch;
}

[data-theme="dark"] {
  --bg:         #1a1a17;
  --bg-surface: #222220;
  --border:     #333330;
  --text:       #e6e2d8;
  --text-muted: #9a9488;
  --accent:     #7aaa8c;
  --accent-hover: #92bea2;
  --accent-light: #1e2e24;
  --traverse-color: #d4a060;
  --traverse-bg:    #2a1e0a;
  --station-color:  #7aaa8c;
  --station-bg:     #1a2a1f;
  --parcours-color: #8899cc;
  --parcours-bg:    #1a1e2e;
  --horizon-color:  #c090ad;
}

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  transition: background 0.25s, color 0.25s;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

/* --- Typography ------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* --- Layout ----------------------------------------------- */
.container {
  max-width: var(--max-layout);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header ----------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 64px;
}

.site-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site-logo .logo-main {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
  display: block;
}

.site-logo .logo-sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover,
.site-nav a.active { color: var(--accent); background: var(--accent-light); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-theme {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s;
}

.btn-theme:hover { border-color: var(--accent); color: var(--accent); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
}

.btn-search {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.38rem 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: border-color 0.15s, color 0.15s;
}

.btn-search:hover { border-color: var(--accent); color: var(--accent); }

.search-panel {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.search-panel .container { padding-top: 1.1rem; padding-bottom: 1.1rem; }

.search-form { display: flex; gap: 0.5rem; }

.search-form input[type="search"] {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}

.search-form input[type="search"]:focus { border-color: var(--accent); }

.search-note { font-size: 0.8rem; color: var(--accent); margin-top: 0.6rem; }

/* --- Badges ----------------------------------------------- */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2em 0.65em;
  border-radius: 2px;
  white-space: nowrap;
  text-decoration: none;
}

.badge--traverse { background: var(--traverse-bg); color: var(--traverse-color); }
.badge--station  { background: var(--station-bg);  color: var(--station-color);  }
.badge--parcours { background: var(--parcours-bg); color: var(--parcours-color); }

.badge--age {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* --- Badges row ------------------------------------------- */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.article-meta .meta-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.reading-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- Article cards ---------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.article-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.article-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  text-decoration: none;
  color: inherit;
}

.article-card__title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.article-card__excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.article-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* --- Hero (homepage) -------------------------------------- */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.hero__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3.5rem;
}

.hero__inner {
  max-width: 640px;
  flex: 0 1 640px;
}

.hero__art {
  flex: 0 0 270px;
  width: 270px;
  margin-right: 3rem;
  color: var(--accent);
  opacity: 0.55;
}

.hero__art svg { width: 100%; height: auto; display: block; }

@media (max-width: 880px) {
  .hero__art { display: none; }
}

.hero__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 58ch;
  line-height: 1.7;
}

/* --- Section titles --------------------------------------- */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title h2 { font-size: 1.5rem; }

.section-title a {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  margin-left: auto;
  white-space: nowrap;
}

.section-title a:hover { text-decoration: underline; }

/* --- Format intro boxes (homepage) ------------------------ */
.formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 4rem;
}

.format-box {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.format-box:hover { border-color: var(--accent); text-decoration: none; color: inherit; }

.format-box__name {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.format-box__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.format-box__length {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.format-box__icon { margin-bottom: 0.85rem; }
.format-box__icon svg { display: block; }

/* --- Thematic entries ------------------------------------- */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.theme-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.theme-card__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--accent);
  margin-top: 0.15rem;
}

.theme-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.theme-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
  color: inherit;
}

.theme-card__title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.theme-card__question {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

/* --- Article (single) ------------------------------------- */
.article-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.article-header h1 {
  margin-bottom: 1rem;
  max-width: 22ch;
}

.article-header .article-standfirst {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.65;
  margin-top: 1rem;
  font-style: italic;
}

/* Article body */
.article-body {
  max-width: var(--reading-col);
  font-size: 1rem;
  line-height: 1.8;
}

.article-body > * + * { margin-top: 1.5em; }

.article-body h2 {
  font-size: 1.4rem;
  margin-top: 2.5em;
  margin-bottom: 0.5em;
}

.article-body h3 {
  font-size: 1.15rem;
  margin-top: 2em;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin-left: 0;
  padding: 0.75rem 0 0.75rem 1.5rem;
  color: var(--text-muted);
  font-style: italic;
}

.article-body ul, .article-body ol {
  padding-left: 1.5rem;
}

.article-body li + li { margin-top: 0.4em; }

/* Bibliography */
.article-bibliography {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.article-bibliography h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.article-bibliography ul {
  list-style: none;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.article-bibliography li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
}

/* Related articles */
.article-related {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.article-related h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* --- Table of contents (Parcours) ------------------------- */
.toc {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 3rem;
  font-size: 0.88rem;
}

.toc__title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.toc ol {
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.toc a {
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.8;
}

.toc a:hover { color: var(--accent); }

/* --- Parcours: illustration & rythme de lecture ----------- */
/* Couche 1 : motif de tête dans l'en-tête d'article */
.article-header__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
}

.article-hero-art {
  width: 150px;
  color: var(--parcours-color);
  flex-shrink: 0;
}

.article-hero-art svg { width: 100%; height: auto; display: block; }

/* Couche 2 : lettrine d'ouverture */
.article-body .has-dropcap::first-letter {
  font-family: var(--font-title);
  font-size: 3.4em;
  line-height: 0.7;
  float: left;
  padding: 0.08em 0.14em 0 0;
  color: var(--parcours-color);
  font-weight: 600;
}

/* Couche 2 : séparateur de section (motif horizon) */
.section-rule {
  border: 0;
  margin: 3rem auto;
  width: 100%;
  max-width: 200px;
  color: var(--parcours-color);
  opacity: 0.55;
  clear: both;
}

.section-rule svg { width: 100%; height: 12px; display: block; }

/* Couche 2 : citation mise en exergue */
.pull-quote {
  font-family: var(--font-title);
  font-size: 1.6rem;
  line-height: 1.35;
  color: var(--parcours-color);
  margin: 2.5rem 0;
  max-width: 32ch;
  clear: both;
}

.pull-quote::before { content: "« "; }
.pull-quote::after  { content: " »"; }

/* Appels de note + section Notes */
.fn-ref {
  font-size: 0.7em;
  line-height: 0;
  vertical-align: super;
}

.fn-ref a { text-decoration: none; color: var(--accent); }

.notes {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.notes h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.notes ol {
  padding-left: 1.4rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.notes li { padding: 0.35rem 0; scroll-margin-top: 90px; }

.notes a { color: var(--accent); text-decoration: none; }

/* Vignettes de couverture au fil du texte (émaillage) */
.article-body h2 { clear: both; }

.inline-cover {
  width: 104px;
  float: right;
  clear: right;
  margin: 0.3rem 0 1rem 1.5rem;
  text-align: center;
  font-size: 0.68rem;
}

.inline-cover--left {
  float: left;
  clear: left;
  margin: 0.3rem 1.5rem 1rem 0;
}

.inline-cover__frame {
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
  margin-bottom: 0.4rem;
  line-height: 0;
}

/* L'image s'affiche à son format réel (portrait ou à l'italienne) : jamais de recadrage. */
.inline-cover__frame img {
  width: 100%; height: auto;
  display: block;
}

.inline-cover__placeholder {
  aspect-ratio: 3 / 4;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--parcours-color); opacity: 0.7;
}

.inline-cover__placeholder svg { width: 34%; height: auto; }

.inline-cover figcaption { color: var(--text-muted); line-height: 1.3; }

.inline-cover .titre-oeuvre { font-style: italic; color: var(--text); }

@media (max-width: 640px) {
  .inline-cover { width: 84px; margin-left: 1rem; }
  .inline-cover--left { margin-right: 1rem; }
}

/* Planches d'illustration (œuvres d'art, domaine public) : grand format, image entière non rognée */
.art-plate {
  width: 340px;
  max-width: 45%;
  float: right;
  clear: right;
  margin: 0.4rem 0 1.4rem 1.8rem;
}
.art-plate--left {
  float: left;
  clear: left;
  margin: 0.4rem 1.8rem 1.4rem 0;
}
.art-plate img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #fff;
}
.art-plate figcaption {
  color: var(--text-muted);
  line-height: 1.3;
  font-size: 0.8rem;
  margin-top: 0.45rem;
}
.art-plate .titre-oeuvre { font-style: italic; color: var(--text); }

@media (max-width: 640px) {
  .art-plate, .art-plate--left {
    float: none;
    clear: both;
    width: 100%;
    max-width: 380px;
    margin: 1.2rem auto 1.6rem;
  }
}

/* Couche 4 : galerie du corpus */
.corpus {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.corpus h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.corpus__note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.corpus__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 1.5rem 1.25rem;
}

.corpus-tile { font-size: 0.78rem; text-align: center; }

.corpus-tile__cover {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.55rem;
  background: var(--bg-surface);
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
}

.corpus-tile__cover img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.corpus-tile__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--parcours-color);
  opacity: 0.7;
}

.corpus-tile__placeholder svg { width: 38%; height: auto; }

.corpus-tile__title { font-style: italic; line-height: 1.3; }

.corpus-tile__author { color: var(--text-muted); }

@media (max-width: 640px) {
  .article-header__grid { grid-template-columns: 1fr; }
  .article-hero-art { display: none; }
}

/* --- Work title (cited work) ------------------------------ */
.titre-oeuvre {
  font-style: italic;
}

/* --- Thematic badge (link) -------------------------------- */
.badge--theme {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}

/* --- Work meta (Station fiche œuvre) ---------------------- */
.work-meta {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
}

.work-meta__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  color: var(--text-muted);
}

.work-meta__grid strong { color: var(--text); }

/* --- Book cover (couverture d'ouvrage) -------------------- */
.book-cover {
  float: right;
  width: 220px;
  max-width: 42%;
  margin: 0 0 1.5rem 2rem;
}

.book-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.12);
}

.book-cover figcaption {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: center;
}

.book-cover--left {
  float: left;
  margin: 0 2rem 1.5rem 0;
}

.book-cover--banner {
  float: none;
  width: 240px;
  max-width: 60%;
  margin: 0 auto 2rem;
}

.work-meta--with-cover {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.work-meta--with-cover .book-cover {
  float: none;
  width: 150px;
  max-width: 40%;
  margin: 0;
  flex-shrink: 0;
}

.work-meta--with-cover .work-meta__grid {
  grid-template-columns: 1fr;
}

@media (max-width: 560px) {
  .book-cover,
  .book-cover--left {
    float: none;
    width: 200px;
    max-width: 70%;
    margin: 0 auto 1.75rem;
  }
  .work-meta--with-cover { flex-direction: column; align-items: center; }
}

/* --- Article signature ------------------------------------ */
.article-signature {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-signature a { color: var(--accent); text-decoration: none; }
.article-signature a:hover { text-decoration: underline; }

/* --- Prev / next navigation ------------------------------- */
.article-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
}

.article-nav a {
  flex: 1 1 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.article-nav a:hover { border-color: var(--accent); background: var(--accent-light); }

.article-nav__dir {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.article-nav__title {
  font-family: var(--font-title);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
}

.article-nav__next { text-align: right; }

/* --- Horizons page ---------------------------------------- */
.horizons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.horizons-section {
  border-left: 3px solid var(--accent);
  padding: 0 0 0 1.25rem;
}

.horizons-section__title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.horizons-section__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.horizons-section__items {
  list-style: none;
  padding: 0;
  font-size: 0.88rem;
}

.horizons-section__items li + li { margin-top: 0.5rem; }

.horizons-section__items a {
  color: var(--text);
  text-decoration: none;
  line-height: 1.5;
}

.horizons-section__items a:hover { color: var(--accent); }

/* --- Newsletter strip ------------------------------------- */
.newsletter-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
  margin: 4rem 0;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.newsletter-text { flex: 1; min-width: 240px; }
.newsletter-text h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.newsletter-text p { font-size: 0.88rem; color: var(--text-muted); }

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 260px;
  max-width: 100%;
  outline: none;
  transition: border-color 0.15s;
}

.newsletter-form input:focus { border-color: var(--accent); }

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--accent);
}

.btn--outline:hover { background: var(--accent); color: #fff; }

/* --- Page header (for inner pages) ------------------------ */
.page-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.page-header h1 { margin-bottom: 0.75rem; }
.page-header p { color: var(--text-muted); max-width: 52ch; }

/* --- Filter bar ------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.filter-bar__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* --- Contact form ----------------------------------------- */
.contact-form {
  max-width: 560px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group textarea { resize: vertical; min-height: 140px; }

/* --- Footer ----------------------------------------------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  margin-top: 6rem;
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo-main {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 34ch;
}

.footer-nav h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
}

.footer-nav ul li + li { margin-top: 0.4rem; }

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- Breadcrumb ------------------------------------------- */
.breadcrumb {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { opacity: 0.4; }

/* --- Dividers & utilities --------------------------------- */
.section { padding: 4rem 0; }
.section + .section { border-top: 1px solid var(--border); }

.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* --- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  html { font-size: 16px; }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75rem 1rem; border-radius: 0; }

  .nav-toggle { display: block; }

  .hero { padding: 3rem 0 2.5rem; }
  .page-header { padding: 2.5rem 0 2rem; }
  .article-header { padding: 2.5rem 0 2rem; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cards-grid { grid-template-columns: 1fr; }
  .formats-grid { grid-template-columns: 1fr; }
  .themes-grid { grid-template-columns: 1fr; }
  .horizons-grid { grid-template-columns: 1fr; }

  .newsletter-inner { flex-direction: column; gap: 1.5rem; }
  .newsletter-form input[type="email"] { width: 100%; }

  .header-inner { position: relative; }
}

/* =============================================================
   Actualités — brèves (À la une) & agenda
   ============================================================= */

/* Marqueur de TYPE d'actualité : volontairement distinct des badges
   de format (Station / Traverse / Parcours). Petites capitales colorées
   précédées d'une puce ronde, sans pavé plein. */
.actu-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  line-height: 1;
}

.actu-type::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.actu-type--honneur { color: var(--station-color); }
.actu-type--hommage { color: var(--traverse-color); }
.actu-type--coeur   { color: var(--parcours-color); }
.actu-type--salon   { color: var(--traverse-color); }
.actu-type--prix    { color: var(--station-color); }
.actu-type--rdv     { color: var(--parcours-color); }
.actu-type--recherche { color: var(--horizon-color); }

/* --- Brèves (cartes éditoriales, sans date stricte) --- */
.breves-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.breve {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.breve:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  text-decoration: none;
  color: inherit;
}

.breve__text { font-size: 0.92rem; line-height: 1.6; color: var(--text); }
.breve__text strong { font-weight: 600; }
.breve__text .titre-oeuvre { color: var(--text); }

.breve__period {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Brève avec vignette de couverture (ouvrage à l'honneur) */
.breve__cover { display: flex; gap: 1rem; align-items: flex-start; }

.breve__cover img {
  flex: 0 0 auto;
  width: 62px;
  height: auto;
  border-radius: 3px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* --- Fil d'actualités compact (accueil) --- */
.actu-feed { border-top: 1px solid var(--border); }

.actu-feed a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0.25rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.actu-feed a:hover { background: var(--bg-surface); }

.actu-feed .actu-type { flex: 0 0 7.5rem; }

.actu-feed__title { flex: 1; font-weight: 500; line-height: 1.4; }

.actu-feed__date {
  flex: 0 0 auto;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .actu-feed a { flex-wrap: wrap; gap: 0.35rem 1rem; }
  .actu-feed .actu-type { flex-basis: auto; }
  .actu-feed__title { flex: 1 1 100%; order: 3; }
}

/* --- Agenda (frise à pastille calendrier) --- */
.agenda-list { list-style: none; padding: 0; margin: 0; }

.agenda-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.agenda-item:first-child { padding-top: 0; }

.agenda-date {
  flex: 0 0 auto;
  width: 64px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
}

.agenda-date__month {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 0.2rem 0;
}

.agenda-date__day {
  display: block;
  font-family: var(--font-title);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

.agenda-item__body { flex: 1; min-width: 0; }

.agenda-item__title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  margin: 0.35rem 0 0.25rem;
}

.agenda-item__title:hover { color: var(--accent); }

.agenda-item__meta { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.agenda-item__meta .place { color: var(--text); }

/* ----- Index alphabétique des auteurs ----- */
.index-jump {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin: 0 0 2.5rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.index-jump a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.9rem; height: 1.9rem; padding: 0 0.5rem;
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  border: 1px solid var(--border); border-radius: 3px;
  text-decoration: none;
}
.index-jump a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.index-group { margin-bottom: 2.5rem; scroll-margin-top: 90px; }
.index-group__letter {
  font-size: 1.5rem; color: var(--accent);
  margin: 0 0 1rem; padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--accent);
}
.index-entry { margin-bottom: 1.6rem; }
.index-entry__author {
  font-size: 1.05rem; margin: 0 0 0.6rem;
}
.index-work { margin: 0 0 0.9rem 0; }
.index-work__title { line-height: 1.4; margin-bottom: 0.25rem; }
.index-work__title .titre-oeuvre { font-size: 1.02rem; }
.index-work__occ { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--border); }
.index-work__occ li { padding: 0.18rem 0; line-height: 1.4; }
.index-work__occ a {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
.index-work__occ a:hover .index-occ__label { color: var(--accent); }
.index-occ__label { color: var(--text); }
