/* Variables de couleurs */
:root {
    --color-primary: #28a745;
    --color-primary-dark: #1e7e34;
    --color-secondary: #198754;
    --color-dark: #000000;
    --color-dark-alt: #1a1a1a;
    --color-white: #ffffff;
    --color-light-gray: #f8f9fa;
    --color-gray: #6c757d;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--color-white);
}

html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    background-color: var(--color-dark) !important;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary) !important;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--color-secondary) !important;
}

.nav-link {
    color: var(--color-white) !important;
    margin: 0 0.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
}

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

/* Section Hero */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 100%);
    color: var(--color-white);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Fond animé avec formes géométriques */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.1);
    animation: float 20s infinite ease-in-out;
}

.hero-shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
    animation-duration: 20s;
}

.hero-shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
    animation-duration: 22s;
}

.hero-shape-4 {
    width: 250px;
    height: 250px;
    top: 30%;
    right: 25%;
    animation-delay: 1s;
    animation-duration: 28s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) rotate(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(20px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
        opacity: 0.6;
    }
}

.hero-section h1 {
    color: var(--color-primary);
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 1;
}

.hero-section h2 {
    color: var(--color-white);
    animation: fadeInUp 1.2s ease;
    position: relative;
    z-index: 1;
}

.hero-section .lead {
    animation: fadeInUp 1.4s ease;
    position: relative;
    z-index: 1;
}

.hero-section .alert {
    animation: fadeInUp 1.6s ease;
    position: relative;
    z-index: 1;
}

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

/* Boutons */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-success {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-outline-light {
    border: 2px solid var(--color-white);
    color: var(--color-white);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.btn-outline-success {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-body {
    padding: 2rem;
}

/* Badges de compétences */
.skill-badge {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-badge:hover {
    background-color: var(--color-primary-dark);
    transform: scale(1.05);
}

/* Cartes d'expertise */
.expertise-card {
    background-color: var(--color-dark-alt);
    border: 2px solid var(--color-primary);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.expertise-card i {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.expertise-card span {
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.expertise-card:hover {
    background-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

.expertise-card:hover i,
.expertise-card:hover span {
    color: var(--color-white);
}

/* Noms des technologies */
.tech-name {
    font-size: 0.75rem;
    color: var(--color-white);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Icônes technologiques */
.tech-icon {
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-icon:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Stack technique */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-stack .badge {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: -47px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--color-primary);
    border: 4px solid var(--color-white);
    box-shadow: 0 0 0 4px var(--color-primary);
}

.timeline-content {
    background-color: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Cards de projets */
.project-card {
    height: 100%;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-left: 4px solid var(--color-primary);
}

.project-card .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.bg-success {
    background-color: var(--color-primary) !important;
}

/* Background sombre */
.bg-dark {
    background-color: var(--color-dark) !important;
}

.bg-dark .card {
    background-color: var(--color-dark-alt);
    color: var(--color-white);
}

.bg-dark .card-body h5 {
    color: var(--color-primary);
}

/* Liens de contact */
.contact-links a {
    text-decoration: none;
}

/* Footer */
footer {
    background-color: var(--color-dark);
    color: var(--color-white);
}

/* Alert personnalisé */
.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .tech-icon {
        width: 40px;
        height: 40px;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .timeline {
        padding-left: 30px;
    }
    
    .timeline-marker {
        left: -37px;
    }
}

@media (max-width: 576px) {
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .hero-section {
        padding-top: 100px;
    }
}

/* Animations supplémentaires */
.card,
.skill-badge,
.timeline-content {
    animation: fadeIn 0.6s ease;
}

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

/* Amélioration de la lisibilité */
p {
    margin-bottom: 1rem;
}

ul {
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Espacement supplémentaire */
.mb-6 {
    margin-bottom: 4rem !important;
}

.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

/* Amélioration des transitions */
a,
button,
.btn {
    transition: all 0.3s ease;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* Utilitaire pour rendre les icônes blanches (GitHub, Symfony) */
.filter-white {
    filter: brightness(0) invert(1) !important;
}

/* Alternative plus robuste pour les logos sombres en fond sombre */
.bg-dark .filter-white {
    filter: brightness(0) invert(1) !important;
    background-color: transparent !important;
}