:root {
  --pr-bg: #c8e30d;           /* Couleur de fond */
  --pr-border: #929292;       /* Bordure solide 1px */
  --pr-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 
               0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --pr-primary: #2e4057;      /* Couleur d'accentuation / boutons */
  --pr-text-main: #1e293b;
  --pr-text-muted: #64748b;
}

/* ==========================================================
   STRUCTURE DE BASE
   ========================================================= */
.player-radio {
  position: relative;
  display: flex;
  background-color: var(--pr-bg);
  border: 1px solid var(--pr-border);
  border-radius: 18px;
  box-shadow: var(--pr-shadow);
  box-sizing: border-box;
  overflow: visible;
}

/* Visuel carré par défaut */
.player-radio .pr-cover {
  flex-shrink: 0;
  border: 1px solid var(--pr-border);
  border-radius: 12px;
  overflow: hidden;
  background-color: #f1f5f9;
  box-sizing: border-box;
}

.player-radio .pr-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Textes */
.player-radio .pr-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.player-radio .pr-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pr-text-muted);
  margin-bottom: 4px;
}

.player-radio .pr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #94a3b8;
}

.player-radio .pr-dot.live {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.player-radio .pr-title {
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--pr-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-radio .pr-subtitle {
  font-size: 1.5rem;
  color: var(--pr-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Commandes */
.player-radio .pr-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.player-radio .pr-btn-play {
  background-color: var(--pr-primary);
  border: none;
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.2s ease;
  flex-shrink: 0;
}

.player-radio .pr-btn-play:hover {
  transform: scale(1.05);
  background-color: var(--pr-primary);
}

.player-radio .pr-btn-play svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.player-radio .pr-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.player-radio .pr-volume svg {
  width: 20px;
  height: 20px;
  fill: var(--pr-text-muted);
  flex-shrink: 0;
}

.player-radio .pr-volume-slider {
  width: 100%;
  max-width: 110px;
  accent-color: var(--pr-primary);
  cursor: pointer;
}

/* Boutons d'action (Share, Pin, Link, Unpin) */
.player-radio .pr-action-btn {
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pr-text-muted);
  text-decoration: none;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.player-radio .pr-action-btn:hover {
  background-color: #ffffff;
  color: var(--pr-text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.player-radio .pr-action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Menu de partage popup */
.player-radio .pr-share-wrapper {
  position: relative;
}

.player-radio .pr-share-menu {
  display: none;
  position: absolute;
  top: 0;
  right: 100%;
  margin-right: 8px;
  background-color: #ffffff;
  border: 1px solid var(--pr-border);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 160px;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
}

.player-radio .pr-share-menu.pr-open {
  display: flex;
}

.player-radio .pr-share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--pr-text-main);
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.player-radio .pr-share-item:hover {
  background-color: #f8fafc;
}

.player-radio .pr-share-item svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ==========================================================
   MODE 1 : PAR DÉFAUT (HORIZONTAL RESPONSIVE)
   ========================================================= */
.player-radio.pr-layout-default {
  flex-direction: row;
  align-items: center;
  width: 100%;
  max-width: 520px;
  padding: 16px;
  gap: 20px;
}

.player-radio.pr-layout-default.pr-no-cover {
  max-width: 380px;
}

.player-radio.pr-layout-default .pr-cover {
  width: 140px;
  height: 140px;
}

.player-radio.pr-layout-default .pr-content {
  padding-right: 36px;
}

.player-radio.pr-layout-default .pr-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

@media (max-width: 360px) {
  .player-radio.pr-layout-default {
    flex-direction: column;
    max-width: 340px;
    text-align: center;
    padding: 24px 20px 20px 20px;
  }

  .player-radio.pr-layout-default .pr-cover {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .player-radio.pr-layout-default .pr-content {
    width: 100%;
    align-items: center;
    padding-right: 0;
  }

  .player-radio.pr-layout-default .pr-controls {
    justify-content: center;
    width: 100%;
  }

  .player-radio.pr-layout-default .pr-share-menu {
    top: 100%;
    right: 0;
    margin-right: 0;
    margin-top: 6px;
  }
}

/* ==========================================================
   MODE 2 : FORCÉ VERTICAL (3 ICÔNES EN LIGNE SOUS LA COVER)
   ========================================================= */
.player-radio.pr-layout-vertical {
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 20px;
}

.player-radio.pr-layout-vertical .pr-cover {
  width: 100%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 1 / 1;
}

.player-radio.pr-layout-vertical .pr-actions {
  position: static;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 12px 0 6px 0;
  z-index: 10;
}

.player-radio.pr-layout-vertical .pr-content {
  width: 100%;
  align-items: center;
}

.player-radio.pr-layout-vertical .pr-controls {
  justify-content: center;
  width: 100%;
}

.player-radio.pr-layout-vertical .pr-share-menu {
  top: 100%;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  margin-top: 6px;
  margin-right: 0;
}

/* ==========================================================
   MODE 3 : MINIMALISTE (AVEC COVER RESPONSIVE QUI RÉTRÉCIT)
   ========================================================== */
.player-radio.pr-layout-minimalist {
  flex-direction: row;
  align-items: center;
  width: fit-content;
  max-width: 100%;            /* Ne dépasse jamais la largeur disponible */
  padding: 4px 0;
  gap: 14px;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  box-sizing: border-box;
}

/* Si playerbg: true */
.player-radio.pr-layout-minimalist.pr-has-bg {
  background-color: var(--pr-bg);
  border: 1px solid var(--pr-border);
  box-shadow: var(--pr-shadow);
  border-radius: 14px;
  padding: 8px 14px;
}

/* La couverture : autorisée à diminuer grâce à flex-shrink: 1 et min-width: 0 */
.player-radio.pr-layout-minimalist .pr-cover {
  height: 40px;
  max-height: 40px;
  width: auto;
  flex-shrink: 1;             /* Autorise le rétrécissement si l'espace manque */
  min-width: 0;               /* Permet de descendre sous la taille naturelle */
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
}

/* L'image s'adapte automatiquement en conservant son ratio (carré ou logo) */
.player-radio.pr-layout-minimalist .pr-cover img {
  max-height: 40px;
  max-width: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Les commandes : ne rétrécissent JAMAIS pour éviter tout débordement d'icône */
.player-radio.pr-layout-minimalist .pr-min-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;             /* Reste toujours intact à droite */
}

.player-radio.pr-layout-minimalist .pr-btn-play {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.player-radio.pr-layout-minimalist .pr-btn-play svg {
  width: 18px;
  height: 18px;
}

.player-radio.pr-layout-minimalist .pr-volume {
  flex: 0 0 auto;
}

.player-radio.pr-layout-minimalist .pr-volume-slider {
  max-width: 80px;
}

/* Découpe blanche de la punaise barrée si aucun fond n'est appliqué */
.player-radio.pr-layout-minimalist:not(.pr-has-bg) .pr-btn-unpin svg line:first-of-type {
  stroke: #ffffff;
}