body {
    overflow-y: hidden;
    background-color: rgb(213, 219, 233);
}

.livre-header {
    display: flex;
    flex-direction: row;
    text-align: left;
    max-width: 100%;
    box-sizing: border-box;
}

.livre-cover {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 100%;
    max-height: 500px;
}

.livre-cover img {
    max-width: 100%;
    height: auto;
    display: block;
    max-height: 50vh;
    margin: 25px;
}

#selection-container {
    display: flex;
    justify-content: space-around;
    align-items: baseline;
    width: 100%;
}

.episode-details {
    width: 100%;
    text-align: center;
}

.options {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    margin-top: 15px;
}

.listen-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.listen-button:hover {
    background-color: var(--button-hover-color);
    transform: scale(1.05);
}

.options label {
    display: inline-block;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 49%;
    box-sizing: border-box;
    transition: 0.3s ease;
}

.options label:hover {
    background-color: var(--button-hover-color);
    color: var(--secondary-color);
}

.tooltip {
    display: inline;
    transform: translateX(-50%);
    background-color: var(--tooltip-background);
    color: var(--tooltip-text);
    padding: 5px;
    border-radius: 3px;
    font-size: 12px;
    text-align: center;
    transition: ease 0.3s;
}

.options input[type="radio"] {
    display: none;
}

.options input[type="radio"]:checked + label {
    background-color: var(--button-hover-color);
}

#episode-voice, #episode-soundtrack {
    margin-top: 20px;
}

.episode-iframe {
    display: none;
    width: 100%; /* Ajuster la largeur pour ressembler à une tablette */
    height: calc(100vh - 135px);
    max-width: 800px; /* Limiter la largeur maximale */
    border: none;
    transition: opacity 0.3s ease;
    margin: 10px auto; /* Centrer l'iframe */
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.episode-iframe.show {
    display: block;
    opacity: 1;
}

.episode-iframe.hide {
    opacity: 0;
}

.selection-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    min-height: 100%;
    padding: 20px;
    padding-bottom: 0;
    box-sizing: border-box;
    transition: 0.5s ease;
}

select {
    font-size: 16px;
    background-color: var(--primary-color);
    color: var(--select-color);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 15px;
    width: 25vw;
    transition: background-color 0.3s ease;
}

select:hover, select:focus {
    background-color: var(--button-hover-color);
}

#bar-chapter-selector select, #bar-episode-selector select {
    width: 200px;
    margin: 0;
}

.custom-audio-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--primary-color);
    border-radius: 10px;
    margin-top: 5px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    transition: background-color 0.3s ease;
}

.custom-audio-player button {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    margin: 0 5px;
    padding: 10px;
    transition: color 0.3s ease;
}

.custom-audio-player button:hover {
    color: var(--button-hover-color);
}

.custom-audio-player .progress-bar {
    flex: 1;
    height: 5px;
    background-color: var(--button-hover-color);
    border-radius: 5px;
    cursor: pointer;
    margin: 0 10px;
    transition: background-color 0.3s ease;
}

.custom-audio-player .progress-bar div {
    height: 100%;
    background-color: #fff;
    width: 0;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.custom-audio-player .time {
    color: #fff;
    margin: 0 10px;
    font-size: 14px;
    white-space: nowrap;
}

.livre-info {
    flex: 1;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px dashed white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.livre-info::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px dashed var(--primary-color);
    border-radius: 20px;
    pointer-events: none;
}

.livre-info p {
    color: white;
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.5;
}

.navigation-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    justify-content: center;
}


.chapter-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-button {
    background-color: var(--button-hover-color);
}

.nav-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    font-size: 14px;
}

.nav-button:hover {
    background-color: var(--button-hover-color);
    transform: scale(1.05);
}

.nav-button.episode-nav {
    background-color: #4a90e2;  /* Bleu plus vif pour les épisodes */
    color: white;
}

.nav-button.episode-nav:hover {
    background-color: #357abd;  /* Version plus foncée au survol */
    transform: scale(1.05);
}

.nav-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    margin-top: 100px;
    box-shadow: 0 -2px 5px var(--container-shadow);
}

.footer h1,.footer h2, .footer a {
    color: #fff;
}

.footer a {
    text-decoration: underline;
    color: #fff;
}

.footer a:hover {
    color: var(--secondary-color);
}

@media (max-width: 1200px) {
     
    .livre-header { 
        flex-direction: column;
    }

    .livre-cover img {
        max-height: 35vh;
        margin: 0;
    }

    .livre-cover {
        display: flex;
        width: 100%;
        max-height: 35vh;
        justify-content: center;
        align-items: center;
    }
}

/* Media queries */
@media (max-width: 768px) {

    .toggle-bar {
        padding: 10px;
    }

    .toggle-bar h1 {
        width: auto;
        font-size: 1.5rem;
    }

    .selection-content {
        padding: 10px;
    }

    select {
        width: 100%;
        margin-bottom: 10px;
    }

    .options label {
        width: 100%;
        margin-bottom: 10px;
    }

    select option {
        display: none;
    }
    select option[data-short] {
        display: block;
    }

    #bar-chapter-selector select, #bar-episode-selector select {
        width: 115px;
    }

    .footer {
        font-size: 14px;
        padding: 8px 0;
    }
}

@media (min-width: 769px) {
    select option {
        display: none;
    }
    select option[data-full] {
        display: block;
    }
}

@media (max-width: 480px) {
    #selection-container {
        width: 100%;
    }

    #selection-container select {
        width: 95%;
    }

    .selection-content {
        padding: 5px;
    }

    select {
        width: 100%;
        margin-bottom: 5px;
    }

    #bar-chapter-selector select, #bar-episode-selector select {
        display: none;
    }

    .options label {
        width: 100%;
        margin-bottom: 5px;
    }

    .custom-audio-player .progress-bar {
        margin: 10px 0;
    }

    .livre-cover img {
        max-height: 50vw;
        margin: 0;
    }

    .footer {
        font-size: 12px;
        padding: 6px 0;
    }
}

@media (max-height: 750px) and (max-width: 480px) {
    .livre-cover {
        margin-bottom: 125px;
    }

    .livre-cover img {
        z-index: 10;
        position: absolute;
        top: 60px;
        width: 45vw;
        box-shadow: inset 0 -20px 0px 0px rgb(44 62 80);
    }
}

