/* ── Blog DissertIA · matière Encre Vive ─────────────────────────────── */

@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url(../assets/fonts/baloo2-800.woff2) format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 600; font-display: swap; src: url(../assets/fonts/baloo2-600.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(../assets/fonts/inter-400.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(../assets/fonts/inter-600.woff2) format('woff2'); }
@font-face { font-family: 'Caveat'; font-weight: 700; font-display: swap; src: url(../assets/fonts/caveat-700.woff2) format('woff2'); }

:root {
  --creme: #FBF3EC;
  --surface: #FFFFFF;
  --nuit: #26211D;
  --accent: #F4A28B;
  --encre: #C05F3F;
  --sauge: #A3C6A4;
  --text: #26211D;
  --text-sec: #6D635C;
  --border: rgba(138, 115, 95, 0.12);
  --shadow: rgba(138, 115, 95, 0.08);
  --nuit-ink: #FBF3EC;
  --nuit-sub: #A29890;
  --nuit-line: rgba(251, 243, 236, 0.05);
  --nuit-border: rgba(251, 243, 236, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--creme);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.baloo, h1, h2, h3 { font-family: 'Baloo 2', 'Inter', sans-serif; line-height: 1.12; }
.hand { font-family: 'Caveat', cursive; font-weight: 700; line-height: 1.25; }

/* ── Bande nuit : nav + tête d'article ───────────────────────────────── */
.nuit {
  background: var(--nuit);
  background-image:
    linear-gradient(var(--nuit-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--nuit-line) 1px, transparent 1px);
  background-size: 30px 30px;
  color: var(--nuit-ink);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 23px; color: var(--nuit-ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-cta {
  font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 15px;
  background: var(--accent); color: var(--nuit); text-decoration: none;
  padding: 9px 20px; border-radius: 999px; white-space: nowrap;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.col { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.head { padding: 44px 0 52px; position: relative; overflow: hidden; }
.head .glow {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -300px; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 162, 139, 0.16), transparent 65%);
  pointer-events: none;
}
.crumbs { font-size: 14px; color: var(--nuit-sub); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--nuit-ink); }
.kicker {
  display: inline-block; font-family: 'Caveat', cursive; font-weight: 700;
  font-size: 23px; color: var(--accent); transform: rotate(-1.2deg);
  margin-bottom: 10px;
}
.head h1 { font-weight: 800; font-size: clamp(30px, 5vw, 46px); max-width: 21ch; }
.head .lead {
  margin-top: 18px; font-size: 18.5px; line-height: 1.65; color: var(--nuit-sub);
  max-width: 62ch;
}
.head .lead strong { color: var(--nuit-ink); font-weight: 600; }
.head .datum { margin-top: 22px; font-size: 13.5px; color: var(--nuit-sub); }

/* trait manuscrit sous le titre */
.stroke { margin-top: 16px; }
.stroke svg { display: block; }

/* ── Corps d'article ─────────────────────────────────────────────────── */
.article { padding: 52px 0 24px; }
.article > * + * { margin-top: 1.15em; }
.article h2 {
  font-weight: 800; font-size: clamp(23px, 3.4vw, 29px); color: var(--text);
  margin-top: 2em; scroll-margin-top: 24px;
}
.article h2::after {
  content: ''; display: block; width: 64px; height: 4px; border-radius: 99px;
  background: var(--accent); margin-top: 8px;
}
.article h3 { font-weight: 600; font-size: 19.5px; margin-top: 1.6em; }
.article strong { font-weight: 600; }
.article em { font-style: italic; }
.article a { color: var(--encre); text-decoration-color: rgba(192, 95, 63, 0.4); text-underline-offset: 3px; }
.article ul, .article ol { padding-left: 1.35em; }
.article li { margin-top: 0.55em; }
.article ul li::marker { color: var(--encre); }
.article ol li::marker { color: var(--encre); font-weight: 600; }

/* citation d'œuvre : la fiche manuscrite */
.citation {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 14px; padding: 20px 22px 18px 58px;
  box-shadow: 0 6px 18px var(--shadow);
  font-size: 16.5px; line-height: 1.65;
}
.citation::before {
  content: '«'; position: absolute; left: 14px; top: 2px;
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 52px;
  color: var(--accent); line-height: 1;
}

/* tableaux : toujours scrollables, jamais de débordement de page */
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 6px 18px var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 15px; color: var(--encre); }
tr:last-child td { border-bottom: none; }

/* encart DissertIA in-article */
.note {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 24px; box-shadow: 0 6px 18px var(--shadow);
}
.note .hand { color: var(--encre); font-size: 22px; margin-bottom: 6px; display: block; transform: rotate(-0.8deg); }

/* ── FAQ ─────────────────────────────────────────────────────────────── */
.faq { margin-top: 1.4em; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 20px; box-shadow: 0 4px 14px var(--shadow); margin-top: 12px;
}
.faq summary {
  cursor: pointer; font-family: 'Baloo 2', sans-serif; font-weight: 600;
  font-size: 17px; list-style: none; position: relative; padding-right: 30px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 26px; color: var(--encre);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin-top: 10px; color: var(--text); }

/* ── Maillage : autres articles ──────────────────────────────────────── */
.more { padding: 8px 0 56px; }
.more .hand { font-size: 24px; color: var(--encre); display: block; margin-bottom: 14px; transform: rotate(-1deg); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 22px; text-decoration: none;
  box-shadow: 0 6px 18px var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px var(--shadow); }
.card .tag { font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--encre); }
.card h3 { font-weight: 800; font-size: 19px; margin-top: 6px; }
.card p { font-size: 15px; color: var(--text-sec); margin-top: 8px; }

/* ── CTA final : la bande nuit avec le formulaire de la landing ──────── */
.final { text-align: center; padding: 60px 0 46px; position: relative; overflow: hidden; }
.final .glow {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -280px; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 162, 139, 0.18), transparent 65%);
  pointer-events: none;
}
.final .hibou { margin: 0 auto 10px; }
.final h2 { font-weight: 800; font-size: clamp(25px, 4vw, 34px); }
.final .sub { color: var(--nuit-sub); margin: 12px auto 24px; max-width: 52ch; }
.signup { max-width: 460px; margin: 0 auto; }
.signup form { display: flex; gap: 10px; }
.signup input[type="email"] {
  flex: 1; min-width: 0; font: inherit; font-size: 15.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 12px 18px; outline-color: var(--accent);
}
.signup button {
  font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 15.5px;
  background: var(--accent); color: var(--nuit); border: 0; border-radius: 999px;
  padding: 12px 22px; cursor: pointer; white-space: nowrap;
}
.signup button:disabled { opacity: 0.6; cursor: wait; }
.signup .status { margin-top: 10px; font-size: 14.5px; min-height: 1.4em; }
.signup .status.ok { color: var(--sauge); }
.signup .status.err { color: var(--accent); }
.hp { position: absolute; left: -9999px; top: -9999px; }

footer { border-top: 1px solid var(--nuit-border); margin-top: 40px; }
footer .wrap {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 24px; font-size: 14px; color: var(--nuit-sub); flex-wrap: wrap;
}
footer a { text-decoration: none; }
footer a:hover { color: var(--nuit-ink); }

/* ── Index du blog ───────────────────────────────────────────────────── */
.index-head { padding: 44px 0 48px; }
.index-list { padding: 48px 0 64px; }

@media (max-width: 560px) {
  .signup form { flex-direction: column; }
  .article { padding-top: 40px; }
  .citation { padding-left: 48px; }
}

/* étiquette de source au-dessus d'une citation */
.cite-src { font-size: 15.5px; color: var(--text-sec); }
.cite-src + .citation { margin-top: 8px; }
.citation + p { margin-top: 0.7em; font-size: 16px; color: var(--text-sec); }
