/* ============================================================
   US Monteil Handball — Site vitrine
   Palette inspirée du logo : bleu loup, bleu marine, blanc
   ============================================================ */

:root {
  --navy:        #0f1f3d;   /* bleu marine profond du logo */
  --navy-2:      #15294f;
  --navy-3:      #1d3a6e;
  --blue:        #2f7fd4;   /* bleu loup */
  --blue-light:  #5aa6ef;
  --blue-ice:    #cfe4fb;
  --white:       #ffffff;
  --paper:       #f5f8fd;
  --text:        #1a2436;
  --text-muted:  #5b6577;
  --line:        rgba(15, 31, 61, 0.10);
  --shadow:      0 18px 40px -18px rgba(15, 31, 61, 0.35);
  --shadow-sm:   0 8px 24px -12px rgba(15, 31, 61, 0.30);
  --radius:      18px;
  --radius-sm:   12px;
  --maxw:        1180px;
  --ease:        cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typo helpers ---------- */
h1, h2, h3 {
  font-family: 'Barlow Condensed', 'Inter', sans-serif;
  line-height: 1.02;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 700;
  font-size: .9rem;
  color: var(--blue);
  margin-bottom: 12px;
}
.eyebrow--light { color: var(--blue-light); }

.section__title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: var(--navy);
}
.section__title--light { color: var(--white); }

.section__lead { color: var(--text-muted); max-width: 620px; margin-top: 14px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 1.05rem;
  padding: 14px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
}
.btn--primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white);
  box-shadow: 0 12px 28px -10px rgba(47, 127, 212, .7);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -10px rgba(47, 127, 212, .85); }
.btn--ghost {
  background: rgba(255,255,255,.08);
  color: var(--white);
  border-color: rgba(255,255,255,.55);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { background: rgba(255,255,255,.18); transform: translateY(-3px); }
.btn--sm { padding: 10px 22px; font-size: .95rem; }
.btn--lg { padding: 17px 40px; font-size: 1.2rem; }
.btn--block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, box-shadow .3s, padding .3s;
  padding: 14px 0;
}
.header--scrolled {
  background: rgba(15, 31, 61, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px -12px rgba(0,0,0,.6);
  padding: 8px 0;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; }
.header__logo { height: 52px; width: auto; transition: height .3s; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.header--scrolled .header__logo { height: 42px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600;
  font-size: 1.05rem;
  color: rgba(255,255,255,.85);
  padding: 8px 16px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav__link:hover { color: var(--white); background: rgba(255,255,255,.10); }
.nav__link--cta {
  background: var(--blue); color: var(--white);
  box-shadow: 0 8px 20px -10px rgba(47,127,212,.9);
}
.nav__link--cta:hover { background: var(--blue-light); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav__toggle span { width: 26px; height: 3px; background: var(--white); border-radius: 3px; transition: .3s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.08);
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom { to { transform: scale(1.18); } }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 20% 20%, rgba(47,127,212,.35), transparent 55%),
    linear-gradient(180deg, rgba(15,31,61,.80) 0%, rgba(15,31,61,.72) 40%, rgba(15,31,61,.92) 100%);
}
.hero__content { position: relative; z-index: 2; color: var(--white); padding-top: 80px; max-width: 760px; }
.hero__emblem {
  width: 96px; margin-bottom: 22px;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.5));
  animation: floatY 5s ease-in-out infinite;
}
@keyframes floatY { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }
.hero__eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase; letter-spacing: 4px; font-weight: 600;
  color: var(--blue-ice); margin-bottom: 10px; font-size: 1rem;
}
.hero__title {
  font-size: clamp(3.2rem, 9vw, 6.5rem); font-weight: 800;
  text-shadow: 0 8px 30px rgba(0,0,0,.45);
}
.hero__title span { color: var(--blue-light); }
.hero__subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: rgba(255,255,255,.92); max-width: 560px; margin: 22px 0 34px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 2; width: 26px; height: 44px; border: 2px solid rgba(255,255,255,.6);
  border-radius: 999px; display: flex; justify-content: center; padding-top: 8px;
}
.hero__scroll span { width: 4px; height: 9px; background: var(--white); border-radius: 4px; animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0%{opacity:0; transform: translateY(-4px);} 50%{opacity:1;} 100%{opacity:0; transform: translateY(12px);} }

/* ============================================================
   STATS
   ============================================================ */
.stats { background: var(--navy); color: var(--white); }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; padding: 46px 24px;
}
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after {
  content: ''; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  width: 1px; height: 56px; background: rgba(255,255,255,.14);
}
.stat__num {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 3.6rem); color: var(--blue-light); line-height: 1;
}
.stat__plus { font-family: 'Barlow Condensed'; font-weight: 800; font-size: 2rem; color: var(--blue-light); }
.stat__label {
  display: block; margin-top: 8px; color: rgba(255,255,255,.78);
  text-transform: uppercase; letter-spacing: 1.5px; font-size: .82rem; font-weight: 600;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 90px 0; }
.section--alt { background: linear-gradient(180deg, var(--paper), #eaf1fb); }
.section__head { text-align: center; max-width: 700px; margin: 0 auto 54px; }
.section__head .section__lead { margin-left: auto; margin-right: auto; }

/* ---------- Le club ---------- */
.club__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.club__text p { color: var(--text-muted); margin-top: 16px; font-size: 1.05rem; }
.club__values { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.club__values li {
  padding-left: 30px; position: relative; color: var(--text); font-size: 1.02rem;
}
.club__values li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  transform: rotate(45deg);
}
.club__media { position: relative; }
.club__img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center top; }
.club__badge {
  position: absolute; bottom: -22px; left: -22px;
  background: var(--white); border-radius: 999px; padding: 12px 22px 12px 12px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.club__badge img { width: 46px; }
.club__badge span { font-family: 'Barlow Condensed'; font-weight: 800; text-transform: uppercase; color: var(--navy); letter-spacing: 1px; }

/* ---------- Équipes ---------- */
.teams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.team-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.team-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.team-card__img {
  height: 230px; background-size: cover; background-position: center top;
  position: relative;
}
.team-card__img::after {
  content:''; position:absolute; inset:0;
  background: linear-gradient(180deg, transparent 50%, rgba(15,31,61,.25));
}
.team-card__body { padding: 22px 24px 26px; }
.team-card__body h3 { font-size: 1.5rem; color: var(--navy); font-weight: 700; }
.team-card__body p { color: var(--text-muted); margin-top: 8px; font-size: .98rem; }
.team-card--join {
  background: linear-gradient(150deg, var(--navy), var(--navy-3));
  color: var(--white); display: flex; align-items: center;
}
.team-card__body--center { text-align: center; padding: 36px 28px; }
.team-card--join h3 { color: var(--white); }
.team-card--join p { color: rgba(255,255,255,.82); margin-bottom: 20px; }
.team-card__icon { width: 64px; margin: 0 auto 14px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }

/* ---------- Galerie ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px; gap: 18px;
}
.gallery__item {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.gallery__item--lg { grid-column: span 2; grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 18px 14px; color: var(--white);
  font-family: 'Barlow Condensed'; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  font-size: 1.15rem;
  background: linear-gradient(180deg, transparent, rgba(15,31,61,.85));
}

/* ---------- CTA Rejoindre ---------- */
.section--cta { position: relative; color: var(--white); overflow: hidden; }
.cta-bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.cta-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,31,61,.92), rgba(29,58,110,.90));
}
.cta__content { position: relative; z-index: 2; text-align: center; max-width: 900px; }
.cta__lead { color: rgba(255,255,255,.9); font-size: 1.1rem; max-width: 640px; margin: 16px auto 44px; }
.cta__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 48px; }
.cta-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 30px 24px; text-align: left;
  backdrop-filter: blur(6px);
  transition: transform .3s var(--ease), background .3s;
}
.cta-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.12); }
.cta-card__step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  font-family: 'Barlow Condensed'; font-weight: 800; font-size: 1.5rem;
  margin-bottom: 14px;
}
.cta-card h3 { color: var(--white); font-size: 1.4rem; }
.cta-card p { color: rgba(255,255,255,.8); margin-top: 6px; font-size: .98rem; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact__info p { color: var(--text-muted); margin-top: 16px; font-size: 1.05rem; }
.contact__list { list-style: none; margin: 28px 0; display: grid; gap: 16px; }
.contact__list li { display: flex; align-items: center; gap: 14px; font-size: 1.02rem; }
.contact__icon {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  background: var(--blue-ice); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.contact__list a:hover { color: var(--blue); }
.contact__socials { display: flex; gap: 12px; }
.social {
  font-family: 'Barlow Condensed'; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 10px 20px; border-radius: 999px; border: 2px solid var(--line);
  transition: .25s;
}
.social:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

.contact__form {
  background: var(--white); border-radius: var(--radius); padding: 34px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: 'Barlow Condensed'; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--navy);
  margin-bottom: 6px; font-size: .95rem;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 1rem;
  color: var(--text); background: var(--paper); transition: border .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47,127,212,.14); background: var(--white);
}
.field textarea { resize: vertical; }
.form__note {
  margin-top: 14px; text-align: center; color: var(--blue);
  font-weight: 600; background: var(--blue-ice); padding: 12px; border-radius: var(--radius-sm);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--navy); color: rgba(255,255,255,.8); }
.footer__inner {
  display: flex; justify-content: space-between; align-items: center; gap: 30px;
  padding: 50px 24px; flex-wrap: wrap;
}
.footer__brand img { height: 56px; margin-bottom: 12px; }
.footer__brand p { max-width: 320px; font-size: .95rem; }
.footer__nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__nav a {
  font-family: 'Barlow Condensed'; text-transform: uppercase; letter-spacing: 1px;
  font-weight: 600; transition: color .2s;
}
.footer__nav a:hover { color: var(--blue-light); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.10); padding: 18px 0; }
.footer__bottom p { font-size: .88rem; text-align: center; color: rgba(255,255,255,.55); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.backtop {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--blue); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; box-shadow: 0 10px 24px -8px rgba(47,127,212,.8);
  opacity: 0; pointer-events: none; transform: translateY(16px);
  transition: opacity .3s, transform .3s, background .2s;
}
.backtop--show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.backtop:hover { background: var(--blue-light); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg, .hero__emblem, .hero__scroll span { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .club__grid { grid-template-columns: 1fr; gap: 40px; }
  .club__media { max-width: 460px; margin: 0 auto; }
  .teams { grid-template-columns: repeat(2, 1fr); }
  .cta__cards { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 6px; padding: 100px 24px 40px;
    background: rgba(15,31,61,.98); backdrop-filter: blur(12px);
    transform: translateX(100%); transition: transform .35s var(--ease);
    box-shadow: -20px 0 50px -20px rgba(0,0,0,.7);
  }
  .nav--open { transform: translateX(0); }
  .nav__link { font-size: 1.3rem; padding: 12px 18px; }
  .nav__toggle { display: flex; z-index: 110; }
  .header { background: rgba(15,31,61,.92); backdrop-filter: blur(8px); }

  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 30px 10px; }
  .stat:nth-child(2)::after { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .gallery__item--lg { grid-column: span 2; grid-row: span 1; height: 240px; }
  .footer__inner { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 520px) {
  .section { padding: 64px 0; }
  .teams { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .club__badge { left: 50%; transform: translateX(-50%); bottom: -20px; }
}
