/* 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: #fff;
}

/* Variables CSS pour cohérence des couleurs */
:root {
    --primary-color: #1dd1a1;
    --secondary-color: #2c2c2c;
    --accent-color: #3498db;
    --light-bg: #f8f9fa;
    --text-color: #333;
    --light-text: #666;
    --border-color: #e0e0e0;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Navigation */
.navbar {
    background: var(--secondary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

/* Style de la navbar au défilement */
.navbar.scrolled {
    background: rgba(44, 44, 44, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Pour la compatibilité Safari */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.logo .highlight {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(29, 209, 161, 0.1);
}

/* Bouton de menu mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.mobile-menu-btn .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Conteneur principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Hero */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-text {
    flex: 1;
    padding-right: 2rem;
}

/* Label au-dessus du titre */
.hero-label {
    display: inline-block;
    background: rgba(29, 209, 161, 0.12);
    color: var(--primary-color);
    border: 1px solid rgba(29, 209, 161, 0.3);
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    line-height: 1.2;
}

.hero .highlight {
    color: var(--primary-color);
}

.hero p {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 2rem;
}

/* Boutons hero groupés */
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn {
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.hero-btn:hover {
    background: #17a085;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.hero-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-illustration {
    max-width: 500px;
    height: auto;
    animation: float 6s ease-in-out infinite;
}

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

/* Section présentation rapide */
.quick-intro {
    padding: 80px 0;
    background: white;
}

.quick-intro h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.intro-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.intro-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 2px solid transparent;
}

.intro-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.intro-card h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

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

/* Stats rapides */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    padding: 2.5rem;
    background: var(--light-bg);
    border-radius: 15px;
}

.stat-item {
    text-align: center;
}

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

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--light-text);
    margin-top: 6px;
}

.cta-section {
    text-align: center;
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 15px;
}

.cta-section h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-btn:hover {
    background: #17a085;
    transform: translateY(-2px);
}

.cta-btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Pages intérieures */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 120px 0 80px;
    text-align: center;
    color: white;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.page-content {
    padding: 80px 0;
}

/* Section À propos */
.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.about .highlight {
    color: var(--primary-color);
    font-weight: bold;
}

.about-image {
    flex: 1;
    text-align: center;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    object-fit: cover;
}

.cv-btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.cv-btn:hover {
    background: #17a085;
    transform: translateY(-2px);
}

/* Section Compétences */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skills-category h3 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.skill-item {
    margin-bottom: 2rem;
}

.skill-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-percentage {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.skill-bar {
    background: var(--border-color);
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.skill-progress {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    height: 100%;
    border-radius: 10px;
    transition: width 2s ease;
    width: 0%;
}

/* Section Projets */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(29, 209, 161, 0.15);
}

.project-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-card p {
    color: var(--light-text);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.project-btn {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.project-btn:hover {
    background: #17a085;
    transform: translateY(-2px);
}

/* Section Contact */
.contact-section {
    background: var(--secondary-color);
    color: white;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group.full {
    flex-direction: column;
}

.form-input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #3a3a3a;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.form-input::placeholder {
    color: #bbb;
}

.form-textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #3a3a3a;
    color: white;
    font-size: 1rem;
    resize: vertical;
    min-height: 150px;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 2rem auto 0;
}

.submit-btn:hover {
    background: #17a085;
    transform: translateY(-2px);
}

/* Messages d'erreur/succès */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
    font-weight: 500;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Footer */
.footer {
    background: #1a1a1a;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    color: #bbb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--secondary-color);
        display: none;
        z-index: 999;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .skills-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .form-group {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .intro-cards {
        grid-template-columns: 1fr;
    }

    .stats-row {
        gap: 2rem;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

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

/* Système d'animation au scroll générique */
.animatable {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animatable.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Styles pour le bouton "Retour en haut" */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #17a085; /* Une teinte plus claire de votre couleur primaire */
    transform: translateY(-3px);
}


/* Utilitaires */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}