/* ============================================================
   Rose Marie Berdos: professional site
   Palette: warm paper + deep pine accent.
   Bilingual FR/EN handled by data-lang on <html>.
   ============================================================ */

:root {
  --paper:      #FBF9F6;
  --paper-2:    #F3EFE8;
  --surface:    #FFFFFF;
  --ink:        #1D1C1A;
  --ink-2:      #4A4641;
  --muted:      #756F68;
  --line:       #E3DCD1;
  --accent:     #355F55;
  --accent-2:   #4C8175;
  --accent-tint:#E7EFEC;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1080px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29,28,26,.04), 0 8px 24px -12px rgba(29,28,26,.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #16181A;
    --paper-2:    #1D2023;
    --surface:    #1E2124;
    --ink:        #ECE8E2;
    --ink-2:      #C3BDB4;
    --muted:      #948D84;
    --line:       #2E3237;
    --accent:     #7FB3A5;
    --accent-2:   #9AC7BA;
    --accent-tint:#232B29;
    --shadow: 0 1px 2px rgba(0,0,0,.30), 0 10px 28px -14px rgba(0,0,0,.55);
  }
}

/* ---------- language switching ---------- */
html[data-lang="fr"] [data-l="en"] { display: none; }
html[data-lang="en"] [data-l="fr"] { display: none; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
/* Colonne de lecture étroite, alignée sur la même marge gauche que les
   sections pleine largeur (on contraint les enfants, pas le conteneur). */
.narrow > * { max-width: 760px; }
.narrow.center > * { margin-inline: auto; }
.center { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 3px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 68px;
}
.brand {
  font-family: var(--serif); font-size: 1.05rem; letter-spacing: .02em;
  color: var(--ink); text-decoration: none; line-height: 1.25;
  display: flex; flex-direction: column;
}
.brand-sub { font-family: var(--sans); font-size: .72rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.nav { margin-left: auto; display: flex; gap: clamp(14px, 2.2vw, 26px); }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: .88rem;
  padding: 4px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch button {
  font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  border: 0; background: transparent; color: var(--muted);
  padding: 6px 12px; cursor: pointer; transition: background .15s, color .15s;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--ink); }

@media (max-width: 820px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .lang-switch { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(48px, 8vw, 92px); padding-bottom: clamp(32px, 5vw, 56px); }
.hero-inner {
  display: grid; grid-template-columns: 1fr auto; gap: clamp(28px, 6vw, 64px);
  align-items: center;
}
.eyebrow {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px; font-weight: 600;
}
.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4rem);
  letter-spacing: -.015em; margin-bottom: .18em;
}
.hero-role {
  font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  color: var(--ink-2); font-style: italic; margin-bottom: .9em;
}
.hero-lede { font-size: 1.06rem; color: var(--ink-2); max-width: 44ch; }

.hero-photo { margin: 0; }
.hero-photo img {
  width: clamp(150px, 22vw, 210px); height: auto;
  border-radius: 50%;
  border: 5px solid var(--surface);
  box-shadow: var(--shadow);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-block; text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: 11px 22px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .12s ease, background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
}

/* quick facts */
.facts {
  list-style: none; margin: clamp(36px, 6vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.facts li { background: var(--paper); padding: 18px 20px; }
.fact-k {
  display: block; font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.fact-v { display: block; font-family: var(--serif); font-size: 1.02rem; color: var(--ink); }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-tint { background: var(--paper-2); border-block: 1px solid var(--line); }

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  letter-spacing: -.01em; margin-bottom: 1.1em;
  position: relative; padding-bottom: .45em;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 52px; height: 2px; background: var(--accent);
}
.center .section-title::after { left: 50%; transform: translateX(-50%); }

.sub-title {
  font-size: 1.12rem; margin: 2.2em 0 .9em;
  letter-spacing: .01em;
}
.sub-title:first-child { margin-top: 0; }

.prose p { color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(16px, 2.2vw, 24px);
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.08rem; margin-bottom: .5em; }
.card p { margin: 0; font-size: .93rem; color: var(--ink-2); }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li {
  display: grid; grid-template-columns: 130px 1fr; gap: 24px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.timeline > li:first-child { border-top: 0; padding-top: 0; }
.timeline.compact > li { padding: 20px 0; }

.tl-date {
  font-size: .8rem; letter-spacing: .08em; color: var(--muted);
  font-variant-numeric: tabular-nums; padding-top: .35em; white-space: nowrap;
}
.tl-body h3 { font-size: 1.16rem; margin-bottom: .4em; }
.tl-body p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.tl-meta { color: var(--muted) !important; font-size: .88rem !important; }

.badge {
  display: inline-block; margin-top: 10px !important;
  background: var(--accent-tint); color: var(--accent);
  font-size: .76rem !important; font-weight: 600; letter-spacing: .05em;
  padding: 4px 11px; border-radius: 999px;
}

@media (max-width: 620px) {
  .timeline > li { grid-template-columns: 1fr; gap: 6px; }
  .tl-date { padding-top: 0; }
}

/* ---------- recherche ---------- */
.section-lede {
  font-size: 1.02rem; color: var(--ink-2);
  margin: -.4em 0 1.8em; max-width: 60ch;
}

.paper {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(24px, 3.6vw, 38px);
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent);
}
.paper-kicker {
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 12px;
}
.paper-title {
  font-size: clamp(1.2rem, 2.6vw, 1.5rem); line-height: 1.3;
  margin-bottom: .5em; text-wrap: balance;
}
.paper-authors { font-size: .95rem; color: var(--ink); margin-bottom: .5em; }
.paper-event {
  font-family: var(--serif); font-size: .98rem;
  color: var(--accent); margin-bottom: .2em;
}
.paper-event em { font-style: italic; }
.paper-meta { font-size: .84rem; color: var(--muted); margin-bottom: 1.4em; }
.paper-desc { font-size: .95rem; color: var(--ink-2); margin-bottom: 1.6em; }

.paper-outline-label {
  font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.paper-outline {
  list-style: none; margin: 0 0 1.9em; padding: 0;
  border-top: 1px solid var(--line);
}
.paper-outline li { border-bottom: 1px solid var(--line); }
.paper-outline a {
  display: flex; gap: 14px; align-items: baseline;
  padding: 9px 2px; text-decoration: none;
  font-size: .9rem; color: var(--ink-2);
  transition: color .15s, background .15s;
}
.paper-outline a:hover { color: var(--accent); background: var(--accent-tint); }
.paper-outline .ts {
  font-variant-numeric: tabular-nums; font-size: .8rem;
  color: var(--accent); min-width: 3.4em; flex-shrink: 0;
}
.paper-cta { display: inline-block; }
.publications-note { margin-top: 14px; font-style: italic; }

/* ---------- two column ---------- */
.two-col {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 5vw, 64px);
}

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  padding: 11px 0; border-top: 1px solid var(--line);
  font-size: .93rem; color: var(--ink-2);
}
.list li:first-child { border-top: 0; }
.list strong { color: var(--ink); font-weight: 600; }

.awards li { display: flex; gap: 14px; align-items: baseline; }
.yr {
  font-variant-numeric: tabular-nums; color: var(--accent);
  font-size: .82rem; font-weight: 600; min-width: 3.2em; flex-shrink: 0;
}

.tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 13px;
  font-size: .82rem; color: var(--ink-2);
}

/* ---------- contact ---------- */
.contact-lede { font-size: 1.06rem; color: var(--ink-2); max-width: 48ch; margin-inline: auto; }
.email { margin: 28px 0 20px; }
.email a {
  font-family: var(--serif); font-size: clamp(1.15rem, 3.2vw, 1.6rem);
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding-bottom: 3px; word-break: break-word;
}
.email a:hover { border-bottom-color: var(--accent); }
.note { font-size: .86rem; color: var(--muted); margin: 0; }
.timeline + .note { margin-top: 16px; font-style: italic; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; background: var(--paper-2); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer p { margin: 0; font-size: .84rem; color: var(--muted); }

/* ---------- print (clean PDF / CV output) ---------- */
@media print {
  .site-header, .hero-actions, .skip, .lang-switch, .site-footer { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .hero { padding: 14pt 0; }
  .section-tint { background: #fff; border: 0; }
  .card, .facts li, .tags li { box-shadow: none; }
  a { color: #000; text-decoration: none; }
  .timeline > li, .cards { break-inside: avoid; }
}
