/* ==========================================================================
   Cédric Huet — feuille de style principale
   Ivoire, anthracite, vert olive (ou brun). Newsreader pour les titres,
   Hanken Grotesk pour le texte courant. Polices hébergées sur le site.
   ========================================================================== */

@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-ext-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-opsz-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ivoire: #F6F4EC;
  --papier: #ECE9DE;
  --blanc: #FBFAF6;
  --encre: #2A2C2B;
  --gris: #63655F;
  --filet: #D5D1C3;
  --olive: #56652F;
  --olive-fonce: #414D22;
  --brun: #7A5A3C;
  --brun-fonce: #5E4329;
  --rouge: #9A3B2E;
  --accent: var(--olive);
  --accent-fonce: var(--olive-fonce);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 3px;
}
.accent-brun { --accent: var(--brun); --accent-fonce: var(--brun-fonce); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ivoire); color: var(--encre);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
  overflow-wrap: break-word;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; font-optical-sizing: auto; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: .5rem; background: var(--encre); color: var(--ivoire); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--gris); }
.empty { color: var(--gris); font-family: var(--serif); font-size: 1.2rem; font-style: italic; }

/* ---------- En-tête ---------- */
.site-header { padding-top: max(1.25rem, env(safe-area-inset-top)); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.wordmark { font-family: var(--serif); font-size: 1.35rem; text-decoration: none; letter-spacing: .005em; white-space: nowrap; }
.wordmark:hover { color: var(--encre); }
.nav-desktop { display: none; }
.nav-desktop ul, .menu ul { list-style: none; margin: 0; padding: 0; }
.nav-desktop ul { display: flex; gap: clamp(1rem, 2.4vw, 2rem); }
.nav-desktop a { text-decoration: none; font-size: .98rem; padding: .5rem 0; display: inline-block; border-bottom: 1px solid transparent; }
.nav-desktop a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Menu mobile (fonctionne sans JavaScript) */
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .25rem; user-select: none; -webkit-tap-highlight-color: transparent; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before { display: block; width: 20px; height: 1.5px; background: currentColor; position: relative; transition: transform .2s; }
.menu-icon::before { content: ""; position: absolute; top: 6px; }
.menu-icon { top: -3px; }
.menu[open] .menu-icon { transform: translateY(3px) rotate(45deg); }
.menu[open] .menu-icon::before { transform: translateY(-6px) rotate(-90deg); }
.menu-label { font-size: .95rem; }
.site-header .menu > nav {
  position: absolute; left: 0; right: 0; top: calc(max(1.25rem, env(safe-area-inset-top)) + 3.5rem);
  background: var(--ivoire); border-bottom: 1px solid var(--filet); z-index: 5;
  padding: .5rem var(--gutter) 1.5rem;
}
.site-header { position: relative; }
.site-header .menu li a { display: block; padding: .8rem 0; font-family: var(--serif); font-size: 1.5rem; text-decoration: none; border-bottom: 1px solid var(--filet); }
.site-header .menu li:last-child a { border-bottom: 0; }
.site-header .menu a[aria-current="page"] { color: var(--accent); }

@media (min-width: 52rem) {
  .nav-desktop { display: block; }
  .site-header .menu { display: none; }
}

/* ---------- Accueil ---------- */
.hero { padding-top: clamp(3rem, 12vh, 8rem); padding-bottom: clamp(2.5rem, 7vh, 5rem); }
.hero-name {
  font-size: clamp(3.1rem, 13vw, 9.5rem); line-height: .92; letter-spacing: -0.035em;
  font-weight: 350; margin: 0; font-variation-settings: "opsz" 72;
}
.hero-line { font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.65rem); line-height: 1.35; color: var(--gris); max-width: 34ch; margin: 1.5rem 0 0; }
.hero-text { margin-top: 1.25rem; max-width: 38rem; }

/* Le sommaire : chaque rubrique sur une ligne, comme la table des matières d'un livre. */
.index { padding-bottom: clamp(3rem, 10vh, 6rem); }
.index-row { display: grid; grid-template-columns: 1fr; gap: .5rem 2rem; padding: 1.6rem 0 1.8rem; border-top: 1px solid var(--filet); }
.index-row:last-child { border-bottom: 1px solid var(--filet); }
.index-head { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 0; display: flex; align-items: flex-start; gap: .35rem; letter-spacing: -0.02em; }
.index-head a { text-decoration: none; }
.index-count { font-family: var(--sans); font-size: .85rem; color: var(--accent); letter-spacing: 0; padding-top: .4em; font-feature-settings: "tnum"; }
.index-row--small .index-head { font-size: clamp(1.45rem, 3.6vw, 2rem); }
.index-row--small { padding: 1.1rem 0 1.2rem; }
.index-items { list-style: none; margin: 0; padding: 0; }
.index-items li { padding: .3rem 0; display: flex; flex-direction: column; }
.index-items a { font-size: 1.08rem; text-decoration: none; }
.index-items a:hover { text-decoration: underline; }
.index-items span { color: var(--gris); font-size: .95rem; line-height: 1.45; }
.index-empty { color: var(--gris); margin: .5rem 0 0; font-size: .95rem; }
.index-body p { margin: .35rem 0 0; }
.more { display: inline-block; margin-top: .6rem; font-size: .95rem; color: var(--accent); }
@media (min-width: 46rem) {
  .index-row { grid-template-columns: minmax(14rem, 5fr) 7fr; align-items: baseline; }
  .index-body { padding-top: .55rem; }
  .index-row--small .index-body { padding-top: .35rem; }
}

/* ---------- Rubriques et articles ---------- */
.page-head { padding-top: clamp(2.5rem, 8vh, 5rem); margin-bottom: 2rem; max-width: 44rem; }
.page-head h1 { margin-bottom: .3em; }
.lede { font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.45rem); line-height: 1.4; color: var(--gris); }
.crumb { margin: clamp(2rem, 6vh, 3.5rem) 0 -1.5rem; font-size: .95rem; }
.crumb a { color: var(--gris); }
.section-page, .article { padding-bottom: 5rem; }
.entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--filet); }
.entry { display: grid; grid-template-columns: 1fr; gap: .2rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--filet); }
.entry-link { text-decoration: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
.entry-title { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.75rem); line-height: 1.2; }
.entry-link:hover .entry-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.entry-meta { color: var(--accent); font-size: .92rem; }
.entry-summary { color: var(--gris); margin: .2rem 0 0; max-width: 40rem; }
.entry-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-top: .8rem; }
@media (min-width: 46rem) {
  .entry:has(.entry-thumb) { grid-template-columns: 1fr 13rem; }
  .entry-thumb { grid-column: 2; grid-row: 1 / span 2; }
  .entry-thumb img { margin-top: 0; }
}
.article-meta { color: var(--accent); font-size: .95rem; margin-top: -.2rem; }
.article-figure { margin: 0 0 2.5rem; max-width: 56rem; }
.article-figure img { width: 100%; border-radius: var(--radius); }

/* Texte enrichi */
.prose { max-width: 40rem; font-size: 1.0625rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2em 0 .5em; font-size: 1.6rem; }
.prose h3 { margin: 1.6em 0 .4em; font-family: var(--sans); font-weight: 600; font-size: 1.1rem; letter-spacing: 0; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.5em 0; padding-left: 1.2em; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 1.2rem; font-style: italic; color: var(--gris); }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose code { font-size: .9em; background: var(--papier); padding: .1em .35em; border-radius: 2px; }
.prose pre { background: var(--papier); padding: 1rem; overflow-x: auto; border-radius: var(--radius); }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.5em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--filet); padding: .5em .75em .5em 0; text-align: left; vertical-align: top; }
.prose hr { border: 0; border-top: 1px solid var(--filet); margin: 2.5em 0; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0; align-items: center; }

/* ---------- Boutons et formulaires ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.35rem; border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent); color: #FBFAF6; font: 500 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background-color .15s, border-color .15s;
}
.button:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: #FBFAF6; }
.button--quiet { background: transparent; color: var(--encre); border-color: var(--filet); }
.button--quiet:hover { background: var(--papier); color: var(--encre); border-color: var(--gris); }
.button--danger { background: transparent; color: var(--rouge); border-color: color-mix(in srgb, var(--rouge) 45%, transparent); }
.button--danger:hover { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.button--wide { width: 100%; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--filet); text-underline-offset: .2em; cursor: pointer; min-height: 44px; }
.linklike:hover { color: var(--accent); }
.danger, .linklike.danger { color: var(--rouge); }

.form { max-width: 40rem; }
.form--narrow { max-width: 30rem; }
.field { margin: 0 0 1.25rem; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 500; margin-bottom: .4rem; font-size: .98rem; padding: 0; }
.opt, .hint { color: var(--gris); font-weight: 400; font-size: .9rem; }
.hint { margin: .35rem 0 0; }
input[type="text"], input:not([type]), input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; font: inherit; font-size: max(16px, 1rem); /* 16px évite le zoom automatique sur iPhone */
  color: var(--encre); background: var(--blanc); border: 1px solid var(--filet); border-radius: var(--radius);
  padding: .7rem .85rem; min-height: 48px; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--gris) 50%), linear-gradient(135deg, var(--gris) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[readonly] { background: var(--papier); color: var(--gris); }
input[type="file"] { font: inherit; font-size: .95rem; margin-top: .5rem; max-width: 100%; }
input[type="color"] { width: 3rem; height: 48px; padding: 4px; border: 1px solid var(--filet); border-radius: var(--radius); background: var(--blanc); }
.input-code { font-size: 1.6rem !important; letter-spacing: .35em; text-align: center; font-feature-settings: "tnum"; max-width: 14rem; }
.radio, .check { display: flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; }
.radio input, .check input { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); margin: 0; flex: none; }
.check { margin-bottom: .75rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { background: color-mix(in srgb, var(--accent) 10%, var(--blanc)); border-left: 3px solid var(--accent); padding: .85rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; max-width: 40rem; }
.notice--error { background: color-mix(in srgb, var(--rouge) 8%, var(--blanc)); border-left-color: var(--rouge); }
.contact-mail { font-family: var(--serif); font-size: 1.45rem; }
.auth { max-width: 26rem; padding-top: clamp(3rem, 10vh, 6rem); padding-bottom: 5rem; }
.auth h1 { font-size: 2.2rem; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--filet); padding: 2.5rem 0 max(2.5rem, env(safe-area-inset-bottom)); font-size: .95rem; color: var(--gris); }
.footer-inner { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; align-items: baseline; }
.footer-inner p { margin: 0; }
.footer-name { font-family: var(--serif); font-size: 1.1rem; color: var(--encre); }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 0; }
.footer-account { margin-left: auto !important; }
.footer-account a { color: var(--gris); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-header nav, .menu, .site-footer, .skip { display: none; } body { background: #fff; } }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin: 2rem 0 0; }
.hero-mail { color: var(--gris); }
