.polly-player {
    margin: 1em 0;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 8px;
    position: relative;
}

h3.polly-player-title {
    text-align: center;
    font-size: 1em !important;
    margin: 0;
    color: #333;
    font-weight: 500;
    position: absolute;
    z-index: 999;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
  }

.polly-player audio {
    width: 100%;
}

/* Styles pour positionner le contrôle de vitesse dans la barre de contrôles audio */
.polly-player audio::-webkit-media-controls-panel {
    position: relative;
    display: flex;
    align-items: center;
}
.polly-player .mejs-controls {
    padding: 15px 25px 15px 5px;
  }

.polly-speed-control {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99;
    display: flex;
    align-items: center;
}

.polly-speed-button {
    background-color:#fff;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #242424;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    position: relative;
}

.polly-speed-button svg {
    width: 24px;
    height: 24px;
}

.polly-speed-button:hover {
    color: #E14B31;
    background-color: rgba(0, 0, 0, 0.05);
}

.polly-speed-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-width: 80px;
    z-index: 10000;
    transform: translateY(-50%);
}

/* Ajustement pour la barre de contrôle audio native */
.polly-player audio::-webkit-media-controls-panel {
    padding-right: 35px !important;
}

.polly-speed-menu[hidden] {
    display: none;
}

.polly-speed-item {
    display: block;
    width: 100%;
    padding: 6px 12px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: #333;
    font-size: 12px;
    line-height: 25px;
}

.polly-speed-item:hover {
    background: #f0f0f0;
    color: #E14B31;
}

/* Styles pour mobile */
@media screen and (max-width: 480px) {
    .polly-speed-button svg {
        width: 16px;
        height: 16px;
    }
    
    .polly-speed-menu {
        min-width: 70px;
    }
    
    .polly-speed-item {
        padding: 4px 8px;
    }
    .polly-player .mejs-controls {
        padding: 20px 25px 15px 5px;
    }
    .polly-speed-control {
        right: 6px;
        transform: translateY(-30%);
    }
    h3.polly-player-title {
        top: 5px;
      }
}