/* =========================================================================
   Simulateur Interaction Photon–Atome — Feuille de style thémable
   Tokens via variables CSS ; 6 thèmes (défaut bleu), clé partagée 'site-theme'.
   Mise en page inspirée du simulateur d'avancement.
   ========================================================================= */

/* =========================================================================
   1. PALETTES DE THÈMES
   ========================================================================= */
:root,
:root[data-theme="bleu"] {
    --accent-rgb: 0, 229, 255;
    --accent-2-rgb: 0, 119, 255;
    --accent-color: #00e5ff;
    --accent-gradient: linear-gradient(135deg, #00e5ff 0%, #0077ff 100%);
    --btn-text: #04121f;
    --bg-main: #050a14;
    --panel-bg-1: rgba(10, 20, 40, 0.82);
    --banner-bg: rgba(8, 18, 36, 0.86);
    --bloc-bg: rgba(0, 0, 0, 0.18);
    --bloc-bg-fort: rgba(0, 0, 0, 0.30);
    --canvas-bg: rgba(0, 0, 0, 0.5);
    --menu-bg: rgba(10, 20, 40, 0.98);
    --panneau-opaque: rgba(8, 14, 28, 0.98);
    --border-gold: rgba(var(--accent-rgb), 0.35);
    --title-shadow: rgba(var(--accent-rgb), 0.5);
    --text-highlight: var(--accent-color);
    --bg-image: url('../../../img_fond_bleu.svg');
    --text-main: #eaeaea;
    --text-muted: #a3acb8;
    --input-bg: rgba(0, 20, 40, 0.8);
    --input-border: var(--accent-color);
    color-scheme: dark;
}

:root[data-theme="dore"] {
    --accent-rgb: 255, 209, 102;
    --accent-2-rgb: 232, 150, 30;
    --accent-color: #ffd166;
    --accent-gradient: linear-gradient(135deg, #ffdf8e 0%, #ffc44d 48%, #e8961e 100%);
    --btn-text: #2a1802; --bg-main: #0a0803; --panel-bg-1: rgba(28, 21, 9, 0.80);
    --banner-bg: rgba(28, 21, 9, 0.86);
    --border-gold: rgba(var(--accent-rgb), 0.35); --title-shadow: rgba(var(--accent-rgb), 0.5);
    --text-highlight: var(--accent-color); --bg-image: url('../../../img_fond_dore.svg');
}

:root[data-theme="emeraude"] {
    --accent-rgb: 52, 211, 153;
    --accent-2-rgb: 5, 150, 105;
    --accent-color: #34d399;
    --accent-gradient: linear-gradient(135deg, #6ee7b7 0%, #34d399 48%, #059669 100%);
    --btn-text: #04241a; --bg-main: #04110c; --panel-bg-1: rgba(8, 28, 20, 0.82);
    --banner-bg: rgba(7, 26, 18, 0.86);
    --border-gold: rgba(var(--accent-rgb), 0.35); --title-shadow: rgba(var(--accent-rgb), 0.5);
    --text-highlight: var(--accent-color); --bg-image: url('../../../img_fond_emeraude.svg');
}

:root[data-theme="violet"] {
    --accent-rgb: 192, 132, 252;
    --accent-2-rgb: 124, 58, 237;
    --accent-color: #c084fc;
    --accent-gradient: linear-gradient(135deg, #d8b4fe 0%, #a855f7 48%, #7c3aed 100%);
    --btn-text: #1b0a33; --bg-main: #0a0617; --panel-bg-1: rgba(24, 16, 40, 0.82);
    --banner-bg: rgba(22, 14, 38, 0.86);
    --border-gold: rgba(var(--accent-rgb), 0.35); --title-shadow: rgba(var(--accent-rgb), 0.5);
    --text-highlight: var(--accent-color); --bg-image: url('../../../img_fond_violet.svg');
}

:root[data-theme="rose"] {
    --accent-rgb: 251, 113, 133;
    --accent-2-rgb: 225, 29, 72;
    --accent-color: #fb7185;
    --accent-gradient: linear-gradient(135deg, #fda4af 0%, #fb7185 48%, #e11d48 100%);
    --btn-text: #2b0610; --bg-main: #14060a; --panel-bg-1: rgba(40, 14, 22, 0.82);
    --banner-bg: rgba(38, 13, 21, 0.86);
    --border-gold: rgba(var(--accent-rgb), 0.35); --title-shadow: rgba(var(--accent-rgb), 0.5);
    --text-highlight: var(--accent-color); --bg-image: url('../../../img_fond_rose.svg');
}

/* --- Thème « Projection » : fond clair, texte sombre (vidéoprojecteur) --- */
:root[data-theme="projection"] {
    --accent-rgb: 0, 92, 184;
    --accent-2-rgb: 0, 64, 128;
    --accent-color: #005cb8;
    --accent-gradient: linear-gradient(135deg, #2b7fd4 0%, #005cb8 100%);
    --btn-text: #ffffff;
    --bg-main: #f1f5f9;
    --panel-bg-1: rgba(255, 255, 255, 0.96);
    --banner-bg: rgba(197, 215, 236, 0.97);
    --bloc-bg: rgba(0, 60, 120, 0.06);
    --bloc-bg-fort: rgba(0, 60, 120, 0.10);
    --canvas-bg: #ffffff;
    --menu-bg: rgba(255, 255, 255, 0.99);
    --panneau-opaque: rgba(255, 255, 255, 0.99);
    --border-gold: rgba(0, 92, 184, 0.40);
    --title-shadow: rgba(0, 0, 0, 0.10);
    --text-highlight: #00458c;
    --bg-image: none;
    --text-main: #16202e;
    --text-muted: #46586c;
    --input-bg: #ffffff;
    --input-border: rgba(0, 92, 184, 0.45);
    color-scheme: light;
}

/* =========================================================================
   2. BASE & FOND D'ÉCRAN
   ========================================================================= */
html { font-size: clamp(13px, 1.2vw + 0.1rem, 16px); }

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    background-image: none;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: manipulation;
    user-select: none;
}

* { box-sizing: border-box; }

body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(var(--accent-rgb), 0.16), transparent 34%),
        radial-gradient(circle at 88% 22%, rgba(var(--accent-2-rgb), 0.18), transparent 34%),
        var(--bg-image);
    background-size: cover; background-position: center;
}

/* =========================================================================
   3. BANDEAU, SÉLECTEUR DE THÈME DÉROULANT & PIED DE PAGE
   ========================================================================= */
#banner {
    display: flex; flex-direction: row; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; padding: 10px 16px;
    background-color: var(--banner-bg);
    background-image: linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), transparent 55%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-gold);
    box-shadow: 0 1px 16px rgba(var(--accent-rgb), 0.14);
    position: relative; z-index: 50; flex-shrink: 0; text-align: left;
}
.banner-left { display: flex; flex-direction: column; min-width: 0; flex: 1 1 220px; }
#main_title {
    font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 700;
    color: var(--text-main); text-shadow: 0 0 6px var(--title-shadow);
}
#sub_title { font-size: clamp(0.8rem, 1.4vw, 0.95rem); margin-top: 2px; color: var(--text-highlight); }
.banner-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.banner-btn, .theme-current, .banner-link {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px; border-radius: 8px;
    border: 1px solid var(--border-gold);
    background: rgba(var(--accent-rgb), 0.10);
    color: var(--text-main); font: inherit; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: all 0.2s ease;
}
.banner-btn:hover, .theme-current:hover, .banner-link:hover {
    background: rgba(var(--accent-rgb), 0.2); color: var(--accent-color);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.35);
}
.banner-link { color: var(--accent-color); }

.theme-dropdown { position: relative; }
.theme-current .theme-dot { width: 13px; height: 13px; }
.theme-current .chevron { color: var(--text-muted); font-size: 0.75rem; }
.theme-menu {
    position: absolute; top: calc(100% + 6px); right: 0; min-width: 172px;
    display: none; flex-direction: column; gap: 2px; padding: 6px;
    border-radius: 10px; background: var(--menu-bg);
    border: 1px solid var(--border-gold); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    z-index: 60;
}
.theme-menu.show { display: flex; }
.theme-option {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; border: none; border-radius: 6px; background: transparent;
    color: var(--text-main); font: inherit; font-size: 0.85rem; font-weight: 600;
    text-align: left; cursor: pointer; transition: background 0.15s ease;
}
.theme-option:hover { background: rgba(var(--accent-rgb), 0.15); }
.theme-option.is-active { color: var(--accent-color); }
.theme-option.is-active::after { content: '✓'; margin-left: auto; }
.theme-dot {
    width: 14px; height: 14px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, var(--dot-1), var(--dot-2));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

#footer {
    width: 100%; min-height: 50px;
    background-color: var(--banner-bg);
    backdrop-filter: blur(5px);
    color: var(--text-muted);
    display: flex; justify-content: center; align-items: center;
    font-size: 0.9rem; flex-shrink: 0; text-align: center; padding: 6px 12px;
    border-top: 1px solid var(--border-gold);
}

/* =========================================================================
   4. GRILLE PRINCIPALE
   ========================================================================= */
#conteneur_simulation {
    flex: 1 1 auto;
    display: flex; flex-direction: column; gap: 12px;
    padding: 12px; width: 100%; box-sizing: border-box; min-height: 0;
}

@media (min-width: 900px) {
    #conteneur_simulation {
        display: grid;
        grid-template-columns: minmax(0, 1fr) clamp(300px, 32vw, 430px);
        grid-template-areas:
            "visu      right"
            "reglages  reglages";
        gap: 12px; padding: 12px; width: 100%; max-width: 1700px; margin: 0 auto;
    }
    #zone-visu { grid-area: visu; height: clamp(330px, 54vh, 580px); }
    .right-column { grid-area: right; }
    #fenetre-reglages { grid-area: reglages; }
}

/* Tablettes : la fenêtre de Visualisation épouse le 4:3 du canvas (gain de
   place) et reste centrée verticalement face à la colonne Actions/Transitions.
   Détection par la largeur (petits écrans) ET/OU par le pointeur tactile
   (tablettes de toute résolution). Sur les grands écrans à souris, la fenêtre
   reste large. */
@media (min-width: 900px) and (max-width: 1366px), (min-width: 900px) and (pointer: coarse) {
    #conteneur_simulation {
        grid-template-columns: auto minmax(300px, 620px);
        justify-content: center;
        align-content: start;
    }
    #zone-visu {
        grid-area: visu;
        align-self: center;
        height: clamp(320px, 50vh, 560px);
        width: calc(clamp(320px, 50vh, 560px) * 4 / 3);
    }
    .right-column { justify-content: center; }
}

/* =========================================================================
   5. VISUALISATION : onglets + sélecteur de vues + canvas 4:3
   ========================================================================= */
#zone-visu { display: flex; flex-direction: column; padding: 10px; min-height: 300px; overflow: hidden; }

.visu-entete {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; flex-wrap: wrap;
    border-bottom: 1px solid var(--border-gold); flex-shrink: 0;
}
.visu-entete .fenetre_titre { margin: 0; padding: 0 0 6px 0; border: none; font-size: 1.05rem; text-align: left; }
.visu-nav { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }

#tabs-dessin { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tab-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; min-width: 0;
    border: 1px solid var(--border-gold); border-radius: 999px;
    background: var(--bloc-bg); color: var(--text-muted);
    font: inherit; font-weight: 600; font-size: 0.84rem;
    cursor: pointer; white-space: nowrap; transition: all 0.2s ease;
}
.tab-btn .tab-ico { flex: none; }
.tab-btn .tab-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tab-btn:hover { color: var(--text-main); background: rgba(var(--accent-rgb), 0.14); }
.tab-btn.vue-on {
    color: var(--btn-text); background: var(--accent-gradient);
    border-color: transparent; box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.3);
}
.tab-btn.vue-on::before { content: '✓'; font-weight: 700; flex: none; }
.tab-btn.vue-off { opacity: 0.65; }
.tab-btn.vue-off:hover { opacity: 1; }

.vues-label {
    font-size: 0.76rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; margin-right: 2px;
}
.segmented {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 3px; border-radius: 10px;
    border: 1px solid var(--border-gold); background: rgba(var(--accent-rgb), 0.08);
}
.segmented.masque { display: none; }
.seg-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 30px; padding: 0 8px;
    border: none; border-radius: 7px; background: transparent;
    color: var(--text-muted); font: inherit; font-size: 0.95rem; letter-spacing: -1px;
    cursor: pointer; transition: all 0.2s ease;
}
.seg-btn:hover:not(:disabled) { background: rgba(var(--accent-rgb), 0.16); color: var(--text-main); }
.seg-btn.active { background: var(--accent-gradient); color: var(--btn-text); }
.seg-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.visu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 30px; padding: 0 8px;
    border: 1px solid var(--border-gold); border-radius: 8px;
    background: rgba(var(--accent-rgb), 0.10); color: var(--text-main);
    font: inherit; font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease;
}
.visu-btn:hover { background: rgba(var(--accent-rgb), 0.2); color: var(--accent-color); }

.visu-corps {
    display: flex; align-items: center; justify-content: center;
    flex: 1 1 auto; min-height: 0; padding-top: 8px;
}
#contenu-dessin { position: relative; flex: 0 0 auto; overflow: hidden; }

#contenu-dessin.mode-onglets > .fenetre-contenu {
    position: absolute; inset: 0; padding: 0; background: none; border: none; box-shadow: none;
    border-radius: 0; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
#contenu-dessin.mode-onglets > .fenetre-contenu.active { opacity: 1; pointer-events: auto; }

#contenu-dessin.mode-multi {
    flex: 0 0 auto; display: grid; gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}
#contenu-dessin.mode-multi > .fenetre-contenu {
    position: relative; inset: auto; opacity: 1; pointer-events: auto;
    border-radius: 8px; overflow: hidden; width: 100%; height: 100%;
}

.canvas_container {
    width: 100%; height: 100%; position: relative; overflow: hidden;
    border-radius: 8px; background: var(--canvas-bg); border: 1px solid var(--border-gold);
}
.canvas_container canvas {
    position: absolute; top: 0; left: 0;
    width: 100% !important; height: 100% !important; object-fit: contain;
}

/* Zoom : la visualisation occupe la zone (bandeau et pied de page restent visibles) */
#conteneur_simulation.zoom-actif {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-template-areas: "visu" !important;
    overflow: hidden;
}
#conteneur_simulation.zoom-actif > *:not(#zone-visu) { display: none !important; }
#conteneur_simulation.zoom-actif #zone-visu {
    grid-area: visu;
    width: auto !important;
    height: calc(100vh - 150px) !important;
    max-width: 100% !important;
    min-height: 260px;
}

@media (min-width: 900px) {
    body.zoom-actif { overflow: hidden; }
}

/* =========================================================================
   6. FENÊTRES (glassmorphism thémé)
   ========================================================================= */
.fenetre {
    background: var(--panel-bg-1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 8px 10px;
    display: flex; flex-direction: column;
    position: relative; min-height: 0;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.38), inset 0 0 15px rgba(0, 0, 0, 0.18);
}
.fenetre_titre {
    font-weight: 600; font-size: 1.02rem; color: var(--accent-color);
    text-align: left; margin: 0; padding: 0;
}
.right-column { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }

/* =========================================================================
   7. ACTIONS
   ========================================================================= */
#fenetre-actions { flex: 0 0 auto; padding: 10px 12px; }
.fenetre_titre_wrapper {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border-gold);
}
.fenetre_titre_wrapper .fenetre_titre { margin: 0; padding: 0; border: none; text-align: left; }
.actions-body { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.pas-a-pas-row { flex-wrap: nowrap; gap: 10px; align-items: center; }
.pas-a-pas-row #btn_suivant { margin-left: auto; }
.vitesse_group { display: flex; align-items: center; width: 100%; gap: 10px; }

/* =========================================================================
   7. PANNEAUX REPLIABLES
   ========================================================================= */
.panneau-toggle {
    background: transparent; border: 1px solid var(--border-gold); color: var(--text-highlight);
    font-size: 0.9rem; line-height: 1; cursor: pointer; padding: 5px 9px; border-radius: 6px;
    transition: all 0.2s ease; flex-shrink: 0;
}
.panneau-toggle:hover { background: rgba(var(--accent-rgb), 0.18); }
.fenetre.collapsed .panneau-corps { display: none; }

/* =========================================================================
   9. TRANSITIONS & INFORMATIONS (sous Actions, dépliable)
   ========================================================================= */
.transitions-body { display: flex; flex-direction: column; gap: 10px; }
.bloc-info {
    background: var(--bloc-bg); border: 1px solid var(--border-gold);
    border-radius: 8px; padding: 8px 10px;
}
.bloc-sous-titre {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--text-highlight); margin-bottom: 4px;
}
#info_content {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    min-height: 44px; padding: 4px 6px; font-size: 0.95rem; line-height: 1.45;
    color: var(--text-main); text-align: center;
    font-family: 'Courier New', Courier, monospace;
}
#info_content p { margin: 0.2em 0; }
#calculs_content { display: flex; flex-direction: column; gap: 8px; }
.calculs_titre {
    font-size: 0.9rem; font-weight: 600; color: var(--accent-color);
    text-align: center; padding-bottom: 4px; border-bottom: 1px solid var(--border-gold);
}
.info_cadres_container { display: flex; flex-wrap: wrap; gap: 6px; }
.info_cadre {
    flex: 1 1 90px; min-width: 0;
    background-color: var(--bloc-bg);
    border: 1px solid var(--border-gold);
    border-radius: 6px; padding: 6px; text-align: center;
}
.info_cadre_titre { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; line-height: 1.2; }
.info_cadre_valeur { font-size: 1rem; font-weight: 600; color: var(--text-main); }
.deltaE_formule {
    background-color: var(--bloc-bg-fort);
    border: 1px solid var(--border-gold);
    border-radius: 6px; padding: 8px; font-size: 0.92rem; text-align: center;
    font-family: 'Courier New', Courier, monospace;
    color: var(--accent-color); text-shadow: 0 0 5px rgba(var(--accent-rgb), 0.5);
}
.deltaE_formule .indice { font-size: 0.8em; position: relative; top: 2px; }

/* =========================================================================
   9. RÉGLAGES (pleine largeur, dépliable)
   ========================================================================= */
.reglages-body { display: flex; flex-direction: column; gap: 12px; }
.reglages-haut { flex-wrap: wrap; gap: 10px; align-items: flex-end; }
#select_atome { flex: 1 1 220px; }
#btn_reset { flex: 0 0 auto; }
.reglages-haut .input_group { flex: 1 1 110px; min-width: 96px; }
.unites-group { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.unites-label { font-size: 0.8rem; color: var(--text-highlight); font-weight: 500; }
.unites-group .seg-btn { padding: 0 10px; font-size: 0.82rem; letter-spacing: 0; }
.input_group { display: flex; flex-direction: column; }
.input_group label { font-size: 0.8rem; color: var(--text-highlight); margin-bottom: 4px; font-weight: 500; }
.input_group input { width: 100%; text-align: center; }

#zone_spectres { display: flex; flex-direction: column; gap: 5px; }
#zone_spectres .slider_container { padding: 5px 0; }
#canvas_spectre_absorption { height: clamp(48px, 8vh, 84px); }
#canvas_spectre_emission { height: clamp(48px, 8vh, 84px); }
#canvas_curseur_losange { height: 20px; border: none; background: transparent; border-radius: 0; }
#canvas_valeurs_lambda { height: 64px; border: none; background: transparent; border-radius: 0; }

/* =========================================================================
   10. CONTRÔLES
   ========================================================================= */
.control_row { display: flex; gap: 10px; align-items: center; }
.control_element {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    border-radius: 5px; padding: 8px 12px;
    font-family: inherit; font-size: 0.85rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.5px;
    outline: none; transition: all 0.2s ease; cursor: pointer; text-align: center;
}
.control_element:not(:disabled):hover {
    background-color: rgba(var(--accent-rgb), 0.18);
    border-color: var(--accent-color);
}
.control_element:disabled {
    border-color: var(--text-muted); color: var(--text-muted);
    background-color: var(--bloc-bg-fort); cursor: not-allowed; opacity: 0.6;
}
input.control_element { cursor: text; text-transform: none; letter-spacing: 0; }
select.control_element { cursor: pointer; }
select.control_element option { background-color: var(--menu-bg); color: var(--text-main); }

#btn_lancer_photon {
    background: var(--accent-gradient); color: var(--btn-text);
    font-weight: 700; border: 1px solid rgba(255, 255, 255, 0.5); flex: 1 1 auto;
}
#btn_lancer_photon:hover { box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.8); transform: scale(1.02); }

#btn_alim_continue { flex: 1 1 auto; }
#btn_alim_continue[data-etat="off"] { background-color: #9d2f0f; border-color: #ff6a3d; color: #FFF; font-weight: 700; }
#btn_alim_continue[data-etat="off"]:hover { box-shadow: 0 0 10px #ff6a3d; }
#btn_alim_continue[data-etat="on"] { background-color: #006400; border-color: #32CD32; color: #FFF; font-weight: 700; }
#btn_alim_continue[data-etat="on"]:hover { box-shadow: 0 0 10px #32CD32; }

#btn_reset { background-color: #9d2f0f; border-color: #ff6a3d; color: #FFF; font-weight: 600; }
#btn_reset:hover { background-color: #c53a12; box-shadow: 0 0 10px #ff6a3d; }

#btn_suivant { background: transparent; color: var(--accent-color); border-width: 2px; }
#btn_suivant:not(:disabled):hover { background: rgba(var(--accent-rgb), 0.15); box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5); }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch_slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(120, 120, 130, 0.55); border-radius: 24px; transition: .4s;
}
.switch_slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; border-radius: 50%; transition: .4s;
}
input:checked + .switch_slider { background-color: var(--accent-color); }
input:checked + .switch_slider:before { transform: translateX(20px); }
.switch_label { color: var(--text-main); cursor: pointer; font-size: 0.95rem; }

.slider_spectral, .slider_vitesse {
    -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
    background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.25), rgba(var(--accent-rgb), 0.6));
    outline: none; border: 1px solid var(--border-gold); border-radius: 3px;
}
.slider_spectral::-webkit-slider-thumb, .slider_vitesse::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; background: var(--accent-color);
    cursor: pointer; border-radius: 50%;
    border: 2px solid var(--text-main); box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.slider_spectral::-moz-range-thumb, .slider_vitesse::-moz-range-thumb {
    width: 18px; height: 18px; background: var(--accent-color);
    cursor: pointer; border-radius: 50%; border: 2px solid var(--text-main);
}
.slider_label { color: var(--text-main); font-size: 0.9rem; flex: none; }

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.5); }
    50% { box-shadow: 0 0 20px 5px rgba(var(--accent-rgb), 0.8); }
    100% { box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.5); }
}
.waiting-for-input { animation: pulse-glow 2s infinite ease-in-out; border-color: var(--text-main); }

::selection { background: rgba(var(--accent-rgb), 0.30); color: var(--text-main); }
input::selection, select::selection, textarea::selection { background: rgba(var(--accent-rgb), 0.30); color: var(--text-main); }

/* =========================================================================
   11. RESPONSIVE
   ========================================================================= */
@media (max-width: 899px) {
    #sub_title { display: none; }
    .theme-current-label { display: none; }
    #zone-visu { height: auto; width: 100%; aspect-ratio: 4 / 3; min-height: 0; flex: 0 0 auto; }
    .reglages-haut { align-items: stretch; }
    #select_atome { flex: 1 1 100%; }
    .reglages-haut .input_group { flex: 1 1 30%; }
}
