/* ============================================
   PORTFOLIO - STYLE PRINCIPAL
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === VARIABLES - DARK MODE (défaut) === */
:root,
:root[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --accent: #b19cd9;
    --accent-hover: #9d84c9;
    --accent-glow: rgba(177, 156, 217, 0.4);
    --card-bg: rgba(26, 26, 26, 0.8);
    --card-border: rgba(177, 156, 217, 0.2);
    --border: rgba(177, 156, 217, 0.3);
    --nav-bg: rgba(10, 10, 10, 0.85);
    --glass-bg: rgba(26, 26, 26, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.5);
    --stars-display: block;
    --light-pattern-display: none;
    --footer-bg: rgba(10, 10, 10, 0.9);
}

/* === VARIABLES - LIGHT MODE === */
:root[data-theme="light"] {
    --bg-primary: #f8f8fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0eef5;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888aa;
    --accent: #8b6fc0;
    --accent-hover: #7a5fb0;
    --accent-glow: rgba(139, 111, 192, 0.3);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(139, 111, 192, 0.2);
    --border: rgba(139, 111, 192, 0.3);
    --nav-bg: rgba(248, 248, 252, 0.9);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(139, 111, 192, 0.15);
    --shadow: rgba(139, 111, 192, 0.15);
    --stars-display: none;
    --light-pattern-display: block;
    --footer-bg: rgba(248, 248, 252, 0.95);
}

/* === BASE TYPOGRAPHY === */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    cursor: none;
}

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

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

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

/* === LOADER === */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 70px;
    height: 70px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-initials {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    animation: pulse-text 1.5s ease-in-out infinite;
}

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

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* === FOND ÉTOILÉ (Dark mode) === */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    display: var(--stars-display);
    background: var(--bg-primary);
}

.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.stars-small {
    background-image:
        radial-gradient(1px 1px at 50px 100px, #fff, transparent),
        radial-gradient(1px 1px at 150px 250px, #fff, transparent),
        radial-gradient(1px 1px at 300px 50px, #fff, transparent),
        radial-gradient(1px 1px at 400px 300px, #fff, transparent),
        radial-gradient(1px 1px at 80px 400px, #fff, transparent),
        radial-gradient(1px 1px at 200px 150px, #fff, transparent),
        radial-gradient(1px 1px at 500px 200px, #fff, transparent),
        radial-gradient(1px 1px at 350px 400px, #fff, transparent),
        radial-gradient(1px 1px at 100px 300px, #fff, transparent),
        radial-gradient(1px 1px at 450px 100px, #fff, transparent);
    background-size: 550px 500px;
    animation: twinkle 4s ease-in-out infinite alternate;
}

.stars-medium {
    background-image:
        radial-gradient(1.5px 1.5px at 120px 200px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 280px 350px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 420px 120px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 60px 450px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 380px 280px, rgba(255,255,255,0.7), transparent);
    background-size: 500px 500px;
    animation: twinkle 6s ease-in-out infinite alternate-reverse;
}

.stars-large {
    background-image:
        radial-gradient(2px 2px at 200px 300px, rgba(177,156,217,0.6), transparent),
        radial-gradient(2px 2px at 400px 80px, rgba(177,156,217,0.5), transparent),
        radial-gradient(2px 2px at 100px 180px, rgba(177,156,217,0.4), transparent);
    background-size: 600px 400px;
    animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* === CURSEUR PERSONNALISÉ === */
.custom-cursor {
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.3s;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, background-color 0.3s;
    opacity: 0;
}

.custom-cursor.active {
    transform: translate(-50%, -50%) scale(1.5);
    border-color: var(--accent-hover);
}

/* === SCROLL PROGRESS BAR === */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    z-index: 10001;
    width: 0%;
    transition: width 0.1s linear;
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: transform 0.3s ease, background-color 0.4s ease;
}

.navbar.hidden {
    transform: translateY(-100%);
}

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

.nav-logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent) !important;
    letter-spacing: 2px;
}

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

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary) !important;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary) !important;
    background: var(--glass-bg);
}

.nav-link.active {
    color: #fff !important;
    background: var(--accent);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme toggle */
.theme-toggle {
    height: 42px;
    border-radius: 21px;
    border: 2px solid var(--border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.3s ease;
    padding: 8px 12px;
    white-space: nowrap;
}

.theme-toggle:hover {
    background: var(--glass-bg);
    border-color: var(--accent);
}

.theme-icon {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.theme-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dark mode (default): show moon + "Obscur" */
.theme-icon.sun { display: none; }
.theme-icon.moon { display: block; }
.theme-label-light { display: none; }
.theme-label-dark { display: inline; }

/* Light mode: show sun + "Clair" */
[data-theme="light"] .theme-icon.sun { display: block; }
[data-theme="light"] .theme-icon.moon { display: none; }
[data-theme="light"] .theme-label-light { display: inline; }
[data-theme="light"] .theme-label-dark { display: none; }

/* Burger menu */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.burger-line {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

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

/* Mobile menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 80px 2rem 2rem;
    gap: 0.5rem;
    transition: right 0.3s ease;
    border-left: 1px solid var(--glass-border);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .nav-link {
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
}

/* === MAIN CONTENT === */
.main-content {
    min-height: 100vh;
    padding-top: 65px;
}

/* === SECTIONS === */
.section {
    padding: 5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin: 1rem auto 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* === HERO SECTION === */
.hero {
    min-height: calc(100vh - 65px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-typed {
    display: inline;
}

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

.animated-gradient {
    background: linear-gradient(270deg, var(--accent), #e100ff, var(--accent));
    background-size: 600% 600%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-animation 6s ease infinite;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff !important;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--accent) !important;
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: #fff !important;
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* === CARDS (Glassmorphism) === */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(177,156,217,0.05), transparent);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
    border-color: var(--accent);
}

/* === GRID LAYOUTS === */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* === BADGES / TAGS === */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--glass-bg);
    color: var(--accent);
    border: 1px solid var(--border);
}

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

/* === PROJECT CARDS === */
.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 0 20px 50px var(--shadow);
    border-color: var(--accent);
}

.project-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.project-card-body {
    padding: 1.5rem;
}

.project-card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

/* === FILTER BUTTONS === */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* === COMPETENCES GRID === */
.competence-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    text-align: center;
}

.competence-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px var(--shadow);
}

.competence-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.competence-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.competence-level {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === TIMELINE === */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

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

/* === STAGE CARDS === */
.stage-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s ease;
}

.stage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
    border-color: var(--accent);
}

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

.stage-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
}

.stage-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.stage-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.stage-missions {
    list-style: none;
    padding: 0;
}

.stage-missions li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stage-missions li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* === PDF VIEWER === */
.pdf-viewer {
    width: 100%;
    height: 600px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.pdf-viewer iframe,
.pdf-viewer object {
    width: 100%;
    height: 100%;
    border: none;
}

/* === CONTACT FORM === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.contact-info-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-checkbox input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

/* Alert messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.alert-error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
}

/* Google Maps */
.map-container {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    margin-top: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 350px;
    border: none;
}

/* === VEILLE - CAROUSEL === */
.carousel-container {
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    animation: carousel-scroll 30s linear infinite;
    width: max-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-card {
    min-width: 320px;
    max-width: 320px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.carousel-card-source {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.carousel-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.carousel-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.carousel-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@keyframes carousel-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === BTS SIO === */
.bts-header {
    text-align: center;
    margin-bottom: 3rem;
}

.bts-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.bts-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.speciality-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.speciality-card.highlight {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    position: relative;
}

.speciality-card.highlight::after {
    content: 'Ma spécialité';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.speciality-card:hover {
    transform: translateY(-5px);
}

/* === EPREUVES === */
.epreuve-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s ease;
}

.epreuve-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
    border-color: var(--accent);
}

.epreuve-code {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.epreuve-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* === MENTIONS LEGALES === */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* === BACK TO TOP === */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* === FOOTER === */
.site-footer {
    background: var(--footer-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary) !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--accent) !important;
    transform: translateY(-2px);
}

.footer-links svg {
    width: 24px;
    height: 24px;
}

.footer-signature {
    margin: 1.5rem 0;
}

.signature-svg {
    width: 150px;
    height: 40px;
    margin: 0 auto;
    display: block;
}

.signature-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: draw-signature 3s ease forwards;
    animation-delay: 1s;
}

@keyframes draw-signature {
    to { stroke-dashoffset: 0; }
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted) !important;
    margin-bottom: 0.5rem;
}

.footer-legal {
    font-size: 0.8rem;
    color: var(--text-muted) !important;
}

.footer-legal:hover {
    color: var(--accent) !important;
}

/* === DECRYPTION TEXT EFFECT === */
.decrypt-text {
    font-family: monospace;
    letter-spacing: 2px;
}

/* === PAGE TRANSITIONS === */
.page-transition {
    animation: fadeInPage 0.5s ease;
}

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

/* === RESPONSIVE === */
@media screen and (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    html { font-size: 15px; }

    .nav-links {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .bts-logos {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Disable custom cursor on mobile */
    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }

    body {
        cursor: auto;
    }
}

@media screen and (max-width: 480px) {
    html { font-size: 14px; }

    .hero-title {
        font-size: 2rem;
    }

    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }

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

    .section {
        padding: 2.5rem 1rem;
    }
}

/* === SCROLL SNAP (mobile) === */
@media screen and (max-width: 768px) {
    .snap-container {
        scroll-snap-type: y proximity;
    }

    .snap-section {
        scroll-snap-align: start;
    }
}

/* === LAZY LOADING === */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded,
img.loaded {
    opacity: 1;
}

/* === CERTIFICATIONS PLACEHOLDER === */
.certif-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
}

.certif-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* === VEILLE INFO GRID === */
.veille-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.veille-info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.veille-info-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.veille-info-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* === PROFIL PHOTO === */
.profil-photo-wrapper {
    text-align: center;
    margin-bottom: 2rem;
}

.profil-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.profil-photo-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 4px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 3rem;
    font-weight: 800;
    box-shadow: 0 0 30px var(--accent-glow);
}

/* === PROFIL ABOUT === */
.profil-about {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

@media screen and (max-width: 768px) {
    .profil-about {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profil-photo-placeholder {
        margin: 0 auto 1rem;
    }
}

.profil-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* === EPREUVE LINKS === */
.epreuve-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* === STAGES PAGE === */
.stage-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.stage-block {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s ease;
}

.stage-block:hover {
    border-color: var(--accent);
    box-shadow: 0 15px 40px var(--shadow);
}

.stage-block-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stage-block-logo-wrap {
    flex-shrink: 0;
}

.stage-block-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 16px;
}

.stage-block-logo-placeholder {
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 800;
    border: 1px solid var(--glass-border);
}

.stage-block-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stage-block-subtitle {
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.stage-block-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.stage-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stage-meta-item svg {
    color: var(--accent);
    flex-shrink: 0;
}

.stage-badge-duree {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.stage-block-description,
.stage-block-contexte {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.stage-block-contexte {
    font-style: italic;
    color: var(--text-muted);
}

/* Stage tabs */
.stage-tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.stage-tab-btn {
    padding: 0.7rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.stage-tab-btn:hover {
    color: var(--text-primary);
}

.stage-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.stage-tab-content {
    display: none;
    animation: fadeInTab 0.3s ease;
}

.stage-tab-content.active {
    display: block;
}

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

.stage-missions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stage-missions-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--glass-border);
}

.stage-missions-list li:last-child {
    border-bottom: none;
}

.stage-missions-list li svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.stage-tab-empty {
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
    text-align: center;
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
}

.stage-bilan-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    padding: 1rem 0;
}

@media screen and (max-width: 768px) {
    .stage-block {
        padding: 1.5rem;
    }

    .stage-block-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .stage-block-meta {
        justify-content: center;
    }

    .stage-tabs-nav {
        justify-content: center;
    }

    .stage-tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* === HIDDEN UTILITY === */
.hidden {
    display: none !important;
}
