/* css/style.css */

/* 
   Table des matières
   ------------------
   1.  Variables & Global
   2.  Utilitaires (container, section-title, btn)
   3.  Header & Navigation
   4.  Section Accueil (Hero)
   5.  Section À Propos
   6.  Section Compétences
   7.  Section Projets
   8.  Section Contact
   9.  Footer
   10. Animations
   11. Responsive
*/


/* 1. Variables & Global */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #7c3aed;
    --accent: #14b8a6;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #94a3b8;
    --light-gray: #e2e8f0;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #fdfbff 100%);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.03) 0%, transparent 20%);
    z-index: -1;
}

h1, h2, h3, h4, h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}


/* 2. Utilitaires */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 120px 0;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    color: var(--dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-subtitle {
    display: block;
    text-align: center;
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 70px;
    font-weight: 500;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary);
    cursor: pointer;
    gap: 10px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-dark);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
}

.btn-outline::before {
    background: var(--primary);
}

.btn-outline:hover {
    color: white;
}


/* 3. Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.header-scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--dark);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: var(--transition);
    border-radius: 3px;
}

.nav-link:hover::after, 
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover, 
.nav-link.active {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}


/* 4. Section Accueil (Hero) */
.hero {
    padding: 200px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 25px;
    color: var(--dark);
    line-height: 1.1;
}

.hero-title span {
    color: var(--primary);
    position: relative;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(37, 99, 235, 0.2);
    z-index: -1;
}

.hero-description {
    margin-bottom: 40px;
    font-size: 1.2rem;
    color: #475569;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-10deg);
    transition: var(--transition);
}

.profile-img-container:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.profile-img {
    width: 100%;
    max-width: 450px;
    display: block;
    transition: var(--transition);
}

.hero-shape {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    border-radius: 76% 24% 52% 48% / 30% 30% 70% 70%;
    opacity: 0.1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: float 15s ease-in-out infinite;
}

.hero-shape-2 {
    position: absolute;
    width: 450px;
    height: 450px;
    background: var(--secondary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.05;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -2;
    animation: float 12s ease-in-out infinite reverse;
}

@keyframes float {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg); 
        border-radius: 76% 24% 52% 48% / 30% 30% 70% 70%;
    }
    50% { 
        transform: translate(-50%, -55%) rotate(180deg); 
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    100% { 
        transform: translate(-50%, -50%) rotate(360deg); 
        border-radius: 76% 24% 52% 48% / 30% 30% 70% 70%;
    }
}


/* 5. Section À Propos */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content {
    padding-right: 20px;
}

.about-description {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #334155;
    line-height: 1.8;
}

.highlight {
    color: var(--primary);
    font-weight: 600;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(37, 99, 235, 0.2);
    z-index: -1;
}

.research-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.research-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.research-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.research-title i {
    font-size: 1.8rem;
    color: var(--accent);
}

.research-card h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.research-card p {
    margin-bottom: 25px;
    color: #475569;
    line-height: 1.7;
}


/* 6. Section Compétences */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.skill-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.skill-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.6rem;
    margin-bottom: 30px;
    color: var(--dark);
}

.skill-title i {
    font-size: 2rem;
    color: var(--primary);
}

.skill-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.skill-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
}

.skill-item:last-child {
    border-bottom: none;
}

.skill-icon {
    color: var(--accent);
    font-size: 1.5rem;
    min-width: 30px;
    margin-top: 5px;
}

.skill-text {
    font-weight: 500;
}


/* 7. Section Projets */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--accent));
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.project-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-subtitle {
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
    display: block;
}

.project-title {
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.project-description {
    margin-bottom: 25px;
    color: #64748b;
    flex-grow: 1;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tag {
    background: #dbeafe;
    color: var(--primary-dark);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .skills-container,
    .projects-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .skill-card,
    .project-card {
        padding: 25px;
    }
    .project-img {
        height: 180px;
    }
    .project-content {
        padding: 18px;
    }
    .skill-title,
    .project-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .skill-card,
    .project-card {
        padding: 15px;
    }
    .project-img {
        height: 120px;
    }
    .project-content {
        padding: 10px;
    }
    .skill-title,
    .project-title {
        font-size: 1rem;
    }
    .tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}


/* 8. Section Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: var(--border-radius);
    padding: 50px;
    box-shadow: var(--shadow);
}

.contact-description {
    margin-bottom: 40px;
    font-size: 1.1rem;
    color: #334155;
    line-height: 1.8;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
}

.contact-form {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: var(--border-radius);
    padding: 50px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}






/*Pour Formulaire de contact */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 5px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp {
    width: 100%;
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

.btn-whatsapp i {
    font-size: 20px;
}


/* 9. Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 40px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    display: inline-block;
}

.footer-description {
    color: var(--gray);
    margin-bottom: 25px;
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

.footer-links {
    list-style: none;
}

.footer-link {
    margin-bottom: 15px;
}

.footer-link a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-link a:hover {
    color: white;
    transform: translateX(5px);
}

.copyright {
    text-align: center;
    padding-top: 40px;
    color: var(--gray);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
}


/* 10. Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* 11. Responsive */
@media (max-width: 992px) {
    .hero-container, 
    .about-container, 
    .contact-container {
        grid-template-columns: 1fr;
    }

    .hero-content {
        order: 2;
        text-align: center;
        padding-top: 40px;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        order: 1;
        margin: 0 auto;
        max-width: 500px;
    }

    .about-content {
        padding-right: 0;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 3.2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 84px; /* Hauteur du header */
        left: -100%;
        width: 100%;
        height: calc(100vh - 84px);
        background: white;
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 25px 0;
    }

    .nav-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.4rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-info, 
    .contact-form {
        padding: 30px;
    }

    .skill-card, 
    .research-card {
        padding: 30px;
    }

    .section-subtitle {
        margin-bottom: 50px;
    }
}