/* ===== Divioseo Paliers - Barre de progression panier ===== */

.divioseo-paliers-container .container{
    padding: 12px 30px 12px 12px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, oklch(.98 .016 73.684) 0%, oklch(.954 .038 75.164) 100%);
    border-bottom: 1px solid oklch(.901 .076 70.697);
}

.divioseo-paliers-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Message a gauche */
.divioseo-paliers-message {
    white-space: nowrap;
    font-size: 0.85rem;
    color: #495057;
    min-width: 0;
    flex-shrink: 0;
}

.divioseo-paliers-congrats {
    color: oklch(.627 .194 149.214);
    font-weight: 700;
}

.divioseo-paliers-unlocked {
    color: oklch(.627 .194 149.214);
    font-weight: 700;
}

.divioseo-paliers-unlocked svg {
    vertical-align: -2px;
    margin-right: 2px;
}

.divioseo-paliers-sep {
    color: #999;
    margin: 0 2px;
}

.divioseo-paliers-remaining strong {
    color: #d9534f;
    font-weight: 700;
}

/* Barre de progression */
.divioseo-paliers-track {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    flex: 1;
    margin: 0;
    margin-bottom: 20px;
}

.divioseo-paliers-fill {
    height: 100%;
    background: #28a745;
    border-radius: 2px;
    transition: width 0.6s ease;
    max-width: 100%;
}

/* Marqueurs */
.divioseo-paliers-marker {
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    z-index: 2;
}

.divioseo-paliers-marker-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: border-color 0.4s ease, background-color 0.4s ease;
    font-size: 0;
}

.divioseo-paliers-marker.reached .divioseo-paliers-marker-dot {
    background: #28a745;
    border-color: #28a745;
}

.divioseo-paliers-marker.reached .divioseo-paliers-marker-dot::after {
    content: "\2713";
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.divioseo-paliers-marker-label {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #666;
    line-height: 1.3;
}

.divioseo-paliers-marker.reached .divioseo-paliers-marker-label {
    color: #28a745;
}

.divioseo-paliers-marker-label small {
    font-weight: 400;
    font-size: 0.68rem;
    color: #000;
    border-radius: 3.40282e38px;
    padding: calc(0.25rem * .5) calc(0.25rem * 2);
    background-color: #FFFFFF
}

.divioseo-paliers-marker.reached .divioseo-paliers-marker-label small {
    color: #ffffff;
    font-size: 10px;
    border-radius: 3.40282e38px;
    padding: calc(0.25rem * .5) calc(0.25rem * 2);
    background-color: oklch(.627 .194 149.214);
}

/* Responsive */
@media (max-width: 768px) {
    .divioseo-paliers-inner {
        flex-direction: column;
        gap: 8px;
    }

    .divioseo-paliers-container .container{
        padding: 12px 30px 12px !important;
    }

    .divioseo-paliers-message {
        text-align: center;
        white-space: normal;
    }

    .divioseo-paliers-track {
        width: 100%;
        flex: none;
        height: 4px;
        margin-bottom: 28px;
    }

    /* Mobile : masquer les paliers au-delà du labellisé + les paliers sans label */
    .divioseo-paliers-mobile-hidden,
    .divioseo-paliers-mobile-nolabel {
        display: none !important;
    }

    /* Mobile : rescaler la barre et les marqueurs */
    .divioseo-paliers-fill {
        width: var(--mobile-width) !important;
    }

    .divioseo-paliers-marker:not(.divioseo-paliers-mobile-hidden):not(.divioseo-paliers-mobile-nolabel) {
        left: var(--mobile-left) !important;
    }

    /* Marqueur en bout de barre : aligner le label à droite pour éviter le débordement */
    .divioseo-paliers-marker[style*="--mobile-left: 100"] {
        transform: translateX(-50%) translateY(-50%);
    }

    .divioseo-paliers-marker[style*="--mobile-left: 100"] .divioseo-paliers-marker-label {
        transform: translateX(-80%);
    }
}

@media (max-width: 576px) {
    .divioseo-paliers-marker-label {
        font-size: 0.62rem;
    }

    .divioseo-paliers-marker-label small {
        font-size: 0.58rem;
    }

    .divioseo-paliers-marker-dot {
        width: 18px;
        height: 18px;
    }

    .divioseo-paliers-marker.reached .divioseo-paliers-marker-dot::after {
        font-size: 10px;
    }
}
