/* Cosmo Hop — site vitrine. Palette et style : docs/design_ui.md */

@font-face {
  font-family: "Fredoka";
  src: url("polices/Fredoka-SemiBold.ttf") format("truetype");
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("polices/Fredoka-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --encre: #1B1036;
  --nuit: #120A2E;
  --panneau: #24164F;
  --panneau-clair: #3B2A73;
  --jaune: #FFC83D;
  --jaune-ombre: #C98A00;
  /* Épaisseur des boutons jaunes : bien plus foncée que le jaune (#C98A00, trop proche, faisait
     croire à deux boutons jaunes superposés) */
  --jaune-epaisseur: #8A5A00;
  --violet: #6D3FD9;
  --violet-ombre: #3E2C80;
  --vert: #3DDC84;
  --cyan: #38D6FF;
  --rouge: #FF5A6B;
  --rouge-noel: #8E1B35;
  --lavande: #C9C2F0;
  --blanc: #FFFFFF;
  --rayon: 28px;
  --largeur: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--blanc);
  background: var(--nuit);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--jaune); }
a:hover { color: #FFE08A; }

/* Focus clavier bien visible (anneau cyan, comme dans le jeu) */
:focus-visible {
  outline: 4px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 8px;
}

.evitement {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--jaune);
  color: var(--encre);
  border: 4px solid var(--encre);
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
}
.evitement:focus { top: 1rem; }

.conteneur {
  width: min(100% - 2.5rem, var(--largeur));
  margin-inline: auto;
}

h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 .6em; }
h2 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  text-align: center;
  text-shadow: 0 4px 0 var(--encre);
}
h3 { font-size: clamp(1.4rem, 3.6vw, 1.9rem); }
p { margin: 0 0 1em; }
.intro {
  text-align: center;
  color: var(--lavande);
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

/* ---------- En-tête ---------- */
.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 10, 46, .88);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--encre);
}
.entete .conteneur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  min-height: 64px;
  flex-wrap: wrap;
  padding-block: .4rem;
}
.marque {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--blanc);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}
.marque img { width: 40px; height: 40px; border-radius: 10px; border: 3px solid var(--encre); }
.navigation ul {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.navigation a {
  display: inline-block;
  padding: .55rem .8rem;      /* zone tactile ≥ 44 px */
  min-height: 44px;
  color: var(--blanc);
  text-decoration: none;
  border-radius: 14px;
}
.navigation a:hover { background: var(--panneau-clair); color: var(--blanc); }

/* ---------- Boutons ---------- */
.boutons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 60px;
  padding: .7rem 1.6rem;
  border: 5px solid var(--encre);
  border-radius: var(--rayon);
  font: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .06s, box-shadow .06s;
}
.btn svg { width: 26px; height: 26px; flex: none; }
.btn-jaune { background: var(--jaune); color: var(--encre); box-shadow: 0 8px 0 var(--jaune-epaisseur), 0 8px 0 5px var(--encre); }
.btn-jaune:hover { color: var(--encre); background: #FFD467; }
.btn-violet { background: var(--violet); color: var(--blanc); box-shadow: 0 8px 0 var(--violet-ombre), 0 8px 0 5px var(--encre); }
.btn-violet:hover { color: var(--blanc); background: #7B50E3; }
.btn:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--jaune-epaisseur), 0 2px 0 5px var(--encre); }
.btn-violet:active { box-shadow: 0 2px 0 var(--violet-ombre), 0 2px 0 5px var(--encre); }
.btn-grand { font-size: 1.35rem; min-height: 72px; padding-inline: 2rem; }

/* Lien de store pas encore disponible : pas de href, donc ni cliquable ni focalisable */
.btn-bientot {
  background: #4A3F78;
  color: #E4E0F7;
  cursor: not-allowed;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
  padding-block: .45rem;
}
.btn-bientot small { font-size: .8rem; font-weight: 600; color: #D6D0F2; }

/* ---------- Accueil ---------- */
.accueil {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 4.5rem;
  text-align: center;
  background: linear-gradient(#4FC3F7 0%, #2B6FD6 32%, #3A1C71 72%, #120A2E 100%);
}
/* Étoiles : uniquement dans la partie « espace » */
.accueil::before {
  content: "";
  position: absolute;
  inset: 35% 0 0 0;
  background-image:
    radial-gradient(2px 2px at 8% 20%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 22% 70%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 35% 40%, #FFE27A 50%, transparent 51%),
    radial-gradient(2px 2px at 48% 85%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 62% 30%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 75% 65%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 15%, #FFE27A 50%, transparent 51%),
    radial-gradient(2px 2px at 93% 80%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 15% 50%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 55% 55%, #fff 50%, transparent 51%);
  animation: scintille 3s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes scintille { from { opacity: .55; } to { opacity: 1; } }

.accueil .conteneur { position: relative; }
.logo {
  width: min(92%, 640px);
  margin: 0 auto;
  filter: drop-shadow(0 10px 0 rgba(27, 16, 54, .35));
  animation: flotte 2.4s ease-in-out infinite;
}
@keyframes flotte { 50% { transform: translateY(-10px) scale(1.02); } }

.sauteur {
  position: relative;
  width: 150px;
  height: 230px;
  margin: .5rem auto 0;
}
.sauteur .heros {
  position: absolute;
  left: 50%;
  bottom: 38px;
  width: 120px;
  margin-left: -60px;
  animation: saute 1.1s cubic-bezier(.3, 0, .7, 1) infinite;
}
.sauteur .plateforme {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 150px;
  margin-left: -75px;
  animation: rebond 1.1s infinite;
}
@keyframes saute {
  0%, 100% { transform: translateY(0) scaleY(.92); }
  8% { transform: translateY(-10px) scaleY(1.05); }
  50% { transform: translateY(-120px) scaleY(1); }
  92% { transform: translateY(-8px) scaleY(1.03); }
}
@keyframes rebond {
  0%, 100% { transform: translateY(3px); }
  10%, 90% { transform: translateY(0); }
}

.accroche {
  font-size: clamp(1.3rem, 4.2vw, 1.9rem);
  font-weight: 700;
  max-width: 34rem;
  margin: 0 auto 2rem;
  text-shadow: 3px 0 var(--encre), -3px 0 var(--encre), 0 3px var(--encre), 0 -3px var(--encre),
               2px 2px var(--encre), -2px 2px var(--encre), 2px -2px var(--encre), -2px -2px var(--encre), 0 6px var(--encre);
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-sombre { background: var(--nuit); }
.section-panneau { background: var(--panneau); }

/* Le jeu : blocs capture + texte */
.blocs { display: grid; gap: 3.5rem; }
.bloc {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: center;
}
.bloc-texte p { color: var(--lavande); }
.bloc-texte strong { color: var(--blanc); }
.telephone {
  width: min(100%, 270px);
  margin-inline: auto;
  border: 8px solid var(--encre);
  border-radius: 34px;
  overflow: hidden;
  background: var(--encre);
  box-shadow: 0 14px 0 rgba(0, 0, 0, .35);
  aspect-ratio: 9 / 16;
}
.telephone img { width: 100%; height: 100%; object-fit: cover; }
.vignettes {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.vignettes li {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  background: var(--panneau-clair);
  border: 4px solid var(--encre);
  border-radius: 20px;
}
.vignettes img { width: 58px; height: 58px; object-fit: contain; }
.clin {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: .8rem 1rem;
  background: var(--panneau-clair);
  border: 4px solid var(--encre);
  border-radius: 22px;
}
.clin img { width: 72px; flex: none; }
.clin p { margin: 0; color: var(--blanc); }

.panneau-sprites {
  width: min(100%, 360px);
  margin-inline: auto;
  padding: 1.2rem;
  background: var(--panneau);
  border: 8px solid var(--encre);
  border-radius: 34px;
  box-shadow: 0 14px 0 rgba(0, 0, 0, .35);
}
.panneau-sprites .vignettes { justify-content: center; margin: 0; }

/* Personnages */
.galerie {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.carte {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem .75rem 1rem;
  background: var(--nuit);
  border: 6px solid var(--encre);
  border-radius: 30px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .3);
  text-align: center;
}
.carte img { width: min(100%, 150px); aspect-ratio: 1; object-fit: contain; }
.carte h3 { font-size: 1.25rem; margin: .5rem 0 .4rem; }
.prix {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .15rem .8rem;
  background: var(--encre);
  color: var(--jaune);
  border-radius: 20px;
  font-weight: 700;
}
.prix img { width: 24px; height: 24px; }
.prix-gratuit { background: var(--vert); color: var(--encre); }
.badge-noel {
  position: absolute;
  top: -12px;
  left: -8px;
  padding: .15rem .7rem;
  background: var(--rouge-noel);
  color: var(--blanc);
  border: 4px solid var(--encre);
  border-radius: 16px;
  font-size: .9rem;
  font-weight: 700;
  transform: rotate(-6deg);
}

/* Noël */
.noel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(#8E1B35 0%, #5A1340 55%, #24164F 100%);
}
.neige, .neige::after {
  position: absolute;
  inset: -100% 0 0 0;
  pointer-events: none;
  background-image:
    radial-gradient(4px 4px at 10% 10%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 30% 30%, #fff 50%, transparent 51%),
    radial-gradient(5px 5px at 50% 5%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 70% 25%, #fff 50%, transparent 51%),
    radial-gradient(4px 4px at 90% 15%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 20% 45%, #fff 50%, transparent 51%),
    radial-gradient(4px 4px at 80% 40%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 60% 48%, #fff 50%, transparent 51%);
  background-size: 100% 50%;
  opacity: .7;
  animation: neige 14s linear infinite;
}
.neige::after {
  content: "";
  inset: 0;
  background-size: 60% 35%;
  opacity: .5;
  animation-duration: 22s;
}
@keyframes neige { to { transform: translateY(50%); } }
.noel .conteneur { position: relative; }
.noel .intro { color: #FBE3EA; }
.noel-grille {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.noel-captures {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.noel-captures .telephone { width: min(46%, 230px); }
.noel-texte ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.noel-texte li { margin-bottom: .4rem; }
.noel-texte li::marker { color: var(--jaune); }

/* Appel final */
.appel { text-align: center; }
.appel .heros-final { width: 140px; margin: 0 auto 1rem; animation: flotte 2.4s ease-in-out infinite; }

/* Pied de page */
.pied {
  padding: 2.5rem 0 3rem;
  background: var(--encre);
  color: var(--lavande);
  text-align: center;
  font-size: 1rem;
}
.pied ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.pied a { display: inline-block; padding: .5rem .25rem; }

/* Page texte (confidentialité) */
.page-texte { padding: 3rem 0 4rem; }
.page-texte .conteneur { max-width: 46rem; }
.page-texte h1 { font-size: clamp(2rem, 6vw, 2.8rem); text-shadow: 0 4px 0 var(--encre); }
.page-texte h2 { text-align: left; font-size: 1.5rem; margin-top: 2rem; text-shadow: none; color: var(--jaune); }
.page-texte p, .page-texte li { color: #E4E0F7; }
.encart {
  padding: 1.2rem 1.4rem;
  background: var(--panneau);
  border: 5px solid var(--encre);
  border-radius: 24px;
  margin: 1.5rem 0;
}
.encart p:last-child { margin-bottom: 0; }

/* ---------- Grands écrans ---------- */
@media (min-width: 640px) {
  .galerie { grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
}
@media (min-width: 900px) {
  .accueil { padding: 3rem 0 6rem; }
  .bloc { grid-template-columns: 300px 1fr; }
  .bloc:nth-child(even) { grid-template-columns: 1fr 300px; }
  .bloc:nth-child(even) .telephone, .bloc:nth-child(even) .panneau-sprites { order: 2; }
  .telephone { width: 280px; }
  .noel-grille { grid-template-columns: 1fr 1fr; }
}

/* Moins de mouvement si demandé par le système */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Texte réservé aux lecteurs d'écran */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Pied de page : éditeur */
.pied .editeur { color: var(--blanc); margin-bottom: .3rem; }

/* Mentions légales : champs encore inconnus, bien visibles */
.a-completer {
  padding: .05rem .4rem;
  background: var(--jaune);
  color: var(--encre);
  border-radius: 6px;
  font-weight: 700;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  line-height: 1.7;
}
.fiche { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.2rem; margin: 0; }
.fiche dt { color: var(--lavande); }
.fiche dd { margin: 0; color: var(--blanc); }
@media (max-width: 560px) {
  .fiche { grid-template-columns: 1fr; gap: .1rem; }
  .fiche dd { margin-bottom: .6rem; }
}

/* Lien vers le site de l'éditeur, au-dessus de l'en-tête */
.barre-editeur {
  background: #06080f;
  font-family: "Inter", system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 500;
}
.barre-editeur a {
  display: inline-block;
  padding: .55rem 0;
  color: #C9C2F0;
  text-decoration: none;
}
.barre-editeur a:hover { color: var(--blanc); text-decoration: underline; }

.non-applicable { color: var(--lavande); font-style: italic; }
