/* css/style.css */

#pm-main-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Titres */
.pm-cat-title {
    font-size: 2em;
    color: #222;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.pm-subcat-title {
    font-size: 1.4em;
    color: #555;
    margin-top: 20px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #f0ad4e;
}

/* Grille */
.pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Carte Podcast */
.pm-item {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.pm-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Zone Image */
.pm-cover-box {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Carré parfait */
    background: #ccc;
    cursor: pointer;
}
.pm-cover {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* --- BOUTON PLAY/PAUSE (DESIGN RESTAURÉ) --- */
.pm-play-btn {
    position: absolute;
    bottom: 10px; left: 10px;
    width: 46px; /* Taille confortable */
    height: 46px;
    background-color: rgba(0, 0, 0, 0.7); /* Le fond noir semi-transparent */
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Ajustement optique pour centrer le triangle */
    padding-left: 4px; 
    transition: background-color 0.2s ease, transform 0.2s;
    z-index: 5;
    line-height: 1;
}

.pm-play-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* Les icônes via CSS Content */
.pm-icon-play::before {
    content: '▶';
    font-size: 22px; /* Triangle bien visible */
}

.pm-icon-pause {
    /* Reset du padding pour la pause qui est symétrique */
    margin-left: -4px; 
}

.pm-icon-pause::before {
    content: '❚❚';
    font-size: 18px; /* Un peu plus petit pour ne pas dépasser */
}

.hidden { display: none !important; }
/* ------------------------------------------ */


/* Seek Bar */
.pm-seek-wrap {
    position: absolute;
    bottom: 18px; left: 65px; right: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    z-index: 4;
}
.pm-seek {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    padding: 0; margin: 0;
}
.pm-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #ccc;
}

/* Temps */
.pm-time {
    position: absolute;
    bottom: 35px; right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 6px;
    font-size: 0.75em;
    border-radius: 3px;
    z-index: 5;
}

/* Textes */
.pm-title {
    padding: 15px;
    font-size: 1.15em;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: left;
    background-color: #fdfdfd;
    line-height: 1.4;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.pm-desc {
    padding: 15px;
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    background-color: #fafafa;
    border-top: 1px solid #eee;
    text-align: left;
}
.pm-desc img { max-width: 100%; height: auto; margin: 10px 0; }
.pm-desc a { color: #007bff; text-decoration: none; }
.pm-desc a:hover { text-decoration: underline; }

/* --- NOUVEAU : Mode Slider (Horizontal) --- */

.pm-slider {
    display: flex; /* Aligne les items horizontalement */
    flex-wrap: nowrap; /* Empêche le retour à la ligne */
    overflow-x: auto; /* Active le scroll horizontal */
    gap: 20px;
    padding-bottom: 20px; /* Espace pour la barre de défilement */
    scroll-behavior: smooth; /* Défilement fluide */
    -webkit-overflow-scrolling: touch; /* Fluidité sur iOS */
    
    /* Pour cacher la barre de défilement par défaut (optionnel, plus joli) */
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* Style de la barre de défilement (Chrome, Safari, Edge) */
.pm-slider::-webkit-scrollbar {
    height: 8px;
}
.pm-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.pm-slider::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.pm-slider::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Ajustement des items DANS le slider */
.pm-slider .pm-item {
    flex: 0 0 280px; /* Largeur fixe : ne rétrécit pas, ne grandit pas */
    width: 280px; /* Force la largeur */
    /* Pas de marge bottom nécessaire ici */
}

/* Ajustement mobile pour le slider */
@media (max-width: 600px) {
    .pm-slider .pm-item {
        flex: 0 0 80%; /* Sur mobile, l'item prend 80% de la largeur pour inciter au scroll */
        width: 80%;
    }
}
