/* ============================================================
   PAGES PROFIL (et formulaires en général)
   ============================================================ */

#visiteur, #membre { display: flex; flex-direction: column; gap: 24px; }

/* Grande carte verte en haut du profil */
.carte-profil {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 24px;
  padding: 32px; border-radius: 22px;
  background: linear-gradient(135deg, var(--fougere), var(--fougere-nuit));
  color: var(--beige); box-shadow: var(--ombre-forte);
}
.carte-profil h1 { color: var(--beige-clair); font-size: clamp(2rem, 4vw, 2.8rem); overflow-wrap: anywhere; }
.profil-sous-titre { opacity: 0.85; }
.fronde-profil { position: absolute; width: 200px; right: -20px; top: -60px; transform: rotate(35deg); opacity: 0.18; }

/* Avatar cliquable */
.grand-avatar {
  position: relative; flex: none; padding: 0; width: 112px; height: 112px;
  border-radius: 22px; background: transparent; box-shadow: none; overflow: hidden;
}
.grand-avatar:hover { background: transparent; }
.rond-avatar {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ocre); color: var(--fougere-nuit);
  font-family: var(--police-titre); font-weight: 800; font-size: 3em;
  box-shadow: inset 0 0 0 4px rgba(243, 236, 216, 0.5); border-radius: 22px; overflow: hidden;
}
.rond-avatar img { width: 100%; height: 100%; object-fit: cover; }
.grand-avatar small { /* "Changer" apparaît au survol */
  position: absolute; inset: auto 0 0 0; padding: 4px 0;
  background: rgba(31, 51, 25, 0.75); color: var(--beige); font-weight: 600;
  opacity: 0; transition: opacity 0.15s;
}
.grand-avatar:hover small, .grand-avatar:focus-visible small { opacity: 1; }

/* Statistiques */
.titre-section { font-size: 1.5em; }
.stats-jeux { display: flex; flex-direction: column; gap: 28px; }
.stats-jeu { display: flex; flex-direction: column; gap: 12px; }
.lien-classement { align-self: flex-end; font-weight: 600; color: var(--fougere-fonce); }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tuile {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px; border-radius: var(--arrondi);
  background: var(--beige-clair); border: 1px solid var(--beige-fonce); box-shadow: var(--ombre);
}
.tuile strong { font-family: var(--police-titre); font-size: 1.9em; font-weight: 800; color: var(--fougere-fonce); }
.tuile span { color: var(--texte-doux); font-size: 0.9em; }

/* Déconnexion et suppression */
.zone-sensible { display: grid; grid-template-columns: 1fr 1.6fr; gap: 28px; }

@media (max-width: 760px) {
  .zone-sensible { grid-template-columns: 1fr; }
  .carte-profil { flex-direction: column; text-align: center; padding: 24px; }
  .carte-profil h1 { font-size: 1.7rem; } /* un long pseudo tient sur une ligne */
}

/* "Note bien ton mot de passe" sous le formulaire d'inscription */
.avertissement-mdp {
  margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 0.9em;
  background: var(--ocre-pale); color: #5c4310;
}
