/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
    --primary: #000DFF;
    --primary-light: #6B73FF;
    --primary-dark: #3b44d1;
    --primary-soft: #8b92ff;
    --text-dark: #0d0d1a;
    --text-muted: #555;
    --text-light: #888;
    --white: #fff;
    --bg-light: #f7f8ff;
    --shadow-soft: 0 4px 24px rgba(107,115,255,0.06);
    --shadow-medium: 0 8px 24px rgba(107,115,255,0.15);
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'DM Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* ========================================
   Optimisation des images (Cloudflare R2)
   ======================================== */
img[loading="lazy"] {
    opacity: 0;
    animation: imageLoad 0.3s ease-out forwards;
}

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

/* ========================================
   Animations Notifications
   ======================================== */

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@media (max-width: 640px) {
    @keyframes slideIn {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes slideOut {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }
}

/* Styles des notifications */
.notification {
    font-family: var(--font-sans);
    font-weight: 500;
    transition: all 0.3s ease;
}

.notification:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Responsive notifications container */
@media (max-width: 640px) {
    #notification-container {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
    }
}

/* Images responsives avec aspect ratio */
img {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    will-change: opacity;
}

/* Container pour images avec aspect ratio */
.image-container {
    overflow: hidden;
    background: var(--bg-light);
}

.profile-photo {
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 13, 255, 0.15);
}

.hidden {
    display: none !important;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.15;
}

.italic {
    font-style: italic;
}

.accent {
    color: var(--primary-light);
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.5s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

#logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--white);
    transition: color 0.3s;
}

.logo-italic {
    font-style: italic;
    font-weight: 300;
}

.nav-links {
    display: none;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    position: relative;
    font-size: 0.93rem;
    letter-spacing: 0.04em;
    color: var(--white);
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.8;
}

.nav-underline {
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--primary-light);
    border-radius: 2px;
    transition: width 0.3s;
}

.nav-link:hover .nav-underline {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--white);
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    transition: opacity 0.2s;
}

.nav-cta:hover {
    opacity: 0.85;
}

/* Hamburger */
#hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

@media (min-width: 768px) {
    #hamburger {
        display: none;
    }
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s;
}

/* Mobile menu */
#mobile-menu {
    padding: 0 2rem 1.5rem;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
}

.nav-mobile-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e8eaff;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Navbar scrolled state */
#navbar.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 32px rgba(107,115,255,0.10);
}

#navbar.scrolled #logo {
    color: var(--primary);
}

#navbar.scrolled .nav-link {
    color: var(--text-dark);
}

#navbar.scrolled .hamburger-line {
    background: var(--primary);
}

/* ========================================
   Hero Section
   ======================================== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #a8adff 100%);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: url('https://images.unsplash.com/photo-1772037441269-947195bb80f0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1080');
    background-size: cover;
    background-position: center;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(40px);
    background: radial-gradient(circle, var(--white) 0%, transparent 70%);
}

.hero-circle-1 {
    top: 5rem;
    right: 5rem;
    width: 24rem;
    height: 24rem;
}

.hero-circle-2 {
    bottom: 8rem;
    left: 2.5rem;
    width: 18rem;
    height: 18rem;
    filter: blur(30px);
}

.hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 2rem;
    max-width: 64rem;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--white);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-badge span:last-child {
    color: var(--white);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#hero h1 {
    font-family: var(--font-serif);
    color: var(--white);
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

#hero h1 .italic {
    font-weight: 600;
}

.hero-subtitle {
    font-family: var(--font-serif);
    color: rgba(255,255,255,0.85);
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    font-weight: 300;
    font-style: italic;
    margin-top: 1rem;
    letter-spacing: 0.02em;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: 50px;
    padding: 14px 36px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.btn-primary-white {
    background: linear-gradient(135deg, var(--white) 0%, #f0f0ff 100%);
    color: var(--primary);
    border-radius: 50px;
    padding: 14px 36px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.btn-primary-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ========================================
   Section Common Styles
   ======================================== */
.section-container {
    max-width: 1275px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-label.center {
    justify-content: center;
}

.label-line {
    height: 1px;
    width: 2rem;
    background: var(--primary-light);
}

.label-line.light {
    background: rgba(255,255,255,0.4);
}

.section-label span {
    color: var(--primary-light);
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.section-label.light span {
    color: rgba(255,255,255,0.7);
}

.section-header {
    margin-bottom: 4rem;
}

.section-header.center {
    text-align: center;
}

.section-header h2 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    color: var(--text-dark);
}

.section-header-flex {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-header-flex {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.section-description {
    color: var(--text-light);
    font-size: 0.9rem;
    max-width: 320px;
    line-height: 1.7;
}

/* ========================================
   Profil Section
   ======================================== */
#profil {
    padding: 7rem 2rem;
    background: var(--white);
}

.profil-grid {
    display: grid;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 768px) {
    .profil-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.profil-photo-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.photo-ring {
    position: absolute;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    border: 2px solid rgba(107,115,255,0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.photo-inner-ring {
    position: absolute;
    width: 16rem;
    height: 16rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(107,115,255,0.06), rgba(0,13,255,0.03));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.photo-wrapper {
    position: relative;
    width: 16rem;
    height: 16rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: 0 20px 60px rgba(107,115,255,0.25);
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    backface-visibility: hidden;
    transition: transform 0.3s ease;
}

.photo-wrapper img[loading="lazy"] {
    opacity: 0;
    animation: imageLoad 0.4s ease-out forwards;
}

.photo-wrapper:hover img {
    transform: scale(1.02);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,13,255,0.2) 0%, transparent 60%);
}

.promo-badge {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 8px 24px rgba(0,13,255,0.3);
}

.promo-label {
    color: var(--white);
    font-size: 0.75rem;
    opacity: 0.8;
}

.promo-value {
    font-family: var(--font-serif);
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 600;
}

.profil-text h2 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    color: var(--text-dark);
}

.profil-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-top: 1.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 600;
}

.stat-number.color-1 { color: var(--primary); }
.stat-number.color-2 { color: var(--primary-light); }
.stat-number.color-3 { color: var(--primary-dark); }
.stat-number.color-4 { color: var(--primary-soft); }

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.btn-primary {
    display: inline-block;
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--white);
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 24px rgba(107,115,255,0.3);
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(107,115,255,0.4);
}

/* ========================================
   Competences Section
   ======================================== */
#competences {
    padding: 7rem 2rem;
    background: var(--white);
}

.competences-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .competences-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.competence-bloc {
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s;
    border: 2px solid;
}

.competence-bloc:hover {
    transform: translateY(-4px);
}

.competence-bloc.b1 {
    background: rgba(0,13,255,0.07);
    border-color: rgba(0,13,255,0.2);
}

.competence-bloc.b2 {
    background: rgba(107,115,255,0.1);
    border-color: rgba(107,115,255,0.25);
}

.competence-bloc.b3 {
    background: rgba(59,68,209,0.08);
    border-color: rgba(59,68,209,0.2);
}

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

.bloc-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
}

.b1 .bloc-icon { background: var(--primary); }
.b2 .bloc-icon { background: var(--primary-light); }
.b3 .bloc-icon { background: var(--primary-dark); }

.bloc-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
}

.b1 .bloc-title { color: var(--primary); }
.b2 .bloc-title { color: var(--primary-light); }
.b3 .bloc-title { color: var(--primary-dark); }

.competence-item {
    padding-bottom: 1rem;
    margin-bottom: 0.75rem;
}

.b1 .competence-item { border-bottom: 1px solid rgba(0,13,255,0.2); }
.b2 .competence-item { border-bottom: 1px solid rgba(107,115,255,0.25); }
.b3 .competence-item { border-bottom: 1px solid rgba(59,68,209,0.2); }

.competence-code {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--white);
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 0.25rem;
}

.b1 .competence-code { background: var(--primary); }
.b2 .competence-code { background: var(--primary-light); }
.b3 .competence-code { background: var(--primary-dark); }

.competence-label {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}

/* ========================================
   Realisations Section
   ======================================== */
#realisations {
    padding: 7rem 2rem;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--white) 100%);
}

.stages-section {
    margin-bottom: 5rem;
}

.formations-section {
    margin-bottom: 5rem;
}

.stages-section h3,
.formations-section h3,
.company-realisations h3 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.formation-card {
    border-left: 3px solid var(--primary-light);
}

.formation-logo {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0fa;
}

.formation-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    object-position: left center;
    opacity: 0.8;
    transition: opacity 0.3s ease, filter 0.3s ease;
    display: block;
}

.formation-logo img[loading="lazy"] {
    animation: imageLoad 0.3s ease-out forwards;
}

.formation-logo:hover img {
    opacity: 1;
    filter: brightness(1.1);
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--primary-light), var(--primary));
    opacity: 0.2;
    transform: translateX(-50%);
    display: none;
}

@media (min-width: 768px) {
    .timeline::before {
        display: block;
    }
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .timeline-item {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: center;
    }
}

.timeline-dot {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 0 0 4px rgba(107,115,255,0.15);
    z-index: 10;
}

@media (min-width: 768px) {
    .timeline-dot {
        display: block;
    }
}

.stage-card {
    border-radius: 1.5rem;
    padding: 2rem;
    background: var(--white);
    border: 1px solid rgba(107,115,255,0.12);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
}

.stage-card:hover {
    transform: translateY(-4px);
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stage-dates {
    font-size: 0.75rem;
    color: var(--primary-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.stage-company {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.stage-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 2px;
}

.stage-duration {
    flex-shrink: 0;
    padding: 0.375rem 0.75rem;
    background: rgba(107,115,255,0.08);
    border: 1px solid rgba(107,115,255,0.15);
    border-radius: 0.75rem;
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 600;
}

.stage-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.stage-competences {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0f0fa;
    align-items: center;
}

.competences-label {
    font-size: 0.72rem;
    color: #aaa;
    margin-right: 4px;
}

.competence-tag {
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(0,13,255,0.07);
    border-radius: 6px;
    padding: 3px 9px;
    font-weight: 600;
}

/* Company Realisations */
.company-section {
    margin-bottom: 4rem;
}

.company-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.company-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.company-logo:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.company-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.company-logo img[loading="lazy"] {
    animation: imageLoad 0.3s ease-out forwards;
}

.company-logo:hover img {
    transform: scale(1.05);
}

.company-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 16px;
    border: 1px solid #e8eaff;
}

.company-info {
    flex: 1;
    min-width: 0;
}

.company-name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.company-sector {
    font-size: 0.85rem;
    color: var(--text-light);
}

.company-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
}

.company-location svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.company-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.realisations-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .realisations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.realisation-card {
    position: relative;
    cursor: pointer;
    background: var(--white);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(107,115,255,0.12);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.realisation-image {
    position: relative;
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.realisation-image-logo {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    object-position: center;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block;
    backface-visibility: hidden;
}

.realisation-image-logo[loading="lazy"] {
    animation: imageLoad 0.3s ease-out forwards;
}

.project-image-logo {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    object-position: center;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block;
    backface-visibility: hidden;
}

.project-image-logo[loading="lazy"] {
    animation: imageLoad 0.3s ease-out forwards;
}

.realisation-card:hover .realisation-image-logo {
    opacity: 0.95;
    transform: scale(1.02);
}

.realisation-image-placeholder {
    width: 5rem;
    height: 5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.realisation-company-label {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    background: rgba(0,0,0,0.3) !important;
}

.realisation-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.realisation-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-medium);
}

.realisation-type {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    border: 1px solid;
    border-color: inherit;
    font-weight: 500;
}

.realisation-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.realisation-description {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.realisation-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    font-size: 0.7rem;
    color: var(--primary-light);
    background: rgba(107,115,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* ========================================
   Projets Section
   ======================================== */
#projets {
    padding: 7rem 2rem;
    background: var(--white);
}

.projects-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(107,115,255,0.12);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
    min-height: 420px;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-image {
    position: relative;
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-decoration-1 {
    position: absolute;
    top: -2rem;
    right: -2rem;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    opacity: 0.1;
}

.project-decoration-2 {
    position: absolute;
    bottom: -1.5rem;
    left: -1.5rem;
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    opacity: 0.08;
}

.project-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-year {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    font-size: 0.75rem;
    font-weight: 600;
}

.project-content {
    padding: 1.75rem;
}

.project-type {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.project-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.project-description {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.75;
    margin-top: 0.6rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

/* ========================================
   Cartes cliquables
   ======================================== */
.project-card-link,
.realisation-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-card,
.realisation-card {
    position: relative;
    cursor: pointer;
    background: var(--white);
}

.card-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.project-card:hover .card-arrow,
.realisation-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

.project-card:hover,
.realisation-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-medium);
}

/* ========================================
   Contact Section
   ======================================== */
#contact {
    position: relative;
    padding: 7rem 2rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.contact-decoration-1 {
    position: absolute;
    top: 0;
    right: 0;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    opacity: 0.1;
    background: radial-gradient(circle, var(--white) 0%, transparent 70%);
    filter: blur(40px);
    transform: translate(30%, -30%);
}

.contact-decoration-2 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    opacity: 0.1;
    background: radial-gradient(circle, var(--white) 0%, transparent 70%);
    filter: blur(30px);
    transform: translate(-30%, 30%);
}

.contact-grid {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    pointer-events: none;
}

.contact-content {
    position: relative;
    z-index: 10;
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

#contact h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1.1;
}

#contact h2 .italic {
    font-weight: 600;
}

.contact-description {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 1.2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-cards {
    display: grid;
    gap: 1rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .contact-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact-card {
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
}

.contact-card:hover {
    transform: scale(1.05);
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
}

.contact-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-value {
    color: var(--white);
    font-size: 0.85rem;
}

.btn-white {
    display: inline-block;
    background: var(--white);
    color: var(--primary);
    border-radius: 50px;
    padding: 16px 42px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}

/* ========================================
   Grille de Compétences BTS SIO
   ======================================== */
#grille-competences {
    padding: 5rem 2rem;
    background: var(--bg-light);
}

.competences-table-wrapper {
    overflow-x: auto;
    margin-top: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
}

.competences-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    background: var(--white);
    font-size: 0.85rem;
}

.competences-table thead th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1.25rem 1rem;
    text-align: center;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
    border-right: 1px solid rgba(255,255,255,0.2);
    vertical-align: middle;
}

.competences-table thead th:last-child {
    border-right: none;
}

.competences-table tbody td {
    padding: 1.5rem 1rem;
    vertical-align: top;
    border-right: 1px solid rgba(107,115,255,0.1);
    border-bottom: 1px solid rgba(107,115,255,0.1);
    background: var(--white);
}

.competences-table tbody td:last-child {
    border-right: none;
}

.competence-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.competence-list li {
    position: relative;
    padding-left: 1.25rem;
    line-height: 1.5;
    color: var(--text-dark);
    font-size: 0.82rem;
}

.competence-list li::before {
    content: '▲';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.6rem;
}

/* Couleurs des puces selon les blocs */
.competence-list li.comp-blue::before {
    color: #000DFF;
}

.competence-list li.comp-green::before {
    color: #00AA55;
}

.competence-list li.comp-red::before {
    color: #FF4444;
}

.competence-list li.comp-orange::before {
    color: #FF8800;
}

.competence-list li.comp-purple::before {
    color: #8B5CF6;
}

/* Hover sur les lignes */
.competences-table tbody tr:hover td {
    background: rgba(107,115,255,0.03);
}

/* Responsive */
@media (max-width: 1024px) {
    .competences-table-wrapper {
        margin: 2rem -1rem 0;
        border-radius: 0;
    }
    
    .competences-table {
        font-size: 0.8rem;
    }
    
    .competences-table thead th {
        padding: 1rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .competences-table tbody td {
        padding: 1rem 0.75rem;
    }
}

/* ========================================
   Footer
   ======================================== */
footer {
    padding: 2rem;
    background: #0a0a1a;
    border-top: 1px solid rgba(107,115,255,0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 640px) {
    .footer-container {
        flex-direction: row;
    }
}

.footer-title {
    font-family: var(--font-serif);
    color: rgba(255,255,255,0.4);
    font-size: 1.1rem;
    font-style: italic;
}

.footer-copyright {
    color: rgba(255,255,255,0.25);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

/* ========================================
   Loading Overlay
   ======================================== */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #0d0d1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.5s ease-out;
}

#loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Spinner moderne avec plusieurs anneaux */
.loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--primary-light);
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.spinner-ring:nth-child(2) {
    inset: 8px;
    border-right-color: var(--primary);
    animation: spin-reverse 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.spinner-ring:nth-child(3) {
    inset: 16px;
    border-bottom-color: var(--primary-soft);
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.spinner-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    to { transform: rotate(-360deg); }
}

@keyframes pulse-dot {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.7; }
}

/* Textes de chargement */
.loader-text {
    text-align: center;
    max-width: 300px;
}

.loader-status {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.5rem;
    animation: fade-text 0.5s ease-out;
}

.loader-tip {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    animation: fade-text 0.5s ease-out;
}

@keyframes fade-text {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Barre de progression */
.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-soft));
    border-radius: 4px;
    transition: width 0.3s ease-out;
    position: relative;
}

.loader-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========================================
   Messages Carousel Section
   ======================================== */
#messages-section {
    padding: 0;
    background: transparent;
    position: relative;
    z-index: 20;
    margin-top: -3rem;
}

.messages-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.messages-carousel {
    position: relative;
}

.message-slide {
    display: none;
    animation: fadeInSlide 0.5s ease-out;
}

.message-slide.active {
    display: block;
}

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

.message-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    background: var(--white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.message-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

.message-card.message-info::before {
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
}

.message-card.message-success::before {
    background: linear-gradient(180deg, #34D399, #10B981);
}

.message-card.message-warning::before {
    background: linear-gradient(180deg, #FBBF24, #F59E0B);
}

.message-card.message-urgent::before {
    background: linear-gradient(180deg, #F87171, #EF4444);
}

.message-card.message-urgent {
    animation: pulseUrgent 2s ease-in-out infinite;
}

@keyframes pulseUrgent {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(239, 68, 68, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
    }
    50% {
        box-shadow: 0 10px 40px rgba(239, 68, 68, 0.3), 0 2px 10px rgba(239, 68, 68, 0.15);
    }
}

.message-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.message-info .message-icon {
    background: linear-gradient(135deg, rgba(107,115,255,0.15), rgba(107,115,255,0.05));
    color: var(--primary);
}

.message-success .message-icon {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
    color: #059669;
}

.message-warning .message-icon {
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05));
    color: #D97706;
}

.message-urgent .message-icon {
    background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.05));
    color: #DC2626;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-urgent .message-title::after {
    content: 'URGENT';
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    background: #FEE2E2;
    color: #DC2626;
    border-radius: 4px;
}

.message-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.message-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.2s;
}

.message-link:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

.messages-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.messages-nav.hidden {
    display: none;
}

.messages-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.messages-nav-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.messages-dots {
    display: flex;
    gap: 0.5rem;
}

.message-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: rgba(107,115,255,0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.message-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.message-dot:hover:not(.active) {
    background: rgba(107,115,255,0.4);
}

/* ========================================
   Pagination System
   ======================================== */
.paginated-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.paginated-grid {
    flex: 1;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .paginated-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Layout 2 colonnes Réalisations/Projets */
.realisation-projects-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.items-2-per-page {
    grid-template-columns: 1fr !important;
}

@media (min-width: 768px) {
    .items-2-per-page {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.pagination-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(107,115,255,0.2);
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s;
    z-index: 5;
}

.pagination-arrow:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.pagination-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(107,115,255,0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.pagination-dot:hover:not(.active) {
    background: rgba(107,115,255,0.4);
}

/* Responsive: hide arrows on mobile, show dots only */
@media (max-width: 767px) {
    .paginated-container {
        flex-direction: column;
    }
    
    .paginated-container .pagination-arrow {
        display: none;
    }
}

/* Animation pour le changement de page */
.paginated-grid .realisation-card,
.paginated-grid .project-card-link {
    animation: fadeInUp 0.4s ease-out;
}

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

/* Realisation card company info */
.realisation-company-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(107,115,255,0.1);
}

.realisation-company-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.realisation-company-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.realisation-company-sector {
    font-size: 0.72rem;
    color: var(--text-light);
}

/* ========================================
   Formations — Timeline style distinct (vert/teal)
   ======================================== */

/* Dot vert pour la timeline formations */
.timeline-dot.formation-dot {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

/* Carte formation — timeline académique, style vert distinct des stages */
.formation-card-v2 {
    border-radius: 1.5rem;
    padding: 0;
    background: #fff;
    border: 1px solid rgba(16, 185, 129, 0.18);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.formation-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(16, 185, 129, 0.15);
}

/* Colonne logo — vert */
.form-logo-col {
    width: 88px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #f0fdf6 0%, #dcfce8 100%);
    border-right: 1px solid rgba(16, 185, 129, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.75rem;
    position: relative;
}

.form-logo-col::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #10B981 0%, #059669 100%);
    border-radius: 0 2px 2px 0;
}

.form-logo-col img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 7px;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(255,255,255,0.9);
    display: block;
}

.form-logo-col--fallback::before {
    content: attr(data-fallback);
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.form-school {
    font-size: 0.75rem;
    color: #10B981;
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.form-divider {
    background: rgba(16, 185, 129, 0.12);
}

/* Badge "Formation" */
.formation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.22rem 0.6rem;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: #059669;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
    margin-bottom: 0;
}

/* Dates — vertes */
.formation-dates {
    font-size: 0.75rem;
    color: #10B981;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0;
}

/* Badge diplôme */
.formation-degree-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.18);
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
    flex-shrink: 0;
}

/* Badge "En cours" */
.formation-current-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #D97706;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.formation-current-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #F59E0B;
    animation: pulse 2s infinite;
}

/* Logo école en bas de carte */
.formation-school-logo-wrap {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(16, 185, 129, 0.1);
}

.formation-school-logo-wrap img {
    height: 28px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    opacity: 0.65;
    transition: opacity 0.3s;
}

.formation-school-logo-wrap img:hover {
    opacity: 1;
}

/* ========================================
   Stages — Premium Cards (colonne logo)
   ======================================== */
.stage-card {
    border-top: none;
    padding: 0;
    overflow: hidden;
}

.stage-card-inner {
    display: flex;
    min-height: 100%;
}

/* ── Colonne logo gauche ── */
.stage-logo-col {
    width: 88px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #f0f2ff 0%, #e8eaff 100%);
    border-right: 1px solid rgba(107,115,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.75rem;
    position: relative;
}

/* Trait vertical décoratif */
.stage-logo-col::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 0 2px 2px 0;
}

.stage-logo-col img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 7px;
    box-shadow: 0 2px 12px rgba(0,13,255,0.1);
    border: 1px solid rgba(255,255,255,0.9);
    display: block;
}

/* Fallback initiale quand pas de logo */
.stage-logo-col--fallback::before {
    content: attr(data-fallback);
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,13,255,0.22);
}

/* ── Contenu principal ── */
.stage-content {
    flex: 1;
    padding: 1.25rem 1.4rem 1.35rem;
    min-width: 0;
}

.stage-content-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.stage-content-top .stage-company {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.stage-sector {
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.stage-work-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.22rem 0.6rem;
    border-radius: 50px;
    background: rgba(0, 13, 255, 0.06);
    border: 1px solid rgba(0, 13, 255, 0.13);
    color: var(--primary);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}

.stage-divider {
    height: 1px;
    background: rgba(107,115,255,0.1);
    margin: 0 0 0.9rem;
}

.stage-role {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.stage-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.stage-meta-row .stage-dates {
    margin-bottom: 0;
}

.stage-company-placeholder {
    display: none;
}

@media (max-width: 640px) {
    .stage-logo-col { width: 68px; }
    .stage-logo-col img,
    .stage-logo-col--fallback::before { width: 40px; height: 40px; font-size: 1.2rem; }
}

/* ========================================
   Scroll-Reveal Animations
   ======================================== */
.reveal.visible {
    /* animations disponibles si activées par JS */
}

/* ========================================
   Profil Stats — Card Style
   ======================================== */
.stat-item {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    text-align: center;
    border: 1px solid rgba(107, 115, 255, 0.08);
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: rgba(107, 115, 255, 0.2);
    box-shadow: 0 8px 24px rgba(107, 115, 255, 0.08);
}

/* ========================================
   Hero — CV Button
   ======================================== */
.btn-cv {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: all 0.3s;
}

.btn-cv:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.85);
}

/* ========================================
   Navbar — Active Link Indicator
   ======================================== */
.nav-link.active .nav-underline {
    width: 100%;
}

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

/* ========================================
   Section Divider
   ======================================== */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 115, 255, 0.18), transparent);
    margin: 0;
}

/* ========================================
   Paginated container arrows improvement
   ======================================== */
.pagination-arrow {
    flex-shrink: 0;
}

.pagination-arrow:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* ========================================
   Contact Form (inside contact section)
   ======================================== */
.contact-form {
    margin-top: 2.5rem;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 560px) {
    .cf-row { grid-template-columns: 1fr; }
}

.cf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cf-field label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

.cf-field input,
.cf-field textarea {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: border-color .2s, background .2s;
    resize: none;
}

.cf-field input::placeholder,
.cf-field textarea::placeholder {
    color: rgba(255,255,255,0.35);
}

.cf-field input:focus,
.cf-field textarea:focus {
    border-color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.12);
}

.cf-feedback {
    font-size: 13px;
    min-height: 18px;
    text-align: center;
}

.cf-feedback.success { color: #6ee7b7; }
.cf-feedback.error   { color: #fca5a5; }

/* ========================================
   CV Section
   ======================================== */
#cv-section {
    padding: 80px 20px;
    background: var(--bg-light);
    text-align: center;
}

.cv-section-inner {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

#cv-section h2 {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 300;
    color: var(--text-dark);
    line-height: 1.15;
}

.cv-description {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    max-width: 420px;
    text-align: center;
}

.btn-cv-section {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(0,13,255,0.18);
    margin-top: 0.5rem;
}

.btn-cv-section:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,13,255,0.25);
}

/* ========================================
   Scroll Animations
   ======================================== */
.anim-ready {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.anim-in {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes directionnelles */
.anim-ready.from-left  { transform: translateX(-30px); }
.anim-ready.from-right { transform: translateX(30px);  }
.anim-in.from-left,
.anim-in.from-right    { transform: translateX(0);     }

/* Les timeline-item alternent gauche/droite */
.timeline-item:not(.right) .stage-card,
.timeline-item:not(.right) .formation-card-v2 {
    transform-origin: left center;
}
.timeline-item.right .stage-card,
.timeline-item.right .formation-card-v2 {
    transform-origin: right center;
}

/* Stat items en cascade */
.stats-grid .stat-item:nth-child(1) { transition-delay: 0ms;   }
.stats-grid .stat-item:nth-child(2) { transition-delay: 80ms;  }
.stats-grid .stat-item:nth-child(3) { transition-delay: 160ms; }

/* Timeline items en cascade */
.timeline-item:nth-child(1) { transition-delay: 0ms;   }
.timeline-item:nth-child(2) { transition-delay: 100ms; }
.timeline-item:nth-child(3) { transition-delay: 200ms; }
.timeline-item:nth-child(4) { transition-delay: 300ms; }

/* Ne pas animer les éléments déjà visibles au chargement */
@media (prefers-reduced-motion: reduce) {
    .anim-ready { opacity: 1; transform: none; }
}
