/* --- OXYCRM DESIGN SYSTEM (COMPONENTS.CSS) V7.0 --- */
/* Ce fichier gère le style global pour TOUTES les pages du CRM */

:root {
    /* Palette Principale (Apple Style) */
    --primary: #0071E3;
    --primary-hover: #0077ED;
    --danger: #FF3B30;
    --success: #34C759;
    --warning: #FF9500;
    
    /* Neutres */
    --bg-body: #F5F5F7;
    --bg-card: #FFFFFF;
    --text-main: #1D1D1F;
    --text-muted: #86868B;
    --border: #E5E5EA;
    --input-bg: #F5F5F7;
    
    /* Ombres */
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.15);
    
    /* Arrondis */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* --- 1. BOUTONS --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius-md);
    font-size: 13px; font-weight: 600; cursor: pointer; border: none;
    transition: all 0.2s ease; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--primary); color: white; box-shadow: 0 2px 10px rgba(0, 113, 227, 0.2); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3); }

.btn-secondary { background: var(--input-bg); color: var(--text-main); }
.btn-secondary:hover { background: #E5E5EA; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #ff5b52; }

.btn-ghost { background: transparent; color: var(--text-muted); padding: 6px 10px; }
.btn-ghost:hover { color: var(--text-main); background: rgba(0,0,0,0.03); }

.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* --- 2. FORMULAIRES (INPUTS) --- */
.form-group { margin-bottom: 15px; }
.form-label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; letter-spacing: 0.5px; }

.input-std, .select-std {
    width: 100%; padding: 12px 15px;
    background: var(--input-bg); border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 14px; font-weight: 500; color: var(--text-main);
    outline: none; transition: 0.2s; box-sizing: border-box;
}
.input-std:focus, .select-std:focus { background: white; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1); }

/* --- 3. MODALES --- */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.3); backdrop-filter: blur(5px);
    z-index: 9999; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-card {
    background: white; width: 440px; max-width: 90%;
    padding: 30px; border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transform: scale(0.95); transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-card { transform: scale(1); }

.modal-header h3 { margin: 0; font-size: 20px; font-weight: 700; }
.modal-header p { margin: 5px 0 20px; color: var(--text-muted); font-size: 13px; }
.modal-footer { margin-top: 25px; display: flex; justify-content: flex-end; gap: 10px; }

/* --- 4. SWITCH IOS --- */
.switch { position: relative; display: inline-block; width: 36px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #E5E5EA; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(14px); }