/* Variables globales */
:root {
    /* Couleurs principales */
    --primary-color: #020873; /* Deep Blue */
    --primary-dark: #020659;  /* Deeper Blue */
    --primary-light: #05DBF2; /* Bright Cyan as light accent for UI states */
    
    /* Couleurs secondaires */
    --secondary-color: #010B40;   /* Navy */
    --secondary-dark: #020659;    /* Align with primary dark */
    --secondary-light: #05F2DB;   /* Mint accent */
    
    /* Couleurs de fond */
    --background-color: #ffffff;
    --background-alt: #f8fafc;
    --card-bg: #ffffff;
    
    /* Couleurs de texte */
    --text-color: #1e293b;
    --text-light: #64748b;
    --text-dark: #0f172a;
    
    /* Couleurs d'accent */
    --accent-color: #05DBF2;   /* Cyan */
    --accent-dark: #05C6DB;    /* Darker Cyan */
    --accent-light: #05F2DB;   /* Mint */
    
    /* Couleurs de statut */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Bordures */
    --border-color: #e5e7eb;
}

[data-bs-theme="dark"] {
    --background-color: #0b1220;
    --background-alt: #0f172a;
    --card-bg: #0f172a;
    --text-color: #e5e7eb;
    --text-light: #94a3b8;
    --text-dark: #ffffff;
}

/* 🔵 STYLE GÉNÉRAL */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* 🏠 HEADER & NAVIGATION */
header {
    background: var(--background-color);
    padding: 15px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #F8FAFC; /* Blanc cassé */
    font-weight: 600;
    transition: color 0.3s, transform 0.2s;
}

nav ul li a:hover {
    color: #3B82F6; /* Bleu plus clair */
    transform: scale(1.1);
}

/* 📌 SECTIONS */
section {
    padding: 5rem 0;
    text-align: center;
    max-width: 1200px;
    margin: auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    width: 3rem;
    height: 0.25rem;
    background-color: var(--primary-color);
    border-radius: 0.25rem;
}

/* 📊 PROJETS */
.project {
    background: #F8FAFC; /* Fond clair */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s;
    width: 300px;
    text-align: left;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 2px 4px 20px rgba(0, 0, 0, 0.2);
}

/* 🎯 BOUTONS & INTERACTIONS */
button, .btn {
    background: #2563EB; /* Bleu action */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

button:hover, .btn:hover {
    background: #1E40AF; /* Bleu foncé */
    transform: scale(1.05);
}

/* 🎨 FORMULAIRES */
form input, form textarea {
    display: block;
    width: 80%;
    margin: 10px auto;
    padding: 12px;
    border: 2px solid #E5E7EB; /* Gris clair */
    border-radius: 8px;
    background: #F8FAFC;
    color: #374151;
}

form button {
    background: #2563EB;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

form button:hover {
    background: #1E40AF;
}

/* 📌 PIED DE PAGE */
footer {
    background: var(--background-alt);
    color: var(--text-color);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Override utilitaires sombres dans les pieds de page Bootstrap */
footer.bg-dark { background-color: var(--background-alt) !important; }
footer, footer a, footer .text-white { color: var(--text-color) !important; }

/* Navigation */
.navbar {
    background-color: var(--background-color) !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: background-color var(--transition-normal);
    z-index: 1100;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background-color: rgba(5, 219, 242, 0.12);
    color: var(--primary-dark) !important;
}

/* Cartes de projets */
.card {
    border: none;
    border-radius: 1rem;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-light);
}

/* Boutons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Formulaires */
.form-control {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Manquante: animation fade-in utilisée par script.js */
.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Améliorations d'accessibilité */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
}

/* Ensure theme toggle doesn't block navbar interactions */
#themeToggle, #theme-toggle { z-index: 900; }

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

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

/* Témoignages Section (supprimée) */

/* Contact Section */
#contact {
    background-color: var(--background-color);
}

/* Contact List styles */
#contact .list-group-item {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

#contact .list-group-item:hover {
    background-color: var(--background-alt);
}

/* Animations pour les nouvelles sections */
#contact .list-group-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#contact .list-group-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) { }

/* Filtres de projets */
.filter-btn {
    margin: 0 6px;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(5, 219, 242, 0.15);
}

.filter-btn.active {
    background-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
}

.filter-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(5, 219, 242, 0.35);
}

/* Sticky filters row in Projects section */
.filters-sticky {
    position: sticky;
    top: 72px; /* below fixed home navbar */
    z-index: 900;
}

#projets .project-filters {
    backdrop-filter: saturate(120%) blur(4px);
}

/* Blog Section */
.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Blog Articles */
article.card {
    transition: all var(--transition-normal);
}

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

article.card a {
    transition: color var(--transition-fast);
}

article.card a:hover {
    color: var(--primary-color) !important;
}

/* Blog Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    background-color: var(--card-bg);
}

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

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

/* Blog Sidebar */
.card h5 {
    color: var(--text-dark);
    font-weight: 600;
}

.card ul li a {
    transition: color var(--transition-fast);
}

.card ul li a:hover {
    color: var(--primary-color) !important;
}

/* Blog Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
}
