/* ==========================================================================
   PORTFOLIO — NEW DESIGN SYSTEM & ULTRA-MODERN DARK STYLES v4.1 (refonte SQLite)
   Louis Girault | MMI Designer & Créatif Polyvalent
   ========================================================================== */

/* Styles généraux */

/* ==========================================================================
   POLICES LOCALES & WEBFONTS
   ========================================================================== */
@font-face {
    font-family: 'Blonden';
    src: url('./font/Blonden-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Fonzie';
    src: url('./font/Fonzie-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Reem Kufi';
    src: url('./font/ReemKufi-VariableFont_wght.ttf') format('truetype-variations'),
         url('./font/ReemKufi-Regular.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Reem Kufi';
    src: url('./font/ReemKufi-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Plus Jakarta Sans hébergée localement (plus d'appel à Google Fonts) */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('./font/PlusJakartaSans-VariableFont_wght.ttf') format('truetype-variations'),
         url('./font/PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Color Palette - Deep space black with subtle violet/slate undertones */
    --bg-primary: #07070b;
    --bg-secondary: #0e0e17;
    --bg-tertiary: #161624;
    --bg-card: rgba(18, 18, 28, 0.7);
    --bg-glass: rgba(14, 14, 23, 0.65);
    
    /* Dynamic Accent Accents */
    --accent: #6366f1; /* Electric Indigo */
    --accent-glow: rgba(99, 102, 241, 0.22);
    --accent-cyan: #38bdf8; /* Sky cyan lumineux */
    --accent-cyan-glow: rgba(56, 189, 248, 0.2);
    --accent-violet: #8b5cf6;
    
    /* Refined Typography Tokens */
    --text-primary: #f8fafc; /* Pur, lisible, sans bavure */
    --text-secondary: #cbd5e1; /* Slate clair pour excellente lisibilité */
    --text-muted: #94a3b8; /* Muted bien lisible (contraste garanti > 4.5:1) */
    
    /* Fine hairline borders */
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-hover: rgba(255, 255, 255, 0.16);
    --border-highlight: rgba(99, 102, 241, 0.35);
    
    /* Layout & Transitions */
    --border-radius-lg: 1.25rem;
    --border-radius-md: 0.85rem;
    --border-radius-sm: 0.5rem;
    
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-snappy: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-display-section: 'Plus Jakarta Sans', sans-serif;
    --font-sans: 'Reem Kufi', sans-serif;
}

/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background: rgba(99, 102, 241, 0.35);
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    letter-spacing: 0.015em;
    overflow-x: clip; 
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: clip; 
    position: relative;
    width: 100%; 
    font-family: var(--font-sans);
}

/* Typographie des titres : Plus Jakarta Sans ExtraBold avec gestion parfaite des accents français */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display-section);
    font-weight: 800; /* ExtraBold */
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.12;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.5rem, 6.5vw, 4.5rem);
    letter-spacing: -0.025em;
}

h2 {
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    letter-spacing: 0.025em;
}

p {
    font-family: var(--font-sans);
    line-height: 1.75;
    letter-spacing: 0.015em;
}

/* Custom scrollbar avec accent glow */
::-webkit-scrollbar {
    width: 7px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ==========================================================================
   2. PRELOADER / SPLASH SCREEN
   ========================================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #030305;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    pointer-events: all;
    transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1);
}

#preloader.loaded {
    transform: translateY(-100%);
    pointer-events: none;
}

.preloader-content {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display-section);
    font-weight: 800;
    font-size: 3.5rem;
    color: var(--text-primary);
    letter-spacing: -0.05em;
}

.preloader-logo-l {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    animation: pulseLogo 1.5s infinite alternate;
}

.preloader-text-rest {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.5s ease;
    transition-delay: 0.4s;
    font-weight: 700;
}

.preloader-content.reveal-rest .preloader-text-rest {
    max-width: 400px;
    opacity: 1;
}

@keyframes pulseLogo {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}



/* ==========================================================================
   4. PROGRESS BAR
   ========================================================================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
    z-index: 9999;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    width: 0%;
}

/* ==========================================================================
   5. HEADER & FLOATING NAVIGATION
   ========================================================================== */
header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: rgba(12, 12, 20, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 0.6rem 2rem;
    z-index: 999;
    transition: var(--transition-smooth);
}

header.header-scrolled {
    top: 0.8rem;
    width: 95%;
    background: rgba(5, 5, 8, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

nav .nav-logo {
    display: flex;
    align-items: center;
    transition: var(--transition-snappy);
}

nav .nav-logo img {
    height: 2.2rem;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.1));
    transition: var(--transition-snappy);
}

nav .nav-logo:hover img {
    transform: rotate(5deg) scale(1.05);
}

nav ul.nav-menu-desktop {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
    position: relative;
}

nav ul.nav-menu-desktop li a {
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 1.05rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: var(--transition-snappy);
    position: relative;
    z-index: 2;
    text-decoration: none !important;
}

nav ul.nav-menu-desktop li a:hover {
    color: var(--text-primary);
}

/* Sliding active indicator */
.nav-indicator {
    position: absolute;
    height: 75%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    z-index: 1;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
    opacity: 0;
}

nav ul.nav-menu-desktop li a.nav-active {
    color: var(--accent-cyan);
}

/* Hamburger mobile button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 14px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
}

.hamburger.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Fullscreen mobile overlay */
.nav-menu-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 8, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-menu-mobile.open {
    opacity: 1;
    pointer-events: all;
}

.nav-menu-mobile ul {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.nav-menu-mobile ul li {
    overflow: hidden;
}

.nav-menu-mobile ul li a {
    font-family: var(--font-display-section);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none !important;
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-menu-mobile.open ul li a {
    transform: translateY(0);
}

/* Stagger delay for mobile links */
.nav-menu-mobile ul li:nth-child(1) a { transition-delay: 0.1s; }
.nav-menu-mobile ul li:nth-child(2) a { transition-delay: 0.15s; }
.nav-menu-mobile ul li:nth-child(3) a { transition-delay: 0.2s; }
.nav-menu-mobile ul li:nth-child(4) a { transition-delay: 0.25s; }
.nav-menu-mobile ul li:nth-child(5) a { transition-delay: 0.3s; }
.nav-menu-mobile ul li:nth-child(6) a { transition-delay: 0.35s; }
.nav-menu-mobile ul li:nth-child(7) a { transition-delay: 0.4s; }

@media (max-width: 900px) {
    nav ul.nav-menu-desktop {
        display: none;
    }
    .hamburger {
        display: flex;
    }
}

/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
    background: radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.45;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-section h1 {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 8.5vw, 7.5rem);
    font-weight: 800; /* ExtraBold */
    line-height: 1.02;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.hero-section h1 .title-outline {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.28);
    display: block;
    transition: -webkit-text-stroke 0.4s ease;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 680px;
    line-height: 1.6;
    margin-bottom: 3.5rem;
}

.hero-tagline .accent-word {
    color: var(--accent-cyan);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Premium Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 100px;
    text-decoration: none;
    transition: var(--transition-snappy);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #ffffff;
    color: #07070b;
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #f1f5f9;
    box-shadow: 0 8px 26px rgba(255, 255, 255, 0.22);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

/* Hero bottom bar */
.hero-footer-bar {
    position: absolute;
    bottom: 2rem;
    left: 5%;
    width: 90%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.03);
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    z-index: 2;
}

.hero-social-links {
    display: flex;
    gap: 1.5rem;
}

.hero-social-links a {
    color: var(--text-muted);
    transition: var(--transition-snappy);
}

.hero-social-links a:hover {
    color: var(--accent-cyan);
}

/* ==========================================================================
   7. SECTION HEADERS
   ========================================================================== */
.section-header {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
}

.section-label {
    font-family: var(--font-display-section);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-display-section);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800; /* ExtraBold */
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin-top: 0.75rem;
    font-size: 1rem;
}

/* ==========================================================================
   8. CARROUSEL DES PROJETS (remplace le défilement horizontal bloqué)
   ========================================================================== */
.projects-section {
    position: relative;
    width: 100%;
    padding: 6rem 0;
}

.projects-carousel {
    --pc-gap: 2rem;
    --pc-per-view: 3;
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 4rem;
}

.pc-track {
    display: flex;
    gap: var(--pc-gap);
    list-style: none;
    margin: 0;
    padding: 1rem 0 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.pc-track::-webkit-scrollbar { display: none; }
.pc-track:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 4px; border-radius: var(--border-radius-lg); }

.pc-track .project-card {
    flex: 0 0 calc((100% - (var(--pc-per-view) - 1) * var(--pc-gap)) / var(--pc-per-view));
    scroll-snap-align: start;
}
.pc-track .project-card[hidden] { display: none; }

.pc-btn {
    position: absolute;
    top: calc(50% - 1.5rem);
    transform: translateY(-50%);
    z-index: 5;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color-hover);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: var(--transition-snappy);
}
.pc-btn:hover { border-color: var(--accent); color: var(--accent-cyan); }
.pc-btn[hidden] { display: none; }
.pc-prev { left: .5rem; }
.pc-next { right: .5rem; }

.pc-dots { display: flex; justify-content: center; align-items: center; gap: .55rem; margin-top: .75rem; min-height: 1.6rem; }
.pc-dots[hidden] { display: none; }
.pc-dot {
    height: .6rem;
    min-width: .6rem;
    padding: 0;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.22);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background .25s ease, color .25s ease;
}
.pc-dot:hover { background: rgba(255, 255, 255, 0.45); }
.pc-dot.pc-current { width: 1.8rem; background: var(--accent-cyan); cursor: default; }
.pc-dot.pc-count {
    height: auto;
    padding: .2rem .6rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color-hover);
    font-family: var(--font-sans);
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.2;
}
.pc-dot.pc-count:hover { color: var(--text-primary); border-color: var(--accent); background: rgba(99, 102, 241, 0.12); }

.pc-empty { text-align: center; color: var(--text-muted); padding: 3rem 1rem; }

@media (max-width: 1100px) {
    .projects-carousel { --pc-per-view: 2; padding: 0 3.5rem; }
}
@media (max-width: 700px) {
    .projects-section { padding: 4rem 0; }
    .projects-carousel { --pc-gap: 1rem; padding: 0 1.25rem; }
    .pc-track .project-card { flex-basis: 86%; scroll-snap-align: center; }
    .pc-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .pc-track { scroll-behavior: auto; }
}

/* Project filters bar */
.filters-container {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    display: flex;
    justify-content: flex-start;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-sans);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.55rem 1.3rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.015em;
    cursor: pointer;
    transition: var(--transition-snappy);
    backdrop-filter: blur(8px);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

/* Project Card styling */
.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 490px;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
}

.project-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(99, 102, 241, 0.12);
    transform: translateY(-6px);
}

.project-card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    background: #000;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

/* Domain/badges overlay */
.project-card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.domain-badge {
    background: rgba(7, 7, 11, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-crea {
    border-color: rgba(168, 85, 247, 0.5);
    color: #d8b4fe;
    background: rgba(168, 85, 247, 0.15);
}

.badge-dev {
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
    background: rgba(34, 197, 94, 0.15);
}

.project-card-body {
    padding: 1.8rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card-title {
    font-family: var(--font-display-section);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}

.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.competence-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
}

.project-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: auto;
}

.project-card-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    margin-top: 1.5rem;
    transition: var(--transition-snappy);
}

.project-card-link svg {
    margin-left: 0.4rem;
    transition: transform 0.3s ease;
}

.project-card-link:hover {
    color: #ffffff;
}

.project-card-link:hover svg {
    transform: translate(3px, -3px);
}

/* ==========================================================================
   9. SKILLS SECTION (Luke Baffait Style - Premium)
   ========================================================================== */
.skills-section-premium {
    padding: 5rem 10%; 
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.baffait-skills-container {
    margin-top: 5rem;
    display: flex;
    flex-direction: column;
}

.baffait-skill-row {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 2.2rem 1.2rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.baffait-skill-row:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.baffait-row-header {
    display: grid;
    grid-template-columns: 0.5fr 2.5fr 3fr;
    align-items: center;
}

.baffait-row-header .row-num {
    font-family: var(--font-display-section), sans-serif;
    font-size: 1.15rem;
    color: var(--accent-cyan);
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.85;
}

.baffait-row-header h3 {
    font-family: var(--font-display-section), sans-serif;
    font-size: 2.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.baffait-row-header .row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.baffait-row-header .row-tags span {
    font-family: var(--font-sans), sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

/* Row hover effects */
.baffait-skill-row:hover {
    background-color: rgba(99, 102, 241, 0.04);
    border-top-color: rgba(99, 102, 241, 0.35);
}

.baffait-skill-row:hover h3 {
    color: #ffffff;
}

.baffait-skill-row:hover .row-tags span {
    border-color: rgba(56, 189, 248, 0.3);
    color: var(--accent-cyan);
    background-color: rgba(56, 189, 248, 0.08);
}

/* Dropdown */
.baffait-row-dropdown {
    max-height: 0;
    opacity: 0;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    padding-top: 0;
}

.baffait-skill-row.is-active {
    background-color: rgba(14, 14, 23, 0.85);
    border-top-color: var(--accent);
}

.baffait-skill-row.is-active .baffait-row-dropdown {
    max-height: 3000px;
    opacity: 1;
    padding-top: 2.5rem;
    padding-bottom: 1rem;
}

.baffait-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding-left: 2rem;
}

.baffait-skill-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-snappy);
}

.baffait-skill-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.baffait-skill-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.skill-mini-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.baffait-skill-item h4 {
    font-family: var(--font-display-section), sans-serif;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.baffait-skill-item p {
    font-family: var(--font-sans), sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 992px) {
    .baffait-row-header {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .baffait-row-header .row-tags {
        justify-content: flex-start;
        margin-top: 0.5rem;
    }
    .baffait-dropdown-grid {
        padding-left: 0;
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   10. PRESENTATION SECTION (Bento Grid & Timeline)
   ========================================================================== */
.about-section {
    padding: 5rem 2rem; 
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.about-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 1.5rem;
    margin-top: 4rem;
}

/* Base d'une carte Bento */
.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.08);
}

/* Placements asymétriques dans la grille */
.bento-bio {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(22, 22, 38, 0.85) 0%, rgba(14, 14, 23, 0.95) 100%);
}

.bento-portrait {
    grid-column: 3 / 4;
    grid-row: span 2;
    padding: 0;
    min-height: 420px;
    background: #000;
}

.bento-vision {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(16, 16, 26, 0.8) 0%, rgba(10, 10, 18, 0.95) 100%);
}

/* Typographie interne des cartes */
.bento-bio h3 {
    font-family: var(--font-display-section), sans-serif;
    font-size: 2.6rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.bento-bio p {
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.bento-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.bento-vision h4, .bento-timeline h4 {
    font-family: var(--font-display-section), sans-serif;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    letter-spacing: 0.02em;
}

.bento-vision p, .bento-timeline p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Gestion du portrait */
.bento-img-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.bento-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-portrait:hover .bento-img-wrapper img {
    transform: scale(1.04);
}

.bento-portrait-badge {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background: rgba(7, 7, 11, 0.8);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.8rem 1.1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Cartes Timeline Bento */
.bento-year {
    font-family: var(--font-display-section), sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
}

.bento-active {
    border-color: rgba(6, 182, 212, 0.3);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(6, 182, 212, 0.05) 100%);
}

.bento-future {
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background: transparent;
}

/* Animations Scroll Reveal */
.bento-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--delay, 0s);
}

.bento-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .about-bento-grid {
        grid-template-columns: 1fr 1fr;
    }
    .bento-bio { grid-column: span 2; }
    .bento-portrait { grid-column: span 2; grid-row: auto; min-height: 350px; }
    .bento-vision { grid-column: span 2; }
}

@media (max-width: 600px) {
    .about-bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-bio, .bento-portrait, .bento-vision { grid-column: 1; }
}

/* Projet de formation timeline */
.formation-timeline-wrapper {
    margin-top: 8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 5rem;
}

.timeline-main-title {
    font-family: var(--font-display-section), sans-serif;
    font-size: 2.4rem;
    margin-bottom: 4rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.reflexion-parcours {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.parcours-item {
    position: relative;
    background: var(--bg-secondary);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.parcours-item:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.parcours-date {
    font-family: var(--font-display-section), sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    color: rgba(99, 102, 241, 0.08);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    user-select: none;
}

.parcours-content h3 {
    font-family: var(--font-display-section), sans-serif;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.parcours-content p {
    font-family: var(--font-sans), sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 992px) {
    .reflexion-parcours {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ==========================================================================
   11. CREATIONS & EXPERIMENTATIONS
   ========================================================================== */
.creations-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.moodboard {
    columns: 4 230px;
    column-gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.moodboard-item {
    break-inside: avoid;
    margin-bottom: 1.25rem;
}

.moodboard-open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    cursor: zoom-in;
    transition: border-color .4s ease, box-shadow .4s ease, transform .4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Orientation et format d'origine conservés */
.moodboard-open img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .8s cubic-bezier(0.16, 1, 0.3, 1);
}

.moodboard-open:hover,
.moodboard-open:focus-visible {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
    transform: translateY(-3px);
}
.moodboard-open:hover img { transform: scale(1.04); }
.moodboard-open:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }

.moodboard-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.1rem;
    text-align: left;
    background: linear-gradient(0deg, rgba(5, 5, 8, 0.9) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .4s ease;
}
.moodboard-open:hover .moodboard-overlay,
.moodboard-open:focus-visible .moodboard-overlay { opacity: 1; }

@media (max-width: 600px) {
    .moodboard { columns: 2; column-gap: .75rem; }
    .moodboard-item { margin-bottom: .75rem; }
    .moodboard-overlay { display: none; }
}

.creation-title {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.creation-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Creations text intro */
.creations-intro {
    max-width: 800px;
    margin: 3rem auto 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.creations-intro h3 {
    font-family: var(--font-display-section);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.creations-intro p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.creations-intro p strong {
    color: var(--text-primary);
}

/* ==========================================================================
   12. CONTACT SECTION
   ========================================================================== */
.contact-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
}

.contact-info-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-method-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.4rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    text-decoration: none;
    transition: var(--transition-snappy);
    backdrop-filter: blur(12px);
}

.contact-method-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent-cyan);
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.contact-method-card:hover .contact-icon {
    transform: scale(1.08);
    background: rgba(56, 189, 248, 0.15);
}

.contact-method-details span {
    display: block;
}

.contact-method-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.contact-method-value {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* High-fidelity Form styling */
.contact-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

@media (max-width: 600px) {
    .contact-form-card {
        padding: 2rem;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    padding: 0.8rem 0;
    outline: none;
    transition: border-color 0.4s ease;
}

.form-label {
    position: absolute;
    top: 0.8rem;
    left: 0;
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Floating label logic */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -1.2rem;
    font-size: 0.8rem;
    color: var(--accent-cyan);
}

.form-input:focus {
    border-bottom-color: var(--accent-cyan);
}

.form-input-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.form-input:focus ~ .form-input-underline {
    width: 100%;
}

.btn-submit {
    align-self: flex-start;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-snappy);
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */
footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    text-align: center;
    background: #030305;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   14. VISIONNEUSE DES CRÉATIONS
   ========================================================================== */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4.5rem 1rem 1.5rem;
    background: rgba(5, 5, 8, 0.94);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity .25s ease;
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox.is-open { opacity: 1; }

.glb-figure {
    margin: 0;
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .9rem;
}
.glb-img {
    max-width: 100%;
    max-height: calc(100% - 4.5rem);
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}
.glb-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: .35rem .9rem;
    max-width: 50rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: .9rem;
}
.glb-title { color: var(--text-primary); font-family: var(--font-display-section); }
.glb-counter { color: var(--text-muted); font-size: .8rem; }

.glb-close,
.glb-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border-color-hover);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-snappy);
}
.glb-close:hover, .glb-nav:hover { border-color: var(--accent); color: var(--accent-cyan); }
.glb-close { position: absolute; top: 1rem; right: 1rem; }
.glb-nav[hidden] { display: none; }

@media (max-width: 700px) {
    .gallery-lightbox { padding: 4.5rem .5rem 1rem; }
    .glb-nav {
        position: absolute;
        bottom: 1rem;
        width: 2.75rem;
        height: 2.75rem;
    }
    .glb-prev { left: calc(50% - 3.5rem); }
    .glb-next { right: calc(50% - 3.5rem); }
    .glb-img { max-height: calc(100% - 7.5rem); }
    .glb-figure { justify-content: flex-start; padding-bottom: 4rem; }
}

/* ==========================================================================
   15. PROJECT DETAIL PAGE (projets.php)
   ========================================================================== */
.projet-main-modern {
    padding-top: 8rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.projet-hero-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

@media (max-width: 900px) {
    .projet-hero-modern {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

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

.hero-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-text h1 {
    font-family: var(--font-display-section);
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    font-weight: 500;
    line-height: 1.08;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hero-main-image {
    width: 100%;
    height: 480px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
    .hero-main-image {
        height: 300px;
    }
}

.hero-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Detail page grid layout */
.projet-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 5rem;
    margin-bottom: 6rem;
}

@media (max-width: 900px) {
    .projet-content-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
}

.projet-presentation h2 {
    font-family: var(--font-display-section);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.presentation-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.presentation-resultat {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    margin-top: 3rem;
}

.presentation-resultat h3 {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.presentation-resultat p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    position: sticky;
    top: 7rem;
}

.info-card h3 {
    font-family: var(--font-display-section);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

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

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Video Section details */
.projet-video-modern {
    margin-bottom: 6rem;
}

.projet-video-modern h2 {
    font-family: var(--font-display-section);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.video-wrapper {
    width: 100%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    aspect-ratio: auto; 
    display: flex;
    justify-content: center;
    background: #000; 
}

.video-wrapper video {
    width: 100%;
    height: auto; 
    max-height: 85vh; 
    object-fit: contain; 
}

/* Modern Carousel Gallery styling */
.projet-carousel-section {
    margin-bottom: 6rem;
}

.projet-carousel-section h2 {
    font-family: var(--font-display-section);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.carousel-container {
    position: relative;
    width: 100%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 45px rgba(0,0,0,0.4);
}

.carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    align-items: flex-start;
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
    position: relative;
}

.carousel-slide figure {
    width: 100%;
    margin: 0;
    line-height: 0;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(12, 12, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    z-index: 5;
    transition: var(--transition-snappy);
}

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

.carousel-btn.prev { left: 1.5rem; }
.carousel-btn.next { right: 1.5rem; }

.carousel-indicators {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 5;
}

.carousel-indicators .dot {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-snappy);
}

.carousel-indicators .dot.active {
    background: var(--accent-cyan);
    width: 24px;
    border-radius: 10px;
}

.carousel-external-caption {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-style: italic;
    transition: opacity 0.3s ease;
}

/* Reflexive Analysis cards */
.projet-reflexion {
    margin-bottom: 6rem;
}

.reflexion-header {
    margin-bottom: 2.5rem;
}

.reflexion-header h2 {
    font-family: var(--font-display-section);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.reflexion-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Modern Audio Section */
.projet-audio-modern {
    margin-bottom: 5rem;
}

.projet-audio-modern h2 {
    font-family: var(--font-display-section);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.audio-player-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%), var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.2rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.audio-player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-cyan), transparent);
}

.audio-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.audio-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    background: rgba(224, 86, 36, 0.12);
    border: 1px solid rgba(224, 86, 36, 0.25);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.audio-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: audioPulse 1.8s infinite ease-in-out;
}

@keyframes audioPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.3); }
}

.audio-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.audio-waveform-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 38px;
    margin-bottom: 1.8rem;
    opacity: 0.65;
}

.wave-bar {
    width: 4px;
    background: linear-gradient(180deg, var(--accent), var(--accent-cyan));
    border-radius: 3px;
    animation: waveBounce 1.4s ease-in-out infinite alternate;
}

.wave-bar:nth-child(2n) { animation-duration: 0.9s; }
.wave-bar:nth-child(3n) { animation-duration: 1.2s; }
.wave-bar:nth-child(4n) { animation-duration: 0.7s; }
.wave-bar:nth-child(1) { height: 12px; }
.wave-bar:nth-child(2) { height: 24px; }
.wave-bar:nth-child(3) { height: 16px; }
.wave-bar:nth-child(4) { height: 32px; }
.wave-bar:nth-child(5) { height: 20px; }
.wave-bar:nth-child(6) { height: 28px; }
.wave-bar:nth-child(7) { height: 36px; }
.wave-bar:nth-child(8) { height: 22px; }
.wave-bar:nth-child(9) { height: 30px; }
.wave-bar:nth-child(10) { height: 18px; }
.wave-bar:nth-child(11) { height: 34px; }
.wave-bar:nth-child(12) { height: 24px; }
.wave-bar:nth-child(13) { height: 15px; }
.wave-bar:nth-child(14) { height: 26px; }
.wave-bar:nth-child(15) { height: 18px; }
.wave-bar:nth-child(16) { height: 10px; }

@keyframes waveBounce {
    0% { transform: scaleY(0.4); opacity: 0.4; }
    100% { transform: scaleY(1); opacity: 1; }
}

.audio-controls-container audio {
    width: 100%;
    outline: none;
    border-radius: 30px;
    filter: invert(0.92) hue-rotate(180deg);
}

.audio-player-tip {
    margin-top: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
}

.audio-player-tip svg {
    flex-shrink: 0;
    color: var(--accent-cyan);
}

/* ==========================================================================
   REFLEXION BENTO GRID (RETOUR D'EXPÉRIENCE PREMIUM)
   ========================================================================== */
.reflexion-bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.reflexion-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.2rem 2.4rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

/* Grille Bento asymétrique */
.reflexion-card.bento-item-span {
    grid-column: span 7;
    background: linear-gradient(145deg, rgba(22, 22, 38, 0.75) 0%, rgba(14, 14, 23, 0.95) 100%);
}

.reflexion-card.difficultes {
    grid-column: span 5;
    background: linear-gradient(145deg, rgba(28, 22, 16, 0.6) 0%, rgba(14, 14, 23, 0.95) 100%);
}

.reflexion-card.bento-item-highlight {
    grid-column: span 12;
    background: linear-gradient(135deg, rgba(16, 32, 26, 0.65) 0%, rgba(10, 20, 16, 0.85) 50%, rgba(14, 14, 23, 0.95) 100%);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 30px rgba(16, 185, 129, 0.08);
}

@media (max-width: 900px) {
    .reflexion-card.bento-item-span,
    .reflexion-card.difficultes,
    .reflexion-card.bento-item-highlight {
        grid-column: span 12;
    }
}

/* En-tête de la carte avec icône et badge de statut */
.reflexion-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.reflexion-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.reflexion-card:hover .reflexion-icon {
    transform: scale(1.08) rotate(-3deg);
}

.reflexion-card.apprentissages .reflexion-icon {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
}

.reflexion-card.difficultes .reflexion-icon {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}

.reflexion-card.reussites .reflexion-icon {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

/* Pilule tag de statut */
.reflexion-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    backdrop-filter: blur(8px);
}

.tag-indigo {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
}

.tag-amber {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fde68a;
}

.tag-emerald {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #a7f3d0;
}

/* Typographie interne */
.reflexion-card h3 {
    font-family: var(--font-display-section);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: none;
}

.reflexion-card.bento-item-highlight h3 {
    font-size: 1.55rem;
    color: #f0fdf4;
}

.reflexion-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.reflexion-card.bento-item-highlight p {
    font-size: 1.02rem;
    color: #d1fae5;
    max-width: 900px;
}

/* Hover effects */
.reflexion-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.reflexion-card.apprentissages:hover {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(99, 102, 241, 0.12);
}

.reflexion-card.difficultes:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(245, 158, 11, 0.12);
}

.reflexion-card.reussites:hover {
    border-color: rgba(16, 185, 129, 0.55);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 185, 129, 0.18);
}

.projet-footer-back {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.btn-retour {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-snappy);
}

.btn-retour:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(-4px);
}

/* ==========================================================================
   16. REFLEXION PAGE (Editorial Design)
   ========================================================================== */
.reflexion-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12rem 2rem 6rem 2rem;
}

.reflexion-hero {
    margin-bottom: 7rem;
    max-width: 800px;
}

.reflexion-hero h1 {
    font-family: var(--font-display-section), sans-serif;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 1rem 0 2rem 0;
    letter-spacing: -0.03em;
}

.reflexion-hero-subtitle {
    font-family: var(--font-sans), sans-serif;
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.reflexion-editorial-section {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 5rem;
    margin: 5rem 0;
}

.editorial-sidebar {
    position: sticky;
    top: 140px;
    height: max-content;
}

.editorial-num {
    font-family: var(--font-display-section), sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
    line-height: 1;
    margin-bottom: 1rem;
}

.editorial-sidebar h2 {
    font-family: var(--font-display-section), sans-serif;
    font-size: 2.2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.editorial-content p {
    font-family: var(--font-sans), sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
}

.editorial-content h3 {
    font-family: var(--font-display-section), sans-serif;
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem 0;
    color: var(--accent-cyan);
}

.editorial-content code {
    background: rgba(255,255,255,0.06);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.editorial-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 5rem 0;
}

/* Reflection download section (Encart final) */
.reflexion-download {
    max-width: 1200px;
    margin: 6rem auto 6rem;
    padding: 0;
}

.download-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(99, 102, 241, 0.03) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 4rem;
    text-align: center;
}

@media (max-width: 600px) {
    .download-card {
        padding: 2.5rem;
    }
}

.download-card h2 {
    font-family: var(--font-display-section);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.download-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.download-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 992px) {
    .reflexion-editorial-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .editorial-sidebar {
        position: static;
    }
    .reflexion-hero h1 {
        font-size: 2.8rem;
    }
}

/* ==========================================================================
   17. OPTIMISATIONS DE PERFORMANCE
   ========================================================================== */
.projects-section, .creations-section, .about-section {
    content-visibility: auto;
    /* « auto » : le navigateur retient la vraie hauteur une fois la section affichée,
       pour que les ancres du menu tombent au bon endroit */
    contain-intrinsic-size: auto 1000px;
}

/* ==========================================================================
   CORRECTION MOBILE — SECTION COMPÉTENCES
   ========================================================================== */
@media (max-width: 768px) {
    .baffait-row-dropdown {
        max-height: none !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding-top: 1.5rem;
    }

    .baffait-dropdown-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .baffait-row-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    .baffait-row-header .row-tags {
        margin-left: 0 !important;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}

/* ==========================================================================
   CORRECTION RESPONSIVE - TITRES H2 PAGE PROJET
   ========================================================================== */
.projet-presentation h2,
.projet-video-modern h2,
.projet-carousel-section h2,
.reflexion-header h2 {
    font-family: var(--font-display-section);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    section {
        scroll-margin-top: 80px; 
    }

    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto; 
    }

    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }
}

@media (max-width: 768px) {
    footer,
    footer p,
    .contact-section p,
    .projet-footer-back {
        text-align: center !important;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .baffait-container,
    .baffait-row {
        margin: 0 auto !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .baffait-row-header {
        align-items: center !important;
        text-align: center;
        pointer-events: none;
    }

    .baffait-row-header svg, 
    .baffait-row-header .icon-toggle {
        display: none !important;
    }

    .baffait-row-dropdown {
        pointer-events: auto;
    }
}

/* ==========================================================================
   BADGE PROJET EN COURS (WIP)
   ========================================================================== */
.badge-wip {
    background: linear-gradient(45deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.2));
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse-wip 2s infinite;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.badge-wip::before {
    content: "🚧";
    font-size: 0.9rem;
}

/* ==========================================================================
   CAROUSEL — AJUSTEMENT HAUTEUR (50% ÉCRAN) & RESPONSIVE
   ========================================================================== */
.carousel-container {
    max-width: 800px;
    height: 50vh;
    margin: 0 auto;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}

.carousel-track-container {
    height: 100%;
}

.carousel-slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    max-height: 50vh;
    object-fit: contain;
}

@media (max-height: 500px) {
    .carousel-container {
        height: 60vh;
    }
}

/* ==========================================================================
   PAGE DE CONFIRMATION (FEEDBACK FORMULAIRE)
   ========================================================================== */
.body-feedback {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-primary);
}

.feedback-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin-top: 80px;
}

.feedback-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 3rem 2rem;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.feedback-icon {
    margin-bottom: 1.5rem;
    display: inline-flex;
    padding: 1rem;
    background: var(--accent-glow);
    border-radius: 50%;
}

.feedback-card h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
    font-size: 2.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.feedback-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn-feedback-home {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-feedback-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    background: #4f46e5;
}

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

/* ==========================================================================
   REFONTE : ajouts pour les données issues du back-office
   ========================================================================== */
/* Textes Markdown : les paragraphes générés gardent l'espacement des anciens <p> */
.md-text > :first-child { margin-top: 0; }
.md-text > :last-child { margin-bottom: 0; }
.md-text p + p, .md-text ul, .md-text ol { margin-top: .75em; }
.md-text ul, .md-text ol { padding-left: 1.25em; }
.md-text a { color: var(--accent-light, #38bdf8); text-decoration: underline; }

/* Page 404 */
.page-404 { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8rem 1.5rem 4rem; gap: 1.5rem; }
.page-404 .section-title { margin: 0; }

/* Pied de page (anciens styles en ligne) */
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.footer-links { font-size: .85rem; color: var(--text-muted); }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a.footer-legal { text-decoration: underline; }
.footer-sep { margin: 0 .5rem; opacity: .4; }
/* Formulaire de contact (anciens styles en ligne) */
.contact-info-side .about-p { margin-bottom: 1rem; }
.form-honeypot { display: none !important; position: absolute; left: -9999px; }
.form-rgpd-notice { font-size: .8rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.5; }
.form-rgpd-notice a { color: var(--accent-light, #38bdf8); text-decoration: underline; }
/* Bouton de lien externe d'un projet (ancien style en ligne) */
.info-card .btn-lien { display: block; text-align: center; width: 100%; box-sizing: border-box; margin-top: 1.5rem; }
/* Cartes de projets (anciens styles en ligne) */
.project-card-full-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.project-card-image video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ==========================================================================
   MENTIONS LÉGALES (anciens styles en ligne de mentions-legales.php)
   ========================================================================== */
.legal-page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 8rem 1.5rem 5rem;
    color: var(--text-main, #e4e4e7);
    line-height: 1.7;
}

.legal-header {
    margin-bottom: 3.5rem;
    text-align: left;
}

.legal-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 30%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-date {
    font-size: 0.9rem;
    color: var(--text-muted, #71717a);
}

.legal-card {
    background: rgba(18, 18, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s ease;
}

.legal-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.legal-card h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-card h2 span.icon {
    font-size: 1.25rem;
}

.legal-card p, .legal-card ul {
    font-size: 0.95rem;
    color: #d4d4d8;
    margin-bottom: 1rem;
}

.legal-card ul {
    padding-left: 1.5rem;
    list-style: disc;
}

.legal-card li {
    margin-bottom: 0.5rem;
}

.legal-card a {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-card a:hover {
    color: #93c5fd;
}

.legal-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.legal-btn-back:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(-3px);
}

.badge-rgpd-check {
    display: inline-block;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

/* Formulaire de contact : erreurs (J5) */
.form-alert { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .4); color: #fca5a5; padding: .75rem 1rem; border-radius: .75rem; margin-bottom: 1.25rem; font-size: .9rem; }
.form-error { color: #fca5a5; font-size: .8rem; margin: .4rem 0 0; }
.form-input[aria-invalid="true"] { border-color: rgba(239, 68, 68, .6); }
/* Coordonnées protégées : discrètes tant que le JavaScript ne les a pas reconstituées */
.protected-link:not(.is-revealed) .contact-method-value { font-size: .75rem; opacity: .7; }
.legal-card .protected-inline:not(.is-revealed) { font-style: italic; opacity: .8; }
/* Page de confirmation */
.page-merci { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8rem 1.5rem 4rem; gap: 1.5rem; }
.page-merci .section-title { margin: 0; }
.contact-page { padding-top: 6rem; }

/* ==========================================================================
   RETOUCHES AVANT MISE EN LIGNE
   ========================================================================== */
/* Les contrôles de formulaire n'héritent pas de la police par défaut (Arial) */
button, input, select, textarea { font-family: inherit; }
.btn-submit, .filter-btn, .btn-primary, .btn-secondary, .btn-retour, .hamburger { font-family: var(--font-sans); }

/* Accroche du hero : le gras du Markdown reprend le style « mot accent » */
.hero-tagline > :last-child { margin-bottom: 0; }
.hero-tagline strong { color: var(--accent-cyan); font-weight: 600; }
.hero-label { margin-bottom: 1rem; }

/* Réseaux sociaux du hero en icônes */
.hero-social-links a { display: inline-flex; padding: .35rem; border-radius: 50%; }
.hero-social-links svg { display: block; }

/* Crédit photo du portrait : discret, en bas à droite */
.bento-portrait { position: relative; }
.photo-credit {
    position: absolute;
    bottom: .9rem;
    right: .9rem;
    z-index: 3;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: rgba(7, 7, 11, 0.45);
    color: rgba(255, 255, 255, 0.6);
    font-size: .68rem;
    letter-spacing: .02em;
    text-decoration: none;
    transition: var(--transition-snappy);
}
.photo-credit:hover { color: var(--text-primary); background: rgba(7, 7, 11, 0.75); }

/* ==========================================================================
   PIED DE PAGE FIXE + LIENS DE FIN DE PAGE
   ========================================================================== */
:root { --footer-h: 3.25rem; }
body { padding-bottom: var(--footer-h); }

.page-end-links {
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    font-size: .85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}
.page-end-links a { color: var(--text-muted); text-decoration: none; transition: var(--transition-snappy); }
.page-end-links a:hover { color: var(--accent-cyan); }
.page-end-links a.footer-legal { text-decoration: underline; text-underline-offset: 3px; }

.site-footer-fixed {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    height: var(--footer-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 max(1.25rem, 5vw) env(safe-area-inset-bottom, 0);
    background: rgba(5, 5, 8, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color);
    text-align: left;
}
.site-footer-fixed p { margin: 0; font-size: .8rem; color: var(--text-muted); }
.footer-social { display: flex; gap: .5rem; }
.footer-social a {
    display: inline-flex;
    padding: .4rem;
    border-radius: 50%;
    color: var(--text-muted);
    transition: var(--transition-snappy);
}
.footer-social a:hover { color: var(--accent-cyan); background: rgba(255, 255, 255, 0.05); }
@media (max-width: 480px) {
    .site-footer-fixed p { font-size: .7rem; }
}

/* ==========================================================================
   CAPSULE « DISPONIBILITÉ » DU HERO ET SA FENÊTRE
   ========================================================================== */
.btn-dispo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.6rem;
    border-radius: 50px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-snappy);
}
.btn-dispo:hover { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.6); transform: translateY(-2px); }
.btn-dispo.is-static { cursor: default; }
.btn-dispo.is-static:hover { transform: none; }

.dispo-dialog {
    /* La remise à zéro globale des marges empêche le centrage natif du <dialog> */
    position: fixed;
    inset: 0;
    margin: auto;
    height: fit-content;
    width: min(34rem, calc(100vw - 2rem));
    max-height: calc(100vh - 4rem);
    padding: 2.25rem 2rem 2rem;
    border: 1px solid var(--border-color-hover);
    border-radius: var(--border-radius-lg);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.dispo-dialog::backdrop { background: rgba(5, 5, 8, 0.75); backdrop-filter: blur(6px); }
.dispo-dialog-close-form { position: absolute; top: .9rem; right: .9rem; margin: 0; }
.dispo-dialog-close {
    display: flex; align-items: center; justify-content: center;
    width: 2.4rem; height: 2.4rem; border-radius: 50%;
    border: 1px solid var(--border-color-hover); background: transparent; color: var(--text-primary); cursor: pointer;
}
.dispo-dialog-close:hover { border-color: var(--accent); color: var(--accent-cyan); }
.dispo-dialog-label {
    display: flex; align-items: center; gap: .5rem;
    margin: 0 0 .5rem; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #4ade80;
}
.dispo-dialog-title { font-size: clamp(1.3rem, 3vw, 1.7rem); color: var(--text-primary); margin: 0 2.5rem 1rem 0; }
.dispo-dialog-body { line-height: 1.65; }
.dispo-dialog-cta { display: inline-block; margin-top: 1.5rem; }
