/* ===== Design tokens (charte graphique Massilia Défi Voile) ===== */
:root {
  --blue-dark: #004aad;
  --blue-deep: #1800ad;
  --blue-light: #5170ff;
  --yellow: #ffe063;
  --orange: #fda772;
  --pink: #f68b8b;
  --teal: #459dc5;

  --white: #ffffff;
  --off-white: #f7f8fb;
  --text: #1a1a2e;
  --text-muted: #55597a;

  --font-title: 'Cormorant Garamond', serif;
  --font-subtitle: 'Montserrat', sans-serif;
  --font-body: 'PT Serif', serif;

  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ===== Header / Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid #eaeaf0;
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-subtitle);
  font-weight: 700;
  font-size: clamp(0.72rem, 1.9vw, 1rem);
  color: var(--blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-family: var(--font-subtitle);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue-light);
}

.btn-cta {
  background: var(--yellow);
  color: var(--text);
  font-family: var(--font-subtitle);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 20px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 224, 99, 0.5);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex: none;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--blue-dark);
  border-radius: 2px;
}

@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid #eaeaf0;
    transition: max-height 0.25s ease;
  }

  .main-nav.open {
    max-height: 400px;
  }

  .main-nav a,
  .main-nav .btn-cta {
    width: 100%;
    padding: 16px 24px;
  }

  .main-nav .btn-cta {
    border-radius: 0;
  }

  .nav-toggle {
    display: flex;
  }
}

/* ===== Banner (bandeau photo d'accueil, effet parallax) ===== */
.banner {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background-image: linear-gradient(180deg, rgba(0, 20, 60, 0.25) 0%, rgba(0, 20, 60, 0.8) 100%),
    url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@media (max-width: 780px) {
  .banner {
    background-attachment: scroll;
  }
}

.banner-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
  color: var(--white);
  width: 100%;
}

.eyebrow {
  font-family: var(--font-subtitle);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 14px;
}

.banner-content h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.05;
  margin-bottom: 14px;
  font-style: italic;
}

.banner-dates {
  font-family: var(--font-subtitle);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 24px;
}

.banner-sub {
  font-family: var(--font-body);
  font-size: 1.15rem;
  max-width: 560px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.92);
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-primary,
.btn-secondary {
  font-family: var(--font-subtitle);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--yellow);
  color: var(--text);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 224, 99, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ===== Compte à rebours ===== */
.countdown {
  background: var(--off-white);
  padding: 50px 24px;
  text-align: center;
}

.countdown-label {
  font-family: var(--font-subtitle);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue-light);
  margin-bottom: 24px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.countdown-item {
  background: var(--white);
  border-radius: 16px;
  padding: 20px 28px;
  min-width: 90px;
  box-shadow: 0 4px 20px rgba(0, 74, 173, 0.08);
}

.countdown-number {
  display: block;
  font-family: var(--font-title);
  font-size: 2.6rem;
  color: var(--blue-dark);
  line-height: 1;
  margin-bottom: 6px;
}

.countdown-unit {
  font-family: var(--font-subtitle);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

@media (max-width: 500px) {
  .countdown-grid {
    gap: 12px;
  }

  .countdown-item {
    padding: 16px 16px;
    min-width: 70px;
  }

  .countdown-number {
    font-size: 2rem;
  }
}

/* ===== Intro ===== */
.intro {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}

.intro h2 {
  font-size: 2.4rem;
  color: var(--blue-dark);
  margin-bottom: 20px;
}

.intro p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.infos {
  background: var(--off-white);
  border-radius: 16px;
  padding: 32px;
}

.infos li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid #e3e4ee;
}

.infos li:last-child {
  border-bottom: none;
}

.infos li span:first-child {
  font-family: var(--font-subtitle);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue-light);
}

.infos li span:last-child {
  font-size: 1.05rem;
  font-weight: 600;
}

@media (max-width: 780px) {
  .intro {
    grid-template-columns: 1fr;
  }
}

/* ===== Chiffres teaser ===== */
.chiffres-teaser {
  background: var(--blue-dark);
  color: var(--white);
  padding: 70px 24px;
}

.chiffres-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.chiffre-item .nombre {
  font-family: var(--font-title);
  font-size: 3.2rem;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 10px;
}

.chiffre-item .label {
  font-family: var(--font-subtitle);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 780px) {
  .chiffres-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== En-tête de page ===== */
.page-header {
  background: var(--off-white);
  padding: 60px 24px 40px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--blue-dark);
  font-style: italic;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.page-hero {
  position: relative;
}

.page-hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 20, 60, 0.15) 0%, rgba(0, 20, 60, 0.7) 100%);
}

.page-hero-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.page-hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  font-style: italic;
  margin-bottom: 12px;
}

.page-hero-content p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

@media (max-width: 780px) {
  .page-hero-image {
    height: 260px;
  }
}

/* ===== Équipe ===== */
.team-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 70px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.team-card {
  text-align: center;
}

.avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  margin: 0 auto 20px;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 8px;
}

.team-card a {
  font-family: var(--font-subtitle);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-light);
  word-break: break-word;
}

.team-card a:hover {
  text-decoration: underline;
}

@media (max-width: 780px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Galerie photos ===== */
.gallery {
  background: var(--off-white);
  padding: 70px 24px;
}

.gallery h2 {
  max-width: var(--max-width);
  margin: 0 auto 32px;
  font-size: 2rem;
  color: var(--blue-dark);
  text-align: center;
}

.gallery-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width: 860px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.edition-tabs {
  max-width: var(--max-width);
  margin: 0 auto 32px;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.edition-tab {
  font-family: var(--font-subtitle);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--blue-dark);
  background: transparent;
  color: var(--blue-dark);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.edition-tab.active,
.edition-tab:hover {
  background: var(--blue-dark);
  color: var(--white);
}

.edition-panel {
  display: none;
}

.edition-panel.active {
  display: block;
}

.gallery-grid img {
  cursor: zoom-in;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-actions {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.lightbox-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.lightbox-icon-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-icon-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
  z-index: 2;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media (max-width: 600px) {
  .edition-tab {
    font-size: 0.8rem;
    padding: 8px 16px;
  }

  .lightbox-actions {
    top: 12px;
    right: 12px;
  }

  .lightbox-icon-btn {
    width: 34px;
    height: 34px;
  }

  .lightbox-icon-btn svg {
    width: 15px;
    height: 15px;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
  }

  .lightbox-nav svg {
    width: 18px;
    height: 18px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}

/* ===== Infos pratiques ===== */
.infos-pratiques {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 70px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.pratique-card {
  background: var(--off-white);
  border-radius: 16px;
  padding: 32px;
}

.pratique-card h3 {
  font-family: var(--font-subtitle);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue-light);
  margin-bottom: 16px;
}

.pratique-card p {
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.5;
}

.pratique-card p:last-child {
  margin-bottom: 0;
}

.pratique-card strong {
  color: var(--blue-dark);
}

@media (max-width: 860px) {
  .infos-pratiques {
    grid-template-columns: 1fr;
  }
}

/* ===== Formulaire d'inscription ===== */
.form-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px 80px;
  text-align: center;
}

.form-section h2 {
  font-size: 2rem;
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.form-section > p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.form-embed {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 74, 173, 0.12);
}

.form-embed iframe {
  width: 100%;
  height: 1400px;
  border: none;
  display: block;
}

/* ===== Histoire (page la-regate.html) ===== */
.histoire {
  max-width: 800px;
  margin: 0 auto;
  padding: 70px 24px;
}

.histoire h2 {
  font-size: 2.4rem;
  color: var(--blue-dark);
  margin-bottom: 24px;
  font-style: italic;
}

.histoire h3 {
  font-size: 1.6rem;
  color: var(--blue-dark);
  margin: 32px 0 12px;
}

.histoire p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

/* ===== Écoles / partenaires ===== */
.ecoles-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 80px;
  text-align: center;
}

.ecoles-section h2 {
  font-size: 2rem;
  color: var(--blue-dark);
  margin-bottom: 16px;
}

.ecoles-section > p {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 40px;
}

.ecoles-logos {
  max-width: 1000px;
  margin: 0 auto;
}

.logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 24px;
}

.logos-row img {
  max-height: 48px;
  width: auto;
  flex: none;
}

.logos-row--wrap {
  flex-wrap: wrap;
  row-gap: 28px;
}

@media (max-width: 700px) {
  .logos-row {
    flex-wrap: wrap;
    gap: 20px;
  }

  .logos-row img {
    max-height: 40px;
  }
}

@media (max-width: 420px) {
  .logos-row img {
    max-height: 32px;
  }

  .logos-row {
    gap: 14px;
  }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 32px 24px 24px;
  font-family: var(--font-subtitle);
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

.site-footer .credit {
  margin-top: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}
