/* =========================================================
   Club Hippique de Kourou — styles
   Palette : terre & nature
   ========================================================= */

:root {
  --sand:        #F5EFE6;
  --sand-deep:   #EAE0D0;
  --leather:     #6B4F3A;
  --leather-dk:  #4E3825;
  --olive:       #4A5D3A;
  --olive-dk:    #374628;
  --ink:         #1A1A1A;
  --muted:       #6B6257;
  --line:        #D9CFBD;
  --white:       #FFFFFF;

  --font-serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6rem;

  --radius-sm: 4px;
  --radius:    10px;
  --radius-lg: 18px;

  --shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.06);
  --shadow:    0 12px 40px rgba(26, 26, 26, 0.12);

  --container:  1200px;
  --header-h:   76px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------- Reset léger --------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

img, picture { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
}

p { margin: 0 0 var(--space-2); }

ul { padding: 0; margin: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* --------- Header --------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(245, 239, 230, 0.85);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(245, 239, 230, 0.96);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--space-3);
}

.brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand-city {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--leather);
  margin-top: 2px;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.primary-nav a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.primary-nav a:hover {
  background: rgba(107, 79, 58, 0.08);
  color: var(--leather-dk);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease), top 0.25s var(--ease);
}
.nav-toggle-bar:nth-child(1) { top: 14px; }
.nav-toggle-bar:nth-child(2) { top: 21px; }
.nav-toggle-bar:nth-child(3) { top: 28px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  top: 21px; transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  top: 21px; transform: rotate(-45deg);
}

/* --------- Buttons --------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--olive); color: var(--white); }
.btn-primary:hover { background: var(--olive-dk); }

.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }

/* --------- Hero --------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  padding-top: var(--header-h);
}

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(26, 26, 26, 0.15) 0%, rgba(26, 26, 26, 0.55) 60%, rgba(26, 26, 26, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-6) var(--space-3);
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-3);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  margin-bottom: var(--space-3);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  max-width: 560px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: var(--space-4);
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.hero-scroll {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 28px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  display: inline-flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
}
.hero-scroll span {
  width: 3px;
  height: 8px;
  background: var(--white);
  border-radius: 2px;
  animation: scrollHint 1.8s infinite var(--ease);
}
@keyframes scrollHint {
  0%   { transform: translateY(0);  opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);  opacity: 0; }
}

/* --------- Sections génériques --------- */

.section { padding: var(--space-7) 0; }

.section-head {
  max-width: 760px;
  margin: 0 auto var(--space-5);
  text-align: center;
}

.section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--leather);
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.section-lede {
  color: var(--muted);
  font-size: 1.05rem;
}

/* --------- Two-column layout --------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}
.two-col.reverse .two-col-media { order: 2; }

.two-col-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
}
.stats li { display: flex; flex-direction: column; gap: 4px; }
.stat-value {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--olive);
  font-weight: 700;
}
.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------- Section club --------- */

.section-club { background: var(--white); }

/* --------- Cards grid (activités) --------- */

.section-activities { background: var(--sand); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card-media img { transform: scale(1.05); }

.card-body { padding: var(--space-3); flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.3rem; color: var(--ink); }
.card-body p { color: var(--muted); font-size: 0.97rem; }

.card-meta {
  margin-top: auto;
  padding-top: var(--space-2);
  color: var(--leather) !important;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* --------- Pricing --------- */

.section-pricing { background: var(--white); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.pricing-card {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.pricing-card:hover { transform: translateY(-3px); border-color: var(--leather); }

.pricing-card.featured {
  background: var(--olive);
  color: var(--white);
  border-color: var(--olive-dk);
  box-shadow: var(--shadow);
}
.pricing-card.featured h3 { color: var(--white); }
.pricing-card.featured p { color: rgba(255, 255, 255, 0.88); }
.pricing-card.featured .card-meta { color: rgba(255, 255, 255, 0.85) !important; }

.pricing-card h3 { font-size: 1.3rem; }
.pricing-price {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--leather);
  margin-bottom: var(--space-2);
  font-weight: 600;
}
.pricing-card.featured .pricing-price { color: var(--sand); }

.info-block {
  background: var(--sand);
  border-left: 4px solid var(--olive);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  max-width: 800px;
  margin: 0 auto;
}
.info-block h3 { font-size: 1.15rem; margin-bottom: var(--space-1); }
.info-block a { color: var(--olive); text-decoration: underline; text-underline-offset: 3px; }
.small-note { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* --------- Gallery --------- */

.section-gallery { background: var(--sand); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: var(--space-2);
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand-deep);
  position: relative;
  transition: transform 0.3s var(--ease);
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.3s var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); filter: brightness(1.05); }

.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

/* --------- Competitions --------- */

.section-competitions { background: var(--ink); color: var(--white); }
.section-competitions .section-title { color: var(--white); }
.section-competitions .section-eyebrow { color: var(--sand-deep); }
.section-competitions .section-lede { color: rgba(255, 255, 255, 0.75); }

.competitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
}

.competition {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.competition:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.25); }

.competition-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.competition-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.competition:hover .competition-media img { transform: scale(1.05); }

.competition-body { padding: var(--space-3); }
.competition-body h3 { color: var(--white); font-size: 1.2rem; }
.competition-body p { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; margin: 0; }

/* --------- Team --------- */

.section-team { background: var(--white); }
.section-team .two-col-media img { object-position: center 20%; }

/* --------- Contact --------- */

.section-contact { background: var(--sand); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-5);
  align-items: stretch;
}

.contact-info dl { margin: 0; }
.contact-row { padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-row dt {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--leather);
  font-weight: 600;
  margin-bottom: 4px;
}
.contact-row dd { margin: 0; font-size: 1.05rem; }
.contact-row a { color: var(--olive); text-decoration: underline; text-underline-offset: 3px; }
.contact-note {
  margin-top: var(--space-3);
  color: var(--muted);
  font-style: italic;
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 380px;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  display: block;
}

/* --------- Footer --------- */

.site-footer {
  background: var(--leather-dk);
  color: var(--sand);
  padding: var(--space-5) 0 var(--space-3);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-3);
  align-items: center;
}

.footer-brand { display: flex; align-items: center; gap: var(--space-2); }
.footer-logo { width: 44px; height: 44px; object-fit: contain; }
.footer-brand p { margin: 0; font-family: var(--font-serif); font-size: 1rem; line-height: 1.3; }
.footer-brand span { font-family: var(--font-sans); font-size: 0.78rem; color: rgba(245, 239, 230, 0.7); letter-spacing: 0.1em; text-transform: uppercase; }

.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.footer-nav a { font-size: 0.95rem; color: rgba(245, 239, 230, 0.9); }
.footer-nav a:hover { color: var(--white); }

.footer-copy {
  text-align: right;
  font-size: 0.85rem;
  color: rgba(245, 239, 230, 0.65);
  margin: 0;
}

/* --------- Reveal animations --------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------- Responsive --------- */

@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; gap: var(--space-4); }
  .two-col.reverse .two-col-media { order: 0; }
  .two-col-media img { aspect-ratio: 16 / 10; max-height: 480px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-item.wide { grid-column: span 2; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .section { padding: var(--space-6) 0; }

  .brand-city { display: none; }
  .brand-name { font-size: 1rem; }

  .nav-toggle { display: block; }

  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--sand);
    border-top: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
  }
  .primary-nav.is-open { max-height: 70vh; box-shadow: var(--shadow); }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-2) var(--space-3);
  }
  .primary-nav a {
    display: block;
    padding: 0.9rem 0.5rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .primary-nav li:last-child a { border-bottom: 0; }

  .hero { min-height: 92vh; }
  .hero-title { font-size: clamp(2.25rem, 9vw, 3.25rem); }
  .hero-ctas .btn { padding: 0.75rem 1.25rem; font-size: 0.9rem; }

  .stats { grid-template-columns: 1fr; text-align: left; }

  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gallery-item.wide, .gallery-item.tall { grid-column: auto; grid-row: auto; }

  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-copy { text-align: center; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .container { padding: 0 var(--space-2); }
  .card-body, .pricing-card, .info-block { padding: var(--space-3); }
}

/* --------- Focus accessible --------- */

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
