/* ═══════════════════════════════════════════════════════════
   Do-aï Saint-Gillois — Base stylesheet
   Palette, typographie, shell (header/footer/preloader), CTA.
   Partagé entre site.html, mentions-legales.html, rgpd.html,
   fondements.html.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Palette */
  --ink: #0B0B0B;
  --ink-soft: #2E2B27;
  --neutral: #6B6560;
  --paper: #FAF6EE;
  --paper-deep: #F1EAD8;
  --paper-warm: #E8DCC4;
  --urushi: #C8102E;
  --urushi-dark: #9E0C24;
  --line: rgba(11, 11, 11, 0.10);
  --line-strong: rgba(11, 11, 11, 0.22);
  --shadow-soft: 0 30px 60px -20px rgba(60, 40, 15, 0.18);
  --shadow-card: 0 20px 40px -20px rgba(60, 40, 15, 0.22);

  /* Motion */
  --ease: cubic-bezier(0.32, 0.72, 0.24, 1);
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --dur-fast: 0.18s;
  --dur: 0.32s;
  --dur-slow: 0.6s;

  /* Espacements */
  --gutter-max: 1240px;
  --gutter-x: clamp(24px, 6vw, 96px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; display: block; }
::selection { background: var(--urushi); color: var(--paper); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--urushi); outline-offset: 3px; border-radius: 2px; }
a, button { -webkit-tap-highlight-color: transparent; }

/* --- Préloader --- */
#preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--paper);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px;
  animation: preloaderOut 0.8s var(--ease-out) 3.2s forwards;
}
#preloader.gone { display: none; }
.preloader-logo {
  height: clamp(96px, 14vw, 140px); width: auto;
  opacity: 0; transform: scale(0.92);
  animation: preloaderLogoIn 1.1s var(--ease-out) 0.1s forwards,
             preloaderLogoOut 0.8s var(--ease-out) 3.2s forwards;
}
.preloader-line {
  width: 0; height: 1px; background: var(--urushi);
  animation: preloaderLineIn 1.2s var(--ease-out) 0.6s forwards;
}
.preloader-name {
  opacity: 0;
  font-family: 'Fraunces', serif;
  font-size: 13px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--neutral);
  animation: preloaderNameIn 0.9s var(--ease-out) 1.3s forwards;
}
@keyframes preloaderLogoIn { 0% { opacity: 0; transform: scale(0.92); } 100% { opacity: 1; transform: scale(1); } }
@keyframes preloaderLogoOut { 0% { transform: scale(1); } 100% { transform: scale(1.06); } }
@keyframes preloaderLineIn { 0% { width: 0; opacity: 0; } 100% { width: 60px; opacity: 1; } }
@keyframes preloaderNameIn { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes preloaderOut { 0% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
body.preloading { overflow: hidden; }

/* --- Scroll progress --- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: var(--urushi);
  width: 0%; z-index: 100;
  transition: width 0.12s linear;
}

/* --- Header --- */
header.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--gutter-x);
  background: rgba(250, 246, 238, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: padding 0.45s var(--ease-out), background-color 0.45s var(--ease-out),
              border-color 0.45s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
header.top.scrolled {
  padding-top: 12px; padding-bottom: 12px;
  background: rgba(250, 246, 238, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -12px rgba(0,0,0,0.10);
}
header.top .brand-logo, header.top .brand-name {
  transition: transform 0.45s var(--ease-out), font-size 0.45s var(--ease-out);
}
header.top.scrolled .brand-logo { transform: scale(0.88); }
header.top.scrolled .brand-name { font-size: 15px; }

.brand {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none;
  transition: opacity 0.4s var(--ease);
}
.brand:hover { opacity: 0.85; }
.brand-logo { height: 58px; width: auto; display: block; transition: transform 0.6s var(--ease); }
.brand:hover .brand-logo { transform: scale(1.04); }
.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 17px; font-weight: 500;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--ink); line-height: 1;
}
.brand-name em {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 500; letter-spacing: 3px;
  color: var(--urushi); text-transform: uppercase;
  margin-top: 6px; font-style: normal;
}

nav.primary {
  position: fixed; top: 0; right: 0;
  padding: 22px var(--gutter-x);
  display: flex; gap: 36px; align-items: center;
  z-index: 51;
  transition: padding 0.45s var(--ease-out);
}
header.top.scrolled ~ nav.primary {
  padding-top: 12px; padding-bottom: 12px;
}
nav.primary a {
  position: relative;
  font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; font-weight: 500;
  padding: 6px 0;
  transition: color 0.3s var(--ease-out);
}
nav.primary a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--urushi);
  transform: scaleX(0); transform-origin: right center;
  transition: transform 0.42s var(--ease-out);
}
nav.primary a:hover { color: var(--ink); }
nav.primary a:hover::after { transform: scaleX(1); transform-origin: left center; }
.nav-cta {
  padding: 10px 20px !important;
  border: 1px solid var(--ink); letter-spacing: 1px !important;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out), transform 0.15s var(--ease-out);
}
.nav-cta { position: relative; overflow: hidden; z-index: 1; }
.nav-cta::after { display: none; }
.nav-cta::before {
  content: ''; position: absolute; inset: 0;
  background: var(--urushi);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease-out);
  z-index: -1;
}
nav.primary a.nav-cta { background: var(--ink); color: var(--paper); }
nav.primary a.nav-cta:hover { color: var(--paper); border-color: var(--urushi); }
nav.primary a.nav-cta:hover::before { transform: scaleX(1); }
.nav-cta:active { transform: scale(0.96); transition-duration: 0.08s; }

/* --- Menu hamburger --- */
.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: none; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
  position: relative; z-index: 60;
}
.menu-toggle span {
  position: absolute; left: 10px; width: 24px; height: 1.5px;
  background: var(--ink); border-radius: 1px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s var(--ease-out), top 0.35s var(--ease-out);
}
.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 27px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
.nav-backdrop {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(11, 11, 11, 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
  backdrop-filter: blur(2px);
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* --- Layout --- */
main { padding-top: 96px; }
.container { max-width: var(--gutter-max); margin: 0 auto; }

/* --- Typographie --- */
.kicker {
  display: inline-block;
  font-size: 11px; letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--urushi); font-weight: 500;
  margin-bottom: 24px;
}
.kicker::before { content: '— '; }

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}
h1 { font-size: clamp(34px, 4.6vw, 62px); font-variation-settings: 'opsz' 96, 'SOFT' 30; line-height: 1.08; }
h2 { font-size: clamp(28px, 3.4vw, 46px); font-variation-settings: 'opsz' 96; line-height: 1.15; }
h3 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 500; line-height: 1.3; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 300; color: var(--urushi); }

p.lead { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; color: var(--ink-soft); max-width: 640px; margin-top: 24px; }
p { color: var(--ink-soft); }
p + p { margin-top: 16px; }
strong { color: var(--ink); font-weight: 600; }
a { color: var(--urushi); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 0.3s var(--ease-out); }
a:hover { color: var(--urushi-dark); }

/* --- CTA universels --- */
.cta-row { display: flex; gap: 24px; align-items: center; margin-top: 40px; flex-wrap: wrap; }
.cta {
  position: relative; overflow: hidden;
  display: inline-block; padding: 18px 34px;
  background: var(--ink); color: var(--paper);
  text-decoration: none;
  font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 500;
  border: 1px solid var(--ink);
  transition: color 0.4s var(--ease-out), transform 0.15s var(--ease-out),
              border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  z-index: 1;
}
.cta::before {
  content: ''; position: absolute; inset: 0;
  background: var(--urushi);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease-out); z-index: -1;
}
.cta:hover::before { transform: scaleX(1); }
.cta:hover { border-color: var(--urushi); box-shadow: 0 10px 24px -12px rgba(200, 16, 46, 0.35); }
.cta:active { transform: scale(0.97); transition-duration: 0.08s; }
.cta-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.cta-ghost::before { background: var(--ink); }
.cta-ghost:hover { color: var(--paper); border-color: var(--ink); box-shadow: 0 10px 24px -12px rgba(0,0,0,0.20); }

/* --- Reveal --- */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal="scale"] { transform: scale(0.97); }
[data-reveal="scale"].in { transform: scale(1); }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }

/* --- Footer --- */
footer.bottom {
  background: var(--ink); color: rgba(250, 246, 238, 0.65);
  padding: 72px var(--gutter-x) 40px;
  border-top: 1px solid rgba(250, 246, 238, 0.08);
}
.footer-grid {
  max-width: var(--gutter-max); margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr auto;
  gap: 60px; align-items: start;
}
.footer-col { font-size: 13px; line-height: 1.7; color: rgba(250, 246, 238, 0.65); }
.footer-col a { color: var(--paper); text-decoration: none; border-bottom: 1px solid rgba(250, 246, 238, 0.25); transition: border-color 0.3s; }
.footer-col a:hover { border-bottom-color: var(--urushi); color: var(--paper); }
.footer-col .brand-line {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 18px; letter-spacing: 1.5px; color: var(--paper);
  margin-bottom: 12px; font-weight: 500;
}
.footer-col .label {
  display: block;
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(250, 246, 238, 0.45); margin-bottom: 12px; font-weight: 500;
}
.footer-kanji {
  font-family: 'Noto Serif JP', serif;
  font-size: 36px; letter-spacing: 8px;
  color: rgba(250, 246, 238, 0.20);
  text-align: right; user-select: none;
}
.footer-legal {
  max-width: var(--gutter-max); margin: 48px auto 0;
  padding-top: 32px; border-top: 1px solid rgba(250, 246, 238, 0.10);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; letter-spacing: 1px; color: rgba(250, 246, 238, 0.45);
  flex-wrap: wrap; gap: 16px;
}
.footer-legal a { color: rgba(250, 246, 238, 0.65); text-decoration: none; transition: color 0.3s; }
.footer-legal a:hover { color: var(--urushi); }
.footer-legal .footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal .footer-nav a { color: rgba(250, 246, 238, 0.55); }
.footer-legal .footer-nav a:hover { color: var(--paper); }

/* --- Responsive --- */
/* --- Petit desktop : barre compacte, pour que le nom du club ne passe pas sous le menu --- */
@media (min-width: 1161px) and (max-width: 1560px) {
  header.top { padding-left: 32px; padding-right: 32px; }
  nav.primary { padding-left: 0; padding-right: 32px; gap: 20px; }
  nav.primary a { font-size: 11.5px; letter-spacing: 0.7px; }
  .nav-cta { padding: 9px 15px !important; letter-spacing: 0.7px !important; }
  .brand-logo { height: 48px; }
  .brand-name { font-size: 14px; letter-spacing: 1.6px; }
  .brand-name em { font-size: 9px; letter-spacing: 2px; margin-top: 4px; }
  header.top.scrolled .brand-name { font-size: 13px; }
}

@media (max-width: 1100px) {
  header.top { padding: 18px 32px; }
  nav.primary { gap: 26px; }
  .brand-name em { display: none; }
  .brand-name { font-size: 15px; }
}
/* --- Tablette paysage : le menu passe en tiroir avant de toucher le nom du club --- */
@media (max-width: 1160px) {
  .menu-toggle { display: inline-flex; }
  nav.primary {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(320px, 82vw);
    padding: 96px 32px 32px;
    background: var(--paper); z-index: 50;
    flex-direction: column; align-items: flex-start; gap: 4px;
    transform: translateX(105%);
    transition: transform 0.42s var(--ease-out);
    box-shadow: -20px 0 60px -20px rgba(0,0,0,0.25);
    overflow-y: auto;
  }
  nav.primary.open { transform: translateX(0); }
  nav.primary a {
    display: block; width: 100%;
    font-size: 18px; letter-spacing: 1px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line); color: var(--ink);
  }
  nav.primary a:last-child { border-bottom: none; }
  nav.primary a::after { display: none; }
  .nav-cta {
    margin-top: 20px; padding: 14px 22px !important;
    background: var(--ink); color: var(--paper); text-align: center;
  }
}
@media (max-width: 900px) {
  html { -webkit-text-size-adjust: 100%; }
  main { padding-top: 76px; }
  header.top { padding: 14px 20px; }
  .brand-logo { height: 44px; }
  header.top.scrolled .brand-logo { transform: scale(0.92); }
  .brand-name { font-size: 14px; letter-spacing: 1.5px; }
  .cta-row { gap: 16px; }
  .cta { padding: 16px 24px; font-size: 11px; letter-spacing: 2px; }
  footer.bottom { padding: 48px var(--gutter-x) 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-kanji { grid-column: 1 / -1; text-align: left; font-size: 30px; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  header.top { padding: 12px 16px; }
  .brand-logo { height: 40px; }
  .brand-name { font-size: 13px; letter-spacing: 1px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta { width: 100%; text-align: center; padding: 16px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  footer.bottom { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  [data-reveal] { opacity: 1; transform: none; }
  #preloader { display: none; }
}
