/* =========================================================================
   SynapsÉTS — feuille de style partagée (toutes les pages)
   Palette : bleu marine (#0A1F44) + rouge (#E31E24), fond clair dominant
   Typo : Oswald (titres, condensed/bold) + Inter (texte courant)
   ========================================================================= */

:root {
  --navy: #0A1F44;
  --navy-2: #0e2a5c;
  --navy-3: #13315e;
  --navy-deep: #071630;
  --red: #E31E24;
  --red-2: #c8171c;

  --white: #ffffff;
  --gray-50: #f7f8fb;
  --gray-100: #eef0f5;
  --gray-200: #dde2ea;
  --gray-300: #c7ccd6;
  --gray-400: #9aa3b2;
  --gray-500: #6b7280;
  --gray-700: #3a4250;
  --ink: #0c1220;

  --font-display: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container-w: 1180px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-btn: 9px;

  --shadow-sm: 0 2px 12px rgba(10, 31, 68, 0.08);
  --shadow-md: 0 16px 38px rgba(10, 31, 68, 0.16);
  --shadow-red: 0 10px 26px rgba(227, 30, 36, 0.22);

  --header-h: 76px;
  --section-pad: clamp(64px, 9vw, 132px);
  --section-pad-sm: clamp(48px, 6vw, 88px);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
section { scroll-margin-top: var(--header-h); }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 1000;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

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

.accent { color: var(--red); }

/* ---------- Typography helpers ---------- */
.eyebrow,
.section-tag,
.page-hero-tag {
  display: inline-block;
  font-family: var(--font-display);
  color: var(--red);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-tag-light,
.page-hero-tag-light { color: #ff9a9d; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.01em; }

.section h2,
.page-hero-title {
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.section h2 { font-size: clamp(1.9rem, 4vw, 2.65rem); max-width: 760px; margin-bottom: 20px; }

.section-lead {
  font-family: var(--font-body);
  color: var(--gray-700);
  font-size: 1.04rem;
  line-height: 1.75;
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-lead-light { color: rgba(255,255,255,0.82); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--red-2); box-shadow: var(--shadow-red); }

.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; box-shadow: var(--shadow-md); }

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

.btn-ghost-light { color: rgba(255,255,255,0.85); border-color: transparent; padding: 14px 6px; }
.btn-ghost-light:hover { color: #fff; transform: translateX(3px); }

.btn-nav { display: none; }

/* ---------- Header (identique sur toutes les pages) ---------- */
.top-bar { height: 3px; background: linear-gradient(90deg, var(--red) 0%, var(--navy) 100%); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--gray-200);
  box-shadow: 0 2px 18px rgba(10, 31, 68, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
/* Logo officiel (assets/logo.webp), ratio ~4.07:1 (mot-symbole + tagline). */
.brand-logo { height: 52px; width: auto; display: block; }

.header-right { display: flex; align-items: center; gap: 14px; }

.main-nav { display: none; }
.main-nav ul { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gray-700);
  position: relative;
  padding: 8px 2px;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--navy); }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.2s ease;
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { width: 100%; }

/* Sélecteur de langue FR/EN */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}
.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 11px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lang-btn.is-active { background: var(--navy); color: #fff; }
.lang-btn:not(.is-active):hover { color: var(--navy); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--navy); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 899px) {
  .mobile-nav-panel {
    position: fixed;
    top: calc(var(--header-h) + 3px);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
    z-index: 99;
  }
  .mobile-nav-panel.open { max-height: 420px; }
  .mobile-nav-panel ul { display: flex; flex-direction: column; padding: 8px 22px 20px; }
  .mobile-nav-panel li { border-top: 1px solid var(--gray-100); }
  .mobile-nav-panel li:first-child { border-top: none; }
  .mobile-nav-panel a { display: block; padding: 15px 4px; font-family: var(--font-display); font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; color: var(--gray-700); }
  .mobile-nav-panel a[aria-current="page"] { color: var(--red); }
}

@media (min-width: 900px) {
  .nav-toggle, .mobile-nav-panel { display: none; }
  .main-nav { display: block; }
  .btn-nav { display: inline-flex; }
  .brand-logo { height: 62px; }
}

/* Très petits écrans (ex: 320px) : resserrer le header pour éviter tout
   débordement horizontal entre le logo, le sélecteur de langue et le
   bouton de menu. */
@media (max-width: 360px) {
  .container { padding: 0 16px; }
  .header-right { gap: 8px; }
  .lang-btn { padding: 6px 8px; font-size: 0.68rem; }
  .brand-logo { height: 38px; }
  .btn { white-space: normal; text-align: center; }
}

/* ---------- Hero (page d'accueil) ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: var(--navy);
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: 0; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 55%, var(--navy-deep) 100%); }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
/* Le <video> (et son poster) ne s'affiche qu'une fois qu'une vraie image a
   été décodée (classe .video-ready ajoutée par main.js sur 'loadeddata').
   Tant qu'aucun fichier assets/hero-video.mp4 n'est déposé, il reste
   invisible et laisse voir le dégradé sombre défini sur .hero-media. */
.hero-media.video-ready .hero-video { opacity: 1; }
/* Photo de fond du hero (assets/photos/ace-porte.jpg) avec lent zoom
   d'entrée façon Ken Burns, jouée une seule fois. */
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  animation: heroZoom 20s ease-out forwards;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  /* Assombri un peu plus qu'un simple dégradé sur fond uni : avec une vraie
     photo (ciel clair, porte blanche) derrière, ce niveau garde un contraste
     AA pour le texte blanc quelle que soit la zone de l'image sous le texte. */
  background: linear-gradient(180deg, rgba(7,22,48,0.68) 0%, rgba(7,22,48,0.8) 55%, rgba(7,22,48,0.94) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 90px;
  max-width: 800px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 6.4vw, 4rem);
  line-height: 1.06;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-lead {
  font-family: var(--font-body);
  color: rgba(255,255,255,0.86);
  font-size: 1.06rem;
  line-height: 1.75;
  max-width: 660px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,0.45);
  border-radius: 20px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%;
  width: 4px; height: 8px; margin-left: -2px;
  background: #fff; border-radius: 3px;
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(0); }
}

/* ---------- Page hero (sous-pages : projet / équipe / partenaires / rejoindre) ---------- */
.page-hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 60%, var(--navy-deep) 100%);
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 64px;
  overflow: hidden;
  isolation: isolate;
}
.page-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.page-hero-title { color: #fff; font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 18px; }
.page-hero-lead { color: rgba(255,255,255,0.82); font-size: 1.02rem; line-height: 1.7; max-width: 620px; }

/* Variante photo (page Projet) : même dégradé sombre que .page-hero mais
   superposé à une photo plutôt qu'à un fond uni, pour garder le texte
   lisible. Doit rester après .page-hero pour que la cascade gagne (même
   spécificité, priorité au dernier déclaré). */
.page-hero-photo {
  background-image: linear-gradient(160deg, rgba(7,22,48,0.72) 0%, rgba(7,22,48,0.55) 55%, rgba(7,22,48,0.88) 100%), url("../assets/photos/exosqueletteenaction.jpg");
  background-size: cover;
  background-position: center;
}

/* Variante photo (page Équipe) : ne touche pas .team-page-hero lui-même,
   réutilisé tel quel (fond clair) par Réalisations et À propos. */
.team-page-hero-photo {
  position: relative;
  background-image: linear-gradient(160deg, rgba(7,22,48,0.72) 0%, rgba(7,22,48,0.55) 55%, rgba(7,22,48,0.88) 100%), url("../assets/photos/equipepic.jpg");
  background-size: cover;
  background-position: center;
}
.team-page-hero-photo .section-tag { color: #ff9a9d; }
.team-page-hero-photo .team-hero-title { color: #fff; }
.team-page-hero-photo .demo-badge { background: rgba(255,255,255,0.16); color: rgba(255,255,255,0.88); }

/* ---------- Sections génériques ---------- */
.section { padding: var(--section-pad) 0; }
.section-sm { padding: var(--section-pad-sm) 0; }
.section.alt-bg { background: var(--gray-50); }
.section.dark-bg { background: var(--navy); }

[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.65s ease, transform 0.65s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Accueil : logo en filigrane derrière "Qui nous sommes" ----------
   Purement décoratif via ::before (aucun élément ajouté au HTML) : le logo
   est simplement affiché en fond de section, légèrement transparent. */
#qui-nous-sommes { position: relative; }
.who-we-are { position: relative; z-index: 1; }
#qui-nous-sommes::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/logo-icon.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(70%, 640px);
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  animation: logoWatermarkSpin 50s linear infinite;
}
@keyframes logoWatermarkSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Accueil : "Ce qu'on construit" (image + texte) ---------- */
.build-split { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 860px) { .build-split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.build-image img { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.build-list { margin-bottom: 30px; }

/* ---------- Cards génériques (grille de fonctionnalités) ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

/* Variante à 3 colonnes (au lieu de 4) pour la grille "Nos objectifs" de
   l'accueil — doit rester après .feature-grid pour que la cascade gagne
   (même spécificité, priorité au dernier déclaré). */
.results-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .results-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.icon-badge {
  width: 50px; height: 50px;
  border-radius: 12px;
  background: rgba(10, 31, 68, 0.06);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feature-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; color: var(--navy); margin-bottom: 10px; }
.feature-card p { color: var(--gray-700); font-size: 0.95rem; line-height: 1.65; }

/* ---------- Réalisations : carte ACE 2026 avec photo ---------- */
.achievement-card-photo { padding-top: 0; overflow: hidden; }
.achievement-card-img {
  display: block;
  width: calc(100% + 52px);
  margin: 0 -26px 20px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 85%;
}

/* ---------- CTA banner réutilisable ---------- */
.cta-banner { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); }
.cta-banner-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.cta-banner h2 { color: #fff; margin-bottom: 16px; }
.cta-banner p { color: rgba(255,255,255,0.8); font-size: 1rem; line-height: 1.7; margin-bottom: 30px; }
.cta-banner-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---------- Page hero : variante grand titre (page Projet) ---------- */
.page-hero-title-xl { font-size: clamp(2.1rem, 9vw, 5rem); margin-bottom: 16px; overflow-wrap: break-word; }

/* ---------- Feuille de route (page Projet) : étapes agrandies ---------- */
.roadmap-steps { display: flex; flex-direction: column; }
.roadmap-step {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 40px 4px;
  border-bottom: 1px solid var(--gray-200);
}
.roadmap-step:last-child { border-bottom: none; padding-bottom: 4px; }
.roadmap-step-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  color: rgba(227, 30, 36, 0.16);
  line-height: 1;
  flex-shrink: 0;
  width: 92px;
}
.roadmap-step.is-current .roadmap-step-number { color: var(--red); }
.roadmap-step-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.roadmap-step-body p { color: var(--gray-700); font-size: 1rem; line-height: 1.7; max-width: 660px; }
.timeline-tag-current {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(227, 30, 36, 0.1);
  color: var(--red);
  padding: 4px 10px;
  border-radius: 999px;
}
@media (max-width: 640px) {
  .roadmap-step { flex-direction: column; gap: 10px; padding: 30px 2px; }
  .roadmap-step-number { width: auto; }
}

/* ---------- À propos : grille de photos à venir ---------- */
.about-placeholder-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 560px; }
@media (min-width: 560px) { .about-placeholder-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Projet : autres projets (placeholder photo + texte) ---------- */
.legacy-project { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.placeholder-photo {
  width: 150px; height: 150px; flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(45deg, var(--gray-100), var(--gray-100) 10px, var(--gray-50) 10px, var(--gray-50) 20px);
  border: 1px dashed var(--gray-300);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  color: var(--gray-400);
}
.placeholder-photo span { font-size: 0.76rem; color: var(--gray-500); }
.legacy-project-text { flex: 1; min-width: 240px; color: var(--gray-700); font-size: 0.98rem; line-height: 1.7; }

/* ---------- Barre de progression de scroll (page Projet) ---------- */
.roadmap-progress {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  height: 4px;
  background: var(--gray-200);
  z-index: 90;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.roadmap-progress.is-visible { opacity: 1; transform: translateY(0); }
.roadmap-progress-fill { height: 100%; width: 0%; background: var(--red); }

/* ---------- Équipe : hero minimal + étiquette démo ---------- */
.team-page-hero { padding: clamp(48px, 7vw, 84px) 0 clamp(24px, 4vw, 36px); }
.team-hero-title {
  font-size: clamp(1.9rem, 4.4vw, 2.7rem);
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
.demo-badge {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- Équipe : barre de filtres ---------- */
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(32px, 5vw, 48px); }
.filter-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-200);
  background: #fff;
  color: var(--gray-700);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.filter-btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Équipe : groupes par département ---------- */
.team-dept-section { margin-bottom: clamp(44px, 6vw, 68px); text-align: center; }
.team-dept-section:last-child { margin-bottom: 0; }
.team-dept-section[hidden] { display: none; }
.team-dept-section .section-tag { display: inline-block; }

.team-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }

/* ---------- Équipe : carte membre (vrai <button>, ratio 3:4) ---------- */
.member-card {
  position: relative;
  width: clamp(148px, 21vw, 210px);
  aspect-ratio: 3 / 4;
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--navy);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease;
}
.member-card:hover { box-shadow: var(--shadow-md); }
.member-card:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; box-shadow: var(--shadow-md); }

.member-card-media { position: absolute; inset: 0; }
.member-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1);
  transition: transform 0.4s ease;
}
.member-card:hover .member-card-media img,
.member-card:focus-visible .member-card-media img { transform: scale(1.04); }

.member-card-initials {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: #fff;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
}

.member-card-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,22,48,0) 42%, rgba(7,22,48,0.6) 72%, rgba(7,22,48,0.9) 100%);
}

.member-card-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 14px 16px;
  text-align: left;
  color: #fff;
}
.member-card-name { display: block; font-family: var(--font-body); font-weight: 700; font-size: 0.96rem; margin-bottom: 2px; }
.member-card-role { display: block; color: rgba(255,255,255,0.82); font-size: 0.78rem; margin-bottom: 9px; }
.member-card-tags { display: flex; flex-wrap: wrap; gap: 6px; padding-right: 34px; }
.member-card-tag {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.18);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
}

.member-card-plus {
  position: absolute; right: 10px; bottom: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; line-height: 1;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.member-card:hover .member-card-plus,
.member-card:focus-visible .member-card-plus { background: var(--red); color: #fff; transform: rotate(45deg); }

@media (prefers-reduced-motion: reduce) {
  .member-card-media img,
  .member-card-plus { transition: none; }
  .member-card:hover .member-card-media img,
  .member-card:focus-visible .member-card-media img { transform: none; }
  .member-card:hover .member-card-plus,
  .member-card:focus-visible .member-card-plus { transform: none; }
}

/* ---------- Équipe : modal fiche membre ---------- */
.team-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(7, 22, 48, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.team-modal-backdrop.is-open { opacity: 1; }
.team-modal-backdrop[hidden] { display: none; }

.team-modal {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 940px;
  max-height: 90vh;
  padding: 24px;
  gap: 28px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(7, 22, 48, 0.35);
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.team-modal-backdrop.is-open .team-modal { transform: translateY(0); opacity: 1; }

/* La photo est une carte à coins arrondis à l'intérieur du modal (carte
   dans une carte), avec l'espace de .team-modal (padding) autour d'elle,
   plutôt que collée aux bords du modal. Ratio 3:4 identique à celui de la
   carte dans la grille équipe (.member-card) : même recadrage, le modal
   s'agrandit au besoin plutôt que de déformer/recadrer différemment. */
.team-modal-media {
  position: relative;
  flex: 0 0 320px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy);
}
.team-modal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-modal-initials {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 3rem;
}

.team-modal-body { flex: 1; padding: 14px 12px 14px 0; overflow-y: auto; }
.team-modal-name { font-family: var(--font-body); color: var(--red); font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.team-modal-program { color: var(--gray-500); font-size: 0.95rem; margin-bottom: 4px; }
.team-modal-dept { color: var(--gray-500); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; margin-bottom: 22px; }
.team-modal-role { color: var(--navy); font-weight: 700; font-size: 1rem; margin-bottom: 18px; }
.team-modal-fact-label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  border-top: 1px solid var(--gray-100);
  padding-top: 20px;
}
.team-modal-fact { color: var(--gray-700); font-size: 0.98rem; line-height: 1.65; margin-bottom: 24px; }

/* Contact : deux petites icônes côte à côte (LinkedIn + courriel direct),
   remplace l'ancien bouton LinkedIn plein-largeur. */
.team-modal-contact { display: flex; gap: 10px; }
.team-modal-contact-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.team-modal-contact-btn:hover { background: var(--navy); color: #fff; }
.team-modal-contact-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.team-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.15s ease;
}
.team-modal-close:hover { background: var(--gray-200); }
.team-modal-close:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Flèches de navigation façon galerie : de part et d'autre du MODAL (et
   non plus à l'intérieur du cadre de la photo), positionnées sur le fond
   sombre du backdrop. */
.team-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  z-index: 310;
  transition: background-color 0.15s ease;
}
.team-modal-prev { left: clamp(8px, 4vw, 32px); }
.team-modal-next { right: clamp(8px, 4vw, 32px); }
.team-modal-nav:hover { background: #fff; }
.team-modal-nav:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.team-modal-nav:disabled { opacity: 0.35; cursor: default; }

@media (max-width: 760px) {
  .team-modal-backdrop { padding: 0; }
  .team-modal { flex-direction: column; max-width: 100%; max-height: 100vh; height: 100%; border-radius: 0; padding: 14px; gap: 16px; }
  .team-modal-media { flex: 0 0 auto; width: 100%; aspect-ratio: 3 / 4; border-radius: var(--radius-md); }
  .team-modal-body { padding: 4px 4px 32px; }
}

/* ---------- Partenaires ---------- */
.download-cta {
  display: flex; align-items: center; gap: 18px;
  background: var(--gray-50);
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: clamp(40px, 5vw, 60px);
  flex-wrap: wrap;
}
.download-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.download-text { flex: 1; min-width: 200px; }
.download-text strong { display: block; color: var(--navy); font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 4px; }
.download-text span { color: var(--gray-500); font-size: 0.88rem; }

/* Variante du bouton de téléchargement quand il est posé sur le hero sombre. */
.download-cta-hero { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.32); margin-top: 30px; margin-bottom: 0; }
.download-cta-hero .download-text strong { color: #fff; }
.download-cta-hero .download-text span { color: rgba(255,255,255,0.65); }
.download-cta-hero .download-icon { background: rgba(255,255,255,0.16); }

.tiers-grid { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 20px; }
@media (min-width: 780px) { .tiers-grid { grid-template-columns: repeat(3, 1fr); } }
.tier-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 32px 28px; }
.tier-featured { border-color: var(--red); box-shadow: var(--shadow-md); position: relative; }
.tier-badge { display: inline-block; padding: 6px 16px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 18px; }
.tier-bronze { background: #f1e2d1; color: #8a5a2b; }
.tier-argent { background: #e6e8ec; color: #4a4f58; }
.tier-or { background: #fbe8ad; color: #8a6a12; }
.tier-desc { color: var(--gray-700); font-size: 0.94rem; line-height: 1.6; margin-bottom: 20px; }
.tier-perks { display: flex; flex-direction: column; gap: 11px; }
.tier-perks li { font-size: 0.92rem; color: var(--navy); font-weight: 600; padding-left: 22px; position: relative; }
.tier-perks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 2px; background: var(--red); }
.tiers-note { color: var(--gray-500); font-size: 0.86rem; margin-bottom: 40px; }

/* Aide sans partenariat structuré */
.non-structured-help { max-width: 720px; }

/* Nos sponsors actuels : paliers Diamant/Or/Argent/Bronze, honnêtes quand
   vides (zone "À venir"), sans faux noms. */
.sponsor-tiers { display: flex; flex-direction: column; }
.sponsor-tier-group { display: flex; align-items: center; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--gray-200); flex-wrap: wrap; }
.sponsor-tier-group:last-child { border-bottom: none; }
.sponsor-tier-group .tier-badge { flex-shrink: 0; margin-bottom: 0; width: 110px; text-align: center; }
.sponsor-tier-zone {
  flex: 1;
  min-width: 200px;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.92rem;
  padding: 18px 20px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}
.tier-diamant { background: #dfeefc; color: #2563a8; }

/* ---------- Rejoindre : parcours ---------- */
.paths-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 780px) { .paths-grid { grid-template-columns: repeat(3, 1fr); } }
.path-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 30px 26px; }
.path-card h3 { font-family: var(--font-display); font-size: 1.05rem; text-transform: uppercase; color: var(--navy); margin-bottom: 12px; }
.path-card p { color: var(--gray-700); font-size: 0.94rem; line-height: 1.65; }
.path-card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn-sm { padding: 9px 16px; font-size: 0.8rem; }

/* ---------- Rejoindre : gros bouton mailto centré ---------- */
.join-cta-main { text-align: center; }
.join-cta-button { padding: 20px 52px; font-size: 1.02rem; }
.join-local-note { color: var(--gray-500); font-size: 0.92rem; margin-top: 18px; }

/* ---------- Rejoindre : grille 2x2 des équipes ---------- */
.teams-square-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .teams-square-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Focus visible générique (boutons + liens sociaux) ---------- */
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.social-list a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 3px; }

/* ---------- Bouton "Rejoindre" du header : silhouette bonbonne à gaz ----------
   Image fournie (assets/icons/bonbonne-gaz.png, fond transparent, ratio réel
   1406:794) utilisée comme masque CSS plutôt qu'en image de fond, pour que
   la couleur d'accent reste pilotable en CSS (hover/focus). Doit rester
   APRÈS .btn:focus-visible ci-dessus pour que la cascade gagne (même
   spécificité, priorité au dernier déclaré). */
.btn-nav {
  position: relative;
  width: 99px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: var(--red);
  -webkit-mask-image: url("../assets/icons/bonbonne-gaz.png");
  mask-image: url("../assets/icons/bonbonne-gaz.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-nav:hover { background-color: var(--red-2); transform: scale(1.04); }
.btn-nav:focus-visible { background-color: var(--red-2); transform: scale(1.04); outline: 2px solid var(--navy); outline-offset: 4px; }
.btn-nav:active { transform: scale(1); }
.btn-nav-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .btn-nav:hover, .btn-nav:focus-visible, .btn-nav:active { transform: none; }
}

/* ---------- Footer (identique sur toutes les pages) ---------- */
.site-footer { background: var(--navy); padding: 64px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.12); }
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand-name { font-family: var(--font-display); color: #fff; font-size: 1.3rem; font-weight: 700; text-transform: uppercase; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.92rem; margin-top: 12px; max-width: 300px; line-height: 1.6; }
.footer-links h3 { font-family: var(--font-display); color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 18px; }
.footer-quicklinks { display: flex; flex-direction: column; gap: 11px; }
.footer-quicklinks a { color: rgba(255,255,255,0.72); font-size: 0.92rem; transition: color 0.15s ease; }
.footer-quicklinks a:hover { color: #fff; }
.social-list { display: flex; flex-direction: column; gap: 12px; }
.social-list a { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.75); font-size: 0.92rem; transition: color 0.15s ease; }
.social-list a:hover { color: #fff; }
.social-list-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.75); font-size: 0.92rem; }
.footer-bottom { padding: 20px 0 26px; }
.footer-bottom p { color: rgba(255,255,255,0.48); font-size: 0.8rem; text-align: center; }

/* ---------- Curseur personnalisé (desktop uniquement) ----------
   Deux traits gris formant une pointe de flèche ouverte, avec un cercle
   bleu marine (rouge au clic) entre les deux, en référence à un noeud de
   branche du logo SynapsÉTS. Activé en JS (js/main.js) seulement quand
   (hover: hover) and (pointer: fine) correspond, donc jamais sur tactile. */
.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.15s ease;
}
.custom-cursor-wing { fill: none; stroke: var(--gray-400); stroke-width: 2.6; stroke-linecap: round; }
.custom-cursor-dot { fill: var(--navy); transition: fill 0.1s ease; }
.custom-cursor.is-active .custom-cursor-dot { fill: var(--red); }

body.custom-cursor-active,
body.custom-cursor-active a,
body.custom-cursor-active button,
body.custom-cursor-active [role="button"] { cursor: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .scroll-cue span { animation: none; }
  .hero-photo { animation: none; }
  #qui-nous-sommes::before { animation: none; }
}
