/*================================================================
  UTILITAIRES CSS - Classes réutilisables pour éviter les styles inline
  Fichier créé pour centraliser tous les styles dynamiques
================================================================*/

/*----------------------------------------------------------------
  Classes d'état et de visibilité
----------------------------------------------------------------*/
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.error-message {
    color: red;
    padding: 20px;
    text-align: center;
}

.error-display {
    display: block;
}

/*----------------------------------------------------------------
  Classes pour les modales et popups
----------------------------------------------------------------*/
.modal-overlay-hidden {
    display: none;
}

.modal-overlay-visible {
    display: flex;
}

/* Style pour les images inline dans les headers de popup */
.popup-header-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

/*----------------------------------------------------------------
  Classes pour les barres de progression
----------------------------------------------------------------*/
.progress-fill {
    transition: width 0.3s ease;
}

/*----------------------------------------------------------------
  Classes pour les bannières de profil
----------------------------------------------------------------*/
.player-banner-active {
    background-size: cover;
    background-position: center;
}

.player-banner-default {
    background-image: none;
}

/*----------------------------------------------------------------
  Classes pour les modales dynamiques
----------------------------------------------------------------*/
.modal-content-container {
    padding: 20px;
    color: #fff;
}

.modal-title-centered {
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-icon-24 {
    width: 24px;
    height: 24px;
}

.modal-icon-28 {
    width: 28px;
    height: 28px;
}

/*----------------------------------------------------------------
  Classes pour les sections de contenu
----------------------------------------------------------------*/
.content-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.content-section-title {
    margin-bottom: 12px;
    color: #fbbf24;
}

.content-section-title-white {
    margin-bottom: 12px;
    color: #fff;
}

/*----------------------------------------------------------------
  Classes pour les options et réglages
----------------------------------------------------------------*/
.option-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.option-label {
    color: #fff;
}

.option-value {
    color: #2ecc71;
    font-weight: bold;
}

/*----------------------------------------------------------------
  Classes pour les notes et textes secondaires
----------------------------------------------------------------*/
.note-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #aaa;
    font-style: italic;
}

/*----------------------------------------------------------------
  Classes pour les profils de leaderboard
----------------------------------------------------------------*/
.profile-banner {
    position: relative;
    height: 120px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-banner-with-image {
    background-size: cover;
    background-position: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #1a1a2e;
    position: absolute;
    bottom: -40px;
    left: 20px;
    overflow: hidden;
    background: #2a2a3e;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-pseudo-container {
    flex: 1;
}

.profile-pseudo-title {
    margin: 0;
    color: #fff;
    font-size: 24px;
}

.profile-level-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/*----------------------------------------------------------------
  Classes pour les badges cosmétiques
----------------------------------------------------------------*/
.cosmetic-badge-with-image {
    background-size: cover;
    background-position: center;
}

/*----------------------------------------------------------------
  Classes pour les animations de contenu
----------------------------------------------------------------*/
.content-fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-fade-in {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/*----------------------------------------------------------------
  Classes pour la page de crédits
----------------------------------------------------------------*/
.credits-container {
    padding: 20px;
    color: #fff;
    text-align: center;
}

.credits-title {
    margin-bottom: 10px;
    color: #fbbf24;
}

.credits-version {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 30px;
}

.credits-section-item {
    margin: 6px 0;
    font-size: 14px;
    color: #ddd;
}

.credits-footer {
    margin-top: 30px;
    padding: 15px;
    border-top: 2px solid rgba(255,255,255,0.1);
}

.credits-thanks {
    font-size: 16px;
    font-weight: bold;
    color: #fbbf24;
}

.credits-copyright {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
}

/*----------------------------------------------------------------
  Classes pour la page de règles
----------------------------------------------------------------*/
.rules-container {
    padding: 20px;
    color: #fff;
}

.rules-title {
    margin-bottom: 20px;
    text-align: center;
    color: #fbbf24;
}

.rules-intro {
    margin-bottom: 25px;
    text-align: center;
    font-size: 14px;
    font-style: italic;
    color: #ddd;
}

/*----------------------------------------------------------------
  Classes pour les éléments de formulaire
----------------------------------------------------------------*/
.form-container {
    padding: 20px;
    color: #fff;
}

.flex-container {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.gap-10 {
    gap: 10px;
}

/*----------------------------------------------------------------
  Classes de texte
----------------------------------------------------------------*/
.text-center {
    text-align: center;
}

.text-white {
    color: #fff;
}

.text-gray {
    color: #aaa;
}

.text-yellow {
    color: #fbbf24;
}

.text-light-gray {
    color: #ddd;
}

.font-bold {
    font-weight: bold;
}

.font-italic {
    font-style: italic;
}

/*----------------------------------------------------------------
  Classes d'espacement
----------------------------------------------------------------*/
.mb-10 {
    margin-bottom: 10px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-25 {
    margin-bottom: 25px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.p-15 {
    padding: 15px;
}

.p-20 {
    padding: 20px;
}

/*----------------------------------------------------------------
  Classes de taille de police
----------------------------------------------------------------*/
.text-12 {
    font-size: 12px;
}

.text-14 {
    font-size: 14px;
}

.text-16 {
    font-size: 16px;
}

.text-24 {
    font-size: 24px;
}

/*----------------------------------------------------------------
  Classes pour les popups de casernes
----------------------------------------------------------------*/
.garage-empty-message {
    color: #999;
    font-size: 0.85em;
    margin: 5px 0;
}

.garage-full-warning {
    color: #d9534f;
    font-size: 0.85em;
    margin: 5px 0;
}

.popup-emplacement {
    text-align: center;
    font-family: Arial, sans-serif;
}

.popup-emplacement-title {
    margin: 0 0 8px 0;
}

.popup-emplacement-quartier {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 0.9em;
}

.popup-emplacement-coords {
    margin: 0 0 8px 0;
    color: #999;
    font-size: 0.75em;
    font-family: monospace;
}

.popup-emplacement-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

/* Boutons de slots de caserne */
.slot-btn {
    padding: 5px 8px;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85em;
}

.slot-btn-police {
    background: #007bff;
}

.slot-btn-pompier {
    background: #ff8c00;
}

.slot-btn-ambulance {
    background: #dc3545;
}

.slot-btn-disabled {
    background: #555 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    filter: grayscale(100%);
    opacity: 0.6;
}

.slot-btn-counter {
    font-size: 0.75em;
    display: block;
    margin-top: 2px;
}
