:root {
    color-scheme: dark;
    /* DEFAULT DARK (CYBER) */
    --bg-dark: #020617;
    --card-bg: rgba(15, 23, 42, 0.7);
    --modal-bg: #0f172a;
    --primary: #06b6d4;
    --secondary: #d946ef;
    --accent: #8b5cf6;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.05);
    --neon-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    --primary-gradient: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    --input-bg: rgba(255, 255, 255, 0.03);
    --scrollbar-thumb: rgba(6, 182, 212, 0.2);
    --skeleton-bg: rgba(255, 255, 255, 0.05);
    --bg-gradient: radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
                   radial-gradient(circle at 80% 70%, rgba(217, 70, 239, 0.08) 0%, transparent 40%);
}

[data-theme="light"] {
    color-scheme: light;
    /* LIGHT MODE SOBRE, MODERNE & HAUTE LISIBILITÉ (STYLE LINEAR / NOTION) */
    --bg-dark: #f8fafc;          /* Slate 50 : Fond blanc minéral apaisant */
    --card-bg: #ffffff;          /* Blanc pur pour les cartes */
    --modal-bg: #ffffff;
    --primary: #0284c7;          /* Sky 600 : Bleu-Cyan profond haute lisibilité sur blanc */
    --secondary: #4f46e5;        /* Indigo 600 : Sobre et académique */
    --accent: #6366f1;           /* Indigo 500 */
    --text-main: #0f172a;        /* Slate 900 : Noir d'encre profond (contraste maximal) */
    --text-dim: #475569;         /* Slate 600 : Gris ardoise net et parfaitement lisible */
    --glass-border: #cbd5e1;     /* Slate 300 : Bordures fines et nettes */
    --neon-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
    --primary-gradient: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    --input-bg: #f1f5f9;         /* Slate 100 : Fond de champ doux et bien délimité */
    --scrollbar-thumb: #94a3b8;
    --skeleton-bg: #e2e8f0;
    --bg-gradient: radial-gradient(circle at 20% 20%, rgba(2, 132, 199, 0.06) 0%, transparent 45%),
                   radial-gradient(circle at 80% 80%, rgba(79, 70, 229, 0.05) 0%, transparent 45%);
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

@keyframes skeleton-pulse {
    0% { background-color: var(--skeleton-bg); }
    50% { background-color: rgba(150, 150, 150, 0.1); }
    100% { background-color: var(--skeleton-bg); }
}

.skeleton {
    animation: skeleton-pulse 1.5s infinite ease-in-out;
    border-radius: 8px;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* CYBER BACKGROUND */
.premium-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    z-index: -1;
}

.premium-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 20px;
    padding: 25px;
    max-width: 1600px;
    margin: 0 auto;
}

.bento-item {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--neon-shadow);
}

.bento-item::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.bento-item:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 10px 40px -10px rgba(6, 182, 212, 0.2);
}

.bento-item h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-premium {
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(6, 182, 212, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-ai-small {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 12px 24px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.25);
}

.btn-ai-small:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(2, 132, 199, 0.4);
}

/* LANDING & GENERAL COMPONENTS */
.btn {
    padding: 14px 28px;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.45);
}

.btn-secondary {
    background: var(--input-bg);
    color: var(--text-main);
    border: 1.5px solid var(--glass-border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.hero {
    padding: 120px 0 80px;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    gap: 60px;
    text-align: left;
}

.hero-content {
    flex: 1.2;
}

.hero-image {
    flex: 0.8;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 25px;
    color: var(--text-main);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-dim);
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .hero-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .hero-image {
        max-width: 500px;
        margin: 0 auto;
    }
}

.features {
    padding: 80px 0;
}

.features .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 40px;
    text-align: center;
}

.card i {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--primary);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* MODALS & FORMS */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal {
    width: 100%;
    max-width: 500px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--modal-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 30px 25px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.modal::-webkit-scrollbar {
    width: 6px;
}

.modal::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
}

input, select, textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.3s;
}

select {
    background-color: #0f172a;
    color: #f8fafc;
    cursor: pointer;
}

select option {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 10px;
    font-weight: 500;
}

select optgroup {
    background-color: #020617;
    color: #06b6d4;
    font-weight: 800;
    font-style: normal;
}

[data-theme="light"] select {
    background-color: #f1f5f9;
    color: #0f172a;
}

[data-theme="light"] select option {
    background-color: #ffffff;
    color: #0f172a;
}

[data-theme="light"] select optgroup {
    background-color: #f1f5f9;
    color: #0284c7;
    font-weight: 800;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--modal-bg);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.plan-day {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--input-bg);
    border-radius: 16px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

/* CARTE DE CHOIX DU DIAGNOSTIC ERGONOMIQUE */
.quiz-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.quiz-option-card:hover {
    border-color: var(--primary);
    background: rgba(2, 132, 199, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.quiz-option-card input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.quiz-option-card.selected {
    border-color: var(--primary);
    background: rgba(2, 132, 199, 0.12);
    box-shadow: 0 0 0 2px var(--primary);
}

.quiz-option-card span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.4;
    flex: 1;
}

#prev-step {
    color: var(--text-main) !important;
    background: rgba(150, 150, 150, 0.15) !important;
    border: 1px solid var(--glass-border) !important;
    font-weight: 600;
}

.day-num {
    width: 35px;
    height: 35px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: white;
}

.prompt-box {
    background: var(--input-bg);
    padding: 15px;
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s;
}

.prompt-box:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(2, 132, 199, 0.08);
}

/* CYBER CHAT BUBBLES */
.msg-ai {
    background: var(--card-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-left: 4px solid var(--primary) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    color: var(--text-main);
}

.msg-user {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.2);
}

/* SIDEBAR */
aside {
    background: var(--card-bg) !important;
    border-right: 1px solid var(--glass-border) !important;
}

.history-item {
    transition: all 0.2s;
    color: var(--text-main);
    background: var(--input-bg) !important;
}

.history-item:hover {
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: var(--primary) !important;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

@media (max-width: 1200px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .bento-grid { grid-template-columns: 1fr; }
    aside { display: none; }
}

/* ==========================================================================
   REFONTE UX : ACTIONS MESSAGES, CARNET DOCUMENTS, EXPORT & IMPRESSION PRO
   ========================================================================== */

.msg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--glass-border);
}

.msg-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.msg-action-btn:hover {
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Onglets Navigation (Assistant / Carnet / Planning) */
.nav-tabs {
    display: flex;
    gap: 8px;
    background: var(--input-bg);
    padding: 5px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
}

.nav-tab {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dim);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 7px;
}

.nav-tab.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

/* Cartes de Documents Sauvegardés */
.doc-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 18px;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Toast Notification */
.toast-notif {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--modal-bg);
    color: var(--text-main);
    border: 1.5px solid var(--primary);
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-notif.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Zone d'impression dédiée A4 */
#printable-sheet {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    #printable-sheet, #printable-sheet * {
        visibility: visible;
    }
    #printable-sheet {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 25px 35px;
        background: #ffffff !important;
        color: #111827 !important;
        font-family: 'Outfit', Arial, sans-serif;
    }
    .no-print {
        display: none !important;
    }
}

/* Cartes Graphiques Scientifiques (Courbes Maths, Schémas Physique, Planches SVT) */
.scientific-diagram-card {
    margin: 16px 0;
    border-radius: 16px;
    border: 1.5px solid rgba(6, 182, 212, 0.35);
    background: #ffffff;
    color: #0f172a;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.scientific-diagram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.scientific-svg-board {
    padding: 16px;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
}

.scientific-svg-board svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.visual-tool-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.28);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.visual-tool-pill:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* =========================================================================
   LANDING PAGE & DASHBOARD — ADAPTATION PARFAITE SOMBRE / CLAIR SOBRE & MOBILE
   ========================================================================= */

.lp-header {
    padding: 16px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 900;
}

.lp-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lp-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
    flex-shrink: 0;
}

.lp-brand-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: block;
    line-height: 1.1;
}

.lp-brand-sub {
    font-size: 0.68rem;
    color: var(--text-dim);
    font-weight: 600;
    margin-top: 2px;
}

.lp-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lp-header-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-theme-btn {
    padding: 10px 14px;
    font-size: 0.9rem;
}

.lp-login-btn {
    padding: 10px 18px;
    font-size: 0.85rem;
}

.lp-cta-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.hero {
    padding: 50px 0 60px;
}

.hero-main-title {
    font-size: clamp(2.1rem, 4.2vw, 3.3rem);
    line-height: 1.15;
    margin-bottom: 18px;
}

.hero-main-desc {
    font-size: 1.12rem;
    line-height: 1.7;
    margin-top: 18px;
    margin-bottom: 22px;
}

.hero-bullets {
    display: grid;
    gap: 12px;
    margin: 22px 0;
    font-size: 0.95rem;
    text-align: start;
}

.hero-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.hero-btn-main {
    padding: 16px 32px;
    font-size: 1.05rem;
    font-weight: 800;
}

.hero-btn-sec {
    padding: 16px 26px;
    font-size: 1rem;
}

.lp-alt-section {
    background: var(--input-bg);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.hero-preview-card {
    background: var(--card-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: 32px;
    padding: 28px;
    box-shadow: var(--neon-shadow);
}

.hero-preview-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    text-align: start;
}

.hero-preview-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--primary);
    flex-shrink: 0;
}

.hero-preview-title {
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.25;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.profiles-showcase-box {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 36px 28px;
    box-shadow: var(--neon-shadow);
}

.dashboard-nav {
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 15px;
}

.chat-messages-box {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--input-bg);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    max-height: 510px;
}

.lang-switch-bar {
    display: inline-flex;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
}

.lang-switch-btn {
    border: none;
    background: transparent;
    color: var(--text-dim);
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.lang-switch-btn.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.urgency-banner {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.12) 0%, rgba(245, 158, 11, 0.12) 50%, rgba(2, 132, 199, 0.12) 100%);
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
    padding: 10px 16px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
}

.lp-section {
    padding: 75px 0;
    position: relative;
}

.pricing-section {
    padding-top: 30px;
    padding-bottom: 90px;
}

.lp-section-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 50px auto;
}

.lp-eyebrow {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.3);
    color: var(--primary);
    margin-bottom: 14px;
    max-width: 100%;
}

.lp-title {
    font-size: clamp(1.7rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 16px;
    color: var(--text-main);
}

.lp-subtitle {
    font-size: 1.06rem;
    color: var(--text-dim);
    line-height: 1.65;
}

.pain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.pain-card {
    background: var(--card-bg);
    border: 1.5px solid rgba(239, 68, 68, 0.28);
    border-radius: 24px;
    padding: 28px;
    position: relative;
    box-shadow: var(--neon-shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.pain-card:hover {
    transform: translateY(-5px);
    border-color: rgba(239, 68, 68, 0.6);
}

.pain-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #dc2626;
    margin-bottom: 10px;
    display: block;
}

.vs-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px;
    border: 1.5px solid var(--glass-border);
    background: var(--card-bg);
    box-shadow: var(--neon-shadow);
}

.vs-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    color: var(--text-main);
}

.vs-table th, .vs-table td {
    padding: 18px 22px;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.vs-table th {
    font-size: 1rem;
    font-weight: 800;
    background: var(--input-bg);
    color: var(--text-main);
}

.vs-highlight-col {
    background: rgba(2, 132, 199, 0.06);
    border-left: 1px solid rgba(2, 132, 199, 0.22);
    border-right: 1px solid rgba(2, 132, 199, 0.22);
}

.profile-pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.profile-showcase-card {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 22px;
    transition: all 0.25s ease;
}

.profile-showcase-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--neon-shadow);
}

.audience-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.audience-box {
    border-radius: 28px;
    padding: 36px 32px;
    background: var(--card-bg);
    border: 1.5px solid var(--glass-border);
    box-shadow: var(--neon-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-mega-card {
    max-width: 680px;
    margin: 0 auto;
    border-radius: 32px;
    padding: 44px 36px;
    background: var(--card-bg);
    border: 2px solid var(--primary);
    box-shadow: var(--neon-shadow);
    text-align: center;
    position: relative;
}

.pricing-card-title {
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.pricing-amount {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.05;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-features-list {
    text-align: start;
    max-width: 480px;
    margin: 28px auto;
    display: grid;
    gap: 12px;
    font-size: 0.95rem;
}

.pricing-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

.pricing-cta-btn {
    width: 100%;
    max-width: 440px;
    padding: 18px 30px;
    font-size: 1.12rem;
    font-weight: 800;
}

/* Barre fixe bas d'écran mobile (masquée sur ordinateur) */
.mobile-sticky-cta {
    display: none;
}

[dir="rtl"] .vs-table {
    text-align: right;
}

.msg-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.msg-content-body th, .msg-content-body td {
    border: 1px solid var(--glass-border);
    padding: 8px 12px;
    text-align: left;
}

.msg-content-body th {
    background: var(--input-bg);
    font-weight: 700;
}

/* =========================================================================
   RESPONSIVE MOBILE & TABLETTE (OPTIMISATION ERGONOMIQUE TACTILE)
   ========================================================================= */

@media (max-width: 992px) {
    .hero-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .hero-image {
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }

    .cta-group {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    /* Bandeau supérieur compact sur mobile */
    .urgency-banner {
        font-size: 0.76rem;
        padding: 8px 12px;
        line-height: 1.35;
    }

    /* Header Mobile en 2 lignes nettes et aérées */
    .lp-header {
        padding: 10px 14px;
        gap: 10px;
    }

    .lp-logo-img {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .lp-brand-title {
        font-size: 1.08rem;
    }

    .lp-brand-sub {
        font-size: 0.58rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 185px;
    }

    .lp-header-actions {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .lang-switch-bar {
        flex: 1;
        justify-content: center;
    }

    .lang-switch-btn {
        flex: 1;
        padding: 6px 10px;
        font-size: 0.76rem;
        text-align: center;
    }

    .lp-header-btns {
        gap: 6px;
    }

    .lp-theme-btn {
        padding: 8px 11px;
        font-size: 0.82rem;
        border-radius: 11px;
    }

    .lp-login-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
        border-radius: 11px;
        white-space: nowrap;
    }

    /* Le bouton Diagnostic est déjà dans le Hero et dans la barre fixe du bas sur mobile */
    .lp-cta-btn {
        display: none;
    }

    /* Hero Mobile */
    .hero {
        padding: 26px 0 38px !important;
    }

    .lp-eyebrow {
        font-size: 0.68rem;
        padding: 5px 12px;
        letter-spacing: 0.4px;
        line-height: 1.35;
    }

    .hero-main-title {
        font-size: 1.68rem !important;
        line-height: 1.22 !important;
        margin-bottom: 14px;
    }

    .hero-main-desc {
        font-size: 0.96rem !important;
        line-height: 1.58 !important;
        margin-top: 10px;
        margin-bottom: 18px;
    }

    .hero-bullets {
        font-size: 0.88rem;
        gap: 10px;
        margin: 16px 0;
        background: var(--card-bg);
        border: 1px solid var(--glass-border);
        border-radius: 18px;
        padding: 16px 14px;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 18px;
    }

    .hero-btn-main,
    .hero-btn-sec {
        width: 100%;
        padding: 15px 20px;
        font-size: 0.98rem;
    }

    .price-tag {
        font-size: 0.82rem !important;
        line-height: 1.45;
    }

    /* Carte d'aperçu Hero sur mobile */
    .hero-preview-card {
        padding: 18px 16px;
        border-radius: 22px;
    }

    .hero-preview-header {
        gap: 10px;
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .hero-preview-logo {
        width: 46px;
        height: 46px;
        border-radius: 12px;
    }

    .hero-preview-title {
        font-size: 0.95rem;
    }

    .hero-stats-grid {
        gap: 6px;
    }

    /* Sections & Grilles sur mobile (1 seule colonne, zéro débordement) */
    .lp-section {
        padding: 44px 0;
    }

    .pricing-section {
        padding-top: 24px;
        padding-bottom: 105px; /* Espace pour la barre sticky mobile */
    }

    .lp-section-header {
        margin-bottom: 28px;
    }

    .lp-title {
        font-size: 1.48rem;
        line-height: 1.25;
    }

    .lp-subtitle {
        font-size: 0.94rem;
        line-height: 1.55;
    }

    .features .grid,
    .pain-grid,
    .profile-pill-grid,
    .audience-split {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .card,
    .pain-card,
    .audience-box {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .card i {
        font-size: 2rem;
        margin-bottom: 14px;
    }

    .card h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .pain-number {
        font-size: 1.85rem;
    }

    .profiles-showcase-box {
        padding: 22px 16px;
        border-radius: 22px;
    }

    .profiles-showcase-box h3 {
        font-size: 1.15rem !important;
        margin-bottom: 18px !important;
    }

    .profile-showcase-card {
        padding: 16px;
        border-radius: 16px;
    }

    .audience-box h3 {
        font-size: 1.32rem !important;
        line-height: 1.3;
    }

    /* Tableau comparatif adapté à l'écran mobile sans défilement pénible */
    .vs-table-wrap {
        border-radius: 18px;
    }

    .vs-table th,
    .vs-table td {
        padding: 12px 10px;
        font-size: 0.8rem;
        line-height: 1.38;
    }

    .vs-table th {
        font-size: 0.82rem;
    }

    /* Carte Tarif Unique sur mobile */
    .pricing-mega-card {
        padding: 28px 18px;
        border-radius: 24px;
    }

    .pricing-card-title {
        font-size: 1.48rem;
    }

    .pricing-amount {
        font-size: 2.9rem;
    }

    .pricing-features-list {
        font-size: 0.88rem;
        gap: 10px;
        margin: 20px auto;
    }

    .pricing-cta-btn {
        padding: 16px 20px;
        font-size: 0.98rem;
    }

    /* Modale d'inscription, Questionnaire & Paiement sur mobile */
    .modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .modal {
        padding: 22px 18px;
        border-radius: 22px;
        max-height: 92vh;
    }

    #questionnaire .glass,
    #payment .glass {
        padding: 24px 16px !important;
        border-radius: 20px !important;
    }

    #quiz-title {
        font-size: 1.4rem !important;
    }

    .quiz-option-card {
        padding: 13px 14px;
        gap: 12px;
        border-radius: 14px;
    }

    .quiz-option-card span {
        font-size: 0.92rem;
    }

    /* Masquer le bouton thème flottant sur mobile (déjà présent dans le header) */
    #theme-toggle {
        display: none !important;
    }

    /* Barre d'action fixe en bas sur Mobile */
    .mobile-sticky-cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: var(--modal-bg);
        border-top: 1.5px solid var(--glass-border);
        box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.25);
        z-index: 880;
    }

    .mobile-sticky-info {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
    }

    .mobile-sticky-price {
        font-weight: 800;
        font-size: 1.05rem;
        color: var(--primary);
    }

    .mobile-sticky-sub {
        font-size: 0.72rem;
        font-weight: 700;
        color: #10b981;
    }

    .mobile-sticky-btn {
        padding: 12px 20px;
        font-size: 0.88rem;
        font-weight: 800;
        border-radius: 12px;
        white-space: nowrap;
        flex: 1;
        max-width: 230px;
    }
}

@media (max-width: 390px) {
    .lp-brand-sub {
        display: none;
    }

    .lang-switch-btn {
        font-size: 0.72rem;
        padding: 6px 8px;
    }

    .hero-main-title {
        font-size: 1.5rem !important;
    }

    .vs-table th,
    .vs-table td {
        padding: 10px 7px;
        font-size: 0.75rem;
    }
}

/* =========================================================================
   ESPACE ÉLÈVE (diagnostic.html) — ARCHITECTURE DESKTOP & MOBILE RESPONSIVE
   ========================================================================= */

.dashboard-shell {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.dashboard-sidebar {
    width: 265px;
    background: var(--card-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
}

.dashboard-scroll-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-user-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-user-info {
    text-align: right;
    margin-right: 6px;
}

.dashboard-grid {
    padding: 22px;
    gap: 22px;
    max-width: 1600px;
    width: 100%;
}

.dashboard-col-left {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dashboard-col-main {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    min-height: 760px;
    padding: 22px;
}

.dashboard-col-right {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.courses-library-box {
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}

.mobile-chat-actions {
    display: none;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.chat-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.chat-panel-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompts-scroll-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.visual-studio-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: center;
}

.chat-input-bar {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-field {
    flex: 1;
    padding: 16px 20px;
    border-radius: 14px;
    border: 1.5px solid var(--glass-border);
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 0.95rem;
}

.chat-send-btn {
    padding: 15px 24px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Tablette & Mobile (<= 1100px) : 1 seule colonne, Tuteur IA en premier ! */
@media (max-width: 1100px) {
    .dashboard-sidebar {
        display: none !important;
    }

    .mobile-chat-actions {
        display: flex;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
        padding: 14px;
        gap: 16px;
    }

    .dashboard-col-main {
        grid-column: span 1 !important;
        order: 1;
        min-height: auto;
        padding: 16px;
    }

    .dashboard-col-left {
        grid-column: span 1 !important;
        order: 2;
    }

    .dashboard-col-right {
        grid-column: span 1 !important;
        order: 3;
    }

    .courses-library-box {
        max-height: 360px;
    }
}

/* Smartphone (<= 768px) : Optimisation ergonomique tactile */
@media (max-width: 768px) {
    #main-content {
        height: auto !important;
        min-height: 100vh;
    }

    .dashboard-shell {
        overflow: visible;
    }

    .dashboard-scroll-area {
        overflow-y: visible;
    }

    .dashboard-nav {
        padding: 10px 14px;
        gap: 10px;
    }

    .dashboard-brand img {
        width: 34px !important;
        height: 34px !important;
    }

    .dashboard-brand h3 {
        font-size: 1rem !important;
    }

    .dashboard-user-info {
        display: none;
    }

    /* Afficher le bouton thème dans la navbar de diagnostic.html sur mobile */
    .dashboard-nav #theme-toggle {
        display: inline-flex !important;
    }

    .nav-tabs {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .nav-tab {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.78rem;
    }

    .mobile-chat-actions {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-chat-actions .msg-action-btn {
        flex-shrink: 0;
        padding: 7px 12px;
        font-size: 0.76rem;
    }

    .chat-panel-title {
        font-size: 1.08rem;
    }

    .prompts-scroll-row {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .prompts-scroll-row button {
        flex-shrink: 0;
    }

    .visual-studio-bar {
        gap: 6px;
    }

    .visual-tool-pill {
        padding: 6px 10px;
        font-size: 0.73rem;
    }

    .chat-messages-box {
        height: 56vh;
        min-height: 340px;
        max-height: 520px;
        padding: 12px;
    }

    .msg-ai,
    .msg-user {
        max-width: 96% !important;
        padding: 13px 15px !important;
        font-size: 0.92rem;
    }

    .chat-input-bar {
        margin-top: 12px;
        gap: 8px;
    }

    .chat-input-field {
        padding: 13px 14px;
        font-size: 0.9rem;
    }

    .chat-send-btn {
        padding: 13px 16px;
    }

    .send-btn-label {
        display: none;
    }
}
