/* =============================================
   Styles de base
   ============================================= */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'Segoe UI', 'Trebuchet MS', Tahoma, sans-serif;
    background: linear-gradient(135deg, #F0F9F4 0%, #FFF8F0 25%, #FFF5F3 50%, #FFF0F3 75%, #F5F7FA 100%);
    background-attachment: fixed;
    height: 100vh;
    overflow: hidden;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Écrans */
.screen {
    display: none;
}

.screen.active {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Titres */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* Liens */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Messages d'erreur et succès */
.error-message {
    color: var(--danger-color);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
    background: #fee;
    border: 1px solid var(--danger-color);
    border-radius: var(--border-radius-md);
    display: none;
}

.error-message.active {
    display: block;
}

.success-message {
    color: var(--success-color);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
    background: #efe;
    border: 1px solid var(--success-color);
    border-radius: var(--border-radius-md);
}

/* =============================================
   Alertes flottantes (toasts)
   ============================================= */

.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
}

.alert--floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    animation: slideInRight 0.3s ease-out;
}

.alert-success {
    background: var(--success-color);
    color: white;
    border: 2px solid #388E3C;
}

.alert-danger {
    background: var(--danger-color);
    color: white;
    border: 2px solid #C62828;
}

.alert-info {
    background: var(--info-color);
    color: white;
    border: 2px solid #1976D2;
}

.alert-warning {
    background: var(--warning-color);
    color: white;
    border: 2px solid #F57C00;
}

/* Animations pour les alertes */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* =============================================
   Loader global
   ============================================= */

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.global-loader__content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.global-loader__spinner {
    margin: 0 auto 15px;
}

.global-loader__text {
    margin: 0;
    font-weight: bold;
}

/* =============================================
   Utilitaires de formatage
   ============================================= */

.status-active {
    color: green;
    font-weight: bold;
}

.status-inactive {
    color: red;
    font-weight: bold;
}

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

.capacity-display--green {
    color: #4CAF50;
}

.capacity-display--orange {
    color: #FF9800;
}

.capacity-display--red {
    color: #F44336;
}

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

.solde-tickets--green {
    color: #4CAF50;
}

.solde-tickets--orange {
    color: #FF9800;
}

.solde-tickets--red {
    color: #F44336;
}
