/* Étape 9 : les écrans de paramètres de Nuvio TV, rejoués comme à la télécommande. */
.nv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; container-type: inline-size; }
.nv-tv { padding: 8px; border-radius: 18px; background: #050304; box-shadow: 0 0 0 2px #2b1820, 0 24px 60px rgba(0,0,0,.55); }
.nv-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; cursor: pointer; display: grid; grid-template-columns: 26% minmax(0, 1fr); gap: 18px; padding: 18px 18px 0 14px;
  font: 500 13px/1.3 Inter, var(--body); color: #fff; -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse 90% 70% at 25% 0%, rgba(214,222,203,.5), transparent 70%), linear-gradient(172deg, #9ca593 0%, #858c7d 46%, #71675b 100%); }
.nv-screen:focus-visible { outline-offset: 6px; border-radius: 10px; }
.nv-ico { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nv-chev { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Barre latérale : la rubrique choisie reste vers la 3e place, la liste glisse */
.nv-side { overflow: hidden; padding: 4px 4px 0; -webkit-mask: linear-gradient(transparent, #000 26px, #000 85%, transparent); mask: linear-gradient(transparent, #000 26px, #000 85%, transparent); }
.nv-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; transition: transform .5s cubic-bezier(.3,.7,.2,1); }
.nv-side li { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 99px; background: #141113; font-weight: 700; font-size: 12.5px; white-space: nowrap; box-shadow: 0 0 0 2px transparent; transition: background .25s, box-shadow .25s, opacity .25s; }
.nv-side li span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nv-side li.sep { padding: 0; height: 1px; margin: 0 14px; background: rgba(255,255,255,.22); }
.nv-side li.sel { background: rgba(255,196,186,.32); box-shadow: 0 0 0 2px #ff8f84; }
.nv-side li.focus { background: rgba(255,170,158,.42); box-shadow: 0 0 0 2px #ff6a5c, 0 0 16px rgba(255,106,92,.55); }

/* Les écrans : en-tête fixe, contenu qui défile sous le focus */
.nv-main { position: relative; min-width: 0; }
.nv-page { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s .35s; }
.nv-page.on { opacity: 1; visibility: visible; transition: opacity .35s ease .1s, visibility 0s; }
.nv-head { padding: 0 2px 10px; }
.nv-head h4 { margin: 0; font: 600 19px/1.15 Inter, var(--body); letter-spacing: -.01em; }
.nv-head p { margin: 3px 0 0; font-size: 11.5px; color: rgba(255,255,255,.78); }
.nv-vp { position: relative; overflow: hidden; -webkit-mask: linear-gradient(transparent, #000 10px, #000 calc(100% - 26px), transparent); mask: linear-gradient(transparent, #000 10px, #000 calc(100% - 26px), transparent); }
.nv-ct { position: relative; display: grid; gap: 10px; padding: 6px 4px 240px; transition: transform .5s cubic-bezier(.3,.7,.2,1); }
.nv-group { display: grid; gap: 7px; padding: 10px; border-radius: 20px; background: linear-gradient(180deg, rgba(150,96,78,.42), rgba(122,74,60,.36)); border: 1px solid rgba(255,226,212,.3); }
.nv-gh { margin: 0 4px 2px; display: grid; }
.nv-gh b { font-weight: 600; font-size: 13px; }
.nv-gh small { font-size: 10.5px; color: rgba(255,255,255,.72); }

/* Une ligne de réglage : pilule sombre */
.nv-row { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 8px 16px; border-radius: 24px; background: #141113; }
.nv-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.nv-txt b { font-weight: 700; font-size: 13px; }
.nv-txt small { font-size: 10.5px; color: rgba(255,255,255,.7); line-height: 1.3; }
.nv-val { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; text-align: right; color: rgba(255,255,255,.95); flex: none; max-width: 48%; }
.nv-tg { position: relative; flex: none; width: 32px; height: 18px; border-radius: 99px; background: rgba(232,232,232,.86); transition: background .25s; }
.nv-tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: left .25s; }
.nv-tg.on { background: #ee5a4b; } .nv-tg.on::after { left: 16px; }
.nv-row.dim { opacity: .55; } .nv-row.dim .nv-tg { background: rgba(120,120,120,.6); }
.nv-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.nv-slider { display: grid; gap: 6px; padding-block: 10px; }
.nv-sl-top { display: flex; align-items: center; gap: 10px; }
.nv-sl { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.nv-sl i { font-style: normal; width: 12px; text-align: center; }
.nv-track { flex: 1; height: 7px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.nv-track span { display: block; height: 100%; border-radius: inherit; background: #fff; }

/* Sections repliables : « Fermé » puis « Ouvert », le contenu se déplie dans un cadre en retrait */
.nv-sec .nv-ico { width: 17px; height: 17px; }
.nv-etat { color: rgba(255,255,255,.9); }
.nv-sec .nv-chev { transition: transform .3s; }
.nv-secw.open .nv-sec .nv-chev { transform: rotate(90deg); }
.nv-secw + .nv-secw { margin-top: 0; }
.nv-kids { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.3,.7,.2,1); }
.nv-secw.open .nv-kids { grid-template-rows: 1fr; }
.nv-kin { min-height: 0; overflow: hidden; }
.nv-kbox { display: grid; gap: 6px; margin: 7px 0 3px 14px; padding: 8px; border-radius: 22px; border: 1px solid rgba(255,230,218,.32); background: rgba(255,255,255,.04); opacity: 0; transform: translateY(-6px); transition: opacity .35s .08s, transform .35s .08s; }
.nv-secw.open .nv-kbox { opacity: 1; transform: none; }
.nv-h { margin: 6px 8px 0; display: grid; gap: 1px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: rgba(255,255,255,.62); }
.nv-h small { font-size: 10px; font-weight: 500; letter-spacing: 0; color: rgba(255,255,255,.62); }
.nv-h small.warn { color: #ffd75e; }
.nv-p { margin: 0 8px; font-size: 10.5px; color: rgba(255,255,255,.75); }
.nv-url { padding: 9px 12px; border-radius: 14px; background: rgba(0,0,0,.42); font: 10px/1.45 var(--type); color: rgba(255,255,255,.85); word-break: break-all; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Puces, cartes à choisir, nuancier, « Apply to » */
.nv-chips, .nv-apply { display: grid; gap: 6px; padding: 4px 8px; border-radius: 16px; font-size: 11.5px; font-weight: 600; }
.nv-apply > span:first-child { font-size: 10px; letter-spacing: .08em; color: rgba(255,255,255,.62); }
.nv-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.nv-chip-row i { font-style: normal; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; background: #141113; font-size: 10.5px; font-weight: 600; }
.nv-chip-row i.sel { background: #ea7363; box-shadow: 0 0 0 1.5px #ffc0b6; }
.nv-apply .nv-tg { width: 24px; height: 14px; } .nv-apply .nv-tg::after { width: 10px; height: 10px; } .nv-apply .nv-tg.on::after { left: 12px; }
.nv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 2px; border-radius: 16px; }
.nv-card { position: relative; display: grid; gap: 4px; align-content: start; padding: 9px; border-radius: 14px; background: #141113; font-size: 11px; }
.nv-card b { font-weight: 700; } .nv-card small { font-size: 9.5px; color: rgba(255,255,255,.66); }
.nv-card.sel { box-shadow: 0 0 0 2px #ee5a4b; }
.nv-card.sel::after { content: "✓"; position: absolute; top: 6px; right: 7px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 800; background: #ee5a4b; }
.nv-art { display: grid; gap: 2px; height: 34px; padding: 3px; border-radius: 6px; background: rgba(255,255,255,.07); }
.nv-art i { border-radius: 2px; background: rgba(255,255,255,.32); }
.nv-layout .nv-card:nth-child(1) .nv-art { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1.6fr 1fr; }
.nv-layout .nv-card:nth-child(1) .nv-art i:first-child { grid-column: span 4; background: rgba(255,255,255,.5); }
.nv-layout .nv-card:nth-child(2) .nv-art { grid-template-columns: repeat(5, 1fr); }
.nv-layout .nv-card:nth-child(3) .nv-art { grid-template-columns: repeat(4, 1fr); }
.nv-cw .nv-art { justify-items: center; align-items: center; }
.nv-cw .nv-card:nth-child(1) .nv-art { grid-template-columns: 1.4fr 1fr; } .nv-cw .nv-card:nth-child(1) .nv-art i { width: 100%; height: 80%; }
.nv-cw .nv-card:nth-child(2) .nv-art i { width: 90%; height: 70%; }
.nv-cw .nv-card:nth-child(3) .nv-art i { width: 30%; height: 100%; }
.nv-swatches { display: flex; gap: 7px; padding: 2px; border-radius: 16px; overflow: hidden; }
.nv-sw { position: relative; flex: none; display: grid; justify-items: center; gap: 4px; width: 58px; padding: 8px 4px 6px; border-radius: 14px; background: #141113; font-size: 9.5px; font-weight: 700; }
.nv-sw i { width: 22px; height: 22px; border-radius: 50%; }
.nv-sw.sel { box-shadow: 0 0 0 2px #ee5a4b; }
.nv-sw.sel i::after { content: "✓"; display: grid; place-items: center; height: 100%; font: 800 12px/1 var(--body); font-style: normal; color: #fff; }

/* Le cadre de focus : il glisse d'une ligne à l'autre ; ambre sur un réglage « à adapter » */
.nv-ring { position: absolute; top: 0; left: 0; width: 0; height: 0; pointer-events: none; z-index: 2; opacity: 0; border-radius: 24px;
  box-shadow: 0 0 0 2px #ff6a5c, 0 0 0 5px rgba(255,106,92,.22), 0 0 22px rgba(255,106,92,.5);
  transition: transform .38s cubic-bezier(.3,.7,.2,1), width .38s cubic-bezier(.3,.7,.2,1), height .38s cubic-bezier(.3,.7,.2,1), border-radius .38s, opacity .25s, box-shadow .3s; }
.nv-ring.on { opacity: 1; }
.nv-ring.adapt { box-shadow: 0 0 0 2px var(--bulb), 0 0 0 5px rgba(255,207,107,.25), 0 0 24px rgba(255,207,107,.55); }
.nv-vp::before, .nv-vp::after { content: ""; position: absolute; left: 50%; z-index: 3; width: 7px; height: 7px; margin-left: -4px; border: solid #fff; border-width: 2px 0 0 2px; opacity: 0; transition: opacity .3s; }
.nv-vp::before { top: 3px; transform: rotate(45deg); }
.nv-vp::after { bottom: 8px; transform: rotate(225deg); }
.nv-vp.up::before, .nv-vp.down::after { opacity: .9; }

/* La bulle, comme un sous-titre en bas de l'écran */
.nv-cap { position: absolute; left: 50%; bottom: 14px; z-index: 5; width: min(86%, 560px); display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; border-radius: 14px;
  background: rgba(14,8,11,.93); border: 1px solid rgba(245,234,216,.22); box-shadow: 0 14px 34px rgba(0,0,0,.5); font: 500 13px/1.45 var(--body); color: var(--cream);
  opacity: 0; transform: translate(-50%, 14px); transition: opacity .3s, transform .4s cubic-bezier(.3,.7,.2,1); pointer-events: none; }
.nv-cap.on { opacity: 1; transform: translate(-50%, 0); }
.nv-cap.adapt { border-color: rgba(255,207,107,.7); }
.nv-tag { flex: none; font: 800 .62rem/1.6 var(--body); letter-spacing: .12em; text-transform: uppercase; border-radius: 4px; padding: 1px 6px; color: var(--cream); box-shadow: inset 0 0 0 1px rgba(245,234,216,.45); }
.nv-cap.adapt .nv-tag { color: var(--ink); background: var(--bulb); box-shadow: none; }
.nv-pause { position: absolute; top: 10px; right: 12px; z-index: 5; font: 800 .62rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; padding: 5px 8px; border-radius: 99px; background: rgba(14,8,11,.75); color: var(--cream); opacity: 0; transition: opacity .25s; }
.nv.paused .nv-pause { opacity: 1; }

/* Sous l'écran : pause, chapitres (avec leur avancement), pas à pas */
.nv-bar { display: flex; align-items: center; gap: 8px; }
.nv-bar button { cursor: pointer; font-family: var(--body); }
.nv-pp, .nv-step { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--seat); background: var(--velvet); color: var(--cream); }
.nv-pp:hover, .nv-step:hover { border-color: var(--bulb); color: var(--bulb); }
.nv-bar svg { width: 18px; height: 18px; fill: currentColor; }
.nv-step svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nv-pp .i-play, .nv.paused .nv-pp .i-pause { display: none; } .nv.paused .nv-pp .i-play { display: inline; }
.nv-chaps { position: relative; flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nv-chaps::-webkit-scrollbar { display: none; }
.nv-chaps button { flex: 1 0 auto; padding: 8px 10px 9px; border: 0; border-radius: 8px; font-weight: 700; font-size: .8rem; color: var(--dim); white-space: nowrap;
  background: linear-gradient(var(--bulb), var(--bulb)) 0 100% / calc(var(--p, 0) * 100%) 2px no-repeat, linear-gradient(var(--seat), var(--seat)) 0 100% / 100% 2px no-repeat, transparent; }
.nv-chaps button:hover { color: var(--cream); }
.nv-chaps button[aria-current="true"] { color: var(--bulb); background-color: rgba(255,207,107,.07); }

/* La version texte, sous l'animation */
.nv-texte { border: 1px solid var(--seat); border-radius: 12px; padding: 10px 14px; background: rgba(0,0,0,.18); }
.nv-texte summary { cursor: pointer; color: var(--bulb); font-weight: 700; }
.nv-texte[open] summary { margin-bottom: 8px; }
.nvt-ecran + .nvt-ecran { margin-top: 12px; }
.nvt-titre { margin: 0 0 4px; font: 800 .8rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--bulb); }
.nv-texte ul { margin: 0; padding-left: 1.2em; display: grid; gap: 3px; font-size: .92rem; color: #e6d6c8; }
.nv-texte ul ul { margin-top: 3px; }
.nv-texte b { color: var(--cream); }
.nvt-adapt, .nvt-pourquoi { font: 800 .62rem/1.6 var(--body); letter-spacing: .1em; text-transform: uppercase; border-radius: 4px; padding: 1px 5px; vertical-align: 1px; }
.nvt-adapt { color: var(--ink); background: var(--bulb); }
.nvt-pourquoi { color: var(--cream); box-shadow: inset 0 0 0 1px rgba(245,234,216,.45); }

/* Sauts de chapitre et pas à pas : tout se place sans animation */
.nv.instant * { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .nv * { transition-duration: .01s !important; transition-delay: 0s !important; } }

/* Téléphone : pas de barre latérale, un écran plus haut que large */
@container (max-width: 620px) {
  .nv-screen { aspect-ratio: auto; height: 520px; grid-template-columns: minmax(0, 1fr); padding: 14px 10px 0; }
  .nv-side { display: none; }
  .nv-row { padding: 8px 12px; gap: 9px; }
  .nv-val { max-width: 44%; font-size: 11px; }
  .nv-kbox { margin-left: 6px; padding: 6px; }
  .nv-cap { width: calc(100% - 20px); bottom: 10px; font-size: 12.5px; flex-direction: column; gap: 4px; }
  .nv-chaps button { flex: none; }
}