:root {
    --bg-color: #040507;
    --card-bg: #090c10;
    --card-border: #11151d;
    --accent-lime: #9eff00;
    --text-main: #f5f6f9;
    --text-muted: #4e5866;
    --safe-green: #00ff51;
    --timeline-bg: #161a24;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.main-wrapper {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
}

header {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-wrapper {
    position: relative;
}

#langSelect {
    background: #0d1017;
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    padding: 5px 24px 5px 10px;
    font-size: 10px;
    font-weight: bold;
    font-family: monospace;
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

#langSelect:hover,
#langSelect:focus {
    border-color: var(--accent-lime);
    color: var(--text-main);
}

.lang-wrapper::after {
    content: '▼';
    font-size: 8px;
    color: var(--accent-lime);
    position: absolute;
    right: 8px;
    top: 9px;
    pointer-events: none;
}

/* ── Logo "AI MASTER G" — source unique de vérité ──────────────────────────── */
.brand-logo {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-main);
}
.brand-logo .logo-ai {
    color: var(--accent-lime);
    letter-spacing: 3px;
    margin-right: 1px;
}
.brand-logo .logo-g {
    color: var(--accent-lime);
    text-shadow:
        0 0 6px  #9eff00,
        0 0 18px #9eff0099,
        0 0 38px #9eff0044;
}
/* Version footer — légèrement atténuée, même taille */
.brand-logo--footer {
    opacity: 0.35;
}
.brand-logo--footer .logo-g {
    text-shadow: none;
}

/* Alias app header (conservé pour compatibilité) */
.plugin-title { /* styles hérités de brand-logo via double classe */ }

.status {
    font-family: monospace;
    color: var(--safe-green);
    font-size: 11px;
}

.container {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.drop-zone {
    border: 2px dashed #161a24;
    background: var(--card-bg);
    border-radius: 6px;
    padding: 60px 15px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.drop-zone:hover {
    border-color: var(--accent-lime);
}

.drop-icon {
    font-size: 32px;
}

.drop-text {
    margin: 10px 0 0 0;
    font-weight: 600;
    font-size: 13px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    display: none;
}

/* ─── Tablette ──────────────────────────────────────────────────────────────── */
@media (max-width: 800px) {
    .dashboard {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ─── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {

    body {
        padding: 14px;
    }

    /* Header */
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 12px;
        margin-bottom: 14px;
    }

    .header-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        overflow: visible;
    }

    /* Ordre mobile : Activer → Lang → ? → × | Status (ligne 2) */
    .btn-activate-wrap { order: 1; }
    .lang-wrapper      { order: 2; margin-left: 0; }
    #btnTutorial       { order: 3; }
    #btnLeaveApp       { order: 4; margin-left: auto; }
    #globalStatus      { order: 5; width: 100%; text-align: center; }

    /* Lang select : futuriste uniforme sur mobile — !important pour forcer sur tous navigateurs */
    #langSelect,
    .lp-lang-select {
        min-width: 54px !important;
        color: #f5f6f9 !important;
        -webkit-text-fill-color: #f5f6f9 !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        background: #0d1017 !important;
        border: 1px solid #9eff00 !important;
        padding: 5px 22px 5px 10px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        font-family: monospace !important;
        border-radius: 4px !important;
        opacity: 1 !important;
    }
    .lang-wrapper::after,
    .lp-lang-wrapper::after {
        display: block !important;
        font-size: 7px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        right: 7px !important;
    }

    /* Bouton Quitter : compact, ne déborde plus */
    .btn-leave-app {
        font-size: 0;
        padding: 6px 10px;
        margin-left: auto;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .btn-leave-app::after {
        content: '×';
        font-size: 14px;
        font-weight: 700;
    }

    .plugin-title {
        font-size: 17px;
        letter-spacing: 1px;
        width: 100%;
        text-align: left;
    }

    /* Glow réduit sur mobile pour économiser les ressources GPU */
    .plugin-title span:last-child {
        text-shadow:
            0 0 5px  #9eff00,
            0 0 14px #9eff0077;
    }

    #globalStatus {
        font-size: 10px;
        text-align: center;
    }

    /* Cards */
    .card,
    .control-card {
        padding: 14px;
    }

    /* Template card header */
    .template-card-header {
        gap: 8px;
    }

    .ai-connect-btn {
        padding: 5px 8px;
        font-size: 8px;
        letter-spacing: 0.5px;
    }

    /* Tooltip désactivé sur mobile (pas de hover) */
    .ai-connect-btn::after {
        display: none;
    }

    /* Selector group : select pleine largeur, boutons en rangée */
    .template-selector-group {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        min-width: 0;
    }
    .template-selector-group > * {
        min-width: 0;
        box-sizing: border-box;
    }
    .ctd, .ctd-trigger {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    .ctd-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    .select-wrapper {
        flex: 1 1 100%;
        order: 1;
    }

    #renameInput {
        flex: 1 1 100%;
        order: 1;
    }

    button.icon-btn {
        width: 46px;
        height: 46px;
        font-size: 18px;
        order: 2;
    }

    /* Select arrow repositionné */
    .select-wrapper::after {
        top: 16px;
    }

    /* Métriques */
    .metric-display {
        font-size: 26px;
    }

    .sub-metric {
        font-size: 10px;
    }

    .diagnostic-text {
        font-size: 10px;
        line-height: 1.5;
    }

    /* Champs meta */
    .editable-meta-title {
        font-size: 14px;
    }

    /* Player bar */
    .audio-player-bar {
        padding: 12px 10px;
        gap: 10px;
    }

    .time-display {
        font-size: 11px;
        min-width: 34px;
    }

    /* Controls bar : 2×2 + Export pleine largeur */
    .controls-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }

    .controls-bar button.action-btn {
        flex: 1 1 calc(50% - 4px);
        padding: 13px 6px;
        font-size: 9px;
        letter-spacing: 1px;
    }

    #btnDownload,
    #btnNewTrack {
        flex: 1 1 100%;
    }

    /* AI panel */
    .ai-panel {
        padding: 10px;
    }

    .ai-panel-note {
        font-size: 9px;
    }

    .ai-key-input {
        font-size: 10px;
        padding: 8px;
    }

    .ai-save-btn,
    .ai-clear-btn {
        width: 36px;
        height: 36px;
    }

    /* Drop zone */
    .drop-zone {
        padding: 40px 15px;
    }

    /* Canvas FFT */
    canvas {
        height: 110px;
    }

    /* Footer */
    footer {
        margin-top: 24px;
        font-size: 9px;
    }

    /* Overflow app — contient tous les éléments dans la largeur du viewport */
    .main-wrapper {
        overflow-x: hidden;
        max-width: 100%;
    }
    .container, .dashboard,
    .card, .control-card, .template-card,
    .audio-player-bar, .controls-bar,
    .ai-panel, .ai-insights-panel, .ai-insights-tips,
    .app-toolbar, .drop-zone, .dsp-mode-row {
        max-width: 100%;
        box-sizing: border-box;
    }
    /* Empêche les items de grille d'élargir leur colonne au-delà du viewport */
    .dashboard > *,
    .container > * {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    .ai-insights-tip {
        min-width: 0;
        flex: 1 1 100%;
    }

    /* Spectrometer card header : wrap on mobile to prevent overflow */
    .flex-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .legend-group {
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Template card header : wrap on mobile */
    .template-card-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Platform target row : wrap on mobile */
    .platform-target-row {
        flex-wrap: wrap;
    }
    .platform-target-label {
        white-space: normal;
    }

    /* Landing — hero badge : compact pour tenir dans le viewport mobile */
    .lp-hero-badge {
        font-size: 7px;
        letter-spacing: 0px;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.card,
.control-card {
    background: var(--card-bg);
    border-radius: 6px;
    padding: 20px;
    border: 1px solid var(--card-border);
}

.card-full,
.template-card {
    grid-column: 1 / -1;
}

.card-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--blue);
    margin-bottom: 12px;
    font-weight: 700;
    display: block;
}

.flex-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legend-group {
    display: flex;
    gap: 15px;
    font-size: 10px;
    font-family: monospace;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.original-legend {
    color: #00aeff;
    font-weight: bold;
}

.master-legend {
    color: var(--accent-lime);
    font-weight: bold;
}

.metric-display {
    font-size: 32px;
    font-weight: 900;
    font-family: monospace;
}

.metric-unit {
    font-size: 14px;
    color: var(--text-muted);
}

.sub-metric {
    font-size: 11px;
    color: var(--text-muted);
    margin: 6px 0 0 0;
}

.editable-meta-title {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 900;
    width: 100%;
    padding: 4px 0;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.editable-meta-title:hover,
.editable-meta-title:focus {
    border-bottom-color: var(--accent-lime);
    background: #0d1017;
    padding-left: 5px;
}

.editable-meta-sub {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 11px;
    width: 100%;
    padding: 4px 0;
    margin-top: 6px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.editable-meta-sub:hover,
.editable-meta-sub:focus {
    border-bottom-color: var(--accent-lime);
    background: #0d1017;
    padding-left: 5px;
    color: var(--text-main);
}

.template-selector-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.select-wrapper {
    position: relative;
    flex: 1;
}

/* ─── Custom template dropdown (v1.05) ────────────────────────────────────────
   Remplace le <select> natif pour permettre les couleurs par item sur Windows.
   · Usine    → var(--text-main)   neutre
   · IA+      → #9eff00            vert lime  + préfixe ✦ IA+
   · Personal → #4ab8ff            bleu                                        */

/* Supprime la flèche CSS du wrapper parent (on a notre propre arrow) */
#selectWrapper::after { display: none; }

/* Conteneur */
.ctd {
    position: relative;
    width: 100%;
}

/* Trigger (zone cliquable visible) */
.ctd-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #0d1017;
    border: 1px solid #161a24;
    border-radius: 4px;
    padding: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
    transition: border-color 0.2s, color 0.2s;
    box-sizing: border-box;
    user-select: none;
}

.ctd-trigger:hover,
.ctd-trigger.open {
    border-color: var(--accent-lime);
}

/* Couleur du trigger selon le type du template sélectionné */
.ctd-trigger[data-type="ai"]       { color: #9eff00; }
.ctd-trigger[data-type="personal"] { color: #4ab8ff; }
.ctd-trigger[data-type="factory"]  { color: var(--text-main); }

.ctd-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.ctd-arrow {
    font-size: 9px;
    color: var(--accent-lime);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.ctd-trigger.open .ctd-arrow { transform: rotate(180deg); }

/* Liste déroulante */
.ctd-list {
    display: none;
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    width: 100%;
    background: #0d1017;
    border: 1px solid var(--accent-lime);
    border-radius: 4px;
    z-index: 200;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.ctd-list.open { display: block; }

/* En-têtes de groupe */
.ctd-group {
    padding: 6px 12px 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(245, 246, 249, 0.32);
    pointer-events: none;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.ctd-group:first-child { border-top: none; }

.ctd-group-factory  { color: rgba(255, 179, 0, 0.55); }
.ctd-group-ai       { color: rgba(158, 255, 0, 0.5); }
.ctd-group-personal { color: rgba(74, 184, 255, 0.5); }
.ctd-group-locked   { color: rgba(255, 179, 0, 0.3); opacity: 0.65; }

/* Items */
.ctd-item {
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ctd-item[data-type="ai"]       { color: #9eff00; }
.ctd-item[data-type="personal"] { color: #4ab8ff; }

.ctd-item:hover    { background: rgba(255, 255, 255, 0.06); }
.ctd-item.selected { background: rgba(255, 255, 255, 0.04); }
.ctd-item.selected::before {
    content: '▸ ';
    opacity: 0.5;
}

select {
    width: 100%;
    background: #0d1017;
    color: var(--text-main);
    border: 1px solid #161a24;
    padding: 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

select:focus {
    border-color: var(--accent-lime);
}

.select-wrapper::after {
    content: '▼';
    font-size: 10px;
    color: var(--accent-lime);
    position: absolute;
    right: 15px;
    top: 15px;
    pointer-events: none;
}

button.icon-btn {
    background: #0d1017;
    border: 1px solid #161a24;
    color: var(--accent-lime);
    font-size: 18px;
    font-weight: bold;
    width: 42px;
    height: 42px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

button.icon-btn:hover {
    background: var(--accent-lime);
    color: var(--bg-color);
    border-color: var(--accent-lime);
}

button.icon-btn.delete-btn:not(:disabled):hover {
    background: #ff3b30;
    border-color: #ff3b30;
    color: #fff;
}

button.icon-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

canvas {
    width: 100%;
    height: 140px;
    background: #060709;
    border-radius: 4px;
    display: block;
}

.audio-player-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    background: #0d1017;
    padding: 15px;
    border-radius: 6px;
    gap: 15px;
    border: 1px solid var(--card-border);
}

.time-display {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    min-width: 40px;
}

.timeline-container {
    flex: 1;
    height: 6px;
    background: var(--timeline-bg);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.timeline-progress {
    height: 100%;
    width: 0%;
    background: var(--text-main);
    border-radius: 3px;
    pointer-events: none;
}

.timeline-handle {
    width: 12px;
    height: 12px;
    background: var(--accent-lime);
    border-radius: 50%;
    position: absolute;
    top: -3px;
    left: 0%;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 8px rgba(158, 255, 0, 0.6);
    transition: transform 0.1s;
}

.timeline-container:hover .timeline-handle {
    transform: translateX(-50%) scale(1.3);
}

.controls-bar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0d1017;
    padding: 15px;
    border-radius: 6px;
    gap: 15px;
}

button.action-btn {
    background: none;
    border: 2px solid var(--text-main);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.15s ease;
}

button.action-btn.primary {
    border-color: var(--accent-lime);
    color: var(--accent-lime);
}

button.action-btn:hover {
    background: var(--text-main);
    color: var(--bg-color);
}

button.action-btn.primary:hover {
    background: var(--accent-lime);
    color: var(--bg-color);
}

button.action-btn:disabled {
    border-color: #161a24;
    color: #161a24;
    cursor: not-allowed;
    background: none !important;
}

button.bypass-btn {
    border-color: #333;
    color: #888;
}

button.bypass-btn.active {
    background: #ff3b30 !important;
    border-color: #ff3b30 !important;
    color: #fff !important;
}

.diagnostic-text {
    font-size: 12px;
    line-height: 1.6;
    color: var(--blue);
}

/* ── Badge mode DSP (LOCAL vs AI) ─────────────────────────────────────────── */
.dsp-mode-badge {
    display: block;
    width: fit-content;
    font-size: 10px;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 2px;
    margin-bottom: 8px;
}

.dsp-mode-badge.ai-mode {
    color: #FFB300;
    border: 1px solid rgba(255, 179, 0, 0.45);
    background: rgba(255, 179, 0, 0.07);
}

.dsp-mode-badge.local-mode {
    color: var(--text-muted);
    border: 1px solid rgba(78, 88, 102, 0.35);
    background: transparent;
}

.progress-container {
    width: 100%;
    background: #161a24;
    height: 6px;
    border-radius: 3px;
    margin-top: 10px;
    display: none;
    overflow: hidden;
    grid-column: 1 / -1;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-lime);
    transition: width 0.1s linear;
}

/* ─── Platform Target Row ──────────────────────────────────────────────────── */

.platform-target-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.platform-target-label {
    font-size: 10px;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--blue);
    white-space: nowrap;
}

.platform-target-select {
    flex: 1;
}

.platform-target-select select {
    padding: 7px 12px;
    font-size: 10px;
    font-family: monospace;
    color: var(--text-muted);
}

.platform-target-select select:focus {
    color: var(--text-main);
}

.platform-target-select::after {
    top: 10px;
    font-size: 8px;
}

/* ─── Template Card Header ─────────────────────────────────────────────────── */

.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.template-card-header .card-title {
    margin-bottom: 0;
}

/* ─── AI Connect Button ────────────────────────────────────────────────────── */

.ai-connect-btn {
    background: #0d1017;
    border: 1px solid var(--card-border);
    color: var(--accent-lime);
    font-size: 9px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 1.5px;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    white-space: nowrap;
}

.ai-connect-btn:hover {
    background: var(--accent-lime);
    color: var(--bg-color);
    border-color: var(--accent-lime);
}

/* État actif — clé API configurée */
.ai-connect-btn.active {
    background: var(--accent-lime);
    color: var(--bg-color);
    border-color: var(--accent-lime);
    animation: ai-pulse 2.5s ease-in-out infinite;
}

.ai-connect-btn.paused {
    background: transparent;
    color: #f5a623;
    border-color: #f5a623;
    animation: none;
    opacity: 0.85;
}

@keyframes ai-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(158, 255, 0, 0.55); }
    50%       { box-shadow: 0 0 0 6px rgba(158, 255, 0, 0);    }
}

/* ── Toggle AI+ ON / PAUSE ────────────────────────────────────────────── */
.ai-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 6px;
}

.ai-toggle-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.ai-toggle-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 8px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.ai-toggle-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s ease;
}

.ai-toggle-pill.active {
    border-color: rgba(158, 255, 0, 0.4);
    background: rgba(158, 255, 0, 0.08);
    color: var(--accent-lime);
}

.ai-toggle-pill.active .ai-toggle-dot {
    background: var(--accent-lime);
    box-shadow: 0 0 5px rgba(158, 255, 0, 0.6);
}

.ai-toggle-pill:not(.active) {
    border-color: rgba(245, 166, 35, 0.35);
    background: rgba(245, 166, 35, 0.06);
    color: #f5a623;
}

.ai-toggle-pill:not(.active) .ai-toggle-dot {
    background: #f5a623;
    box-shadow: 0 0 4px rgba(245, 166, 35, 0.5);
}

.ai-toggle-pill:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

/* Tooltip au survol */
.ai-connect-btn {
    position: relative;
}

.ai-connect-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: #0d1117;
    color: var(--text-main);
    font-size: 10px;
    font-family: monospace;
    font-weight: normal;
    line-height: 1.6;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid var(--card-border);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 300;
    white-space: normal;
}

.ai-connect-btn:hover::after {
    opacity: 1;
}

/* ─── Rename Input (replaces select in-place) ──────────────────────────────── */

.rename-input {
    flex: 1;
    background: #0d1017;
    border: 1px solid var(--accent-lime);
    color: var(--text-main);
    padding: 11px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
}

/* ─── AI Panel ─────────────────────────────────────────────────────────────── */

.ai-panel {
    margin-top: 12px;
    padding: 12px;
    background: #060709;
    border: 1px solid var(--card-border);
    border-radius: 4px;
}

/* ─── Providers AI ─────────────────────────────────────────────────────────── */

.ai-provider {
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

/* ChatGPT — cœur émotionnel central (prioritaire, or) */
.gpt-provider {
    border-color: rgba(255, 179, 0, 0.30);
    background:   rgba(255, 179, 0, 0.04);
}

/* Claude — second */
.claude-provider {
    border-color: rgba(116, 170, 156, 0.20);
    background:   rgba(116, 170, 156, 0.03);
}

/* Gemini — fallback */
.gemini-provider {
    border-color: var(--card-border);
    background:   transparent;
}

.ai-provider-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}

.ai-provider-name {
    font-size: 10px;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Couleurs des labels par provider (nouvel ordre de priorité) */
.gpt-provider    .ai-provider-name { color: #FFB300; }
.claude-provider .ai-provider-name { color: #74aa9c; }
.gemini-provider .ai-provider-name { color: var(--text-muted); }

/* Gem ✦ prioritaire — ChatGPT */
.ai-gpt-gem {
    font-size: 14px;
    color: #FFB300;
    line-height: 1;
}

.ai-provider-badge {
    font-size: 8px;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #FFB300;
    border: 1px solid rgba(255, 179, 0, 0.45);
    padding: 2px 5px;
    border-radius: 2px;
}

/* Bouton nouveau morceau */
button.action-btn.new-track-btn {
    border-color: #8a95a3;
    color: #8a95a3;
    font-size: 10px;
}

button.action-btn.new-track-btn:hover {
    background: #8a95a3;
    color: var(--bg-color);
    border-color: #8a95a3;
}

/* Note du panneau AI */
.ai-panel-note {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 10px 0;
    font-family: monospace;
}

.ai-key-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.ai-key-input {
    flex: 1;
    background: #0d1017;
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 8px 10px;
    font-size: 11px;
    border-radius: 4px;
    outline: none;
    font-family: monospace;
    transition: border-color 0.2s;
}

.ai-key-input:focus {
    border-color: var(--accent-lime);
}

.ai-save-btn,
.ai-clear-btn {
    background: #0d1017;
    border: 1px solid var(--card-border);
    color: var(--text-main);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-save-btn:hover { background: var(--safe-green); color: var(--bg-color); border-color: var(--safe-green); }
.ai-clear-btn:hover { background: #ff3b30; color: #fff; border-color: #ff3b30; }

.ai-key-status {
    font-size: 10px;
    font-family: monospace;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.ai-key-status.active {
    color: var(--safe-green);
}

.ai-enriched {
    font-style: italic;
    color: var(--accent-lime);
    font-size: 10px;
}

/* ─── AI Analysis Block (panneau DSP — templates enrichis) ─────────────────── */

.ai-analysis-block {
    margin-top: 10px;
    padding: 8px 10px;
    border-left: 2px solid rgba(255, 179, 0, 0.45);
    background: rgba(255, 179, 0, 0.04);
    border-radius: 0 4px 4px 0;
}

.ai-analysis-text {
    margin: 0 0 7px 0;
    font-size: 10.5px;
    line-height: 1.55;
    color: rgba(245, 246, 249, 0.60);
    font-style: italic;
}

.ai-tips-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ai-tip-item {
    display: block;
    font-size: 10px;
    letter-spacing: 0.03em;
    color: rgba(255, 179, 0, 0.70);
}

/* Variante moteur local (sans API) — même bloc, couleurs atténuées */
.ai-analysis-block.local-analysis-block {
    border-left-color: rgba(78, 88, 102, 0.45);
    background: transparent;
}

.ai-analysis-block.local-analysis-block .ai-analysis-text {
    color: rgba(245, 246, 249, 0.30);
    font-style: italic;
}

.ai-analysis-block.local-analysis-block .ai-tip-item {
    color: rgba(78, 88, 102, 0.90);
}

/* ─── AI Insights Panel — pleine largeur, hors grid card ──────────────────── */
/* Séparé des 3 cards du haut → hauteur du module DSP inchangée             */

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

@keyframes ai-gem-glow {
    0%, 100% { opacity: 0.75; text-shadow: none; }
    50%       { opacity: 1;   text-shadow: 0 0 10px rgba(158, 255, 0, 0.85); }
}

.ai-insights-panel {
    grid-column: 1 / -1;
    border-radius: 6px;
    padding: 13px 16px;
    position: relative;
    overflow: hidden;
    /* animation déclenchée via JS (style.animation reset) */
    animation: ai-insights-appear 0.38s ease;
}

/* ── Mode IA (API) — vert lime ─────────────────────────────────────────── */
.ai-insights-panel.ai-insights-ai {
    background: rgba(158, 255, 0, 0.03);
    border: 1px solid rgba(158, 255, 0, 0.18);
}

/* Barre accent verticale gauche */
.ai-insights-panel.ai-insights-ai::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent-lime);
    box-shadow: 0 0 10px rgba(158, 255, 0, 0.45);
    border-radius: 6px 0 0 6px;
}

/* ── Mode local (algorithmique) — discret ──────────────────────────────── */
.ai-insights-panel.ai-insights-local {
    background: transparent;
    border: 1px solid rgba(78, 88, 102, 0.22);
}

/* ── Header ────────────────────────────────────────────────────────────── */
.ai-insights-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ai-insights-gem {
    font-size: 15px;
    line-height: 1;
    color: var(--accent-lime);
    animation: ai-gem-glow 2.4s ease-in-out infinite;
}

.ai-insights-panel.ai-insights-local .ai-insights-gem {
    color: var(--text-muted);
    animation: none;
}

.ai-insights-label {
    font-size: 8.5px;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ai-insights-panel.ai-insights-ai    .ai-insights-label { color: var(--accent-lime); }
.ai-insights-panel.ai-insights-local .ai-insights-label { color: var(--text-muted); }

.ai-insights-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 5px;
    opacity: 0.35;
    transition: opacity 0.2s, color 0.2s;
    line-height: 1;
    border-radius: 3px;
}
.ai-insights-dismiss:hover { opacity: 1; color: var(--text-main); }

/* ── Labels de section (DSP / MIX) ────────────────────────────────────── */
.ai-insights-section-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 8px;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 7px;
}

/* Trait séparateur après le label */
.ai-insights-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.18;
}

/* DSP APPLIED — vert mastering */
.ai-insights-section-label.dsp-label { color: var(--accent-lime); }

/* MIX — bleu signal original (même couleur que la courbe bleue du spectromètre) */
.ai-insights-section-label.mix-label { color: #00aeff; }

/* ── Texte d'analyse DSP ───────────────────────────────────────────────── */
.ai-insights-analysis {
    font-size: 11px;
    line-height: 1.68;
    font-family: monospace;
    font-style: normal;
    margin: 0 0 14px 0;
    padding-left: 2px;
    color: #f5f6f9;  /* blanc plein — AI et local */
}

/* ── Note de mismatch de langue ───────────────────────────────────────── */
.ai-insights-lang-note {
    font-size: 9px;
    line-height: 1.5;
    color: rgba(200, 169, 110, 0.65);   /* --gold atténué */
    background: rgba(200, 169, 110, 0.05);
    border-left: 2px solid rgba(200, 169, 110, 0.25);
    padding: 4px 8px;
    margin-top: 6px;
    border-radius: 0 3px 3px 0;
    letter-spacing: 0.01em;
}

/* ── Tips — rangée de chips ────────────────────────────────────────────── */
.ai-insights-tips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-insights-tip {
    flex: 1;
    min-width: 180px;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 10.5px;
    font-family: monospace;
    line-height: 1.45;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    cursor: default;
}

/* Préfixe générique */
.ai-insights-tip::before {
    content: '◈  ';
    opacity: 0.55;
}

/* AI mode — bleu signal original (les tips concernent le mix, pas le master) */
.ai-insights-panel.ai-insights-ai .ai-insights-tip {
    background: rgba(0, 174, 255, 0.04);
    border: 1px solid rgba(0, 174, 255, 0.14);
    color: rgba(0, 174, 255, 0.78);
}
.ai-insights-panel.ai-insights-ai .ai-insights-tip::before {
    content: '●  ';  /* ● = symbole Mix Original du spectromètre */
    opacity: 0.60;
}
.ai-insights-panel.ai-insights-ai .ai-insights-tip:hover {
    background: rgba(0, 174, 255, 0.09);
    border-color: rgba(0, 174, 255, 0.32);
    color: #00aeff;
}

/* Local mode — même bleu que AI (les tips concernent toujours le mix original) */
.ai-insights-panel.ai-insights-local .ai-insights-tip {
    background: rgba(0, 174, 255, 0.04);
    border: 1px solid rgba(0, 174, 255, 0.14);
    color: rgba(0, 174, 255, 0.78);
}
.ai-insights-panel.ai-insights-local .ai-insights-tip:hover {
    background: rgba(0, 174, 255, 0.09);
    border-color: rgba(0, 174, 255, 0.32);
    color: #00aeff;
}
.ai-insights-panel.ai-insights-local .ai-insights-tip::before {
    content: '●  ';
    opacity: 0.60;
}

/* Mobile — tips en colonne */
@media (max-width: 600px) {
    .ai-insights-tip { min-width: 100%; }
    .ai-insights-analysis { font-size: 9px; }
    .ai-insights-panel { padding: 11px 13px; }
}


footer {
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
    width: 100%;
    text-align: center;
    font-size: 10px;
    letter-spacing: 1px;
    color: #2a313d;
    text-transform: uppercase;
}

/* Version affichée dans le pied du studio — alimentée par version.js */
.app-footer-version { margin-left: 8px; }
.app-footer-version::before { content: "· "; }

/* ── Barre d'actions profil ──────────────────────────────────────────────── */
.app-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: rgba(0,0,0,0.18);
}
.btn-profile {
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 18px;
    border-radius: 4px;
    border: 1px solid rgba(158,255,0,0.28);
    background: rgba(158,255,0,0.06);
    color: rgba(158,255,0,0.75);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-profile:hover {
    border-color: rgba(158,255,0,0.55);
    background: rgba(158,255,0,0.12);
    color: rgba(158,255,0,1);
    text-shadow: 0 0 10px rgba(158,255,0,0.35);
}


/* ══════════════════════════════════════════════════════════════════
   AI MASTER G — Landing Page v1.04
   Toutes les règles sont préfixées lp- pour isoler des styles app.
   ══════════════════════════════════════════════════════════════════ */

/* ── Body en mode landing — override du padding app ──────────────── */
body.lp-mode {
    padding: 0;
    align-items: stretch;
}

#landingPage {
    width: 100%;
    box-sizing: border-box;
    min-height: 100vh;
    background: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* ── Couleurs utilitaires ─────────────────────────────────────────── */
.lp-accent-green { color: var(--accent-lime); }
.lp-accent-blue  { color: #00aeff; }

/* ── Navigation fixe ─────────────────────────────────────────────── */
.lp-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 20px 40px;
    transition: background 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}
.lp-nav-scrolled {
    background: rgba(4, 5, 7, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--card-border);
}
.lp-nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* .lp-nav-logo remplacé par .brand-logo (voir en-tête du CSS) */
.lp-nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
/* Sélecteur de langue landing — même esthétique que le sélecteur app */
.lp-lang-wrapper { position: relative; }
.lp-lang-select {
    background: #0d1017;
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    padding: 5px 22px 5px 10px;
    font-size: 10px;
    font-weight: 700;
    font-family: monospace;
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}
.lp-lang-select:hover,
.lp-lang-select:focus {
    border-color: var(--accent-lime);
    color: var(--text-main);
}
/* ── Lang select landing — override mobile forcé */
@media (max-width: 600px) {
    .lp-lang-select {
        color: #f5f6f9 !important;
        -webkit-text-fill-color: #f5f6f9 !important;
        border: 1px solid #9eff00 !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        min-width: 44px !important;
        padding: 5px 16px 5px 7px !important;
        font-size: 9px !important;
        background: #0d1017 !important;
        opacity: 1 !important;
    }
}
.lp-lang-wrapper::after {
    content: '▼';
    font-size: 7px;
    color: var(--accent-lime);
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.lp-nav-cta {
    background: transparent;
    border: 1px solid rgba(158, 255, 0, 0.32);
    color: var(--accent-lime);
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lp-nav-cta:hover {
    background: rgba(158, 255, 0, 0.08);
    border-color: var(--accent-lime);
}

@media (max-width: 600px) {
    /* Espacement minimum entre logo et groupe droite */
    .lp-nav-inner {
        gap: 6px;
    }
    /* Logo nav : ne rétrécit jamais, ne wrape jamais */
    .lp-nav-inner .brand-logo {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 16px;
        letter-spacing: 1px;
    }
    /* Nav right : gap réduit */
    .lp-nav-right {
        gap: 8px;
    }
    /* CTA nav : compact */
    .lp-nav-cta {
        font-size: 9px;
        letter-spacing: 0.5px;
        padding: 7px 10px;
        white-space: nowrap;
    }
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.lp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.lp-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
/* vignette radiale pour lisibilité du texte sur le canvas */
.lp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 25%, rgba(4,5,7,0.60) 100%);
    pointer-events: none;
}
.lp-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 110px 28px 90px;
    max-width: 720px;
    width: 100%;
    box-sizing: border-box;
}
.lp-hero-badge {
    display: inline-block;
    font-family: monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-lime);
    border: 1px solid rgba(158, 255, 0, 0.22);
    border-radius: 20px;
    padding: 6px 18px;
    margin-bottom: 30px;
    background: rgba(158, 255, 0, 0.04);
}

@media (max-width: 600px) {
    .lp-hero-badge {
        font-size: 7px;
        letter-spacing: 0px;
        padding: 5px 10px;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
}
.lp-headline {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 22px;
    letter-spacing: -0.025em;
    color: var(--text-main);
}
.lp-sub {
    font-size: clamp(0.95rem, 2.5vw, 1.12rem);
    color: rgba(245, 246, 249, 0.62);
    line-height: 1.72;
    margin: 0 0 38px;
}
.lp-cta-primary {
    display: inline-block;
    background: var(--accent-lime);
    color: #040507;
    border: none;
    border-radius: 5px;
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 16px 38px;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 0 30px rgba(158, 255, 0, 0.20);
}
.lp-cta-primary:hover {
    background: #b5ff33;
    box-shadow: 0 0 44px rgba(158, 255, 0, 0.42);
    transform: translateY(-2px);
}
.lp-hero-note {
    margin: 20px 0 0;
    font-size: 10px;
    font-family: monospace;
    color: rgba(245, 246, 249, 0.28);
    letter-spacing: 1px;
}

/* ── Proof bar ────────────────────────────────────────────────────── */
.lp-proof-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 24px;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    background: rgba(9, 12, 16, 0.85);
}
.lp-proof-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 52px;
}
.lp-proof-sep {
    width: 1px;
    height: 38px;
    background: var(--card-border);
    flex-shrink: 0;
}
.lp-proof-number {
    font-family: monospace;
    font-size: clamp(1.3rem, 3.5vw, 1.85rem);
    font-weight: 700;
    color: var(--accent-lime);
    letter-spacing: -0.01em;
}
.lp-proof-label {
    font-size: 9px;
    font-family: monospace;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ── Sections — règles communes ──────────────────────────────────── */
.lp-section {
    padding: 100px 28px;
}
.lp-section-dark {
    background: rgba(9, 12, 16, 0.55);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}
.lp-section-inner {
    max-width: 1000px;
    margin: 0 auto;
}
.lp-section-tag {
    font-family: monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-lime);
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.70;
}
.lp-section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 52px;
    letter-spacing: -0.02em;
}

/* ── Scroll reveal ────────────────────────────────────────────────── */
.lp-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.lp-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Problem section ──────────────────────────────────────────────── */
.lp-problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.lp-problem-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 28px 24px;
    transition: border-color 0.22s ease;
}
.lp-problem-card:hover { border-color: rgba(78, 88, 102, 0.55); }
.lp-problem-icon {
    font-family: monospace;
    font-size: 22px;
    color: var(--text-muted);
    margin-bottom: 14px;
    opacity: 0.55;
}
.lp-problem-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text-main);
}
.lp-problem-card p {
    font-size: 12px;
    line-height: 1.72;
    color: rgba(245, 246, 249, 0.48);
    margin: 0;
}

/* ── Engine section ───────────────────────────────────────────────── */
.lp-engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.lp-engine-card {
    border-radius: 8px;
    padding: 28px 26px;
    position: relative;
    overflow: hidden;
}
.lp-engine-algo {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}
.lp-engine-ai {
    background: rgba(158, 255, 0, 0.02);
    border: 1px solid rgba(158, 255, 0, 0.18);
}
/* Barre latérale lime — même style que le panneau AI Insights in-app */
.lp-engine-ai::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent-lime);
    box-shadow: 0 0 14px rgba(158, 255, 0, 0.50);
    border-radius: 8px 0 0 8px;
}
.lp-engine-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.lp-engine-icon {
    font-size: 15px;
    color: var(--text-muted);
}
.lp-engine-icon.lp-gem {
    color: var(--accent-lime);
    animation: lp-gem-pulse 2.5s ease-in-out infinite;
}
@keyframes lp-gem-pulse {
    0%, 100% { opacity: 0.65; text-shadow: none; }
    50%       { opacity: 1;   text-shadow: 0 0 12px rgba(158,255,0,0.85); }
}
.lp-engine-label {
    font-family: monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    flex: 1;
}
.lp-engine-badge {
    font-family: monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}
.lp-badge-free {
    background: rgba(78, 88, 102, 0.22);
    border: 1px solid rgba(78, 88, 102, 0.38);
    color: var(--text-muted);
}
.lp-badge-pro {
    background: rgba(158, 255, 0, 0.07);
    border: 1px solid rgba(158, 255, 0, 0.26);
    color: var(--accent-lime);
}
.lp-engine-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-main);
}
.lp-engine-desc {
    font-size: 12px;
    line-height: 1.68;
    color: rgba(245, 246, 249, 0.48);
    margin: 0 0 18px;
}
.lp-engine-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.lp-engine-features li {
    font-size: 11px;
    font-family: monospace;
    color: rgba(245, 246, 249, 0.62);
    padding-left: 14px;
    position: relative;
}
.lp-engine-features li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--accent-lime);
    font-weight: 700;
}
.lp-ai-quote {
    background: rgba(158, 255, 0, 0.04);
    border: 1px solid rgba(158, 255, 0, 0.11);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 18px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.lp-ai-quote-gem {
    color: var(--accent-lime);
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0.75;
}
.lp-ai-quote p {
    font-size: 10px;
    font-family: monospace;
    font-style: italic;
    line-height: 1.65;
    color: rgba(245, 246, 249, 0.68);
    margin: 0;
}

/* ── How it works ─────────────────────────────────────────────────── */
.lp-howto-inner { text-align: center; }
.lp-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}
.lp-step {
    flex: 1;
    min-width: 180px;
    max-width: 260px;
    padding: 24px;
}
.lp-step-num {
    font-family: monospace;
    font-size: 38px;
    font-weight: 700;
    color: var(--accent-lime);
    opacity: 0.22;
    margin-bottom: 12px;
    letter-spacing: -2px;
    line-height: 1;
}
.lp-step h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text-main);
}
.lp-step p {
    font-size: 11px;
    line-height: 1.68;
    color: rgba(245, 246, 249, 0.42);
    margin: 0;
}
.lp-step-arrow {
    font-size: 20px;
    color: var(--text-muted);
    opacity: 0.32;
    flex-shrink: 0;
    padding: 0 6px;
    margin-bottom: 44px;  /* align visually with step body */
}

/* ── Pricing ──────────────────────────────────────────────────────── */
.lp-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1020px;
    margin: 0 auto;
}
.lp-price-card {
    background: var(--card-bg);
    border: 1px solid rgba(158,255,0,0.15);
    border-radius: 10px;
    padding: 32px 28px;
    position: relative;
}
.lp-price-card-pro {
    background: rgba(158, 255, 0, 0.02);
    border-color: rgba(158, 255, 0, 0.20);
}
.lp-price-pro-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-lime);
    color: #040507;
    font-family: monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 10px;
    white-space: nowrap;
}
.lp-price-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
}
.lp-price-name {
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.lp-price-name-free {
    color: rgba(158,255,0,0.75);
    text-shadow: 0 0 10px rgba(158,255,0,0.3);
}
.lp-price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.lp-price-period {
    font-family: monospace;
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.lp-price-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.lp-price-features li {
    font-size: 11px;
    font-family: monospace;
    color: rgba(245, 246, 249, 0.68);
}
.lp-price-limit { color: rgba(78, 88, 102, 0.75) !important; }
.lp-price-cta {
    width: 100%;
    padding: 13px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}
.lp-price-cta-free {
    background: rgba(158,255,0,0.07);
    border: 1px solid rgba(158,255,0,0.30);
    color: rgba(158,255,0,0.80);
    text-shadow: 0 0 8px rgba(158,255,0,0.3);
}
.lp-price-cta-free:hover {
    background: rgba(158,255,0,0.13);
    border-color: rgba(158,255,0,0.6);
    color: var(--accent-lime);
    text-shadow: 0 0 12px rgba(158,255,0,0.5);
}
.lp-price-cta-pro {
    background: var(--accent-lime);
    color: #040507;
    box-shadow: 0 0 20px rgba(158, 255, 0, 0.16);
}
.lp-price-cta-pro:hover {
    background: #b5ff33;
    box-shadow: 0 0 34px rgba(158, 255, 0, 0.38);
    transform: translateY(-1px);
}
.lp-price-note {
    text-align: center;
    font-family: monospace;
    font-size: 9px;
    color: rgba(78, 88, 102, 0.55);
    margin: 12px 0 0;
    letter-spacing: 0.5px;
}

/* ── Plan Particulier (Créateur) ─────────────────────────────────────────────── */
.lp-price-card-creator {
    background: rgba(200, 169, 110, 0.03);
    border-color: rgba(200, 169, 110, 0.22);
    box-shadow: 0 0 48px rgba(200, 169, 110, 0.07);
}
.lp-badge-creator {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #c8a96e;
    color: #040507;
    font-family: monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 10px;
    white-space: nowrap;
}
.lp-price-cta-creator {
    background: #c8a96e;
    color: #040507;
    box-shadow: 0 0 20px rgba(200, 169, 110, 0.20);
}
.lp-price-cta-creator:hover {
    background: #d4b87e;
    box-shadow: 0 0 34px rgba(200, 169, 110, 0.42);
    transform: translateY(-1px);
}

/* ── Plan Studio · Pro ───────────────────────────────────────────────────────── */
.lp-price-card-studio {
    background: rgba(20, 22, 36, 0.7);
    border-color: rgba(125, 211, 252, 0.12);
}
.lp-price-devis {
    font-family: monospace;
    font-size: 1.55rem;
    font-weight: 500;
    color: rgba(125, 211, 252, 0.80);
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.lp-price-exclusive {
    font-family: monospace;
    font-size: 9px;
    color: rgba(125, 211, 252, 0.40);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}
.lp-price-cta-studio {
    background: transparent;
    border: 1px solid rgba(125, 211, 252, 0.28);
    color: rgba(125, 211, 252, 0.75);
    letter-spacing: 1.5px;
}
.lp-price-cta-studio:hover {
    background: rgba(125, 211, 252, 0.06);
    border-color: rgba(125, 211, 252, 0.55);
    color: #7dd3fc;
    transform: translateY(-1px);
}
.lp-price-limit-soft {
    color: rgba(78, 88, 102, 0.55) !important;
    font-style: italic;
}

/* ── Section Services Partenaires ────────────────────────────────────────────── */
.lp-services {
    padding: 60px 0 52px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
}
.lp-services-inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 40px;
}
.lp-services-title {
    font-family: monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.16);
    margin-bottom: 44px;
}
.lp-services-group {
    margin-bottom: 32px;
}
.lp-services-group-label {
    font-family: monospace;
    font-size: 8px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.10);
    margin-bottom: 14px;
}
.lp-services-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.lp-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    padding: 18px 20px 14px;
    width: 110px;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.lp-service-card:hover {
    background: rgba(255, 255, 255, 0.042);
    border-color: rgba(255, 255, 255, 0.10);
    transform: translateY(-2px);
}
.lp-service-name {
    font-family: monospace;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
    line-height: 1.4;
}

/* ── FAQ ──────────────────────────────────────────────────────────── */
.lp-faq-inner { max-width: 680px; }
.lp-faq-list {
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
}
.lp-faq-item {
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
}
.lp-faq-item:last-child { border-bottom: none; }
.lp-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease;
    gap: 12px;
}
.lp-faq-question:hover { background: rgba(255, 255, 255, 0.02); }
.lp-faq-arrow {
    font-size: 14px;
    color: var(--accent-lime);
    transition: transform 0.30s ease;
    flex-shrink: 0;
}
.lp-faq-open .lp-faq-arrow { transform: rotate(180deg); }
.lp-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.lp-faq-answer p {
    padding: 0 20px 20px;
    font-size: 12px;
    line-height: 1.72;
    color: rgba(245, 246, 249, 0.52);
    margin: 0;
}

/* ── CTA Final ────────────────────────────────────────────────────── */
.lp-cta-final {
    padding: 120px 28px;
    text-align: center;
    border-top: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}
/* Halo vert diffus en fond */
.lp-cta-final::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse at center, rgba(158,255,0,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.lp-cta-final-content { position: relative; z-index: 1; }
.lp-cta-final-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    margin: 0 0 38px;
}
.lp-cta-xl {
    font-size: 14px;
    padding: 18px 46px;
}
.lp-cta-final-note {
    margin: 22px 0 0;
    font-family: monospace;
    font-size: 9px;
    color: rgba(245, 246, 249, 0.22);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ── Footer landing ───────────────────────────────────────────────── */
.lp-footer {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 22px 20px;
    border-top: 1px solid var(--card-border);
    background: var(--bg-color);
    text-align: center;
}
/* .lp-footer-logo remplacé par .brand-logo.brand-logo--footer */
.lp-footer-dot {
    font-family: monospace;
    font-size: 10px;
    color: rgba(78, 88, 102, 0.40);
}
.lp-footer-brand {
    font-family: monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(245, 246, 249, 0.28);
}
.lp-footer-version {
    font-family: monospace;
    font-size: 9px;
    color: rgba(78, 88, 102, 0.45);
    letter-spacing: 1px;
}

/* Lien mentions légales du pied de page — remplace un style et un survol
   qui étaient écrits en attributs inline dans le HTML. */
.lp-legal-link {
    font-family: monospace;
    font-size: 10px;
    color: rgba(220, 220, 236, 0.35);
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.2s;
}
.lp-legal-link:hover { color: #00d4ff; }

/* ── Responsive mobile ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .lp-nav         { padding: 16px 20px; }
    .lp-proof-item  { padding: 0 20px; }
    .lp-proof-label { display: none; }   /* garde juste les chiffres sur mobile */
    .lp-section     { padding: 70px 20px; }
    .lp-steps       { flex-direction: column; align-items: center; }
    .lp-step-arrow  { transform: rotate(90deg); margin: 0; }
    .lp-footer      { gap: 10px; padding: 18px 20px; justify-content: center; }
    .lp-cta-final   { padding: 80px 20px; }

    /* Landing activée — responsive mobile */
    .la-hero        { padding: 100px 20px 60px; }
    .la-section     { padding: 60px 20px; }
    .la-section-inner { max-width: 100%; }
    .la-footer      { gap: 8px; padding: 18px 20px; flex-wrap: wrap; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SYSTÈME DE LICENCE — Badge plan + Bouton activation + Modaux
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Badge plan (header app) ────────────────────────────────────────────────── */
.license-badge {
    display: inline-flex;
    align-items: center;
    font-family: monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
    transition: all 0.3s;
}
.license-badge-free {
    background: rgba(158,255,0,0.07);
    color: rgba(158,255,0,0.75);
    border: 1px solid rgba(158,255,0,0.22);
    text-shadow: 0 0 8px rgba(158,255,0,0.4), 0 0 18px rgba(158,255,0,0.15);
}
.license-badge-particulier {
    background: rgba(200,169,110,0.12);
    color: #c8a96e;
    border: 1px solid rgba(200,169,110,0.25);
    text-shadow: 0 0 8px rgba(200,169,110,0.5), 0 0 18px rgba(200,169,110,0.2);
}
.license-badge-studio {
    background: rgba(125,211,252,0.10);
    color: #7dd3fc;
    border: 1px solid rgba(125,211,252,0.22);
    text-shadow: 0 0 8px rgba(125,211,252,0.5), 0 0 18px rgba(125,211,252,0.2);
}
.license-badge { cursor: pointer; transition: opacity 0.15s; }
.license-badge:hover { opacity: 0.75; }

/* ── Bulle explicative licence ───────────────────────────────────────────────── */
.btn-activate-wrap {
    position: relative;
}
.license-bubble {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 900;
    background: #0f1118;
    border: 1px solid rgba(200,169,110,0.25);
    border-radius: 6px;
    padding: 10px 14px;
    width: 550px;
    font-size: 11px;
    line-height: 1.8;
    color: rgba(220,220,236,0.65);
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: bubbleFadeIn 0.3s ease;
    pointer-events: none;
}
.license-bubble-arrow {
    position: absolute;
    top: -5px;
    right: 16px;
    width: 8px;
    height: 8px;
    background: #0f1118;
    border-left: 1px solid rgba(200,169,110,0.25);
    border-top: 1px solid rgba(200,169,110,0.25);
    transform: rotate(45deg);
}
@media (max-width: 600px) {
    .license-bubble {
        right: auto;
        left: 0;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        white-space: normal;
        word-break: break-word;
        box-sizing: border-box;
    }
    .license-bubble-arrow {
        right: auto;
        left: 16px;
    }
}
@keyframes bubbleFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Info licence dans le modal ─────────────────────────────────────────────── */
.license-info-block {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}
.license-info-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 12px;
}
.license-info-line:last-child { border-bottom: none; }
.license-info-label {
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(220,220,236,0.3);
}
.license-info-value {
    color: #c8a96e;
    font-size: 12px;
}
.btn-deactivate {
    width: 100%;
    background: transparent;
    color: rgba(255,100,100,0.7);
    border: 1px solid rgba(255,100,100,0.2);
    padding: 11px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-deactivate:hover {
    background: rgba(255,100,100,0.06);
    border-color: rgba(255,100,100,0.4);
    color: rgba(255,100,100,0.9);
}

/* ── Bouton "Quitter" (header app — extrémité droite) ───────────────────────── */
.btn-leave-app {
    font-family: monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid rgba(239,68,68,0.30);
    background: rgba(239,68,68,0.06);
    color: rgba(239,68,68,0.55);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 12px;
}
.btn-leave-app:hover {
    border-color: rgba(239,68,68,0.65);
    background: rgba(239,68,68,0.13);
    color: rgba(239,68,68,0.95);
    text-shadow: 0 0 10px rgba(239,68,68,0.35);
}

/* ── Bouton "Activer" / "Gérer" (header app) ────────────────────────────────── */
.btn-activate {
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 7px 18px;
    border-radius: 4px;
    border: 1px solid rgba(158,255,0,0.35);
    background: rgba(158,255,0,0.07);
    color: rgba(158,255,0,0.85);
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(158,255,0,0.35);
}
.btn-activate:hover {
    border-color: var(--accent-lime);
    color: var(--accent-lime);
    background: rgba(158,255,0,0.12);
    text-shadow: 0 0 12px rgba(158,255,0,0.5);
}
.btn-activate.hidden { display: none; }
.btn-activate.btn-activate-active {
    border-color: rgba(200,169,110,0.35);
    color: rgba(200,169,110,0.7);
}
.btn-activate.btn-activate-active:hover {
    border-color: rgba(200,169,110,0.7);
    color: rgba(200,169,110,1);
    background: rgba(200,169,110,0.05);
}

/* ── Modal générique ────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4,5,7,0.82);
    backdrop-filter: blur(8px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.modal-overlay.visible {
    opacity: 1;
    pointer-events: all;
}
.modal-box {
    background: #0c0c18;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 36px 40px;
    max-width: 440px;
    width: 90%;
    position: relative;
    transform: translateY(12px);
    transition: transform 0.25s;
}
.modal-overlay.visible .modal-box { transform: translateY(0); }

.modal-title {
    font-family: monospace;
    font-size: 13px;
    color: var(--accent-lime);
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}
.modal-subtitle {
    font-size: 11px;
    color: rgba(220,220,236,0.35);
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}
.modal-close {
    position: absolute;
    top: 16px; right: 18px;
    background: none;
    border: none;
    color: rgba(220,220,236,0.3);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover { color: rgba(220,220,236,0.7); }

/* ── Modal activation ───────────────────────────────────────────────────────── */
.license-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.license-input {
    width: 100%;
    background: #040507;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 5px;
    padding: 12px 14px;
    color: #c8a96e;
    font-family: monospace;
    font-size: 11px;
    line-height: 1.6;
    resize: none;
    height: 80px;
    transition: border-color 0.2s;
}
.license-input:focus {
    outline: none;
    border-color: rgba(200,169,110,0.45);
}
.license-input::placeholder { color: rgba(220,220,236,0.2); }

.license-input.error  { border-color: rgba(255,100,100,0.5); }
.license-input.success{ border-color: rgba(158,255,0,0.4); }

.btn-license-submit {
    background: #c8a96e;
    color: #040507;
    border: none;
    padding: 11px 24px;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    align-self: flex-end;
}
.btn-license-submit:hover   { background: #d4b87e; }
.btn-license-submit:disabled{ opacity: 0.4; cursor: not-allowed; }

.license-msg {
    font-size: 11px;
    min-height: 18px;
    margin-top: 6px;
    font-family: monospace;
}
.license-msg.error   { color: rgba(255,120,120,0.9); }
.license-msg.success { color: rgba(158,255,0,0.9); }

/* ── Modal upgrade (feature gate) ───────────────────────────────────────────── */
.upgrade-icon {
    font-size: 28px;
    margin-bottom: 16px;
    display: block;
}
.upgrade-feature-name {
    color: #c8a96e;
    font-family: monospace;
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.upgrade-desc {
    font-size: 12px;
    color: rgba(220,220,236,0.55);
    line-height: 1.8;
    margin-bottom: 24px;
}
.btn-upgrade {
    display: inline-block;
    background: #c8a96e;
    color: #040507;
    border: none;
    padding: 11px 28px;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    margin-right: 12px;
}
.btn-upgrade:hover { background: #d4b87e; }
.btn-upgrade-ghost {
    background: none;
    border: none;
    color: rgba(220,220,236,0.35);
    font-family: monospace;
    font-size: 11px;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-upgrade-ghost:hover { color: rgba(220,220,236,0.7); }

/* ══════════════════════════════════════════════════════════════════════════════
   LANDING ACTIVÉE — #landingActivated
   Visible uniquement quand une licence valide est détectée.
   Réutilise les variables et classes LP (.lp-nav, .lp-hero-badge, etc.)
   ══════════════════════════════════════════════════════════════════════════════ */

#landingActivated {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    background: var(--bg-color);
    color: var(--text-main);
}

/* ── Plan tag dans la nav ───────────────────────────────────────────────────── */
.la-plan-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #c8a96e;
    background: rgba(200,169,110,0.08);
    border: 1px solid rgba(200,169,110,0.2);
    border-radius: 3px;
    padding: 3px 8px;
    margin-right: 8px;
}

@media (max-width: 600px) {
    /* Landing activée : badge plan masqué dans la nav sur mobile (visible dans le hero) */
    .la-plan-tag {
        display: none;
    }
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.la-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 80px;
    text-align: center;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(158,255,0,0.04) 0%, transparent 70%);
}
.la-hero-content { max-width: 640px; }
.la-headline {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-main);
    margin: 16px 0 12px;
    line-height: 1.15;
}
.la-meta {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: rgba(200,169,110,0.6);
    margin-bottom: 16px;
    font-family: monospace;
}
.la-sub {
    font-size: clamp(0.95rem, 2.5vw, 1.12rem);
    color: rgba(245,246,249,0.62);
    margin-bottom: 40px;
    line-height: 1.72;
}
.la-hero-cta {
    font-size: 13px !important;
    padding: 14px 36px !important;
    letter-spacing: 1.5px !important;
}

/* ── Sections ────────────────────────────────────────────────────────────────── */
.la-section {
    padding: 80px 40px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.la-section-alt {
    background: rgba(255,255,255,0.015);
}
.la-section-inner {
    max-width: 1080px;
    margin: 0 auto;
}
.la-section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--text-main);
    margin: 12px 0 48px;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

/* ── Steps (workflow) ────────────────────────────────────────────────────────── */
.la-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
@media (max-width: 760px) { .la-steps { grid-template-columns: 1fr; } }
.la-step {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 32px 28px;
}
.la-step-num {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #9eff00;
    margin-bottom: 20px;
    font-family: var(--lp-mono, 'JetBrains Mono', monospace);
}
.la-step-h {
    font-size: 15px;
    font-weight: 600;
    color: #dcdcec;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}
.la-step-p {
    font-size: 13px;
    color: rgba(220,220,236,0.55);
    line-height: 1.8;
}

/* ── Tips grid ───────────────────────────────────────────────────────────────── */
.la-tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (max-width: 760px) { .la-tips-grid { grid-template-columns: 1fr; } }
.la-tip-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 28px 24px;
    transition: border-color 0.2s;
}
.la-tip-card:hover { border-color: rgba(200,169,110,0.2); }
.la-tip-icon {
    font-size: 18px;
    color: #c8a96e;
    margin-bottom: 14px;
    opacity: 0.7;
}
.la-tip-h {
    font-size: 13px;
    font-weight: 700;
    color: #dcdcec;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.la-tip-p {
    font-size: 12px;
    color: rgba(220,220,236,0.5);
    line-height: 1.9;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.la-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 40px;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-family: var(--lp-mono, 'JetBrains Mono', monospace);
    text-align: center;
}
.la-footer-plan {
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(200,169,110,0.4);
}

/* ── Bouton export verrouillé (plan Free) ────────────────────────────────────── */
.export-locked {
    opacity: 0.45;
    position: relative;
}
.export-locked::after {
    content: ' 🔒';
    font-size: 10px;
    vertical-align: middle;
}

/* ── Indicateurs visuels de gate (UI locks) ─────────────────────────────────── */
.feature-locked {
    opacity: 0.4;
    pointer-events: none;
    position: relative;
}
.lock-tag {
    display: inline-block;
    font-size: 9px;
    font-family: monospace;
    color: rgba(200,169,110,0.6);
    background: rgba(200,169,110,0.08);
    border: 1px solid rgba(200,169,110,0.18);
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}