/* ==========================================================================
   Site de Michel Sasson — feuille de style unique
   Palette : papier, encre, bleu du logo (l'existant), jaune (le nouveau).
   Polices hébergées sur le site (aucun appel à un service externe).
   ========================================================================== */

@font-face {
  font-family: "Bitter";
  src: url("../fonts/bitter.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dmsans.woff") format("woff");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F3F5F8;
  --ink: #12203A;
  --accent: #214C9B;
  --tint: #E3E9F3;
  --yellow: #F0C035;
  --line: #BEC8DC;
  --muted: #4B5A75;
  --serif: "Bitter", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis: none;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

h1, h2 { font-family: var(--serif); line-height: 1.12; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; margin: 0 0 0.35em; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--yellow); color: var(--ink); padding: 10px 16px; font-weight: 700; }

/* ---- En-tête ---- */
.site-header { border-bottom: 1px solid var(--line); padding: 18px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { height: 46px; width: auto; }
.brand-name { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; line-height: 1.1; }
.brand-role { display: block; font-size: 0.85rem; color: var(--muted); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; }
.nav-link { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; font-weight: 500; }
.nav-link:hover { border-bottom-color: var(--accent); color: var(--ink); }
.nav-link[aria-current="page"] { border-bottom-color: var(--ink); font-weight: 700; }
.nav-contact { background: var(--yellow); padding: 8px 16px; border: 2px solid var(--ink); border-radius: 2px; font-weight: 700; }
.nav-contact:hover { background: var(--ink); color: var(--paper); border-bottom-color: var(--ink); }
.nav-contact[aria-current="page"] { background: var(--ink); color: var(--paper); border-bottom-color: var(--ink); }

/* ---- Boutons ---- */
.btn { display: inline-block; padding: 14px 24px; font-weight: 700; text-decoration: none; color: var(--ink); border: 2px solid var(--ink); border-radius: 2px; background: transparent; font-family: var(--sans); font-size: 1rem; line-height: 1.2; cursor: pointer; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--yellow); }
.actions { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 32px; }

/* ---- Accueil : première partie ---- */
.hero { padding: 72px 0 84px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 56px; align-items: center; }
.hero-title { margin-bottom: 0.45em; max-width: 11em; }
.lead { font-size: 1.2rem; line-height: 1.6; max-width: 34em; }
.fig-caption { font-size: 0.9rem; color: var(--muted); margin: 14px 0 0; max-width: 30em; }

/* Illustration d'accueil (SVG en ligne) */
.fig-block { fill: var(--tint); stroke: var(--accent); stroke-width: 2; }
.fig-chip { fill: var(--paper); stroke: var(--accent); stroke-width: 1.5; }
.fig-label { font-family: var(--sans); font-size: 16px; font-weight: 700; fill: var(--ink); }
.fig-new-shape { fill: var(--yellow); }
.fig-new-label { font-family: var(--sans); font-size: 18px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.new-block { animation: settle 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s both; }
@keyframes settle { from { transform: translateY(-38px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- Sections ---- */
.section { padding: 72px 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 40rem; }
.prose { max-width: 38rem; }
.prose-wide > * { max-width: 44rem; }
.prose-wide h2 { margin-top: 1.9em; }
.prose-wide > h2:first-child { margin-top: 0; }

.facts { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; max-width: 52rem; }
.fact-title { position: relative; padding-left: 28px; }
.fact-title::before { content: ""; position: absolute; left: 0; top: 0.28em; width: 14px; height: 14px; border: 2px solid var(--accent); background: var(--paper); }
.fact-text { margin: 0; padding-left: 28px; color: var(--ink); }

.rows { list-style: none; margin: 32px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) 12rem; gap: 8px 32px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.row-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; }
.row-text { margin: 0; max-width: 34rem; }
.row-more { justify-self: end; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.row:hover .row-title { color: var(--accent); }
.row:hover .row-more { color: var(--ink); }

.cta-band { background: var(--ink); color: var(--paper); padding: 72px 0; }
.cta-band h2 { color: var(--paper); max-width: 22em; }
.cta-band p { max-width: 32rem; }
.cta-band .btn-primary { border-color: var(--yellow); }
.cta-band .btn-primary:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.cta-band :focus-visible { outline-color: var(--yellow); }

/* ---- Pages intérieures ---- */
.page-head { padding: 64px 0 56px; }
.page-head-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; align-items: center; }
.page-title { max-width: 12em; }
.page-art { width: 100%; }
.portrait-frame { position: relative; width: 100%; max-width: 360px; }
.portrait-frame::after { content: ""; position: absolute; right: 2%; bottom: 4%; width: 18%; aspect-ratio: 1; background: var(--yellow); }
.portrait { width: 100%; height: auto; border-radius: 50%; }

.plain-list { margin: 0 0 1.2em; padding-left: 1.2em; }
.plain-list li { margin-bottom: 0.4em; }

.timeline { margin: 32px 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 8px 40px; padding: 26px 0; border-top: 1px solid var(--line); }
.timeline-date { margin: 0; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline-body { margin: 0; max-width: 40rem; }
.timeline-role { display: block; font-weight: 700; margin-bottom: 4px; }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { margin-bottom: 0.5em; }

/* ---- Formulaire ---- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 64px; align-items: start; }
.form { display: grid; gap: 22px; max-width: 38rem; }
.label { display: block; font-weight: 700; margin-bottom: 6px; }
.field, .select, .textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 2px; padding: 12px 14px; }
.textarea { min-height: 190px; resize: vertical; }
.field:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 0.95rem; }
.check-box { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.aside-title { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.4em; }
.note { color: var(--muted); font-size: 0.95rem; }
.error-list { border: 2px solid var(--ink); background: var(--yellow); padding: 16px 20px 16px 36px; max-width: 38rem; }

/* ---- Série d'articles ---- */
.crumb { margin: 0 0 20px; font-size: 0.95rem; }
.ep-num { display: block; font-family: var(--sans); font-size: 0.9rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.article > * { max-width: 38rem; }
.article p { font-size: 1.125rem; line-height: 1.75; margin-bottom: 1.1em; }
.article h2 { margin-top: 1.8em; }
.dialogue { padding-left: 1.4rem; margin-bottom: 0.45em !important; }
.key { border-left: 8px solid var(--yellow); padding-left: 20px; font-family: var(--serif); font-weight: 600; font-size: 1.35rem !important; line-height: 1.4 !important; margin: 1.6em 0 !important; }
.ep-nav li { font-size: 1.05rem; }
.section-article { padding-top: 4px; }
.article .dialogue + p:not(.dialogue) { margin-top: 1.5em; }
.rows + .note { margin-top: 22px; }

/* ---- Pages légales ---- */
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.todo { background: var(--yellow); color: var(--ink); padding: 0 4px; font-style: normal; }

/* ---- Pied de page ---- */
.site-footer { background: var(--ink); color: var(--paper); padding: 52px 0; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--yellow); }
.site-footer :focus-visible { outline-color: var(--yellow); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; }
.footer-name { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; margin: 0 0 4px; }
.footer-text { margin: 0; color: #C5CEE0; font-size: 0.95rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.95rem; }

/* ---- Adaptation mobile ---- */
@media (max-width: 860px) {
  .hero { padding: 40px 0 52px; }
  .hero-grid, .page-head-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .page-head { padding: 40px 0 40px; }
  .section { padding: 52px 0; }
  .cta-band { padding: 52px 0; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .row { grid-template-columns: minmax(0, 1fr); padding: 22px 0; }
  .row-more { justify-self: start; }
  .timeline-item { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 20px 0; }
  .nav-list { gap: 4px 18px; }
}

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

/* Série : logo et illustrations */
.series-head { display: flex; align-items: center; gap: 32px; }
.series-logo { width: 150px; height: 150px; flex: none; }
.ep-fig { margin: 0 0 8px; max-width: 1000px; }
.ep-fig img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--tint); }
.ep-fig figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }
.article .ps { margin-top: 2em; color: var(--muted); }
@media (max-width: 860px) {
  .series-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .series-logo { width: 110px; height: 110px; }
}
.art-fig { margin: 0 0 8px; max-width: 520px; }
.art-fig img { display: block; width: 100%; height: auto; }
.art-fig figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }

/* Catalogue des conférences */
.catalogue { list-style: none; margin: 0 0 8px; padding: 0; border-top: 1px solid var(--line); }
.catalogue li { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 24px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cat-title { font-family: "Bitter", Georgia, serif; font-size: 1.15rem; font-weight: 600; }
.cat-type { justify-self: end; color: var(--muted); font-size: 0.95rem; text-align: right; }
.cat-note { margin-top: 22px; }
.wrap > h3 { margin: 40px 0 14px; }
@media (max-width: 860px) {
  .catalogue li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cat-type { justify-self: start; text-align: left; }
}
.cat-title { display: block; }
.cat-more { display: inline-block; margin-top: 6px; font-size: 0.95rem; }
.cat-notice { margin-top: 6px; }
.cat-notice summary { cursor: pointer; font-size: 0.95rem; color: var(--accent); text-decoration: underline; width: fit-content; }
.cat-notice p { max-width: 44rem; margin: 12px 0 0; }
.cat-notice .cat-lead { font-weight: 700; }
