/* ==========================================================================
   Majalat Education - Premium Homepage & Portfolio Physique-Chimie
   Design system: light, minimal, glassmorphism, soft gradients, science motifs
   ========================================================================== */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #fbfbfd;
  --bg-soft: #f5f6fa;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.6);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);

  /* Text */
  --text: #0b1220;
  --text-soft: #3a4257;
  --muted: #6b7280;
  --muted-soft: #9aa2b1;

  /* Brand */
  --primary: #2f6bff;
  --primary-dark: #1c4fd6;
  --primary-light: #6d93ff;
  --accent: #14b8a6;
  --accent-violet: #7c6ef2;
  --midnight: #0a1030;
  --midnight-soft: #131c47;

  --gradient-primary: linear-gradient(135deg, #2f6bff 0%, #6d93ff 50%, #14b8a6 100%);
  --gradient-soft: linear-gradient(135deg, rgba(47, 107, 255, 0.08), rgba(20, 184, 166, 0.08));
  --gradient-text: linear-gradient(120deg, #0b1220 0%, #2f5fdb 55%, #14b8a6 100%);
  --gradient-science: linear-gradient(135deg, #2f6bff 0%, #7c6ef2 50%, #14b8a6 100%);
  --gradient-midnight: linear-gradient(135deg, #0a1030 0%, #131c47 55%, #0d2f4a 100%);

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 20px 60px rgba(47, 107, 255, 0.18);

  --radius-sm: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.75rem;
  --radius-xl: 2.5rem;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main { display: block; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.page-shell { overflow: hidden; }
.container { width: min(1240px, calc(100% - 3rem)); margin: 0 auto; }

h1, h2, h3, h4 { font-family: inherit; letter-spacing: -0.03em; color: var(--text); }
p { color: var(--text-soft); }

::selection { background: rgba(47, 107, 255, 0.18); color: var(--text); }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.4rem 0;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), padding 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(251, 251, 253, 0.75);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 12px 24px -18px rgba(15, 23, 42, 0.25);
}

.nav-row { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 0; gap: 1.5rem; }

.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  text-decoration: none; font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.02em; color: var(--text);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--gradient-primary);
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.3);
  position: relative;
  display: inline-block;
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
}

.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  color: var(--text-soft); text-decoration: none; font-size: 0.94rem; font-weight: 500;
  position: relative; padding: 0.3rem 0; transition: color 0.2s ease;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--gradient-primary); border-radius: 2px;
  transition: right 0.3s var(--ease);
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { right: 0; }

.nav-item { position: relative; display: flex; align-items: center; gap: 0.25rem; }
/* Invisible bridge across the gap so moving the cursor from "Niveaux" down to
   the submenu never loses the :hover state and the panel stays open. */
.nav-item--dropdown::after {
  content: ""; position: absolute; top: 100%; left: 0; width: 100%; height: 1rem;
}
.nav-dropdown-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0; border: none; background: transparent;
  color: var(--muted-soft); cursor: pointer; transition: transform 0.2s ease, color 0.2s ease;
}
.nav-dropdown-toggle svg { width: 12px; height: 12px; }
.nav-item--dropdown:hover .nav-dropdown-toggle,
.nav-item--dropdown.is-open .nav-dropdown-toggle { color: var(--text); transform: rotate(180deg); }

.nav-submenu {
  position: absolute; top: calc(100% + 0.9rem); left: 0; min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.8rem;
  box-shadow: var(--shadow-lg); padding: 0.5rem; display: flex; flex-direction: column; gap: 0.1rem;
  opacity: 0; visibility: hidden; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}
.nav-item--dropdown:hover .nav-submenu,
.nav-item--dropdown.is-open .nav-submenu { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.nav-submenu a { padding: 0.6rem 0.75rem !important; border-bottom: none !important; border-radius: 0.5rem; font-size: 0.9rem; }
.nav-submenu a:hover { background: var(--bg-soft); color: var(--text); }
.nav-submenu a::after { display: none; }

.nav-actions { display: flex; align-items: center; gap: 0.9rem; }

.ghost-pill {
  padding: 0.65rem 1.3rem; border-radius: 999px; border: 1px solid var(--border-strong);
  color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 600;
  background: var(--surface); transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.ghost-pill:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 8px 20px rgba(47, 107, 255, 0.12); transform: translateY(-1px); }

.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; align-items: center; justify-content: center; gap: 4px; flex-direction: column; flex-shrink: 0;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.95rem 1.7rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.96rem; letter-spacing: -0.01em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  border: none; cursor: pointer; position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--gradient-primary); color: #fff;
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.32);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(47, 107, 255, 0.4); }
.btn-primary:active { transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.btn-icon { transition: transform 0.3s var(--ease); }
.btn:hover .btn-icon { transform: translateX(3px); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 7.5rem 0 6rem;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 82% 8%, rgba(47, 107, 255, 0.10), transparent 60%),
    radial-gradient(50% 45% at 8% 92%, rgba(20, 184, 166, 0.10), transparent 60%),
    var(--bg);
}

.hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: 0; }
.orb-one { width: 460px; height: 460px; background: radial-gradient(circle, rgba(47,107,255,0.16), transparent 70%); top: -140px; right: -120px; animation: float 14s ease-in-out infinite; }
.orb-two { width: 380px; height: 380px; background: radial-gradient(circle, rgba(20,184,166,0.14), transparent 70%); bottom: -120px; left: -100px; animation: float 16s ease-in-out infinite reverse; }

.hero-grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem; align-items: center;
  width: min(1120px, calc(100% - 4rem)); margin-inline: auto;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.74rem; font-weight: 700;
  color: var(--primary-dark);
  background: rgba(47, 107, 255, 0.08);
  padding: 0.5rem 0.9rem; border-radius: 999px;
  margin-bottom: 1.3rem;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.18); }

.hero h1 {
  font-size: clamp(2.6rem, 4.6vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 1.3rem;
  max-width: 720px;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text { font-size: 1.15rem; max-width: 560px; color: var(--text-soft); margin: 0 0 2rem; }

.search-panel {
  display: flex; gap: 0.5rem; padding: 0.5rem;
  border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border-strong); max-width: 560px;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.search-panel:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.12), var(--shadow-md); }
.search-panel input {
  flex: 1; border: none; background: transparent; color: var(--text);
  padding: 0.85rem 1.1rem; outline: none; font-size: 0.98rem; font-family: inherit;
}
.search-panel input::placeholder { color: var(--muted-soft); }
.search-panel button {
  border: none; border-radius: 999px; padding: 0.9rem 1.4rem;
  background: var(--gradient-primary); color: #fff; font-weight: 600; cursor: pointer;
  font-size: 0.94rem; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.search-panel button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(47, 107, 255, 0.3); }

.hero-actions { display: flex; gap: 1rem; margin-top: 1.8rem; flex-wrap: wrap; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.2rem; }
.hero-meta span {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.9rem; border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); font-size: 0.86rem; background: var(--surface); font-weight: 500;
}
.hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* Hero visual */
.hero-visual { position: relative; z-index: 1; }
.hero-card {
  padding: 1.6rem; border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255,255,255,0.9), rgba(255,255,255,0.65));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  position: relative;
}
.hero-svg { width: 100%; height: auto; display: block; }
.hero-shape { animation: floatShape 6s ease-in-out infinite; transform-origin: center; }
.hero-shape--slow { animation-duration: 9s; animation-direction: alternate; }
.hero-path { stroke-dasharray: 420; stroke-dashoffset: 420; animation: drawPath 2.4s var(--ease) 0.4s forwards; }

@keyframes floatShape {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}

.floating-chip {
  position: absolute; display: flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1.1rem; border-radius: 1.1rem;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); font-size: 0.86rem; font-weight: 600;
  animation: floatChip 7s ease-in-out infinite;
}
.floating-chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.chip-one { top: 6%; left: -6%; animation-delay: 0s; }
.chip-one .dot { background: var(--accent); box-shadow: 0 0 0 5px rgba(20,184,166,0.16); }
.chip-two { bottom: 10%; right: -8%; animation-delay: 1.2s; }
.chip-two .dot { background: var(--primary); box-shadow: 0 0 0 5px rgba(47,107,255,0.16); }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 6rem 0; position: relative; }
.section-soft { background: var(--bg-soft); }
.section-heading { margin-bottom: 3rem; max-width: 760px; }
.section-heading.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading h2 {
  font-size: clamp(1.9rem, 3vw, 2.7rem); margin: 0 0 1rem; font-weight: 800; line-height: 1.15;
}
.section-heading p { font-size: 1.08rem; color: var(--muted); }

/* Levels */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }

.level-card {
  padding: 2rem 1.6rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  position: relative; overflow: hidden;
}
.level-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: var(--gradient-soft); transition: opacity 0.4s var(--ease);
}
.level-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: rgba(47,107,255,0.25); }
.level-card:hover::before { opacity: 1; }
.level-card > * { position: relative; z-index: 1; }

.level-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--gradient-primary); color: #fff; margin-bottom: 1.3rem;
  box-shadow: 0 10px 24px rgba(47, 107, 255, 0.25);
  transition: transform 0.4s var(--ease);
}
.level-card:hover .level-icon { transform: scale(1.08) rotate(-4deg); }
.level-icon svg { width: 24px; height: 24px; }

.level-card h3 { margin: 0 0 0.6rem; font-size: 1.2rem; font-weight: 700; }
.level-card p { margin: 0 0 1.2rem; font-size: 0.95rem; color: var(--muted); }
.level-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.level-link svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.level-card:hover .level-link svg { transform: translateX(4px); }

/* Resources */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.resource-card {
  padding: 1.8rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  display: flex; flex-direction: column; gap: 1rem;
}
.resource-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.resource-top { display: flex; align-items: center; justify-content: space-between; }
.resource-badge {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.02em;
}
.badge-pdf { background: linear-gradient(135deg, #ff6b6b, #ee5253); }
.badge-ppt { background: linear-gradient(135deg, #ff9f43, #f6820c); }
.badge-td { background: linear-gradient(135deg, #2f6bff, #6d93ff); }
.badge-tp { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.badge-exam { background: linear-gradient(135deg, #7c6ef2, #6155d1); }
.badge-cours { background: linear-gradient(135deg, #2ecc71, #26ae60); }
.resource-tag { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-soft); }
.resource-card h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.resource-card p { margin: 0; font-size: 0.92rem; color: var(--muted); flex: 1; }
.resource-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 0.9rem; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--muted-soft); }
.resource-foot a { color: var(--primary); font-weight: 600; text-decoration: none; }

.section-cta { display: flex; justify-content: center; margin-top: 2.6rem; }

/* Stats */
.stats-band {
  background: linear-gradient(135deg, #0b1220 0%, #16224a 55%, #0d2f4a 100%);
  border-radius: var(--radius-xl);
  padding: 3.4rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.stats-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 80% at 20% 0%, rgba(47,107,255,0.35), transparent 60%),
              radial-gradient(50% 80% at 90% 100%, rgba(20,184,166,0.3), transparent 60%);
}
.stats-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.stat-card { text-align: center; padding: 0.5rem; }
.stat-card strong { display: block; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.stat-card span { color: rgba(255,255,255,0.68); font-size: 0.95rem; }

/* Why choose us */
.feature-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.feature-card {
  padding: 2rem 1.7rem; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(47, 107, 255, 0.08); color: var(--primary); margin-bottom: 1.2rem;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin: 0 0 0.6rem; font-size: 1.08rem; font-weight: 700; }
.feature-card p { margin: 0; font-size: 0.94rem; color: var(--muted); }

/* Timeline / conferences */
.conferences-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 2.5rem; align-items: start; }
.conference-intro h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin: 0 0 1rem; font-weight: 800; }
.conference-intro p { color: var(--muted); margin: 0 0 1.6rem; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 0; }
.timeline::before {
  content: ""; position: absolute; left: 23px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--border-strong), var(--border-strong));
}
.timeline-item { position: relative; display: flex; gap: 1.4rem; padding: 1.3rem 0; }
.timeline-dot {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem; color: var(--primary);
  position: relative; z-index: 1; box-shadow: var(--shadow-sm);
}
.timeline-content { padding-top: 0.3rem; }
.timeline-content strong { display: block; font-size: 1.02rem; margin-bottom: 0.3rem; }
.timeline-content span { color: var(--muted); font-size: 0.9rem; display: block; margin-bottom: 0.4rem; }
.timeline-content p { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.quote-card {
  padding: 2rem 1.7rem; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 1.2rem;
}
.quote-stars { display: flex; gap: 0.2rem; color: #f6b93b; }
.quote-stars svg { width: 15px; height: 15px; }
.quote-card p { margin: 0; font-size: 1rem; color: var(--text-soft); flex: 1; }
.quote-author { display: flex; align-items: center; gap: 0.8rem; }
.quote-avatar {
  width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.9rem; background: var(--gradient-primary);
}
.quote-author strong { display: block; font-size: 0.92rem; }
.quote-author span { font-size: 0.82rem; color: var(--muted-soft); }

/* Newsletter */
.newsletter-card {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0b1220 0%, #16224a 55%, #0d2f4a 100%);
  padding: 3.6rem 3rem;
  display: flex; justify-content: space-between; align-items: center; gap: 2rem;
  position: relative; overflow: hidden;
}
.newsletter-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 90% at 85% 20%, rgba(47,107,255,0.35), transparent 60%);
}
.newsletter-card > * { position: relative; z-index: 1; }
.newsletter-card .eyebrow { background: rgba(255,255,255,0.1); color: #9fc2ff; }
.newsletter-card h2 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); margin: 0; color: #fff; font-weight: 800; max-width: 460px; }
.newsletter-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.newsletter-form input {
  padding: 0.95rem 1.2rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08); color: #fff; min-width: 260px; font-family: inherit; font-size: 0.95rem; outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form input:focus { border-color: var(--primary-light); background: rgba(255,255,255,0.12); }
.newsletter-form button {
  padding: 0.95rem 1.4rem; border-radius: 999px; border: none;
  background: #fff; color: #0b1220; font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.newsletter-form button:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,0.25); }
.newsletter-note { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.7rem; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { padding: 4rem 0 2.5rem; border-top: 1px solid var(--border); margin-top: 2rem; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer-brand { font-size: 1.1rem; margin-bottom: 0.9rem; }
.footer-grid > div > p { font-size: 0.92rem; color: var(--muted); max-width: 300px; }
.footer-grid h3 { margin: 0 0 1rem; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-soft); font-weight: 700; }
.footer-grid a, .footer-grid span { display: block; margin-top: 0.65rem; color: var(--text-soft); text-decoration: none; font-size: 0.94rem; }
.footer-grid a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; margin-top: 0;
  transition: all 0.25s var(--ease);
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-social svg { width: 16px; height: 16px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding-top: 2rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted-soft);
}
.footer-bottom-links { display: flex; gap: 1.4rem; }
.footer-bottom-links a { color: var(--muted-soft); text-decoration: none; }
.footer-bottom-links a:hover { color: var(--primary); }
.footer-bottom span a { color: var(--muted-soft); text-decoration: underline; }
.footer-bottom span a:hover { color: var(--primary); }

/* ==========================================================================
   Science motifs (atom, molecules, waves, particles)
   ========================================================================== */

.science-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.science-field svg { position: absolute; opacity: 0.5; }

.atom-orbit { transform-origin: center; animation: spin 18s linear infinite; }
.atom-orbit--slow { animation-duration: 28s; animation-direction: reverse; }
.atom-orbit--slower { animation-duration: 40s; }
.electron { animation: spin 6s linear infinite; transform-origin: center; }
.electron circle:last-child { filter: drop-shadow(0 0 4px currentColor); }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.wave-line { stroke-dasharray: 6 10; animation: waveFlow 3.4s linear infinite; }
@keyframes waveFlow {
  to { stroke-dashoffset: -160; }
}

.particle { animation: particleDrift 8s ease-in-out infinite; }
.particle:nth-child(odd) { animation-duration: 11s; animation-direction: reverse; }
@keyframes particleDrift {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(14px, -18px); opacity: 1; }
}

/* Section intro / anchors used across science-themed sections */
.section-anchor { position: relative; }

/* ==========================================================================
   Discipline pills (Physique / Chimie tags)
   ========================================================================== */

.discipline-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.discipline-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1rem; border-radius: 999px; font-size: 0.86rem; font-weight: 600;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-soft);
}
.discipline-pill svg { width: 16px; height: 16px; }
.discipline-pill--physics { color: var(--primary-dark); }
.discipline-pill--physics svg { color: var(--primary); }
.discipline-pill--chemistry { color: #6a3fd6; }
.discipline-pill--chemistry svg { color: var(--accent-violet); }

/* ==========================================================================
   Professor showcase (home hero add-on)
   ========================================================================== */

.professor-strip {
  display: flex; align-items: center; gap: 1rem; margin-top: 2.2rem;
  padding: 0.9rem 1.2rem 0.9rem 0.9rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); max-width: fit-content;
}
.professor-strip img {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary-light);
}
.professor-strip strong { display: block; font-size: 0.92rem; }
.professor-strip span { display: block; font-size: 0.8rem; color: var(--muted); }

/* ==========================================================================
   Publications
   ========================================================================== */

.publications-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.publication-card {
  padding: 1.8rem; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  display: flex; flex-direction: column; gap: 0.9rem;
}
.publication-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.publication-type {
  display: inline-flex; align-items: center; gap: 0.4rem; align-self: flex-start;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-violet); background: rgba(124, 110, 242, 0.1); padding: 0.4rem 0.7rem; border-radius: 999px;
}
.publication-card h3 { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.4; }
.publication-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.84rem; color: var(--muted); }
.publication-meta span:not(:last-child)::after { content: "·"; margin-left: 0.5rem; color: var(--muted-soft); }

/* ==========================================================================
   About page - Portfolio du fondateur
   ========================================================================== */

.founder-hero {
  position: relative; padding: 7rem 0 5rem; overflow: hidden;
  background: var(--gradient-midnight);
}
.founder-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; align-items: center; }

.founder-portrait { position: relative; }
.founder-portrait-frame {
  position: relative; border-radius: var(--radius-xl); padding: 0.9rem;
  background: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.founder-portrait-frame::before {
  content: ""; position: absolute; inset: -40px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,107,255,0.35), rgba(124,110,242,0.12) 55%, transparent 72%);
  filter: blur(10px);
  animation: haloPulse 5s ease-in-out infinite;
}
.founder-portrait img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: calc(var(--radius-xl) - 0.5rem);
  display: block; transition: transform 0.6s var(--ease);
}
.founder-portrait-frame:hover img { transform: scale(1.03); }

@keyframes haloPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.founder-badge {
  position: absolute; bottom: -1.2rem; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1.3rem; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-lg);
  font-size: 0.86rem; font-weight: 700; color: var(--text); white-space: nowrap;
}
.founder-badge svg { width: 18px; height: 18px; color: var(--primary); }

.founder-copy .eyebrow { background: rgba(255,255,255,0.1); color: #9fc2ff; }
.founder-copy h1 {
  font-size: clamp(2.3rem, 4vw, 3.4rem); color: #fff; font-weight: 800; line-height: 1.12; margin: 0 0 1.1rem;
}
.founder-copy .role-line { font-size: 1.05rem; color: #a9b6dd; margin: 0 0 1.6rem; max-width: 560px; }
.founder-copy .role-line strong { color: #fff; }

.founder-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.9rem; margin-top: 1.8rem; }
.founder-meta-item {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.9rem 1rem; border-radius: 1rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
}
.founder-meta-item svg { width: 18px; height: 18px; color: #9fc2ff; flex-shrink: 0; margin-top: 0.1rem; }
.founder-meta-item span { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.45); margin-bottom: 0.15rem; }
.founder-meta-item strong, .founder-meta-item a { display: block; font-size: 0.9rem; color: #fff; font-weight: 600; text-decoration: none; word-break: break-word; }
.founder-meta-item a:hover { color: #9fc2ff; }

/* Bio / mission section */
.bio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.bio-grid h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 800; margin: 0 0 1.2rem; }
.bio-grid p { font-size: 1.02rem; color: var(--text-soft); margin: 0 0 1.1rem; }
.bio-highlight {
  padding: 1.6rem; border-radius: var(--radius-lg); background: var(--bg-soft);
  border: 1px solid var(--border); font-size: 1.05rem; color: var(--text); font-weight: 500;
  border-left: 3px solid var(--primary);
}

/* Academic timeline */
.academic-timeline { position: relative; max-width: 780px; margin: 0 auto; }
.academic-timeline::before {
  content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(var(--border-strong), var(--border-strong));
}
.academic-item { position: relative; display: flex; gap: 1.6rem; padding: 1.5rem 0; }
.academic-dot {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--gradient-science); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); position: relative; z-index: 1;
}
.academic-dot svg { width: 24px; height: 24px; }
.academic-content { padding-top: 0.4rem; }
.academic-content span { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.3rem; }
.academic-content strong { display: block; font-size: 1.08rem; margin-bottom: 0.3rem; }
.academic-content p { margin: 0; font-size: 0.94rem; color: var(--muted); }

/* Values / expertise cards on About */
.expertise-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.expertise-card {
  padding: 2rem 1.6rem; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); text-align: center;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.expertise-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.expertise-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 1.2rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-soft); color: var(--primary);
}
.expertise-icon svg { width: 26px; height: 26px; }
.expertise-card h3 { margin: 0 0 0.5rem; font-size: 1.02rem; font-weight: 700; }
.expertise-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* Contact CTA on About page */
.founder-contact-card {
  border-radius: var(--radius-xl); background: var(--gradient-midnight);
  padding: 3.2rem 2.6rem; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center;
  position: relative; overflow: hidden;
}
.founder-contact-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 90% at 15% 15%, rgba(124,110,242,0.3), transparent 60%);
}
.founder-contact-card > * { position: relative; z-index: 1; }
.founder-contact-card h2 { color: #fff; font-size: clamp(1.5rem, 2.2vw, 2rem); margin: 0 0 0.8rem; font-weight: 800; }
.founder-contact-card p { color: rgba(255,255,255,0.65); margin: 0; }
.founder-contact-list { display: flex; flex-direction: column; gap: 0.8rem; }
.founder-contact-list a {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1.1rem; border-radius: 1rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; text-decoration: none; font-size: 0.92rem; font-weight: 600;
  transition: background 0.25s ease, transform 0.25s ease;
}
.founder-contact-list a:hover { background: rgba(255,255,255,0.12); transform: translateX(4px); }
.founder-contact-list a svg { width: 18px; height: 18px; color: #9fc2ff; flex-shrink: 0; }

/* Contact page - message form */
.contact-form { display: flex; flex-direction: column; gap: 0.9rem; }
.contact-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 0.95rem 1.1rem; border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.08);
  color: #fff; font-family: inherit; font-size: 0.95rem; outline: none; resize: vertical;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,0.5); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary-light); background: rgba(255,255,255,0.12); }
.contact-form button { align-self: flex-start; }

/* ==========================================================================
   Médiathèque pédagogique
   ========================================================================== */

.media-hero {
  position: relative; padding: 7rem 0 3rem; overflow: hidden;
  background:
    radial-gradient(55% 55% at 85% 6%, rgba(47, 107, 255, 0.09), transparent 60%),
    radial-gradient(45% 45% at 6% 95%, rgba(20, 184, 166, 0.09), transparent 60%),
    var(--bg);
}

/* YouTube channel embed - real, live content pulled directly from YouTube */
.media-youtube-embed {
  position: relative; width: 100%; max-width: 920px; margin: 0 auto;
  aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden;
  background: #000; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.media-youtube-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}
.media-youtube-actions { display: flex; justify-content: center; margin-top: 2rem; }

/* Google Maps embed - contact page location */
.map-embed {
  position: relative; width: 100%; max-width: 1150px; height: 350px; margin: 0 auto;
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Google Maps embed - footer, compact */
.footer-map {
  margin-top: 1rem; border-radius: 0.7rem; overflow: hidden; border: 1px solid var(--border);
}
.footer-map iframe { display: block; width: 100%; height: 150px; border: 0; }

/* ==========================================================================
   Explorateur de fichiers - filesystem-driven document explorer
   ========================================================================== */

.explorer-empty {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 4rem 1.5rem; text-align: center; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface);
}
.explorer-empty svg { width: 48px; height: 48px; color: var(--muted-soft); }
.explorer-empty h3 { margin: 0; font-size: 1.1rem; color: var(--text); }
.explorer-empty p { margin: 0; font-size: 0.94rem; }

.explorer-layout {
  display: grid; grid-template-columns: 360px 1fr; gap: 1.5rem; align-items: start;
}

.explorer-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
  max-height: 640px;
}

.explorer-toolbar {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.explorer-toolbar svg { width: 17px; height: 17px; color: var(--muted-soft); flex-shrink: 0; }
.explorer-toolbar input {
  flex: 1; border: none; outline: none; background: transparent; font-family: inherit;
  font-size: 0.9rem; color: var(--text);
}
.explorer-toolbar input::placeholder { color: var(--muted-soft); }

.explorer-tree {
  overflow-y: auto; padding: 0.6rem; flex: 1;
  scroll-margin-top: 90px;
}
.explorer-node--folder { scroll-margin-top: 90px; }

.explorer-node--folder > .explorer-children {
  display: none;
}
.explorer-node--folder.is-open > .explorer-children {
  display: block;
}
.explorer-node--folder.is-hidden,
.explorer-node--file.is-hidden {
  display: none;
}

.explorer-row {
  display: flex; align-items: center; gap: 0.55rem; width: 100%;
  padding: 0.55rem 0.6rem; border: none; background: transparent; border-radius: 0.6rem;
  cursor: pointer; font-family: inherit; font-size: 0.88rem; color: var(--text-soft);
  text-align: left; transition: background 0.2s ease, color 0.2s ease;
}
.explorer-row:hover { background: var(--bg-soft); color: var(--text); }
.explorer-row:disabled { cursor: default; }
.explorer-row:disabled:hover { background: transparent; }
.explorer-file.is-active { background: rgba(47, 107, 255, 0.08); color: var(--primary-dark); font-weight: 600; }
.explorer-node--folder.is-highlighted > .explorer-row { animation: explorer-highlight-pulse 2.2s ease; }
@keyframes explorer-highlight-pulse {
  0%, 100% { background: transparent; }
  15%, 60% { background: rgba(47, 107, 255, 0.14); }
}

.explorer-node[data-depth] .explorer-row { padding-left: calc(0.6rem + (var(--depth, 0) * 1.1rem)); }
.explorer-node--folder[data-depth="1"] > .explorer-row,
.explorer-node--file[data-depth="1"] > .explorer-row { padding-left: 1.7rem; }
.explorer-node--folder[data-depth="2"] > .explorer-row,
.explorer-node--file[data-depth="2"] > .explorer-row { padding-left: 2.8rem; }
.explorer-node--folder[data-depth="3"] > .explorer-row,
.explorer-node--file[data-depth="3"] > .explorer-row { padding-left: 3.9rem; }
.explorer-node--folder[data-depth="4"] > .explorer-row,
.explorer-node--file[data-depth="4"] > .explorer-row { padding-left: 5rem; }
.explorer-node--folder[data-depth="5"] > .explorer-row,
.explorer-node--file[data-depth="5"] > .explorer-row { padding-left: 6.1rem; }

.explorer-chevron {
  width: 16px; height: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted-soft); transition: transform 0.2s ease;
}
.explorer-chevron svg { width: 13px; height: 13px; }
.explorer-node--folder.is-open > .explorer-row .explorer-chevron { transform: rotate(90deg); }

.explorer-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted-soft); }
.explorer-node--folder > .explorer-row .explorer-icon { color: var(--primary); }
.explorer-icon--pdf { color: #ee5253; }
.explorer-icon--word { color: var(--primary); }
.explorer-icon--powerpoint { color: #f6820c; }
.explorer-icon--excel { color: #26ae60; }
.explorer-icon--image { color: var(--accent); }
.explorer-icon--archive { color: var(--accent-violet); }
.explorer-icon--unknown { color: var(--muted-soft); }

.explorer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer-file-type {
  flex-shrink: 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--muted-soft); background: var(--bg-soft); padding: 0.15rem 0.4rem; border-radius: 0.4rem;
}

/* Preview panel */
.explorer-preview {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); min-height: 640px; display: flex; flex-direction: column;
}
.explorer-preview-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; color: var(--muted-soft); text-align: center; padding: 2rem;
}
.explorer-preview-empty svg { width: 44px; height: 44px; }
.explorer-preview-empty p { margin: 0; font-size: 0.92rem; max-width: 280px; }

.explorer-preview-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.explorer-preview-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border);
}
.explorer-preview-header h3 { margin: 0 0 0.25rem; font-size: 1.02rem; font-weight: 700; word-break: break-word; }
.explorer-preview-header span { font-size: 0.82rem; color: var(--muted); }
.explorer-preview-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
.explorer-preview-actions .btn { padding: 0.6rem 1rem; font-size: 0.85rem; }

.explorer-preview-body {
  flex: 1; min-height: 480px; display: flex; align-items: center; justify-content: center;
  padding: 1.2rem; background: var(--bg-soft);
}
.explorer-preview-body iframe {
  width: 100%; height: 100%; min-height: 460px; border: none; border-radius: 0.8rem; background: #fff;
}
.explorer-preview-body img { max-width: 100%; max-height: 100%; border-radius: 0.8rem; box-shadow: var(--shadow-md); }

.explorer-file-card {
  display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center;
  padding: 2.5rem; color: var(--muted);
}
.explorer-file-card .explorer-icon { width: 56px; height: 56px; }
.explorer-file-card strong { color: var(--text); font-size: 1rem; }

/* ==========================================================================
   Reveal / scroll animations
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-22px) translateX(10px); }
}

@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; width: 100%; }
  .hero-visual { order: -1; max-width: 460px; margin: 0 auto; }
  .conferences-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .founder-hero-grid { grid-template-columns: 1fr; }
  .founder-portrait { max-width: 360px; margin: 0 auto; }
  .bio-grid { grid-template-columns: 1fr; gap: 2rem; }
  .founder-contact-card { grid-template-columns: 1fr; }
  #formulaire .newsletter-card { grid-template-columns: 1fr; gap: 1.6rem; }
  .media-layout { grid-template-columns: 1fr; }
  .media-filters { position: static; flex-direction: row; flex-wrap: wrap; gap: 1.4rem; }
  .explorer-layout { grid-template-columns: 1fr; }
  .explorer-panel { max-height: 420px; }
  .explorer-preview { min-height: 420px; }
  .explorer-preview-body { min-height: 320px; }
}

@media (max-width: 860px) {
  .site-nav {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem; box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.35s var(--ease), opacity 0.3s ease;
  }
  .site-nav.is-open { max-height: 640px; opacity: 1; padding: 1rem 1.5rem 1.4rem; }
  .site-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--border); }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a::after { display: none; }
  .nav-toggle { display: inline-flex; }

  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--border); }
  .nav-item--dropdown::after { display: none; }
  .nav-item .nav-dropdown-toggle { margin-left: auto; width: 32px; height: 32px; }
  .nav-item .nav-dropdown-toggle svg { width: 14px; height: 14px; }
  .nav-item > a { border-bottom: none; flex: 1; }
  .nav-submenu {
    position: static; width: 100%; opacity: 1; visibility: visible; transform: none; pointer-events: auto;
    box-shadow: none; border: none; padding: 0 0 0.6rem 1rem; display: none;
  }
  .nav-item--dropdown.is-open .nav-submenu { display: flex; }
  .nav-submenu a { padding: 0.6rem 0.5rem !important; }
  .feature-stack { grid-template-columns: 1fr; }
  .newsletter-card { flex-direction: column; align-items: flex-start; }
  .stats-band { padding: 2.6rem 1.6rem; }
  .section { padding: 4rem 0; }
  .founder-meta-grid { grid-template-columns: 1fr; }
  .academic-timeline::before { left: 23px; }
  .academic-dot { width: 46px; height: 46px; }
  .academic-dot svg { width: 20px; height: 20px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .media-filters { flex-direction: column; }
  .explorer-preview-header { flex-direction: column; align-items: stretch; }
  .explorer-preview-actions { flex-direction: column; }
  .explorer-preview-actions .btn { width: 100%; }
}

@media (max-width: 560px) {
  .nav-row { flex-wrap: wrap; }
  .hero { padding: 3.4rem 0 3rem; }
  .hero-actions, .newsletter-form, .search-panel { width: 100%; }
  .btn, .newsletter-form button, .newsletter-form input, .search-panel button, .search-panel input { width: 100%; }
  .search-panel { flex-direction: column; border-radius: 1.4rem; }
  .testimonials-grid, .footer-grid { grid-template-columns: 1fr; }
  .floating-chip { display: none; }
  .conference-intro .btn { width: 100%; }
  .newsletter-card { padding: 2.4rem 1.6rem; }
  .professor-strip { max-width: 100%; }
  .founder-hero { padding: 5.5rem 0 6rem; }
  .founder-badge { font-size: 0.76rem; padding: 0.65rem 1rem; }
  .founder-contact-card { padding: 2.2rem 1.6rem; }
  .contact-form-row { grid-template-columns: 1fr; }
  .contact-form button { width: 100%; }
  .media-grid { grid-template-columns: 1fr; }
  .media-youtube-actions .btn { width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-orb, .floating-chip, .btn, .level-card, .resource-card, .feature-card, .quote-card {
    animation: none !important; transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
