/* ================================================================
   FEDET  -  home.css (styles spécifiques à la page d'accueil)
   Référence : capture desktop 1280×800 du site Framer d'origine.
   base.css fournit fonts, tokens, nav, ticker, footer, flip-link…
   anim.css (chargé après) fournit [data-reveal], .hover-lift,
   .img-zoom, .float-slow et le kill-switch prefers-reduced-motion.
   ================================================================ */

/* ---------- Helpers typographiques ---------- */
.h4 {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 34px;
  color: var(--black);
}
.blue  { color: var(--blue); }
.bdark { color: var(--blue-dark); }

/* Fond de page : blanc uni (l'ancien backdrop surf du template a été retiré) */
body { background: var(--white); }

/* En-tête de section centré (eyebrow + H2 + sous-titre) */
.sec-head { text-align: center; }
.sec-head .eyebrow { display: inline-block; margin-bottom: 14px; }
.sec-head h2 { margin-bottom: 14px; }
.sec-head .section-sub { max-width: 640px; margin: 0 auto; }
.pill {
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(36, 81, 159, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Révélation mot-à-mot des H2 (glisse + blur -> net, cascade 70ms via anim.js) */
.words .w {
  display: inline-block;
  opacity: 0.001;
  filter: blur(8px);
  transform: translateY(26px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.words.visible .w {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* Élément à la fois révélé (data-reveal) ET interactif (hover-lift) :
   transition combinée pour ne perdre ni le fondu ni la réactivité du survol */
.hover-lift[data-reveal] {
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Icône astérisque des tickers (SVG inline blanc) */
.tick-star { flex: 0 0 40px; width: 40px; height: 40px; }

/* ================================================================
   HERO  -  une seule photo de fond + voile dégradé sombre
   ================================================================ */
.hero {
  position: relative;
  height: calc(100dvh - var(--nav-height));
  min-height: 560px;
  overflow: hidden;
  background: rgb(10, 42, 94);
}
.hero .hero-photo {
  position: absolute;
  left: 0;
  top: -7.5%;
  width: 100%;
  height: 115%; /* marge verticale pour la profondeur data-plx (jamais de bord visible) */
  object-fit: cover;
  will-change: transform;
  z-index: 1;
}
.hero::after { /* voile : linéaire + radial pour le contraste du titre blanc */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(0, 0, 10, 0.5) 0%, rgba(0, 0, 10, 0) 62%),
    linear-gradient(180deg, rgba(0, 0, 10, 0.35) 0%, rgba(0, 0, 10, 0.42) 55%, rgba(0, 0, 10, 0.65) 100%);
}
.hero .hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  max-width: 1093px;
  margin: 0 auto;
  padding: 34px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.hero h1 {
  color: #fafafa;
  text-align: center;
  white-space: nowrap;
}
/* Lettres FEDET : montée en cascade avec léger dépassement (overshoot) */
.hero h1 span {
  display: inline-block;
  opacity: 0.001;
  animation: hero-letter 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, opacity;
}
.hero h1 span:nth-child(1) { animation-delay: 0.05s; }
.hero h1 span:nth-child(2) { animation-delay: 0.13s; }
.hero h1 span:nth-child(3) { animation-delay: 0.21s; }
.hero h1 span:nth-child(4) { animation-delay: 0.29s; }
.hero h1 span:nth-child(5) { animation-delay: 0.37s; }
@keyframes hero-letter {
  0%   { opacity: 0.001; filter: blur(6px); transform: translateY(0.55em); }
  60%  { opacity: 1; filter: blur(0); }
  78%  { transform: translateY(-0.035em); } /* léger overshoot ressort */
  100% { opacity: 1; filter: none; transform: none; }
}
/* Scribble décoratif : se dessine 0,4s après la cascade des lettres */
.hero .scribble {
  position: absolute;
  left: 600px;
  top: 84px;
  width: 275px;
  height: 73px;
  z-index: 4;
  pointer-events: none;
}
.hero .scribble path {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: scribble-draw 1.1s ease-out 0.8s forwards;
}
@keyframes scribble-draw { to { stroke-dashoffset: 0; } }
/* Carte photo centrale : flotte (wrapper) + réagit à la souris (img, JS lerp) */
.hero .hero-card-wrap {
  position: absolute;
  left: calc(50% - 200px);
  top: calc(56.62% - 174px);
  width: 400px;
  height: 348px;
  z-index: 3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 10, 0.35);
}
.hero .hero-card {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.hero .scroll-down {
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 34px;
  color: var(--white);
  text-align: center;
  animation: scroll-bounce 2s cubic-bezier(0.45, 0, 0.55, 1) 1.6s infinite;
  will-change: transform, opacity;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* ================================================================
   TICKERS  -  fonds spécifiques à la home (PAS transparents ici)
   ================================================================ */
.ticker-blue {
  background: radial-gradient(111% 219% at -13.1% -99.2%, #002b75 0%, #3266c7 34%, #24519f 100%);
  position: relative;
  z-index: 6;
}
.ticker-solid {
  background: #24519f;
  position: relative;
  z-index: 9;
}
/* gap via margin (et non via gap) pour une boucle -50% parfaitement continue */
.ticker .ticker-track { gap: 0; padding: 10px 0; }
.ticker .ticker-track > * { margin-right: 35px; }

/* ================================================================
   ABOUT  -  BIENVENUE CHEZ LA FEDET
   ================================================================ */
#presentation { padding: 130px 0 60px; }
#presentation h2 { margin-bottom: 71px; }
.about-cols {
  display: flex;
  gap: 40px;
  align-items: stretch;
}
.about-media {
  flex: 0 0 540px;
  border-radius: 8px;
}
.about-media img {
  width: 100%;
  height: 598px;
  object-fit: cover;
  border-radius: 8px;
}
.about-right {
  flex: 1;
  max-width: 485px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about-right p { color: var(--gray); }
.about-map {
  flex: 1;
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
  filter: grayscale(1);
}
.about-map iframe {
  border: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Stats / compteurs */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 110px;
}
.stat-card {
  position: relative;
  background: rgb(252, 252, 252);
  border: 1px solid rgba(9, 9, 9, 0.1);
  border-radius: 8px;
  padding: 42px 30px;
  text-align: center;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://framerusercontent.com/images/N9GeBa0CRBIhhvb9pYLnIeWF4gQ.svg?width=200&height=120");
  background-repeat: repeat;
  background-size: 20px auto;
  opacity: 0.1;
  pointer-events: none;
}
.stat-card h3 {
  position: relative;
  font-family: var(--sans);
  font-size: 62px;
  font-weight: 600;
  letter-spacing: -2px;
  line-height: 72px;
  color: rgb(23, 23, 23);
}
.stat-card p {
  position: relative;
  color: var(--gray);
  margin-top: 10px;
}

/* ================================================================
   COURSES  -  Nos engagements (cartes empilées sticky)
   ================================================================ */
#nos-engagements { padding: 150px 0 120px; }
.course-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 90px;
}
.course-card {
  position: sticky;
  top: 100px;
  height: 516px;
  border-radius: 8px;
  border: 1px solid rgb(230, 230, 230);
  overflow: hidden;
  background: var(--white);
}
.course-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-panel {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 440px;
  background: rgb(252, 252, 252);
  border-radius: 8px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.course-card.left  .course-panel { left: 50px; }
.course-card.right .course-panel { right: 50px; }
.course-panel h3 {
  font-family: var(--sans);
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 52px;
  color: var(--black);
}
.course-panel .desc { color: var(--gray); text-align: justify; }
.course-panel .meta { color: rgb(30, 30, 30); }

/* ================================================================
   LOCATIONS  -  ici c'EST… TOULON (cartes campus décalées)
   ================================================================ */
#campus { padding: 120px 0 90px; }
.campus-cards {
  position: relative;
  height: 1420px;
  margin-top: 100px;
}
.campus-card { position: absolute; width: 420px; border-radius: 8px; }
.campus-card:nth-child(1) { left: 20px;  top: 0; }
.campus-card:nth-child(2) { left: 680px; top: 140px; }  /* décalage +140px */
.campus-card:nth-child(3) { left: 20px; top: 720px; }
.campus-card:nth-child(4) { left: 680px; top: 860px; }
.campus-media {
  border-radius: 8px;
  overflow: hidden;
}
.campus-media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
}
.campus-card h3 { margin-top: 20px; }
.campus-card p  { margin-top: 10px; color: var(--gray); }

/* ================================================================
   RÉSEAU  -  associations adhérentes et partenaires
   ================================================================ */
#bureaux-etudiants { padding: 120px 0 100px; }
.association-grid {
  display: grid;
  gap: 14px;
  margin-top: 64px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.network-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border: 1px solid rgba(36, 81, 159, .11);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms var(--ease-out);
}
.network-card-association {
  --tile-accent: #24519f;
  --tile-tint: #eff5ff;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  gap: 14px;
  padding: 16px 10px 14px;
  border-color: transparent;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--tile-tint) 0%, rgba(255, 255, 255, .96) 72%);
}
.network-card-association:nth-child(4n + 2) {
  --tile-accent: #11a2bb;
  --tile-tint: #ebfbfd;
}
.network-card-association:nth-child(4n + 3) {
  --tile-accent: #7756c7;
  --tile-tint: #f4f0ff;
}
.network-card-association:nth-child(4n + 4) {
  --tile-accent: #eb7c5d;
  --tile-tint: #fff3ef;
}
.network-card-association::before {
  position: absolute;
  z-index: 0;
  top: -34px;
  left: 50%;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: var(--tile-accent);
  content: "";
  opacity: .08;
  transform: translateX(-50%);
  transition: opacity 220ms ease, transform 220ms var(--ease-out);
}
.network-card-association > * {
  position: relative;
  z-index: 1;
}
a.network-card:hover,
a.network-card:focus-visible {
  border-color: rgba(36, 81, 159, .42);
  box-shadow: 0 14px 32px rgba(17, 48, 97, .11);
  transform: translateY(-4px);
  outline: none;
}
.network-card-association:hover::before,
.network-card-association:focus-visible::before {
  opacity: .14;
  transform: translateX(-50%) scale(1.08);
}
a.network-card:active {
  transform: translateY(-1px) scale(.985);
}
.network-logo-media {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--tile-tint, #f5f7fb);
}
.network-card-association .network-logo-media {
  width: min(92px, 82%);
  margin-inline: auto;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 2px var(--tile-accent),
    0 10px 26px rgba(17, 48, 97, .13);
  transition: box-shadow 220ms ease, transform 220ms var(--ease-out);
}
.network-card-association:hover .network-logo-media,
.network-card-association:focus-visible .network-logo-media {
  box-shadow:
    0 0 0 3px var(--tile-accent),
    0 15px 32px rgba(17, 48, 97, .17);
  transform: translateY(-2px) scale(1.025);
}
.network-logo-media img {
  width: 100%;
  height: 100%;
  padding: 10%;
  object-fit: contain;
  filter: none;
  transition: transform 220ms var(--ease-out);
}
.network-card-association .network-logo-media img {
  padding: 3%;
  border-radius: 50%;
}
.network-card:hover .network-logo-media img {
  transform: scale(1.035);
}
.network-card-association:hover .network-logo-media img {
  transform: scale(1.11);
}
.network-monogram {
  width: 64%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-family: var(--display);
  font-size: clamp(20px, 2.1vw, 34px);
}
.network-card-association .network-monogram {
  width: 100%;
  height: 100%;
  background: var(--tile-accent);
  font-size: clamp(18px, 1.8vw, 28px);
}
.network-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.network-copy strong {
  align-self: start;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.25;
}
.network-card-association .network-copy strong {
  color: #1c2a40;
  font-size: 11px;
  font-weight: 700;
}
.partners-section {
  position: relative;
  overflow: hidden;
  padding: 104px 0 118px;
  background:
    radial-gradient(circle at 14% 12%, rgba(79, 154, 255, .24), transparent 34%),
    radial-gradient(circle at 88% 88%, rgba(20, 188, 194, .16), transparent 32%),
    #07162d;
  color: #fff;
}
.partners-section::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 85%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 85%);
}
.partners-section .container {
  position: relative;
  z-index: 1;
}
.partners-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: end;
  gap: 48px;
}
.partners-heading .eyebrow { color: #87b7ff; }
.partners-heading .display-lg,
.partners-heading .display-lg .w,
.partners-heading .display-lg .blue {
  color: #fff;
}
.partners-heading > p {
  color: rgba(255, 255, 255, .72);
  font-size: 17px;
  line-height: 1.55;
}
.partner-rail {
  position: relative;
  margin-top: 64px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.partner-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: partner-flow 30s linear infinite;
}
.partner-rail:hover .partner-track,
.partner-rail:focus-within .partner-track {
  animation-play-state: paused;
}
.partner-set {
  display: flex;
  gap: 16px;
  padding-right: 16px;
}
.network-card-partner {
  width: 286px;
  min-height: 132px;
  grid-template-columns: 94px minmax(0, 1fr);
  grid-template-rows: 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .18);
  text-align: left;
}
.network-card-partner .network-logo-media {
  aspect-ratio: 1;
  border: 1px solid rgba(36, 81, 159, .1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 48, 97, .08);
}
.network-card-partner .network-logo-media img { padding: 8%; }
.network-card-partner .network-monogram { font-size: 24px; }
.network-card-partner small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
}
.network-card-partner strong {
  color: #101d34;
  font-size: 17px;
  line-height: 1.2;
}
@keyframes partner-flow {
  to { transform: translateX(-50%); }
}

/* ================================================================
   GALLERY  -  fedet moments (3 rangées marquee horizontales, moteur anim.js)
   ================================================================ */
#gallery { padding: 120px 0; }
.gallery-wrap {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.gallery-wrap .ticker-track { gap: 0; } /* la marge des cartes gère l'espacement (boucle continue) */
.gallery-mobile-carousel { display: none; }
.g-row {
  display: flex;
  align-items: stretch;
  width: max-content;
  will-change: transform;
}
.g-card {
  flex: 0 0 auto;
  width: 366px;
  height: 320px;
  margin-right: 12px;
  border-radius: 8px;
}
.g-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* ================================================================
   TESTIMONIALS  -  NOS RÉSEAUX (cartes "livre" 3D)
   ================================================================ */
#contact { padding: 140px 0; }
.books {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 48px;
  margin-top: 90px;
}
.book {
  position: relative;
  width: 200px;
  height: 305px;
  perspective: 1200px;
  display: block;
}
/* léger tilt 3D au survol (prime sur le translateY de .hover-lift) */
.book.hover-lift:hover {
  transform: perspective(700px) translateY(-8px) rotate3d(1, 0, 0, 2deg);
}
.book .paper {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(239deg, rgb(255, 255, 255) 0%, rgb(224, 224, 224) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.book .paper b {
  font-family: var(--body);
  font-size: 20px;
  font-weight: 700;
  color: #000;
}
.book .paper i {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  color: #000;
  opacity: 0.3;
}
/* flèche "Click here" qui se décale au survol */
.book .paper i::after {
  content: " →";
  display: inline-block;
  margin-left: 5px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.book:hover .paper i::after { transform: translateX(4px); }
.book .cover {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  overflow: hidden;
  transform-origin: 0% 50%;
  transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.3, 1), box-shadow 0.6s ease;
  transform: rotateY(0deg);
  backface-visibility: hidden;
}
.book .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book .cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, black 0%, white 24%, black 40%, white 48%, transparent 100%);
  opacity: 0.2;
}
.book .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(38deg, rgba(115, 128, 125, 0.4) 0%, transparent 100%);
}
.book:hover .cover {
  transform: rotateY(-72deg);
  box-shadow: 0 30px 30px -3.75px rgba(0, 0, 0, 0.12), 0 12px 14px -3px rgba(0, 0, 0, 0.08);
}

/* ================================================================
   FAQ  -  accordéon (grid-template-rows 0fr -> 1fr : fluide, sans saut)
   ================================================================ */
#faq { padding: 120px 0 60px; }
#faq .sec-head h2 { max-width: 720px; margin-left: auto; margin-right: auto; }
.faq-col {
  max-width: 720px;
  margin: 90px auto 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.faq-item {
  background: rgb(252, 252, 252);
  border: 1px solid rgba(9, 9, 9, 0.1);
  border-radius: 8px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.1px;
  color: rgb(30, 30, 30);
}
/* icône + qui pivote en x à l'ouverture */
.faq-q .faq-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--blue);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.faq-item[data-open="true"] .faq-q .faq-icon { transform: rotate(45deg); }
.faq-panel > p {
  padding: 0 28px 26px;
  color: var(--gray);
  animation: faq-answer-in 0.25s ease both;
}
@keyframes faq-answer-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
/* ---- Tablette (810 – 1199px) ---- */
@media (max-width: 1199px) {
  .container { padding: 0 40px; }
  .hero .scribble { display: none; }
  .hero h1 { white-space: normal; }

  .about-cols { flex-wrap: wrap; }
  .about-media { flex: 1 1 420px; }
  .about-right { max-width: none; flex: 1 1 320px; }

  .course-panel h3 { font-size: 38px; line-height: 44px; }

  .campus-cards {
    position: static;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px 40px;
  }
  .campus-card { position: static; width: 420px; max-width: 100%; }
  .association-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---- Téléphone (≤ 809px) ---- */
@media (max-width: 809px) {
  .hero { min-height: 480px; }
  /* le titre FEDET ne déborde jamais : taille et letter-spacing resserrés */
  .hero h1 {
    font-size: clamp(48px, 17vw, 205px);
    letter-spacing: -0.075em;
  }
  .hero .hero-card-wrap {
    width: min(310px, 70vw);
    height: auto;
    aspect-ratio: 400 / 348;
    left: 50%;
    top: 56.62%;
    margin-left: calc(min(310px, 70vw) / -2);
    margin-top: calc(min(310px, 70vw) * -0.435);
  }
  .hero .scroll-down { font-size: 16px; }

  .tick-star { width: 30px; height: 30px; flex-basis: 30px; }

  #presentation { padding: 60px 0 40px; }
  #presentation h2 { margin-bottom: 40px; }
  .about-cols { flex-direction: column; gap: 40px; }
  .about-media { flex: none; }
  .about-media img { height: auto; }
  .about-right { max-width: none; }
  .about-map { flex: none; height: 300px; min-height: 300px; }
  .stats { grid-template-columns: 1fr; gap: 20px; margin-top: 55px; }
  .stat-card { text-align: left; }

  #nos-engagements { padding: 80px 0 60px; }
  .course-list { gap: 40px; margin-top: 50px; }
  .course-card {
    position: static;
    height: auto;
    display: flex;
    flex-direction: column;
    max-width: 390px;
    margin: 0 auto;
    width: 100%;
  }
  .course-card > img { position: static; height: 200px; width: 100%; }
  .course-panel {
    position: static;
    transform: none;
    width: auto;
    padding: 20px;
    gap: 20px;
  }
  .course-panel h3 { font-size: 30px; line-height: 32px; letter-spacing: -0.4px; }

  #campus { padding: 80px 0 60px; }
  .campus-cards { margin-top: 50px; gap: 40px; }
  .campus-card { width: 100%; }

  #bureaux-etudiants { padding: 80px 0 60px; }
  .association-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 42px;
  }
  .network-card-association {
    gap: 6px;
    min-height: 0;
    padding: 8px 4px 9px;
    border-radius: 14px;
  }
  .network-card-association::before {
    top: -24px;
    width: 78px;
    height: 78px;
  }
  .network-card-association .network-logo-media {
    width: min(58px, 88%);
    border-width: 2px;
    border-radius: 50%;
    box-shadow:
      0 0 0 1px var(--tile-accent),
      0 6px 16px rgba(17, 48, 97, .11);
  }
  .network-logo-media img {
    padding: 8%;
    filter: none;
  }
  .network-card-association .network-logo-media img { padding: 2%; }
  .network-card-association .network-monogram { font-size: 16px; }
  .network-card-association .network-copy strong {
    font-size: 9px;
    line-height: 1.18;
  }
  .partners-section { padding: 72px 0 82px; }
  .partners-heading { grid-template-columns: 1fr; gap: 20px; }
  .partners-heading > p { font-size: 15px; }
  .partner-rail {
    margin-top: 42px;
    margin-inline: -20px;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  }
  .partner-track { animation-duration: 24s; }
  .partner-set {
    gap: 10px;
    padding-right: 10px;
  }
  .network-card-partner {
    width: 246px;
    min-height: 110px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
  }
  .network-card-partner .network-logo-media { border-radius: 13px; }
  .network-card-partner strong { font-size: 15px; }
  .network-card-partner small { font-size: 9px; }
  .network-card-partner .network-monogram { font-size: 20px; }

  #gallery { padding: 80px 0; }
  .gallery-wrap { display: none; }
  .gallery-mobile-carousel {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 42px;
    padding: 0 0 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    overscroll-behavior-inline: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .gallery-mobile-carousel::-webkit-scrollbar { display: none; }
  .gallery-mobile-carousel .g-card {
    flex: 0 0 calc(100% - 24px);
    width: calc(100% - 24px);
    height: auto;
    min-width: 0;
    aspect-ratio: 16 / 11;
    margin: 0;
    border-radius: 12px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .gallery-mobile-carousel .g-card img { border-radius: 12px; }
  #contact { padding: 80px 0; }
  .books {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    justify-items: center;
    margin-top: 50px;
  }
  .book {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 200 / 305;
  }

  #faq { padding: 80px 0 40px; }
  .faq-col { margin-top: 50px; }
  .faq-q { font-size: 18px; padding: 20px; }
  .faq-panel > p { padding: 0 20px 20px; }
}

/* ---------- Footer : lettres FEDET animées à l'entrée à l'écran (cohérent team/404) ---------- */
.site-footer .footer-brand span { animation-play-state: paused; }
.site-footer .footer-brand.visible span { animation-play-state: running; }
/* après la montée (classe .rose posée en JS à animationend) : jiggle ressort au survol */
.site-footer .footer-brand span.rose {
  animation: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.site-footer .footer-brand span.rose:hover { transform: translateY(-6px); }

/* Reduced motion : pas de jiggle des lettres du footer (le kill-switch global
   d'anim.css ne couvre pas ce survol  -  durée 0.01ms = téléportation sinon) */
@media (prefers-reduced-motion: reduce) {
  .partner-rail {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
    scrollbar-width: none;
  }
  .partner-track {
    animation: none;
    will-change: auto;
  }
  .partner-set-copy { display: none; }
  .site-footer .footer-brand span.rose:hover { transform: none !important; }
}
