/* ========== MONO — Composants réutilisables (M1→M6) ========== */
/* (Channel colors/backgrounds → badges.css single source) */

/* ---- Modale Set de filtres (M1) ---- */
/* align-items: center non défini par .gear-form .form-row — pas de conflit de spécificité */
/* flex-direction row et gap var(--space-2) : valeurs identiques à .gear-form .form-row, inoffensives */
.gear-form .filterset-slot {
    align-items: center;
    flex-direction: row;
    gap: var(--space-2);
}
.filterset-slot .filterset-channel-label {
    font-weight: 700;
    text-align: center;
    font-size: 0.95rem;
}

/* ---- Cards canaux (M3 : fiche détail multi-canal) ---- */
/* À réutiliser pour les blocs "pose par canal" sur la page Cibles et la fiche */
.channel-name {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.channel-detail {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 2px;
}
/* FWHM dual-band OSC : affiché sous le label Ha+OIII / SII+OIII */
.osc-bandwidth {
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    margin-top: -2px;
    margin-bottom: 2px;
}

/* Warning lune excessive OSC SHO */
.osc-moon-warn {
    font-size: 0.72rem;
    color: var(--warning);
}

/* Slider OSC SHO dual-band V2 — barre split custom (accueil, sous les blocs poses) */
.osc-ratio-slider {
    margin-top: 10px;
    padding: 0 2px;
}

/* Barre custom (remplace input[type=range]) : 2 zones colorees + poignee draggable */
.osc-bar {
    position: relative;
    height: 6px;
    border-radius: 3px;
    overflow: visible;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    touch-action: none;
    user-select: none;
    margin-top: 2px;
}
.osc-zone-ha {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(224, 80, 80, 0.35),
        rgba(80, 176, 224, 0.25)
    );
    border-radius: 3px 0 0 3px;
    pointer-events: none;
}
.osc-zone-sii {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        rgba(230, 147, 44, 0.3),
        rgba(80, 176, 224, 0.25)
    );
    border-radius: 0 3px 3px 0;
    pointer-events: none;
}
/* Poignee : petit cercle + glow (V-H) */
.osc-handle {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px var(--handle-glow, rgba(255, 220, 100, 0.8)), 0 0 2px var(--handle-glow-strong, rgba(255, 220, 100, 1));
    cursor: grab;
    background: var(--handle-color, #ffdc64);
}
.osc-handle.dragging {
    cursor: grabbing;
}
.osc-handle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
@media (min-width: 768px) {
    .osc-bar {
        height: 8px;
        border-radius: 3px;
    }
    .osc-zone-ha {
        border-radius: 4px 0 0 4px;
    }
    .osc-zone-sii {
        border-radius: 0 4px 4px 0;
    }
    .osc-handle {
        width: 12px;
        height: 12px;
    }
}

/* Ligne labels sous la barre : [Ha+OIII X%] [Recommande/reset/info] [X% SII+OIII] */
.osc-slider-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.66rem;
    color: var(--text-muted);
    line-height: 1.2rem;
    flex-wrap: nowrap;
}
.osc-slider-row .osc-label-left,
.osc-slider-row .osc-label-right {
    flex: 0 0 auto;
    white-space: nowrap;
}
.osc-pct-label {
    font-weight: 600;
}
/* Warning lune au-dessus du slider (mobile) */
.osc-moon-warn-above {
    text-align: center;
    margin-bottom: 6px;
}
@media (min-width: 768px) {
    .osc-slider-row {
        font-size: 0.7rem;
        gap: 10px;
        margin-top: 5px;
        line-height: 1.25rem;
    }
}

/* Slot central : Suggestion, warning lune, ou reset ♻ */
.osc-suggest-line {
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
    min-width: 60px;
}
.osc-suggest-note {
    color: #ffdc64;
    font-weight: 600;
}
.osc-moon-warn-inline {
    color: var(--warning);
    font-weight: 600;
    font-size: 0.72rem;
}
/* Harmonise la taille des infobulles OSC (slider + badge session) : plus petites que .info-toggle par defaut */
.osc-suggest-line .info-toggle,
.osc-session-info-btn {
    width: 14px;
    height: 14px;
    font-size: 0.68rem;
    line-height: 1;
    margin-left: 2px;
    vertical-align: middle;
}
.osc-reset-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 4px;
    font-size: 0.7rem;
    line-height: 1;
    color: #ffdc64;
    vertical-align: middle;
    filter: grayscale(1) brightness(0.7) sepia(1) hue-rotate(10deg) saturate(4) brightness(1.3);
}
.osc-reset-btn:hover {
    opacity: 0.8;
}
.osc-reset-btn:focus-visible {
    outline: 2px solid #ffdc64;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Panneau info session OSC (explication schedule lune) */
.osc-session-info-panel {
    margin: 6px 0;
    padding: 8px 10px;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--text-secondary);
    background: rgba(255, 220, 100, 0.06);
    border-radius: var(--radius-sm);
    text-align: center;
    font-style: normal;
}
.osc-session-info-panel p {
    margin: 0;
}

.osc-hint-second-night {
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
}

/* ---- Blocs de poses mono sur l'accueil (M3) ---- */
/* Structure équivalente à .night-summary-pose existant, mais dédiée au mono */
.mono-pose-block {
    flex: 1 1 0;
    text-align: center;
    background: var(--bg-primary);
    border-radius: 3px;
    padding: 8px 4px;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.mono-pose-block .pose-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.mono-pose-block .pose-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
}
/* Flex uniforme : chaque bloc (canaux + total) prend la même largeur et remplit le conteneur */
.mono-poses-2 .mono-pose-block,
.mono-poses-3 .mono-pose-block,
.mono-poses-4 .mono-pose-block,
.mono-poses-5 .mono-pose-block {
    flex: 1 1 0;
    min-width: 0;
}

/* Total (M3) : bloc en pointillés, accent — même largeur que les canaux */
.mono-pose-block.mono-pose-total {
    background: var(--bg-primary);
    border: 1px dashed rgba(255, 255, 255, 0.08);
}
.mono-pose-block.mono-pose-total .pose-count,
.mono-pose-block.mono-pose-total .channel-detail {
    color: var(--accent);
}

/* Dégradé (M4 : canal sous Lune forte) — warning dans la couleur du canal */
.mono-degraded-hint {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--warning);
    text-align: center;
    margin-top: 8px;
}

/* ---- Tableau multi-canal fiche détail (M3) ---- */
.mono-channel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin: 8px 0;
}
.mono-channel-table th,
.mono-channel-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
}
.mono-channel-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mono-channel-table td.channel-cell {
    font-weight: 700;
    width: 60px;
}
.mono-channel-table td.status-cell {
    text-align: center;
}
.mono-channel-table .status-ok {
    color: var(--success);
}
.mono-channel-table .status-warn {
    color: #e09050;
}
.mono-channel-table .status-danger {
    color: var(--danger);
}

/* ---- Badge type de set (SHO/LRGB/HOO/RGB/LRGBHa) ---- */
.set-type-badge {
    display: inline-flex;
    align-items: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    font-style: normal;
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid rgba(160, 160, 160, 0.4);
    background: transparent;
    color: var(--accent);
    letter-spacing: 0.8px;
    vertical-align: middle;
    line-height: 1;
    white-space: nowrap;
}
