/* ---------------------------------------------------------------
   Tokens : blanc / beige, quasi monochrome. Une seule touche de
   couleur (argile, une terre cuite très sourde) réservée à la
   signature du site — le reste reste sobre : blanc, beige, encre.
   --------------------------------------------------------------- */
:root {
  --fond: #f4eee3;
  --carte: #ffffff;
  --ligne: #e6ddc9;
  --encre: #2b2620;
  --argile: #8b6244;
  --muted: #8a8172;
  --erreur: #9b3a2c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Archivo', 'Segoe UI', sans-serif;
  background: var(--fond);
  color: var(--encre);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--argile);
}

.cache-visuellement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- En-tête : discret, pas un bandeau d'appli --- */
header.entete {
  text-align: center;
  padding: 2.75rem 1rem 1.25rem;
}

header.entete .logo {
  display: block;
  width: 120px;
  height: auto;
  margin: 0 auto 0.9rem;
}

header.entete .oeillet {
  margin: 0 0 0.2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

header.entete h1 {
  margin: 0;
  font-family: 'Bricolage Grotesque', 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 2.35rem;
  letter-spacing: 0.01em;
  color: var(--encre);
}

main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 2rem;
}

/* --- Le cercle : la zone de recherche est le rond du jeu, tracé fin --- */
.zone-cercle {
  position: relative;
  height: 108px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zone-cercle svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.zone-cercle svg path {
  fill: none;
  stroke: var(--argile);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.55;
}

#champRecherche {
  position: relative;
  z-index: 1;
  width: 74%;
  max-width: 300px;
  background: transparent;
  border: none;
  outline: none;
  text-align: center;
  font-family: 'Archivo', sans-serif;
  font-size: 1.05rem;
  color: var(--encre);
  padding: 0.5rem;
}

#champRecherche::placeholder {
  color: var(--muted);
}

#champRecherche:focus-visible {
  outline: 2px solid var(--argile);
  outline-offset: 6px;
  border-radius: 4px;
}

/* --- Résultats multiples : une liste sobre --- */
.liste-resultats {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ligne);
}

.liste-resultats li {
  border-bottom: 1px solid var(--ligne);
}

.liste-resultats button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.9rem 0.2rem;
  font-family: 'Archivo', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--encre);
  cursor: pointer;
}

.liste-resultats button:hover,
.liste-resultats button:focus-visible {
  color: var(--argile);
}

.liste-resultats .club {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.2rem;
}

.message-info,
.message-erreur {
  text-align: center;
  padding: 1rem;
  font-size: 0.95rem;
}

.message-info {
  color: var(--muted);
}

.message-erreur {
  color: var(--erreur);
}

/* --- Fiche joueur --- */
.fiche-joueur {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-radius: 8px;
  padding: 1.5rem 1.35rem;
  animation: apparition 0.18s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .fiche-joueur {
    animation: none;
  }
}

@keyframes apparition {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fiche-joueur .bouton-retour {
  background: none;
  border: none;
  color: var(--argile);
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1rem;
}

.fiche-joueur h2 {
  margin: 0 0 0.15rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--encre);
}

.fiche-joueur .sous-titre {
  color: var(--muted);
  margin: 0 0 1.1rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.info-licence {
  padding: 0.6rem 0.1rem;
  margin-bottom: 1.6rem;
  border-top: 1px solid var(--ligne);
  border-bottom: 1px solid var(--ligne);
}

.info-licence .libelle {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.info-licence .valeur {
  font-weight: 600;
  font-size: 1rem;
  color: var(--encre);
}

/* --- Le cachet : total de tampons, discret --- */
.total-tampons {
  position: relative;
  width: 116px;
  height: 116px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  border: 1.5px solid var(--argile);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-2deg);
  animation: tampon-frappe 0.2s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .total-tampons {
    animation: none;
  }
}

@keyframes tampon-frappe {
  from {
    transform: rotate(-2deg) scale(1.12);
    opacity: 0;
  }
  to {
    transform: rotate(-2deg) scale(1);
    opacity: 1;
  }
}

.total-tampons .chiffre {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--argile);
}

.total-tampons .libelle {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  padding: 0 0.5rem;
}

.detail-tampons h3 {
  margin: 0 0 0.75rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--encre);
}

.liste-tampons {
  list-style: none;
  margin: 0;
  padding: 0;
}

.liste-tampons li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--ligne);
}

.liste-tampons li:last-child {
  border-bottom: none;
}

.tampon-icone {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--argile);
  opacity: 0.75;
}

.tampon-icone::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  margin: 5px auto;
  border-radius: 50%;
  background: var(--argile);
}

.liste-tampons .tampon-lieu {
  font-weight: 600;
  display: block;
  color: var(--encre);
}

.liste-tampons .tampon-date {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted);
}

.aucun-tampon {
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
}

/* --- Pied de page --- */
footer.pied {
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 1.25rem 1rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

footer.pied a {
  color: var(--argile);
  text-decoration: underline;
  font-family: 'Archivo', sans-serif;
}

@media (min-width: 480px) {
  header.entete h1 {
    font-size: 2.7rem;
  }
}
