/* Démo interactive : Premiere Pro (gris neutres) + panneau Iris (charte Néon). */
.iris-demo { position: relative; max-width: 1092px; margin: 0 auto; min-height: 420px; }
.iu { position: relative; container-type: inline-size; font-family: var(--f-texte); font-size: 12.5px; line-height: 1.4; color: var(--encre); -webkit-user-select: none; user-select: none; }
.iu *, .iu *::before, .iu *::after { box-sizing: border-box; }
.iu button { font: inherit; }
.iu svg { display: block; }
.iu-win { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .13); background: #19191B; box-shadow: 0 50px 120px -40px rgba(248, 87, 159, .45), 0 30px 80px -30px rgba(0, 0, 0, .8); }
.iu-titlebar { height: 36px; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 14px; background: #2A2A2D; border-bottom: 1px solid #111; font-size: 12px; color: #BDBDBD; }
.iu-lights { display: flex; gap: 7px; }
.iu-lights i { width: 11px; height: 11px; border-radius: 50%; background: #4A4A4E; }
.iu-apptitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.iu-apptitle b { color: #E6E6E6; font-weight: 500; }
.iu-tools { margin-left: auto; display: flex; gap: 6px; flex: none; }
.iu-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: #D8D8D8; font-size: 11.5px; cursor: pointer; }
.iu-btn svg { width: 14px; height: 14px; }
.iu-btn:hover { border-color: var(--rose); color: #fff; }
.iu-sound[aria-pressed="true"] { border-color: rgba(95, 214, 196, .55); color: var(--menthe); background: rgba(95, 214, 196, .08); }
.iu-sound.nudge { animation: nudge 1.6s ease-in-out 3; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(95, 214, 196, 0); } 50% { box-shadow: 0 0 0 5px rgba(95, 214, 196, .25); } }

.iu-body { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); height: 572px; gap: 3px; padding: 3px; background: #141416; }

/* ---------- panneau Iris */
.iu-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-radius: 6px; overflow: hidden; background: #232323; }
.iu-ptab, .iu-mtab, .iu-ttab { flex: none; height: 27px; display: flex; align-items: center; gap: 16px; padding: 0 12px; font-size: 11px; color: #8C8C8C; background: #1E1E1F; border-bottom: 1px solid #141414; white-space: nowrap; overflow: hidden; }
.iu-ptab-on, .iu-mtab, .iu-ttab { color: #E4E4E4; }
.iu-ptab-on { position: relative; }
.iu-ptab-on::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -8px; height: 2px; background: #3F9BFF; border-radius: 2px; }
.iu-app { position: relative; flex: 1; display: grid; grid-template-columns: 164px minmax(0, 1fr); min-height: 0; background: var(--nuit); }
.iu-app::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px 260px at 92% -10%, rgba(248, 87, 159, .13), transparent 66%), radial-gradient(360px 220px at 20% 120%, rgba(95, 214, 196, .06), transparent 64%); }
.iu-rail { position: relative; background: var(--nuit-2); border-right: 1px solid var(--bord); padding: 12px 8px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.iu-brand { display: flex; align-items: center; gap: 7px; padding: 0 4px 2px; }
.iu-brand svg { width: 20px; height: 20px; }
.iu-word { font-family: var(--f-titre); font-weight: 700; font-size: 16px; letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.iu-lib { font-family: var(--f-titre); font-size: 8.5px; letter-spacing: .18em; color: var(--encre-3); align-self: flex-end; padding-bottom: 3px; }
.iu-group { display: flex; flex-direction: column; gap: 1px; }
.iu-gtitle { font-size: 9.5px; font-weight: 500; letter-spacing: .04em; color: var(--encre-3); padding: 0 6px 5px; }
.iu-item { display: flex; align-items: center; gap: 7px; width: 100%; padding: 5px 7px; border-radius: 7px; border: 0; background: none; color: var(--encre-2); font-size: 11.5px; text-align: left; cursor: pointer; white-space: nowrap; }
.iu-item span { overflow: hidden; text-overflow: ellipsis; }
.iu-item svg { width: 13px; height: 13px; flex: none; opacity: .85; }
.iu-item:hover { background: var(--verre); color: var(--encre); }
.iu-item.on { color: #1A0A12; background: var(--grad); font-weight: 600; box-shadow: 0 3px 12px rgba(248, 87, 159, .28); }
.iu-item.on .iu-cpt { color: rgba(26, 10, 18, .6); }
.iu-cpt { margin-left: auto; font-style: normal; font-family: var(--f-mono); font-size: 9.5px; color: var(--encre-3); }
.iu-pt { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.iu-connect { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 5px 7px; border-radius: 7px; border: 1px dashed rgba(255, 255, 255, .14); color: var(--encre-3); font-size: 10.5px; }
.iu-connect svg { width: 11px; height: 11px; }

.iu-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; container: main / inline-size; }
@container main (max-width: 560px) { .iu-keys { display: none; } }
.iu-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--bord); }
.iu-search { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.iu-search svg { position: absolute; left: 10px; width: 15px; height: 15px; opacity: .55; pointer-events: none; }
.iu-search input { width: 100%; min-width: 0; font: inherit; font-size: 13px; color: var(--encre); background: var(--nuit-2); border: 1px solid var(--bord); border-radius: 9px; padding: 8px 10px 8px 32px; outline: none; transition: border-color .14s, box-shadow .14s; -webkit-user-select: text; user-select: text; }
.iu-search input::placeholder { color: var(--encre-3); }
.iu-search input:focus, .iu-search input.is-focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(248, 87, 159, .14); }
.iu-types { display: flex; flex: none; background: var(--nuit-2); border: 1px solid var(--bord); border-radius: 8px; padding: 2px; gap: 1px; }
.iu-types button { border: 0; background: none; color: var(--encre-3); padding: 5px 7px; border-radius: 6px; cursor: pointer; }
.iu-types button svg { width: 13px; height: 13px; }
.iu-types button:hover { color: var(--encre); }
.iu-types button.on { background: rgba(248, 87, 159, .15); color: var(--rose); }
.iu-ctx { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px 0; font-family: var(--f-mono); font-size: 10px; color: var(--encre-3); white-space: nowrap; }
.iu-count { color: var(--menthe); overflow: hidden; text-overflow: ellipsis; }
.iu-gridwrap { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 10px 12px 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; overscroll-behavior: contain; }
.iu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 9px; outline: none; }
.iu-empty { margin: 30px 10px; text-align: center; color: var(--encre-3); font-size: 12px; }

.iu-card { position: relative; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .03); border: 1px solid var(--bord); cursor: pointer; transition: transform .14s var(--ease), border-color .14s, background .14s, box-shadow .14s; touch-action: manipulation; }
.iu-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .17); background: rgba(255, 255, 255, .05); }
.iu-card.sel { border-color: var(--bord-rose); box-shadow: 0 0 0 1px var(--bord-rose), 0 8px 26px rgba(248, 87, 159, .2); }
.iu-card.is-new { animation: iuIn .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 26ms); }
.iu-card.dragging { opacity: .35; }
@keyframes iuIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.iu-vign { position: relative; height: 70px; background: #110D15; overflow: hidden; }
.iu-vign canvas { width: 100%; height: 100%; display: block; }
.iu-type { position: absolute; top: 5px; left: 5px; width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; background: rgba(8, 6, 10, .62); color: var(--encre); }
.iu-type svg { width: 11px; height: 11px; }
.iu-badge { position: absolute; bottom: 5px; right: 5px; font-family: var(--f-mono); font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: rgba(8, 6, 10, .74); color: var(--encre); }
.iu-fav, .iu-dl { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 6px; border: 0; display: grid; place-items: center; background: rgba(8, 6, 10, .62); color: var(--encre); cursor: pointer; padding: 0; }
.iu-fav { opacity: 0; transition: opacity .12s; }
.iu-card:hover .iu-fav, .iu-card.sel .iu-fav, .iu-fav.on { opacity: 1; }
.iu-fav svg, .iu-dl svg { width: 13px; height: 13px; }
.iu-dl:hover { background: var(--grad); color: #1A0A12; }
.iu-card.is-dl .iu-dl { background: rgba(79, 208, 138, .9); color: #06210F; }
.iu-card.is-dling .iu-dl { background: rgba(8, 6, 10, .8); }
.iu-src { position: absolute; bottom: 5px; left: 5px; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .92); color: #111; letter-spacing: .02em; }
.iu-playic { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; display: grid; place-items: center; background: rgba(8, 6, 10, .55); color: #fff; opacity: 0; transition: opacity .14s; pointer-events: none; }
.iu-playic svg { width: 12px; height: 12px; margin-left: 1px; }
.iu-card:hover .iu-playic { opacity: 1; }
.iu-card.playing .iu-playic { opacity: 0; }
.iu-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.iu-prog i { display: block; height: 100%; width: 0; background: var(--grad); }
.iu-card.is-dling .iu-prog { height: 3px; background: rgba(0, 0, 0, .5); }
.iu-card.is-dling .iu-prog i { background: var(--menthe); }
.iu-corps { padding: 6px 8px 8px; }
.iu-nom { font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iu-info { margin-top: 2px; font-family: var(--f-mono); font-size: 9.5px; color: var(--encre-3); display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; }
.iu-loc { color: var(--menthe); display: flex; align-items: center; gap: 3px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.iu-loc svg { width: 9px; height: 9px; flex: none; }
.iu-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--encre-3); flex: none; }
.iu-skel { height: 118px; border-radius: 10px; border: 1px solid var(--bord); background: linear-gradient(100deg, rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .03) 70%) 0 0 / 300% 100%; animation: skel 1.1s linear infinite; }
@keyframes skel { to { background-position: -150% 0; } }

.iu-insp { flex: none; display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--nuit-2); border-top: 1px solid var(--bord); }
.iu-insp-thumb { width: 84px; height: 48px; border-radius: 6px; overflow: hidden; background: #110D15; flex: none; border: 1px solid var(--bord); }
.iu-insp-thumb canvas { width: 100%; height: 100%; display: block; }
.iu-insp-txt { flex: 1; min-width: 0; }
.iu-insp-name { font-family: var(--f-titre); font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iu-insp:not(.has) .iu-insp-name { color: var(--encre-3); font-weight: 500; }
.iu-insp-meta { font-family: var(--f-mono); font-size: 10px; color: var(--encre-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iu-insp-meta b { color: var(--menthe); font-weight: 400; }
.iu-insp-bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin-top: 6px; overflow: hidden; }
.iu-insp-bar i { display: block; height: 100%; width: 0; background: var(--grad); }
.iu-keys { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: var(--encre-3); white-space: nowrap; }
.iu-keys kbd { font-family: var(--f-mono); font-size: 9.5px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--bord); margin-right: 5px; color: var(--encre-2); }
.iu-insert { flex: none; display: flex; align-items: center; gap: 6px; border: 0; border-radius: 9px; padding: 9px 12px; font-family: var(--f-titre); font-weight: 600; font-size: 12px; color: #1A0A12; background: var(--grad); box-shadow: 0 4px 16px rgba(248, 87, 159, .35); cursor: pointer; white-space: nowrap; transition: box-shadow .15s, transform .15s; }
.iu-insert svg { width: 14px; height: 14px; }
.iu-insert:hover:not(:disabled) { box-shadow: 0 6px 22px rgba(248, 87, 159, .55); transform: translateY(-1px); }
.iu-insert:disabled { opacity: .35; box-shadow: none; cursor: default; }
.iu-insert.press { transform: scale(.96); }

/* ---------- moniteur et timeline */
.iu-right { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1.08fr); gap: 3px; min-width: 0; min-height: 0; }
.iu-monitor, .iu-timeline { display: flex; flex-direction: column; min-height: 0; border-radius: 6px; overflow: hidden; background: #232323; }
.iu-screen { position: relative; flex: 1; min-height: 0; background: #1A1A1A; display: flex; align-items: center; justify-content: center; }
.iu-screen canvas { display: block; background: #000; box-shadow: 0 0 0 1px #0c0c0c; }
.iu-transport { flex: none; height: 32px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; background: #1E1E1F; border-top: 1px solid #141414; }
.iu-tc { font-family: var(--f-mono); font-size: 10.5px; color: #9A9A9A; }
.iu-tc-now { color: #4DA3FF; }
.iu-playbtn { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .08); color: #E0E0E0; display: grid; place-items: center; cursor: pointer; }
.iu-playbtn:hover { background: rgba(255, 255, 255, .16); }
.iu-playbtn svg { width: 12px; height: 12px; }
.iu-tl { flex: 1; min-height: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); }
.iu-heads { display: grid; grid-template-rows: 20px repeat(5, minmax(0, 1fr)); background: #202021; border-right: 1px solid #141414; }
.iu-rulerhead { border-bottom: 1px solid #141414; }
.iu-head { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: #9A9A9A; border-bottom: 1px solid #1A1A1A; }
.iu-head.is-a { color: #7FB9A8; }
.iu-lanes { position: relative; display: grid; grid-template-rows: 20px repeat(5, minmax(0, 1fr)); cursor: text; }
.iu-ruler { position: relative; border-bottom: 1px solid #141414; background: #1C1C1D; overflow: hidden; }
.iu-tick { position: absolute; top: 0; height: 100%; border-left: 1px solid #3A3A3A; font-family: var(--f-mono); font-size: 8.5px; color: #7A7A7A; padding-left: 3px; line-height: 20px; white-space: nowrap; }
.iu-lane { position: relative; border-bottom: 1px solid #1A1A1A; transition: background .12s; }
.iu-lane.is-a { background: rgba(255, 255, 255, .012); }
.iu-lane.drop { background: rgba(248, 87, 159, .13); box-shadow: inset 0 0 0 1px rgba(248, 87, 159, .55); }
.iu-clip { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; overflow: hidden; }
.iu-clip.is-v { background: #8C7FD8; }
.iu-clip.is-v canvas { position: absolute; left: 0; top: 0; height: 100%; width: auto; opacity: .9; }
.iu-clip.is-a { background: #33B99A; }
.iu-clip.is-a canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.iu-clipname { position: absolute; left: 4px; top: 1px; max-width: calc(100% - 8px); font-size: 8.5px; font-weight: 600; color: rgba(0, 0, 0, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iu-clip.is-v .iu-clipname { left: auto; right: 4px; color: rgba(255, 255, 255, .95); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.iu-clip.is-new { z-index: 2; animation: clipIn .9s var(--ease) both; }
@keyframes clipIn { 0% { transform: translateY(-10px) scale(1.04); box-shadow: 0 0 0 2px #fff, 0 0 26px rgba(248, 87, 159, .95); } 45% { transform: none; } 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6), 0 0 12px rgba(248, 87, 159, .45); } }
.iu-playhead { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid #3F9BFF; z-index: 4; pointer-events: none; }
.iu-playhead i { position: absolute; top: 2px; left: -6.5px; width: 12px; height: 13px; background: #3F9BFF; clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%); }

/* ---------- surimpressions (curseur, fantôme de glisser, toast, touches) */
.iu-cursor { position: absolute; left: 0; top: 0; z-index: 30; width: 22px; height: 22px; pointer-events: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6)); will-change: transform; }
.iu-cursor svg { width: 22px; height: 22px; }
.iu-cursor.click::after { content: ""; position: absolute; left: -9px; top: -9px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); animation: ripple .45s ease-out forwards; }
@keyframes ripple { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.iu-ghost { position: absolute; left: 0; top: 0; z-index: 29; width: 128px; pointer-events: none; border-radius: 10px; overflow: hidden; opacity: .95; background: #17121C; box-shadow: 0 18px 44px rgba(0, 0, 0, .65), 0 0 0 1.5px rgba(248, 87, 159, .7); will-change: transform; }
.iu-ghost .iu-card { border: 0; transform: none !important; }
.iu-toast { position: absolute; left: 50%; bottom: 18px; z-index: 25; display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 12px; background: rgba(20, 16, 24, .96); border: 1px solid rgba(79, 208, 138, .45); box-shadow: 0 14px 40px rgba(0, 0, 0, .55); font-size: 12.5px; font-weight: 500; white-space: nowrap; opacity: 0; transform: translate(-50%, 14px); transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: none; }
.iu-toast.on { opacity: 1; transform: translate(-50%, 0); }
.iu-toast svg { width: 18px; height: 18px; color: var(--vert); flex: none; }
.iu-turn { position: absolute; z-index: 24; left: 50%; top: -18px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: var(--grad); color: #1A0A12; font-family: var(--f-titre); font-weight: 700; font-size: 13.5px; white-space: nowrap; box-shadow: 0 10px 30px rgba(248, 87, 159, .45); animation: turnIn .6s var(--ease) both, bob 2.4s ease-in-out .6s infinite; pointer-events: none; }
@keyframes turnIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes bob { 50% { transform: translate(-50%, -4px); } }
.iu-keycap { position: absolute; z-index: 31; padding: 6px 12px; border-radius: 8px; background: #F4F1F3; color: #16121A; font-family: var(--f-mono); font-weight: 600; font-size: 13px; box-shadow: 0 4px 0 #A99FA5, 0 12px 30px rgba(0, 0, 0, .45); pointer-events: none; animation: keyIn .5s var(--ease) both; }
@keyframes keyIn { 0% { opacity: 0; transform: translateY(6px) scale(.9); } 30% { opacity: 1; transform: none; } 45% { transform: translateY(3px); box-shadow: 0 1px 0 #A99FA5, 0 8px 20px rgba(0, 0, 0, .45); } 60% { transform: none; } }

/* Mode banques en ligne */
.iu[data-mode="banks"] .iu-types button[data-type="audio"] { display: none; }

/* ---------- petites largeurs (requêtes de conteneur) */
@container (max-width: 820px) {
  .iu-body { grid-template-columns: minmax(0, 1fr); height: auto; }
  .iu-panel { height: 480px; }
  .iu-app { grid-template-columns: minmax(0, 1fr); }
  .iu-rail { display: none; }
  .iu-right { grid-template-rows: auto; }
  .iu-monitor { display: none; }
  .iu-timeline { height: 196px; }
  .iu-keys { display: none; }
  .iu-apptitle b { display: none; }
  .iu-btn span { display: none; }
  .iu-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}
@container (max-width: 420px) {
  .iu-panel { height: 440px; }
  .iu-top { padding: 8px; gap: 6px; }
  .iu-types button { padding: 5px; }
  .iu-gridwrap { padding: 8px; }
  .iu-grid { gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iu-insp { gap: 8px; padding: 8px; }
  .iu-insp-thumb { width: 64px; height: 40px; }
  .iu-insert span { display: none; }
  .iu-insert { padding: 9px 10px; }
  .iu-turn { font-size: 12px; top: -16px; }
}
@media (prefers-reduced-motion: reduce) {
  .iu-card.is-new, .iu-clip.is-new, .iu-turn, .iu-keycap { animation: none; }
}
