/* Styles pour IHRO West Africa */

:root {
    /* Palette apaisante et professionnelle pour IHRO */
    --primary-color: #2c5530;      /* Vert forêt professionnel */
    --primary-light: #4a7c59;      /* Vert plus clair */
    --secondary-color: #6c757d;     /* Gris neutre */
    --accent-color: #d4a574;       /* Beige doré chaleureux */
    --accent-light: #e8c4a0;       /* Beige clair */
    --success-color: #28a745;      /* Vert succès */
    --warning-color: #ffc107;      /* Jaune attention */
    --danger-color: #dc3545;       /* Rouge erreur */
    --info-color: #17a2b8;         /* Bleu info discret */
    --light-color: #f8f9fa;        /* Gris très clair */
    --dark-color: #212529;         /* Gris foncé */
    --warm-white: #fefefe;         /* Blanc chaud */
    --soft-gray: #e9ecef;          /* Gris doux */
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Navigation */
.navbar-brand img {
    transition: transform 0.3s ease;
}

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

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--warning-color) !important;
}

/* Hero Section moderne avec motifs */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--primary-color) 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(247, 147, 30, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(247, 147, 30, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

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

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
    z-index: 1;
}

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

/* Cards */
.card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--primary-light), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 85, 48, 0.4);
    color: white;
}

.btn-warning {
    background: linear-gradient(45deg, var(--warning-color), #ffb300);
    border: none;
    color: var(--dark-color);
}

.btn-warning:hover {
    background: linear-gradient(45deg, #ffb300, var(--warning-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
    color: var(--dark-color);
}

/* Nouveau bouton accent avec couleur apaisante */
.btn-accent {
    background: linear-gradient(45deg, var(--accent-color), var(--accent-light));
    border: none;
    color: var(--dark-color);
    font-weight: 600;
}

.btn-accent:hover {
    background: linear-gradient(45deg, var(--accent-light), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 165, 116, 0.4);
    color: var(--dark-color);
}

/* Sections */
section {
    padding: 80px 0;
}

.display-5 {
    font-weight: 700;
    color: var(--dark-color);
}

/* Icons */
.fa-2x {
    color: var(--primary-color);
}

/* Social Links */
.social-links a {
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--warning-color) !important;
    transform: translateY(-3px);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: 6px;
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(45deg, #d1e7dd, #a3d9a4);
    color: #0f5132;
}

.alert-danger {
    background: linear-gradient(45deg, #f8d7da, #f1aeb5);
    color: #842029;
}

.alert-warning {
    background: linear-gradient(45deg, #fff3cd, #ffecb5);
    color: #664d03;
}

.alert-info {
    background: linear-gradient(45deg, #d1ecf1, #b6e3f0);
    color: #055160;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 2px solid #e9ecef;
    color: var(--primary-color);
    font-weight: 500;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 5px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 30px 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, .social-links, .pagination {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* Accessibility */
.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;
}

/* Focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid var(--warning-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

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

/* Classes utilitaires pour les textes avec opacité */
.text-white-70 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.text-dark-75 {
    color: rgba(0, 0, 0, 0.75) !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #343a40;
        --dark-color: #f8f9fa;
    }
}

/* Animations pour les sections hero enrichies */
.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
}

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

/* Styles pour les statistiques dans les hero sections */
.hero-section .row .col-md-3 .h2,
.hero-section .row .col-md-4 .h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Amélioration des boutons dans les hero sections */
.hero-section .btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Styles pour les indicateurs visuels dans les hero sections */
.hero-section .bg-white.bg-opacity-20 {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive pour les hero sections enrichies */
@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2.2rem;
    }

    .hero-section .lead {
        font-size: 1.1rem !important;
    }

    .hero-section .row .col-md-3 .h2,
    .hero-section .row .col-md-4 .h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section .display-4 {
        font-size: 1.8rem;
    }

    .hero-section .row .col-md-3 .h2,
    .hero-section .row .col-md-4 .h2 {
        font-size: 1.8rem;
    }
}
