/* Charte de la préprod Choose and Connect : bleu canard, rose, jaune ;
   Rethink Sans pour les titres, Atkinson Hyperlegible pour le texte. */
:root {
  --canard: #0b4f5c; --canard-fonce: #072f38; --rose: #ff6b9a; --jaune: #ffcb47;
  --fond: #f6f6fa; --encre: #000; --texte: #3d4e52; --doux: #637376; --ligne: #d5dee0; --clair: #eef3f4;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.45 "Atkinson Hyperlegible", system-ui, sans-serif; }
h1, h2 { font-family: "Rethink Sans", system-ui, sans-serif; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 26px; line-height: 1.1; margin: 2px 0 8px; }
h2 { font-size: 16px; margin: 20px 0 8px; }
a { color: var(--canard); }
main { max-width: 480px; margin: 0 auto; }

.point { color: var(--rose); }
.univers { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--doux); }
.rappel { font-size: 13px; color: var(--doux); margin: 14px 0 0; }
.pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille { background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700; }
.pastille.claire { background: var(--clair); color: var(--canard); }
.bouton {
  display: block; margin-top: 18px; padding: 13px 20px; border-radius: 999px; text-align: center; text-decoration: none;
  background: var(--canard); color: #fff; font-family: "Rethink Sans", system-ui, sans-serif; font-weight: 700;
}

.fiche { background: #fff; }
.fiche-photo { display: block; width: 100%; height: 220px; object-fit: cover; background: var(--clair); }
.fiche-corps { padding: 16px 16px 24px; }
.description { color: var(--texte); }
.podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.podium li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  background: var(--clair); border-radius: 10px; padding: 8px 12px;
}
.podium small { color: var(--doux); text-align: right; }

/* Écrans du jeu */
.ecran { padding: 14px 16px 20px; }
.entete { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.tour { font-family: "Rethink Sans", system-ui, sans-serif; font-weight: 700; font-size: 14px; color: var(--canard); }
.lien { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; color: var(--canard); text-decoration: underline; cursor: pointer; }
.sous { color: var(--doux); font-size: 14px; margin: 0 0 12px; }
button.bouton { width: 100%; border: 0; font-size: 16px; cursor: pointer; }
button.bouton:disabled { opacity: .4; cursor: default; }

.accueil h1 { margin-top: 24px; }
.modes { display: grid; gap: 10px; margin: 20px 0 18px; }
.mode {
  padding: 18px; border-radius: 16px; border: 2px solid var(--ligne); background: #fff; cursor: pointer;
  font-family: "Rethink Sans", system-ui, sans-serif; font-weight: 800; font-size: 19px; text-align: left; color: var(--encre);
}
.mode.actif { border-color: var(--canard); }

.liste { display: grid; gap: 10px; }
.vignette {
  display: grid; gap: 6px; padding: 10px; cursor: pointer;
  background: #fff; border: 2px solid transparent; border-radius: 16px; box-shadow: 0 1px 3px rgba(7, 47, 56, .08);
}
.vignette.choisie { border-color: var(--canard); }
.choix {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.choix:focus-visible { outline: 3px solid var(--jaune); outline-offset: 4px; border-radius: 12px; }
.choix img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; display: block; background: var(--clair); }
.choix .univers, .choix .nom, .choix .description { display: block; }
.choix .nom { font-family: "Rethink Sans", system-ui, sans-serif; font-weight: 800; font-size: 18px; line-height: 1.15; margin: 2px 0 4px; }
.vignette .description { font-size: 14px; color: var(--texte); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vignette.ouverte .description { -webkit-line-clamp: unset; }
.vignette .faits { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vignette .plus { margin-left: auto; font-size: 13px; }
.vignette .detail { display: none; margin: 0; font-size: 13px; color: var(--texte); }
.vignette.ouverte .detail { display: block; }
.barre-choix { position: sticky; bottom: 12px; margin-top: 14px; }

.jauge { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 16px; }
.jauge i { height: 8px; border-radius: 4px; background: var(--ligne); }
.jauge i.pleine { background: var(--rose); }

.cartes-de-la-main { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.carte {
  width: 100%; display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 8px;
  background: #fff; border: 0; border-radius: 14px; font: inherit; text-align: left; color: inherit; cursor: pointer;
}
.carte img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--clair); }
.carte b { display: block; font-family: "Rethink Sans", system-ui, sans-serif; font-size: 15px; }
.carte small { color: var(--doux); font-size: 12px; }
.fleche { color: var(--canard); font-size: 22px; padding: 0 6px; }

/* La fiche d'un métier de la main, en feuille */
.voile { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(7, 47, 56, .45); }
.feuille { position: relative; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; border-radius: 22px 22px 0 0; background: #fff; }
.ferme {
  position: absolute; top: 10px; right: 10px; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #fff; font-size: 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

footer { max-width: 480px; margin: 0 auto; padding: 16px; font-size: 12px; color: var(--doux); }
footer p { margin: 0 0 4px; }

/* La révélation : des cartes qu'on retourne une à une */
.revelation { margin-bottom: 8px; }
.cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.carte-a-retourner {
  position: relative; display: grid; width: 100%; min-height: 128px; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer; perspective: 1000px;
}
.carte-a-retourner:focus-visible { outline: 3px solid var(--jaune); outline-offset: 3px; border-radius: 18px; }
.dos, .face {
  grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 16px 18px;
  border-radius: 18px; backface-visibility: hidden; transition: transform .6s cubic-bezier(.22, 1, .36, 1);
  box-shadow: 0 8px 22px -10px rgba(7, 47, 56, .35);
}
.dos { background: var(--canard); color: #fff; }
.dos .etiquette { font-family: "Rethink Sans", system-ui, sans-serif; font-weight: 800; font-size: 20px; color: #fff; }
.carte-a-retourner[aria-disabled] { cursor: default; }
.carte-a-retourner[aria-disabled] .dos { opacity: .55; }
.retournee { cursor: default; }
.face { background: #fff; transform: rotateY(180deg); }
.joker .face { background: var(--jaune); }
.joker .dos { background: var(--rose); }
.retournee .dos { transform: rotateY(-180deg); }
.retournee .face { transform: rotateY(0); }
.etiquette { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--doux); }
.trio { font-family: "Rethink Sans", system-ui, sans-serif; font-weight: 800; font-size: 22px; line-height: 1.15; }
@media (prefers-reduced-motion: reduce) { .dos, .face { transition: none; } .suite { animation: none; } }
.annonce { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.suite { animation: apparait .4s ease-out; }
@keyframes apparait { from { opacity: 0; transform: translateY(8px); } }
.spes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.spes li { display: grid; grid-template-columns: 110px 1fr; gap: 2px 10px; align-items: center; }
.spe { font-weight: 700; font-size: 14px; }
.barre { display: flex; height: 10px; border-radius: 5px; background: var(--clair); overflow: hidden; }
.barre i { background: var(--canard); }
.barre i.conseillee { background: repeating-linear-gradient(45deg, var(--rose), var(--rose) 3px, #ffc2d4 3px, #ffc2d4 6px); }
.compte { grid-column: 2; font-size: 12px; color: var(--doux); }
a.bouton.secondaire { background: #fff; color: var(--canard); border: 2px solid var(--canard); }

/* Le trio déclaré en première */
.cases { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.cases legend { font-family: "Rethink Sans", system-ui, sans-serif; font-weight: 800; font-size: 16px; margin-bottom: 6px; padding: 0; }
.case { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: #fff; border: 2px solid transparent; border-radius: 12px; cursor: pointer; }
.case:has(input:checked) { border-color: var(--canard); }
.case:has(input:disabled) { opacity: .5; cursor: default; }
.case input { width: 20px; height: 20px; accent-color: var(--canard); flex: none; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.suite .bouton + .bouton { margin-top: 10px; }

/* Partager sa main */
.partage { margin-top: 10px; }
.partage .rappel { margin-top: 6px; text-align: center; }
.lien-a-copier { width: 100%; box-sizing: border-box; padding: 12px; font: inherit; font-size: 14px; border: 2px solid var(--canard); border-radius: 12px; }
