#o2s-startup {
    position: fixed;
    inset: 0;
    background: #f8faff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: opacity 0.35s ease;
    /* --env-color est injecté par startup-loader.js selon VITE_ENVNAME (badge uniquement) */
    --env-color: #3351a6;
}

#o2s-startup.o2s-fade-out {
    opacity: 0;
    pointer-events: none;
}

.o2s-startup__content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 300px;
}

.o2s-startup__logo {
    width: 220px;
    margin-bottom: 2rem;
}

.o2s-startup__center-icon {
    height: 32px;
    width: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.o2s-startup__center-icon.visible {
    opacity: 1;
}

/* Coin bas-gauche de la page */
.o2s-footer {
    position: absolute;
    bottom: 1.25rem;
    left: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.o2s-env-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.8rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    /* couleur, fond et bordure injectés par JS selon l'environnement */
}

.o2s-env-sep {
    margin: 0 0.4rem;
    opacity: 0.5;
}

/* Version et date de déploiement */
.o2s-version {
    font-size: 0.82rem;
    color: #3351a6;
    min-height: 1.1rem;
}

/* Section progression — masquée par défaut, révélée via __o2sShowProgress() uniquement si authentifié */
#o2s-progress-section {
    display: none;
    width: 100%;
}

#o2s-progress-section.visible {
    display: block;
}

/* Barre de progression + pourcentage sur la même ligne */
.o2s-progress-bar-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    margin-bottom: 1.25rem;
}

.o2s-progress-track {
    flex: 1;
    height: 6px;
    background: #dde6f8;
    border-radius: 3px;
    overflow: hidden;
}

.o2s-progress-fill {
    height: 100%;
    width: 0%;
    background: #3351a6;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.o2s-progress-pct {
    font-size: 1rem;
    color: #3351a6;
    font-weight: 700;
    min-width: 2.8rem;
    text-align: right;
    flex-shrink: 0;
}

/* Liste des étapes */
.o2s-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: left;
}

.o2s-steps li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0;
    font-size: 0.92rem;
    color: #bbb;
    transition: color 0.3s ease;
}

.o2s-steps li .o2s-step-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Étape active */
.o2s-steps li.active {
    color: var(--env-color);
    font-weight: 600;
}

.o2s-steps li.active .o2s-step-icon {
    border-color: #3351a6;
    animation: o2s-pulse-icon 1.2s ease-in-out infinite;
}

@keyframes o2s-pulse-icon {
    0%, 100% { background-color: transparent; }
    50%       { background-color: rgba(51, 81, 166, 0.35); }
}

/* Étape terminée */
.o2s-steps li.done {
    color: #4CAF50;
}

.o2s-steps li.done .o2s-step-icon {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

/* Étape en erreur */
.o2s-steps li.error {
    color: #e53935;
}

.o2s-steps li.error .o2s-step-icon {
    background: #e53935;
    border-color: #e53935;
    color: #fff;
}
