/* ========================================
   ACPS CSS INDEX - Point d'entrée principal
   Importation et organisation des fichiers CSS de référence
   ======================================== */

/* ========================================
   1. IMPORTS PRINCIPAUX
   ======================================== */

/* Configuration de base */
@import url('./acps-config.css');

/* CSS de référence principal */
@import url('./acps-reference.css');

/* Composants spécialisés */
@import url('./acps-components.css');

/* ========================================
   2. OPTIMISATIONS GLOBALES
   ======================================== */

/* Optimisation des performances */
* {
    box-sizing: border-box;
}

/* Amélioration du rendu des polices */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ========================================
   3. RÉGLAGES SPÉCIFIQUES ACPS
   ======================================== */

/* Configuration des couleurs de marque */
:root {
    /* Couleurs principales ACPS */
    --acps-brand-primary: #78b3b0;
    --acps-brand-secondary: #92c2bf;
    --acps-brand-accent: #71b0ac;
    
    /* Couleurs de statut */
    --acps-status-success: #10b981;
    --acps-status-warning: #f59e0b;
    --acps-status-error: #ef4444;
    --acps-status-info: #3b82f6;
    
    /* Couleurs de fond */
    --acps-bg-primary: #ffffff;
    --acps-bg-secondary: #f9fafb;
    --acps-bg-tertiary: #f3f4f6;
    
    /* Couleurs de texte */
    --acps-text-primary: #111827;
    --acps-text-secondary: #6b7280;
    --acps-text-tertiary: #9ca3af;
}

/* ========================================
   4. COMPOSANTS GLOBAUX ACPS
   ======================================== */

/* Header ACPS */
.acps-header {
    background: linear-gradient(135deg, var(--acps-brand-primary), var(--acps-brand-secondary));
    color: white;
    padding: var(--spacing-4) 0;
    box-shadow: var(--shadow-md);
}

/* Navigation ACPS */
.acps-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

/* Logo ACPS */
.acps-logo {
    height: 40px;
    width: auto;
}

/* ========================================
   5. LAYOUTS SPÉCIFIQUES
   ======================================== */

/* Layout Prévoyance */
.layout-prevoyance {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout-prevoyance .main-content {
    flex: 1;
    padding: var(--spacing-6) 0;
}

/* Layout Signature */
.layout-signature {
    background: var(--acps-bg-secondary);
    min-height: 100vh;
}

/* ========================================
   6. COMPOSANTS DE FORMULAIRE ACPS
   ======================================== */

/* Formulaire principal ACPS */
.acps-form {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-6);
}

/* Section de formulaire ACPS */
.acps-form-section {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-6);
    overflow: hidden;
}

.acps-form-section-header {
    background: var(--acps-bg-secondary);
    padding: var(--spacing-4);
    border-bottom: 1px solid var(--acps-gray-200);
}

.acps-form-section-body {
    padding: var(--spacing-6);
}

/* ========================================
   7. BOUTONS ACPS
   ======================================== */

/* Bouton principal ACPS */
.btn-acps-primary {
    background: var(--acps-brand-primary);
    color: white;
    border: none;
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
}

.btn-acps-primary:hover {
    background: var(--acps-brand-accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-acps-primary:active {
    transform: translateY(0);
}

.btn-acps-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Bouton secondaire ACPS */
.btn-acps-secondary {
    background: transparent;
    color: var(--acps-brand-primary);
    border: 2px solid var(--acps-brand-primary);
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
}

.btn-acps-secondary:hover {
    background: var(--acps-brand-primary);
    color: white;
}

/* ========================================
   8. MESSAGES ACPS
   ======================================== */

/* Message de succès */
.acps-message-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: var(--spacing-4);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-4);
}

/* Message d'erreur */
.acps-message-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: var(--spacing-4);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-4);
}

/* Message d'information */
.acps-message-info {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
    padding: var(--spacing-4);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-4);
}

/* Message d'avertissement */
.acps-message-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: var(--spacing-4);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-4);
}

/* ========================================
   9. LOADING STATES ACPS
   ======================================== */

/* Overlay de chargement */
.acps-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

/* Spinner ACPS */
.acps-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--acps-gray-200);
    border-top-color: var(--acps-brand-primary);
    border-radius: 50%;
    animation: acps-spin 1s linear infinite;
}

@keyframes acps-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   10. RESPONSIVE ACPS
   ======================================== */

/* Mobile */
@media (max-width: 768px) {
    .acps-form {
        padding: var(--spacing-4);
    }
    
    .acps-form-section-body {
        padding: var(--spacing-4);
    }
    
    .acps-nav {
        flex-direction: column;
        gap: var(--spacing-4);
    }
    
    .btn-acps-primary,
    .btn-acps-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .acps-form {
        padding: var(--spacing-5);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .acps-form {
        padding: var(--spacing-6);
    }
}

/* ========================================
   11. ACCESSIBILITÉ ACPS
   ======================================== */

/* Focus visible */
.acps-focus-visible:focus {
    outline: 2px solid var(--acps-brand-primary);
    outline-offset: 2px;
}

/* Contraste élevé */
@media (prefers-contrast: high) {
    .btn-acps-primary {
        border: 2px solid currentColor;
    }
    
    .acps-form-section {
        border: 2px solid var(--acps-text-primary);
    }
}

/* Réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
    .acps-spinner {
        animation: none;
    }
    
    .btn-acps-primary:hover {
        transform: none;
    }
}

/* ========================================
   12. PRINT STYLES ACPS
   ======================================== */

@media print {
    .acps-loading-overlay,
    .acps-nav,
    .btn-acps-primary,
    .btn-acps-secondary {
        display: none;
    }
    
    .acps-form-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .acps-form {
        padding: 0;
    }
}
