:root {
    /* Palette Officielle des Instructions */
    --awc-turquoise: #00b69f;
    --awc-off-white: #f4f7f6;
    --awc-dark-green: #0a2d29;
    --awc-red: #f44336;
    --awc-gold: #f6e4ba;

    /* Thème Clair (Par Défaut ou forcé) */
    --awc-lang-border: var(--awc-turquoise);
    --awc-lang-text: var(--awc-turquoise);
    --awc-player-icon: var(--awc-dark-green);
    --awc-pulse-color: var(--awc-red);
}

/* Thème Sombre (Basé sur l'attribut scheme du thème Kalisa) */
html[scheme="dark"] body,
html[scheme="dark"],
body.dark-theme,
[data-theme="dark"] {
    --awc-lang-border: var(--awc-off-white);
    --awc-lang-text: var(--awc-off-white);
    --awc-player-icon: var(--awc-off-white);
    --awc-pulse-color: var(--awc-gold);
}

/* Support du mode automatique (device) via Media Query */
@media (prefers-color-scheme: dark) {
    html[scheme="device"] body,
    html[scheme="device"] {
        --awc-lang-border: var(--awc-off-white);
        --awc-lang-text: var(--awc-off-white);
        --awc-player-icon: var(--awc-off-white);
        --awc-pulse-color: var(--awc-gold);
    }
}



/* Lecteur Audio Minimaliste */
.awc-minimal-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    background: transparent;
    border: none;
}
.awc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}
.awc-controls button {
    background: transparent;
    border: none;
    color: var(--awc-player-icon);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s, color 0.3s;
    padding: 5px;
    border-radius: 50%; /* Arrondi parfait pour l'animation de bordure */
}

.awc-controls button:hover {
    transform: scale(1.15);
    opacity: 0.8;
}
.awc-controls button:active {
    transform: scale(0.95);
}

/* Animation Pulsation Permanente de l'icône Lecture */
.awc-btn-play-pause:not(.playing) {
    animation: awcPlayPulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}
@keyframes awcPlayPulse {
    0% {
        box-shadow: 0 0 0 0 var(--awc-pulse-color);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}
/* Afin que la pulsation utilise toujours la "pulse color" dynamique : */
.awc-btn-play-pause:not(.playing):not(.is-loading) {
    animation: awcPlayPulse 2s infinite;
}

.awc-loader {
    animation: awcSpin 1s linear infinite;
    display: none;
}
@keyframes awcSpin { 100% { transform: rotate(360deg); } }

.awc-btn-play-pause.is-loading .awc-icon-play,
.awc-btn-play-pause.is-loading .awc-icon-pause {
    display: none !important;
}
.awc-btn-play-pause.is-loading .awc-loader {
    display: block !important;
}

.awc-player-feedback {
    margin-top: 15px;
    font-size: 0.9rem;
    text-align: center;
}
.awc-inline-alert {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 4px solid #f39c12;
}

/* Toast Notification for Navbar */
.awc-toast-message {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
    min-width: 300px;
    text-align: center;
    background: #fdf2e9;
    animation: awcToastIn 0.3s ease-out;
}
@keyframes awcToastIn {
    from { bottom: -50px; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

/* === RESPONSIVE DESIGN (Mobiles & Tablettes) === */
@media screen and (max-width: 768px) {
    .awc-controls {
        gap: 15px; /* Rapprochement des icônes sur tablette */
    }
    .awc-controls button {
        padding: 5px;
    }
}

@media screen and (max-width: 480px) {
    .awc-controls {
        gap: 8px; /* Gaps très rapprochés pour petits écrans type iPhone SE */
    }
    .awc-controls button {
        transform: scale(0.9); /* Légère réduction des SVG purs */
    }
}

