/* SIPA : landing publique.
   Direction : la table de jeu. Fond = feutrine émeraude (brand par défaut),
   chaque bloc de contenu = une carte ivoire posée sur le tapis.
   Or réservé aux actions, rouge réservé aux enseignes. */

:root {
  --felt-950: #082B1E;
  --felt-900: #0C3B2A;
  --felt-800: #12523B;
  --felt-700: #1B7A5A;
  --ivory: #F5F1E6;
  --ivory-dim: #E4DDC9;
  --ink: #123527;
  --ink-soft: #3D5C4D;
  --gold: #D9A94A;
  --gold-deep: #B8862B;
  --suit-red: #C2402F;
  --radius-card: 16px;
  --radius-btn: 10px;
  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Spectral", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--felt-900);
  color: var(--ivory);
  line-height: 1.65;
}

h1, h2, h3 { font-family: var(--font-display); }

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

section[id] { scroll-margin-top: 1.5rem; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* révélation au scroll, CSS seul ; sans support, tout reste visible */
@supports (animation-timeline: view()) {
  .reveal {
    animation: fade-up 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
}

/* ── Héros : la table ───────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  /* lumière de table : halo central sur feutrine sombre */
  background: radial-gradient(1100px 700px at 50% 30%, var(--felt-800), var(--felt-950) 78%);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem clamp(1.2rem, 5vw, 4rem);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--ivory);
}
.nav__brand img { display: block; border-radius: 8px; box-shadow: 0 0 0 1px rgba(245, 241, 230, 0.25); }

.nav__links { display: flex; gap: 1.8rem; align-items: center; }

.nav__links a {
  color: var(--ivory-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--ivory); }

.nav__cta {
  color: var(--ink) !important;
  background: var(--gold);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
}
.nav__cta:hover { background: var(--gold-deep); }

.hero__content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
  flex-wrap: wrap;
  padding: 2.5rem clamp(1.2rem, 6vw, 4rem) 5rem;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}

.hero__text { max-width: 30rem; }

.hero__text,
.hero__card {
  animation: fade-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero__card { animation-delay: 0.25s; }

.hero__brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.1rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--ivory);
  max-width: 14ch;
}
.hero__title em { font-style: normal; color: var(--gold); }

.hero__actions { display: flex; gap: 1.6rem; margin-top: 2.2rem; flex-wrap: wrap; align-items: center; }

.hero__secondary {
  color: var(--ivory-dim);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s;
}
.hero__secondary:hover { color: var(--ivory); }

.hero__trust {
  margin-top: 1.4rem;
  font-size: 0.92rem;
  color: var(--ivory-dim);
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, border-color 0.2s;
}
.btn--primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.btn--primary:hover { background: var(--gold-deep); transform: translateY(-2px); }
/* la carte clé : signature du site */
.keycard {
  position: relative;
  width: clamp(180px, 22vw, 240px);
  aspect-ratio: 5 / 7;
  background: linear-gradient(170deg, #FDFBF3, var(--ivory));
  border-radius: var(--radius-card);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(18, 53, 39, 0.12);
  transform: rotate(7deg);
  color: var(--suit-red);
  font-family: var(--font-display);
}
@keyframes keycard-settle {
  from { transform: rotate(12deg) translateY(26px); }
  to   { transform: rotate(7deg) translateY(0); }
}
.keycard { animation: keycard-settle 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both 0.2s; }

.keycard__corner {
  position: absolute;
  top: 0.9rem;
  left: 1rem;
  text-align: center;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.05;
}
.keycard__corner--flip {
  top: auto;
  left: auto;
  bottom: 0.9rem;
  right: 1rem;
  transform: rotate(180deg);
}
.keycard__pip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(4.5rem, 9vw, 6.5rem);
}
.keycard__label {
  position: absolute;
  bottom: -2.6rem;
  left: 50%;
  transform: translateX(-50%) rotate(-7deg);
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ivory-dim);
}

/* ── Sections ───────────────────────────────────────────────────────────── */

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.2rem, 6vw, 4rem);
  max-width: 1080px;
  margin: 0 auto;
}

.section--alt {
  max-width: none;
  background: var(--felt-950);
}
.section--alt > * { max-width: 1080px; margin-left: auto; margin-right: auto; }

.section h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 2.4rem;
  color: var(--ivory);
}

.section__lead { color: var(--ivory-dim); margin: -1.6rem 0 2rem; }

.grid { display: grid; gap: 1.4rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* cartes de contenu : ivoire posé sur le tapis */
.panel {
  background: linear-gradient(170deg, #FDFBF3, var(--ivory));
  border-radius: var(--radius-card);
  padding: 2rem 1.8rem 1.8rem;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.panel:hover { transform: rotate(-0.6deg); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38); }
.suit-mark { margin-right: 0.55rem; color: var(--felt-700); }
.suit-mark--red { color: var(--suit-red); }
.panel h3 { margin-bottom: 0.6rem; color: var(--ink); }
.panel p { color: var(--ink-soft); }

/* étapes des règles : cartes numérotées (l'ordre est réel : déroulé d'une manche) */
.step {
  background: linear-gradient(170deg, #FDFBF3, var(--ivory));
  border-radius: var(--radius-card);
  padding: 1.8rem;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.step__num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ivory);
  background: var(--felt-700);
}
.step h3 { margin-bottom: 0.5rem; color: var(--ink); }
.step p { color: var(--ink-soft); font-size: 0.97rem; }

/* barème */
.bareme { margin-top: 3.5rem; }
.bareme h3 { color: var(--ivory); margin-bottom: 0.5rem; }
.bareme__intro { color: var(--ivory-dim); margin-bottom: 1.2rem; }
.bareme__rows { display: grid; gap: 0.6rem; max-width: 560px; }
.bareme__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(170deg, #FDFBF3, var(--ivory));
  border-radius: 12px;
  padding: 0.7rem 1rem;
  color: var(--ink-soft);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}
.bareme__row:hover { transform: translateX(6px); }
.pts {
  flex: 0 0 4.2rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  border-radius: 8px;
  padding: 0.3rem 0;
  color: var(--ink);
}
.pts--6 { background: var(--gold); }
.pts--4 { background: var(--gold); opacity: 0.85; }
.pts--2 { background: var(--felt-700); color: var(--ivory); }
.pts--1 { background: rgba(18, 53, 39, 0.12); }
.bareme__note { margin-top: 1rem; color: var(--ivory-dim); font-size: 0.95rem; max-width: 60ch; }

/* decks : dos de cartes, feutrine claire + enseigne en filigrane */
.decks { margin-top: 3.5rem; }
.decks h3 { color: var(--ivory); margin-bottom: 1.2rem; }
.deck {
  position: relative;
  background: linear-gradient(165deg, var(--felt-700), var(--felt-800));
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 1px rgba(245, 241, 230, 0.22), 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--ivory);
  font-size: 1.15rem;
  font-family: var(--font-display);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.deck:hover { transform: rotate(0.6deg); }
.deck::after {
  content: attr(data-suit);
  position: absolute;
  right: -0.6rem;
  bottom: -2.2rem;
  font-size: 6.5rem;
  line-height: 1;
  color: var(--ivory);
  opacity: 0.1;
  pointer-events: none;
}
.deck span { font-family: var(--font-body); font-size: 0.88rem; opacity: 0.85; }

/* stores */
.stores { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.store {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  background: linear-gradient(170deg, #FDFBF3, var(--ivory));
  border-radius: var(--radius-card);
  padding: 0.9rem 1.5rem;
  min-width: 200px;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.store:hover { transform: rotate(-0.5deg); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38); }
.store small { color: var(--ink-soft); font-size: 0.78rem; letter-spacing: 0.04em; }
.store__icon { width: 1.7rem; height: 1.7rem; flex: none; color: var(--felt-700); }
.store--soon { opacity: 0.55; cursor: default; box-shadow: none; background: rgba(245, 241, 230, 0.12); color: var(--ivory); }
.store--soon small { color: var(--ivory-dim); }
.store--soon .store__icon { color: var(--ivory-dim); }
.stores__note { margin-top: 1.2rem; color: var(--ivory-dim); font-size: 0.92rem; }

/* footer */
.footer {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  border-top: 1px solid rgba(245, 241, 230, 0.12);
  color: var(--ivory-dim);
  font-size: 0.9rem;
}

@media (max-width: 560px) {
  .hero__content { padding-bottom: 5.5rem; text-align: center; justify-content: center; }
  .hero__actions, .hero__trust { justify-content: center; }
  .hero__title { margin-left: auto; margin-right: auto; }
  .nav__links { gap: 1rem; }
}

/* accessibilité */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
