/* baie-plus.css (v102 à v106 : carte qui se détache, câbles, cadres colorés, pastilles) — baie de brassage : titres centrés, séparateurs, voyants LED réglables, survol lumineux, bandeau d'état.
   Chargé après baie.css ; les voyants se règlent dans /admin/baie-reglages.php (data-led="aucune|discrete|normale|intense"). */

/* ---- titres de tuiles centrés ---- */
.bx-p .bx-lab { text-align: center; padding-left: 0; padding-right: 0 }
.bx-p .bx-lab::before { display: none }

/* ---- fins traits de séparation entre les tuiles (posés par baie-plus.js : .js-plus, .bx-r1 = première tuile d'une ligne) ---- */
.bx.js-plus .bx-bd > .bx-p::after {
  content: ""; position: absolute; left: -6px; top: 0; bottom: 0; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, #4A5C72 14%, #4A5C72 86%, transparent);
}
.bx.js-plus .bx-bd > .bx-p.bx-r1::after { display: none }

/* ---- voyants LED ---- */
@keyframes bxp-traf  { 0%,100% { opacity: 1 } 10% { opacity: .08 } 17% { opacity: 1 } 36% { opacity: .08 } 43% { opacity: 1 } 61% { opacity: .08 } 66% { opacity: 1 } 84% { opacity: .08 } 90% { opacity: 1 } }
@keyframes bxp-intense { 0%,100% { opacity: 1 } 12% { opacity: .05 } 22% { opacity: 1 } 40% { opacity: .05 } 52% { opacity: 1 } 70% { opacity: .05 } 80% { opacity: 1 } }
@keyframes bxp-orange { 0%,55% { opacity: 1 } 56%,100% { opacity: .08 } }
.bx.on[data-led="normale"] .bx-ks:not(.cap):not(.lock) .bx-led.a { animation: bxp-traf 1.7s steps(1) calc(var(--i, 0) * -0.41s) infinite !important }
.bx.on[data-led="intense"] .bx-ks:not(.cap):not(.lock) .bx-led.a { animation: bxp-intense 1s steps(1) calc(var(--i, 0) * -0.29s) infinite !important; box-shadow: 0 0 10px #4ADE80, 0 0 3px #4ADE80 }
.bx.on[data-led="normale"] .bx-ks:not(.cap):not(.lock) .bx-led.b.act,
.bx.on[data-led="intense"] .bx-ks:not(.cap):not(.lock) .bx-led.b.act { animation: bxp-orange 1.1s steps(1) infinite !important }
.bx.on[data-led="intense"] .bx-ks:not(.cap):not(.lock) .bx-led.b.act { animation-duration: .8s !important; box-shadow: 0 0 12px #FBBF24, 0 0 3px #FBBF24 }
.bx.on[data-led="aucune"] .bx-led.a, .bx.on[data-led="aucune"] .bx-led.b.act { animation: none !important; opacity: 1 }
@media (prefers-reduced-motion: reduce) {
  .bx.on[data-led="normale"] .bx-ks:not(.cap):not(.lock) .bx-led.a { animation-duration: 2.8s !important }
  .bx.on[data-led="intense"] .bx-ks:not(.cap):not(.lock) .bx-led.a { animation-duration: 2s !important }
}

/* ---- survol : la tuile s'éclaire, la LED passe en fixe, la prise brille ---- */
.bx.on a.bx-p { transition: background-color .2s }
.bx.on a.bx-p:hover, .bx.on a.bx-p:focus-visible {
  background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--k) 16%, transparent), transparent 70%);
}
.bx.on a.bx-p:hover .bx-led.a, .bx.on a.bx-p:focus-visible .bx-led.a { animation: none !important; opacity: 1; box-shadow: 0 0 10px #4ADE80, 0 0 3px #4ADE80 }
.bx.on a.bx-p:hover .bx-ks:not(.cap):not(.lock), .bx.on a.bx-p:focus-visible .bx-ks:not(.cap):not(.lock) {
  box-shadow: inset 0 2px 0 #000, 0 0 0 2px var(--k), 0 0 16px color-mix(in srgb, var(--k) 60%, transparent);
}
.bx.on a.bx-p:hover .bx-lcd, .bx.on a.bx-p:focus-visible .bx-lcd { box-shadow: inset 0 0 0 2px var(--k), 0 0 14px color-mix(in srgb, var(--k) 40%, transparent) }
.bx.on a.bx-p:hover .bx-ds, .bx.on a.bx-p:focus-visible .bx-ds { color: #FFFFFF }

/* ---- bandeau d'état : LED de statut global ---- */
.bx-gled { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: #4ADE80; box-shadow: 0 0 9px #4ADE80, 0 0 2px #4ADE80 }
.bx.on[data-led="normale"] .bx-gled, .bx.on[data-led="intense"] .bx-gled { animation: bxp-orange 2.2s steps(1) infinite }
.bx.on[data-led="intense"] .bx-gled { animation-duration: 1.4s }
.bx.off .bx-gled { background: #F87171; box-shadow: 0 0 9px #F87171, 0 0 2px #F87171; animation: bxp-orange 1.2s steps(1) infinite }
.bx-host .bx-bientot { color: #FBBF24 }

@media (max-width: 980px) { .bx.js-plus .bx-bd > .bx-p::after { display: none } }


/* =====================  v103  ===================== */
.bx.js-plus { position: relative }
.bx.on a.bx-p, .bx.on span.bx-p { isolation: isolate }

/* ---- cadre coloré choisi pour un port ---- */
.bx-p[data-cad] { outline: 1px solid color-mix(in srgb, var(--k) 60%, transparent); outline-offset: 7px; border-radius: 3px }
.bx-p[data-cad] .bx-lab { color: var(--k); border-bottom-color: color-mix(in srgb, var(--k) 70%, #3E4E62) }

/* ---- pastille « Nouveau » / « Mis à jour » ---- */
.bx-nw { position: absolute; z-index: 5; top: -9px; right: 2px; padding: 2px 9px; border-radius: 99px; background: #FBBF24; color: #1C1300; font: 700 11px/1.5 'Inter', sans-serif; letter-spacing: .02em; box-shadow: 0 0 0 2px #1E2833, 0 0 12px rgba(251,191,36,.7); pointer-events: none; animation: bxp-nw 1.8s ease-in-out infinite }
.bx-nw.maj { background: #22D3EE; box-shadow: 0 0 0 2px #1E2833, 0 0 12px rgba(34,211,238,.7) }
@keyframes bxp-nw { 0%,100% { transform: scale(1) } 50% { transform: scale(1.1) } }
.bx.on[data-led="aucune"] .bx-nw { animation: none }

/* ---- la carte survolée se détache : relief, cadre lumineux, trame qui défile, coins de visée ---- */
.bx.on:not([data-sel="aucun"]) a.bx-p { transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .25s, filter .25s }
.bx.on:not([data-sel="aucun"]) a.bx-p::before {
  content: ""; position: absolute; z-index: -1; inset: -11px -9px -10px; border-radius: 6px; pointer-events: none; opacity: 0; transition: opacity .25s;
  background:
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--k) 30%, transparent) 50%, transparent) 0 -60% / 100% 45% no-repeat,
    linear-gradient(color-mix(in srgb, var(--k) 20%, transparent) 1px, transparent 1px) 0 0 / 14px 14px repeat,
    linear-gradient(90deg, color-mix(in srgb, var(--k) 20%, transparent) 1px, transparent 1px) 0 0 / 14px 14px repeat,
    linear-gradient(160deg, color-mix(in srgb, var(--k) 24%, #0B1726), #09131F 72%) 0 0 / auto no-repeat;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--k) 85%, transparent), 0 18px 34px -10px rgba(0,0,0,.8), 0 0 32px -4px color-mix(in srgb, var(--k) 50%, transparent);
}
.bx.on:not([data-sel="aucun"]) a.bx-p:hover, .bx.on:not([data-sel="aucun"]) a.bx-p:focus-visible { transform: translateY(-6px) scale(1.035); z-index: 4 }
.bx.on:not([data-sel="aucun"]) a.bx-p:hover::before, .bx.on:not([data-sel="aucun"]) a.bx-p:focus-visible::before { opacity: 1 }
.bx.on[data-sel="trame"] a.bx-p:hover::before, .bx.on[data-sel="trame"] a.bx-p:focus-visible::before { animation: bxp-trame 5s linear infinite }
.bx.on[data-sel="sobre"] a.bx-p::before { background: linear-gradient(160deg, color-mix(in srgb, var(--k) 18%, #0B1726), #09131F 72%) }
@keyframes bxp-trame { from { background-position: 0 -60%, 0 0, 0 0, 0 0 } to { background-position: 0 170%, 14px 14px, 14px 14px, 0 0 } }
/* coins de visée (remplace le petit trait de séparation sur la carte survolée) */
.bx.js-plus.on:not([data-sel="aucun"]) .bx-bd > a.bx-p:hover::after, .bx.js-plus.on:not([data-sel="aucun"]) .bx-bd > a.bx-p.bx-r1:hover::after {
  display: block; content: ""; inset: -11px -9px -10px; left: -9px; top: -11px; bottom: -10px; width: auto; border-radius: 6px; z-index: 6; pointer-events: none;
  background:
    linear-gradient(var(--k), var(--k)) 0 0 / 12px 2px, linear-gradient(var(--k), var(--k)) 0 0 / 2px 12px,
    linear-gradient(var(--k), var(--k)) 100% 0 / 12px 2px, linear-gradient(var(--k), var(--k)) 100% 0 / 2px 12px,
    linear-gradient(var(--k), var(--k)) 0 100% / 12px 2px, linear-gradient(var(--k), var(--k)) 0 100% / 2px 12px,
    linear-gradient(var(--k), var(--k)) 100% 100% / 12px 2px, linear-gradient(var(--k), var(--k)) 100% 100% / 2px 12px;
  background-repeat: no-repeat;
}
/* les autres tuiles du rack s'effacent un peu */
.bx.on:not([data-sel="aucun"]) .bx-bd:has(> a.bx-p:hover) > .bx-p:not(:hover) { opacity: .5; filter: saturate(.55) brightness(.88) }
.bx.on:not([data-sel="aucun"]) .bx-bd:has(> a.bx-p:hover) > .bx-p:not(:hover)::after { opacity: 0 }
.bx.on:not([data-sel="aucun"]) a.bx-p:hover .bx-lab, .bx.on:not([data-sel="aucun"]) a.bx-p:focus-visible .bx-lab { text-shadow: 0 0 12px color-mix(in srgb, var(--k) 70%, transparent) }
.bx.on:not([data-sel="aucun"]) a.bx-p:hover .bx-nw { transform: scale(1.05); animation: none }
.bx.on[data-sel="trame"] a.bx-p[data-cad]:hover { outline-color: transparent }

/* ---- câbles de brassage entre les racks (dessinés par baie-plus.js) ---- */
.bx-cab { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible }
.bx-cab .cj { fill: none; stroke: #0A0F15; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round }
.bx-cab .cc { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: .8; transition: opacity .2s, stroke-width .2s }
.bx-cab .pk { opacity: .95 }
.bx-cab .pl { fill: #D8E3EF; stroke: #0A0F15; stroke-width: 1.5 }
.bx-cab .gr rect { fill: #0E141B; stroke: #3A4A5E; stroke-width: 1 }
.bx-cab .gr path { stroke: #5B6B80; stroke-width: 1.3; fill: none }
.bx-cab g.on .cc { opacity: 1; stroke-width: 3.6; filter: drop-shadow(0 0 5px currentColor) }
.bx-cab g.on .pk { r: 3.6 }
.bx.off .bx-cab { opacity: .22 }
.bx.off .bx-cab .pk { display: none }
.bx[data-cab="off"] .bx-cab, .bx[data-led="aucune"] .bx-cab .pk { display: none }
.bx[data-cab="off"] .bx-cab { display: none }
@media (max-width: 980px), (prefers-reduced-motion: reduce) { .bx-cab .pk { display: none } }
@media (max-width: 980px) { .bx-cab { display: none } }


/* =====================  v105  ===================== */
/* ---- plaque du switch : modèle, numéro de série, ventilateur ---- */
.bx-fam { align-items: center }
.bx-sw { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; border-radius: 3px; background: linear-gradient(180deg, #1E2833, #141C26); border: 1px solid #3A4A5E; box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 0 rgba(0,0,0,.25); font-family: 'Share Tech Mono', ui-monospace, monospace; color: #C5D3E3; line-height: 1.25 }
.bx-sw b { display: block; font-weight: 400; font-size: 13px; letter-spacing: .08em; color: #E6EDF5 }
.bx-sw small { display: block; font-size: 11px; letter-spacing: .06em; color: #7F93AB }
.bx-sw .pw { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 8px #4ADE80; margin-left: 4px }
.bx.off .bx-sw .pw { background: #1F2A36; box-shadow: none }
.bx-fan { width: 30px; height: 30px; flex: none }
.bx-fan .bl { transform-origin: 16px 16px; animation: bxp-fan 1.3s linear infinite }
.bx-fan .bl path { fill: #6F8299 }
.bx-fan .ring { fill: #0B1017; stroke: #4A5A6E; stroke-width: 1.5 }
.bx-fan .hub { fill: #2A3542; stroke: #4A5A6E; stroke-width: 1 }
.bx.off .bx-fan .bl { animation: none }
.bx.bx-boot .bx-fan .bl { animation-duration: .32s }
@keyframes bxp-fan { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { .bx-fan .bl { animation-duration: 6s } }
@media (max-width: 760px) { .bx-sw { display: none } }
.bx[data-plq="off"] .bx-sw { display: none }

/* ---- séquence de démarrage : les LED s'allument une à une, journal de boot dans le bandeau ---- */
@keyframes bxp-boot { 0% { opacity: 0; box-shadow: none } 100% { opacity: 1 } }
.bx.on.bx-boot[data-led] .bx-ks:not(.cap):not(.lock) .bx-led:not(.zz):not(.zy) { animation: bxp-boot .4s steps(1) both !important; animation-delay: calc(var(--i, 0) * .26s + .35s) !important; opacity: 0 }
.bx.bx-boot .bx-lcd > * { animation: bxp-boot .3s steps(1) both; animation-delay: calc(var(--i, 0) * .26s + .6s) }
.bx-host .bx-bootlog { display: none; color: #FBBF24; white-space: nowrap }
.bx.bx-boot .bx-host .up, .bx.bx-boot .bx-host .dn { display: none !important }
.bx.bx-boot .bx-host .bx-bootlog { display: inline }
.bx-bootlog::after { content: "\2588"; margin-left: 3px; animation: bxp-orange 0.7s steps(1) infinite }
.bx.bx-boot .bx-gled { background: #FBBF24; box-shadow: 0 0 9px #FBBF24; animation: bxp-orange .5s steps(1) infinite }

/* ---- bouton son ---- */
.bx-snd { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: 10px; border-radius: 50%; background: #0F1722; border: 1px solid #3A4A5E; color: #9FB3C8; cursor: pointer; vertical-align: middle; padding: 0 }
.bx-snd:hover, .bx-snd:focus-visible { color: #fff; border-color: #22D3EE; outline: none }
.bx-snd svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.bx-snd .m { display: none }
.bx-snd[aria-pressed="false"] .m { display: inline }
.bx-snd[aria-pressed="false"] .o { display: none }
.bx-snd[aria-pressed="false"] { color: #6F8299 }
.bx[data-son="off"] .bx-snd { display: none }


/* =====================  v106 : console « show ip interface brief »  ===================== */
.bx-con { margin: 0 0 22px; border-radius: 6px; background: #04121F; border: 1px solid #12324F; box-shadow: inset 0 0 0 2px #0B2238, 0 16px 30px -18px rgba(34,211,238,.45); color: #BFEFFF; font: 14px/1.55 'Share Tech Mono', ui-monospace, monospace; overflow: hidden }
.bx-con-h { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: #0B1D30; border-bottom: 1px solid #12324F; color: #8FDDEE; font-size: 12.5px; letter-spacing: .04em }
.bx-con-h .d { width: 10px; height: 10px; border-radius: 50%; background: #2A3C52 }
.bx-con-h .d:nth-child(1) { background: #F87171 } .bx-con-h .d:nth-child(2) { background: #FBBF24 } .bx-con-h .d:nth-child(3) { background: #4ADE80 }
.bx-con-h b { font-weight: 400; margin-left: 6px }
.bx-con-x { margin-left: auto; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid #1E3A56; border-radius: 4px; color: #8FDDEE; cursor: pointer; padding: 0 }
.bx-con-x:hover, .bx-con-x:focus-visible { color: #fff; border-color: #22D3EE; outline: none }
.bx-con-x svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s }
.bx-con.reduit .bx-con-x svg { transform: rotate(180deg) }
.bx-con.reduit .bx-con-b { display: none }
.bx-con-b { padding: 10px 14px 12px; max-height: 360px; overflow: auto; cursor: text }
.bx-co { white-space: pre-wrap; color: #BFEFFF }
.bx-co.cm { color: #FFFFFF }
.bx-co.er { color: #FCA5A5 }
.bx-tab { overflow-x: auto; margin: 2px 0 6px }
.bx-cr { display: grid; grid-template-columns: 11ch minmax(18ch, 24ch) 23ch 10ch minmax(20ch, 1fr); gap: 0 12px; padding: 1px 6px; margin: 0 -6px; color: #BFEFFF; text-decoration: none; white-space: nowrap; border-radius: 2px; min-width: 88ch }
.bx-cr.hd { color: #8FDDEE; border-bottom: 1px dashed #1E3A56; margin-bottom: 3px }
.bx-cr .s.up, .bx-cr .p.up { color: #4ADE80 }
.bx-cr .s.dn, .bx-cr .p.dn { color: #94A3B8 }
.bx-cr .s.ad { color: #F87171 }
.bx-cr .n { color: #7FD6EA } .bx-cr .n.act { color: #FBBF24 }
.bx-cr.lk { cursor: pointer }
.bx-cr.lk:hover, .bx-cr.lk:focus-visible { background: rgba(34,211,238,.14); box-shadow: inset 2px 0 0 #22D3EE; outline: none; color: #fff }
.bx-cin { display: flex; align-items: center; gap: 4px; margin-top: 2px }
.bx-cin .pr { color: #22D3EE; white-space: nowrap }
.bx-cin input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font: inherit; caret-color: #22D3EE; padding: 0 }
.bx.off .bx-con { opacity: .7 }
.bx[data-con="off"] .bx-con { display: none }
/* tuile repérée depuis la console : mêmes effets qu'au survol */
.bx.on:not([data-sel="aucun"]) a.bx-p.bx-ref { transform: translateY(-6px) scale(1.035); z-index: 4 }
.bx.on:not([data-sel="aucun"]) a.bx-p.bx-ref::before { opacity: 1 }
.bx.on[data-sel="trame"] a.bx-p.bx-ref::before { animation: bxp-trame 5s linear infinite }
.bx.on a.bx-p.bx-ref .bx-led.a { animation: none !important; opacity: 1 }
@media (max-width: 760px) { .bx-con { font-size: 12.5px } }


/* =====================  v107  ===================== */
/* ---- anneau de progression autour d'une prise ---- */
.bx-rg { position: absolute; left: -5px; top: -5px; pointer-events: none; overflow: visible; z-index: 3 }
.bx-rg path { fill: none; stroke-linecap: round; stroke-width: 2.4 }
.bx-rg .tr { stroke: rgba(148, 163, 184, .38); stroke-width: 1.6 }
.bx-rg .p2 { stroke: color-mix(in srgb, var(--k, #22D3EE) 38%, transparent); transition: stroke-dasharray 1.3s cubic-bezier(.2, .7, .2, 1) }
.bx-rg .p1 { stroke: #4ADE80; filter: drop-shadow(0 0 3px rgba(74, 222, 128, .75)); transition: stroke-dasharray 1.6s cubic-bezier(.2, .7, .2, 1) .15s }
.bx-rg.full .p1 { stroke: #FBBF24; filter: drop-shadow(0 0 4px rgba(251, 191, 36, .85)) }
.bx.off .bx-rg { opacity: .25; filter: grayscale(1) }
.bx.bx-boot .bx-rg { opacity: 0 }
.bx .bx-rg { transition: opacity .4s }
@media (prefers-reduced-motion: reduce) { .bx-rg path { transition: none !important } }

/* ---- série de jours dans le bandeau d'état ---- */
.bx-ser { display: inline-flex; align-items: center; gap: 6px }
.bx-ser .ls { display: inline-flex; gap: 3px }
.bx-ser .l { width: 7px; height: 11px; border-radius: 1.5px; background: #1B2A3A; box-shadow: inset 0 0 0 1px #2A3F55 }
.bx-ser .l.on { background: #4ADE80; box-shadow: 0 0 6px #4ADE80, 0 0 1px #4ADE80 }
.bx-ser.hot .l.on { background: #FBBF24; box-shadow: 0 0 7px #FBBF24, 0 0 1px #FBBF24 }
.bx-ser .l.nx { background: #FBBF24; box-shadow: 0 0 6px #FBBF24; animation: bxp-orange 1.1s steps(1) infinite }
.bx-ser em { font-style: normal; color: #8FDDEE; min-width: 2.6em }
.bx.off .bx-ser .l.on, .bx.off .bx-ser .l.nx { background: #2A3A4C; box-shadow: none; animation: none }
.bx.bx-boot .bx-ser { display: none }
@media (prefers-reduced-motion: reduce) { .bx-ser .l.nx { animation: none } }
