/* Far Off — le site prend le registre du jeu : Fredoka, coucher de soleil, relief
   par les ombres et jamais par le trait. Palette de l'icône (mauve → rose) pour
   le fond, crème et corail pour ce qui se lit. Peu de cadres : les photos sont
   les seuls objets posés sur la page. */

:root {
  --night-1: #3E1A72;
  --night-2: #7E279C;
  --night-3: #D634AE;
  --ink: #3B2233;
  --cream: #FFF6E9;
  --peach: #FFD9BC;
  --sky-top: #FFF0DE;
  --sky-bottom: #FFC9A3;
  --coral: #FF6B57;
  --coral-deep: #D9483A;
  --sun: #FFC53D;
  --muted: #9A7B85;
  --surface: #FFFFFF;
  --route: #FF5A6E;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Fredoka', 'Nunito', 'Segoe UI', system-ui, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--night-2);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
}

/* Le ciel : un calque fixe plutôt que background-attachment, que Safari iOS
   rend de travers (gradient étiré sur toute la hauteur du document). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, var(--night-1) 0%, var(--night-2) 45%, var(--night-3) 100%);
}

a { color: inherit; }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 24px);
  padding-left: max(clamp(16px, 5vw, 24px), env(safe-area-inset-left));
  padding-right: max(clamp(16px, 5vw, 24px), env(safe-area-inset-right));
}

/* ---------- en-tête ---------- */
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  color: var(--cream);
}
header.top a { text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: clamp(19px, 5vw, 22px); letter-spacing: 0.3px; white-space: nowrap; }
.brand img { width: clamp(32px, 9vw, 40px); height: clamp(32px, 9vw, 40px); border-radius: 12px; }
nav.links { display: flex; gap: clamp(12px, 4vw, 20px); font-size: clamp(13px, 3.6vw, 15px); opacity: 0.85; }
nav.links a:hover { opacity: 1; text-decoration: underline; }

/* ---------- héros ---------- */
.hero { padding: 40px 0 24px; color: var(--cream); text-align: center; }
.hero h1 {
  font-size: clamp(31px, 8.5vw, 68px);
  line-height: 1.05;
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 0 6px 24px rgba(20, 5, 40, 0.35);
}
.hero p { font-size: clamp(16px, 2.4vw, 22px); margin: 0 auto; max-width: 560px; opacity: 0.92; text-wrap: pretty; }
.kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sun);
  margin-bottom: 14px;
}

/* ---------- le bouton du jeu : corail, une lèvre, une ombre ---------- */
.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--coral), var(--coral-deep));
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  padding: 16px 40px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 5px 0 #B2372C, 0 14px 28px rgba(20, 5, 40, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #B2372C, 0 8px 18px rgba(20, 5, 40, 0.3); }
.btn.soon { background: linear-gradient(180deg, #FFD98A, var(--sun)); color: var(--ink); box-shadow: 0 5px 0 #D99A12, 0 14px 28px rgba(20, 5, 40, 0.35); }
.cta { text-align: center; margin: 28px 0 8px; }
.cta small { display: block; margin-top: 12px; color: var(--cream); opacity: 0.75; font-size: 14px; }

/* ---------- les paires : deux photos de voyage, une distance entre elles ---------- */
.pairs { display: grid; gap: 56px; margin: 48px 0 24px; }
.pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.pair:nth-child(even) .polaroid:first-child { transform: rotate(2deg); }
.pair:nth-child(even) .polaroid:last-child { transform: rotate(-3deg); }
.pair:nth-child(odd) .polaroid:first-child { transform: rotate(-2.5deg); }
.pair:nth-child(odd) .polaroid:last-child { transform: rotate(2deg); }

.polaroid {
  margin: 0; /* <figure> : sans ça, les 40 px de marge du navigateur rognent la photo */
  background: var(--cream);
  padding: 12px 12px 14px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(20, 5, 40, 0.45), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
  transition: transform 200ms ease;
}
@media (hover: hover) {
  .polaroid:hover { transform: rotate(0) scale(1.02) !important; }
}
.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
}
.polaroid figcaption { padding: 10px 4px 0; }
.polaroid .place { font-weight: 700; font-size: 20px; line-height: 1.1; }
.polaroid .country { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* la distance : la pastille du jeu, posée sur la couture */
.gap { text-align: center; color: var(--cream); min-width: 120px; }
.gap .dots { height: 2px; background: repeating-linear-gradient(90deg, var(--route) 0 8px, transparent 8px 16px); margin: 8px 0; opacity: 0.9; }
.gap .km {
  display: inline-block;
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 24px rgba(20, 5, 40, 0.35);
}
.gap .km small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.gap .hint { display: block; font-size: 13px; opacity: 0.8; margin-top: 8px; }

/* ---------- comment on joue ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px 0; color: var(--cream); }
.step { text-align: center; }
.step .n {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--sun); color: var(--ink); font-weight: 700; font-size: 20px;
  box-shadow: 0 6px 16px rgba(20, 5, 40, 0.35);
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.step p { margin: 0; opacity: 0.85; font-size: 15px; }

/* ---------- pages texte (confidentialité, conditions) ---------- */
.sheet {
  background: var(--cream);
  border-radius: 28px;
  padding: 40px clamp(20px, 5vw, 56px);
  margin: 24px 0 48px;
  box-shadow: 0 24px 60px rgba(20, 5, 40, 0.45);
}
.sheet h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.1; margin: 0 0 6px; font-weight: 700; }
.sheet .date { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.sheet h2 { font-size: 21px; margin: 32px 0 8px; font-weight: 700; color: var(--coral-deep); }
.sheet p, .sheet li { font-size: 16px; line-height: 1.6; }
.sheet ul { padding-left: 22px; }
.sheet a { color: var(--coral-deep); }

/* ---------- pied ---------- */
footer {
  color: var(--cream);
  opacity: 0.8;
  font-size: 13px;
  padding: 24px 0 40px;
  text-align: center;
  line-height: 1.7;
}
footer a { color: var(--cream); }
footer .credits { opacity: 0.75; font-size: 12px; }

/* ---------- tablette : la paire tient encore en vis-à-vis ---------- */
@media (max-width: 860px) {
  .pairs { gap: 44px; }
  .pair { gap: 12px; }
  .gap { min-width: 96px; }
  .gap .km { font-size: 19px; padding: 9px 14px; }
  .polaroid { padding: 10px 10px 12px; }
  .polaroid .place { font-size: 18px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- téléphone : la paire se lit de haut en bas, comme dans le jeu.
   Deux photos côte à côte sur 375 px, ça fait deux vignettes de 100 px : on
   empile, chaque lieu reprend toute la largeur, et la distance s'intercale. --- */
@media (max-width: 640px) {
  .hero { padding: 28px 0 20px; }

  .btn { display: block; font-size: 18px; padding: 16px 24px; }
  .cta { margin: 24px 0 8px; }

  .pairs { gap: 40px; margin: 36px 0 16px; }
  .pair {
    grid-template-columns: 1fr;
    gap: 4px;
    justify-items: center;
  }
  .polaroid { width: 100%; max-width: 420px; }
  .polaroid img { aspect-ratio: 5 / 4; }

  /* Les rotations débordaient du viewport : on les rentre et on les alterne
     autour de l'axe pour garder l'effet « photos posées ». */
  .pair .polaroid:first-child,
  .pair:nth-child(even) .polaroid:first-child,
  .pair:nth-child(odd) .polaroid:first-child { transform: rotate(-1.5deg); }
  .pair .polaroid:last-child,
  .pair:nth-child(even) .polaroid:last-child,
  .pair:nth-child(odd) .polaroid:last-child { transform: rotate(1.5deg); }

  .gap {
    width: 100%;
    max-width: 420px;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 12px;
    padding: 6px 0;
  }
  .gap .dots { margin: 0; grid-row: 1; }
  .gap .dots:first-child { grid-column: 1; }
  .gap .dots:last-child { grid-column: 3; }
  .gap .km { grid-column: 2; grid-row: 1; font-size: 20px; padding: 8px 16px; }
  .gap .hint {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 6px;
    font-size: 12px;
  }
}

/* ---------- très petits écrans (iPhone SE et compagnie) ---------- */
@media (max-width: 380px) {
  nav.links { gap: 10px; }
  .polaroid .place { font-size: 17px; }
  .gap .km { font-size: 18px; padding: 7px 13px; }
  .sheet { border-radius: 20px; padding: 28px 18px; }
}

/* ---------- feuilles de texte sur téléphone ---------- */
@media (max-width: 640px) {
  .sheet { border-radius: 22px; padding: 30px 20px; margin: 16px 0 36px; }
  .sheet h2 { font-size: 19px; margin: 26px 0 6px; }
  .sheet p, .sheet li { font-size: 15.5px; }
  .sheet ul { padding-left: 18px; }
  footer { padding: 16px 0 32px; }
}

/* ---------- confort : pas d'animation si l'utilisateur n'en veut pas ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .polaroid { transform: none !important; }
}

/* Le sélecteur de langue : quatre codes courts, celui de la page en cours éteint. */
.langs { display: flex; gap: .5rem; font-size: .82rem; letter-spacing: .04em; }
.langs a { color: var(--muted, #9A7B85); text-decoration: none; padding: .15rem .35rem; border-radius: .4rem; }
.langs a:hover { color: var(--ink, #3B2233); }
.langs a.on { color: var(--ink, #3B2233); background: rgba(255, 255, 255, .55); font-weight: 600; }

/* Le bandeau des pages légales servies dans une autre langue. */
.notice {
  background: rgba(255, 255, 255, .6);
  border-radius: .8rem;
  padding: .7rem 1rem;
  font-size: .9rem;
  color: var(--muted, #9A7B85);
}
