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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
    overflow-x: hidden;
}

/* Variables CSS */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #666;
    --background-light: #fafafa;
    --background-blue: #516672;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-light: rgba(0, 0, 0, 0.05);
    --shadow: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --container-width: 90%;
    --container-width-mobile: 95%;
    --container-padding: 40px;
}

/* Classes utilitaires */
.container {
    max-width: var(--container-width);
    margin: 0 auto 0 calc(100% - var(--container-width));
    padding: 0 var(--container-padding);
}

.flex {
    display: flex;
}

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

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

.flex-column {
    display: flex;
    flex-direction: column;
}

.text-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.text-link:hover {
    color: var(--primary-color);
}

.text-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

.external-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    display: inline-block;
    padding-left: 5px;
}

.external-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--primary-color);
    transition: width 0.3s ease;
}


.external-link:hover {
    color: var(--primary-color);
   padding-left: 25px;
}

.external-link:hover::before {
    width: 3px;
}

.project-item .external-link {
    color: var(--background-light);
}

.project-item .external-link::before {
    background: var(--background-light);
}


.project-item .external-link:hover {
    color: var(--background-light);
}


.project-item .external-link.active {
    color: var(--background-light);
}

.section-title {
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 60px;
    max-width: 600px;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.nav-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 32px;
    width: auto;
    transition: opacity 0.3s ease;
}

.nav-logo:hover .logo-img {
    opacity: 0.8;
}

.nav-right {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* Menu mobile */
.nav-mobile {
    display: none;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar mobile */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 20px var(--shadow);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.open {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-light);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.sidebar-content {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 15px 20px;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

.sidebar-link:last-child {
    border-bottom: none;
}

.sidebar-link:hover {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.02);
}

.sidebar-link.active {
    color: var(--primary-color);
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Contenu principal */
.main-content {
    margin-top: 80px;
}

/* Sections */
.content-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.content-section.active {
    opacity: 1;
    transform: translateY(0);
}

.section-content {
    width: 100%;
}

.hero-text {
    text-align: left;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0;
    line-height: 1.7;
}

/* Compétences */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    margin-top: 60px;
}

.skill-category h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.skill-description {
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.5;
    margin-bottom: 20px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Skill-item : effet subtil, description toujours visible, pas de coins arrondis */
.skill-item {
    position: relative;
    background: var(--background-light);
    padding: 18px 20px 18px 20px;
    font-size: 1rem;
    color: var(--secondary-color);
    border: 1px solid var(--border-light);
    border-radius: 0;
    box-shadow: 0 1px 4px rgba(30,40,90,0.04);
    cursor: default;
    overflow: hidden;
    min-width: 180px;
    min-height: 70px;
    transition: box-shadow 0.25s, background 0.25s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    outline: none;
}

.skill-item:hover, .skill-item:focus {
    background: #232b3a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(30,40,90,0.18);
    z-index: 2;
}

.skill-item .skill-title,
.skill-item .skill-detail {
    transition:font-size 0.25s;
}

.skill-item:hover .skill-title, .skill-item:focus .skill-title,
.skill-item:hover .skill-detail, .skill-item:focus .skill-detail {
    color: #fff;
}

.skill-title {
    font-weight: 600;
    font-size: 1.08em;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
    color: inherit;
}

.skill-detail {
    font-size: 0.93em;
    color: #4a5670;
    opacity: 1;
    max-height: none;
    pointer-events: auto;
}

.skill-item:hover .skill-title, .skill-item:focus .skill-title {
    color: var(--background-light);
    font-size: 1.5rem;
}

.skill-item:hover .skill-detail, .skill-item:focus .skill-detail {
    color: var(--background-light);
    opacity: 1;
    max-height: none;
    pointer-events: auto;
    font-size: 1.1rem;
}



/* Expériences timeline */
.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 60px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: start;
}

.timeline-date {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    padding-top: 5px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.timeline-company {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
    font-weight: 500;
}

.timeline-description {
    font-size: 1rem;
    color: var(--secondary-color);
    line-height: 1.6;
}

/* Projets */
.projects-showcase {
    width: 130%!important;
    position: relative;
    left: -30%!important;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 60px;
    margin-right: calc(-1 * var(--container-padding));
}

.project-item {
    background: #232b3a;
    margin-bottom: 80px;
    overflow: hidden;
    transition: var(--transition);
    border-radius: 0;
    position: relative;
    height: 650px;
    display: flex;
    padding-left: 23%!important;
    margin-right: calc(-1 * var(--container-padding));
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

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

.project-item:hover {
    transform: none;
    box-shadow: none;
}

.project-images {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image.active {
    opacity: 1;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.project-slider-nav {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: #232b3a;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.project-slider-nav:hover {
    background: #2d3748;
    transform: scale(1.1);
}

.project-slider-nav.prev {
    left: 20px;
}

.project-slider-nav.next {
    left: 70px;
}

.project-slider-nav.zoom {
    left: 120px;
}

.project-slider-nav svg {
    width: 20px;
    height: 20px;
    fill: #FFFFFF;
    stroke: #FFFFFF;
}

.project-info {
    position: absolute;
    right: 0;
    top: 0;
    width: 35%;
    height: 100%;
    background: rgba(35, 43, 58, 0.7);
    backdrop-filter: blur(10px);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 5;
}

.project-header {
    margin-bottom: 30px;
}

.project-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.project-year {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
}

.project-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
    flex: 1;
}

.project-description h4,
.project-tasks h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: -0.01em;
}

.project-description p {
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.6;
    margin: 0;
}

.project-tasks ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-tasks li {
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.project-tasks li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ffffff;
    font-weight: bold;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech span {
    background: var(--primary-color);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 4px;
}

/* Modal pour les images */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow: hidden;
}

.image-modal.open {
    opacity: 1;
    visibility: visible;
}

.image-modal-content {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 15px;
}

.image-modal img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.image-modal-close, .image-modal-nav {
    background: transparent !important;
    box-shadow: none !important;
}

.image-modal-close svg, .image-modal-nav svg {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7));
    border-radius: 12px;
}

.image-modal-close:hover svg, .image-modal-nav:hover svg {
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.9));
}

.image-modal-close:hover, .image-modal-nav:hover {
    background: transparent !important;
}

.image-modal-close {
    position: fixed;
    top: 15px;
    right: 15px;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 12px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    z-index: 2010;
}

.image-modal-close:hover {
    background: #2d3748;
    color: #FFFFFF;
    transform: scale(1.1);
}

.image-modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: #232b3a;
    border: none;
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    padding: 12px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    outline: none;
    z-index: 2010;
    backdrop-filter: blur(10px);
}

.image-modal-nav:focus {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

.image-modal-nav:hover {
    background: #2d3748;
    color: #FFFFFF;
    transform: translateY(-50%) scale(1.1);
}

.image-modal-prev {
    left: 15px;
}

.image-modal-next {
    right: 15px;
}

.image-modal-nav.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.8);
}

/* Contact */
.contact-content {
    text-align: left;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 0 60px 0;
    line-height: 1.7;
}

.contact-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1em;
    max-width: 700px;
    margin-left: 0;
    margin-right: auto;
}

@media (min-width: 600px) {
  .contact-details {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--background-light);
    border: 1px solid var(--border-light);
}

.contact-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.contact-value {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.contact-value a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --container-padding: 20px;
    }

    .container {
        max-width: var(--container-width-mobile);
        margin: 0 auto;
    }
    
    .nav-right {
        display: none;
    }
    
    .nav-mobile {
        display: block;
    }
    
    .logo-img {
        height: 28px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-item {
        height: auto;
        flex-direction: column;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0!important;
        padding-right: 0!important;
    }
    
    .projects-showcase {
        gap: 60px;
        width: 100%!important;
        left: 0!important;
        margin-right: 0;
    }
    
    .project-images {
        height: 300px;
        position: relative;
        width: 100%;
    }
    
    .project-image {
        height: 100%;
    }
    
    .project-info {
        position: relative;
        width: 100%;
        height: auto;
        background: rgba(35, 43, 58, 1);
        padding: 30px;
        padding-right: calc(30px + var(--container-padding));
    }
    
    .project-details {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-header h3 {
        font-size: 1.3rem;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .subsection-title {
        font-size: 1.8rem;
    }
    
    .hobbies-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Modal responsive */
    .image-modal-content {
        padding: 15px;
    }
    
    .image-modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
        padding: 12px 10px;
    }
    
    .image-modal-prev {
        left: 15px;
    }
    
    .image-modal-next {
        right: 15px;
    }
    
    .image-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .project-info {
        padding: 25px;
        padding-right: calc(25px + var(--container-padding));
    }
    
    /*.project-images {
        height: auto;
    }*/
    
    .project-image {
        height: 200px;
    }
    
    .project-details {
        gap: 25px;
    }
    
    .project-header h3 {
        font-size: 1.2rem;
    }
    
    .project-description h4,
    .project-tasks h4 {
        font-size: 1rem;
    }
    
    /* Modal responsive */
    .image-modal-content {
        padding: 10px;
    }
    
    .image-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        padding: 10px 8px;
    }
    
    .image-modal-prev {
        left: 10px;
    }
    
    .image-modal-next {
        right: 10px;
    }
    
    .image-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
}

@media (max-width: 900px) {
    .image-modal-prev, .image-modal-next {
        width: 48px;
        height: 48px;
        font-size: 1.7rem;
    }
} 