/**
 * CV & Portfolio Numérique — Style Moderne & Tech
 * Dark Mode Électrique, Glassmorphism, Timeline & Micro-interactions
 */

:root,
:root[data-theme="dark"] {
    --bg-dark: #070913;
    --bg-surface: #1E293B;
    --bg-card: rgba(50, 72, 114, 0.92);
    --bg-card-hover: rgba(64, 90, 140, 0.96);
    --border-subtle: rgba(255, 255, 255, 0.18);
    --border-highlight: rgba(6, 182, 212, 0.60);

    --primary: #06B6D4;
    --primary-glow: rgba(6, 182, 212, 0.4);
    --secondary: #6366F1;
    --accent: #8B5CF6;

    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    --navbar-bg: rgba(20, 30, 52, 0.88);
    --navbar-border: rgba(255, 255, 255, 0.15);

    --body-bg-gradient:
        radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.10) 0%, transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);

    --input-bg: rgba(20, 30, 52, 0.65);
    --input-border: rgba(255, 255, 255, 0.18);

    --tag-bg: rgba(255, 255, 255, 0.08);
    --tag-border: rgba(255, 255, 255, 0.15);
    --tag-color: #E2E8F0;

    --badge-bg: rgba(255, 255, 255, 0.08);
    --badge-border: rgba(255, 255, 255, 0.15);
    --badge-color: #E2E8F0;

    --item-bg: rgba(255, 255, 255, 0.06);
    --item-border: rgba(255, 255, 255, 0.09);
    --item-hover-bg: rgba(255, 255, 255, 0.12);

    --shadow-card: 0 12px 35px -10px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
    --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.2);
    --modal-bg: #1E283D;
    --modal-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.15) inset;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="light"] {
    --bg-dark: #F1F5F9;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8FAFC;
    --border-subtle: #E2E8F0;
    --border-highlight: rgba(8, 145, 178, 0.50);

    --primary: #0891B2;
    --primary-glow: rgba(8, 145, 178, 0.25);
    --secondary: #4F46E5;
    --accent: #7C3AED;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;

    --success: #059669;
    --warning: #D97706;
    --danger: #DC2626;
    --info: #2563EB;

    --navbar-bg: rgba(255, 255, 255, 0.90);
    --navbar-border: #E2E8F0;

    --body-bg-gradient:
        radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);

    --input-bg: #FFFFFF;
    --input-border: #CBD5E1;

    --tag-bg: #F1F5F9;
    --tag-border: #E2E8F0;
    --tag-color: #334155;

    --badge-bg: #F1F5F9;
    --badge-border: #E2E8F0;
    --badge-color: #334155;

    --item-bg: #F8FAFC;
    --item-border: #E2E8F0;
    --item-hover-bg: #F1F5F9;

    --shadow-card: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 0 25px rgba(8, 145, 178, 0.12);
    --modal-bg: #FFFFFF;
    --modal-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
}

/* -------------------------------------------------------------------------- */
/* Reset & Base                                                               */
/* -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: var(--body-bg-gradient);
    background-attachment: fixed;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #38BDF8;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* -------------------------------------------------------------------------- */
/* Navigation Bar (Glassmorphic Header)                                       */
/* -------------------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navbar-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--navbar-border);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.brand-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    position: relative;
    padding: 6px 0;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Bouton Bascule Thème Clair / Sombre */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.theme-toggle-icon {
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

:root[data-theme="dark"] .theme-toggle-btn .icon-moon {
    display: none;
}

:root[data-theme="dark"] .theme-toggle-btn .icon-sun {
    display: inline-flex;
}

:root[data-theme="light"] .theme-toggle-btn .icon-sun {
    display: none;
}

:root[data-theme="light"] .theme-toggle-btn .icon-moon {
    display: inline-flex;
}

.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-admin:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* -------------------------------------------------------------------------- */
/* Bouton Bascule Thème Flottant en Coin de Page                              */
/* -------------------------------------------------------------------------- */
.corner-theme-toggle {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--navbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-fast);
}

.corner-theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.25);
}

:root[data-theme="dark"] .corner-theme-toggle .icon-moon {
    display: none;
}

:root[data-theme="dark"] .corner-theme-toggle .icon-sun {
    display: inline-flex;
}

:root[data-theme="light"] .corner-theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="light"] .corner-theme-toggle .icon-moon {
    display: inline-flex;
}

@media (max-width: 640px) {
    .corner-theme-toggle {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 0.78rem;
    }
}

/* -------------------------------------------------------------------------- */
/* Menu sous le bloc "Profil et CV" + Moteur de recherche à droite            */
/* -------------------------------------------------------------------------- */
.main-subnav-section {
    position: sticky;
    top: 14px;
    z-index: 95;
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 35px;
    box-shadow: none;
    pointer-events: none;
    transition: all var(--transition);
}

.main-subnav-section .container {
    pointer-events: auto;
}

.subnav-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 8px 16px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    transition: var(--transition);
}

.subnav-container:hover {
    border-color: var(--border-highlight);
}

.subnav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.subnav-link svg {
    flex-shrink: 0;
}

.subnav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--border-subtle);
    text-decoration: none;
}

.subnav-link-external svg:last-child {
    transition: transform var(--transition-fast);
}

.subnav-link-external:hover svg:last-child {
    transform: translate(2px, -2px);
    color: var(--primary);
}

.subnav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
    text-decoration: none;
}

.subnav-search {
    flex-grow: 0;
    flex-shrink: 0;
    width: 185px;
    max-width: 200px;
    margin-left: auto;
}

.subnav-search .search-input-group {
    position: relative;
    width: 100%;
}

.subnav-search .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.subnav-search .search-input {
    width: 100%;
    padding: 6px 12px 6px 30px;
    border-radius: var(--radius-full);
    background: var(--input-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.80rem;
    outline: none;
    transition: all var(--transition-fast);
}

.subnav-search .search-input::placeholder {
    font-size: 0.80rem;
    color: var(--text-muted);
}

.subnav-search .search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

/* Par défaut (Desktop) : masquer les composants mobiles et afficher le conteneur en direct */
.subnav-mobile-bar,
.subnav-link-contact-mobile {
    display: none !important;
}

.subnav-collapse {
    display: contents;
}

@media (max-width: 860px) {
    .main-subnav-section {
        position: sticky;
        top: 52px;
        z-index: 99;
        margin-bottom: 20px;
        pointer-events: auto;
    }

    .subnav-container {
        padding: 6px 14px;
        border-radius: var(--radius-lg);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Barre supérieure compacte toujours visible sur mobile */
    .subnav-mobile-bar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        min-height: 44px;
        width: 100%;
        user-select: none;
    }

    .subnav-mobile-current {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-family: var(--font-heading);
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--text-primary);
        background: transparent;
        border: none;
        padding: 6px 10px 6px 4px;
        margin: 0;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all var(--transition-fast);
        -webkit-tap-highlight-color: transparent;
        text-align: left;
    }

    .subnav-mobile-current:hover,
    .subnav-mobile-current:focus-visible {
        background: rgba(255, 255, 255, 0.08);
        color: var(--primary);
    }

    .subnav-current-icon {
        display: inline-flex;
        align-items: center;
        color: var(--primary);
        flex-shrink: 0;
    }

    .subnav-current-label {
        letter-spacing: -0.01em;
    }

    .subnav-current-chevron {
        display: inline-flex;
        align-items: center;
        color: var(--text-muted);
        transition: transform 0.25s ease, color 0.2s ease;
        margin-left: 2px;
    }

    .subnav-container.is-open .subnav-current-chevron {
        transform: rotate(180deg);
        color: var(--primary);
    }

    .subnav-mobile-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .subnav-mobile-btn {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-subtle);
        color: var(--text-secondary);
        width: 38px;
        height: 38px;
        border-radius: var(--radius-full);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all var(--transition-fast);
        padding: 0;
    }

    .subnav-mobile-btn:hover,
    .subnav-mobile-btn:active,
    .subnav-mobile-btn.active {
        background: rgba(6, 182, 212, 0.15);
        color: var(--primary);
        border-color: rgba(6, 182, 212, 0.35);
    }

    /* Icône hamburger animée */
    .hamburger-box {
        width: 18px;
        height: 14px;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background-color: currentColor;
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.2s ease;
        transform-origin: center;
    }

    /* Animation quand le menu est ouvert */
    .subnav-container.is-open .hamburger-line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .subnav-container.is-open .hamburger-line:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .subnav-container.is-open .hamburger-line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Contenu pliable du menu */
    .subnav-collapse {
        display: none !important;
        flex-direction: column;
        gap: 12px;
        padding-top: 12px;
        margin-top: 6px;
        border-top: 1px solid var(--border-subtle);
        width: 100%;
    }

    .subnav-container.is-open .subnav-collapse,
    .subnav-container.search-only .subnav-collapse {
        display: flex !important;
        animation: subnavFadeSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .subnav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .subnav-container.search-only .subnav-links {
        display: none !important;
    }

    .subnav-link-contact-mobile {
        display: block !important;
    }

    .subnav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 14px;
        min-height: 44px;
        border-radius: var(--radius-md);
        font-size: 0.92rem;
        font-weight: 600;
        width: 100%;
        background: transparent;
        transition: all var(--transition-fast);
        border: 1px solid transparent;
    }

    .subnav-link:hover,
    .subnav-link:active {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-primary);
    }

    .subnav-link.active {
        background: rgba(6, 182, 212, 0.15);
        color: var(--primary);
        border-color: rgba(6, 182, 212, 0.3);
    }

    .subnav-link svg {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
    }

    .subnav-link-external {
        justify-content: space-between;
    }

    .subnav-link-external span {
        flex-grow: 1;
    }

    /* Moteur de recherche dans le menu mobile */
    .subnav-search {
        width: 100%;
        margin: 4px 0 0 0;
        max-width: 100%;
    }

    .subnav-search .search-input {
        width: 100%;
        height: 42px;
        font-size: 0.92rem;
        padding: 8px 14px 8px 38px;
        border-radius: var(--radius-md);
    }
}

:root[data-theme="light"] .subnav-mobile-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

:root[data-theme="light"] .subnav-mobile-btn:hover,
:root[data-theme="light"] .subnav-mobile-btn:active,
:root[data-theme="light"] .subnav-mobile-btn.active {
    background: rgba(6, 182, 212, 0.12);
    color: #0284c7;
    border-color: #0284c7;
}

:root[data-theme="light"] .subnav-mobile-current {
    color: #0f172a;
}

:root[data-theme="light"] .subnav-mobile-current:hover,
:root[data-theme="light"] .subnav-mobile-current:focus-visible {
    background: rgba(0, 0, 0, 0.04);
}

/* -------------------------------------------------------------------------- */
/* Hero / Header Section & Accordéon Compact pour Pages Secondaires           */
/* -------------------------------------------------------------------------- */
.hero-section {
    padding: 35px 0 20px;
    position: relative;
}

.hero-section-compact {
    padding: 25px 0 15px;
}

/* Badge de Localisation Géographique (En haut à droite du bloc) */
.hero-location-badge {
    position: absolute;
    top: 24px;
    right: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
    z-index: 2;
}

.hero-location-badge:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.hero-location-badge svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* 1. Mode Complet (Parcours / index.php)                                     */
/* -------------------------------------------------------------------------- */
.hero-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 45px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.hero-top-row {
    display: flex;
    align-items: center;
    gap: 28px;
    width: 100%;
    padding-right: 180px;
    /* Espace réservé pour la localisation en haut à droite */
}

.avatar-wrapper {
    position: relative;
    width: 125px;
    height: 125px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-surface);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E293B, #0F172A);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--primary);
}

.hero-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-identity h1 {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.15;
}

/* Accroche mise en valeur (comme à l'origine) */
.hero-headline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin: 4px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    line-height: 1.4;
}

.hero-headline svg {
    color: var(--primary);
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.45));
}

/* Description en toute la largeur immédiatement sous l'accroche */
.hero-bio {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.75;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    padding-top: 4px;
}

/* -------------------------------------------------------------------------- */
/* 2. Mode Accordéon Compact (Pages secondaires)                              */
/* -------------------------------------------------------------------------- */
.hero-card-compact {
    padding: 22px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.hero-compact-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.avatar-compact {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.avatar-compact img,
.avatar-compact .avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
}

.hero-compact-titles h1 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 2px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-compact-titles .compact-tagline {
    font-size: 1.05rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    line-height: 1.35;
}

.hero-compact-titles .compact-tagline svg {
    color: var(--primary);
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.35));
}

.hero-compact-location {
    position: static;
    font-size: 0.82rem;
    padding: 5px 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.profile-accordion-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: var(--radius-full);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-accordion-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.profile-accordion-toggle.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.profile-accordion-toggle .accordion-arrow {
    transition: transform 0.25s ease;
}

.profile-accordion-toggle.active .accordion-arrow {
    transform: rotate(180deg);
}

.profile-accordion-content {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 0;
    width: 100%;
    animation: fadeInAccordion 0.3s ease;
}

.profile-accordion-bio {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.7;
    margin: 0;
    width: 100%;
}

.hero-compact-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.hero-compact-btns-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-compact-toggle-bottom {
    margin-left: auto;
    flex-shrink: 0;
}

.btn-compact {
    padding: 7px 14px;
    font-size: 0.82rem;
    gap: 6px;
}

.social-btn-compact {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

@keyframes fadeInAccordion {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.45);
    color: #fff;
}

.btn-secondary {
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    color: var(--primary);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.social-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

/* -------------------------------------------------------------------------- */
/* Barre de Recherche & Filtres Rapides                                      */
/* -------------------------------------------------------------------------- */
.search-bar-wrapper {
    margin: 30px 0 50px;
}

.search-input-group {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    background: var(--input-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.25);
}

/* -------------------------------------------------------------------------- */
/* Sections Communes                                                          */
/* -------------------------------------------------------------------------- */
.section {
    padding: 40px 0 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title-wrap h2 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-wrap p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: var(--badge-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
    border-color: var(--primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(99, 102, 241, 0.18));
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.filter-btn .badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 2px 7px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
}

:root[data-theme="light"] .filter-btn .badge-count {
    background: rgba(0, 0, 0, 0.07);
}

.filter-btn.active .badge-count {
    background: var(--primary);
    color: #ffffff;
}

/* -------------------------------------------------------------------------- */
/* Timeline Interactive (Expériences, Formations, Certifications)             */
/* -------------------------------------------------------------------------- */
.timeline {
    position: relative;
    padding: 20px 0 20px 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 70%, transparent 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    transition: var(--transition);
}

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

.timeline-node {
    position: absolute;
    left: -30px;
    top: 26px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 3px solid var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    z-index: 2;
    transition: var(--transition);
}

.timeline-item:hover .timeline-node {
    transform: scale(1.25);
    border-color: #fff;
    background: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
}

.timeline-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.timeline-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateX(6px);
}

.timeline-card-header,
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 10px;
}

.timeline-card-main {
    flex: 1;
    min-width: 0;
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 6px;
}

.timeline-org-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.timeline-org {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.timeline-location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--text-muted);
}

.timeline-location svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.timeline-card-right {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.timeline-date-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--badge-color);
    background: var(--badge-bg);
    border: 1px solid var(--badge-border);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin: 2px 0 14px 0;
    width: fit-content;
    line-height: 1.4;
}

.timeline-date-row svg {
    color: var(--primary);
    flex-shrink: 0;
}

.timeline-date-row .date-validity,
.modal-project-date-pill .date-validity {
    color: #10B981;
    font-weight: 600;
}

:root[data-theme="light"] .timeline-date-row .date-validity,
:root[data-theme="light"] .modal-project-date-pill .date-validity {
    color: #047857;
}

.timeline-date,
.timeline-dates {
    font-size: 0.82rem;
    color: var(--badge-color);
    background: var(--badge-bg);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--badge-border);
    white-space: nowrap;
    display: inline-block;
}

.timeline-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.type-job,
.badge-job {
    background: rgba(6, 182, 212, 0.15);
    color: #38BDF8;
    border: 1.5px solid rgba(56, 189, 248, 0.45);
}

.type-education,
.badge-education {
    background: rgba(99, 102, 241, 0.15);
    color: #A5B4FC;
    border: 1.5px solid rgba(165, 180, 252, 0.45);
}

.type-certification,
.badge-certification,
.badge-cert {
    background: rgba(16, 185, 129, 0.15);
    color: #6EE7B7;
    border: 1.5px solid rgba(110, 231, 183, 0.45);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 18px;
}

/* Paragraphes dans toutes les descriptions front office */
.timeline-desc p,
.hero-bio p,
.project-desc p,
.skill-desc p,
.watch-card-desc p,
.watch-sources-body p,
.modal-project-desc p,
.modal-short-desc p,
.modal-detailed-desc p,
.modal-skill-desc p,
.modal-skill-header p,
.modal-reading-summary p,
.mooc-notes p,
.reading-summary p {
    margin-bottom: 0.6em;
}

.timeline-desc p:last-child,
.hero-bio p:last-child,
.project-desc p:last-child,
.skill-desc p:last-child,
.watch-card-desc p:last-child,
.watch-sources-body p:last-child,
.modal-project-desc p:last-child,
.modal-short-desc p:last-child,
.modal-detailed-desc p:last-child,
.modal-skill-desc p:last-child,
.modal-skill-header p:last-child,
.modal-reading-summary p:last-child,
.mooc-notes p:last-child,
.reading-summary p:last-child {
    margin-bottom: 0;
}

/* Listes à puces (ul) dans toutes les descriptions front office */
.timeline-desc ul,
.hero-bio ul,
.project-desc ul,
.skill-desc ul,
.watch-card-desc ul,
.watch-sources-body ul,
.modal-project-desc ul,
.modal-short-desc ul,
.modal-detailed-desc ul,
.modal-skill-desc ul,
.modal-skill-header ul,
.modal-reading-summary ul,
.mooc-notes ul,
.reading-summary ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 1.25rem;
    margin: 0.6em 0;
}

/* Listes numérotées (ol) dans toutes les descriptions front office */
.timeline-desc ol,
.hero-bio ol,
.project-desc ol,
.skill-desc ol,
.watch-card-desc ol,
.watch-sources-body ol,
.modal-project-desc ol,
.modal-short-desc ol,
.modal-detailed-desc ol,
.modal-skill-desc ol,
.modal-skill-header ol,
.modal-reading-summary ol,
.mooc-notes ol,
.reading-summary ol {
    list-style-type: decimal;
    list-style-position: outside;
    padding-left: 1.45rem;
    margin: 0.6em 0;
}

/* Éléments de listes (li) */
.timeline-desc li,
.hero-bio li,
.project-desc li,
.skill-desc li,
.watch-card-desc li,
.watch-sources-body li,
.modal-project-desc li,
.modal-short-desc li,
.modal-detailed-desc li,
.modal-skill-desc li,
.modal-skill-header li,
.modal-reading-summary li,
.mooc-notes li,
.reading-summary li {
    margin-bottom: 0.35em;
    line-height: 1.6;
}

.timeline-desc li:last-child,
.hero-bio li:last-child,
.project-desc li:last-child,
.skill-desc li:last-child,
.watch-card-desc li:last-child,
.watch-sources-body li:last-child,
.modal-project-desc li:last-child,
.modal-short-desc li:last-child,
.modal-detailed-desc li:last-child,
.modal-skill-desc li:last-child,
.modal-skill-header li:last-child,
.modal-reading-summary li:last-child,
.mooc-notes li:last-child,
.reading-summary li:last-child {
    margin-bottom: 0;
}

/* Listes imbriquées */
.timeline-desc li ul,
.timeline-desc li ol,
.hero-bio li ul,
.hero-bio li ol,
.project-desc li ul,
.project-desc li ol,
.modal-project-desc li ul,
.modal-project-desc li ol,
.modal-detailed-desc li ul,
.modal-detailed-desc li ol {
    margin: 0.3em 0 0.3em;
    padding-left: 1.25rem;
}

/* Titres H3 et sous-titres H4 dans toutes les descriptions front office */
.timeline-desc h3,
.hero-bio h3,
.project-desc h3,
.skill-desc h3,
.watch-card-desc h3,
.watch-sources-body h3,
.modal-project-desc h3,
.modal-short-desc h3,
.modal-detailed-desc h3,
.modal-skill-desc h3,
.modal-skill-header h3,
.modal-reading-summary h3,
.mooc-notes h3,
.reading-summary h3 {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.8em 0 0.3em;
    line-height: 1.35;
}

.timeline-desc h4,
.hero-bio h4,
.project-desc h4,
.skill-desc h4,
.watch-card-desc h4,
.watch-sources-body h4,
.modal-project-desc h4,
.modal-short-desc h4,
.modal-detailed-desc h4,
.modal-skill-desc h4,
.modal-skill-header h4,
.modal-reading-summary h4,
.mooc-notes h4,
.reading-summary h4 {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.7em 0 0.25em;
    line-height: 1.35;
}

.timeline-desc h3:first-child,
.timeline-desc h4:first-child,
.hero-bio h3:first-child,
.hero-bio h4:first-child,
.project-desc h3:first-child,
.project-desc h4:first-child,
.skill-desc h3:first-child,
.skill-desc h4:first-child,
.modal-project-desc h3:first-child,
.modal-project-desc h4:first-child,
.modal-short-desc h3:first-child,
.modal-short-desc h4:first-child,
.modal-detailed-desc h3:first-child,
.modal-detailed-desc h4:first-child,
.modal-skill-desc h3:first-child,
.modal-skill-desc h4:first-child,
.modal-reading-summary h3:first-child,
.modal-reading-summary h4:first-child {
    margin-top: 0;
}

.timeline-desc h3 strong,
.timeline-desc h3 span,
.timeline-desc h4 strong,
.timeline-desc h4 span,
.hero-bio h3 strong,
.hero-bio h3 span,
.hero-bio h4 strong,
.hero-bio h4 span,
.project-desc h3 strong,
.project-desc h3 span,
.project-desc h4 strong,
.project-desc h4 span,
.modal-project-desc h3 strong,
.modal-project-desc h3 span,
.modal-project-desc h4 strong,
.modal-project-desc h4 span,
.modal-detailed-desc h3 strong,
.modal-detailed-desc h3 span,
.modal-detailed-desc h4 strong,
.modal-detailed-desc h4 span,
.modal-short-desc h3 strong,
.modal-short-desc h3 span,
.modal-short-desc h4 strong,
.modal-short-desc h4 span,
.modal-skill-desc h3 strong,
.modal-skill-desc h3 span,
.modal-skill-desc h4 strong,
.modal-skill-desc h4 span,
.modal-reading-summary h3 strong,
.modal-reading-summary h3 span,
.modal-reading-summary h4 strong,
.modal-reading-summary h4 span {
    color: inherit;
}

.timeline-desc strong,
.hero-bio strong,
.project-desc strong,
.skill-desc strong,
.watch-card-desc strong,
.watch-sources-body strong,
.modal-project-desc strong,
.modal-detailed-desc strong,
.mooc-notes strong,
.reading-summary strong {
    color: var(--text-primary);
}

/* -------------------------------------------------------------------------- */
/* Classes utilitaires de taille de police pour le contenu enrichi (WYSIWYG) */
/* -------------------------------------------------------------------------- */
.text-xs {
    font-size: 0.75rem !important;
    line-height: 1.45;
}
.text-sm {
    font-size: 0.875rem !important;
    line-height: 1.55;
}
.text-base {
    font-size: 1rem !important;
    line-height: 1.65;
}
.text-lg {
    font-size: 1.125rem !important;
    line-height: 1.6;
}
.text-xl {
    font-size: 1.25rem !important;
    line-height: 1.5;
}

.linked-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
}

.linked-skills-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 4px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--tag-color);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.skill-tag:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* Compétences (Skills Matrix & Progression)                                 */
/* -------------------------------------------------------------------------- */
.skills-grid,
.skill-categories-vertical {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.skill-category-card,
.skill-category-block {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 30px 32px;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.skill-category-card:hover,
.skill-category-block:hover {
    border-color: var(--border-highlight);
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.35);
}

.skill-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 15px;
}

.skill-category-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.skill-category-title,
.category-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-category-icon,
.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: var(--primary);
    flex-shrink: 0;
    font-size: 1.15rem;
}

.skill-category-count,
.skill-category-header .badge-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.skill-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.skill-item,
.skill-card {
    margin-bottom: 0;
    cursor: pointer;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: var(--item-bg);
    border: 1px solid var(--item-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

:root[data-theme="light"] .skill-item,
:root[data-theme="light"] .skill-card {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

.skill-item:hover,
.skill-card:hover {
    background: var(--item-hover-bg);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}

:root[data-theme="light"] .skill-item:hover,
:root[data-theme="light"] .skill-card:hover {
    background: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 8px 22px rgba(8, 145, 178, 0.15);
}

.skill-meta,
.skill-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.skill-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.skill-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 10px 0 12px;
}

:root[data-theme="light"] .skill-progress-bar {
    background: rgba(0, 0, 0, 0.07);
}

.skill-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.skill-level-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.03em;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--primary);
    transition: var(--transition);
    white-space: nowrap;
}

.skill-level-badge.level-expert {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.35);
    color: #C4B5FD;
}

.skill-level-badge.level-avance {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.35);
    color: #67E8F9;
}

.skill-level-badge.level-intermediaire {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    color: #93C5FD;
}

.skill-level-badge.level-debutant {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6EE7B7;
}

.skill-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 6px;
    flex-grow: 1;
}

.skill-click-hint {
    font-size: 0.74rem;
    color: var(--primary);
    opacity: 0;
    transition: var(--transition);
    text-align: right;
    margin-top: 10px;
    font-weight: 500;
}

.skill-item:hover .skill-click-hint,
.skill-card:hover .skill-click-hint {
    opacity: 1;
}

/* -------------------------------------------------------------------------- */
/* Réalisations                                                               */
/* -------------------------------------------------------------------------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

@media (max-width: 860px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 26px 28px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    user-select: none;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.project-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.project-meta-top,
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.project-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-year,
.project-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    padding: 2px 9px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    margin-left: auto;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.project-card:hover .project-title {
    color: var(--primary);
}

.project-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 18px;
    flex-grow: 1;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.project-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.project-meta-badge.badge-file {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #10b981;
}

:root[data-theme="light"] .project-meta-badge.badge-file,
body.theme-light .project-meta-badge.badge-file {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.35);
    color: #059669;
}

/* Indicateurs de nombre d'éléments liés sur les blocs en mode liste (timeline, réalisations) */
.project-badges-summary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    white-space: nowrap;
    transition: var(--transition);
}

.mini-badge:hover {
    color: var(--text-secondary);
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .mini-badge,
body.theme-light .mini-badge {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

:root[data-theme="light"] .mini-badge:hover,
body.theme-light .mini-badge:hover {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

.project-click-hint {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: var(--transition);
}

.project-card:hover .project-click-hint {
    transform: translateX(4px);
}

/* Bouton En savoir plus sur la réalisation */
.btn-more-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.timeline-card[role="button"] {
    cursor: pointer;
}

.project-card:hover .btn-more-details,
.watch-card:hover .btn-more-details,
.timeline-card:hover .btn-more-details {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
    transform: translateY(-1px);
}


.project-sublabel {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.project-skills-wrapper {
    margin-top: 14px;
}

.project-readings-wrapper {
    margin-top: 14px;
}

.project-readings-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-reading-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    max-width: 100%;
}

.project-reading-pill svg {
    flex-shrink: 0;
    color: var(--primary);
}

.project-reading-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-reading-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.link-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.link-btn-file {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #10b981;
}

:root[data-theme="light"] .link-btn-file,
body.theme-light .link-btn-file {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.4);
    color: #059669;
}

.link-btn-file:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

/* -------------------------------------------------------------------------- */
/* Encadré Découverte : Veille & Autoformation                                */
/* -------------------------------------------------------------------------- */
.section-teaser {
    padding: 30px 0 60px;
}

.teaser-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 28px;
    transition: var(--transition);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%), var(--bg-card);
}

.teaser-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.35), 0 0 25px rgba(6, 182, 212, 0.2);
    border-color: var(--primary);
}

.teaser-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.teaser-body {
    flex-grow: 1;
}

.teaser-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: rgba(6, 182, 212, 0.12);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

.teaser-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.teaser-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

.teaser-action {
    flex-shrink: 0;
}

@media (max-width: 860px) {
    .teaser-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
        gap: 18px;
    }

    .teaser-action {
        width: 100%;
    }

    .teaser-action .btn {
        width: 100%;
        justify-content: center;
    }
}

/* -------------------------------------------------------------------------- */
/* Page Dédiée : Veille & Autoformation                                       */
/* -------------------------------------------------------------------------- */
.watch-hero-section {
    padding: 130px 0 35px;
    text-align: center;
    position: relative;
}

.watch-hero-content {
    max-width: 860px;
    margin: 0 auto;
}

.watch-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(6, 182, 212, 0.15);
    color: var(--primary);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.watch-hero-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.watch-hero-subtitle {
    font-size: 1.08rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 22px;
}

.watch-stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.watch-stat-pill {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    padding: 5px 12px;
    border-radius: var(--radius-full);
}

/* 1. Bloc Sources de veille */
.watch-sources-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    box-shadow: var(--shadow-card);
    position: relative;
    transition: var(--transition);
}

.watch-sources-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 16px;
}

.watch-sources-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.watch-sources-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.watch-sources-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

.watch-sources-body {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.watch-sources-body ul {
    margin-top: 10px;
}

/* Barre de filtres par thématiques (juste sous Sources de veille) */
.watch-filter-section {
    padding: 15px 0 25px;
}

.watch-filter-bar {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: var(--shadow-card);
}

.watch-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.watch-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.watch-tag-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.watch-tag-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-card-hover);
}

.watch-tag-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

.tag-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Grille et cartes des ressources */
.watch-section-block {
    padding: 25px 0 35px;
}

.watch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
}

@media (max-width: 860px) {
    .watch-grid {
        grid-template-columns: 1fr;
    }
}

.watch-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px 26px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    user-select: none;
}

.watch-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.watch-card:hover .watch-card-title {
    color: var(--primary);
}

.watch-card.is-featured {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-card) 60%);
}

.watch-card.is-featured:hover {
    border-color: #F59E0B;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.18);
}

.watch-card.is-featured:hover .watch-card-title {
    color: #F59E0B;
}

:root[data-theme="light"] .watch-card.is-featured {
    border-color: rgba(217, 119, 6, 0.35);
    background: linear-gradient(145deg, rgba(254, 243, 199, 0.5) 0%, #FFFFFF 70%);
}

:root[data-theme="light"] .watch-card.is-featured:hover {
    border-color: #D97706;
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.16);
}

.watch-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.watch-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.watch-modal-cta {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.watch-card:hover .watch-modal-cta {
    transform: translateX(4px);
}

/* Lien discret "En savoir plus →" (visible au survol, comme les compétences) */
.watch-click-hint {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--primary);
    text-align: right;
    margin-top: auto;
    padding-top: 8px;
    opacity: 0;
    transition: var(--transition);
}

.watch-card:hover .watch-click-hint,
.watch-card:focus-visible .watch-click-hint {
    opacity: 1;
}

.watch-card-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.watch-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.watch-card-year {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.watch-card-title {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.35;
}

.watch-card-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.watch-card-desc {
    color: var(--text-secondary);
    font-size: 0.91rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.watch-linked-group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.watch-linked-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

.watch-projects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.watch-project-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

:root[data-theme="light"] .watch-project-badge,
body.theme-light .watch-project-badge {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.35);
    color: #2563eb;
}

.watch-project-badge:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.watch-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.reading-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.reading-authors {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 14px;
}

.reading-summary {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.thematic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.theme-tag {
    font-size: 0.75rem;
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--tag-color);
}

/* -------------------------------------------------------------------------- */
/* Section 6 : Formulaire de Contact Sécurisé & Anti-Robot                   */
/* -------------------------------------------------------------------------- */
.contact-wrapper {
    max-width: 820px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 38px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.contact-container-center {
    max-width: 740px;
    margin: 0 auto;
    width: 100%;
}

.contact-form-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 38px 42px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.contact-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.contact-form-card:hover {
    border-color: var(--border-highlight);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.form-group label {
    font-size: 0.90rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
    font-size: 0.88rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}

/* Captcha mathématique */
.captcha-group {
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.captcha-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.captcha-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.captcha-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.captcha-text strong {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.captcha-input {
    width: 90px !important;
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 8px 12px;
}

/* Bouton Envoyer */
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    margin-top: 6px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(6, 182, 212, 0.35);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(6, 182, 212, 0.45);
}

/* Alertes Flash */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.94rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10B981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #EF4444;
}

/* Support Thème Clair pour la page de contact */
:root[data-theme="light"] .contact-form-card {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .captcha-group {
    background: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.25);
}

:root[data-theme="light"] .form-control {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

:root[data-theme="light"] .form-control:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

:root[data-theme="light"] .alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

:root[data-theme="light"] .alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

@media (max-width: 650px) {
    .contact-form-card {
        padding: 24px 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .captcha-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .captcha-input {
        width: 100% !important;
    }
}

/* -------------------------------------------------------------------------- */
/* Modale Universelle d'Interconnexion des Compétences                       */
/* -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--modal-bg);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 750px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    position: relative;
    box-shadow: var(--modal-shadow);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 20px;
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 30;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

/* Conteneurs internes du corps de modale */
#experienceModalBody,
#modalBody,
#projectModalBody,
#resourceModalBody,
#mediaModalBody,
.modal-body-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

/* En-tête fixe et persistant des popups (croix, retour, titre, niveau) */
.modal-header-fixed {
    flex-shrink: 0;
    padding: 24px 68px 18px 28px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--modal-bg);
    position: relative;
    z-index: 10;
}

.modal-header-fixed .modal-project-header,
.modal-header-fixed .modal-skill-header {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-header-fixed .modal-project-badge-bar {
    padding-right: 0;
    margin-bottom: 10px;
}

.modal-header-fixed .modal-stacked-back-container {
    margin-bottom: 12px;
}

/* Corps défilant avec ascenseur indépendant sous l'en-tête */
.modal-body-scrollable {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding: 22px 28px 28px 28px;
    overscroll-behavior: contain;
}

.modal-body-scrollable> :first-child {
    margin-top: 0 !important;
}

/* Scrollbar élégante pour la zone défilante des modales */
.modal-body-scrollable::-webkit-scrollbar {
    width: 6px;
}

.modal-body-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body-scrollable::-webkit-scrollbar-thumb {
    background: var(--border-highlight);
    border-radius: var(--radius-full);
}

.modal-body-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.modal-skill-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 20px;
}

.modal-skill-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-section-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-item-list {
    list-style: none;
}

.modal-list-item {
    background: var(--item-bg);
    border: 1px solid var(--item-border);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-list-item strong {
    color: var(--text-primary);
}

.modal-list-item span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.modal-clickable-item {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.modal-clickable-item:hover,
.modal-clickable-item:focus-visible {
    border-color: var(--primary) !important;
    background: var(--bg-card-hover, rgba(6, 182, 212, 0.08)) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.15);
}

/* Empilement dynamique des modales (Modal Stack) */
.modal-overlay.stacked-modal {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.modal-overlay.stacked-modal .modal-content {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--primary-glow);
}

.modal-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 6px;
    transition: var(--transition);
}

.modal-back-btn:hover {
    background: rgba(6, 182, 212, 0.12);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-3px);
}

:root[data-theme="light"] .modal-back-btn,
body.theme-light .modal-back-btn {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #475569;
}

:root[data-theme="light"] .modal-back-btn:hover,
body.theme-light .modal-back-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.modal-content-large {
    max-width: 840px;
}

.modal-content-media {
    max-width: 1100px;
    width: 96%;
    height: 92vh;
    max-height: 92vh;
}

/* ========================================================================== */
/* Visionneuse PDF Intégrée (PDF.js avec ascenseur natif HTML déplaçable)    */
/* ========================================================================== */

.pdf-viewer-root {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
    background: #0b1120;
    position: relative;
    overflow: hidden;
}

.pdf-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 18px;
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 0.85rem;
    z-index: 5;
    flex-wrap: wrap;
}

.pdf-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-toolbar-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}

.pdf-toolbar-btn:hover:not(:disabled) {
    background: rgba(6, 182, 212, 0.25);
    border-color: var(--primary);
    color: #fff;
}

.pdf-toolbar-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pdf-page-input {
    width: 48px;
    padding: 4px 6px;
    border-radius: 5px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.82rem;
    text-align: center;
    font-weight: 600;
}

.pdf-page-input:focus {
    outline: none;
    border-color: var(--primary);
}

.pdf-scroll-viewport {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: scroll;
    /* Force l'affichage permanent de l'ascenseur pour être toujours cliquable */
    overflow-x: auto;
    padding: 24px 16px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    overscroll-behavior: contain;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: #64748b #1e293b;
}

/* Ascenseur ultra contrasté, large (14px) et facilement déplaçable à la souris sur Mac/Safari/Chrome */
.pdf-scroll-viewport::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.pdf-scroll-viewport::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 7px;
}

.pdf-scroll-viewport::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 7px;
    border: 3px solid #1e293b;
    cursor: grab;
}

.pdf-scroll-viewport::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.pdf-scroll-viewport::-webkit-scrollbar-thumb:active {
    background: #0ea5e9;
    cursor: grabbing;
}

.pdf-page-card {
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.pdf-page-card canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.pdf-page-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #94a3b8;
    background: #1e293b;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    width: 100%;
    height: 100%;
}

.pdf-page-number-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    pointer-events: none;
    z-index: 2;
}

.pdf-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #f1f5f9;
    z-index: 20;
    transition: opacity 0.2s ease;
}

.pdf-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinPdf 0.8s linear infinite;
}

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

.modal-pdf-container {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #0f172a;
}

.modal-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* Ratio 16:9 */
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}

/* Miniatures d'images cliquables dans les popups */
.modal-image-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.modal-image-thumb-card {
    background: var(--item-bg);
    border: 1px solid var(--item-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.modal-image-thumb-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.18);
}

.modal-image-thumb-preview {
    position: relative;
    width: 100%;
    height: 130px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-image-thumb-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.modal-image-thumb-card:hover .modal-image-thumb-preview img,
.modal-image-thumb:hover img {
    transform: scale(1.05);
}

.modal-image-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-image-thumb-card:hover .modal-image-thumb-overlay,
.modal-image-thumb:hover .modal-image-thumb-overlay {
    opacity: 1;
}

.modal-image-thumb-footer {
    padding: 8px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    text-align: center;
}

.modal-image-thumb-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-image-thumb {
    position: relative;
    width: 180px;
    height: 120px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--item-border);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
}

.modal-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}


/* Modale Réalisations */
.modal-project-header {
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 18px;
}

.modal-project-badge-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-right: 48px;
}

.modal-project-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    padding: 3px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.modal-project-title {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 6px;
}

.modal-project-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.modal-project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 24px;
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
}

.modal-project-section {
    margin-top: 24px;
}

.modal-project-section .modal-section-title {
    margin-top: 0;
    margin-bottom: 12px;
}

/* Fichiers téléchargeables dans la modale */
.modal-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-file-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

:root[data-theme="light"] .modal-file-card,
body.theme-light .modal-file-card {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.35);
}

.modal-file-card:hover {
    background: rgba(16, 185, 129, 0.16);
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.modal-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-file-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    flex-shrink: 0;
}

.modal-file-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.modal-file-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* Liens dans la modale */
.modal-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--tag-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.modal-link-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Compétences & Réalisations dans les modales */
.modal-skills-cloud,
.modal-projects-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-skill-btn,
.modal-project-btn,
.modal-content .watch-project-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.modal-skill-btn:hover,
.modal-project-btn:hover,
.modal-content .watch-project-badge:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.modal-skill-btn .skill-level-pill,
.modal-project-btn .skill-level-pill,
.modal-content .watch-project-badge .skill-level-pill {
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
}

:root[data-theme="light"] .modal-skill-btn .skill-level-pill,
body.theme-light .modal-skill-btn .skill-level-pill,
:root[data-theme="light"] .modal-project-btn .skill-level-pill,
body.theme-light .modal-project-btn .skill-level-pill {
    background: rgba(0, 0, 0, 0.08);
}

/* Lectures dans la modale */
.modal-readings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-reading-item {
    background: var(--item-bg);
    border: 1px solid var(--item-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    transition: var(--transition);
}

.modal-reading-item:hover {
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
}

.modal-reading-main {
    flex-grow: 1;
}

.modal-reading-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 4px;
}

.modal-reading-author,
.modal-experience-org {
    font-size: 0.82rem;
    color: var(--primary);
}

.modal-reading-author {
    margin-bottom: 6px;
}

.modal-experience-org {
    margin-top: 2px;
    margin-bottom: 0;
    line-height: 1.35;
}

.modal-reading-summary {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.modal-reading-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0;
    background: var(--navbar-bg);
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
}

.footer p {
    margin-bottom: 8px;
}

.footer a {
    color: var(--text-secondary);
}

.footer a:hover {
    color: var(--primary);
}

/* -------------------------------------------------------------------------- */
/* Spécificités Thème Clair (Badges, Overrides & Finitions)                   */
/* -------------------------------------------------------------------------- */
:root[data-theme="light"] .type-job,
:root[data-theme="light"] .badge-job {
    background: #E0F2FE;
    color: #0369A1;
    border: 1.5px solid #7DD3FC;
}

:root[data-theme="light"] .type-education,
:root[data-theme="light"] .badge-education {
    background: #EEF2FF;
    color: #4338CA;
    border: 1.5px solid #A5B4FC;
}

:root[data-theme="light"] .type-certification,
:root[data-theme="light"] .badge-certification,
:root[data-theme="light"] .badge-cert {
    background: #ECFDF5;
    color: #047857;
    border: 1.5px solid #6EE7B7;
}

:root[data-theme="light"] .skill-level-badge.level-expert {
    background: #F5F3FF;
    border-color: #DDD6FE;
    color: #6D28D9;
}

:root[data-theme="light"] .skill-level-badge.level-avance {
    background: #E0F2FE;
    border-color: #BAE6FD;
    color: #0369A1;
}

:root[data-theme="light"] .skill-level-badge.level-intermediaire {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1D4ED8;
}

:root[data-theme="light"] .skill-level-badge.level-debutant {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #047857;
}

:root[data-theme="light"] .captcha-security-panel {
    background: #F0FDFA;
    border-color: #CCFBF1;
}

:root[data-theme="light"] .captcha-label {
    color: #1E293B;
}

:root[data-theme="light"] .captcha-badge {
    background: #CCFBF1;
    color: #0F766E;
    border-color: #5EEAD4;
}

:root[data-theme="light"] .avatar-placeholder {
    background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
    color: var(--primary);
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .hero-card {
        padding: 26px 18px 22px;
        gap: 16px;
    }

    .hero-top-row {
        padding-right: 0;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .hero-location-badge {
        position: static;
        align-self: center;
        margin-bottom: 4px;
    }

    .avatar-wrapper {
        margin: 0 auto;
    }

    .hero-identity {
        align-items: center;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .social-links {
        margin: 10px auto 0;
    }

    .hero-compact-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-compact-location {
        margin-left: 0;
        align-self: flex-start;
    }

    .hero-compact-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-compact-btns-left {
        width: 100%;
    }

    .hero-compact-toggle-bottom {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-node {
        left: -20px;
    }

    .timeline-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }

    .timeline-org-row {
        gap: 8px;
    }

    .timeline-date-row {
        white-space: normal;
        margin: 4px 0 12px 0;
    }

    .projects-grid,
    .moocs-grid,
    .readings-grid,
    .skill-items-grid {
        grid-template-columns: 1fr;
    }

    .skill-category-card {
        padding: 20px 16px;
    }

    .skill-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .modal-content {
        padding: 0;
        max-height: 90vh;
        margin: 10px;
    }

    .modal-header-fixed {
        padding: 18px 56px 14px 18px;
    }

    .modal-body-scrollable {
        padding: 18px 18px 24px 18px;
    }

    .modal-close-btn {
        top: 14px;
        right: 14px;
        width: 32px;
        height: 32px;
        font-size: 1.05rem;
    }

    .theme-toggle-label {
        display: none;
    }

    .theme-toggle-btn {
        padding: 7px 10px;
    }

    /* Éviter le zoom automatique indésirable sur iOS Safari */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Actions du bloc Profil en pleine largeur pour smartphones */
    .hero-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Défilement horizontal fluide des filtres de parcours */
    .timeline-filters {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 6px;
        gap: 8px;
        width: 100%;
    }

    .timeline-filters::-webkit-scrollbar {
        display: none;
    }

    .timeline-filter-btn {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* Marge inférieure globale pour que le bouton flottant Chatbot IA ne masque pas le dernier contenu */
    main {
        padding-bottom: 75px;
    }
}

/* ==========================================================================
   Modale de téléchargement du CV multi-formats (PDF, Word RH, Markdown IA)
   ========================================================================== */
.cv-download-modal-dialog {
    max-width: 980px;
    width: 95%;
    padding: 32px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.cv-download-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.cv-download-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cv-download-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

.cv-download-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0;
}

.cv-formats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 22px;
}

.cv-format-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cv-format-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.15);
}

.cv-format-card.cv-format-highlight {
    border-color: rgba(6, 182, 212, 0.4);
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.cv-format-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-pdf {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-rh {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-ia {
    background: rgba(160, 160, 160, 0.15);
    color: #2e2e2e;
    border: 1px solid rgba(48, 48, 48, 0.3);
}

.cv-format-icon {
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 12px;
}

.cv-format-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.cv-format-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.cv-format-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    border-top: 1px dashed var(--border-subtle);
    padding-top: 12px;
}

.cv-format-features li {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cv-format-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.btn-cv-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-cv-primary {
    background: var(--primary);
    color: #FFFFFF !important;
}

.btn-cv-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-cv-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-subtle);
}

.btn-cv-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-cv-disabled {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-color: var(--border-subtle);
    cursor: not-allowed;
    opacity: 0.6;
}

.cv-download-modal-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Toast pour la copie presse-papiers */
.toast-notif-cv {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #10B981;
    color: #FFFFFF;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(120px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100000;
    pointer-events: none;
}

.toast-notif-cv.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 860px) {
    .cv-formats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cv-download-modal-dialog {
        padding: 24px 18px;
    }
}