/* ============================================
   CSS RESET & VARIABLES — Thème bleu & blanc
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette bleue médicale */
  --blue:        #1565c0;
  --blue-dark:   #0d3b7a;
  --blue-mid:    #1976d2;
  --blue-light:  #42a5f5;
  --blue-pale:   #dbeeff;
  --blue-subtle: #f0f6ff;

  /* Neutres */
  --text:         #1a2535;
  --text-muted:   #4a5e75;
  --text-light:   #8aa0b8;
  --bg:           #ffffff;
  --bg-alt:       #f4f8fc;
  --bg-dark:      #0a1929;
  --border:       #ccddef;

  /* Accents */
  --gold:         #c9920a;
  --gold-light:   #f0b429;

  /* Ombres */
  --shadow-sm:    0 2px 10px rgba(21, 101, 192, 0.08);
  --shadow-md:    0 8px 28px rgba(21, 101, 192, 0.12);
  --shadow-lg:    0 20px 56px rgba(21, 101, 192, 0.18);

  --radius:       12px;
  --radius-lg:    20px;
  --transition:   0.3s ease;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--blue-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ============================================
   UTILITIES
   ============================================ */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-mid);
  background: var(--blue-pale);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.section-desc {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21, 101, 192, 0.35);
}

.btn-blue {
  background: var(--blue-light);
  color: #fff;
  border-color: var(--blue-light);
}
.btn-blue:hover {
  background: var(--blue-mid);
  border-color: var(--blue-mid);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(66, 165, 245, 0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: #fff;
}

.btn-sm { padding: 9px 22px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================
   TOP BAR
   ============================================ */
#topbar {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  padding: 8px 0;
  position: relative;
  z-index: 1001;
}

.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-inner span {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar-inner i { color: var(--blue-light); }

.topbar-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blue-light);
  color: #fff;
  padding: 5px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: background var(--transition);
}
.topbar-phone:hover { background: var(--blue-mid); color: #fff; }
.topbar-phone i { color: #fff; }

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  position: fixed;
  top: 36px; /* hauteur topbar */
  left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition);
}

#navbar.scrolled {
  top: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 20px rgba(21, 101, 192,0.1);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  transition: color var(--transition);
}
#navbar.scrolled .nav-logo { color: var(--blue-dark); }

/* Hero logo */

.nav-links { display: flex; gap: 4px; }

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  padding: 6px 13px;
  border-radius: 50px;
  transition: all var(--transition);
}
.nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.18);
}
#navbar.scrolled .nav-links a { color: var(--text-muted); }
#navbar.scrolled .nav-links a:hover {
  color: var(--blue);
  background: var(--blue-subtle);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}
#navbar.scrolled .nav-toggle span { background: var(--text); }

/* ============================================
   HERO
   ============================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(140deg, #0a1929 0%, #0d3b7a 45%, #1565c0 75%, #1976d2 100%);
  overflow: hidden;
  padding-top: 120px;
  padding-bottom: 60px;
}

#hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M40 40 L80 0 L80 20 L60 40 L80 60 L80 80 L40 40 Z'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(66, 165, 245,0.2) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(21, 101, 192,0.3) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 64px;
  max-width: 1000px;
  padding: 0 24px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Photo hero */
.hero-photo-wrap {
  flex-shrink: 0;
  position: relative;
}

.hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(66, 165, 245,0.4);
  animation: pulseBorder 3s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.04); opacity: 1; }
}

.hero-photo {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 5px solid rgba(255,255,255,0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
  display: block;
}

.hero-avatar-fallback {
  display: none;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 5px solid rgba(255,255,255,0.25);
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(255,255,255,0.8);
}

.hero-text { flex: 1; min-width: 280px; }

.hero-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 10px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.hero-tagline {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}

.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.9);
  padding: 5px 13px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  backdrop-filter: blur(6px);
  transition: background var(--transition);
}
.badge:hover { background: rgba(255,255,255,0.22); }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.scroll-indicator {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-indicator span {
  display: block;
  width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 7px;
  background: rgba(255,255,255,0.65);
  border-radius: 2px;
  animation: scrollBounce 2s infinite;
}
@keyframes scrollBounce {
  0%, 100% { top: 5px; opacity: 1; }
  50% { top: 14px; opacity: 0.3; }
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
}

.about-photo-wrap { position: sticky; top: 100px; }

.about-photo-box {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  margin-bottom: 18px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.about-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.photo-fallback-content {
  display: none;
  position: absolute; inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 4.5rem;
}
.about-photo-box.no-photo img { display: none; }
.about-photo-box.no-photo .photo-fallback-content { display: flex; }
.photo-fallback-content p {
  font-size: 0.95rem;
  font-family: var(--font-serif);
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-top: 14px;
}

.about-contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.about-contact-card a {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 7px 10px;
  border-radius: 8px;
  transition: all var(--transition);
}
.about-contact-card a:hover {
  color: var(--blue);
  background: var(--blue-subtle);
}
.about-contact-card i { width: 18px; text-align: center; color: var(--blue-mid); }

.about-lead {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.8;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.stat { text-align: center; }
.stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 5px;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   CONSULTATION
   ============================================ */
.consult-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.consult-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.consult-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--blue-light);
}
.consult-card--main::before { background: var(--blue-dark); }
.consult-card--private::before { background: var(--blue-mid); }
.consult-card--teaching::before { background: var(--blue-light); }

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

.consult-icon {
  width: 68px; height: 68px;
  background: var(--blue-subtle);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.7rem;
  color: var(--blue);
  transition: all var(--transition);
}
.consult-card:hover .consult-icon {
  background: var(--blue);
  color: #fff;
  transform: scale(1.08);
}

.consult-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.consult-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.consult-details {
  text-align: left;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.consult-details li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.consult-details i {
  color: var(--blue-mid);
  width: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 19px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue-mid), var(--border));
}

.timeline-item {
  position: relative;
  padding-left: 62px;
  margin-bottom: 36px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 11px; top: 20px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue-mid);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(66, 165, 245,0.25);
  transition: transform var(--transition);
}
.timeline-item:hover .timeline-dot { transform: scale(1.3); }

.timeline-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.timeline-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
  border-color: var(--blue-light);
}

.timeline-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.timeline-date, .timeline-location {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-mid);
  display: flex;
  align-items: center;
  gap: 4px;
}
.timeline-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.timeline-card h4 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.timeline-card ul li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
}
.timeline-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue-mid);
  font-size: 0.8rem;
}

/* ============================================
   EDUCATION
   ============================================ */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}

.edu-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.edu-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-light);
  transform: translateY(-3px);
}
.edu-card--degree {
  border-left: 4px solid var(--blue);
  background: linear-gradient(to right, rgba(21, 101, 192,0.03), var(--bg));
}

.edu-icon {
  width: 46px; height: 46px; min-width: 46px;
  background: var(--blue-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 1.2rem;
}
.edu-year {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
}
.edu-card h3 { font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.edu-card p { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 6px; }
.edu-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(201,146,10,0.1);
  border: 1px solid rgba(201,146,10,0.25);
  padding: 2px 9px;
  border-radius: 100px;
}

.internships {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.internships-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.internships-title i { color: var(--blue-mid); }
.internships-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px;
}
.internship-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  transition: background var(--transition);
}
.internship-item:hover { background: var(--blue-pale); }
.internship-flag { font-size: 1.8rem; line-height: 1; }
.internship-item strong { display: block; font-size: 0.88rem; color: var(--text); margin-bottom: 2px; }
.internship-item p { font-size: 0.78rem; color: var(--text-muted); }

/* ============================================
   VIDÉOS
   ============================================ */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.video-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.video-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--blue-light);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='20' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E") repeat;
}

.play-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
  z-index: 1;
}
.video-card:hover .play-btn {
  background: var(--blue);
  border-color: var(--blue);
  transform: scale(1.1);
}

.video-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(4px);
}

.video-info { padding: 16px 18px; }
.video-info h4 { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.video-info p { font-size: 0.78rem; color: var(--text-light); }

.videos-note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--blue-subtle);
  border: 1px solid var(--blue-pale);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.videos-note i { color: var(--blue-mid); }

/* ============================================
   PUBLICATIONS
   ============================================ */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.pub-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.pub-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.pub-card--featured {
  grid-column: 1 / -1;
  border-left: 4px solid var(--blue);
  background: linear-gradient(to right, rgba(21, 101, 192,0.04), var(--bg));
}
.pub-card--award {
  border-left: 4px solid var(--gold);
  background: linear-gradient(to right, rgba(201,146,10,0.04), var(--bg));
}

.pub-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-mid);
  background: var(--blue-pale);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.pub-tag--international { color: var(--blue-dark); background: rgba(30,92,58,0.08); }
.pub-tag--award { color: var(--gold); background: rgba(201,146,10,0.1); }

.pub-card h3 { font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.5; }
.pub-authors { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin-bottom: 5px; }
.pub-journal { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.pub-journal i { color: var(--blue-mid); }

.conferences-title, .memberships-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 22px;
}

.conf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-bottom: 56px;
}

.conf-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.conf-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.conf-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.conf-flag { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.conf-header h4 { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.conf-header span { font-size: 0.78rem; color: var(--blue-mid); font-weight: 600; }
.conf-card ul li {
  font-size: 0.83rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
}
.conf-card ul li::before { content: '•'; position: absolute; left: 4px; color: var(--blue-mid); }

/* ============================================
   SKILLS
   ============================================ */
.skills-block { margin-top: 0; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.skill-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--blue-light);
}

.skill-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 8px 20px rgba(21, 101, 192,0.3);
  transition: transform var(--transition);
}
.skill-card:hover .skill-icon { transform: scale(1.1) rotate(-3deg); }
.skill-card h3 { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.skill-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }

.memberships {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.membership-list { display: flex; flex-direction: column; gap: 10px; }
.membership-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  background: var(--bg-alt);
  border-radius: 8px;
  transition: background var(--transition);
}
.membership-item:hover { background: var(--blue-pale); }
.membership-item i { color: var(--blue); font-size: 0.95rem; flex-shrink: 0; margin-top: 2px; }
.membership-item span { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.contact-cta { margin-bottom: 24px; }

.contact-phone-big {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  color: #fff;
  padding: 20px 28px;
  border-radius: var(--radius);
  transition: all var(--transition);
  box-shadow: 0 8px 28px rgba(21, 101, 192,0.3);
}
.contact-phone-big:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(21, 101, 192,0.4);
}
.contact-phone-big i { font-size: 1.8rem; flex-shrink: 0; }
.contact-phone-big span { font-size: 0.78rem; font-weight: 500; opacity: 0.8; display: block; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.08em; }
.contact-phone-big strong { font-size: 1.4rem; font-weight: 700; font-family: var(--font-serif); }

.contact-info { display: flex; flex-direction: column; gap: 18px; }

.contact-item { display: flex; gap: 16px; align-items: flex-start; }

.contact-icon {
  width: 46px; height: 46px; min-width: 46px;
  background: var(--blue-subtle);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  font-size: 1rem;
  transition: all var(--transition);
}
.contact-item:hover .contact-icon { background: var(--blue); color: #fff; transform: scale(1.08); }
.contact-item h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.contact-item p, .contact-item a { font-size: 0.88rem; color: var(--text); line-height: 1.6; }
.contact-item a:hover { color: var(--blue); }

.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 101, 192,0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-light); }

/* ============================================
   FOOTER
   ============================================ */
#footer { background: var(--bg-dark); color: rgba(255,255,255,0.65); }

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 60px 0 44px;
}

.footer-brand h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 6px;
}
.footer-brand p { font-size: 0.875rem; line-height: 1.8; margin-bottom: 4px; }

.footer-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  background: var(--blue);
  color: #fff;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background var(--transition);
}
.footer-phone:hover { background: var(--blue-mid); color: #fff; }

.footer-links h4, .footer-social h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 14px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 7px; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.55); transition: color var(--transition); }
.footer-links a:hover { color: var(--blue-light); }

.social-icons { display: flex; gap: 10px; }
.social-icons a {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
  transition: all var(--transition);
}
.social-icons a:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 22px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 260px 1fr; gap: 36px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }

  #topbar { display: none; }
  #navbar { top: 0; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 14px;
    box-shadow: var(--shadow-md);
    gap: 2px;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--text-muted) !important; padding: 10px 16px; }
  .nav-toggle { display: flex; }

  .hero-content { flex-direction: column; text-align: center; gap: 32px; }
  .hero-badges { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-photo { width: 180px; height: 180px; }
  .hero-avatar-fallback { width: 180px; height: 180px; }

  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-photo-wrap { position: static; max-width: 260px; margin: 0 auto; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }

  .pub-card--featured { grid-column: 1; }

  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-actions { flex-direction: column; align-items: center; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .contact-form { padding: 22px; }
  .internships { padding: 22px; }
  .memberships { padding: 22px; }
  .contact-phone-big strong { font-size: 1.1rem; }
}

/* ============================================
   GALERIE — Grille + Lightbox
   ============================================ */

/* Filtres */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.gf-btn {
  padding: 8px 22px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.gf-btn:hover,
.gf-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Grille */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Item */
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--blue-pale);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* Placeholder quand la photo n'existe pas encore */
.gallery-item.no-img::before {
  content: '\f03e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--blue-light);
  opacity: 0.4;
  pointer-events: none;
}

/* Overlay au survol */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,59,122,0.85) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity var(--transition);
  color: #fff;
  text-align: center;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay i {
  font-size: 1.4rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.gallery-overlay span {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* Items masqués par le filtre */
.gallery-item.hidden {
  display: none;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 41, 0.96);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lb-content {
  max-width: min(90vw, 900px);
  width: 100%;
  text-align: center;
}
#lbImg {
  max-height: 75vh;
  width: auto;
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: block;
  margin: 0 auto;
}
.lb-caption {
  color: rgba(255,255,255,0.85);
  margin-top: 14px;
  font-size: 0.95rem;
  font-style: italic;
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background var(--transition);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,0.25);
}
.lb-close { top: 20px; right: 20px; }
.lb-prev  { left:  20px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }

/* Responsive galerie */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
@media (max-width: 540px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { display: none; }
}

/* ============================================
   SÉLECTEUR DE LANGUE
   ============================================ */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
  flex-shrink: 0;
}
.lang-btn {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.75);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.5px;
}
.lang-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.lang-btn.active {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border-color: rgba(255,255,255,0.8);
}
#navbar.scrolled .lang-btn {
  border-color: rgba(21,101,192,0.35);
  color: var(--text-muted);
}
#navbar.scrolled .lang-btn:hover,
#navbar.scrolled .lang-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ============================================
   SUPPORT ARABE — RTL
   ============================================ */
html[lang="ar"] {
  direction: rtl;
  font-family: 'Cairo', 'Noto Sans Arabic', var(--font-sans);
}
html[lang="ar"] body { font-family: 'Cairo', 'Noto Sans Arabic', var(--font-sans); }
html[lang="ar"] .nav-container { flex-direction: row-reverse; }
html[lang="ar"] .lang-switcher { margin-left: 0; margin-right: 16px; }
html[lang="ar"] .hero-content { flex-direction: row-reverse; }
html[lang="ar"] .hero-text { text-align: right; }
html[lang="ar"] .hero-badges { justify-content: flex-end; }
html[lang="ar"] .hero-actions { justify-content: flex-end; }
html[lang="ar"] .about-grid { direction: rtl; }
html[lang="ar"] .about-text { text-align: right; }
html[lang="ar"] .about-stats { justify-content: flex-end; }
html[lang="ar"] .section-header { text-align: center; }
html[lang="ar"] .timeline::before { right: auto; left: unset; right: 18px; }
html[lang="ar"] .timeline-item { flex-direction: row-reverse; }
html[lang="ar"] .timeline-card { text-align: right; }
html[lang="ar"] .timeline-meta { flex-direction: row-reverse; justify-content: flex-end; gap: 20px; }
html[lang="ar"] .footer-top { direction: rtl; }
html[lang="ar"] .footer-brand { text-align: right; }
html[lang="ar"] .contact-info { text-align: right; }
html[lang="ar"] .contact-item { flex-direction: row-reverse; }
html[lang="ar"] .contact-item > div { text-align: right; }
html[lang="ar"] .consult-card { text-align: right; }
html[lang="ar"] .consult-details li { flex-direction: row-reverse; justify-content: flex-end; }
html[lang="ar"] .pub-card { text-align: right; }
html[lang="ar"] .pub-tag { direction: rtl; }
html[lang="ar"] .skill-card { text-align: right; }
html[lang="ar"] .membership-item { flex-direction: row-reverse; justify-content: flex-end; }
html[lang="ar"] .edu-card { flex-direction: row-reverse; }
html[lang="ar"] .edu-body { text-align: right; }
html[lang="ar"] .internship-item { flex-direction: row-reverse; text-align: right; }
html[lang="ar"] .gallery-filters { direction: rtl; }
html[lang="ar"] .form-group label { text-align: right; display: block; }
html[lang="ar"] .form-group input,
html[lang="ar"] .form-group textarea { text-align: right; direction: rtl; }
html[lang="ar"] .nav-links { flex-direction: row-reverse; }
html[lang="ar"] .footer-links ul { text-align: right; }
html[lang="ar"] .topbar-inner { flex-direction: row-reverse; }

@media (max-width: 768px) {
  .lang-switcher { margin-left: 8px; }
  html[lang="ar"] .lang-switcher { margin-left: 0; margin-right: 8px; }
}
