/* ===== Couleurs du site : tout se règle ici ===== */
:root {
  --accent: #2f3f4a;      /* bleu ardoise : bandeaux, titres, badges */
  --band: #f3f0e7;        /* sable clair : encadré de présentation, cartes d'engagement */
  --ground: #ffffff;      /* fond de page */
  --text: #1c1c1e;
  --muted: #444444;
  --soft: #595959;
  --line: #e5e1da;
  --btn-line: #cfc9bf;
  --link: #1f4e8c;
  --serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--sans); color: var(--text); background: var(--ground); font-size: 16px; line-height: 1.6; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: 880px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ----- Bandeau du haut ----- */
.topbar { background: var(--accent); position: sticky; top: 0; z-index: 10; }
.topnav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 22px; color: #fff; }
.brand:hover { text-decoration: none; }
.menu { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.menu a { color: #e8ecef; }
.menu a.active { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }

/* ----- Bandeau du bas ----- */
.bottombar { background: var(--accent); color: #f5f3ea; margin-top: 80px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; padding-top: 24px; padding-bottom: 24px; }

/* ----- Contenu ----- */
.content { flex: 1; width: 100%; padding-top: 56px; display: flex; flex-direction: column; gap: 64px; }
section { display: flex; flex-direction: column; gap: 20px; }
h1, h2 { font-family: var(--serif); margin: 0; }
h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
h2 { font-size: 28px; font-weight: 600; line-height: 1.25; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
h3 { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--soft); }
p { margin: 0; }
.page-head { display: flex; flex-direction: column; gap: 8px; }
.page-head h1 { color: var(--accent); }
.lead { color: var(--soft); }
.more { align-self: flex-start; font-weight: 600; font-size: 15px; }

/* ----- Encadré de présentation ----- */
.about { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: start; background: var(--band); padding: 36px; border-radius: 16px; }
.about-text { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.about .role { font-size: 17px; color: var(--muted); }
.about .areas { font-size: 15px; color: var(--muted); }
.about .areas strong { color: var(--text); font-weight: 600; }
.about .portrait { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 15%; border-radius: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--btn-line); background: #fff; border-radius: 8px; font-size: 14px; color: var(--text); }
.btn:hover { border-color: var(--accent); text-decoration: none; }
@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; padding: 24px; }
  .about .portrait { max-width: 220px; order: -1; }
  h1 { font-size: 32px; }
}

/* ----- Petits boutons (DOI, PDF…) ----- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 10px; border: 1px solid var(--btn-line); background: #fff; border-radius: 4px; color: var(--text); }
.chip:hover { border-color: var(--accent); text-decoration: none; }
.tag-until { font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: 4px; background: #fff4e5; color: #8a4b00; }

/* ----- Listes datées (actus, interventions) ----- */
.timeline { display: grid; grid-template-columns: 96px 1fr; gap: 20px 16px; font-size: 15px; line-height: 1.55; }
.timeline .date { color: var(--soft); font-size: 14px; padding-top: 2px; }
.timeline .item { display: flex; flex-direction: column; gap: 6px; }
.timeline .item p { margin: 0; }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; gap: 4px; } .timeline .item { margin-bottom: 14px; } }

/* ----- Publications ----- */
.pub { display: grid; grid-template-columns: 88px 1fr; gap: 16px; }
.badge { align-self: start; text-align: center; font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 4px; padding: 4px 2px; line-height: 1.4; }
.pub-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pub-title { font-weight: 600; line-height: 1.4; }
.pub-authors { font-size: 14px; color: var(--muted); }
.pub-authors strong { color: var(--text); font-weight: 600; }
.pub-venue { font-size: 14px; color: var(--soft); font-style: italic; }
@media (max-width: 560px) { .pub { grid-template-columns: 1fr; gap: 6px; } .badge { justify-self: start; padding: 4px 10px; } }

/* ----- Cartes (cours, engagements) ----- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.card.band { background: var(--band); }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.card-title { font-weight: 600; }
.card-meta { font-size: 13px; color: var(--soft); }
.card p, .card li { font-size: 14px; line-height: 1.6; color: var(--muted); }
.card ul { margin: 0; padding-left: 18px; }

/* ----- Thèse ----- */
.thesis { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: start; }
.video { aspect-ratio: 16/9; width: 100%; border: 0; border-radius: 10px; background: #f4f4f5; }
.video-placeholder { display: flex; align-items: center; justify-content: center; color: var(--soft); font-size: 14px; border: 1px dashed #a1a1aa; text-align: center; padding: 16px; }
.thesis-info { display: flex; flex-direction: column; gap: 8px; }
.thesis-info p { font-size: 14px; color: var(--muted); }

/* ----- Texte libre (pages Markdown) ----- */
.prose { display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-size: 22px; }

/* ----- Liste des cours (page Teaching) ----- */
.courses .course { gap: 4px; }
.course-title { font-weight: 600; font-size: 16px; }
.course-module { font-size: 15px; color: var(--muted); }
.course-desc p { font-size: 15px; color: var(--muted); }
.course-files { font-size: 14px; }
.course-files .until { color: #8a4b00; font-size: 13px; }

/* ----- Rôles institutionnels, relectures ----- */
.rolelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rolelist li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.rolelist li:first-child { padding-top: 0; }
.rolelist .when { color: var(--soft); font-size: 14px; white-space: nowrap; }
.rolelist .badge { white-space: nowrap; padding: 3px 10px; }

/* ----- Engagements (page Activities) ----- */
.commitments { display: flex; flex-direction: column; gap: 16px; }
.commitment { display: grid; grid-template-columns: 1fr 120px; gap: 32px; align-items: center; padding: 24px; border-radius: 12px; background: var(--band); }
.commitment-text { display: flex; flex-direction: column; gap: 8px; }
.commitment-text p { font-size: 15px; color: var(--muted); }
.commitment-logo { width: 120px; height: 120px; object-fit: contain; }
.commitment { grid-template-columns: 1fr 140px; }
.commitment:not(:has(img)) { grid-template-columns: 1fr; }
@media (max-width: 560px) { .commitment { grid-template-columns: 1fr; } .commitment-logo { width: 90px; height: 90px; order: -1; } }

/* ----- Résumé dépliable des publications ----- */
.abstract { font-size: 14px; color: var(--muted); }
.abstract summary { cursor: pointer; font-size: 12px; color: var(--link); width: max-content; }
.abstract p { margin-top: 8px; line-height: 1.6; }
.chips:empty { display: none; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #1f2c35; border-color: #1f2c35; }

/* ----- Images et posts intégrés dans les actus ----- */
.news-img { max-width: 420px; width: 100%; border-radius: 8px; }
.news-embed { width: 100%; max-width: 504px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.tag-ongoing { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 4px; background: var(--band); color: var(--accent); margin-left: 6px; vertical-align: 2p
  x; }
/* ----- Logos sous la thèse ----- */
.thesis-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 12px; }
.thesis-logos img { height: 40px; width: auto; display: block; }

/* ----- Colonne photo + logo du lab, adresse de contact ----- */
.about-side { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lab-logo { display: block; }
.lab-logo img { display: block; max-width: 180px; max-height: 48px; width: auto; height: auto; }
.contact { user-select: all; cursor: text; }
.copy-btn { cursor: pointer; font: inherit; }
@media (max-width: 720px) { .about-side { order: -1; align-items: flex-start; } }
#contact-btn { cursor: pointer; font: inherit; font-weight: 600; }
.thesis.no-video { grid-template-columns: 1fr; }