/**
 * STYLES PERSONNALISÉS AGRICONECT
 * 
 * Organisation:
 * 1. Variables CSS personnalisées
 * 2. Styles globaux et reset
 * 3. Navigation et header
 * 4. Section Hero
 * 5. Cartes et composants
 * 6. Formulaires
 * 7. Tableaux de bord
 * 8. Responsive design
 * 9. Animations et transitions
 * 10. Utilitaires
 */

/* ============================================================
   1. VARIABLES CSS PERSONNALISÉES
   ============================================================ */

:root {
    /* Couleurs principales */
    --primary-green: #198754;
    --primary-green-light: #20c997;
    --primary-green-dark: #146c43;
    --secondary-orange: #fd7e14;
    --accent-yellow: #ffc107;
    
    /* Couleurs de fond */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #212529;
    
    /* Couleurs de texte */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    
    /* Couleurs d'état */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    /* Typographie */
    --font-family-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;
    
    /* Espacements */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
    
    /* Bordures et ombres */
    --border-radius: 0.375rem;
    --border-radius-lg: 0.75rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* ============================================================
   2. STYLES GLOBAUX ET RESET
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Amélioration de la lisibilité */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

p {
    margin-bottom: var(--spacing-md);
}

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

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

/* ============================================================
   3. NAVIGATION ET HEADER
   ============================================================ */

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Styles pour le logo dans la navigation */
.logo-navbar {
    height: 40px;
    width: auto;
    max-width: 50px;
    object-fit: contain;
    transition: all var(--transition-fast);
    filter: brightness(1.1) contrast(1.1);
}

.navbar-brand:hover .logo-navbar {
    transform: scale(1.1);
    filter: brightness(1.2) contrast(1.2);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* Effet de soulignement pour les liens actifs */
.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 60%;
    height: 2px;
    background-color: var(--accent-yellow);
    transform: translateX(-50%);
}

/* ============================================================
   4. SECTION HERO
   ============================================================ */

.hero-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Compensation navbar fixe */
}

/* Effet de particules en arrière-plan */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-icon {
    font-size: 15rem;
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.05); opacity: 0.5; }
}

.hero-buttons .btn {
    box-shadow: var(--box-shadow-lg);
    transition: all var(--transition-normal);
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

.hero-stats h3 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

/* ============================================================
   5. CARTES ET COMPOSANTS
   ============================================================ */

.feature-card {
    transition: all var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary-green);
}

.feature-icon i {
    transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon i {
    transform: scale(1.1);
    color: var(--primary-green-light) !important;
}

/* Cartes du dashboard */
.dashboard-card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: all var(--transition-normal);
    overflow: hidden;
}

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

.dashboard-card .card-header {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: white;
    border-bottom: none;
    padding: 1.25rem;
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

/* Badges personnalisés */
.badge-status {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.badge-status.active {
    background-color: var(--success);
}

.badge-status.pending {
    background-color: var(--warning);
}

.badge-status.suspended {
    background-color: var(--danger);
}

/* ============================================================
   6. FORMULAIRES
   ============================================================ */

.form-container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    padding: 2rem;
    margin: 2rem 0;
}

.form-floating {
    margin-bottom: var(--spacing-md);
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    font-size: var(--font-size-base);
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
    background-color: rgba(25, 135, 84, 0.02);
}

.form-control.is-invalid {
    border-color: var(--danger);
    background-image: none;
}

.form-control.is-valid {
    border-color: var(--success);
    background-image: none;
}

/* Labels flottants améliorés */
.form-floating > label {
    color: var(--text-secondary);
    font-weight: 500;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-green);
    font-weight: 600;
}

/* Boutons personnalisés */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: var(--box-shadow);
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-lg);
    background: linear-gradient(135deg, var(--primary-green-dark), var(--primary-green));
}

/* Sélecteurs personnalisés */
.form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* ============================================================
   7. TABLEAUX DE BORD
   ============================================================ */

.dashboard-header {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.dashboard-sidebar {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    padding: 0;
    overflow: hidden;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #f1f3f4;
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--primary-green);
    padding-left: 2rem;
}

.sidebar-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--primary-green);
}

/* Statistiques du dashboard */
.stat-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--primary-green);
    transition: all var(--transition-normal);
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* ============================================================
   8. TABLES ET LISTES
   ============================================================ */

.table-custom {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table-custom thead {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: white;
}

.table-custom thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table-custom tbody td {
    border-color: #f1f3f4;
    padding: 1rem;
    vertical-align: middle;
}

.table-custom tbody tr {
    transition: background-color var(--transition-fast);
}

.table-custom tbody tr:hover {
    background-color: rgba(25, 135, 84, 0.05);
}

/* ============================================================
   9. ALERTES ET NOTIFICATIONS
   ============================================================ */

.alert-custom {
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.alert-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 4px;
}

.alert-custom.alert-success::before {
    background-color: var(--success);
}

.alert-custom.alert-warning::before {
    background-color: var(--warning);
}

.alert-custom.alert-danger::before {
    background-color: var(--danger);
}

.alert-custom.alert-info::before {
    background-color: var(--info);
}

/* ============================================================
   10. COMPOSANTS SPÉCIALISÉS AGRICOLES
   ============================================================ */

/* Carte de profil utilisateur */
.profile-card {
    background: linear-gradient(135deg, white, #f8f9fa);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--box-shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-yellow));
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary-green);
    object-fit: cover;
    margin: 0 auto 1rem;
    box-shadow: var(--box-shadow-lg);
}

.profile-default-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 3rem;
}

/* Indicateurs de statut */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.active {
    background-color: var(--success);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.status-indicator.pending {
    background-color: var(--warning);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.status-indicator.inactive {
    background-color: var(--text-muted);
}

/* ============================================================
   11. ANIMATIONS ET TRANSITIONS
   ============================================================ */

/* Animation de chargement */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation de fade-in pour les éléments */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de slide-in pour les menus */
.slide-in {
    transform: translateX(-100%);
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

/* ============================================================
   12. RESPONSIVE DESIGN
   ============================================================ */

/* Tablettes */
@media (max-width: 992px) {
    .hero-section {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-icon {
        font-size: 8rem;
        margin-top: 2rem;
    }
    
    .dashboard-sidebar {
        margin-bottom: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Mobiles */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-icon {
        font-size: 6rem;
    }
    
    .feature-card {
        margin-bottom: 1.5rem;
    }
    
    .dashboard-header {
        padding: 1.5rem 0;
        text-align: center;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.6rem 1.5rem;
    }
    
    .hero-buttons .btn {
        font-size: 1rem;
        padding: 0.75rem 2rem;
    }
    
    /* Logo responsive sur mobile */
    .logo-navbar {
        height: 35px;
        max-width: 45px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* ============================================================
   13. UTILITAIRES ET HELPERS
   ============================================================ */

/* Espacements personnalisés */
.p-custom { padding: var(--spacing-xl); }
.m-custom { margin: var(--spacing-xl); }
.mt-custom { margin-top: var(--spacing-xl); }
.mb-custom { margin-bottom: var(--spacing-xl); }

/* Couleurs utilitaires */
.text-primary-green { color: var(--primary-green) !important; }
.bg-primary-green { background-color: var(--primary-green) !important; }
.border-primary-green { border-color: var(--primary-green) !important; }

/* Ombres utilitaires */
.shadow-custom { box-shadow: var(--box-shadow) !important; }
.shadow-lg-custom { box-shadow: var(--box-shadow-lg) !important; }

/* Bordures arrondies */
.rounded-custom { border-radius: var(--border-radius-lg) !important; }

/* Transitions */
.transition-custom { transition: all var(--transition-normal) !important; }

/* Overlay pour les modales */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Classes d'aide pour le développement */
.debug-border { border: 2px solid red !important; }
.debug-bg { background-color: rgba(255, 0, 0, 0.1) !important; }

/* ============================================================
   14. IMPRESSION (PRINT STYLES)
   ============================================================ */

@media print {
    .no-print {
        display: none !important;
    }
    
    .navbar,
    .footer,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }
    
    .card,
    .dashboard-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ============================================================
   15. ACCESSIBILITÉ
   ============================================================ */

/* Focus visible pour la navigation au clavier */
.form-control:focus,
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Amélioration du contraste pour les liens */
.text-muted a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.text-muted a:hover {
    color: var(--text-primary);
}

/* Indicateurs visuels pour les erreurs */
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Amélioration pour les lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   16. THÈME SOMBRE (DARK MODE) - PRÉPARATION FUTURE
   ============================================================ */

@media (prefers-color-scheme: dark) {
    /* Variables pour le thème sombre */
    :root {
        --bg-light: #1a1a1a;
        --bg-white: #2d2d2d;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-muted: #888888;
    }
    
    /* Application conditionnelle du thème sombre */
    .dark-mode-ready {
        background-color: var(--bg-light);
        color: var(--text-primary);
    }
    
    .dark-mode-ready .card,
    .dark-mode-ready .form-container {
        background-color: var(--bg-white);
        color: var(--text-primary);
    }
    
    .dark-mode-ready .form-control {
        background-color: var(--bg-white);
        border-color: #444;
        color: var(--text-primary);
    }
    
    .dark-mode-ready .table-custom {
        background-color: var(--bg-white);
        color: var(--text-primary);
    }
} 
    
    /* Navigation mobile améliorée */
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
        text-align: center;
    }


/* Très petits écrans */
@media (max-width: 576px) {
    .hero-section {
        padding-top: 80px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-stats h3 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .form-container {
                padding: 1rem;
        margin: 1rem 0;
    }
    
    .profile-card {
        padding: 1.5rem;
    }
    
    .profile-avatar, 
    .profile-default-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .table-custom thead th {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
    
    .table-custom tbody td {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* ============================================================
   13. UTILITAIRES ET HELPERS
   ============================================================ */

/* Espacements personnalisés */
.p-custom { padding: var(--spacing-xl); }
.m-custom { margin: var(--spacing-xl); }
.mt-custom { margin-top: var(--spacing-xl); }
.mb-custom { margin-bottom: var(--spacing-xl); }

/* Couleurs utilitaires */
.text-primary-green { color: var(--primary-green) !important; }
.bg-primary-green { background-color: var(--primary-green) !important; }
.border-primary-green { border-color: var(--primary-green) !important; }

/* Ombres utilitaires */
.shadow-custom { box-shadow: var(--box-shadow) !important; }
.shadow-lg-custom { box-shadow: var(--box-shadow-lg) !important; }

/* Bordures arrondies */
.rounded-custom { border-radius: var(--border-radius-lg) !important; }

/* Transitions */
.transition-custom { transition: all var(--transition-normal) !important; }

/* Overlay pour les modales */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Classes d'aide pour le développement */
.debug-border { border: 2px solid red !important; }
.debug-bg { background-color: rgba(255, 0, 0, 0.1) !important; }

/* ============================================================
   14. IMPRESSION (PRINT STYLES)
   ============================================================ */

@media print {
    .no-print {
        display: none !important;
    }
    
    .navbar,
    .footer,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }
    
    .card,
    .dashboard-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ============================================================
   15. ACCESSIBILITÉ
   ============================================================ */

/* Focus visible pour la navigation au clavier */
.form-control:focus,
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Amélioration du contraste pour les liens */
.text-muted a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.text-muted a:hover {
    color: var(--text-primary);
}

/* Indicateurs visuels pour les erreurs */
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Amélioration pour les lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   16. THÈME SOMBRE (DARK MODE) - PRÉPARATION FUTURE
   ============================================================ */

@media (prefers-color-scheme: dark) {
    /* Variables pour le thème sombre */
    :root {
        --bg-light: #1a1a1a;
        --bg-white: #2d2d2d;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-muted: #888888;
    }
    
    /* Application conditionnelle du thème sombre */
    .dark-mode-ready {
        background-color: var(--bg-light);
        color: var(--text-primary);
    }
    
    .dark-mode-ready .card,
    .dark-mode-ready .form-container {
        background-color: var(--bg-white);
        color: var(--text-primary);
    }
    
    .dark-mode-ready .form-control {
        background-color: var(--bg-white);
        border-color: #444;
        color: var(--text-primary);
    }
    
    .dark-mode-ready .table-custom {
        background-color: var(--bg-white);
        color: var(--text-primary);
    }
}

/* ============================================================
   17. STYLES SPÉCIFIQUES POUR LA SECTION FIGA
   ============================================================ */

.figa-section {
    background-color: var(--accent-yellow);
    position: relative;
    overflow: hidden;
    padding: 3rem 0;
}

.figa-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.2) 0%, transparent 30%);
    opacity: 0.6;
}

.figa-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    padding: 2rem;
    border-left: 5px solid var(--primary-green);
    transition: all var(--transition-normal);
}

.figa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.figa-steps {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.figa-steps::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--primary-green);
}

.figa-step {
    position: relative;
    padding-bottom: 1.5rem;
}

.figa-step::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-green);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-green);
}

.figa-stats {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    color: white;
    box-shadow: var(--box-shadow-lg);
}

.figa-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1;
}

.figa-stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* ============================================================
   18. ANIMATIONS SPÉCIFIQUES POUR LA PAGE D'ACCUEIL
   ============================================================ */

/* Animation pour les statistiques */
.counter-animation {
    display: inline-block;
    animation: countUp 2s ease-out forwards;
}

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

/* Animation pour les cartes de fonctionnalités */
.feature-card {
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.animated {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de défilement pour les appels à l'action */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    background-color: white;
    border-radius: 50%;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    80% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 0;
    }
}

/* ============================================================
   19. STYLES POUR LES PAGES DE CONNEXION ET INSCRIPTION
   ============================================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green-light) 0%, var(--primary-green-dark) 100%);
    padding: 2rem 0;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    padding: 2rem;
    text-align: center;
    color: white;
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.auth-body {
    padding: 2rem;
}

.auth-footer {
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}


.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

.auth-divider-text {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================================
   20. STYLES ADDITIONNELS POUR LES COMPOSANTS INTERACTIFS
   ============================================================ */

/* Tooltip personnalisé */
.tooltip-custom {
    position: relative;
    display: inline-block;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--bg-dark);
    color: white;
    text-align: center;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.tooltip-custom .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--bg-dark) transparent transparent transparent;
}

.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Bouton de retour en haut */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--box-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: var(--primary-green-dark);
}