/* Base Styles */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --text-color: #495057;
    --text-light: #6c757d;
    --transition: all 0.3s ease;
}

/* Project Detail Page */
.project-detail-hero {
    padding-top: 110px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
}

.project-detail-hero .container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.project-detail-title { color : rgba(255,255,255,.8) ;font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .75rem; }
.project-detail-subtitle { color: rgba(255, 255, 255, 0.8); margin-bottom: 1rem; }

.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.badge { background: rgba(255,255,255,.12); color: #fff; padding: .35rem .7rem; border-radius: 999px; font-size: .85rem; }

.project-cover { border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.project-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.project-detail-content { 
    padding: 3rem 0; 
}

.meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.meta-item { background: #f1f5f9; color: #0f172a; padding: .4rem .7rem; border-radius: 6px; font-size: .85rem; }

.project-detail-content h3 { margin: 1.5rem 0 .5rem; }
.project-detail-content p { color: var(--text-color); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1rem; }
.gallery img { 
    width: 100%; 
    border-radius: 10px; 
    box-shadow: 0 6px 20px rgba(0,0,0,.12); 
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

.gallery figcaption {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.3px;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
}

.lightbox-close::before {
    transform: rotate(45deg);
}

.lightbox-close::after {
    transform: rotate(-45deg);
}

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

@keyframes zoomIn {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

.back-bar { background: #0f172a; color: #fff; padding: .75rem 0; }
.back-link { color: #fff; font-weight: 600; }
.back-link:hover { color: #a5b4fc; }
/* Back bar layout for detail page */
.back-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
}

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

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    padding: 0.8rem 1.8rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.3);
}

.btn-primary {
    background: var(--primary-color);
    color: rgb(255, 255, 255);
}

.btn-primary:hover {
    background: #2a75e6;
    border-color: #2a75e6;
}

/* Gradient CV pill button */
.btn-cv {
    background: linear-gradient(90deg, #ff9800, #fbc02d);
    color: #111;
    border-color: transparent;
    border-radius: 9999px;
    padding: 0.6rem 1.1rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(251, 192, 45, 0.35);
}

.btn-cv:hover {
    background: linear-gradient(90deg, #fb8c00, #f9a825);
    color: #111;
    transform: translateY(-2px);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto 0;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--dark-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

.language-btn i.fa-globe {
    font-size: 1rem;
}

.language-btn i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.language-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 160px;
    z-index: 1001;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.language-option:hover {
    background: #f8f9fa;
}

.language-option.active {
    background: rgba(58, 134, 255, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.language-option .flag {
    font-size: 1.2rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    
    /* OPTION 1 : Dégradé actuel (gris clair) */
    /* background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); */
    
    /* OPTION 2 : Dégradé bleu/violet moderne */
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    
    /* OPTION 3 : Dégradé orange/rose dynamique */
    /* background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); */
    
    /* OPTION 4 : Dégradé vert/bleu professionnel */
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
    
    /* OPTION 5 : Dégradé sombre élégant */
    /* background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); */
    
    /* OPTION 6 : Image de fond avec overlay */
    /* background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920') center/cover; */
    
    /* OPTION 7 : Couleur unie sombre */
    /* background: #1a1a2e; */
    
    /* OPTION 8 : Couleur unie claire */
    /* background: #f0f4f8; */
}

.hero h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.hero h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
}

.hero-text {
    max-width: 600px;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.skills-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.skills-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.image-container {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.placeholder-image {
    position: relative;
    background: linear-gradient(45deg, #e9ecef, #dee2e6);
    border-radius: 8px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: 500;
    overflow: hidden;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(58, 134, 255, 0.1), rgba(131, 56, 236, 0.1));
    border-radius: 8px;
    transition: var(--transition);
}

.image-container:hover .image-overlay {
    background: transparent;
}

/* Accomplishments Section */
.accomplishments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.accomplishment-card {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.accomplishment-card:hover {
    transform: translateY(-3px);
}

.accomplishment-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

.accomplishment-date {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.accomplishment-description {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Professional Experience Section */
.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.experience-item {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    transition: var(--transition);
}

.experience-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.experience-header h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.experience-company {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.experience-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.experience-content p {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Experience Section */
.bg-light {
    background-color: #f8f9fa;
}

.experience-tabs {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.tab-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.tab-btn {
    padding: 0.8rem 1rem;
    text-align: left;
    background: none;
    border: none;
    border-left: 2px solid #dee2e6;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text-light);
}

.tab-btn:hover {
    background-color: rgba(58, 134, 255, 0.05);
    color: var(--primary-color);
}

.tab-btn.active {
    border-left: 2px solid var(--primary-color);
    background-color: rgba(58, 134, 255, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

.tab-content {
    flex: 1;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tab-pane h3 span {
    color: var(--primary-color);
}

.tab-pane .date {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.tab-pane ul {
    padding-left: 1.2rem;
}

.tab-pane li {
    position: relative;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.tab-pane li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Projects Section */
/* New rectangular clickable tiles */
.project-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-tile {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #0b0d12;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: transform .25s ease, box-shadow .25s ease;
    isolation: isolate;
}

.project-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(58,134,255,.15);
    border-radius: 12px;
    pointer-events: none;
}

.project-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.18);
}

.tile-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.tile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform .5s ease;
}

.project-tile:hover .tile-image img {
    transform: scale(1.08);
}

.tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 20%, rgba(0,0,0,0.55) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem 1.25rem;
    color: #fff;
}

.tile-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255,255,255,.85);
}

.tile-subtitle {
    font-size: .9rem;
    color: rgba(255,255,255,.85);
}

/* Contact Section */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--dark-color);
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    background: var(--dark-color);
    color: white;
}

.footer p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.7);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-text {
        order: 2;
    }
    
    .about-image {
        order: 1;
        margin: 0 auto;
    }
    
    .accomplishments-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-tabs {
        flex-direction: column;
    }
    
    .tab-buttons {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
        min-width: 100%;
    }
    
    .tab-btn {
        border-left: none;
        border-bottom: 2px solid #dee2e6;
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }
    
    .tab-btn.active {
        border-left: none;
        border-bottom: 2px solid var(--primary-color);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-links a {
        padding: 0.8rem 0;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding-top: 120px;
        text-align: center;
    }
    
    .hero-text {
        margin: 0 auto 2.5rem;
    }
    
    .project-tiles { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-list {
        grid-template-columns: 1fr;
    }
    
    .accomplishments-grid {
        grid-template-columns: 1fr;
    }
    
    .accomplishment-card {
        padding: 1.25rem;
    }
    
    .experience-item {
        padding: 1.25rem;
    }
    
    .experience-header h3 {
        font-size: 1.1rem;
    }
    
    .project-tile { border-radius: 10px; }
}
