/* ============================================================
   SITE ACADÉMIQUE — STYLE PRINCIPAL
   ============================================================ */

/* ========================
   Variables & Base
   ======================== */
:root {
  --primary:        #1B3F6E;
  --primary-light:  #2A6496;
  --accent:         #4A90C4;
  --accent-light:   #EBF4FB;
  --bg:             #F8F9FB;
  --white:          #FFFFFF;
  --text:           #1F2937;
  --text-sec:       #6B7280;
  --border:         #E2E8F0;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:      0 10px 40px rgba(27,63,110,0.18);
  --radius:         12px;
  --radius-sm:      8px;
  --ease:           0.3s ease;
  --font-h:         'Playfair Display', Georgia, serif;
  --font-b:         'Source Sans 3', system-ui, -apple-system, sans-serif;
  --nav-h:          72px;
  --max-w:          1200px;
}

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

html { font-size: 16px; overflow-y: scroll; overflow-x: hidden; }

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

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ========================
   Navbar
   ======================== */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), box-shadow var(--ease);
}

/* Blur isolé sur un pseudo-élément : le logo reste hors du compositing layer */
.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 64px;
  width: auto;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.nav-menu {
  display: flex;
  gap: 44px;
}
.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-sec);
  transition: color var(--ease);
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}
.nav-link:hover,
.nav-link.active { color: var(--primary); }
.nav-link.active::after,
.nav-link:hover::after { transform: scaleX(1); }

/* ========================
   Dropdown Nav
   ======================== */
.nav-dropdown { position: relative; }

/* Pont invisible qui comble l'espace entre le lien et le menu */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px; /* même valeur que le gap top du dropdown-menu */
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.dropdown-arrow {
  transition: transform var(--ease);
  flex-shrink: 0;
}
.nav-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease), transform var(--ease), visibility 0s linear 0.3s;
  z-index: 200;
  overflow: hidden;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity var(--ease), transform var(--ease), visibility 0s;
}
.dropdown-item {
  display: block;
  padding: 11px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-sec);
  transition: background var(--ease), color var(--ease);
  border-left: 3px solid transparent;
}
.dropdown-item:hover { color: var(--primary); background: var(--accent-light); }
.dropdown-item.active {
  color: var(--primary);
  background: var(--accent-light);
  border-left-color: var(--primary);
  font-weight: 600;
}
.dropdown-item + .dropdown-item { border-top: 1px solid var(--border); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================
   Buttons
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-b);
  cursor: pointer;
  transition: all var(--ease);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27,63,110,0.3);
}
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-download {
  background: #1e7e34;
  color: var(--white);
  border-color: #1e7e34;
}
.btn-download:hover {
  background: #155724;
  border-color: #155724;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,126,52,0.35);
}

/* ========================
   Animations
   ======================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scaleY(0.6); opacity: 0.4; }
  50%       { transform: scaleY(1);   opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.32s; }

/* ========================
   Hero (index.html)
   ======================== */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  background:
    radial-gradient(ellipse 60% 55% at 78% 20%, rgba(74,144,196,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 50% 45% at 10% 85%, rgba(27,63,110,0.07) 0%, transparent 65%),
    linear-gradient(145deg, #EDF4FC 0%, #E4EFF9 55%, #D9E8F3 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: none;
}
.hero-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 28px 80px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 72px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Photo */
.hero-photo-col { position: relative; }

.photo-frame {
  width: 290px;
  height: 330px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(145deg, #B8D0E8, #8FB5D5);
  box-shadow: var(--shadow-lg),
              0 0 0 5px rgba(255,255,255,0.95),
              0 0 0 10px rgba(74,144,196,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.photo-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  width: 100%;
  height: 100%;
}
.photo-initials {
  font-family: var(--font-h);
  font-size: 3.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.05em;
}
.photo-hint {
  font-size: 0.825rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
.photo-hint strong { color: rgba(255,255,255,0.95); }

.photo-badge {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 20px;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: var(--shadow-md), 0 0 0 2px rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
}

/* Hero content */
.hero-content { padding-right: 20px; }

.hero-name-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0;
}

.hero-eyebrow {
  display: block;
  width: fit-content;
  margin: 0 0 18px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74,144,196,0.10);
  border: 1px solid rgba(74,144,196,0.24);
  border-radius: 100px;
  padding: 5px 18px;
  opacity: 0;
  animation: fadeInUp 0.7s ease 0.2s forwards;
}
.hero-name {
  font-family: var(--font-h);
  font-size: clamp(2.4rem, 3.8vw, 3.8rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 0.7s ease 0.35s forwards;
}
.hero-university {
  font-size: 1.05rem;
  color: var(--text-sec);
  margin-bottom: 4px;
  line-height: 1.5;
  opacity: 0;
  animation: fadeInUp 0.7s ease 0.5s forwards;
}
.hero-university span {
  font-size: 0.9375rem;
  color: var(--primary-light);
  font-weight: 600;
}
.hero-divider {
  width: 56px;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 2px;
  margin: 28px 0;
  opacity: 0;
  animation: fadeInUp 0.7s ease 0.65s forwards;
}
.hero-bio {
  font-size: 1.0625rem;
  color: var(--text-sec);
  line-height: 1.85;
  margin-bottom: 36px;
  max-width: 520px;
  opacity: 0;
  animation: fadeInUp 0.7s ease 0.78s forwards;
}
.hero-bio em {
  color: var(--primary-light);
  font-style: italic;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.7s ease 0.92s forwards;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-sec);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1s ease 1.6s forwards;
}
.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: pulse 2s ease-in-out infinite;
}

/* ========================
   Shared Section Styles
   ======================== */
.section { padding: 96px 0; }
.section-alt { background: var(--white); }

.section-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74,144,196,0.10);
  border: 1px solid rgba(74,144,196,0.24);
  border-radius: 100px;
  padding: 5px 18px;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 2px;
  margin-top: 14px;
}
.section-header { margin-bottom: 56px; }

/* ========================
   Biography Section
   ======================== */

.biography {
  background: var(--white);
  padding: 72px 0 64px;
}

.biography .container {
  max-width: 1100px;
}

.biography .section-header {
  margin-bottom: 40px;
}

.bio-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 52px;
  align-items: start;
}

.bio-left {
  display: flex;
  flex-direction: column;
}

.bio-text {
  display: flex;
  flex-direction: column;
}
.bio-text p {
  font-size: 1.0625rem;
  color: var(--text);
  line-height: 1.88;
  margin-bottom: 22px;
}
.bio-text p:last-child { margin-bottom: 0; }
.bio-text em { font-style: italic; color: var(--primary-light); }

.bio-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: start;
}

.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--ease), transform var(--ease);
}
.detail-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.detail-card h3 {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.detail-card ul {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.detail-card li {
  font-size: 0.9375rem;
  color: var(--text-sec);
  padding-left: 18px;
  position: relative;
  line-height: 1.4;
}
.detail-card li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.45em;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

/* ========================
   Contact Section
   ======================== */
.contact-section { background: var(--bg); }

.contact-grid {
  display: grid;
  gap: 24px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  padding: 44px 32px;
  text-align: center;
  min-height: 230px;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.contact-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-top-color: var(--accent);
}
.contact-card h3 {
  font-family: var(--font-h);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}
.contact-card a {
  color: var(--accent);
  font-size: 0.9375rem;
  word-break: break-all;
  transition: color var(--ease);
  line-height: 1.5;
}
.contact-card a:hover { color: var(--primary); }
.contact-card p {
  font-size: 0.9375rem;
  color: var(--text-sec);
  line-height: 1.7;
}

/* ========================
   LinkedIn Button (hero)
   ======================== */
.hero-name-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.linkedin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: #0A66C2;
  color: white;
  border-radius: 10px;
  flex-shrink: 0;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
/* Animation uniquement dans le hero */
.hero-content .linkedin-btn {
  opacity: 0;
  animation: fadeInUp 0.7s ease 0.5s forwards;
}
/* Icône LinkedIn dans la carte contact */
.contact-linkedin-icon {
  margin: 0 auto 20px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.linkedin-btn:hover {
  background: #004182;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(10,102,194,0.45);
}
.linkedin-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* LinkedIn card (contact section) */
.linkedin-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0A66C2;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: color var(--ease), transform var(--ease);
}
.linkedin-contact-link:hover {
  color: #004182;
  transform: translateY(-1px);
}
.linkedin-contact-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* 2-column contact grid */
.contact-grid-duo {
  grid-template-columns: repeat(2, 1fr);
  max-width: 720px;
  margin: 0 auto;
  align-items: stretch;
}
/* LinkedIn contact : identique au hero — couleur blanche au repos et au hover */
.contact-card .linkedin-btn,
.contact-card .linkedin-btn:hover {
  color: white;
}
/* Email icon : stroke uniquement, pas de fill */
.contact-email-icon svg {
  fill: none;
  width: 22px;
  height: 22px;
}

/* ========================
   Page Header (inner pages)
   ======================== */
.page-header {
  padding: 120px 0 84px;
  background: linear-gradient(145deg, #F2F7FD 0%, #E8F1FA 55%, #EDF4FB 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 540px; height: 540px;
  background: radial-gradient(circle, rgba(74,144,196,0.13) 0%, transparent 65%);
  pointer-events: none;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 440px; height: 440px;
  background: radial-gradient(circle, rgba(27,63,110,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.page-header-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74,144,196,0.10);
  border: 1px solid rgba(74,144,196,0.24);
  border-radius: 100px;
  padding: 5px 18px;
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.15s forwards;
}
.page-header-title {
  font-family: var(--font-h);
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.3s forwards;
}
.page-header-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 2px;
  margin: 18px auto 22px;
}
.page-header-subtitle {
  font-size: 1.0625rem;
  color: var(--text-sec);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.45s forwards;
}

/* ========================
   Search bar (publications)
   ======================== */
.pub-search-wrapper {
  margin-top: 32px;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.6s forwards;
}
.pub-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(255,255,255,0.88);
  border: 1.5px solid rgba(74,144,196,0.22);
  border-radius: 100px;
  padding: 11px 20px;
  box-shadow: 0 4px 20px rgba(27,63,110,0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pub-search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(74,144,196,0.18);
}
.pub-search-icon {
  flex-shrink: 0;
  color: var(--text-sec);
}
.pub-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  font-family: var(--font-b);
  color: var(--text);
  outline: none;
  min-width: 0;
}
.pub-search-input::placeholder {
  color: var(--text-sec);
  opacity: 0.7;
}
.pub-search-input::-webkit-search-cancel-button { display: none; }
.pub-search-clear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border: none;
  background: rgba(107,114,128,0.12);
  border-radius: 50%;
  color: var(--text-sec);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pub-search-clear:hover {
  background: rgba(107,114,128,0.22);
  color: var(--text);
}
.pub-search-clear[hidden] { display: none; }
.pub-search-no-results {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--text-sec);
  font-style: italic;
}
.pub-search-no-results[hidden] { display: none; }
.pub-hidden { display: none !important; }
.publication-list.searching .publication-card {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* ========================
   Résultats globaux (cross-pages)
   ======================== */
.global-results-panel {
  max-width: 860px;
  margin: 1.5rem auto 2rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-md);
}
.global-results-panel[hidden] { display: none; }
.global-results-title {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.global-results-count {
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-sec);
}
.global-results-group {
  margin-bottom: 1.25rem;
}
.global-results-group:last-child { margin-bottom: 0; }
.global-results-group-header {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cat-color, var(--primary));
  text-decoration: none;
  margin-bottom: 0.5rem;
}
.global-results-group-header:hover { text-decoration: underline; }
.global-results-group-count {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-sec);
  text-transform: none;
  letter-spacing: 0;
}
.global-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.global-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.global-result-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.global-result-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}
.global-result-meta {
  font-size: 0.775rem;
  color: var(--text-sec);
}
.global-result-pdf {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  transition: background var(--ease), color var(--ease);
}
.global-result-pdf:hover {
  background: var(--primary);
  color: var(--white);
}

/* ========================
   Publications (recherches.html)
   ======================== */
.publications-section {
  padding: 80px 0 100px;
  background: var(--bg);
}
.publication-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.publication-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
  transition: box-shadow var(--ease), transform var(--ease);
  position: relative;
  overflow: hidden;
}
.publication-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity var(--ease);
}
.publication-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}
.publication-card:hover::before { opacity: 1; }

.pub-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pub-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  padding: 3px 11px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}
.pub-journal {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.pub-type {
  font-size: 0.78rem;
  color: var(--text-sec);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.pub-title {
  font-family: var(--font-h);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.4;
  margin-bottom: 14px;
}
.pub-abstract {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 10px;
}
.pub-description {
  font-size: 0.9375rem;
  color: var(--text-sec);
  line-height: 1.78;
  margin-bottom: 14px;
}
.pub-authors {
  font-size: 0.875rem;
  color: var(--text-sec);
  font-style: italic;
}
.pub-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 148px;
  padding-top: 4px;
}

/* ========================
   Books (livres.html)
   ======================== */
.books-section {
  padding: 80px 0 100px;
  background: var(--bg);
}
.books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}
.book-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--ease), transform var(--ease);
}
.book-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}
.book-cover-wrapper {
  background: linear-gradient(145deg, #DDE8F4, #C8DCEE);
  padding: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}
.book-cover-img {
  width: 168px;
  height: auto;
  border-radius: 4px 8px 8px 4px;
  box-shadow: -4px 0 0 rgba(0,0,0,0.12), -10px 8px 28px rgba(0,0,0,0.28), -18px 16px 48px rgba(0,0,0,0.08);
  transition: transform var(--ease);
}
.book-card:hover .book-cover-img {
  transform: rotate(-3deg) scale(1.04);
}
.book-info {
  padding: 28px 32px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.book-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.book-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(27,63,110,0.08);
  padding: 3px 12px;
  border-radius: 20px;
}
.book-publisher {
  font-size: 0.78rem;
  color: var(--text-sec);
  padding: 3px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
}
.book-title {
  font-family: var(--font-h);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 8px;
}
.book-subtitle {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-sec);
  margin-bottom: 18px;
}
.book-description {
  font-size: 0.9375rem;
  color: var(--text-sec);
  line-height: 1.78;
  margin-bottom: 28px;
  flex: 1;
}

/* ========================
   Footer
   ======================== */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.65);
  padding: 36px 0;
  text-align: center;
}
.footer p { font-size: 0.9rem; margin-bottom: 6px; }
.footer p:last-child { margin-bottom: 0; }
.footer-affiliation { font-size: 0.8125rem; opacity: 0.55; }
.footer-legal { font-size: 0.8125rem; margin-top: 10px; }
.footer-legal a { color: rgba(255,255,255,0.5); text-decoration: underline; text-underline-offset: 3px; transition: color var(--ease); }
.footer-legal a:hover { color: rgba(255,255,255,0.9); }

/* ========================
   Mentions légales
   ======================== */
.legal-block {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.legal-block:last-child { border-bottom: none; margin-bottom: 0; }
.legal-title {
  font-family: var(--font-h);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}
.legal-content p {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 12px;
}
.legal-content p:last-child { margin-bottom: 0; }
.legal-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-content a:hover { color: var(--primary); }
.legal-date { font-size: 0.875rem; color: var(--text-sec); font-style: italic; margin-top: 16px; }

/* ========================
   Responsive — Tablet
   ======================== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 270px 1fr;
    gap: 52px;
  }
  .photo-frame { width: 250px; height: 295px; }
  .bio-grid {
    grid-template-columns: 1fr 300px;
    gap: 44px;
  }
  .contact-grid { gap: 16px; }
}

/* ========================
   Responsive — Mobile
   ======================== */
@media (max-width: 768px) {
  :root { --nav-h: 62px; }

  /* ── Navbar ── */
  .nav-logo-img { height: 38px; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform var(--ease), opacity var(--ease);
    pointer-events: none;
  }
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link {
    display: block;
    padding: 14px 28px;
    font-size: 1.05rem;
  }
  .nav-link::after { display: none; }

  /* ── Dropdown mobile ── */
  .nav-dropdown-toggle { justify-content: space-between; }
  /* Neutralise le :hover desktop (déclenché par le tap sur mobile) */
  .nav-dropdown:hover .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: none;
    transition: none;
    max-height: 0;
  }
  .dropdown-menu {
    position: static;
    transform: none !important;
    box-shadow: none;
    border: none;
    border-radius: 0;
    border-left: 3px solid var(--border);
    margin: 0 0 0 28px;
    min-width: auto;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
  }
  .nav-dropdown.open .dropdown-menu {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: none !important;
    transition: max-height 0.35s ease, opacity 0.35s ease;
  }
  .nav-dropdown.open .dropdown-arrow { transform: rotate(180deg); }
  .dropdown-item { padding: 10px 20px; border-left: none; border-top: 1px solid var(--border); }
  .dropdown-item:first-child { border-top: none; }

  /* ── Hero ── */
  .hero-eyebrow { display: none; }
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
    padding: 48px 24px 64px;
  }
  .hero-photo-col { display: flex; flex-direction: column; align-items: center; }
  .photo-frame { width: 200px; height: 236px; }
  .photo-badge { bottom: -12px; }
  .hero-content { padding-right: 0; text-align: center; }
  .hero-name-block { align-items: center; }
  .hero-name-row { justify-content: center; }
  .hero-university { text-align: center; }
  .hero-divider { margin: 20px auto; }
  .hero-bio { max-width: 100%; text-align: center; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-scroll { display: none; }

  /* ── Sections ── */
  .section { padding: 56px 0; }
  .section-header { margin-bottom: 36px; text-align: center; }
  .section-title::after { margin-left: auto; margin-right: auto; }

  /* ── Biographie ── */
  .bio-grid { grid-template-columns: 1fr; gap: 32px; }
  .bio-cards { align-self: auto; }
  .biography .section-header { text-align: center; }
  .bio-text { text-align: center; }
  .bio-text p { text-align: center; }

  /* ── Contact ── */
  .contact-grid { grid-template-columns: 1fr; gap: 14px; }
  .contact-card { min-height: auto; padding: 28px 24px; }

  /* ── Publications ── */
  .publication-card {
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    gap: 0;
  }
  /* Titre, auteurs, journal : centrés */
  .pub-title,
  .pub-authors,
  .pub-journal { text-align: center; }
  /* Description et résumé : justifiés (lignes alignées des deux côtés) */
  .pub-abstract,
  .pub-description { text-align: justify; }
  /* Bulle type (Article, Communication…) : masquée sur mobile */
  .pub-type { display: none; }
  /* Badges année + journal : centrés */
  .pub-meta {
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  /* Bouton PDF : centré en bas de la carte */
  .pub-action {
    flex-direction: row;
    min-width: auto;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    width: 100%;
  }
  .pub-search-wrapper { max-width: 100%; }

  /* ── Livres ── */
  .books-grid { grid-template-columns: 1fr; gap: 24px; }
  .book-card { flex-direction: column; }
  .book-cover-wrapper { padding: 28px; min-height: auto; }
  .book-cover-img { max-width: 160px; }
  .book-info { text-align: center; }
  .book-meta { justify-content: center; }
  .book-description { text-align: justify; }

  /* ── Page header ── */
  .page-header { padding: 90px 0 48px; }
  .page-header-subtitle { padding: 0 16px; }

  /* ── Mentions légales ── */
  .legal-block { margin-bottom: 32px; padding-bottom: 32px; }
  .legal-content p { text-align: left; }
}

@media (max-width: 480px) {
  /* ── Navbar ── */
  .nav-logo-img { height: 32px; }

  /* ── Hero ── */
  .hero-name { font-size: 2rem; }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  /* ── Global ── */
  .btn { padding: 11px 20px; font-size: 0.875rem; }
  .container { padding: 0 18px; }
  .section { padding: 48px 0; }

  /* ── Publications ── */
  .publication-card { padding: 18px 14px; }
  .pub-title { font-size: 1.05rem; }
  .pub-search-bar { padding: 12px 14px; gap: 8px; }

  /* ── Livres ── */
  .book-info { padding: 20px; }
  .book-cover-img { max-width: 140px; }

  /* ── Page header ── */
  .page-header { padding: 80px 0 40px; }
  .page-header-title { font-size: 1.9rem; }
}

/* ===================== CV PAGE ===================== */
.cv-section {
  padding: 80px 0 120px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cv-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 64px 56px;
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 4px 24px rgba(27,63,110,.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.cv-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.cv-icon svg {
  width: 34px;
  height: 34px;
  stroke: #fff;
}
.cv-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}
.cv-subtitle {
  color: var(--text-sec);
  font-size: 1rem;
  margin: 0;
}
.cv-btn {
  margin-top: 12px;
  padding: 15px 36px;
  font-size: 1rem;
  gap: 10px;
  display: inline-flex;
  align-items: center;
}

/* ========================
   Bannière cookies sur mesure
   ======================== */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--white);
  border-top: 3px solid var(--primary);
  box-shadow: 0 -4px 24px rgba(27,63,110,0.13);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
#cookie-banner.cb-visible {
  transform: translateY(0);
}
.cb-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.cb-text {
  flex: 1;
  min-width: 0;
}
.cb-title {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}
.cb-desc {
  font-size: 0.875rem;
  color: var(--text-sec);
  line-height: 1.5;
  margin: 0;
}
.cb-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cb-link:hover { color: var(--primary-light); }
.cb-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cb-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-b);
  cursor: pointer;
  transition: all var(--ease);
  border: 2px solid var(--primary);
  white-space: nowrap;
}
.cb-btn-primary {
  background: var(--primary);
  color: var(--white);
}
.cb-btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(27,63,110,0.28);
}
.cb-btn-secondary {
  background: transparent;
  color: var(--primary);
}
.cb-btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
}

/* Bouton persistant */
#cookie-prefs-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-b);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--ease);
}
#cookie-prefs-btn.cp-visible { display: inline-flex; }
#cookie-prefs-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 640px) {
  .cb-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
  }
  .cb-actions { width: 100%; }
  .cb-btn { flex: 1; justify-content: center; }
}
