/* Variables CSS Globales */
:root {
    --primary-color: #70cbf0;
    --primary-color-darker: #0056b3; /* Pour les :hover */
    --secondary-color: #6c757d;
    --secondary-color-darker: #545b62; /* Pour les :hover */
    --light-color: #f8f9fa; /* Light background for sections */
    --white-color: #ffffff; /* True white for other sections */
    --dark-color: #212529;
    --text-color: #333;
    --text-color-light: #ffffff;
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --navbar-height: 70px;
    --navbar-height-scrolled: 60px; /* Hauteur de la navbar après scroll */
    --transition-speed: 0.3s ease;
}


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

html {
    scroll-behavior: smooth; 
    font-size: 16px;
}

body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color); 
    padding-top: var(--navbar-height);
    overflow-x: hidden; 
}
body.no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

ul { list-style: none; }

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed);
}
a:hover {
    color: var(--primary-color-darker);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 { margin-bottom: 1rem; line-height: 1.2; }
h1 { font-size: 2.8rem; color: var(--dark-color); }
h2 { font-size: 2.2rem; color: var(--dark-color); text-align: center; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; color: var(--dark-color); }
h4 { font-size: 1.2rem; color: var(--dark-color); }



.navbar {
    background: linear-gradient(to right, #3fa0f0, #1723ca);
    color: var(--text-color-light); 
    height: var(--navbar-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, height 0.3s ease-in-out, padding 0.3s ease-in-out; /* Removed transform from transition */
    padding: 0.5rem 0;
    box-shadow: none; 
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color-light);
    display: flex;
    align-items: center;
    padding: 0 10px;
    height: 100%;
}
.nav-logo img {
    height: calc(var(--navbar-height) - 25px);
    width: auto;
    transition: height var(--transition-speed);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 1.5rem;
}

.nav-link {
    color: var(--text-color-light);
    padding: 0.5rem;
    position: relative;
    font-weight: 500;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--text-color-light);
    transition: width var(--transition-speed);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link.active {
    font-weight: bold;
}


/* Navbar quand on scroll */
.navbar.navbar-scrolled {
    background: linear-gradient(to right, #3fa0f0, #1723ca); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    height: var(--navbar-height-scrolled);
    padding: 0.2rem 0;
}
.navbar.navbar-scrolled .nav-logo {
    color: var(--primary-color); 
}
.navbar.navbar-scrolled .nav-logo img {
    height: calc(var(--navbar-height-scrolled) - 20px);
}
.navbar.navbar-scrolled .nav-link {
    color: var(--text-color-light); 
}
.navbar.navbar-scrolled .nav-link::after {
    background-color: var(--primary-color); 
}
.navbar.navbar-scrolled .nav-link.active {
    color: var(--text-color-light);
}
.navbar.navbar-scrolled .hamburger .bar {
    background-color: var(--dark-color); 
}


.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px; 
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color-light); 
    transition: all var(--transition-speed);
}


.hero-section {
    background: linear-gradient(to right, #3fa0f0, #1723ca), url('https://via.placeholder.com/1920x1080?text=Hero+Background') no-repeat center center/cover;
    color: var(--text-color-light);
    min-height: calc(30vh - var(--navbar-height)); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px; 
}
.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--white-color); 
}
.hero-section .subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    min-height: 2.2em; 
    color: var(--light-color); 
}



.hero-section h1 .cursor,
.hero-section .subtitle .cursor {
    display: inline-block;
    background-color: var(--primary-color); 
    margin-left: 0.1em;
    width: 3px;
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    transition: background-color var(--transition-speed), transform var(--transition-speed), color var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: var(--primary-color-darker); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); color: #fff; }
.btn-secondary { background-color: var(--secondary-color); color: #fff; }
.btn-secondary:hover { background-color: var(--secondary-color-darker); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); color: #fff; }


.content-section {
    padding: 80px 0; 
    background-color: var(--white-color);
    overflow-x: hidden; 
}
.content-section.bg-light {
    background-color: var(--light-color); 
}


.about-content { display: flex; align-items: center; gap: 3rem; flex-wrap: wrap; } 
.about-image { flex: 1; min-width: 250px; max-width: 300px; margin: 0 auto; } 
.about-image img { border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.about-text { flex: 2; min-width: 300px;}

/* Section Projets */
.project-info:empty {
    padding: 0;}
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.project-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
}
.project-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.project-card img { width: 100%; height: 300px; object-fit: cover; } 
.project-info { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-info h3 { margin-bottom: 0.5rem; color: var(--primary-color); }
.project-info p { font-size: 0.9rem; color: #555; flex-grow: 1; margin-bottom: 1rem; }
.project-links { margin-top: auto; }
.project-links .btn { margin-right: 0.5rem; margin-bottom: 0.5rem; font-size: 0.9rem; padding: 0.6rem 1.2rem; }
.project-links .btn i { margin-right: 0.5rem; }

/* Section Compétences */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.skill-category h3 { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); padding-bottom: 0.5rem; margin-bottom: 1rem; }
.skill-category ul li { padding: 0.5rem 0; font-size: 1.1rem; }
.skill-category ul li i { margin-right: 0.8rem; color: var(--secondary-color); width: 20px; text-align: center; }

/* Section Contact */
.contact-methods { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.contact-methods .btn i { margin-right: 0.5rem; }

/* Styles pour Reveal on Scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px); 
    transition: opacity 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1);
    transition-delay: 0.1s;
    will-change: opacity, transform;
}
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}
.project-grid .reveal-on-scroll,
.skills-grid .reveal-on-scroll { 
    transition-delay: 0s; 
}
.project-grid .reveal-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.project-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.project-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.project-grid .reveal-on-scroll:nth-child(4) { transition-delay: 0.15s; } 
.project-grid .reveal-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.project-grid .reveal-on-scroll:nth-child(6) { transition-delay: 0.35s; }

.skills-grid .reveal-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.skills-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.skills-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.3s; }


.skills-grid { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 1.5rem; 
}

.skill-card {
    background-color: var(--white-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.07);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    min-height: 180px; 
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.skill-card .skill-logo {
    height: 60px; 
    width: auto; 
    max-width: 100px; 
    margin-bottom: 1rem;
    object-fit: contain; 
}

.skill-card .skill-name {
    font-size: 1.1rem; 
    color: var(--dark-color);
    margin-bottom: 0; 
    line-height: 1.3;
}

.skills-grid .reveal-on-scroll { 
    transition-delay: 0.20s; 
}

   
.skills-grid .reveal-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.skills-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.5s; }
.skills-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.10s; }
.skills-grid .reveal-on-scroll:nth-child(4) { transition-delay: 0.20s; } /* Variante pour les lignes suivantes */
.skills-grid .reveal-on-scroll:nth-child(5) { transition-delay: 0.30s; }
.skills-grid .reveal-on-scroll:nth-child(6) { transition-delay: 0.40s; }




/* Footer */
footer { background-color: var(--dark-color); color: var(--text-color-light); text-align: center; padding: 2rem 0; }
footer .container { display: flex; flex-direction: column; align-items: center; }
.social-links { margin-top: 0.5rem; }
.social-links a { color: var(--text-color-light); margin: 0 0.5rem; font-size: 1.5rem; transition: color var(--transition-speed); }
.social-links a:hover { color: var(--primary-color); }


.education-experience-grid .column h3 {
    text-align: left; 
    margin-bottom: 1.5rem;
    color: var(--primary-color); 
}

.timeline-container {
    position: relative;
    padding-left: 40px; 
}


.timeline-container::before {
    content: '';
    position: absolute;
    left: 10px; 
    top: 5px;  
    bottom: 5px; 
    width: 3px;
    background-color: var(--primary-color-darker); 
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem; 
    padding: 0; 
    border-bottom: none; 
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -30px; 
    top: 0; 
    width: 40px;
    height: 40px;
    background-color: var(--white-color); 
    border: 3px solid var(--primary-color-darker); 
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1; 
}

.timeline-icon i {
    font-size: 1.2rem;
    color: var(--primary-color-darker);
}

.timeline-content {
    background-color: var(--white-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow var(--transition-speed), transform var(--transition-speed);
}
   

.timeline-content:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.timeline-content h4 {
    color: var(--dark-color); 
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.timeline-content strong {
    display: block;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}
.timeline-content p:last-child {
    margin-bottom: 0;
}


@media (max-width: 768px) {
    .education-experience-grid {
        grid-template-columns: 1fr; 
    }
    .timeline-container {
        padding-left: 50px; 
    }
    .timeline-icon {
        left: -25px; 
         
    }
    .timeline-container::before {
        left: 15px; 
    }
}

@media (max-width: 480px) {
    .timeline-content {
        padding: 1rem;
    }
    .timeline-content h4 {
        font-size: 1rem;
    }
    .timeline-content p, .timeline-content strong {
        font-size: 0.85rem;
    }
    .timeline-icon {
        width: 35px;
        height: 35px;
    }
    .timeline-icon i {
        font-size: 1rem;
    }
}


.timeline-item.reveal-on-scroll {
    opacity: 0;
    transform: translateX(50px); 
    transition: opacity 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1);
    transition-delay: 0.1s; 
}
.timeline-item.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateX(0);
}


.timeline-container .timeline-item.reveal-on-scroll:nth-child(1) { transition-delay: 0.2s; }
.timeline-container .timeline-item.reveal-on-scroll:nth-child(2) { transition-delay: 0.4s; }
.timeline-container .timeline-item.reveal-on-scroll:nth-child(3) { transition-delay: 0.6s; }
.timeline-container .timeline-item.reveal-on-scroll:nth-child(4) { transition-delay: 0.8s; }
.timeline-container .timeline-item.reveal-on-scroll:nth-child(5) { transition-delay: 1.0s; }



/* Responsive Design */
@media (max-width: 768px) {
    html { font-size: 15px; }
    .navbar .container { padding: 0 15px; }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--navbar-height);
        flex-direction: column;
        background-color: var(--white-color); 
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        text-align: center;
        transition: left var(--transition-speed);
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        padding-top: 2rem;
        overflow-y: auto;
    }
    .navbar.navbar-scrolled .nav-menu {
         top: var(--navbar-height-scrolled);
         height: calc(100vh - var(--navbar-height-scrolled));
    }
    .nav-menu.active { left: 0; }
    .nav-item { margin: 1.2rem 0; } 
    .nav-link {
        font-size: 1.2rem;
        color: var(--dark-color); 
    }
    .nav-link::after { display: none; }
    .nav-link:hover, .nav-link.active {
        color: var(--primary-color);
    }
    .hamburger { display: block; z-index: 1001; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .navbar.navbar-scrolled .hamburger.active .bar { 
        background-color: var(--dark-color);
    }
    .hero-section { min-height: calc(30vh - var(--navbar-height)); padding: 60px 20px; }
    .hero-section h1 { font-size: 2.8rem; }
    .hero-section .subtitle { font-size: 1.3rem; }
    .about-content { flex-direction: column; text-align: center; gap: 2rem; }
    .about-image { max-width: 220px; }
}

@media (max-width: 480px) {
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section .subtitle { font-size: 1.1rem; }
    h2 { font-size: 1.8rem; }
    .project-grid { grid-template-columns: 1fr; } 
    .skills-grid { grid-template-columns: 1fr; } 
    .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
}