
/* BASE & TYPO */

:root {
    --primary: #2563eb;
    --bg: #f9fafb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --card-bg: #ffffff; }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0; }

body {
    font-family: -apple-system, system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent; }

.link {
    color: var(--primary);
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer; }


/* NAVIGATION & VUES */

.hidden {
    display: none; }

.active-view {
    display: block;
    animation: fadeIn 0.3s ease-out; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.p-4 {
    padding: 1rem; }

.mt-4 {
    margin-top: 1rem; }

.mb-6 {
    margin-bottom: 1.5rem; }

.app-footer {
    text-align: center;
    padding: 20px 0;
    max-width: 80%;
    margin: auto; }

.app-footer p {
    font-size: 0.75rem; /* TrÃ¨s petit */
    color: #9ca3af;    /* Gris clair */
    letter-spacing: 0.05em;
    font-weight: 400; }


/* BANNIERE */

#dev-banner {
    background-color: #fff3cd; /* Jaune lÃ©ger pour l'avertissement */
    color: #856404;
    padding: 10px 20px;
    border-bottom: 1px solid #ffeeba;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: sans-serif;
    font-size: 0.9rem;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.banner a {
    color: #856404;
    text-decoration: underline;
    font-weight: bold;
}

#close-banner {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #856404;
    line-height: 1;
    padding: 0 5px;
}

#close-banner:hover {
    opacity: 0.7;
}



/* ACCUEIL : GRILLE DE SÃ‰RIES */

.page-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 1.5rem; }

.series-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto; }

.card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover; }

.card-body {
    padding: 1rem; }

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    flex: 1;
    margin: 0; }

.card-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem; }

.badge { 
    font-size: 0.75rem;
    font-weight: 500;
    background: #f3f4f6; 
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px; }

.favorite-icon {
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s ease;
    margin-right: -15px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none; }

.card-header .favorite-icon {
    padding: 5px 15px 5px 15px; }

.detail-header .favorite-icon {
    padding: 15px; }

.favorite-icon.active {
    color: #444444;
    filter: drop-shadow(0 2px 5px rgba(68, 68, 68, 0.4));
    animation: heartBeat 0.4s ease-out; }

@keyframes heartBeat {
    0% { transform: scale(1); }
    /*25% { transform: scale(1.3); }*/
    50% { transform: scale(1.15); }
    /*75% { transform: scale(1.4); }*/
    100% { transform: scale(1.1); } /* Reste lÃ©gÃ¨rement plus grand */
}

.favorite-icon:hover {
    color: #444444;
    transform: scale(1.2); }

.tags-container {
    display: flex;
    gap: 10px;
    padding: 0 15px 15px;
    /* Comportement mobile : dÃ©filement horizontal */
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; }            /* Firefox */

.tags-container::-webkit-scrollbar {
    display: none; }            /* Chrome/Safari */

.tag-pill {
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap; /* EmpÃªche les tags de revenir Ã  la ligne */
    cursor: pointer;
    transition: all 0.2s; }

.tag-pill.active {
    background: var(--primary);
    color: white; }

.tag-pill:hover:not(.active) {
    background: #e5e7eb; }


/* PAGE DÃ‰TAIL */

#series-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    min-height: 100vh; }

.btn-back {
    position: sticky; 
    top: 0; 
    font-size:1.0rem;
    z-index: 40; 
    width: 100%; 
    background: white;
    padding: 1rem; 
    color: var(--primary); 
    font-weight: 600; 
    border: none;
    text-align: left; 
    cursor: pointer; 
    border-bottom: 1px solid #eee; }

.detail-img {
    width: 100%;
 /*   height: 250px; */
    object-fit: cover; }

.detail-header {
    /*padding: 1.5rem; }*/
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px; }

.detail-title {
    font-size: 1.5rem;
    font-weight: 700; }

.detail-desc {
    color: #4b5563;
    margin-top: 0.5rem;
    white-space: pre-wrap; }

/* PAGE DÃ‰TAIL > FILTRES */

.filter-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem; }

.btn-filter {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer; }

.btn-filter.active {
    background: var(--primary);
    color: white; }

.btn-filter.inactive {
    background: #e5e7eb;
    color: #374151; }


/* PAGE DÃ‰TAIL > LISTE Ã‰PISODES */

.episode-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem; 
    border-bottom: 1px solid #e5e7eb; }

.episode-info-container {
    display: flex;
    gap: 12px;
    align-items: flex-start; }  /* Aligne le texte en haut de l'image */

.episode-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0; }

.episode-text {
    flex: 1;
    display:grid; }

.episode-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600; }

.episode-title {
    font-size:1.1rem; }

.episode-desc {
    font-size: 0.85rem;
    color: #4b5563;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 10;         /* Limite Ã  10 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden; }

.episode-actions {
        display: flex;
        justify-content: flex-end; }

.episode-actions button {
    min-width: 120px;
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap; }          /* Garde le texte sur une ligne */

.btn-play {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.875rem;
    border: none; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    cursor: pointer; }

.btn-play:active {          /*A supprimer ?*/
    transform: scale(0.95); }

/* Lecture en cours */
.btn-stop {
    background-color: #ff9800 !important; /* Orange */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    animation: pulse 2s infinite; }         /* Effet de pulsation */

@keyframes pulse {
   0% {
        transform: scale(1); }
   50% {
        transform: scale(1.05); }
   100% {
        transform: scale(1); }
    }

/* Ã‰pisode dÃ©jÃ  Ã©coutÃ© */
.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer; }

.opacity-50 {
    opacity: 1 !important; }            /*A supprimer*/


/* LECTEUR FIXE */

.player-bar {
	position: fixed; 
	bottom: 0; 
	left: 0;
	right:0;
	width: 100%; 
	background: white;
	border-top: 1px solid #e5e7eb; 
	padding: 1rem; 
	z-index: 50; }

#now-playing { 
    font-size: 0.75rem; 
    font-weight: 700; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; }

#now-playing .serie-label {         /*A supprimer ?*/
    color: #9ca3af; }

#main-audio {
    width: 100%; 
    height: 32px;
    margin-top: 0.5rem; }

.btn-loading {
    background-color: #95a5a6 !important;
    cursor: wait;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}







/* LISTE VIDE */

.empty-state {
     text-align: center;
     padding: 2.5rem 0;
     color: var(--text-muted);
     font-style: italic; }


/* MEDIA QUERIES */

@media (min-width: 768px) {

.page-title {
    text-align: center;
    margin-top: 2rem; }

.series-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }         /* Colonnes auto-adaptatives */

.detail-img {
    height: 400px; 
    border-radius: 0 0 1rem 1rem; }

.episode-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between; }

.player-bar:not(.hidden) {
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem; }

#now-playing {
    flex: 1;            /* Prend l'espace disponible Ã  gauche */
    font-size: 0.9rem; }

#main-audio {
    flex: 1;
    max-width: 50%;           /* Ne s'Ã©tire pas Ã  l'infini */
    margin-top: 0; }            /* Aligne avec le texte */

.tags-container {
    /* On centre et on permet le retour Ã  la ligne sur grand Ã©cran */
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    max-width: 1000px;
    margin: 0 auto; }

}
