/* ============================================================
   DEUX POINTS D'ÉCART — main.css
   Styles partagés par toutes les pages du site
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables ── */
:root {
  --red-deep:  #2d0808;
  --red-mid:   #4a0d0d;
  --red-light: #7a1a1a;
  --w:         #ffffff;
  --w60:       rgba(255,255,255,0.60);
  --w40:       rgba(255,255,255,0.40);
  --w20:       rgba(255,255,255,0.20);
  --w10:       rgba(255,255,255,0.10);
  --w06:       rgba(255,255,255,0.06);

  --font-title: 'Oswald', sans-serif;
  --font-body:  'EB Garamond', serif;
}

/* ── Base ── */
html { font-family: var(--font-body); }

body {
  background: radial-gradient(ellipse at 65% 65%, var(--red-light) 0%, var(--red-mid) 40%, var(--red-deep) 100%);
  min-height: 100vh;
  color: var(--w60);
}

/* ── Fade-in animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ── Fade-el (scroll-triggered via IntersectionObserver) ── */
.fade-el {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-el.visible { opacity: 1; transform: translateY(0); }
.fade-el:nth-child(2) { transition-delay: 0.10s; }
.fade-el:nth-child(3) { transition-delay: 0.20s; }
.fade-el:nth-child(4) { transition-delay: 0.30s; }
.fade-el:nth-child(5) { transition-delay: 0.40s; }
.fade-el:nth-child(6) { transition-delay: 0.50s; }
.fade-el:nth-child(7) { transition-delay: 0.60s; }

/* ── Bouton standard ── */
.btn {
  display: inline-block;
  padding: 0.75em 2.2em;
  border: 2px solid var(--w40);
  border-radius: 4px;
  color: var(--w);
  font-family: var(--font-title);
  font-size: clamp(0.78rem, 2vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover, .btn:focus {
  background: var(--w10);
  border-color: var(--w);
  outline: none;
}
.btn-continue::after {
  content: ' ↓';
  display: inline-block;
  animation: bounce 1.5s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}
.btn-row {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}
.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Label supérieur ── */
.label-top {
  font-family: var(--font-title);
  font-size: clamp(0.65rem, 1.8vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--w40);
}

/* ── Titres partagés ── */
.page-title {
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--w);
  line-height: 1;
}
.page-title span { color: var(--w40); }

/* ── Tableaux ── */
.tbl-wrap {
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--w20);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.85rem, 1.7vw, 1rem);
}
thead tr { background: var(--w10); }
thead th {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--w40);
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--w20);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--w06); }
tbody tr:last-child { border-bottom: none; }
tbody td {
  padding: 0.55rem 0.9rem;
  color: var(--w60);
  vertical-align: top;
  line-height: 1.55;
}
tbody td:first-child {
  font-family: var(--font-title);
  font-size: 0.88rem;
  color: var(--w);
  white-space: nowrap;
}

/* Tags colorés */
.tag {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15em 0.55em;
  border-radius: 3px;
  white-space: nowrap;
}
.tag-green  { background: rgba(80,200,100,0.18);  color: #7ee898; }
.tag-yellow { background: rgba(220,180,60,0.18);  color: #e8c84a; }
.tag-orange { background: rgba(220,120,40,0.18);  color: #e8894a; }
.tag-red    { background: rgba(220,60,60,0.18);   color: #e87a7a; }
.tag-blue   { background: rgba(80,140,220,0.18);  color: #7ab0e8; }

/* ── Blocs d'encart ── */
.example-block {
  background: var(--w06);
  border-left: 3px solid var(--w20);
  border-radius: 0 6px 6px 0;
  padding: 0.9rem 1.1rem;
}
.ex-label {
  font-family: var(--font-title);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--w40);
  margin-bottom: 0.45rem;
}
.info-block {
  background: var(--w06);
  border-radius: 6px;
  padding: 1rem 1.2rem;
}
.section-label {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--w40);
  margin-bottom: 0.55rem;
}

/* ── Formule ── */
.formula {
  font-family: var(--font-title);
  font-size: clamp(0.88rem, 2vw, 1.02rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--w);
  background: var(--w06);
  border-left: 3px solid var(--w40);
  padding: 0.75rem 1rem;
  border-radius: 0 5px 5px 0;
}

/* ── Texte courant ── */
p, li {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--w60);
  line-height: 1.8;
}
strong {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--w);
}
ul {
  padding-left: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
li::marker { color: var(--w40); }
a { color: var(--w); text-underline-offset: 3px; }
a:hover { opacity: 0.75; }

/* ── Image ── */
.slide-img {
  width: 100%;
  border-radius: 8px;
  object-fit: contain;
  max-height: 55vh;
  display: block;
}
.img-placeholder {
  width: 100%;
  border-radius: 8px;
  background: var(--w10);
  border: 1px solid var(--w20);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.img-placeholder span {
  font-family: var(--font-title);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--w40);
  text-align: center;
}

/* ============================================================
   PAGES SIMPLES (boutique, contact, mentions, données)
   ============================================================ */
.page-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 2rem 2.5rem;
}
.page-simple .container {
  max-width: 520px;
  width: 100%;
}
.page-simple h1 {
  font-size: clamp(2.8rem, 10vw, 5rem);
  margin-bottom: 0.25em;
}
.page-simple .message {
  font-size: clamp(1rem, 3vw, 1.25rem);
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
}
.page-simple .message a {
  border-bottom: 1px solid var(--w40);
  text-decoration: none;
  transition: border-color 0.2s;
}
.page-simple .message a:hover { border-color: var(--w); }

/* ============================================================
   PAGES LONGUES (mentions légales, données personnelles)
   ============================================================ */
.page-long {
  padding: 4rem 2rem 5rem;
}
.page-long .container {
  max-width: 720px;
  margin: 0 auto;
}
.page-long h1 {
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  margin-bottom: 0.2em;
}
.page-long .header-divider {
  width: 40px;
  height: 3px;
  background: var(--w40);
  border-radius: 2px;
  margin: 1.8rem 0 3rem;
}
.page-long .update-date {
  font-style: italic;
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--w40);
  margin-top: -2rem;
  margin-bottom: 3rem;
}
.page-long .section { margin-bottom: 2.8rem; }
.page-long .section h2 {
  font-family: var(--font-title);
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--w40);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--w20);
}
.page-long address {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--w60);
  line-height: 1.8;
  font-style: normal;
}

/* ============================================================
   PAGES SCROLL-SNAP (à-propos, règles)
   ============================================================ */
.scroller {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}
.slide {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: radial-gradient(ellipse at 65% 65%, var(--red-light) 0%, var(--red-mid) 40%, var(--red-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.slide.scrollable {
  align-items: flex-start;
  overflow-y: auto;
}

/* Slide hero */
.slide-hero {
  flex-direction: column;
  text-align: center;
  padding: 2rem 2.5rem;
}
.slide-hero h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  margin-bottom: 0.2em;
}
.slide-hero .subtitle {
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  color: var(--w60);
  margin: 0.6rem 0 2.8rem;
}

/* Slide final */
.slide-final {
  flex-direction: column;
  text-align: center;
  padding: 2rem 2.5rem;
}
.slide-final h2 {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--w);
  line-height: 1;
  margin-bottom: 0.2em;
}
.slide-final h2 span { color: var(--w40); }
.slide-final p {
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--w60);
  max-width: 480px;
  margin: 1rem auto 2.5rem;
  line-height: 1.65;
}

/* Contenu slide */
.slide-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.slide-inner.with-img {
  max-width: 1000px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem 3.5rem;
  align-items: start;
}
.slide-inner.with-img .text-col { grid-column: 1; display: flex; flex-direction: column; gap: 1.2rem; }
.slide-inner.with-img .img-col  { grid-column: 2; align-self: center; }
.slide-inner.with-img .btn-row  { grid-column: 1 / -1; }

.slide-num {
  font-family: var(--font-title);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--w20);
}
.slide-inner h2 {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--w);
  line-height: 1.1;
}
.slide-inner h2::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: var(--w40);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* Phase list (règles) */
.phase-list { display: flex; flex-direction: column; gap: 0.45rem; }
.phase-item { display: flex; align-items: center; gap: 0.8rem; }
.phase-arrow {
  font-family: var(--font-title);
  font-size: 0.65rem;
  color: var(--w20);
  flex-shrink: 0;
  width: 12px;
}
.phase-label {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--w60);
}
.phase-team {
  font-size: 0.9rem;
  color: var(--w40);
  margin-left: auto;
  font-style: italic;
}

/* Terrain schématique */
.terrain-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.terrain-label {
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--w40);
}
.terrain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 280px;
}
.terrain-net {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--w40);
  border-radius: 2px;
  margin: 2px 0;
}
.terrain-cell {
  background: var(--w10);
  border: 1px solid var(--w20);
  border-radius: 5px;
  padding: 0.75rem 0.4rem;
  text-align: center;
}
.terrain-cell.avant { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.32); }
.terrain-cell .pos-num {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--w40);
  line-height: 1;
}
.terrain-cell.avant .pos-num { color: var(--w); }

/* ── Responsive ── */
@media (max-width: 680px) {
  .slide-inner.with-img {
    grid-template-columns: 1fr;
  }
  .slide-inner.with-img .img-col { grid-column: 1; grid-row: auto; }
  .slide-inner.with-img .btn-row { grid-column: 1; }
}
