/* ==========================================
   COMMON.CSS - Variables et styles de base
   Application Réservation Ailéments
   ========================================== */

/* ===== VARIABLES CSS - Charte Graphique Ailéments ===== */
:root {
    /* Couleurs principales */
    --primary: #EC672C;
    --navy: #101820;
    --kaki: #707455;
    --taupe: #9F8F73;
    --light-blue: #ABC8CA;
    
    /* Couleurs fonctionnelles */
    --canyon: #0ea5e9;
    --violet: #7c3aed;
    --red-valid: #dc2626;
    --combo: #facc15;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Couleurs de fond et texte */
    --bg-page: #F8FAFC;
    --bg-white: #ffffff;
    --text-dark: #101820;
    --text-gray: #707455;
    --text-light: #94a3b8;
    
    /* Bordures et ombres */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Rayons de bordure */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    
    /* Espacements */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 25px;
}

/* ===== RESET CSS ===== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

*::before,
*::after {
    box-sizing: border-box;
}

/* ===== TYPOGRAPHIE ===== */
body {
    margin: 0;
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== ÉLÉMENTS FORMULAIRES DE BASE ===== */
input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: border-color var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-light);
}

/* ===== BOUTONS DE BASE ===== */
button {
    font-family: inherit;
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== UTILITAIRES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

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

.font-extrabold {
    font-weight: 800;
}

/* ===== ANIMATIONS ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease;
}

.animate-slideUp {
    animation: slideUp 0.3s ease;
}

/* ===== LOADER ===== */
.loader {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* ===== MESSAGES ===== */
.message-success {
    background: #dcfce7;
    color: #15803d;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid #22c55e;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid #ef4444;
}

.message-warning {
    background: #fef3c7;
    color: #92400e;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid #f59e0b;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-canyon {
    background: var(--canyon);
    color: white;
}

.badge-combo {
    background: var(--combo);
    color: #854d0e;
    border: 1px solid #ca8a04;
}

.badge-pending {
    background: #f1f5f9;
    color: #64748b;
}
