/**
 * CSS personnalisé pour le portfolio MVC
 * Complète Bootstrap avec des styles spécifiques
 */

/* Variables CSS pour faciliter la maintenance */
:root {
    --primary-color: #0d6efd;
    --warning-color: #ffc107;
    --success-color: #198754;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

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

/* Amélioration de la section hero */
.min-vh-50 {
    min-height: 50vh;
}

/* Animations et transitions pour les cartes */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Styles spécifiques pour les cartes de projets */
.projet-card {
    overflow: hidden;
    transition: all 0.3s ease;
}

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

/* Overlay pour les images de projets */
.projet-overlay {
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.8) !important;
}

.projet-card:hover .projet-overlay {
    opacity: 1 !important;
}

/* Animation des barres de progression */
.progress-bar {
    transition: width 1.5s ease-in-out;
}

/* Amélioration des barres de progression */
.progress {
    background-color: #e9ecef;
    border-radius: 0.5rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 0.5rem;
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
}

/* Styles pour la timeline */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline .card {
    position: relative;
    margin-left: 50px;
}

.timeline .card::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* Amélioration de la navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

/* Styles pour les boutons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

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

/* Styles pour les badges */
.badge {
    font-weight: 500;
    font-size: 0.75em;
    padding: 0.5em 0.75em;
}

/* Amélioration des alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

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

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

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

/* Styles pour les formulaires */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Amélioration du footer */
footer {
    background: linear-gradient(45deg, var(--dark-color), #343a40) !important;
}

footer a {
    transition: color 0.3s ease, transform 0.3s ease;
}

footer a:hover {
    color: var(--warning-color) !important;
    transform: translateY(-2px);
}

/* Responsive design amélioré */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    .timeline::before {
        display: none;
    }

    .timeline .card {
        margin-left: 0;
    }

    .timeline .card::before {
        display: none;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Classes utilitaires personnalisées */
.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Amélioration de l'accordéon */
.accordion-button {
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: var(--primary-color);
}

/* Styles pour les icônes */
.bi {
    transition: transform 0.3s ease;
}

.card:hover .bi {
    transform: scale(1.1);
}

/* Amélioration des ombres */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Styles pour les images */
img {
    transition: opacity 0.3s ease;
}

.img-fluid {
    border-radius: 0.375rem;
}

/* Amélioration de la pagination */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Scroll smooth pour les ancres */
html {
    scroll-behavior: smooth;
}

/* Amélioration du sticky top */
.sticky-top {
    backdrop-filter: blur(10px);
}

/* Print styles */
@media print {
    .navbar, footer, .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}