/* =======================================================================
   RESET & VARIABLES GLOBALES (STYLE CLAIR PREMIUM)
   ======================================================================= */
:root {
    --bg-main: #ffffff; /* Fond principal blanc */
    --bg-card: #f8fafc; /* Fond de carte gris très clair */
    --text-main: #0b0f19; /* Texte principal sombre */
    --text-muted: #64748b; /* Texte secondaire gris */
    --primary: #f39c12; /* Orange principal */
    --secondary: #e67e22; /* Orange secondaire */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(11, 15, 25, 0.08);
    --radius: 20px; /* Arrondi des bordures */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 100px;
}

/* Utilitaires Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

h2.sect {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.sect-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* =======================================================================
   HEADER & NAVIGATION (GLASSMORPHISM CLAIR)
   ======================================================================= */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
}

.logo {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

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

.burger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main); /* Forcé en sombre pour être visible */
    transition: var(--transition);
    z-index: 1001;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:not(.btn-cv):hover {
    color: var(--primary);
}

.nav-links a:not(.btn-cv)::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:not(.btn-cv):hover::after {
    width: 100%;
}

.btn-cv {
    background: var(--text-main);
    color: #ffffff !important;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-cv:hover {
    transform: translateY(-2px);
    background: var(--primary);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
}

/* =======================================================================
   HERO SECTION
   ======================================================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem 2rem;
    gap: 4rem;
    min-height: calc(85vh - 100px);
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-main);
}

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

.highlight-dev {
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    background: var(--primary);
    color: #fff;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(243, 156, 18, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(11, 15, 25, 0.15);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--text-main);
}

/* Modification de l'image (Rectangle a bords adoucis) */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-container {
    position: relative;
    width: 300px;
    height: 380px; /* Format portrait chic */
}

.image-container::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    z-index: -1;
    opacity: 0.2;
    filter: blur(10px);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius); /* Angles réduits et fluides */
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* =======================================================================
   À PROPOS & STATS
   ======================================================================= */
.propos-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    font-size: 1.15rem;
    color: var(--text-muted);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
}

.nombre {
    display: block;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* =======================================================================
   COMPÉTENCES
   ======================================================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill {
    background: var(--bg-card);
    padding: 1.8rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.skill-info h3 {
    font-size: 1.1rem;
}

.progress-bar {
    background: #e2e8f0;
    height: 10px;
    border-radius: 20px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 20px;
}

/* =======================================================================
   GRILLE DE PROJETS - CONFIGURATION ET DIMENSIONS HARMONIEUSES
   ======================================================================= */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes côte à côte sur PC */
    gap: 2rem;
}

.projet {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    height: 100%; /* Aligne toutes les cartes à la même hauteur */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Le conteneur de l'image : même proportion sur tous les écrans */
.projet-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9; /* Format rectangle parfait (ex: 320px x 180px) */
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    position: relative;
}

/* L'image s'adapte à sa case sans jamais déborder ni s'étirer */
.projet img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Coupe l'image proprement sans la déformer */
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.projet h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.projet p {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-grow: 1; /* Pousse le texte vers le bas pour équilibrer le visuel */
}

.projet:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.projet:hover img {
    transform: scale(1.05);
}

/* =======================================================================
   RESPONSIVE : ADAPTATION DES COLONNES PAR ÉCRAN
   ======================================================================= */

/* Écrans intermédiaires (Tablettes horizontales / Petits PC) */
@media (max-width: 1024px) {
    .projets-grid {
        grid-template-columns: repeat(2, 1fr); /* Passe à 2 colonnes */
        gap: 1.5rem;
    }
}

/* Écrans de smartphones et petites tablettes */
@media (max-width: 768px) {
    .projets-grid {
        grid-template-columns: 1fr; /* 1 seule colonne (les uns sous les autres) uniquement sur mobile */
        gap: 1.5rem;
    }
}

/* =======================================================================
   SERVICES CARDS
   ======================================================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: var(--transition);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.service h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.service:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.04);
}

/* =======================================================================
   CONTACT (ICÔNES CORRIGÉES & VISIBLES)
   ======================================================================= */
.contact-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--bg-card); /* Fond gris clair */
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

/* Ciblage explicite de l'icône Font Awesome à l'intérieur */
.contact-icons a i {
    color: #0b0f19 !important; /* Force les icônes de contact à être noires */
    font-size: 1.6rem;
}

.contact-icons a:hover {
    background: var(--primary); /* Devient orange au survol */
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(243, 156, 18, 0.2);
    border-color: var(--primary);
}

/* L'icône passe en blanc quand le bouton devient orange */
.contact-icons a:hover i {
    color: #ffffff !important;
}

footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4rem;
}

/* =======================================================================
   REQUÊTES MÉDIA (RESPONSIVE)
   ======================================================================= */
@media (max-width: 1024px) {
    .projets-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    h2.sect {
        font-size: 2rem;
    }

    /* Activation et visibilité du Burger Mobile */
    .burger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98); /* Fond blanc opaque sur mobile */
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        transition: 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
        border-radius: 0 0 20px 20px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        color: var(--text-main);
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: 2rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        margin: 0 auto 2rem auto;
    }

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

    .image-container {
        width: 240px;
        height: 310px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

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

@media (max-width: 480px) {
    .projets-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        text-align: center;
        width: 100%;
    }
}