/* Correctif modale « Espace joueur » — rennespadel.com — v5 (17/09/2026)
   CAUSE RACINE : la carte est en `flex flex-col max-h-[90vh]`. Par défaut un enfant
   de flex a flex-shrink:1 → quand la modale atteint sa hauteur max, l'EN-TÊTE
   (bandeau « Espace joueur ») et le pied sont COMPRIMÉS sous leur contenu, et comme
   le bandeau est en `overflow-hidden`, tout ce qui dépasse (texte, badges, stats)
   est rogné. On interdit la compression des blocs non défilants.
   Aucun JS touché — réversible en supprimant la ligne <link>. */

/* 1. l'en-tête et le pied ne se compriment JAMAIS (c'est le corps qui défile) */
#modal-profile > [class*="modal-content"] > div:first-child,
#modal-profile > [class*="modal-content"] > div:last-child,
#modal-profile [class*="radial-gradient"] {
  flex-shrink: 0 !important;
  min-height: auto !important;
}
/* le corps reste le seul élément élastique et défilant */
#modal-profile [class*="overflow-y-auto"] {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

/* 2. carte : largeur confortable, jamais plus large que l'écran */
#modal-profile [class*="modal-content"] {
  max-width: min(1100px, 96vw) !important;
  width: 100% !important;
}

/* 3. deux colonnes garanties dès 1024px (carte joueur à gauche, formulaire à droite) */
@media (min-width: 1024px) {
  #modal-profile [class*="grid-cols-[minmax(320px"],
  #modal-profile [class*="grid-cols-[220px"] {
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.3fr) !important;
    align-items: start !important;
    width: 100% !important;
  }
}
#modal-profile [class*="grid-cols-[minmax(320px"] > *,
#modal-profile [class*="grid-cols-[220px"] > * { min-width: 0 !important; }

/* 4. les cartes de stats de l'en-tête restent sur une ligne */
#modal-profile [class*="grid-cols-3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* 5. colonnes de champs égales + champs pleine largeur */
#modal-profile section [class*="grid-cols-2"],
#modal-profile [class*="space-y-6"] [class*="grid-cols-2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
}
#modal-profile input,
#modal-profile select,
#modal-profile textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 6. aucun débordement horizontal */
#modal-profile .modal-content,
#modal-profile [class*="overflow-y-auto"] { overflow-x: hidden !important; }


/* 7. V6 — les 3 cartes de stats (Matchs / Organisés / Partenaires) ne doivent
   jamais déborder sur mobile : le texte se replie ou se comprime dans sa carte. */
#modal-profile [class*="grid-cols-3"] > * {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}
#modal-profile [class*="grid-cols-3"] p,
#modal-profile [class*="grid-cols-3"] span {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  hyphens: auto;
}
@media (max-width: 640px) {
  /* padding réduit et gap resserré : plus de place utile pour les libellés */
  #modal-profile [class*="grid-cols-3"] { gap: 8px !important; }
  #modal-profile [class*="grid-cols-3"] > * { padding: 10px !important; }
}
