@import url("tokens.css");
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Inter:wght@400;600;700&display=swap");

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

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

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

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

ul { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary);
}

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 3rem 0; }

/* ===== VISUAL PLACEHOLDER ===== */
.visual-placeholder {
  display: block;
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-primary) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-primary) 10%, var(--color-bg)) 55%,
      color-mix(in srgb, var(--color-secondary) 18%, var(--color-bg)) 100%
    );
}
.visual-placeholder[data-aspect="4:3"]  { aspect-ratio: 4 / 3;  }
.visual-placeholder[data-aspect="1:1"]  { aspect-ratio: 1 / 1;  }
.visual-placeholder[data-aspect="3:4"]  { aspect-ratio: 3 / 4;  }
.visual-placeholder[data-aspect="21:9"] { aspect-ratio: 21 / 9; }

.visual-placeholder[data-tone="secondary"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-secondary) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-secondary) 10%, var(--color-bg)) 55%,
      color-mix(in srgb, var(--color-primary) 16%, var(--color-bg)) 100%
    );
}
.visual-placeholder[data-tone="accent"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-accent, var(--color-primary)) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-primary) 12%, var(--color-bg)) 60%,
      color-mix(in srgb, var(--color-secondary) 16%, var(--color-bg)) 100%
    );
}
.visual-placeholder[data-tone="muted"] {
  background: color-mix(in srgb, var(--color-text) 8%, var(--color-bg));
}

/* ===== HEADER / NAV ===== */
.site-header {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo svg text { fill: #FFFFFF; }

.site-logo img { height: 44px; filter: brightness(0) invert(1); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  aria-label: "Menu";
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.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); }

.site-nav {
  display: none;
  background: var(--color-primary);
  padding: 0.5rem 0 1rem;
}

.site-nav.is-open { display: block; }

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-nav a {
  display: block;
  color: rgba(255,255,255,0.88);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-secondary);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #094f5d 60%, #07404c 100%);
  color: #FFFFFF;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.hero h1 {
  color: #FFFFFF;
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.hero .tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-secondary);
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero p {
  color: rgba(255,255,255,0.88);
  font-size: 1rem;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}

.hero-placeholder {
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:hover { transform: translateY(-1px); }

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

.btn-primary:hover {
  background: #e0aa10;
  border-color: #e0aa10;
}

.btn-outline {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: #FFFFFF;
}

.btn-accent {
  background: var(--color-accent);
  color: #FFFFFF;
  border-color: var(--color-accent);
}

.btn-accent:hover { background: #d93434; border-color: #d93434; }

.btn-dark {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.btn-dark:hover { background: #0a5566; }

/* ===== SECTION TITLES ===== */
.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 { margin-bottom: 0.5rem; }

.section-title p {
  color: #4b5563;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== ATOUTS / FEATURES GRID ===== */
.atouts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.atout-card {
  background: #f0f9fb;
  border-left: 4px solid var(--color-primary);
  border-radius: 6px;
  padding: 1.5rem;
}

.atout-card h3 { color: var(--color-primary); margin-bottom: 0.5rem; }

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.pricing-card {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
  background: var(--color-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pricing-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 4px 18px rgba(13,106,126,0.12);
}

.pricing-card .price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-card .price-unit {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.pricing-card ul {
  list-style: none;
  margin-bottom: 1.25rem;
}

.pricing-card ul li {
  padding: 0.35rem 0;
  padding-left: 1.4rem;
  position: relative;
  font-size: 0.95rem;
}

.pricing-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.badge-featured {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

/* ===== CTA BAND ===== */
.cta-band {
  background: var(--color-primary);
  color: #FFFFFF;
  text-align: center;
  padding: 2.5rem 1.25rem;
}

.cta-band h2 { color: #FFFFFF; margin-bottom: 0.75rem; }
.cta-band p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }

.cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

/* ===== COACHES ===== */
.coaches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.coach-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.coach-card .coach-photo {
  border-radius: 8px;
}

/* ===== STATS ===== */
.stats-band {
  background: var(--color-primary);
  padding: 2rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-item .stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1;
}

.stat-item .stat-label {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }

details {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

details summary {
  font-family: var(--font-display);
  font-weight: 700;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
  color: var(--color-primary);
}

details summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--color-primary);
  transition: transform 0.2s;
  flex-shrink: 0;
}

details[open] summary::after { transform: rotate(45deg); }

details .faq-answer {
  padding: 1rem 1.25rem;
  background: var(--color-bg);
  color: #374151;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-info { display: flex; flex-direction: column; gap: 1rem; }

.contact-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-bg));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-item a {
  color: var(--color-primary);
  text-decoration: underline;
}

.contact-form {
  background: #f9fafb;
  border-radius: 10px;
  padding: 1.5rem;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.rgpd-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 1rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.75rem;
}

.map-wrapper {
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.map-wrapper iframe {
  width: 100%;
  height: 300px;
  border: 0;
  display: block;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #0a1a1f;
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .footer-logo { margin-bottom: 0.75rem; }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.88rem; }

.footer-nav h4,
.footer-contact h4 {
  font-family: var(--font-display);
  color: #FFFFFF;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-nav ul { display: flex; flex-direction: column; gap: 0.4rem; }

.footer-nav a {
  color: rgba(255,255,255,0.65);
  transition: color 0.15s;
}

.footer-nav a:hover { color: var(--color-secondary); }

.footer-contact p { margin-bottom: 0.4rem; }

.footer-contact a {
  color: var(--color-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}

/* ===== DEBUTANTS PAGE ===== */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  counter-reset: steps;
}

.step-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: var(--color-primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}

/* ===== PAGE HEADER (inner pages) ===== */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #094f5d 100%);
  color: #FFFFFF;
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.page-header h1 { color: #FFFFFF; }

.page-header .subtitle {
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  margin: 0.5rem auto 0;
}

/* ===== BG VARIANTS ===== */
.bg-light { background: #f3fafb; }
.bg-sand { background: #F9F5EB; }

/* ===== TESTIMONIALS ===== */
.testimonial-placeholder {
  text-align: center;
  padding: 2rem;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  color: #9ca3af;
  font-style: italic;
}

/* ===== TABLET + ===== */
@media (min-width: 640px) {
  .atouts-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .coaches-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-cta-group { flex-direction: row; justify-content: center; }
  .cta-group { flex-direction: row; justify-content: center; }
}

/* ===== DESKTOP ===== */
@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .site-nav {
    display: block;
    background: transparent;
    padding: 0;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 0.25rem;
    padding: 0;
    align-items: center;
  }

  .site-nav a {
    padding: 0.5rem 0.85rem;
    border-bottom: none;
    border-radius: 5px;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: rgba(255,255,255,0.12);
    color: var(--color-secondary);
  }

  .contact-grid { grid-template-columns: 1fr 1.5fr; }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .coaches-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-secondary);
  color: var(--color-text);
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 700;
  font-size: 0.875rem;
  z-index: 9999;
  transition: top 0.15s;
}

.skip-link:focus { top: 0; }

/* ===== ANIMATIONS — Simply CrossFit (Lot 7 / WEB-1899) ===== */

/* Scroll-reveal initial state — class toggled by main.js IntersectionObserver.
   Kept inside no-preference so cards are always visible without JS or reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  .will-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .will-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
  }
  /* Stagger siblings in the same grid row */
  .will-reveal:nth-child(2) { transition-delay: 0.08s; }
  .will-reveal:nth-child(3) { transition-delay: 0.16s; }
  .will-reveal:nth-child(4) { transition-delay: 0.24s; }
}

/* Reduced-motion safety net */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .will-reveal { opacity: 1 !important; transform: none !important; }
}

@media (prefers-reduced-motion: no-preference) {

  /* 1 — Hero fade-in (index.html) */
  @keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .hero .tagline    { animation: hero-fade-up 0.6s ease both; }
  .hero h1          { animation: hero-fade-up 0.6s ease 0.12s both; }
  .hero p:not(.tagline) { animation: hero-fade-up 0.6s ease 0.22s both; }
  .hero-cta-group   { animation: hero-fade-up 0.6s ease 0.32s both; }
  .hero-placeholder { animation: hero-fade-up 0.6s ease 0.44s both; }

  /* Same fade for inner page headers */
  .page-header h1        { animation: hero-fade-up 0.6s ease both; }
  .page-header .subtitle { animation: hero-fade-up 0.6s ease 0.15s both; }

  /* 2 — Pricing-card hover lift */
  .pricing-card {
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  }
  .pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(13,106,126,0.18);
    border-color: var(--color-primary);
  }

  /* 3 — Atout-card hover subtle lift */
  .atout-card {
    transition: box-shadow 0.22s, transform 0.22s;
  }
  .atout-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(13,106,126,0.1);
  }

  /* 4 — CTA band — pulsing ring on primary button */
  @keyframes cta-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0.45); }
    55%       { box-shadow: 0 0 0 10px rgba(251,191,36,0); }
  }
  .cta-band .btn-primary {
    animation: cta-pulse 2.6s ease-in-out 1s infinite;
  }

  /* 5 — Sticky nav shadow grows on scroll (CSS scroll-driven, Chromium 115+) */
  @supports (animation-timeline: scroll()) {
    .site-header {
      box-shadow: none;
      animation: nav-shadow-grow linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 80px;
    }
    @keyframes nav-shadow-grow {
      from { box-shadow: 0 0 0 transparent; }
      to   { box-shadow: 0 4px 20px rgba(0,0,0,0.28); }
    }
  }

  /* 6 — Visual placeholder hover shimmer sweep + lift */
  .visual-placeholder {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .visual-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      105deg,
      transparent 40%,
      rgba(255,255,255,0.22) 50%,
      transparent 60%
    );
    background-size: 200% 100%;
    background-position: -100% 0;
    transition: background-position 0.55s ease;
    pointer-events: none;
  }
  .visual-placeholder:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13,106,126,0.13);
  }
  .visual-placeholder:hover::after {
    background-position: 200% 0;
  }

  /* 7 — Focus-visible ring — halo aux couleurs brand */
  :focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
    border-radius: 3px;
  }

}
