/* Reset global */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Projects Page */
.projects-page {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.projects-page__title {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 100px;
    margin-bottom: 3rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Project Highlight Section */
.project-highlight {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    padding-left: 1rem;
    padding-right: 1rem;
}

.project-highlight:hover {
    transform: translateY(-5px);
}

.project-highlight__title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-highlight__content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.project-highlight__image {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-highlight__description {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* =====================================================
   MERCATO CARD - Style annonce de transfert
   ===================================================== */

.mercato-card {
    background: linear-gradient(135deg, #0a1628 0%, #1a2d4a 50%, #0d1f3c 100%);
    border: 2px solid #2d4a6f;
    position: relative;
    overflow: hidden;
}

section.mercato-card::before,
.mercato-card::before {
    display: none !important;
}

.mercato-card .project-highlight__title {
    color: #f4d03f;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.5rem;
}

.mercato-card .project-highlight__title .material-icons {
    color: #f4d03f;
}

.mercato-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mercato-badge {
    background: linear-gradient(135deg, #c9a227 0%, #f4d03f 100%) !important;
    color: #0a1628 !important;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 208, 63, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(244, 208, 63, 0); }
}

.mercato-date {
    color: #8ba3c7;
    font-size: 0.9rem;
    font-weight: 500;
}

.mercato-text {
    color: #e8f0f8 !important;
    font-size: 1.2rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
}

.mercato-text strong {
    color: #f4d03f;
}

.mercato-quote {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #f4d03f;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    color: #b8c9dc;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    border-radius: 0 8px 8px 0;
}

.mercato-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mercato-footer .material-icons {
    font-size: 1.2rem;
    color: #4ade80;
}

.mercato-card .project-highlight__image {
    border: 2px solid #2d4a6f;
    border-radius: 12px;
}

/* Responsive Mercato */
@media (max-width: 768px) {
    .mercato-card {
        padding: 1.5rem 1rem;
    }
    
    .mercato-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .mercato-text {
        font-size: 1rem !important;
    }
    
    .mercato-quote {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

/* Tech Stack List */
.tech-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.tech-list__item {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    background: var(--background-color);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Project Links */
.project-highlight__links {
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.button--primary {
    background: var(--gradient-primary);
    color: white;
}

.button--primary:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.button__icon {
    margin-left: 0.5rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .project-highlight__content {
        grid-template-columns: 1fr;
    }

    .project-highlight__image {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .projects-page__title {
        font-size: 2rem;
        margin-top: 80px;
    }

    .project-highlight {
        padding: 1.5rem;
    }

    .project-highlight__title {
        font-size: 1.5rem;
    }

    .project-highlight__description {
        font-size: 1rem;
    }

    .tech-list {
        text-align: center;
    }

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

/* Page Navigation */
.page-nav {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    padding-left: 1rem;
    padding-right: 1rem;
}

.page-nav__list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-nav__link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    background: var(--background-color);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-nav__link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-nav__link .material-icons {
    font-size: 1.2rem;
}

/* Smooth Scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .page-nav {
        padding: 1rem;
    }

    .page-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .page-nav__link {
        justify-content: center;
    }
}

/* Expertise Areas Section */
.expertise-areas,
.tools-section {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    padding-left: 1rem;
    padding-right: 1rem;
}

.expertise-areas h3,
.tools-section h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.expertise-areas .material-icons,
.tools-section .material-icons {
    font-size: 1.4rem;
    color: var(--secondary-color);
}

/* Responsive Header */
@media (max-width: 768px) {
    .header {
        padding: 0.5rem 0;
    }

    .main-nav__list {
        flex-direction: column;
        align-items: center;
        padding: 0.5rem;
        gap: 0.8rem;
    }

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

    .main-nav__link {
        display: block;
        padding: 0.8rem;
        width: 100%;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .main-nav__link:hover,
    .main-nav__link.active {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Burger Menu pour très petits écrans */
@media (max-width: 480px) {
    .main-nav {
        padding: 0 0.5rem;
    }

    .main-nav__list {
        gap: 0.5rem;
    }

    .main-nav__link {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
}

/* Header Mobile First */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--gradient-primary);
    padding: 1rem 0;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-nav__list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    padding: 1rem 2rem;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
}

.main-nav__link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.main-nav__link:hover,
.main-nav__link.active {
    background: var(--gradient-primary);
    color: white;
}

/* Menu Hamburger (caché par défaut) */
.menu-toggle {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        width: 100vw;
        max-width: 100%;
        overflow: hidden;
        padding: 0;
    }

    .main-nav {
        padding: 0.5rem 1rem;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .main-nav__list {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        max-width: 100%;
        max-height: 100vh;
        overflow-y: auto;
        background: var(--background-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        padding: 2rem;
        z-index: 5;
        border-radius: 0;
        margin: 0;
        box-sizing: border-box;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10;
    }

    .menu-toggle span {
        width: 100%;
        height: 3px;
        background: white;
        border-radius: 10px;
        transition: all 0.3s linear;
    }

    .main-nav__list.active {
        display: flex;
    }

    .main-nav__item {
        width: 100%;
        max-width: 300px;
    }

    .main-nav__link {
        display: block;
        text-align: center;
        padding: 1rem;
        font-size: 1.1rem;
    }

    /* Animation du hamburger */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        background: var(--secondary-color);
    }

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

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
        background: var(--secondary-color);
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 480px) {
    .main-nav {
        padding: 0.5rem;
        width: 100%;
        max-width: 100vw;
    }

    .main-nav__list {
        padding: 1rem;
        width: 100vw;
        max-width: 100%;
    }

    .main-nav__link {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

/* =====================================================
   TIMELINE SECTION - Style professionnel moderne
   ===================================================== */

.timeline-section {
    padding: 4rem 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    margin-top: 3rem;
}

.timeline-section__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    text-align: center;
}

.timeline-section__title .material-icons {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

/* Container principal */
.timeline-container {
    position: relative;
    padding: 2rem 0;
    margin: 0 auto;
    max-width: 900px;
}

/* Barre de progression verticale */
.timeline-progress-bar {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    z-index: 1;
}

/* Container des noeuds */
.timeline-nodes {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Ligne de connexion verticale */
.timeline-nodes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 2px;
    z-index: 0;
}

/* Noeud individuel */
.timeline-node {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

/* Alternance gauche/droite */
.timeline-node:nth-child(odd) {
    flex-direction: row;
    padding-right: calc(50% + 2rem);
}

.timeline-node:nth-child(even) {
    flex-direction: row-reverse;
    padding-left: calc(50% + 2rem);
}

/* Connecteur vers la ligne centrale */
.timeline-node__connector {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid #cbd5e1;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-node.active .timeline-node__connector,
.timeline-node:hover .timeline-node__connector {
    border-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 0 6px rgba(26, 95, 122, 0.15);
}

.timeline-node--current .timeline-node__connector {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Carte de contenu */
.timeline-node__card {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    width: 100%;
    border: 1px solid #e2e8f0;
}

.timeline-node:hover .timeline-node__card,
.timeline-node.active .timeline-node__card {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

/* Icône */
.timeline-node__icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-node__icon .material-icons {
    font-size: 28px;
    color: white;
}

/* Contenu textuel */
.timeline-node__content {
    flex: 1;
    min-width: 0;
}

.timeline-node__periode {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: rgba(46, 204, 113, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.timeline-node__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.3rem 0;
    line-height: 1.3;
}

.timeline-node__employer {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 0.8rem 0;
}

/* Méta-informations */
.timeline-node__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
}

.timeline-node__duration,
.timeline-node__category {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #64748b;
}

.timeline-node__duration .material-icons,
.timeline-node__category .material-icons {
    font-size: 16px;
}

/* Badge "En poste" */
.timeline-node__badge {
    position: absolute;
    top: -8px;
    right: 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Animation d'entrée */
.timeline-node {
    opacity: 0;
    animation: fadeInTimeline 0.6s ease forwards;
}

.timeline-node:nth-child(1) { animation-delay: 0.1s; }
.timeline-node:nth-child(2) { animation-delay: 0.2s; }
.timeline-node:nth-child(3) { animation-delay: 0.3s; }
.timeline-node:nth-child(4) { animation-delay: 0.4s; }
.timeline-node:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInTimeline {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   RESPONSIVE - Timeline Mobile
   ===================================================== */

@media (max-width: 768px) {
    .timeline-section {
        padding: 2rem 1rem;
    }

    .timeline-section__title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .timeline-container {
        padding: 1rem 0;
    }

    /* Mode liste verticale sur mobile */
    .timeline-nodes::before {
        left: 24px;
    }

    .timeline-progress-bar {
        left: 24px;
        transform: none;
    }

    .timeline-node,
    .timeline-node:nth-child(odd),
    .timeline-node:nth-child(even) {
        flex-direction: row;
        padding: 1rem 0 1rem 3.5rem;
    }

    .timeline-node__connector {
        left: 24px;
        width: 16px;
        height: 16px;
    }

    .timeline-node__card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.2rem;
    }

    .timeline-node__icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        border-radius: 12px;
    }

    .timeline-node__icon .material-icons {
        font-size: 24px;
    }

    .timeline-node__title {
        font-size: 1rem;
    }

    .timeline-node__employer {
        font-size: 0.9rem;
    }

    .timeline-node__meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline-node__badge {
        top: -6px;
        right: 0.8rem;
        font-size: 0.7rem;
        padding: 0.25rem 0.7rem;
    }
}

@media (max-width: 480px) {
    .timeline-nodes::before {
        left: 16px;
    }

    .timeline-progress-bar {
        left: 16px;
    }

    .timeline-node,
    .timeline-node:nth-child(odd),
    .timeline-node:nth-child(even) {
        padding-left: 2.5rem;
    }

    .timeline-node__connector {
        left: 16px;
        width: 14px;
        height: 14px;
        border-width: 3px;
    }

    .timeline-node__card {
        padding: 1rem;
    }

    .timeline-node__icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .timeline-node__periode {
        font-size: 0.8rem;
    }
}