/* =====================================================
   UMR-AMES — Feuille de style principale
   Analyse et Modélisation pour l'Environnement et la Santé
   ===================================================== */

/* ---- Variables / Design system ---- */
:root {
  /* Couleurs — bleu nuit institutionnel + accent teal (pont Environnement/Santé) */
  --ink:           #0a1a30;
  --primary:       #102a4c;
  --primary-light: #1c4575;
  --primary-dark:  #07182e;
  --accent:        #15a08f;   /* teal signature */
  --accent-light:  #36c3b1;
  --accent-dark:   #0e7c6f;
  --accent-2:      #4caf6e;   /* vert secondaire (environnement) */

  --text:          #14233c;
  --text-secondary:#4b5a72;
  --text-light:    #8290a4;

  --bg:            #f5f8fa;
  --bg-alt:        #eaf0f4;
  --white:         #ffffff;
  --surface:       #ffffff;
  --border:        #e6ecf2;
  --border-strong: #d4deea;

  /* Ombres raffinées, multi-couches */
  --shadow-sm:     0 1px 2px rgba(16,42,76,0.05), 0 2px 6px rgba(16,42,76,0.05);
  --shadow:        0 4px 12px rgba(16,42,76,0.07), 0 10px 28px rgba(16,42,76,0.07);
  --shadow-lg:     0 8px 24px rgba(16,42,76,0.10), 0 24px 56px rgba(16,42,76,0.12);

  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     18px;

  /* Typographie */
  --font-display:  'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition:    all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text); background: var(--white); line-height: 1.65;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none;
  font-family: inherit; }

/* Titres : police d'affichage Space Grotesk */
h1, h2, h3, h4,
.nav-brand, .stat-number, .equipe-number,
.section-header h2, .hero h1 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
::selection { background: rgba(21,160,143,0.20); }

/* ---- Utilitaires ---- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; scroll-margin-top: 90px; }
.section-alt { background: var(--bg); }
.hero { scroll-margin-top: 90px; }
.hidden { display: none !important; }

.section-header { text-align: center; margin-bottom: 64px; max-width: 720px; margin-left: auto; margin-right: auto; }
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(21,160,143,0.10);
  color: var(--accent-dark);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 50px; margin-bottom: 20px;
  border: 1px solid rgba(21,160,143,0.18);
}
.section-tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.section-header h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 600; color: var(--primary); margin-bottom: 18px; line-height: 1.18;
}
.section-header p {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 620px; margin: 0 auto; line-height: 1.7;
}

/* ---- Boutons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 28px; border-radius: var(--radius-sm);
  font-size: 0.92rem; font-weight: 600; letter-spacing: 0.005em;
  transition: var(--transition); border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent); color: var(--white);
  box-shadow: 0 4px 14px rgba(21,160,143,0.30);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(21,160,143,0.36); }
.btn-outline { background: rgba(255,255,255,0.04); color: var(--white); border-color: rgba(255,255,255,0.45); backdrop-filter: blur(4px); }
.btn-outline:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.7); transform: translateY(-2px); }
.btn-dark { background: var(--primary); color: var(--white); }
.btn-dark:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow); }

/* =====================================================
   NAVBAR
   ===================================================== */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: transparent; transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
#header.scrolled {
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
          backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(16,42,76,0.06), var(--shadow-sm);
  border-bottom-color: var(--border);
}

.navbar .container {
  display: flex; align-items: center; height: 74px; gap: 20px;
}

.nav-brand {
  display: flex; align-items: center; gap: 11px;
  color: var(--white); font-weight: 700; font-size: 1.18rem; flex-shrink: 0;
  letter-spacing: -0.01em;
}
#header.scrolled .nav-brand { color: var(--primary); }
.nav-brand img { height: 38px; width: auto; }

.nav-menu {
  display: flex; align-items: center; gap: 2px; margin-left: auto;
}
.nav-menu a {
  font-size: 0.83rem; font-weight: 500;
  padding: 7px 9px; border-radius: 6px;
  color: rgba(255,255,255,0.88); transition: var(--transition); white-space: nowrap;
}
#header.scrolled .nav-menu a { color: var(--text); }
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent-dark);
  background: rgba(21,160,143,0.10);
}
#header.scrolled .nav-menu a:hover,
#header.scrolled .nav-menu a.active { color: var(--accent-dark); }

/* ---- Menus déroulants ---- */
.has-dropdown { position: relative; }
.dropdown-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.83rem; font-weight: 500; font-family: inherit;
  padding: 7px 9px; border-radius: 6px; cursor: pointer;
  color: rgba(255,255,255,0.88); transition: var(--transition); white-space: nowrap;
}
#header.scrolled .dropdown-toggle { color: var(--text); }
.dropdown-toggle i { font-size: 0.62rem; transition: transform 0.25s var(--ease); opacity: 0.8; }
.has-dropdown:hover .dropdown-toggle,
.has-dropdown.open .dropdown-toggle,
.has-dropdown.group-active .dropdown-toggle { color: var(--accent-dark); background: rgba(21,160,143,0.10); }
.has-dropdown:hover .dropdown-toggle i,
.has-dropdown.open .dropdown-toggle i { transform: rotate(180deg); }
#header.scrolled .has-dropdown.group-active .dropdown-toggle { color: var(--accent-dark); }

.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 210px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 1001;
}
.dropdown-menu::before {
  content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
  display: block; padding: 10px 14px; border-radius: 7px;
  font-size: 0.86rem; font-weight: 500; color: var(--text-secondary) !important;
  transition: var(--transition);
}
.dropdown-menu a:hover {
  background: rgba(21,160,143,0.10); color: var(--accent-dark) !important; padding-left: 18px;
}

.lang-switcher {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 700;
  color: rgba(255,255,255,0.88); flex-shrink: 0;
  padding: 5px 10px; border: 1px solid rgba(255,255,255,0.3); border-radius: 6px;
}
#header.scrolled .lang-switcher { color: var(--text-secondary); border-color: var(--border); }
.lang-switcher a { transition: var(--transition); }
.lang-switcher a:hover, .lang-switcher a.active { color: var(--accent); }
.lang-switcher span { opacity: 0.4; }

/* ---- Bouton Espace chercheur (navbar) ---- */
.nav-login {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-size: 0.82rem; font-weight: 600; white-space: nowrap;
  padding: 8px 16px; border-radius: 50px;
  color: var(--white); border: 1px solid rgba(255,255,255,0.45);
  transition: var(--transition);
}
.nav-login i { font-size: 0.82rem; }
.nav-login:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.8); transform: translateY(-1px); }
#header.scrolled .nav-login {
  color: var(--white); background: var(--accent);
  border-color: var(--accent); box-shadow: 0 3px 10px rgba(21,160,143,0.28);
}
#header.scrolled .nav-login:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; padding: 8px; margin-left: auto;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px; transition: var(--transition);
}
#header.scrolled .nav-toggle span { background: var(--primary); }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =====================================================
   HERO
   ===================================================== */
.hero {
  min-height: 100vh;
  background: linear-gradient(150deg, #07182e 0%, #0c2546 42%, #103a52 75%, #115a5a 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 110px 24px 70px; text-align: center;
}
/* Halo lumineux + accent teal */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 22% 30%, rgba(21,160,143,0.28) 0%, transparent 52%),
    radial-gradient(ellipse at 82% 72%, rgba(76,175,110,0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.05) 0%, transparent 45%);
  pointer-events: none;
}
/* Grille scientifique subtile + dégradé bas */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse at center, #000 0%, transparent 78%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }

/* Logos navbar : cube 3D rotatif ISGI / AMES */
.logo-cube-scene {
  width: 44px; height: 44px;
  perspective: 260px;
  flex-shrink: 0;
}
.logo-cube {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: cubeSpin 9s infinite cubic-bezier(0.5, 0, 0.5, 1);
}
.logo-cube-scene:hover .logo-cube { animation-play-state: paused; }
.cube-face {
  position: absolute; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  overflow: hidden;
}
.cube-face img {
  max-width: 36px; max-height: 36px; width: auto; height: auto;
  object-fit: contain;
}
.cube-front { transform: rotateY(0deg)   translateZ(22px); }
.cube-right { transform: rotateY(90deg)  translateZ(22px); }
.cube-back  { transform: rotateY(180deg) translateZ(22px); }
.cube-left  { transform: rotateY(270deg) translateZ(22px); }

@keyframes cubeSpin {
  0%   { transform: rotateY(0deg); }
  20%  { transform: rotateY(0deg); }
  45%  { transform: rotateY(90deg); }
  70%  { transform: rotateY(90deg); }
  95%  { transform: rotateY(180deg); }
  100% { transform: rotateY(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-cube { animation: none; }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.92);
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.10em; text-transform: uppercase;
  padding: 8px 20px; border-radius: 50px; margin-bottom: 30px;
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(6px);
}
.hero-badge i { color: var(--accent-light); }

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 600; color: var(--white); line-height: 1.12; margin-bottom: 24px;
  letter-spacing: -0.025em;
}
.hero h1 span {
  background: linear-gradient(100deg, var(--accent-light), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.12rem; color: rgba(255,255,255,0.74);
  max-width: 640px; margin: 0 auto 44px; line-height: 1.78; font-weight: 300;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 76px; }

.hero-stats {
  display: flex; justify-content: center; gap: 64px; flex-wrap: wrap;
  padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.14);
}
.stat { text-align: center; }
.stat-number {
  display: block; font-size: 2.6rem; font-weight: 600; color: var(--white); line-height: 1;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,0.72));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.73rem; color: rgba(255,255,255,0.60); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 8px; }

/* =====================================================
   À LA UNE — Diaporama actualités
   ===================================================== */
.news-band {
  position: relative; width: 100%; height: 420px; overflow: hidden;
  background: var(--ink);
}
.news-slides { position: absolute; inset: 0; }
.news-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end;
  opacity: 0; transition: opacity 1s var(--ease);
  pointer-events: none;
}
.news-slide.is-active { opacity: 1; pointer-events: auto; }
.news-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,24,46,0.92) 0%, rgba(7,24,46,0.35) 45%, rgba(7,24,46,0.1) 100%);
}
.news-slide-inner {
  position: relative; z-index: 1; max-width: 1180px; width: 100%;
  margin: 0 auto; padding: 0 24px 48px; color: var(--white);
}
.news-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(21,160,143,0.92); color: #fff;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 50px; margin-bottom: 14px;
}
.news-slide-inner h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.2rem, 2.6vw, 1.9rem); line-height: 1.25; max-width: 760px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.news-dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 2;
}
.news-dot {
  width: 9px; height: 9px; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,0.4); transition: var(--transition);
}
.news-dot.active { background: var(--accent-light); width: 26px; border-radius: 50px; }
@media (max-width: 768px) { .news-band { height: 320px; } }

/* =====================================================
   PRÉSENTATION
   ===================================================== */
.presentation-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
}
.presentation-text p {
  margin-bottom: 18px; color: var(--text-secondary); font-size: 0.97rem; line-height: 1.85;
}
.presentation-text p:last-child { margin-bottom: 0; }

.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.info-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: rgba(21,160,143,0.3); }
.info-card i { color: var(--accent); font-size: 1.3rem; margin-bottom: 12px; }
.info-card h3 {
  font-size: 0.78rem; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px;
}
.info-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }

/* Partenaire tutelle mis en valeur */
.partenaire-tutelle {
  border: 2px solid var(--accent) !important;
  position: relative;
}
.tutelle-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--white);
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 3px 12px; border-radius: 50px;
  white-space: nowrap;
}

/* Info card tutelle */
.info-card-tutelle { border: 2px solid var(--accent) !important; }
.info-card-logo {
  height: 48px; width: auto; max-width: 110px;
  object-fit: contain; margin-bottom: 10px;
  border-radius: 6px; padding: 4px;
  background: var(--bg-alt);
}

/* =====================================================
   INSTANCES
   ===================================================== */
.instances-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px;
}
.instance-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: var(--transition);
}
.instance-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.instance-header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 22px 24px; display: flex; align-items: center; gap: 14px; color: var(--white);
}
.instance-icon {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.instance-icon i { font-size: 1.1rem; }
.instance-header h3 { font-size: 1rem; font-weight: 700; }
.instance-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.instance-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--bg); border-radius: 7px; }
.instance-role { font-size: 0.72rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.07em; }
.instance-name { font-size: 0.9rem; font-weight: 600; color: var(--primary); }
.member-link { color: var(--accent-dark); font-weight: 700; transition: var(--transition); border-bottom: 1px solid rgba(21,160,143,0.45); }
.member-link::after { content: '\f0c1'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.62em; margin-left: 5px; opacity: 0.65; vertical-align: middle; }
.member-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.instance-note .instance-name { font-size: 0.82rem; font-weight: 400; color: var(--text-secondary); font-style: italic; }

/* =====================================================
   AXES DE RECHERCHE
   ===================================================== */
.axes-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 24px;
}
.axe-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 38px 26px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: var(--transition); text-align: center; position: relative; overflow: hidden;
}
.axe-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: center; transition: transform 0.35s var(--ease);
}
.axe-card:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-6px); border-color: var(--border-strong);
}
.axe-card:hover::after { transform: scaleX(1); }
.axe-icon {
  width: 72px; height: 72px; border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;
  box-shadow: 0 8px 22px rgba(21,160,143,0.30);
  transition: var(--transition);
}
.axe-card:hover .axe-icon { transform: scale(1.06) rotate(-3deg); }
.axe-icon i { font-size: 1.6rem; color: var(--white); }
.axe-card h3 { font-size: 0.97rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; line-height: 1.4; }
.axe-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.75; }

/* =====================================================
   ÉQUIPES
   ===================================================== */
.equipes-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
}
.equipe-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 32px 26px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: var(--transition); position: relative; overflow: hidden;
}
.equipe-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.equipe-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.equipe-number {
  font-size: 3.5rem; font-weight: 900;
  color: var(--bg-alt); line-height: 1; margin-bottom: 12px;
  user-select: none;
}
.equipe-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; line-height: 1.45; }
.equipe-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.75; }

/* =====================================================
   MEMBRES
   ===================================================== */
.membres-search { display: flex; justify-content: center; margin-bottom: 36px; }
.search-box {
  position: relative; width: 100%; max-width: 420px;
}
.search-box i {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: 0.9rem; pointer-events: none;
}
.search-box input {
  width: 100%; padding: 11px 16px 11px 42px; font-size: 0.9rem; font-family: var(--font-body);
  color: var(--text); background: var(--white); border: 1px solid var(--border-strong);
  border-radius: var(--radius); transition: var(--transition);
}
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(21,160,143,0.12); }

.membres-group { margin-bottom: 40px; }
.membres-group:last-child { margin-bottom: 0; }
.membres-group-title {
  font-size: 1.05rem; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 9px; margin-bottom: 18px;
}
.membres-group-title i { color: var(--accent); }
.membres-empty { text-align: center; color: var(--text-light); font-size: 0.88rem; padding: 20px 0; }

.membres-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px;
}
.membre-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 16px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.membre-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: rgba(21,160,143,0.3); }
.membre-avatar {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem; color: var(--white);
}
.membre-info { min-width: 0; }
.membre-name { font-size: 0.88rem; font-weight: 700; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 2px; }
.membre-grade { font-size: 0.76rem; color: var(--text-light); margin-bottom: 1px; }
.membre-affiliation { font-size: 0.76rem; color: var(--accent); font-weight: 600; }
.membre-discipline { font-size: 0.73rem; color: var(--text-light); font-style: italic; }

/* =====================================================
   PROJETS
   ===================================================== */
.projets-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px;
}
.projet-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: var(--transition);
}
.projet-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-5px); }
.projet-header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 28px 26px; color: var(--white);
}
.projet-header .projet-num {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  opacity: 0.75; margin-bottom: 10px;
}
.projet-header h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.projet-header p { font-size: 0.85rem; opacity: 0.82; }
.projet-body { padding: 24px 26px; }
.projet-body p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: 18px; }
.projet-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  background: rgba(21,160,143,0.10); color: var(--accent-dark);
  font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 50px;
}

/* Bannière lauréat projets */
.projet-award-banner {
  background: linear-gradient(135deg, #7b5800, #c49a00);
  color: var(--white); padding: 14px 24px; border-radius: var(--radius);
  font-size: 0.9rem; text-align: center; margin-bottom: 32px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 16px rgba(196,154,0,0.3);
}
.projet-award-banner i { font-size: 1.2rem; flex-shrink: 0; }

/* Équipe projet */
.projet-team { margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.projet-team-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg); border-radius: 8px; padding: 10px 12px;
}
.projet-team-item > i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.projet-team-item > div { display: flex; flex-direction: column; gap: 2px; }
.projet-team-role { font-size: 0.72rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.projet-team-name { font-size: 0.85rem; font-weight: 600; color: var(--primary); line-height: 1.5; }

/* Actualité mise en avant */
.actu-card-highlight { border: 2px solid #c49a00; }
.actu-header-gold { background: linear-gradient(135deg, #7b5800, #c49a00) !important; }

/* =====================================================
   PUBLICATIONS
   ===================================================== */
.pub-filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.pub-filter-btn {
  padding: 8px 18px; border-radius: 50px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--text-secondary); transition: var(--transition);
}
.pub-filter-btn:hover {
  color: var(--accent-dark); border-color: var(--accent); background: rgba(21,160,143,0.07);
}
.pub-filter-btn.active {
  background: var(--primary); color: var(--white); border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(16,42,76,0.18);
}

.publications-list { display: flex; flex-direction: column; gap: 14px; }
.pub-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow-sm); transition: var(--transition);
  border-left: 4px solid var(--accent); display: flex; flex-direction: column; gap: 5px;
}
.pub-card:hover { box-shadow: var(--shadow); border-left-color: var(--primary); transform: translateX(4px); }
.pub-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pub-year {
  font-size: 0.74rem; font-weight: 700; color: var(--white);
  background: var(--accent); padding: 3px 10px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pub-axis {
  font-size: 0.74rem; font-weight: 600; color: var(--text-light);
  background: var(--bg); padding: 3px 10px; border-radius: 50px; border: 1px solid var(--border);
}
.pub-title { font-size: 0.93rem; font-weight: 700; color: var(--primary); line-height: 1.45; }
.pub-authors { font-size: 0.84rem; color: var(--text-secondary); }
.pub-journal { font-size: 0.82rem; color: var(--text-light); font-style: italic; }
.pub-doi a { font-size: 0.8rem; color: var(--accent); font-weight: 500; }
.pub-doi a:hover { text-decoration: underline; }

/* =====================================================
   ACTUALITÉS
   ===================================================== */
.actualites-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px;
}
.actu-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: var(--transition);
}
.actu-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.actu-header {
  background: var(--primary); padding: 18px 22px; color: var(--white);
  display: flex; align-items: center; justify-content: space-between;
}
.actu-date-box { text-align: center; }
.actu-date-day { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.actu-date-month { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.actu-date-year { font-size: 0.72rem; opacity: 0.65; }
.actu-icon { font-size: 1.8rem; opacity: 0.7; }
.actu-body { padding: 22px; }
.actu-type {
  font-size: 0.72rem; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.actu-body h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; line-height: 1.4; }
.actu-body p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.72; }
.actu-img {
  width: 100%; height: auto; margin-top: 16px;
  border-radius: 10px; object-fit: cover;
  box-shadow: var(--shadow-sm);
}

/* ---- Galerie d'actualités ---- */
.actu-gallery {
  display: grid; gap: 8px; margin-top: 16px;
  grid-template-columns: repeat(2, 1fr);
}
.actu-gallery-grid { grid-template-columns: repeat(3, 1fr); }
.actu-gallery-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 8px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.actu-gallery-img:hover { transform: scale(1.04); box-shadow: var(--shadow); }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 90vw; max-height: 86vh;
  border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  user-select: none;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; color: #fff; background: rgba(255,255,255,0.12);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease; line-height: 1;
}
.lightbox-close {
  top: 20px; right: 24px; width: 46px; height: 46px; font-size: 1.8rem;
}
.lightbox-prev, .lightbox-next {
  top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.5rem;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--accent);
}
.lightbox-counter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 0.9rem; font-weight: 600;
  background: rgba(0,0,0,0.45); padding: 5px 14px; border-radius: 50px;
}
@media (max-width: 600px) {
  .lightbox-prev, .lightbox-next { width: 42px; height: 42px; font-size: 1.2rem; }
  .lightbox-close { width: 40px; height: 40px; font-size: 1.5rem; top: 14px; right: 14px; }
}

/* =====================================================
   PARTENAIRES
   ===================================================== */
.partenaires-intro { text-align: center; margin-bottom: 48px; color: var(--text-secondary); }
.partenaires-grid {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px;
}
.partenaire-item {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px 28px; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: var(--transition); min-width: 150px; max-width: 180px;
}
.partenaire-item:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: rgba(21,160,143,0.3); }
.partenaire-item img {
  height: 64px; width: auto; max-width: 120px;
  object-fit: contain; filter: grayscale(20%); transition: var(--transition);
}
.partenaire-item:hover img { filter: grayscale(0%); }
.partenaire-item span { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); text-align: center; }

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

.contact-info > h3 { font-size: 1.1rem; font-weight: 800; color: var(--primary); margin-bottom: 28px; }
.contact-item { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.contact-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
}
.contact-icon i { color: var(--white); font-size: 0.9rem; }
.contact-item h4 { font-size: 0.8rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px; }
.contact-item p, .contact-item a { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }
.contact-item a:hover { color: var(--accent); }

.contact-form {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 40px 36px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.contact-form h3 { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 28px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--primary); margin-bottom: 7px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 15px; font-size: 0.9rem; font-family: inherit;
  border: 1.5px solid var(--border); border-radius: 7px;
  color: var(--text); background: var(--bg); transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--accent); background: var(--white);
  box-shadow: 0 0 0 3px rgba(21,160,143,0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn-submit {
  background: var(--primary); color: var(--white); padding: 13px 32px;
  border-radius: 7px; font-size: 0.95rem; font-weight: 700; width: 100%;
  transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 6px;
}
.btn-submit:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.form-success {
  display: none; text-align: center; padding: 20px;
  color: #1a6b3a; background: #d4edda; border-radius: 7px; font-weight: 600; font-size: 0.95rem;
}

/* =====================================================
   FOOTER
   ===================================================== */
footer {
  background: var(--ink); color: rgba(255,255,255,0.72);
  padding: 64px 0 30px; position: relative;
}
footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--primary-light));
}
.footer-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr; gap: 48px; margin-bottom: 44px; }

.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand img { height: 36px; filter: brightness(0) invert(1) opacity(0.9); }
.footer-brand-text { font-size: 1.05rem; font-weight: 800; color: var(--white); }
.footer-desc { font-size: 0.875rem; line-height: 1.75; margin-bottom: 20px; }
.footer-email a { color: var(--accent-light); font-size: 0.875rem; font-weight: 500; }
.footer-email a:hover { text-decoration: underline; }

.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85); font-size: 1.05rem;
  transition: var(--transition);
}
.footer-social a:hover { transform: translateY(-3px); color: var(--white); }
.footer-social a[aria-label*="YouTube"]:hover  { background: #ff0000; }
.footer-social a[aria-label*="Facebook"]:hover { background: #1877f2; }

.footer-col h4 {
  font-size: 0.78rem; font-weight: 700; color: var(--white);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul a { font-size: 0.875rem; color: rgba(255,255,255,0.65); transition: var(--transition); }
.footer-col ul a:hover { color: var(--accent-light); padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: 0.82rem; }
.footer-bottom a { color: var(--accent-light); }

/* =====================================================
   BACK TO TOP
   ===================================================== */
#backToTop {
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center;
  transition: var(--transition); opacity: 0; pointer-events: none; font-size: 1rem;
}
#backToTop.visible { opacity: 1; pointer-events: auto; }
#backToTop:hover { background: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-lg); }

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

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

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

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-header { margin-bottom: 38px; }

  /* Nav mobile */
  .nav-toggle { display: flex; margin-left: 8px; }
  .lang-switcher { display: none; }

  /* Bouton espace chercheur : icône seule, collé à droite */
  .nav-login { margin-left: auto; padding: 8px 12px; }
  .nav-login span { display: none; }
  #header.scrolled .nav-login { background: var(--accent); color: #fff; }
  .nav-menu {
    position: fixed; top: 74px; left: 0; right: 0; bottom: 0;
    background: var(--white); flex-direction: column; align-items: flex-start;
    padding: 20px; gap: 4px; overflow-y: auto;
    transform: translateX(-100%); transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg); z-index: 999;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu a { color: var(--text) !important; font-size: 1rem; padding: 12px 16px; width: 100%; border-radius: 8px; }

  /* Déroulants en mode mobile : en accordéon, dans le flux */
  .has-dropdown { width: 100%; }
  .dropdown-toggle {
    color: var(--text) !important; font-size: 1rem; width: 100%;
    justify-content: space-between; padding: 12px 16px; border-radius: 8px;
  }
  .dropdown-menu {
    position: static; opacity: 1; visibility: hidden; transform: none;
    box-shadow: none; border: none; padding: 0 0 0 12px; min-width: 0;
    max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease), visibility 0.3s;
  }
  .has-dropdown.open .dropdown-menu { visibility: visible; max-height: 320px; }
  .dropdown-menu a { font-size: 0.95rem; padding: 10px 16px; }

  .hero-stats { gap: 28px; }
  .hero-actions { flex-direction: column; align-items: center; }

  .info-cards { grid-template-columns: 1fr 1fr; }
  .axes-grid { grid-template-columns: 1fr 1fr; }
  .equipes-grid { grid-template-columns: 1fr; }
  .membres-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .contact-form { padding: 28px 22px; }
  .projets-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .axes-grid { grid-template-columns: 1fr; }
  .info-cards { grid-template-columns: 1fr; }
  .partenaires-grid { gap: 14px; }
  .hero h1 { font-size: 1.65rem; }
  .hero-stats { gap: 20px; }
  .stat-number { font-size: 1.8rem; }
}
