/* Slice 309 — barre globale phase (réutilise tokens / mécanique wall-timer-bar.css) */

.wall-phase-progress {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--wall-timer-bar-stack-gap, 0.32rem);
}

.wall-phase-progress[hidden] {
    display: none !important;
}

.wall-phase-progress .wall-phase-progress-caption {
    margin: 0;
    padding: 0 0.25rem;
    text-align: center;
    align-self: center;
    max-width: 100%;
    box-sizing: border-box;
    font-size: var(--wall-timer-bar-caption-fs, clamp(0.7rem, 1.02vw, 0.96rem));
    letter-spacing: var(--wall-timer-bar-caption-ls, 0.18em);
    font-weight: 700;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
    line-height: 1.15;
    -webkit-font-smoothing: antialiased;
    text-wrap: balance;
    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.28),
        0 0 14px rgba(160, 220, 255, 0.22),
        0 1px 3px rgba(0, 0, 0, 0.85);
}

.wall-phase-progress .wall-phase-progress-track {
    position: relative;
    height: 33px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: visible;
    container-type: inline-size;
}

.wall-phase-progress .wall-phase-progress-fill {
    --timer-bar-fill-gradient: linear-gradient(
        90deg,
        #ff1a1a 0%,
        #ff9100 25%,
        #1e6bff 50%,
        #00d9ff 75%,
        #00d957 100%
    );
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: transparent;
    background-image: var(--timer-bar-fill-gradient);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: 0 50%;
    box-shadow:
        0 0 16px rgba(255, 255, 255, 0.12),
        inset 0 2px 8px rgba(255, 255, 255, 0.18);
    transition: width 1s linear;
    animation: shimmer 2s ease-in-out infinite alternate;
    border-radius: 8px;
}

@supports (width: 1cqw) {
    .wall-phase-progress .wall-phase-progress-fill {
        background-size: 100cqw 100%;
    }
}

@supports (color: oklch(0.7 0.15 30)) {
    .wall-phase-progress .wall-phase-progress-fill {
        --timer-bar-fill-gradient: linear-gradient(
            90deg in oklch,
            red,
            orange,
            blue,
            cyan,
            green
        );
    }
}

.wall-phase-progress-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.15rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    color: #ffffff;
    text-shadow:
        0 0 10px rgba(0, 0, 0, 0.8),
        1px 1px 4px rgba(241, 78, 69, 0.3);
    z-index: 10;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}

@media (max-width: 768px) {
    .wall-phase-progress .wall-phase-progress-track {
        height: 27px;
    }
    .wall-phase-progress-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .wall-phase-progress .wall-phase-progress-track {
        height: 22px;
    }
    .wall-phase-progress-label {
        font-size: 0.7rem;
    }
}

/* Slice 309b — barre étape : slide vertical (hôte dans .timer-bar-container) */

.timer-bar-container .wall-step-bar-host {
    --wall-step-bar-expanded-max: 12rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--wall-timer-bar-stack-gap, 0.32rem);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
}

.timer-bar-container .wall-step-bar-host.wall-step-bar-visible {
    max-height: var(--wall-step-bar-expanded-max);
}

@media (prefers-reduced-motion: reduce) {
    .timer-bar-container .wall-step-bar-host {
        transition: max-height 0.01ms linear;
    }
}
