/* =============================================================
   Elementor Audio Button — Styles frontend
   ============================================================= */

/* Wrapper global */
.eab-audio-wrapper {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    max-width: 100%;
}

/* ─── Bouton Principal ──────────────────────────────────────── */
.eab-play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
    /* Valeurs par défaut (remplacées par les sélecteurs Elementor) */
    background-color: #6E42CA;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
}

.eab-play-button:hover {
    background-color: #5533aa;
    transform: translateY( -1px );
}

.eab-play-button:active {
    transform: translateY( 0 );
}

.eab-play-button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

/* États joueur */
.eab-play-button .eab-state-play,
.eab-play-button .eab-state-pause {
    display: inline-flex;
    align-items: center;
}

/* Icônes */
.eab-play-button .eab-icon {
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
    flex-shrink: 0;
}

.eab-play-button.icon-before .eab-icon { margin-right: 8px; }
.eab-play-button.icon-after  .eab-icon { margin-left:  8px; }

/* Pulsation quand en lecture */
@keyframes eab-pulse {
    0%   { box-shadow: 0 0 0 0 rgba( 110, 66, 202, 0.4 ); }
    70%  { box-shadow: 0 0 0 8px rgba( 110, 66, 202, 0 );   }
    100% { box-shadow: 0 0 0 0 rgba( 110, 66, 202, 0 );   }
}

.eab-play-button.is-playing {
    animation: eab-pulse 2s infinite;
}

/* ─── Barre de Progression ──────────────────────────────────── */
.eab-progress-wrapper {
    margin-top: 10px;
    width: 100%;
    min-width: 120px;
}

.eab-progress-bar-track {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.eab-progress-bar-fill {
    height: 100%;
    background-color: #6E42CA;
    border-radius: 3px;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ─── Affichage du temps ────────────────────────────────────── */
.eab-time-wrapper {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.eab-time {
    font-size: 0.75rem;
    color: #666666;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.eab-time-separator {
    margin: 0 2px;
}

/* ─── Contrôle du Volume ────────────────────────────────────── */
.eab-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    max-width: 200px;
}

.eab-volume-icon {
    font-size: 18px;
    color: #666666;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.eab-volume-icon:hover {
    color: #333333;
}

.eab-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #e0e0e0;
    outline: none;
    cursor: pointer;
    accent-color: #6E42CA;
}

.eab-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6E42CA;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.eab-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6E42CA;
    border: none;
    cursor: pointer;
}

.eab-volume-slider:hover::-webkit-slider-thumb {
    transform: scale( 1.2 );
}

/* ─── Message si pas d'audio ────────────────────────────────── */
.eab-no-audio {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media ( max-width: 480px ) {
    .eab-volume-wrapper {
        max-width: 100%;
    }
}
