/* ==========================================================================
   Le carnet de Rachane · feuille de style du site
   La couleur principale (--accent) se règle dans le back-office (Réglages).
   ========================================================================== */

:root {
  --accent: #c2593f;
  --bg: #fbf7f1;
  --paper: #ffffff;
  --ink: #2b2420;
  --muted: #776a61;
  --line: #ebe1d6;
  --soft: color-mix(in srgb, var(--accent) 12%, var(--bg));
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(43, 36, 32, .04), 0 8px 24px rgba(43, 36, 32, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.3rem; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* ---------- En-tête ---------- */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.logo { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--ink); text-decoration: none; margin: 0; }
.logo-dot { color: var(--accent); }
.nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

main { padding-top: 40px; padding-bottom: 72px; }

/* ---------- Boutons ---------- */
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--accent); transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--accent); }

/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; padding: 24px 0 56px; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); text-decoration: none; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); }
.hero-intro { font-size: 1.12rem; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-photo { aspect-ratio: 4 / 5; border-radius: 200px 200px var(--radius) var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-monogram { display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent)); }
.hero-monogram span { font-family: var(--serif); font-size: clamp(6rem, 16vw, 11rem); color: #fff; font-weight: 700; opacity: .92; }

.section { padding-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------- Cartes d'article ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(43,36,32,.05), 0 14px 34px rgba(43,36,32,.10); }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-cover { aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-eyebrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.card-category { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: var(--accent); }
.card-title { margin-bottom: 8px; }
.card-excerpt { color: var(--muted); margin: 0 0 16px; font-size: .97rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin: auto 0 0; font-size: .85rem; color: var(--muted); }
.tag-sponsored { font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }

.card-wide { margin-bottom: 28px; }
.card-wide .card-link { display: grid; grid-template-columns: 1.25fr 1fr; }
.card-wide .card-cover { aspect-ratio: auto; min-height: 320px; }
.card-wide .card-body { padding: 36px; justify-content: center; }
.card-wide .card-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.card-wide .card-excerpt { -webkit-line-clamp: 5; font-size: 1.05rem; }

.cover-fallback { display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--hue) 55% 82%), hsl(calc(var(--hue) + 40) 50% 68%)); }
.cover-fallback span { font-family: var(--serif); font-size: 4rem; font-weight: 700; color: rgba(255,255,255,.85); }

/* ---------- Pages ---------- */
.page-head { max-width: 760px; margin-bottom: 32px; }
.page-head.center { margin: 48px auto; text-align: center; }
.lead { font-size: 1.15rem; color: var(--muted); }
.narrow { max-width: 720px; }
.empty { color: var(--muted); font-style: italic; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { font: inherit; font-size: .9rem; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.about { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.about-photo { border-radius: var(--radius); box-shadow: var(--shadow); }
.about:not(:has(img)) { grid-template-columns: 1fr; max-width: 720px; }

.contact-email { margin: 24px 0; }
.socials { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.socials a { font-weight: 600; text-decoration: none; }

/* ---------- Article ---------- */
.post { max-width: 760px; margin: 0 auto; }
.post-head { text-align: center; margin-bottom: 32px; }
.post-meta { color: var(--muted); font-size: .95rem; }
.post-cover { border-radius: var(--radius); overflow: hidden; margin: 0 -40px 36px; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-cover.cover-fallback { aspect-ratio: 21 / 9; }
.notice-sponsored { background: var(--soft); border-radius: 12px; padding: 12px 16px; font-size: .92rem; color: var(--muted); }
.post-foot { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; }
.post-foot a { font-weight: 600; text-decoration: none; }
.related { max-width: 1120px; margin-top: 40px; }
.draft-banner { background: #fff4d6; border: 1px solid #f0d58a; color: #6b5310; border-radius: 12px; padding: 10px 16px; margin-bottom: 24px; text-align: center; font-weight: 600; }

/* ---------- Texte riche ---------- */
.prose { font-size: 1.08rem; }
.post-content { font-size: 1.12rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
.prose img { border-radius: 12px; margin: 1.6em auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: -1em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose a { word-break: break-word; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-text, .copyright { color: var(--muted); font-size: .92rem; margin: 6px 0 0; max-width: 420px; }
.copyright a { color: inherit; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 0; }
  .hero-photo { max-width: 200px; aspect-ratio: 1; border-radius: 50%; order: -1; }
  .hero-monogram span { font-size: 6rem; }
  .card-wide .card-link { grid-template-columns: 1fr; }
  .card-wide .card-cover { min-height: 0; aspect-ratio: 16 / 10; }
  .card-wide .card-body { padding: 22px; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; }
  .post-cover { margin-left: 0; margin-right: 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  main { padding-top: 24px; }
  .grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; gap: 4px; }
}
