/* ==========================================================================
   BASE — reset, variables de design, typographie
   ========================================================================== */

:root {
  /* Couleurs -------------------------------------------------------------- */
  --ink:        #0B1210;
  --ink-2:      #121C18;
  --ink-3:      #1B2723;
  --cream:      #F8F6F1;
  --cream-2:    #EFEBE1;
  --sand:       #E2DACA;
  --green:      #0F6B4F;
  --green-dk:   #0A4634;
  --mint:       #16A97C;
  --clay:       #C4562F;
  --clay-lt:    #E0794E;
  --ball:       #D9F24E;

  --txt:        #121A17;
  --txt-soft:   #55625C;
  --txt-faint:  #8C9791;
  --line:       color-mix(in oklab, var(--txt) 12%, transparent);
  --line-soft:  color-mix(in oklab, var(--txt) 7%, transparent);

  /* Couleurs des vraies surfaces de jeu (elles ne suivent pas les thèmes :
     ce sont celles des courts du club, terre battue et green set).        */
  --court-terre: #B4502A;
  --court-green: #2C7A54;
  --court-lignes: #FFFFFF;

  /* Surfaces */
  --bg:         var(--cream);
  --surface:    #FFFFFF;

  /* Typo ------------------------------------------------------------------ */
  --font-display: "Bricolage Grotesque", "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-hero:  clamp(3.1rem, 14.5vw, 8.25rem);
  --fs-h2:    clamp(2.05rem, 4.6vw, 3.8rem);
  --fs-h3:    clamp(1.35rem, 2.4vw, 2rem);
  --fs-lead:  clamp(1.05rem, 1.55vw, 1.35rem);
  --fs-body:  clamp(0.98rem, 1.05vw, 1.05rem);
  --fs-small: 0.83rem;

  /* Espacements ----------------------------------------------------------- */
  --gutter:    clamp(1.25rem, 5vw, 4.5rem);
  --section-y: clamp(5rem, 12vh, 10rem);
  --maxw:      1320px;

  /* Rayons / ombres ------------------------------------------------------- */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --shadow-sm: 0 1px 2px rgba(11,18,16,.04), 0 4px 14px rgba(11,18,16,.05);
  --shadow-md: 0 2px 6px rgba(11,18,16,.05), 0 18px 45px -18px rgba(11,18,16,.22);
  --shadow-lg: 0 30px 80px -30px rgba(11,18,16,.4);

  /* Animation ------------------------------------------------------------- */
  --ease:      cubic-bezier(.22,1,.36,1);
  --ease-out:  cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --dur:       .7s;

  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--ball); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Utilitaires -------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--txt-soft);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: .5;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--txt-soft);
  max-width: 62ch;
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section-head {
  display: grid;
  gap: 1.25rem;
  max-width: 68ch;
  margin-bottom: clamp(2.25rem, 5vw, 3.75rem);
}
.section-head h2 { font-size: var(--fs-h2); }

.section--dark {
  background: var(--ink);
  color: var(--cream);
  --txt: var(--cream);
  --txt-soft: color-mix(in oklab, var(--cream) 62%, transparent);
  --txt-faint: color-mix(in oklab, var(--cream) 40%, transparent);
  --line: color-mix(in oklab, var(--cream) 14%, transparent);
  --line-soft: color-mix(in oklab, var(--cream) 8%, transparent);
  --surface: #18241F;
}

/* Ligne fine décorative ---------------------------------------------------- */
.rule {
  height: 1px;
  background: var(--line);
  transform-origin: left;
}

/* Texte en dégradé --------------------------------------------------------- */
.grad-text {
  background: linear-gradient(100deg, var(--mint), var(--ball) 55%, var(--clay-lt));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Lien d'évitement ---------------------------------------------------------- */
.skip {
  position: absolute;
  left: 50%;
  top: -100px;
  z-index: 200;
  transform: translateX(-50%);
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  transition: top .3s var(--ease);
}
.skip:focus { top: 0; }

[hidden] { display: none !important; }

/* Section en fond alterné --------------------------------------------------- */
.section--alt { background: var(--cream-2); }
