/**
 * Styles globaux pour toutes les pages client
 * Importation et variables communes pour la cohérence du design
 */

/* Variables CSS globales */
:root {
    --primary-color: #2C5530;
    --primary-light: #4A7C59;
    --secondary-color: #E67E22;
    --accent-color: #F39C12;
    --success-color: #27AE60;
    --danger-color: #E74C3C;
    --warning-color: #F39C12;
    --text-color: #2C3E50;
    --text-light: #7F8C8D;
    --background-light: #F8F9FA;
    --white: #FFFFFF;
    --border-color: #E9ECEF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Base styles communes */
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Styles des boutons cohérents */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    line-height: 1;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background: #D35400;
    border-color: #D35400;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--background-light);
    border-color: var(--text-light);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
    border: 2px solid var(--success-color);
}

.btn-success:hover {
    background: #229954;
    border-color: #229954;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Sections communes */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Cards communes */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1.5rem 2rem;
}

.card-content {
    padding: 2rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
}

/* Forms communes */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Grid layouts communes */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Notifications communes */
.notification {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-success {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid var(--success-color);
    color: #155724;
}

.notification-error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--danger-color);
    color: #721c24;
}

.notification-warning {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid var(--warning-color);
    color: #856404;
}

.notification-info {
    background: rgba(44, 85, 48, 0.1);
    border: 1px solid var(--primary-color);
    color: #0c4128;
}

/* Loading states */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive breakpoints */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2 {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .card-content {
        padding: 1.5rem;
    }
}

/* Print styles */
@media print {
    .btn,
    .navigation,
    .sidebar {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-light: #333;
    }
    
    .card {
        border: 2px solid black;
    }
    
    .btn {
        border-width: 3px;
    }
}

/* Focus indicators for keyboard navigation */
.btn:focus,
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}