:root {
    /* --- NOUVELLE DA : COULEURS ET GRADIENTS --- */
    /* Fond fixe optimisé (plus léger) */
    --mesh-gradient: 
    radial-gradient(at 0% 0%, hsla(253,16%,93%,1) 0, transparent 50%), 
    radial-gradient(at 50% 0%, hsla(225,100%,94%,1) 0, transparent 50%), 
    radial-gradient(at 100% 0%, hsla(339,100%,96%,1) 0, transparent 50%);

    /* Couleurs Principales (HSL) - Palette Violette */
    --primary-hue1: 250; 
    --primary-hue2: 85%;
    --primary-hue3: 65%;
    --primary-color: hsl(var(--primary-hue1), var(--primary-hue2), var(--primary-hue3));
    --primary-mid: hsla(var(--primary-hue1), var(--primary-hue2), var(--primary-hue3), 0.5);
    --primary-light: hsla(var(--primary-hue1), var(--primary-hue2), var(--primary-hue3), 0.3);
    --primary-very-light: hsla(var(--primary-hue1), var(--primary-hue2), var(--primary-hue3), 0.1);

    --secondary-hue1: 0;
    --secondary-hue2: 0%;
    --secondary-hue3: 100%;
    --secondary-color: #ffffff; 
    --secondary-attenuated: #f3f4f6; 
    --secondary-mid: #e5e7eb; 
    --secondary-light: #f9fafb; 
    --secondary-very-light: #f3f4f6;

    --accent-hue1: 220;
    --accent-hue2: 58%;
    --accent-hue3: 58%;
    --accent-color: hsl(var(--accent-hue1), var(--accent-hue2), var(--accent-hue3));
    --accent-mid: hsla(var(--accent-hue1), var(--accent-hue2), var(--accent-hue3), 0.5);
    --accent-light: hsla(var(--accent-hue1), var(--accent-hue2), var(--accent-hue3), 0.3);
    --accent-very-light: hsla(var(--accent-hue1), var(--accent-hue2), var(--accent-hue3), 0.1);

    --accent-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    --accent-gradient-hover: linear-gradient(135deg, var(--primary-mid) 0%, var(--accent-mid) 100%);

    --text-main: #1E1E2E;
    --text-muted: #6B7280;

    /* --- CORRECTION COULEURS (Plus douces) --- */
    --success-color: #10B981; 
    --warning-color: #F59E0B; 
    --danger-color: #EF4444; 

    /* --- DA OPTIMISÉE (FAKE GLASS) --- */
    --radius-lg: 24px;
    
    /* ICI : Le Gradient Fake Glass (Transparence variable sans calcul de flou) */
    /* De haut-gauche (plus opaque) vers bas-droite (plus transparent) */
    --glass-bg: linear-gradient(135deg, rgb(245 245 245 / 30%) 0%, rgb(255 255 255 / 49%) 100%);
    
    --glass-panel-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    --transition: all 0.2s ease-out;

    /* --- PONT VERS TES ANCIENNES VARIABLES --- */
    --background-gradient: var(--mesh-gradient);
    --text-color: var(--text-main); 
    --gray-color: var(--text-muted); 
    --border-radius: var(--radius-lg);
    --shadow-color: rgba(0, 0, 0, 0.05);
    --font-family: 'Lexend', sans-serif;
    --selected-dot-color: var(--accent-color); 
    --light-gray: var(--secondary-attenuated); 
    --line-color: var(--primary-light);


    --orb-1: #e0c3fc;
    --orb-2: #8ec5fc;


    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
}

html, body {
    height: 100%;
}

body {
    background: var(--background-gradient);
    background-color: #F3F4F6;
    background-attachment: fixed; /* Fond fixe pour perf */
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
}

body::before, body::after {
    display: none;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    
    /* FAKE GLASS : Gradient semi-transparent */
    background: var(--glass-bg);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* ← Ajoute aussi pour Safari */
    
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    height: 80px; 
    box-sizing: border-box;
}

.nav-container {
    display: flex;
    gap: 10px;
    align-items:center;
}

.nav-button {
    background: var(--accent-gradient);
    color: #fff;
    padding: 10px 15px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(108, 99, 255, 0.2);
}

.nav-button:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(108, 99, 255, 0.3);
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    position: relative;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    padding: 100px 40px 60px 40px;
    
}

.content-wrapper::before { display: none; }

.content-wrapper > * {
    width: 100%;
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
}

h1, h2, h3 {
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    position: relative;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 40px;
    background: var(--accent-gradient);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    margin-bottom: 30px;
}

h3 {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    margin-bottom: 20px;
}

h2::after, h1::after, h3::after { display: none; }

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 0 0px 40px 0px;
}

.stats-card {
    /* FAKE GLASS */
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--glass-panel-shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.stats-card::after { display: none; }

.stats-card i {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary-color); 
}

.stats-card h3 {
    font-size: 26px;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 700;
}

.stats-card p {
    font-size: 16px;
    color: var(--gray-color);
}

.main-section {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 20px;
}

.left-panel {
    flex: 2;
    /* FAKE GLASS */
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--glass-panel-shadow);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    max-width:100%;
}

.left-panel h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.right-panel {
    flex: 1;
    /* FAKE GLASS */
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-panel-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 24px;
    min-height: 400px;
    z-index: 10;
}

.right-panel h2 {
    margin-top: 0;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 1;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.competences-list {
    overflow-y: auto;
    padding: 0 10px 0px 0;
    margin-bottom: 10px;
    max-height: 450px;
}

.competence-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255,255,255,0.6); /* Item semi-transparent */
    border: 1px solid transparent;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 16px;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    gap: 20px;
}

.competence-item:hover {
    background-color: #fff;
    border-color: var(--primary-light);
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.competence-name {
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

.competence-progress {
    display: flex;
    align-items: center;
}

.progress-bar {
    width: 100px;
    height: 8px;
    background-color: var(--secondary-mid);
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
}

.progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
}

.progress.success { background: var(--success-color); }
.progress.warning { background: var(--warning-color); }
.progress.danger { background: var(--danger-color); }

.progress-percentage {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 600;
}

.bottom-section {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 40px;
    gap: 20px;
    z-index: 10;
    align-items: flex-start;
}

.recommendations, .test-history {
    flex: 1 1 calc(50% - 20px);
    /* FAKE GLASS */
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--border-radius);
    padding: 0;
    box-shadow: var(--glass-panel-shadow);
}

.recommendations h2, .test-history h2 {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    margin-top: 0;
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    top: 0;
    z-index: 1;
    padding: 20px;
}

.recommendations-content {
    padding: 20px;
    margin-top: 0px;
}
.test-history-content {
    padding: 20px;
    margin-bottom: 20px;
}

.recommendation-item {
    background: var(--accent-gradient);
    padding: 25px;
    border-radius: 16px;
    color: #fff;
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 20px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.2);
}

.recommendation-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.3);
}

.recommendation-item::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.recommendation-details h3 {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-align: left;
}

.recommendation-details p {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

.recommendation-action {
    margin-left: auto;
    z-index: 1;
}

.recommendation-action button {
    padding: 10px 20px;
    background-color: #fff;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
}

.recommendation-action button:hover {
    background-color: var(--secondary-light);
}

.test-item {
    background-color: rgba(255,255,255,0.6);
    border: 1px solid var(--secondary-attenuated);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 16px;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.test-item:hover {
    background-color: #fff;
    border-color: var(--primary-light);
    transform: translateX(2px);
}

.test-item h3 {
    margin-bottom: 5px;
    font-size: 18px;
    color: var(--text-color);
    text-align: left;
}

.test-item p {
    color: var(--gray-color);
    font-size: 14px;
}

.competences-list, .recommendations-content, .right-panel, .test-history-content {
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-mid) transparent;
}

.competences-list::-webkit-scrollbar, .recommendations-content::-webkit-scrollbar, .test-history-content::-webkit-scrollbar {
    width: 6px;
}

.competences-list::-webkit-scrollbar-thumb, .recommendations-content::-webkit-scrollbar-thumb, .test-history-content::-webkit-scrollbar-thumb {
    background-color: var(--secondary-mid);
    border-radius: 4px;
}

.competences-list::-webkit-scrollbar-track, .recommendations-content::-webkit-scrollbar-track, .test-history-content::-webkit-scrollbar-track {
    background-color: transparent;
}

.stats-card, .competence-item, .recommendation-item, .test-item {
    animation: fadeInUp 0.5s ease-in-out;
}

.sidebar-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 998; 
    display: none; 
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .main-section {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .stats-cards {
        flex-direction: column;
    }
    .right-panel {
        padding: 0px;
    }
}
    
    /* --- MAP CONTAINER : Fond blanc SOLIDE pour performance --- */
    #map-container {
        width: 100%;
        height: 450px;
        position: relative;
        border: 1px solid var(--secondary-mid);
        border-radius: var(--border-radius);
        background: var(--light-gray);
        overflow: auto;
        scrollbar-width: none;
    }

    #map-container-content {
        position: relative;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        transform-origin: center center;
        transition: transform 0.3s ease;
        padding: 100px 500px;
        box-sizing: border-box;
        flex-wrap: nowrap;
        width: max-content;
        height: max-content;

    }

    .column {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        height: 100%;
        margin-right: 300px;
    }

    .competence {
        background: #fff;
        border: 2px solid var(--secondary-attenuated);
        border-radius: var(--border-radius);
        text-align: center;
        cursor: pointer;
        transition: var(--transition);
        height: auto;
        width: 400px;
        margin: 40px 0;
        position: relative;
        padding: 20px;
        box-sizing: border-box;
        box-shadow: 0 4px 8px var(--shadow-color);
        animation: floatLeftRight 4s ease-in-out infinite alternate;
    }

    .competence.focus {
        animation: floatLeftRight 4s ease-in-out infinite alternate, neonGlow 6s infinite;
        background-color: #fff;
        border-color: var(--primary-color);
        color: var(--text-color);
    }

    .competence.focus .competence-title {
        color: var(--primary-color);
    }

    .competence::after { display: none; }

    .competence-title {
        font-size: 22px;
        font-weight: 600;
        margin-bottom: 20px;
        color: var(--primary-color);
    }

    .micro-competences {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: flex-start;
        margin-top: 10px;
        box-sizing: border-box;
    }

    .micro-competence {
        display: flex;
        flex-direction: row;
        align-items: center;
        position: relative;
        width: 100%;
        padding: 10px 15px;
        transition: var(--transition);
        cursor: pointer;
        border-radius: var(--border-radius);
        background-color: var(--secondary-very-light);
        color: var(--text-color);
    }

    .micro-competence:not(:last-child) {
        margin-bottom: 15px;
    }

    .micro-competence:hover {
        background: var(--secondary-light);
    }

    .micro-competence.focus {
        background-color: var(--primary-color);
        color: #fff;
    }

    .micro-competence.focus:hover {
        background-color: var(--accent-color);
    }

    .micro-competence.disabled {
        cursor: pointer; 
        opacity: 0.6;
    }

    .micro-competence-circle {
        border: 2px solid var(--primary-color);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-right: 10px;
        flex-shrink: 0;
        transition: var(--transition);
        color: white;
        position: relative;
    }
    
    .micro-competence-title {
        text-align: left;
    }

    #competence-connections {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 0; 
        pointer-events: none;
    }

    @keyframes subtlePulse {
        0%, 100% { filter: brightness(1); }
        50% { filter: brightness(1.05); }
    }

    @keyframes circlePulse {
        0%, 100% { box-shadow: 0 0 5px var(--accent-color); }
        50% { box-shadow: 0 0 15px var(--accent-color); }
    }

    @keyframes floatLeftRight {
        0% { transform: translateX(0px); }
        100% { transform: translateX(10px); }
    }

    @keyframes neonGlow {
        0%, 100% { box-shadow: 0 0 10px var(--accent-light); }
        50% { box-shadow: 0 0 20px var(--primary-light); }
    }

    /* BOUTON HAMBURGER (petits écrans) */
    .hamburger {
        display: none; 
        position: fixed;
        top: 20px; 
        left: 20px;
        z-index: 1000;
        cursor: pointer;
        background: #fff;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        box-shadow: 0 4px 12px var(--shadow-color);
        justify-content: center;
        align-items: center;
    }
    .hamburger i {
        font-size: 20px;
        color: var(--text-color);
    }

    /* =======================
       SIDEBAR
    ======================= */
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px; 
        width: 250px;
        height: 100%;
        background-color: #fff;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
        padding-top: 60px; 
        z-index: 11150;
        transition: left 0.3s ease;
    }

    .sidebar ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .sidebar li {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        border-bottom: 1px solid var(--light-gray);
        cursor: pointer;
    }

    .sidebar li:hover {
        background-color: var(--secondary-light);
    }

    .sidebar i {
        margin-right: 10px;
        font-size: 18px;
        color: var(--accent-color);
    }

    .sidebar .close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 24px;
        cursor: pointer;
    }

    .sidebar-open {
        left: 0; 
    }

    @media (max-width: 768px) {
        .left-panel {
            display: none !important;
        }
        .stats-cards {
            grid-template-columns: 1fr;
        }
        .content-wrapper {
            padding: 20px;
        }
        .recommendations-content {
            padding: 10px;
            margin-top: 0px;
        }

        .stats-cards {
            display: none !important;
        }

        .recommendations, .test-history {
            flex: 1 1 calc(50% - 20px);
            margin-bottom: 10px;
        }
        .recommendations {
            margin: 10px;
        }

        body {
            padding-top: 0px;
        }
        
        h2 {
            font-size: 18px;
            margin-bottom: 5px;
        }
        h3 {
            font-size: 16px;
            margin-bottom: 10px;
        }
        .stats-cards {
            margin: 0 0 10px 0;
            grid-template-columns: 1fr;
            gap: 8px;
        }
        .stats-card {
            padding: 15px;
        }
        .stats-card h3 {
            font-size: 18px;
        }
        .stats-card p {
            font-size: 14px;
        }

        .main-section,
        .bottom-section,
        .main-section {
            margin-bottom: 0px;
        }

        .recommendations-content, .competences-list,
        .test-history-content {
            padding: 15px;
        }
        .recommendation-item {
            padding: 15px; 
            margin-bottom: 5px;
        }
        .recommendation-details h3 {
            font-size: 12px; 
            margin-bottom: 5px;
        }
        .recommendation-details p {
            font-size: 10px;
        }
        .recommendation-action button {
            padding: 8px 12px;
            font-size: 14px;
        }

        .test-item {
            padding: 10px 15px;
        }
        .test-item h3 {
            font-size: 14px;
        }
        .test-item p {
            font-size: 12px;
        }
        
        .competence-item {
            padding: 10px 15px;
        }
        .competence-name {
            font-size: 14px;
        }
        .progress-bar {
            width: 70px;
        }
        .progress-percentage {
            font-size: 12px;
        }
        .hamburger {
            display: flex; 
        }
        .top-nav {
            display: none !important;
        }

        .content-wrapper {
            margin-top: 0; 
        }
        .sidebar {
            position: fixed;
            top: 0;
            left: 0; 
            width: 220px; 
            height: 100%;
            background-color: #fff;
            box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
            padding-top: 60px; 
            z-index: 1001; 
            transition: transform 0.3s ease;
            transform: translateX(-100%); 
        }
        .sidebar.show {
            transform: translateX(0);
        }
        .modal-content_popup {
            width: 90%;
            padding: 1rem;
        }
        .btn-start {
            font-size: large;
            padding: 0.5rem 1rem;
        }

    }
    @media (min-width: 769px) {
        .sidebar-overlay {
            display: none !important; 
        }
    }


    /* ===== SNV01_07 : cartes recommandation & test multi-notions ===== */
    .action-row {display:grid;gap:20px;margin:0 0 20px 0}
    @media(max-width:768px){.action-row{grid-template-columns:1fr}}
    .action-card {
        position:relative;border-radius:var(--border-radius);overflow:hidden;
        display:flex;align-items:center;transition:.3s;cursor:pointer;
        /* Fake Glass */
        background: rgba(255,255,255,0.7);
        border: 1px solid #fff;
    }
    .action-card:hover {transform:translateY(-4px);box-shadow:0 8px 16px var(--shadow-color);}
    
    /* Reco */
    .card-reco {
        padding:34px 38px;
        /* Gradient violet */
        background: var(--accent-gradient);
        background-size:260% 100%;
        color:white;
    }
    @keyframes slideBg{0%{background-position:0 0}100%{background-position:260% 0}}
    .reco-text h4{font-size:13px;font-weight:700;letter-spacing:.6px;color:#e9e6ff;margin:0 0 4px;text-transform:uppercase}
    .reco-text h3{font-size:28px;font-weight:700;margin:0 0 4px;color:#fff}
    .reco-text h3::after {
      content: none;
    }
    .reco-text p{font-size:15px;font-weight:500;margin:0}
    .arrow{font-size:56px;font-weight:700;margin-left:auto;animation:arrowMv 1.6s ease-in-out infinite}
    @keyframes arrowMv{0%,100%{transform:translateX(0)}50%{transform:translateX(16px)}}
    .arc{width:300px;height:300px;border-radius:50%;position:absolute;right:-180px;top:-120px;pointer-events:none}
    .arc:before{content:'';position:absolute;inset:0;border-radius:50%;border:5px solid rgba(255,255,255,.15);
        border-left-color:transparent;border-bottom-color:transparent;animation:rotate 14s linear infinite}
    @keyframes rotate{to{transform:rotate(360deg)}}
    
    /* Test multi-notions */
    .card-test{
      padding:40px 20px;
      /* Gradient bleu/violet */
      background: linear-gradient(120deg, var(--accent-color), var(--primary-color));
      color:#fff;
      display:flex;
      justify-content:center;
      align-items:center;
      text-align:center;
      cursor:pointer;
    }
    .card-test h3{margin:0;font-size:22px;font-weight:700;color:#fff;}
    .card-test h3::after{content:none;} 
    
    /* ===== SNV01_07 : historique ===== */
    .history-wrapper{
        /* Fake Glass */
        background: var(--glass-bg);
        border: var(--glass-border);
        border-radius:var(--border-radius);padding:24px;box-shadow:var(--glass-panel-shadow)
    }
    .history-wrapper h2{font-size:22px;font-weight:700;margin-bottom:16px;}
    .history-scroll{display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px}
    .hist-card{
        flex:0 0 240px;
        background:rgba(255,255,255,0.7);
        border: 1px solid #fff;
        border-radius:16px;padding:18px 20px;box-shadow:0 3px 7px var(--shadow-color);
        scroll-snap-align:start;transition:.3s
    }
    .hist-card:hover{transform:translateY(-4px); background: #fff;}
    .hist-title{font-size:16px;font-weight:700;margin-bottom:6px;}
    .hist-line{font-size:14px;font-weight:500;color:var(--gray-color)}
    @media(max-width:768px){.hist-card{flex:0 0 200px}}
    
    /* SNV01_07 : modal Test multi-notions */
    .info-modal{
      display:none; position:fixed; z-index:9999;
      inset:0; background:rgba(0,0,0,.45);
    }
    .info-content{
      /* Optimisation */
      background: #fff;
      width:90%; max-width:420px; margin:120px auto;
      border-radius:var(--border-radius);
      padding:28px 30px; box-shadow:0 8px 18px rgba(0,0,0,0.1);
      position:relative; text-align:center;
    }
    .info-content h3{margin-top:0;font-size:24px;color:var(--primary-color);}
    .info-content ul{list-style:disc;text-align:left;margin:18px 0 24px 22px;font-size:15px;font-weight:500;line-height:1.6;}
    .info-note{font-size:14px;font-weight:500;color:var(--gray-color);}
    .modal-btn{
      background: var(--accent-gradient);
      color:#fff;border:none;
      padding:12px 26px;border-radius:12px;
      font-weight:600;cursor:pointer;transition:var(--transition);
    }
    .modal-btn:hover{background: var(--accent-gradient-hover);}
    .close-info{
      position:absolute;top:10px;right:16px;font-size:26px;
      color:var(--gray-color);cursor:pointer;
    }
    /* ❶ La carte doit être relative pour positionner l’icône */
    .card-test{position:relative;}
    /* ❷ Icône “i” */
    .info-icon{
      position:absolute; top:10px; right:14px;
      font-size:20px; color:#fff; cursor:pointer;
      transition:opacity .25s;
    }
    .info-icon:hover{opacity:.75;}
    /* SNV01_07 : typographie et espacements dans le modal */
    .info-content h3{margin:0 0 18px;font-size:24px;color:var(--primary-color)}
    .info-content p{margin:0 0 14px;line-height:1.55;font-size:16px}


.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: floatOrb 20s infinite ease-in-out alternate;
}

@media (max-width: 480px) {
    .bg-orb {
        width: 250px;
        height: 250px;
        opacity: 0.4;
    }
}

.orb-1 { width: 600px; height: 600px; background: var(--orb-1); top: -100px; left: -100px; }
.orb-2 { width: 500px; height: 500px; background: var(--orb-2); bottom: -50px; right: -100px; animation-delay: -5s; }



/* --- SIDEBAR PREMIUM --- */
.premium-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    z-index: 1100;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
}

.sidebar-brand {
    padding: 30px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(108, 99, 255, 0.3);
    flex-shrink: 0;
}

.brand-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.sidebar-menu {
    flex: 1;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding: 10px 12px;
    margin-top: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Espace le contenu du badge */
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.menu-item-core {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    transition: 0.2s;
}

.menu-item:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

.menu-item.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(108, 99, 255, 0.1);
    position: relative;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

/* Badge de notification Sidebar */
.nav-badge {
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
    transition: transform 0.2s;
}
.menu-item:hover .nav-badge {
    transform: scale(1.1);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.user-profile { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--secondary-mid); color: var(--text-main); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 700; font-size: 14px; color: var(--text-main); }
.user-role { font-size: 12px; color: var(--text-muted); }

/* --- LE DOCKER FLOTTANT PREMIUM --- */
.floating-docker {
    position: fixed;
    top: 30px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 12px; /* Un peu plus d'espace entre les boutons */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 8px; /* Pilule plus charnue */
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 1);
    z-index: 1050;
}

.btn-docker {
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 700; /* Légèrement plus gras pour asseoir le côté premium */
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Bouton Coach : Effet Shimmer */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.btn-coach {
    background: linear-gradient(90deg, #FF6B6B, #8E2DE2, #FF6B6B);
    background-size: 200% auto;
    color: white;
    box-shadow: 0 4px 15px rgba(142, 45, 226, 0.2);
    animation: shimmer 4s linear infinite;
}
.btn-coach:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(142, 45, 226, 0.4);
    filter: brightness(1.1);
}



.btn-found {
    background: linear-gradient(90deg, #10B981, #059669, #34D399, #10B981);
    background-size: 200% auto;
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    animation: successShimmer 4s linear infinite;
}

.btn-found i {
    color: #FFD700; /* Icône dorée pour la victoire */
    font-size: 15px;
    animation: bounceHorn 2s infinite ease-in-out;
}

.btn-found:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    filter: brightness(1.1);
}

/* --- BOUTON DÉCONNEXION SIDEBAR --- */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%; /* Prend toute la largeur pour repousser le bouton */
}

.user-info {
    flex: 1; /* Permet aux infos de prendre l'espace restant */
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1); /* Petit fond rouge très léger au survol */
    transform: translateX(2px);
}

/* Ajustement pour mobile si nécessaire */
@media (max-width: 1024px) {
    .btn-logout {
        padding: 10px; /* Plus facile à cliquer sur mobile */
    }
}

/* =========================================
   📱 RESPONSIVE DESIGN (GLOBAL)
========================================= */

/* --- OVERLAY & HAMBURGER --- */
.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 1090; backdrop-filter: blur(4px); transition: var(--transition);
    opacity: 0;
}
.sidebar-overlay.show { display: block; opacity: 1; }

.hamburger-btn {
    display: none; position: fixed; top: 20px; left: 20px; z-index: 1050;
    background: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-radius: 12px;
    width: 45px; height: 45px; align-items: center; justify-content: center;
    font-size: 20px; color: var(--primary-color); cursor: pointer;
    backdrop-filter: blur(10px); transition: var(--transition);
}
.hamburger-btn:hover { background: #fff; transform: scale(1.05); }



/* =========================================
   📱 RESPONSIVE DESIGN & MENU MOBILE
========================================= */

/* Overlay et Hamburger (Masqués sur PC) */
.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 1090; backdrop-filter: blur(4px); transition: opacity 0.3s;
    opacity: 0; pointer-events: none;
}
.sidebar-overlay.show { display: block; opacity: 1; pointer-events: auto; }

.sidebar-overlay.show + .hamburger-btn {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

.hamburger-btn {
    display: none; position: fixed; top: 20px; left: 20px; z-index: 1150;
    background: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-radius: 12px;
    width: 45px; height: 45px; align-items: center; justify-content: center;
    font-size: 20px; color: var(--primary-color); cursor: pointer;
    backdrop-filter: blur(10px); transition: var(--transition);
}
.hamburger-btn:hover { background: #fff; transform: scale(1.05); }


/* --- KPI DASHBOARD --- */
.kpi-dashboard {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 30px;
}
.glass-panel {
    background: var(--glass-bg); border-radius: var(--radius-lg);
    box-shadow: var(--glass-panel-shadow); backdrop-filter: blur(10px);
}
.kpi-card { padding: 32px; display: flex; flex-direction: column; justify-content: space-between; transition: var(--transition);}
.kpi-tracking { cursor: pointer; }
.kpi-tracking:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(255, 255, 255, 1); }

.kpi-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px;}
.kpi-subtitle { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 600; }
.kpi-title { font-size: 22px; font-weight: 700; color: var(--text-main); margin-top: 4px; }

.kpi-icon-wrapper {
    width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; background: var(--primary-light); color: var(--primary-color);
}
.rank-silver-bg { background: rgba(148, 163, 184, 0.15); color: var(--rank-silver); }

.kpi-big-number { font-size: 48px; font-weight: 800; line-height: 1; margin-bottom: 15px; color: var(--primary-color); }
.kpi-big-number span { font-size: 20px; font-weight: 500; color: var(--text-muted); }

.kpi-progress-container { width: 100%; }
.kpi-progress-bar { width: 100%; height: 8px; background: rgba(0,0,0,0.05); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.kpi-progress-fill { height: 100%; background: var(--primary-color); border-radius: 4px; transition: width 1s ease-out; }
.silver-gradient { background: linear-gradient(90deg, #94A3B8, #CBD5E1); }

.kpi-progress-text { font-size: 14px; color: var(--text-muted); }
.kpi-progress-text strong { color: var(--text-main); }
.rank-gold-text { color: var(--rank-gold); font-weight: 700; }
.rank-silver { background: linear-gradient(135deg, #94A3B8, #64748B); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* --- ÉTATS DE SUCCÈS KPI --- */
.kpi-success { 
    border: 1px solid rgba(16, 185, 129, 0.3); 
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1); 
}
.success-gradient-bg { 
    background: linear-gradient(135deg, #10B981, #059669) !important; 
    color: white !important; 
}
.text-success { color: var(--success-color) !important; }
.mb-15 { margin-bottom: 15px; }

.btn-cert-access {
    width: 100%; padding: 12px; border-radius: 12px; border: none; font-weight: 700; font-size: 14px;
    background: linear-gradient(135deg, #F59E0B, #E65100); color: white; cursor: pointer;
    transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-cert-access:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4); 
    filter: brightness(1.05); 
}


    /* Responsive Mobile : On réduit un peu la taille du titre */
@media (max-width: 768px) {
    .page-title { font-size: 24px; }
    .title-icon-wrapper { width: 44px; height: 44px; font-size: 18px; }
    .content-wrapper { padding: 90px 20px 40px 20px; }
}

.page-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    background:none;
}

.title-icon-wrapper {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--primary-color), #8E2DE2);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.3);
}




/* Tracking header */


.tracking-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; border-bottom: 1px solid rgba(0, 0, 0, 0.05);}
.tracking-header h2 { font-size: 20px;  margin: 0; }
.btn-outline { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-outline:hover { background: var(--primary-color); color: white; }

.mini-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 25px; }
.mini-stat { background: rgba(255,255,255,0.5); padding: 15px 10px; border-radius: 12px; text-align: center; border: 1px solid rgba(255,255,255,0.6); }
.stat-num { display: block; font-size: 24px; font-weight: 700; color: var(--text-main); line-height: 1; margin-bottom: 4px; }
.stat-lbl { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.text-warning { color: var(--warning-color); }
.text-success { color: var(--success-color); }

.tasks-title { font-size: 14px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 15px; letter-spacing: 0.5px; }
.tasks-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; overflow-y: auto;}

.task-item { 
    display: flex; align-items: center; padding: 16px; background: #fff; border-radius: 12px;
    cursor: pointer; transition: var(--transition); border: 1px solid transparent; box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    width: 95%;
}
.task-item:hover { border-color: var(--primary-light); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.priority-high { border-left: 4px solid var(--danger-color); }
.priority-medium { border-left: 4px solid var(--warning-color); }
.priority-low { border-left: 4px solid var(--success-color); }

.task-checkbox { width: 20px; height: 20px; border: 2px solid var(--secondary-mid); border-radius: 6px; margin-right: 15px; flex-shrink: 0; transition: 0.2s; position: relative;}
.task-item.done .task-checkbox { background: var(--success-color); border-color: var(--success-color); }
.task-item.done .task-checkbox::after { content: '✓'; position: absolute; color: white; font-size: 12px; top: 50%; left: 50%; transform: translate(-50%, -50%); }

.task-info { flex: 1; display: flex; flex-direction: column; }
.task-name { font-size: 15px; font-weight: 600; color: var(--text-main); margin-bottom: 2px; transition: 0.2s;}
.task-item.done .task-name { text-decoration: line-through; color: var(--text-muted); }
.task-meta { font-size: 12px; color: var(--text-muted); }

.task-arrow { color: var(--secondary-mid); font-size: 12px; transition: 0.2s;}
.task-item:hover .task-arrow { color: var(--primary-color); transform: translateX(2px);}

.btn-full-width { 
    width: 100%; padding: 14px; background: var(--glass-bg); border: 1px dashed var(--primary-color);
    color: var(--primary-color); font-weight: 600; border-radius: 12px; cursor: pointer; transition: var(--transition); margin-top: auto;
}
.btn-full-width:hover { background: var(--primary-light); }

/* --- RESPONSIVE < 1024px (Tablettes) --- */
@media (max-width: 1024px) {
    .hamburger-btn { display: flex; }
    
    .premium-sidebar { 
        transform: translateX(-100%); 
        transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    }
    .premium-sidebar.show { transform: translateX(0); }

    /* Ajustement de la page */
    .content-wrapper {
        margin-left: 0;
        width: 100%;
        padding: 100px 20px 40px 20px;
    }
    .kpi-dashboard { grid-template-columns: 1fr; }
    .action-row { grid-template-columns: 1fr; }
}


/* --- TABLETTES & PETITS ÉCRANS (Max 1024px) --- */
@media (max-width: 1024px) {
    /* Menu & Hamburger */
    .hamburger-btn { display: flex; }
    .premium-sidebar { 
        transform: translateX(-100%); 
        transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    }
    .premium-sidebar.show { transform: translateX(0); }
    
    /* Layout */
    .content-wrapper { margin-left: 0; width: 100%; padding: 90px 20px 40px 20px; }
    .kpi-dashboard { grid-template-columns: 1fr; }
    .main-section { flex-direction: column; }
}

@media (max-width: 1024px) {
    .content-wrapper {
        margin-left: 0;
        width: 100%;
        padding: 100px 20px 40px 20px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding-bottom: 100px;
    }
}



/* --- MOBILES (Max 768px) --- */
@media (max-width: 768px) {
    /* KPIs */
    .kpi-card { padding: 20px; }
    .kpi-big-number { font-size: 36px; }
    
    /* Action Row */
    .action-card { flex-direction: column; text-align: center; gap: 20px; padding: 24px; }
    .arrow { display: none; } /* On masque la flèche sur mobile */
    .reco-text h3 { font-size: 20px; }

    /* Panneaux */
    .left-panel, .right-panel { padding: 16px; }
    .mini-stats-grid { grid-template-columns: 1fr; gap: 8px; }
    #map-container { height: 350px; }
    
    /* Historique */
    .history-wrapper { padding: 20px; }
    .hist-card { flex: 0 0 220px; padding: 16px; }
}


/* --- RESPONSIVE < 768px (Mobiles) --- */
@media (max-width: 768px) {
    /* 1. TRANSFORMATION DU DOCKER EN "BOTTOM BAR" MOBILE */
    .floating-docker {
        top: auto !important; 
        bottom: 20px !important; 
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important; /* Centrage parfait depuis la gauche */
        width: calc(100% - 40px) !important; 
        max-width: 400px;
        justify-content: center;
        padding: 8px !important;
        border-radius: 20px !important;
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.8) !important;
        z-index: 9999 !important; /* Force le passage au-dessus de tout le reste */
        display: flex !important;
    }
    
    /* On annule les restrictions de taille de la version tablette */
    .btn-docker { 
        flex: 1; 
        justify-content: center; 
        padding: 12px 4px !important; 
        border-radius: 14px !important; 
        width: auto !important; 
        height: auto !important; 
    }
    
    /* On force l'affichage du texte dans la bottom bar */
    .docker-text { 
        display: inline-block !important; 
        font-size: 11px; 
        white-space: nowrap; /* Empêche le texte de passer sur deux lignes */
    }}

