/* =========================================================
   0) VARIABLES + BASE
   ========================================================= */

:root {
  /* Colors */
  --color-bg-dark:    #1F2326;
  --color-bg-alt:     #162A3A;
  --color-header:     #0D0F12;

  --color-text:       #C7C9CA;
  --color-text-sec:   #7F8387;

  --color-accent:     #4A90E2;
  --color-accent-hov: #357ABD;

  --color-border:     #2C3E50;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-heading: 'Sora', 'Inter', system-ui, sans-serif;


  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;

  /* Radius + shadow */
  --radius: 12px;
  --shadow-sm: 0 4px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 6px 12px rgba(0,0,0,0.3);

  /* Layout */
  --container-w: 1000px;
}

/* Reset global */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-padding-top: 50px; /* header sticky */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-dark);
  color: var(--color-text);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

p { margin-bottom: var(--space-md); }

a {
  color: inherit;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

/* Accessibilité focus */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Container central */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* =========================================================
   1) HEADER + NAV
   ========================================================= */

header {
  position: sticky;
  top: 0;
  width: 100%;

  background: rgba(74, 144, 226, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-bottom: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);

  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 var(--space-md);
  z-index: 1000;

  border-radius: var(--radius);
  margin: var(--space-md);
}

.logo {
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.25rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-lg);
}

nav a {
  color: var(--color-text);
  font-weight: 500;
}

nav a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

nav a.active { color: var(--color-accent); }

/* Dropdown nav */
.dropdown { position: relative; }
.dropdown .arrow { font-size: 0.8rem; margin-left: 0.2em; }

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  background: var(--color-header);
  list-style: none;
  padding: var(--space-sm) 0;

  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  z-index: 1100;
}

.submenu a {
  display: block;
  padding: var(--space-sm) var(--space-lg);
  white-space: nowrap;
}

.dropdown:hover .submenu { display: block; }

.submenu a:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}


/* =========================================================
   2) SECTIONS (TOP-LEVEL SEULEMENT) + TYPO UI
   ========================================================= */

/* IMPORTANT : uniquement les sections directes du body
   -> évite l'effet "encadré dans encadré" sur les sous-sections */
body > section {
  padding: var(--space-lg) 0;
  margin: var(--space-md) 0;
  border-radius: var(--radius);
}

body > section:nth-of-type(odd)  { background: var(--color-bg-dark); }
body > section:nth-of-type(even) { background: var(--color-bg-alt); }

/* Les sections qui sont aussi .container gardent du padding horizontal */
body > section.container {
  padding: var(--space-lg) var(--space-md);
  background: inherit;
}

/* Sous-sections internes (ex: dans #vulgarisation) */
.section-sub {
  margin-top: var(--space-lg);
  padding: 0;                 /* pas de "bloc" encadré */
}

.section-sub h3 {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.section-sub > p {
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}
.section-sub .center-row { margin-top: var(--space-md); }

/* Section container: padding interne (évite d’avoir tout collé aux bords) */
section.container {
  padding: var(--space-lg) var(--space-md);
  background: inherit;
}

/* Accent pour titres de points */
.highlight {
  color: var(--color-accent);
  font-weight: 600;
}

/* À propos : layout */
#about {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: center;
}

#about .intro-content h2 {
  text-align: center;
  margin-bottom: var(--space-md);
}

/* Intro content (utilisé dans index) */
.intro-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-md);
  text-align: center;
}

/* (Optionnel : si tu utilises encore .intro ailleurs) */
.intro {
  position: relative;
  min-height: 80vh;
  background: url('img/intro.jpg') center/cover no-repeat;
}
.intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-bg-dark);
  opacity: 0.7;
}


/* =========================================================
   3) COMPOSANTS (BOUTONS, CARTES, GRILLES)
   ========================================================= */

.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text);
  border: none;
}

.btn-primary:hover { background: var(--color-accent-hov); }

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
  color: var(--color-text);
}

/* Petits boutons (utilisés dans les cartes avec boutons) */
.publication-item .btn,
.course-card .btn {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: nowrap;
}

/* Grille de preview */
#resources-preview h2 {
  margin-bottom: var(--space-md);
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

/* “Surface carte” unifiée */
.card,
.cv-item,
.course-card,
.publication-item,
.media-thumb,
.video-container.has-iframe,
.video-container.has-video {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Card */
.card {
  padding: var(--space-md);
  color: var(--color-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card h3 { margin-bottom: var(--space-sm); }
.card p  { font-size: 0.9rem; color: var(--color-text-sec); }


/* =========================================================
   4) FORMULAIRES
   ========================================================= */

form label {
  display: block;
  margin-bottom: var(--space-sm);
}

form input,
form textarea {
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-dark);
  color: var(--color-text);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-md);
}

form button { cursor: pointer; }


/* =========================================================
   5) LISTES / CV
   ========================================================= */

.cv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.cv-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cv-item {
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.cv-item strong { color: var(--color-accent); }

.cv-item em {
  color: var(--color-text-sec);
  font-style: italic;
  font-weight: 500;
}

#cv p { margin-bottom: var(--space-lg); }


/* =========================================================
   6) CARTES “PUBLICATIONS” / “COURS”
   ========================================================= */

/* Publication-item (et beaucoup de sections utilisent cette classe) */
.publication-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: var(--space-sm) var(--space-md);
  align-items: center;

  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.publication-item h3,
.publication-item p {
  grid-column: 1;
  margin: 0;
}

.publication-item h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
}

.publication-item p {
  font-size: 0.95rem;
  color: var(--color-text-sec);
}

.publication-item .btn-secondary {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.publication-item .btn-group {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

/* Course-card (si tu l’emploies ailleurs) */
.course-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-sm) var(--space-md);
  align-items: center;

  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}


/* =========================================================
   7) MÉDIAS (vignettes, vidéos, iframes)
   ========================================================= */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

/* Vignette cliquable type “BFM” */
.media-thumb {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: var(--space-lg);
  display: block;
}

.media-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.media-thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.media-thumb figcaption {
  margin: var(--space-sm);
  text-align: center;
  color: var(--color-text);
  font-size: 0.95rem;
}

/* Icône lecture (une seule définition) */
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.7);
  pointer-events: none;
  opacity: 0.8;
}

/* Iframe responsive (16:9) */
.video-container.has-iframe {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
}

.video-container.has-iframe iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Vidéos locales : “carte” compacte */
.video-container.has-video {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 320px;
  max-width: 100%;

  overflow: hidden;
  padding: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.video-container.has-video video {
  width: 100%;
  height: auto;
  display: block;
}

.video-container.has-video figcaption {
  margin-top: var(--space-sm);
  text-align: center;
  color: var(--color-text);
  font-size: 0.95rem;
}

/* Hover vidéo (léger) */
.video-container.has-iframe:hover,
.video-container.has-video:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  transition: transform 0.3s, box-shadow 0.3s;
}


/* =========================================================
   8) FOOTER
   ========================================================= */

footer {
  background: var(--color-header);
  color: var(--color-text);
  text-align: center;
  padding: var(--space-lg) 0;

  border-radius: var(--radius);
}

footer a {
  color: var(--color-accent);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }


/* =========================================================
   9) RESPONSIVE
   ========================================================= */

/* Tablettes & mobiles */

/* Mobile (intro en colonne) */


/* Très petits écrans : publication-item en “1 colonne” */


/* Logo */
.logo-img {
  height: 90px;
  vertical-align: middle;
}

/* =========================================================
   HERO (intro) — UNIFIÉ + SANS DOUBLONS
   ========================================================= */

.hero{
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
  gap: 2.25rem;
  align-items: center;
  padding-top: 2.25rem !important;
}

.hero-content{
  text-align: left;
  padding: 0;
  margin: 0;
  max-width: none;

  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Media */
.hero-media{
  align-self: center;
  max-width: 520px; /* cohérent avec minmax(...) */
}

.hero-img{
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;

  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  border: 1px solid var(--border-subtle);
}

/* Kicker (pill) */
.hero-kicker{
  align-self: flex-start;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;

  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-pill);

  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  margin: 0 0 0.85rem 0;
}

/* Texte */
.hero-lead{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 62ch;
}

.hero-note{
  margin: 0;
  color: rgba(255,255,255,0.58);
  max-width: 66ch;
}

/* Actions */
.hero-actions{
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

/* Mobile : contenu d’abord, image ensuite */


/* Footer (remplace l'inline) */
.site-footer {
  border-top: 1px solid var(--color-accent);
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.9em;
}

.site-footer p { margin: 0; }
.social-links { margin: 0; }


/* Liens accent (ex: responsabilités) */
.link-accent {
  color: var(--color-accent);
  text-decoration: none;
}
.link-accent:hover { text-decoration: underline; }

/* Sous-sections (Vulgarisation) */
.section-sub { margin-top: var(--space-lg); }
.stack-lg { margin-top: var(--space-lg); }

/* Ligne de vidéos (locales) */
.video-row {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

/* Helpers layout */
.text-center { text-align: center; }
.center-row {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.center-block { margin-left: auto; margin-right: auto; }
.max-w-600 { max-width: 600px; }

/* Évite l’effet “hover lift” quand tu utilises .card pour des blocs statiques */
.card--static:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* Figcaption pour iframes */
.video-container.has-iframe figcaption {
  margin: var(--space-sm);
  text-align: center;
  color: var(--color-text);
  font-size: 0.95rem;
}


/* =========================================================
   2025 LIGHT REFRESH (override)
   Colle ce bloc en bas de style.css
   ========================================================= */

/* --- Tokens modernes (compatibles avec tes variables existantes) --- */
:root{
  --bg: #0b0d10;
  --surface: rgba(255,255,255,0.045);
  --surface-2: rgba(255,255,255,0.065);
  --border-subtle: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.16);
  --text: rgba(255,255,255,0.90);
  --muted: rgba(255,255,255,0.68);

  --shadow-1: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-2: 0 14px 50px rgba(0,0,0,0.45);

  --radius-lg: 18px;
  --radius-pill: 999px;

  /* Aiguillage : on garde ton accent, mais on l’emploie mieux */
  --accent: var(--color-accent);
  --accent-2: #6D42F0; /* léger violet, juste pour le gradient des titres */
}

/* --- Base + fond plus “éditorial” --- */
body{
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(74,144,226,0.25), transparent 60%),
    radial-gradient(900px 600px at 110% 10%, rgba(109,66,240,0.18), transparent 55%),
    var(--bg);
  color: var(--text);
}

p{ color: var(--muted); }
a{ text-decoration: none; }
a:hover{ text-decoration: none; }

/* --- Container un peu plus large + confort lecture --- */
:root{ --container-w: 1100px; }
.container{ padding: 0 1.25rem; }

/* --- Header 2025 : moins “bulle”, plus barre pro --- */
header.container{
  margin: 0;
  border-radius: 0;
  height: 72px;
  padding: 0 1.25rem;

  background: rgba(13,15,18,0.82);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: none;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Nav : plus discret, moins “UI demo” */
nav a{
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
nav a:hover{ color: var(--accent); }
nav a.active{ color: var(--accent); }

/* Dropdown : surface moderne */
.submenu{
  background: rgba(13,15,18,0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}

/* --- Sections : on arrête l’alternance “slides”, on mise sur le rythme --- */
body > section{
  background: transparent !important;
  margin: 0;
  padding: 3.25rem 0;
  border-radius: 0;
}
body > section.container{ padding: 3.25rem 1.25rem; }

/* --- Titres : gradient discret, hiérarchie plus nette --- */
h1{
  font-size: clamp(2.1rem, 3.2vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--text);
}
h2{
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  letter-spacing: -0.015em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* --- Cards : moins d’ombre, plus de bordure, hover très léger --- */
.card,
.cv-item,
.course-card,
.publication-item,
.media-thumb,
.video-container.has-iframe,
.video-container.has-video{
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.card:hover{
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

/* --- Boutons : pill, clean, 2025 --- */
.btn{
  border-radius: var(--radius-pill);
  padding: .75rem 1.05rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary{
  background: rgba(74,144,226,0.92);
  color: rgba(255,255,255,0.92);
}
.btn-primary:hover{ background: rgba(74,144,226,1); }

.btn-secondary{
  background: rgba(255,255,255,0.03);
  border-color: var(--border-subtle);
  color: rgba(255,255,255,0.88);
}
.btn-secondary:hover{
  background: rgba(255,255,255,0.06);
  border-color: var(--border-strong);
}

/* --- Footer : sobre, net --- */
.site-footer{
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  background: transparent;
}
.site-footer p{ color: rgba(255,255,255,0.72); }
.site-footer a{ color: rgba(255,255,255,0.86); }
.site-footer a:hover{ color: var(--accent); }


/* ===== Resources page polish ===== */
.page-hero { padding-top: 2.25rem !important; }
.page-hero-inner { max-width: 900px; }
.page-hero-lead { margin: .6rem 0 1rem; color: var(--muted); max-width: 70ch; }

.section-head { margin-bottom: 1.25rem; }
.section-head p { margin: .35rem 0 0; color: var(--muted); }

.toc-chips{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}
.chip{
  display: inline-flex;
  align-items: center;
  padding: .45rem .75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  font-size: .95rem;
}
.chip:hover{
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.06);
}

/* listes simples */
.list-clean{
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-clean li{ margin: .6rem 0; }

.hero{
  grid-template-columns: 380px 1fr;
  align-items: center;
}

.hero-img{
  max-height: 360px;
}

.hero-content{
  max-height: none;
  overflow: visible;
}


.site-header{
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;

  background: rgba(13,15,18,0.82);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner{
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
/* ===== Médias : cartes homogènes ===== */

/* ===== Médias : 3 + 2 centré (sur desktop), puis 2, puis 1 ===== */

.media-grid{
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

/* Mobile */
@media (max-width: 620px){
  .media-grid{ grid-template-columns: 1fr; }
}

/* Tablette */
@media (min-width: 621px) and (max-width: 999px){
  .media-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop : grille en 6 colonnes, chaque carte span 2 => 3 par ligne */
@media (min-width: 1000px){
  .media-grid{
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .media-grid > .media-card{
    grid-column: span 2;
  }

  /* Cas EXACTEMENT 5 cartes : on centre les 2 dernières */
  .media-grid:has(> .media-card:nth-child(5):last-child) > .media-card:nth-child(4){
    grid-column: 2 / span 2; /* laisse 1 colonne vide à gauche */
  }
  .media-grid:has(> .media-card:nth-child(5):last-child) > .media-card:nth-child(5){
    grid-column: 4 / span 2; /* laisse 1 colonne vide à droite */
  }
}


.media-card{
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.media-card:hover{
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.media-frame{
  position: relative;
  width: 100%;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-subtle);
}

.media-frame--16x9{ aspect-ratio: 16 / 9; }
.media-frame--player{ height: 220px; } /* même hauteur pour les 2 podcasts */

.media-frame iframe,
.media-frame img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.media-frame img{ object-fit: cover; }

.media-link{ display: block; }

.media-play{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);
  font-size: 18px;
  backdrop-filter: blur(8px);
}

.media-card figcaption{
  padding: .85rem 1rem 1rem;
  color: rgba(255,255,255,0.86);
  font-weight: 600;
  line-height: 1.35;
}

/* =========================================================
   RESPONSIVE — PETITS ÉCRANS (UNIFIÉ + ÉPURÉ)
   ========================================================= */

@media (max-width: 768px){

  /* Rythme et lisibilité */
  :root{
    --space-lg: 1.5rem;
  }
  .container{
    padding: 0 1rem;
  }

  /* Header / nav mobile */
  header{
    position: sticky;
    top: 0;
    margin: 0;
    border-radius: 0;
    height: 64px;
    padding: 0 1rem;
  }

  .logo-img{
    height: 56px;
  }

  .menu-toggle{
    display: block;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }

  nav ul{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: rgba(13,15,18,0.98);
    border-top: 1px solid var(--border-subtle);
    padding: 1rem;

    border-radius: 0 0 16px 16px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;

    flex-direction: column;
    gap: 0.75rem;
  }

  nav ul.open{ display: flex; }

  /* Sur mobile, le hover dropdown est peu fiable : on évite le "hover only" */
  .dropdown:hover .submenu{ display: none; }

  /* Hero : 1 colonne */
  .hero{
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
    padding-top: 1.5rem !important;
  }
  .hero-content{ order: 1; }
  .hero-media{ order: 2; max-width: 100%; }
  .hero-img{
    max-height: 280px;
  }

  /* Boutons : plus faciles au pouce */
  .btn{
    padding: 0.75rem 1rem;
  }
  .hero-actions{
    gap: 0.6rem;
  }

  /* À propos : colonne */
  #about{
    flex-direction: column;
    align-items: stretch;
  }
  .intro-content{
    text-align: left;
    padding: 0;
  }

  /* Grilles : 1 colonne pour éviter les mini-capsules illisibles */
  .grid{ grid-template-columns: 1fr; }
  .media-grid{ grid-template-columns: 1fr; }

  /* Publications / cours : empilement propre */
  .publication-item{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .publication-item .btn-secondary,
  .publication-item .btn-group{
    grid-column: 1;
    grid-row: 3;
    justify-content: flex-start;
  }

  /* Vidéos locales : stack */
  .video-row{
    flex-direction: column;
    align-items: stretch;
  }
  .video-container.has-video{
    width: 100%;
  }
}

/* ===== Section IA ===== */
.ia-section{
  margin-top: 3rem;
}

.ia-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.ia-card{
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ia-card h3{
  margin-top: 0;
  font-size: 1.35rem;
}

.ia-list{
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
}

.ia-note{
  font-size: 0.92rem;
  color: var(--muted);
}

.ia-cta{
  margin-top: auto;
  align-self: flex-start;
}
/* Liste numérotée alignée avec la version puces */
.ia-list-numbered {
  list-style: decimal inside;
  margin: 0;
  padding-left: 1.2rem;
}

.ia-list-numbered li {
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

/* Phrase conclusion sous la liste */
.ia-conclusion {
  margin: 0.5rem 0 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Phrase mise en avant en blanc plus vif */
.ia-arrow-strong {
  color: #fff;                      /* blanc éclatant */
  font-weight: 500;
  line-height: 1.55;
  margin-top: 0.2rem;
}

.ia-link {
  color: var(--text); /* même couleur que le texte */
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.18); /* souligné ultra léger */
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.ia-link:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,0.65); /* plus visible au hover */
}
.modern-research .research-item {
  margin-bottom: 1.2rem;
  display: grid;
  grid-template-columns: 230px auto;
  gap: 0.8rem;
}

.modern-research .highlight {
  font-weight: 600;
  opacity: 0.8;
}

/* --- Version mobile : on empile --- */
@media (max-width: 600px) {
  .modern-research .research-item {
    grid-template-columns: 1fr;  /* une seule colonne */
    gap: 0.3rem;                  /* espace réduit */
  }

  .modern-research .highlight {
    display: block;               /* date au-dessus */
    margin-bottom: 0.2rem;
  }
}





/* Très petits écrans : boutons full-width + titres un peu réduits */
@media (max-width: 480px){
  h1{ font-size: 2rem; }
  .hero-actions{
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn{
    width: 100%;
    text-align: center;
  }
}

/* Motion respect (une seule fois) */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}


@media (max-width: 768px){

  /* bouton visible, nav desktop cachée */
  .menu-toggle{ display: inline-flex; }

  .site-header{ position: sticky; top: 0; }
  .header-inner{ height: 64px; }

  /* Le panel menu : fixé à l’écran, sous la topbar */
  .site-header nav ul{
    display: none;                  /* s'ouvre via .open */
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;                      /* = hauteur header-inner */
    max-height: calc(100vh - 64px);

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding: 1rem;
    margin: 0;

    background: rgba(13,15,18,0.98);
    border-top: 1px solid var(--border-subtle);
  }

  .site-header nav ul.open{ display: flex; }

  .site-header nav ul{
    flex-direction: column;
    gap: 0.6rem;
  }

  /* Liens : jamais de dépassement horizontal */
  .site-header nav a{
    display: block;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;

    white-space: normal;           /* wrap */
    overflow-wrap: anywhere;       /* casse si besoin */
    word-break: normal;

    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
  }

  .site-header nav a:hover{
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
  }

  /* Dropdown : sur mobile on ignore le hover */
  .dropdown:hover .submenu{ display: none; }

  /* Sous-menu : on l'affiche en bloc (si tu veux toujours le voir) */
  .submenu{
    position: static !important;
    display: block;                /* simple et robuste */
    margin-top: 0.35rem;
    padding-left: 0.35rem;

    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .submenu a{
    padding: 0.65rem 0.85rem;
    background: rgba(255,255,255,0.02);
  }

  /* Option : rend la flèche inutile sur mobile */
  .arrow{ display: none; }

  .ia-grid{
    grid-template-columns: 1fr;
  }
}

