:root{--bg:#01030a;--panel:rgba(3,9,22,.9);--panel2:rgba(0,23,34,.82);--cyan:#00ffe1;--blue:#2b7cff;--violet:#ad5cff;--green:#76ff8a;--amber:#ffd66b;--text:#eaffff;--muted:#8fc6d1;--border:rgba(0,255,225,.42);--danger:#ff4d8f}*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden;background:#01030a;color:var(--text);font-family:Orbitron,Consolas,monospace}body:before{content:"";position:fixed;inset:0;background:linear-gradient(180deg,rgba(0,3,10,.42),rgba(0,0,0,.58)),url("../backcel.png") center center/cover no-repeat fixed;z-index:-3;filter:brightness(.94) contrast(1.12) saturate(1.12)}body:after{content:"";position:fixed;inset:0;background:radial-gradient(circle at 55% 18%,rgba(0,255,225,.16),transparent 36%),linear-gradient(90deg,rgba(0,255,225,.035) 1px,transparent 1px),linear-gradient(0deg,rgba(0,255,225,.025) 1px,transparent 1px);background-size:auto,44px 44px,44px 44px;pointer-events:none;z-index:-1}.app-shell{height:100vh;padding:9px;display:grid;grid-template-rows:auto 1fr;gap:9px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 13px;border:1px solid rgba(0,255,225,.26);background:linear-gradient(145deg,rgba(0,10,18,.26),rgba(0,36,52,.16));backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);border-radius:18px;box-shadow:0 0 18px rgba(0,255,225,.12),inset 0 0 18px rgba(0,255,225,.035)}h1{margin:0;color:var(--cyan);font-size:clamp(1.25rem,2.2vw,2.25rem);letter-spacing:.08em;text-shadow:0 0 16px var(--cyan)}p{margin:3px 0 0;color:var(--muted);font-size:.78rem}.status-panel{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.status-panel span,.visual-head span{padding:5px 8px;border:1px solid rgba(0,255,225,.35);border-radius:999px;background:rgba(0,0,0,.56);color:var(--green);font-size:.7rem;box-shadow:inset 0 0 12px rgba(0,255,225,.08)}.cockpit{min-height:0;display:grid;grid-template-columns:330px minmax(360px,1.1fr) minmax(360px,1fr);grid-template-rows:minmax(0,1fr) 250px;gap:9px}.panel{min-height:0;border:1px solid var(--border);border-radius:18px;background:linear-gradient(145deg,rgba(3,9,22,.68),rgba(0,23,34,.52));backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);box-shadow:0 0 24px rgba(0,255,225,.14),inset 0 0 24px rgba(0,255,225,.045);overflow:hidden}.left-panel{display:grid;grid-template-rows:auto 170px 1fr}.center-panel,.right-panel{display:grid;grid-template-rows:auto 1fr}.bottom-panel{grid-column:1/4;display:grid;grid-template-rows:auto 1fr}.visual-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;border-bottom:1px solid rgba(0,255,225,.24)}.visual-head.compact{padding:8px 10px}h2{font-size:.9rem;margin:0 0 8px;color:var(--cyan);text-shadow:0 0 9px rgba(0,255,225,.65)}.visual-head h2,.table-head h2{margin:0}canvas{width:100%;height:100%;display:block;background:radial-gradient(circle at center,rgba(0,255,225,.08),rgba(0,0,0,.62) 66%)}#leftOscilloscope{border-bottom:1px solid rgba(0,255,225,.2)}.controls-block{padding:10px;overflow:auto}button,select,input{width:100%;margin:4px 0;padding:7px 8px;border-radius:10px;border:1px solid rgba(0,255,225,.55);background:#04101e;color:var(--text);font-family:inherit;font-size:.76rem;box-shadow:inset 0 0 12px rgba(0,255,225,.08)}select{appearance:none;background:linear-gradient(145deg,#030b16,#061b2a);color:#f2ffff;font-weight:700}select option{background:#030914;color:#f2ffff}button{cursor:pointer;background:linear-gradient(145deg,#011925,#00394a);color:var(--cyan);font-weight:900;text-transform:uppercase;letter-spacing:.04em}button:hover{box-shadow:0 0 16px rgba(0,255,225,.35),inset 0 0 16px rgba(0,255,225,.12);transform:translateY(-1px)}.button-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.inline-label{display:block;color:var(--muted);font-size:.7rem;margin:6px 0}.inline-label input{margin-top:4px}.metrics-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:9px 0 3px}.metrics-grid div{padding:8px;border:1px solid rgba(0,255,225,.24);border-radius:12px;background:rgba(0,0,0,.38);min-width:0}.metrics-grid b,.metrics-grid span{display:block}.metrics-grid b{color:var(--muted);font-size:.64rem}.metrics-grid span{color:var(--green);font-size:.74rem;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.camera-buttons{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;padding:8px;border-top:1px solid rgba(0,255,225,.24)}.table-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 11px;border-bottom:1px solid rgba(0,255,225,.24)}.formula{font-size:.72rem;color:var(--amber);text-shadow:0 0 8px rgba(255,214,107,.35)}.tables{min-height:0;display:grid;grid-template-columns:1.1fr .85fr 1.1fr;gap:8px;padding:8px}.table-card{min-height:0;border:1px solid rgba(0,255,225,.18);border-radius:14px;background:rgba(0,0,0,.28);overflow:hidden;display:grid;grid-template-rows:auto 1fr}.table-card h3{margin:0;padding:7px 9px;color:var(--cyan);font-size:.75rem;border-bottom:1px solid rgba(0,255,225,.17)}.data-table{overflow:auto;font-size:.68rem}.data-table table{width:100%;border-collapse:collapse}.data-table th,.data-table td{padding:5px 6px;border-bottom:1px solid rgba(0,255,225,.12);text-align:left;white-space:nowrap}.data-table th{position:sticky;top:0;background:#04101e;color:var(--cyan);z-index:1}.data-table td{color:#dffcff}.data-table .ok{color:var(--green)}.data-table .num{color:var(--amber)}.osc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:6px;overflow:auto}.osc-row{display:grid;grid-template-columns:30px 1fr 72px 54px;gap:4px;align-items:center;padding:5px;border:1px solid rgba(0,255,225,.22);border-radius:12px;background:rgba(0,0,0,.28)}.osc-row label{color:var(--cyan);font-size:.66rem}.osc-row .freq{grid-column:2/3}.osc-row .freq-num{grid-column:3/4;font-size:.6rem;padding:4px}.osc-row .hz{font-size:.62rem;color:var(--green);text-align:right}.osc-row .gain{grid-column:2/5}.osc-row .wave{grid-column:1/4}.osc-row .one{grid-column:4/5;padding:5px;font-size:.6rem}.osc-row input,.osc-row select{margin:0;padding:4px}.hidden{display:none}@media(max-width:1280px){.cockpit{grid-template-columns:310px 1fr 1fr;grid-template-rows:minmax(0,1fr) 230px}.left-panel{grid-template-rows:auto 140px 1fr}.osc-grid{grid-template-columns:1fr}.tables{grid-template-columns:1fr 1fr 1fr}}@media(max-width:980px){html,body{overflow:auto}.app-shell{height:auto;min-height:100vh}.topbar{align-items:flex-start;flex-direction:column}.status-panel{justify-content:flex-start}.cockpit{display:flex;flex-direction:column}.panel{min-height:360px}.left-panel{min-height:720px}.bottom-panel{min-height:620px}.tables{grid-template-columns:1fr}.center-panel,.right-panel{height:62vh}.camera-buttons{grid-template-columns:1fr}.formula{font-size:.65rem}.table-head{align-items:flex-start;flex-direction:column}}.tables-extended{grid-template-columns:1fr 1fr 1fr 1.35fr}.synth-card{min-width:0}.synth-panel{padding:7px;overflow:auto}.synth-status{padding:7px;margin:4px 0 8px;border:1px solid rgba(118,255,138,.35);border-radius:10px;background:rgba(0,0,0,.38);color:var(--green);font-size:.65rem;line-height:1.35}.virtual-keyboard{display:grid;gap:5px;overflow:auto;max-height:155px;padding-bottom:4px}.vk-row{display:flex;gap:4px;align-items:stretch}.vk-row-1{padding-left:10px}.vk-row-2{padding-left:22px}.vk-row-3{padding-left:38px}.vk-row-numpad{padding-top:5px;border-top:1px solid rgba(0,255,225,.18);flex-wrap:wrap}.vk-key{width:auto;min-width:34px;flex:1;margin:0;padding:5px 4px;border-color:rgba(0,255,225,.48);background:linear-gradient(145deg,rgba(0,25,38,.95),rgba(2,9,22,.95));box-shadow:inset 0 0 10px rgba(0,255,225,.08),0 0 8px rgba(0,255,225,.08);text-transform:none;letter-spacing:0}.vk-key.sharp{border-color:rgba(173,92,255,.68);background:linear-gradient(145deg,rgba(52,0,76,.92),rgba(5,8,22,.95));color:var(--violet)}.vk-key b,.vk-key span,.vk-key small{display:block}.vk-key b{font-size:.72rem;color:var(--cyan)}.vk-key span{font-size:.58rem;color:var(--amber)}.vk-key small{font-size:.5rem;color:var(--muted)}.vk-key.active{transform:translateY(1px) scale(.98);border-color:var(--green);box-shadow:0 0 18px rgba(118,255,138,.65),inset 0 0 18px rgba(118,255,138,.22);background:linear-gradient(145deg,rgba(0,70,48,.95),rgba(0,18,25,.95))}.copyright{position:fixed;right:12px;bottom:4px;color:rgba(234,255,255,.62);font-size:.62rem;text-shadow:0 0 8px rgba(0,255,225,.4);pointer-events:none}@media(max-width:1280px){.tables-extended{grid-template-columns:1fr 1fr}.virtual-keyboard{max-height:190px}}@media(max-width:980px){.tables-extended{grid-template-columns:1fr}.virtual-keyboard{max-height:none}.vk-row{flex-wrap:wrap;padding-left:0}.copyright{position:static;padding:0 12px 8px}}.note-monitor{padding:7px 8px;margin:5px 0 8px;border:1px solid rgba(255,214,107,.42);border-radius:10px;background:rgba(12,6,0,.42);color:var(--amber);font-size:.68rem;line-height:1.35;box-shadow:inset 0 0 14px rgba(255,214,107,.08)}.vk-row-label{font-size:.58rem;color:var(--muted);padding:2px 4px 0;text-transform:uppercase;letter-spacing:.06em}.virtual-keyboard{max-height:225px}.vk-key{min-width:31px}.vk-key.active span,.vk-key.active small,.vk-key.active b{color:#ffffff;text-shadow:0 0 8px var(--green)}.piano-title{font-size:.62rem;color:var(--cyan);padding:4px 6px;border:1px solid rgba(0,255,225,.22);border-radius:10px;background:rgba(0,0,0,.28);text-shadow:0 0 8px rgba(0,255,225,.5)}.piano-board{position:relative;display:grid;grid-template-columns:repeat(14,minmax(28px,1fr));gap:3px;min-height:96px;padding:6px;border:1px solid rgba(0,255,225,.26);border-radius:13px;background:linear-gradient(180deg,rgba(0,255,225,.07),rgba(0,0,0,.32));overflow:auto}.piano-key{position:relative;margin:0;padding:6px 3px;border-radius:8px;text-transform:none;letter-spacing:0;min-width:30px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:2px;touch-action:none;user-select:none}.piano-key.white{height:82px;background:linear-gradient(180deg,rgba(234,255,255,.96),rgba(123,224,255,.7));color:#001018;border-color:rgba(0,255,225,.72);box-shadow:inset 0 -10px 18px rgba(0,255,225,.15),0 0 10px rgba(0,255,225,.08)}.piano-key.black{height:58px;margin-bottom:24px;background:linear-gradient(180deg,rgba(28,0,48,.98),rgba(2,4,14,.98));color:#f6efff;border-color:rgba(173,92,255,.82);box-shadow:0 0 13px rgba(173,92,255,.25),inset 0 -8px 16px rgba(173,92,255,.2)}.piano-key span{font-size:.55rem;font-weight:900}.piano-key small{font-size:.47rem;opacity:.82}.piano-key.active,.piano-key:active{transform:translateY(2px) scale(.985);border-color:var(--green);box-shadow:0 0 20px rgba(118,255,138,.88),inset 0 0 18px rgba(118,255,138,.26);background:linear-gradient(180deg,rgba(118,255,138,.95),rgba(0,75,55,.86));color:#fff;text-shadow:0 0 8px #fff}.note-monitor small{display:block;margin-top:3px;color:rgba(234,255,255,.74);font-size:.56rem;line-height:1.28}.vk-key.active{animation:keyPulse .18s linear infinite alternate}@keyframes keyPulse{from{filter:brightness(1)}to{filter:brightness(1.45)}}@media(max-width:980px){.piano-board{grid-template-columns:repeat(8,minmax(30px,1fr));min-height:150px}.piano-key.white{height:70px}.piano-key.black{height:52px;margin-bottom:18px}}html{scroll-behavior:smooth}body{-webkit-user-select:none;user-select:none}input,textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text}img,canvas{max-width:100%}button,input,select{min-height:36px}button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--green);outline-offset:2px;box-shadow:0 0 18px rgba(118,255,138,.45),inset 0 0 12px rgba(118,255,138,.12)}.copyright{position:fixed;right:14px;bottom:6px;z-index:50;padding:4px 9px;border:1px solid rgba(0,255,225,.22);border-radius:999px;background:rgba(0,0,0,.32);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);color:rgba(234,255,255,.8);font-size:.62rem;text-shadow:0 0 8px rgba(0,255,225,.55);pointer-events:none}.topbar h1::after{content:" @copyright";font-size:.52em;color:var(--amber);text-shadow:0 0 10px rgba(255,214,107,.5);letter-spacing:.06em}.panel{background:linear-gradient(145deg,rgba(3,9,22,.68),rgba(0,23,34,.50));backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.table-card,.metrics-grid div,.synth-status,.note-monitor{backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}@media(max-width:1440px){.cockpit{grid-template-columns:300px minmax(320px,1fr) minmax(320px,1fr);grid-template-rows:minmax(0,1fr) 285px}.tables-extended{grid-template-columns:1fr 1fr}.bottom-panel{min-height:285px}}@media(max-width:1100px){html,body{overflow:auto}.app-shell{height:auto;min-height:100vh}.cockpit{display:flex;flex-direction:column}.left-panel{min-height:690px}.center-panel,.right-panel{height:62vh;min-height:420px}.bottom-panel{min-height:780px}.tables,.tables-extended{grid-template-columns:1fr}.controls-block,.data-table,.synth-panel{max-height:none}}@media(max-width:720px){.app-shell{padding:6px;gap:6px}.topbar{padding:8px;align-items:flex-start;flex-direction:column}h1{font-size:1.1rem}p{font-size:.68rem}.status-panel span,.visual-head span{font-size:.62rem}.left-panel{min-height:780px}.center-panel,.right-panel{height:58vh;min-height:360px}.button-grid,.camera-buttons,.metrics-grid{grid-template-columns:1fr}.visual-head,.table-head{align-items:flex-start;flex-direction:column}.copyright{position:static;margin:0 6px 6px;display:inline-block}}@media(max-width:420px){button,select,input{font-size:.68rem}.panel{border-radius:13px}.osc-row{grid-template-columns:28px 1fr 62px 48px}.piano-board{grid-template-columns:repeat(6,minmax(28px,1fr))}}.assembly-search{margin:6px 0 8px;padding:7px;border:1px solid rgba(0,255,225,.22);border-radius:13px;background:rgba(0,0,0,.24);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.assembly-search input[type="search"]{border-color:rgba(118,255,138,.45);background:linear-gradient(145deg,rgba(0,20,28,.92),rgba(0,9,16,.92));color:var(--green)}.assembly-search input[type="search"]::placeholder{color:rgba(143,198,209,.72)}#assemblySearchInfo{margin-top:6px;font-size:.62rem;color:var(--amber);border-color:rgba(255,214,107,.3)}@media(max-width:720px){.assembly-search .button-grid{grid-template-columns:1fr}}#assemblySearchInfo::after{content:" · premiers 2000 = assemblages historiques";color:var(--green)}.synth-card{border-color:rgba(118,255,138,.36)}.assembly-search{margin:6px 0 8px;padding:7px;border:1px solid rgba(0,255,225,.22);border-radius:13px;background:rgba(0,0,0,.24);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.assembly-search input[type="search"]{border-color:rgba(118,255,138,.45);background:linear-gradient(145deg,rgba(0,20,28,.92),rgba(0,9,16,.92));color:var(--green)}.assembly-search input[type="search"]::placeholder{color:rgba(143,198,209,.72)}#assemblySearchInfo{margin-top:6px;font-size:.62rem;color:var(--amber);border-color:rgba(255,214,107,.3)}#randomEditAssembly{border-color:rgba(255,214,107,.62);color:var(--amber);background:linear-gradient(145deg,rgba(56,31,0,.92),rgba(3,12,22,.96))}#saveEditedAssembly{border-color:rgba(118,255,138,.62);color:var(--green);background:linear-gradient(145deg,rgba(0,55,38,.92),rgba(3,12,22,.96))}#showSavedAssemblies,#exportSavedAssemblies{border-color:rgba(173,92,255,.58);color:var(--violet)}@media(max-width:720px){.assembly-search .button-grid{grid-template-columns:1fr}}.assembly-search{margin:6px 0 8px;padding:7px;border:1px solid rgba(0,255,225,.22);border-radius:13px;background:rgba(0,0,0,.24);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.assembly-search input[type="search"]{border-color:rgba(118,255,138,.45);background:linear-gradient(145deg,rgba(0,20,28,.92),rgba(0,9,16,.92));color:var(--green)}.assembly-search input[type="search"]::placeholder{color:rgba(143,198,209,.72)}#assemblySearchInfo{margin-top:6px;font-size:.62rem;color:var(--amber);border-color:rgba(255,214,107,.3)}#generateRandomAssembly,#randomEditAssembly{border-color:rgba(255,214,107,.62);color:var(--amber);background:linear-gradient(145deg,rgba(56,31,0,.92),rgba(3,12,22,.96))}#generateRelaxationMode{border-color:rgba(118,255,138,.62);color:var(--green);background:linear-gradient(145deg,rgba(0,55,38,.92),rgba(3,12,22,.96))}#generateSleepMode{border-color:rgba(173,92,255,.62);color:var(--violet);background:linear-gradient(145deg,rgba(35,0,55,.92),rgba(3,12,22,.96))}#saveEditedAssembly{border-color:rgba(118,255,138,.62);color:var(--green);background:linear-gradient(145deg,rgba(0,55,38,.92),rgba(3,12,22,.96))}#showSavedAssemblies,#exportSavedAssemblies{border-color:rgba(173,92,255,.58);color:var(--violet)}@media(max-width:720px){.assembly-search .button-grid{grid-template-columns:1fr}}#generateCellularMode{border-color:rgba(255,77,143,.72);color:var(--danger);background:linear-gradient(145deg,rgba(70,0,38,.92),rgba(3,12,22,.96));box-shadow:inset 0 0 12px rgba(255,77,143,.12)}#stopTherapyCycle{border-color:rgba(255,214,107,.62);color:var(--amber)}#therapyCycleType{border-color:rgba(173,92,255,.55)}#therapyCycleStatus{border-color:rgba(255,77,143,.32);color:#ffd6e5;background:rgba(20,0,12,.34)}#cellularCycleMode{border-color:rgba(255,77,143,.55);background:linear-gradient(145deg,rgba(40,0,30,.92),rgba(3,12,22,.96));color:#ffd6e5}#activateCellularCycle{border-color:rgba(255,77,143,.78);color:#ffd6e5;background:linear-gradient(145deg,rgba(85,0,45,.92),rgba(3,12,22,.96));box-shadow:0 0 14px rgba(255,77,143,.16),inset 0 0 12px rgba(255,77,143,.12)}#mutateCellularCycle{border-color:rgba(255,214,107,.68);color:var(--amber);background:linear-gradient(145deg,rgba(65,38,0,.92),rgba(3,12,22,.96))}

/* === FINAL PATCH V3 — search + cellular tab === */
.topbar{position:relative;background:linear-gradient(145deg,rgba(0,10,18,.30),rgba(0,36,52,.16))!important;border-color:rgba(0,255,225,.30)!important;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.topbar h1{font-size:clamp(1.2rem,2vw,2.05rem)!important;color:#9ffcff!important;text-shadow:0 0 16px rgba(0,255,225,.9),0 0 28px rgba(173,92,255,.38)}
.topbar h1::after{content:"  Codé par Marc Goxe @copyright 2026";display:inline-block;margin-left:.65rem;font-size:.46em;color:var(--amber);letter-spacing:.08em;text-shadow:0 0 12px rgba(255,214,107,.7)}
.panel{background:linear-gradient(145deg,rgba(3,9,22,.62),rgba(0,23,34,.42))!important;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.immutable-copyright{position:fixed;left:50%;top:6px;transform:translateX(-50%);z-index:10000;padding:4px 13px;border:1px solid rgba(0,255,225,.22);border-radius:999px;background:rgba(0,0,0,.28);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);font-size:.62rem;color:rgba(234,255,255,.86);text-shadow:0 0 9px rgba(0,255,225,.75);pointer-events:none;user-select:none}
.window-fullscreen-btn{width:auto;min-width:112px;margin:0;padding:6px 10px;font-size:.62rem;border-color:rgba(255,214,107,.55);color:var(--amber);background:linear-gradient(145deg,rgba(40,24,0,.78),rgba(0,8,16,.75))}
.center-panel.fullscreen-window,.right-panel.fullscreen-window{position:fixed!important;inset:8px!important;z-index:9998!important;width:auto!important;height:auto!important;min-height:0!important;grid-column:auto!important;background:rgba(0,5,12,.86)!important}
body.window-fullscreen-active .panel:not(.fullscreen-window){filter:blur(1px) brightness(.55);pointer-events:none}
body.window-fullscreen-active .fullscreen-window{pointer-events:auto;box-shadow:0 0 42px rgba(0,255,225,.35),inset 0 0 30px rgba(0,255,225,.08)}

/* moteur recherche */
#assemblySearch{border-color:rgba(118,255,138,.55)!important;color:var(--green)!important;background:linear-gradient(145deg,rgba(0,20,28,.94),rgba(0,8,14,.94))!important}

/* Onglet modes cellulaires */
.cellular-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0}
.cellular-tab{border-color:rgba(255,77,143,.45);color:#ffd6e5;background:linear-gradient(145deg,rgba(45,0,30,.82),rgba(3,12,22,.95))}
.cellular-tab.active{border-color:rgba(0,255,225,.7);color:var(--cyan);box-shadow:0 0 16px rgba(0,255,225,.22)}
.cellular-tab-panel{display:none;padding:8px;border:1px solid rgba(255,77,143,.24);border-radius:13px;background:rgba(0,0,0,.24);margin:7px 0}
.cellular-tab-panel.active{display:block}
#cellularPresetMode{border-color:rgba(255,77,143,.55);background:linear-gradient(145deg,rgba(40,0,30,.92),rgba(3,12,22,.96));color:#ffd6e5}
#applyCellularPreset,#showCellularTable{border-color:rgba(255,77,143,.62);color:#ffd6e5;background:linear-gradient(145deg,rgba(65,0,38,.88),rgba(3,12,22,.96))}
.cellular-table-inline{max-height:360px;overflow:auto;font-size:.68rem}
.cellular-table-inline table{width:100%;border-collapse:collapse}
.cellular-table-inline th,.cellular-table-inline td{border-bottom:1px solid rgba(0,255,225,.18);padding:6px;text-align:left;vertical-align:top}
.cellular-table-inline th{color:var(--amber);position:sticky;top:0;background:#03101c}
.cellular-table-overlay{position:fixed;inset:18px;z-index:10001;overflow:auto;padding:18px;border:1px solid rgba(0,255,225,.45);border-radius:20px;background:rgba(0,8,18,.92);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);box-shadow:0 0 48px rgba(0,255,225,.25)}
.cellular-table-overlay table{width:100%;border-collapse:collapse;font-size:.78rem}.cellular-table-overlay th,.cellular-table-overlay td{border-bottom:1px solid rgba(0,255,225,.18);padding:8px;text-align:left;vertical-align:top}.cellular-table-overlay th{color:var(--amber);background:#03101c}.close-cellular-table{width:auto}

/* Correctif contrôles oscillateurs */
.osc-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.osc-row{display:grid!important;grid-template-columns:34px minmax(0,1fr) 82px!important;grid-template-rows:auto auto auto auto!important;gap:5px!important;align-items:center!important;padding:7px!important}
.osc-row label{grid-column:1/2;grid-row:1/2}.osc-row .freq{grid-column:2/3!important;grid-row:1/2!important;min-width:0!important}.osc-row .freq-num{grid-column:3/4!important;grid-row:1/2!important;width:100%!important;font-size:.58rem!important}.osc-row .hz{grid-column:1/4!important;grid-row:2/3!important;text-align:left!important;color:var(--green)!important}.osc-row .wave{grid-column:1/3!important;grid-row:3/4!important}.osc-row .gain{grid-column:1/4!important;grid-row:4/5!important}.osc-row .one{grid-column:3/4!important;grid-row:3/4!important;width:100%!important;font-size:.58rem!important;padding:6px 4px!important;min-height:31px!important}

/* mobile joysticks */
.mobile-joysticks{display:none;position:fixed;left:0;right:0;bottom:12px;z-index:9999;pointer-events:none;justify-content:space-between;align-items:flex-end;padding:0 16px}
.joy-zone{width:118px;height:118px;border:1px solid rgba(0,255,225,.45);border-radius:50%;background:rgba(0,8,18,.38);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);position:relative;pointer-events:auto;touch-action:none;box-shadow:0 0 22px rgba(0,255,225,.18)}
.joy-zone span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:.62rem;color:rgba(234,255,255,.55)}
.joy-knob{width:42px;height:42px;border-radius:50%;position:absolute;left:37px;top:37px;background:radial-gradient(circle,var(--cyan),rgba(0,255,225,.12));box-shadow:0 0 18px rgba(0,255,225,.8)}
.mobile-exit{width:auto;min-width:92px;pointer-events:auto;border-color:rgba(255,214,107,.65);color:var(--amber);background:rgba(0,0,0,.5)}
@media(max-width:980px){.mobile-joysticks{display:flex}.osc-grid{grid-template-columns:1fr!important}.window-fullscreen-btn{min-width:94px;font-size:.58rem}}
@media(max-width:720px){.topbar h1::after{display:block;margin-left:0;margin-top:4px}.immutable-copyright{top:auto;bottom:4px;font-size:.55rem}.joy-zone{width:102px;height:102px}.joy-knob{left:31px;top:31px;width:40px;height:40px}}

/* === V4 THEME SYSTEM — Light / Dark / Matrix Neon === */
.theme-switcher{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;margin-bottom:5px}
.theme-btn{width:auto;min-width:72px;margin:0;padding:6px 9px;font-size:.62rem;border-radius:999px;border:1px solid rgba(0,255,225,.35);background:rgba(0,0,0,.35);color:var(--text);box-shadow:inset 0 0 10px rgba(0,255,225,.08)}
.theme-btn.active{border-color:var(--amber);color:var(--amber);box-shadow:0 0 16px rgba(255,214,107,.35),inset 0 0 12px rgba(255,214,107,.12)}
body.theme-light{--bg:#effaff;--panel:rgba(245,252,255,.78);--panel2:rgba(225,245,255,.68);--cyan:#007d91;--blue:#2157ff;--violet:#6f35cc;--green:#008b50;--amber:#a36400;--text:#06131b;--muted:#335866;--border:rgba(0,125,145,.34);--danger:#c5235d;background:#effaff;color:var(--text)}
body.theme-light:before{background:linear-gradient(180deg,rgba(255,255,255,.80),rgba(235,250,255,.62)),url("../backcel.png") center center/cover no-repeat fixed!important;filter:brightness(1.12) contrast(.92) saturate(.82)!important}
body.theme-light:after{background:radial-gradient(circle at 55% 18%,rgba(0,125,145,.10),transparent 36%),linear-gradient(90deg,rgba(0,125,145,.05) 1px,transparent 1px),linear-gradient(0deg,rgba(0,125,145,.04) 1px,transparent 1px)!important}
body.theme-light .panel,body.theme-light .topbar,body.theme-light .table-card,body.theme-light .metrics-grid div,body.theme-light .assembly-search,body.theme-light .cellular-tab-panel{background:linear-gradient(145deg,rgba(255,255,255,.72),rgba(220,244,255,.54))!important;border-color:rgba(0,125,145,.28)!important;box-shadow:0 0 18px rgba(0,125,145,.10),inset 0 0 14px rgba(255,255,255,.35)!important}
body.theme-light button,body.theme-light select,body.theme-light input{background:linear-gradient(145deg,rgba(255,255,255,.92),rgba(220,243,255,.88))!important;color:#06131b!important;border-color:rgba(0,125,145,.38)!important}
body.theme-light canvas{background:radial-gradient(circle at center,rgba(0,125,145,.09),rgba(255,255,255,.40) 66%)!important}
body.theme-dark{--bg:#01030a;--panel:rgba(3,9,22,.9);--panel2:rgba(0,23,34,.82);--cyan:#00d8ff;--blue:#2b7cff;--violet:#8b5cff;--green:#47ffa0;--amber:#ffc44d;--text:#eaffff;--muted:#8fc6d1;--border:rgba(0,216,255,.32);--danger:#ff4d8f;background:#01030a;color:var(--text)}
body.theme-dark:before{background:linear-gradient(180deg,rgba(0,5,15,.72),rgba(0,0,0,.78)),url("../backcel.png") center center/cover no-repeat fixed!important;filter:brightness(.76) contrast(1.12) saturate(.96)!important}
body.theme-neon{--cyan:#00ffe1;--blue:#2b7cff;--violet:#ad5cff;--green:#76ff8a;--amber:#ffd66b;--danger:#ff2d66;--orange:#ff8a1c;--red:#ff2b2b;--matrix:#39ff14}
body.theme-neon:before{background:radial-gradient(circle at 18% 55%,rgba(0,255,225,.24),transparent 38%),radial-gradient(circle at 82% 48%,rgba(173,92,255,.25),transparent 40%),linear-gradient(180deg,rgba(0,3,10,.42),rgba(0,0,0,.60)),url("../backcel.png") center center/cover no-repeat fixed!important;filter:brightness(.95) contrast(1.18) saturate(1.22)!important}
body.theme-neon:after{background:radial-gradient(circle at 25% 30%,rgba(57,255,20,.18),transparent 26%),radial-gradient(circle at 65% 35%,rgba(255,214,107,.13),transparent 28%),radial-gradient(circle at 82% 58%,rgba(255,43,43,.12),transparent 22%),linear-gradient(90deg,rgba(0,255,225,.045) 1px,transparent 1px),linear-gradient(0deg,rgba(57,255,20,.035) 1px,transparent 1px)!important;background-size:auto,auto,auto,38px 38px,38px 38px!important;animation:matrixPulse 7s ease-in-out infinite alternate}
@keyframes matrixPulse{0%{filter:hue-rotate(0deg) brightness(1)}50%{filter:hue-rotate(16deg) brightness(1.08)}100%{filter:hue-rotate(-12deg) brightness(1.02)}}
body.theme-neon button:nth-of-type(6n+1){border-color:var(--green)!important;color:var(--green)!important}
body.theme-neon button:nth-of-type(6n+2){border-color:var(--amber)!important;color:var(--amber)!important}
body.theme-neon button:nth-of-type(6n+3){border-color:var(--orange)!important;color:var(--orange)!important}
body.theme-neon button:nth-of-type(6n+4){border-color:var(--danger)!important;color:var(--danger)!important}
body.theme-neon button:nth-of-type(6n+5){border-color:var(--violet)!important;color:var(--violet)!important}
body.theme-neon button:nth-of-type(6n+6){border-color:var(--cyan)!important;color:var(--cyan)!important}
body.theme-neon .panel{box-shadow:0 0 26px rgba(0,255,225,.16),0 0 42px rgba(173,92,255,.08),inset 0 0 25px rgba(57,255,20,.035)!important}
@media(max-width:720px){.theme-switcher{justify-content:flex-start}.theme-btn{font-size:.56rem;min-width:66px}}


/* === V5 READABILITY + YOUPLUGS MARCK'S THEME === */

/* Background now sits next to index.html as /backcel.png */
body:before{
  content:""!important;
  position:fixed!important;
  inset:0!important;
  background:linear-gradient(180deg,rgba(0,3,10,.42),rgba(0,0,0,.58)),url("../backcel.png") center center/cover no-repeat fixed!important;
  z-index:-3!important;
  filter:brightness(.94) contrast(1.12) saturate(1.12)!important;
}

/* LIGHT MODE — no pale cyan text, high contrast everywhere */
body.theme-light{
  --bg:#f5fbff!important;
  --panel:rgba(255,255,255,.86)!important;
  --panel2:rgba(232,245,252,.78)!important;
  --cyan:#005f6f!important;
  --blue:#123ecf!important;
  --violet:#5425a8!important;
  --green:#006b3f!important;
  --amber:#7b4a00!important;
  --text:#05121a!important;
  --muted:#253f4a!important;
  --border:rgba(0,82,104,.34)!important;
  --danger:#9e1747!important;
  background:#f5fbff!important;
  color:#05121a!important;
}
body.theme-light:before{
  background:linear-gradient(180deg,rgba(255,255,255,.86),rgba(241,249,252,.76)),url("../backcel.png") center center/cover no-repeat fixed!important;
  filter:brightness(1.12) contrast(.94) saturate(.76)!important;
}
body.theme-light *{
  text-shadow:none!important;
}
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light p,
body.theme-light label,
body.theme-light span,
body.theme-light div,
body.theme-light td,
body.theme-light th,
body.theme-light b{
  color:#05121a!important;
}
body.theme-light .topbar h1{
  color:#003e52!important;
  text-shadow:none!important;
  background:none!important;
  -webkit-text-fill-color:#003e52!important;
}
body.theme-light .topbar h1::after{
  color:#6b3d00!important;
  text-shadow:none!important;
}
body.theme-light .status-panel span,
body.theme-light .visual-head span,
body.theme-light .synth-status,
body.theme-light #assemblySearchInfo,
body.theme-light #therapyCycleStatus,
body.theme-light #cellularModeDescription{
  color:#083342!important;
  background:rgba(255,255,255,.82)!important;
  border-color:rgba(0,82,104,.32)!important;
  box-shadow:none!important;
}
body.theme-light .panel,
body.theme-light .topbar,
body.theme-light .table-card,
body.theme-light .metrics-grid div,
body.theme-light .assembly-search,
body.theme-light .cellular-tab-panel,
body.theme-light .controls-block{
  background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(230,244,250,.76))!important;
  border-color:rgba(0,82,104,.28)!important;
  box-shadow:0 0 18px rgba(0,82,104,.08),inset 0 0 14px rgba(255,255,255,.42)!important;
}
body.theme-light button,
body.theme-light select,
body.theme-light input,
body.theme-light textarea{
  background:#ffffff!important;
  color:#06131b!important;
  border-color:rgba(0,82,104,.42)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)!important;
}
body.theme-light select option{
  background:#ffffff!important;
  color:#06131b!important;
}
body.theme-light input::placeholder{
  color:#526b74!important;
}
body.theme-light .formula,
body.theme-light .hz,
body.theme-light .metrics-grid span,
body.theme-light .note-monitor,
body.theme-light .synth-status{
  color:#083342!important;
}
body.theme-light .cellular-tab{
  background:#ffffff!important;
  color:#06131b!important;
  border-color:rgba(0,82,104,.35)!important;
}
body.theme-light .cellular-tab.active{
  color:#003e52!important;
  border-color:#005f6f!important;
  background:#e6f6fb!important;
}
body.theme-light canvas{
  background:radial-gradient(circle at center,rgba(0,82,104,.08),rgba(255,255,255,.58) 66%)!important;
}
body.theme-light .immutable-copyright{
  background:rgba(255,255,255,.75)!important;
  color:#05121a!important;
  border-color:rgba(0,82,104,.32)!important;
}

/* YOUPLUGS MARCK'S — Youplugs Neon Cyber */
body.theme-youplugs{
  --bg:#05030B!important;
  --surface:#0B0618!important;
  --panel:rgba(11,6,24,.72)!important;
  --panel2:rgba(5,3,11,.72)!important;
  --pink:#FF2DF7!important;
  --cyan:#00D9FF!important;
  --blue:#00D9FF!important;
  --violet:#8A2CFF!important;
  --green:#74FFB2!important;
  --amber:#FFD166!important;
  --danger:#FF2D6D!important;
  --text:#F8F7FF!important;
  --muted:#9DA6FF!important;
  --border:rgba(255,255,255,.12)!important;
  background:#05030B!important;
  color:#F8F7FF!important;
  font-family:Inter,system-ui,sans-serif!important;
}
body.theme-youplugs:before{
  background:
    radial-gradient(circle at top left,rgba(255,45,247,.30),transparent 34%),
    radial-gradient(circle at bottom right,rgba(0,217,255,.30),transparent 35%),
    linear-gradient(180deg,rgba(5,3,11,.66),rgba(5,3,11,.82)),
    url("../backcel.png") center center/cover no-repeat fixed!important;
  filter:brightness(.86) contrast(1.18) saturate(1.20)!important;
}
body.theme-youplugs:after{
  background:
    radial-gradient(circle at 18% 16%,rgba(255,45,247,.18),transparent 28%),
    radial-gradient(circle at 82% 82%,rgba(0,217,255,.18),transparent 30%),
    linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px),
    linear-gradient(0deg,rgba(255,255,255,.028) 1px,transparent 1px)!important;
  background-size:auto,auto,42px 42px,42px 42px!important;
}
body.theme-youplugs .app-shell{
  font-family:Inter,system-ui,sans-serif!important;
}
body.theme-youplugs .topbar,
body.theme-youplugs .panel,
body.theme-youplugs .table-card,
body.theme-youplugs .assembly-search,
body.theme-youplugs .cellular-tab-panel,
body.theme-youplugs .metrics-grid div{
  background:linear-gradient(180deg,rgba(11,6,24,.68),rgba(5,3,11,.70))!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:28px!important;
  box-shadow:0 0 30px rgba(0,217,255,.18),0 0 22px rgba(255,45,247,.10)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
}
body.theme-youplugs h1,
body.theme-youplugs .topbar h1{
  font-family:Orbitron,Audiowide,sans-serif!important;
  letter-spacing:.08em!important;
  background:linear-gradient(135deg,#FF2DF7,#8A2CFF,#00D9FF)!important;
  -webkit-background-clip:text!important;
  background-clip:text!important;
  color:transparent!important;
  -webkit-text-fill-color:transparent!important;
  text-shadow:0 0 22px rgba(255,45,247,.50)!important;
}
body.theme-youplugs .topbar h1::after{
  color:#9DA6FF!important;
  -webkit-text-fill-color:#9DA6FF!important;
  background:none!important;
  text-shadow:0 0 12px rgba(0,217,255,.45)!important;
}
body.theme-youplugs h2,
body.theme-youplugs h3{
  color:#F8F7FF!important;
  text-shadow:0 0 12px rgba(255,45,247,.38),0 0 18px rgba(0,217,255,.28)!important;
}
body.theme-youplugs p,
body.theme-youplugs label,
body.theme-youplugs span,
body.theme-youplugs td,
body.theme-youplugs th,
body.theme-youplugs b,
body.theme-youplugs div{
  color:#F8F7FF;
}
body.theme-youplugs .status-panel span,
body.theme-youplugs .visual-head span,
body.theme-youplugs .synth-status,
body.theme-youplugs #assemblySearchInfo,
body.theme-youplugs #therapyCycleStatus{
  color:#9DA6FF!important;
  background:rgba(11,6,24,.62)!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:0 0 18px rgba(0,217,255,.18)!important;
}
body.theme-youplugs button,
body.theme-youplugs select,
body.theme-youplugs input{
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(11,6,24,.92),rgba(5,3,11,.92))!important;
  color:#F8F7FF!important;
  border:1px solid rgba(255,255,255,.12)!important;
  box-shadow:0 0 16px rgba(0,217,255,.10),inset 0 0 10px rgba(255,45,247,.08)!important;
}
body.theme-youplugs button:hover{
  border-color:#FF2DF7!important;
  box-shadow:0 0 12px #FF2DF7,0 0 28px #00D9FF!important;
}
body.theme-youplugs .theme-btn.active,
body.theme-youplugs #applyCellularPreset,
body.theme-youplugs #generateRandomAssembly,
body.theme-youplugs #generateCellularMode{
  background:linear-gradient(135deg,#FF2DF7,#8A2CFF,#00D9FF)!important;
  color:#05030B!important;
  border-color:transparent!important;
}
body.theme-youplugs .cellular-tab.active{
  background:linear-gradient(135deg,#FF2DF7,#8A2CFF,#00D9FF)!important;
  color:#05030B!important;
}
body.theme-youplugs canvas{
  background:radial-gradient(circle at center,rgba(255,45,247,.10),rgba(0,217,255,.08),rgba(5,3,11,.72) 68%)!important;
}
body.theme-youplugs .immutable-copyright{
  background:rgba(11,6,24,.62)!important;
  color:#F8F7FF!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:0 0 18px rgba(255,45,247,.25),0 0 22px rgba(0,217,255,.20)!important;
}

@media(max-width:720px){
  body.theme-youplugs .topbar,
  body.theme-youplugs .panel{border-radius:22px!important}
}

/* === HOTFIX MARC LIGHT YOUPLUGS === */
body:before{content:""!important;position:fixed!important;inset:0!important;background:linear-gradient(180deg,rgba(0,3,10,.42),rgba(0,0,0,.58)),url("../backcel.png") center center/cover no-repeat fixed!important;z-index:-3!important;filter:brightness(.94) contrast(1.12) saturate(1.12)!important}
body.theme-light{--bg:#f6fbff!important;--panel:rgba(255,255,255,.92)!important;--panel2:rgba(232,245,252,.86)!important;--cyan:#003e52!important;--blue:#123ecf!important;--violet:#5425a8!important;--green:#005b36!important;--amber:#6d4100!important;--text:#041017!important;--muted:#243d48!important;--border:rgba(0,70,90,.38)!important;--danger:#99163f!important;background:#f6fbff!important;color:#041017!important}
body.theme-light:before{background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(242,249,252,.80)),url("../backcel.png") center center/cover no-repeat fixed!important;filter:brightness(1.10) contrast(.96) saturate(.74)!important}
body.theme-light:after{opacity:.32!important}
body.theme-light *,body.theme-light h1,body.theme-light h2,body.theme-light h3,body.theme-light h4,body.theme-light p,body.theme-light label,body.theme-light span,body.theme-light div,body.theme-light td,body.theme-light th,body.theme-light b,body.theme-light strong,body.theme-light small{color:#041017!important;text-shadow:none!important;-webkit-text-fill-color:initial!important}
body.theme-light .topbar h1{color:#003e52!important;-webkit-text-fill-color:#003e52!important;background:none!important}
body.theme-light .topbar h1::after{color:#5d3600!important;-webkit-text-fill-color:#5d3600!important;background:none!important}
body.theme-light .panel,body.theme-light .topbar,body.theme-light .table-card,body.theme-light .metrics-grid div,body.theme-light .assembly-search,body.theme-light .cellular-tab-panel,body.theme-light .controls-block,body.theme-light .data-table,body.theme-light .osc-row{background:linear-gradient(145deg,rgba(255,255,255,.94),rgba(231,244,250,.86))!important;border-color:rgba(0,70,90,.32)!important;box-shadow:0 0 14px rgba(0,70,90,.08),inset 0 0 12px rgba(255,255,255,.48)!important}
body.theme-light button,body.theme-light select,body.theme-light input,body.theme-light textarea{background:#fff!important;color:#041017!important;-webkit-text-fill-color:#041017!important;border-color:rgba(0,70,90,.45)!important;box-shadow:none!important}
body.theme-light select option{background:#fff!important;color:#041017!important}
body.theme-light input::placeholder{color:#4c646e!important;-webkit-text-fill-color:#4c646e!important}
body.theme-light .status-panel span,body.theme-light .visual-head span,body.theme-light .synth-status,body.theme-light #assemblySearchInfo,body.theme-light #therapyCycleStatus,body.theme-light #cellularModeDescription,body.theme-light .formula,body.theme-light .hz,body.theme-light .metrics-grid b,body.theme-light .metrics-grid span,body.theme-light .data-table th,body.theme-light .data-table td,body.theme-light .data-table .ok,body.theme-light .data-table .num,body.theme-light #baseFreq,body.theme-light #shapeMetric,body.theme-light #detMetric,body.theme-light #resultMetric{color:#041017!important;-webkit-text-fill-color:#041017!important;background:rgba(255,255,255,.84)!important;text-shadow:none!important}
body.theme-light .data-table th{background:#e6f3f8!important;color:#041017!important}
body.theme-light canvas{background:radial-gradient(circle at center,rgba(0,70,90,.08),rgba(255,255,255,.62) 66%)!important}
body.theme-light .cellular-tab,body.theme-light .theme-btn{background:#fff!important;color:#041017!important}
body.theme-light .cellular-tab.active,body.theme-light .theme-btn.active{background:#dff1f7!important;color:#002f3c!important;border-color:#003e52!important}
body.theme-light .immutable-copyright{background:rgba(255,255,255,.82)!important;color:#041017!important;border-color:rgba(0,70,90,.32)!important}
body.theme-youplugs .theme-btn[data-theme="youplugs"]{background:linear-gradient(135deg,#FF2DF7,#8A2CFF,#00D9FF)!important;color:#05030B!important;border-color:transparent!important}
.direct-osc-toggle{width:auto!important;min-width:150px!important;margin:0!important;padding:6px 10px!important;font-size:.62rem!important;border-color:rgba(255,214,107,.62)!important;color:var(--amber)!important}
body.hide-direct-osc #leftOscilloscope{display:none!important}
body.hide-direct-osc .left-panel{grid-template-rows:auto 1fr!important}
body.hide-direct-osc .controls-block{min-height:0!important}
body.hide-direct-osc .direct-osc-toggle{color:var(--green)!important;border-color:rgba(118,255,138,.62)!important}
body.theme-light .direct-osc-toggle{color:#041017!important;background:#fff!important;border-color:rgba(0,70,90,.45)!important}
