/* --- Styles généraux --- */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background: #f8f8f8;
    color: #333;
}

/* --- Barre supérieure (topbar) --- */
.topbar {
    height: 60px;
    background: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}
.brand-title {
    font-weight: bold;
    font-size: 1.2em;
}
.topmenu {
    display: flex;
}
.topmenu a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
}
.topmenu a:hover {
    text-decoration: underline;
}

/* Icône hamburger */
.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 15px;
}
.menu-icon span {
    display: block;
    height: 3px;
    background: #fff;
    margin: 4px 0;
}

/* --- Menu mobile --- */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #333;
    z-index: 1000;
    flex-direction: column;
    border-bottom: 1px solid #444;
}
.mobile-menu a {
    padding: 12px;
    text-decoration: none;
    color: #fff;
    border-top: 1px solid #444;
}
.mobile-menu a:hover {
    background: #444;
}

/* --- Conteneur principal --- */
#main-split {
    margin-left: 0;
    margin-top: 60px;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}
#top-row, #bottom-row {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* Blocs internes */
.bio, .lecture, .oeuvres, .playlist {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.bio h2, .lecture h2, .oeuvres h2, .playlist h2 {
    margin: 0;
    padding: 10px;
    font-size: 1.2em;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
}
.bio iframe, .lecture iframe, .oeuvres iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* --- Playlist --- */
.playlist {
    background: #f0f8ff;
    border: 2px solid #4a90e2;
}
.playlist h2 {
    background: #d9ebff;
    color: #2a5d9f;
    text-align: center;
}
.playlist-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.playlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 6px 10px;
    background: #ffffffcc;
    border: 1px solid #cce0f5;
    border-radius: 6px;
}
.playlist button {
    background: #c00;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
}
.playlist button:hover {
    background: #900;
}
#clear-playlist, #download-playlist {
    margin: 5px 10px;
    padding: 6px 12px;
    background: #c00;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: calc(100% - 20px);
}
#clear-playlist:hover, #download-playlist:hover {
    background: #900;
}

/* --- Gouttières Split.js --- */
.gutter {
    background-color: #ddd;
    background-repeat: no-repeat;
    background-position: 50%;
}
.gutter.gutter-horizontal {
    cursor: col-resize;
    width: 8px;
}
.gutter.gutter-vertical {
    cursor: row-resize;
    height: 6px;
}

/* --- Responsive mobile --- */
@media (max-width: 899px) {
    #main-split {
        flex-direction: column;
        height: auto;
    }
    #top-row, #bottom-row {
        flex-direction: column;
        height: auto;
    }
    .bio, .lecture, .oeuvres, .playlist {
        margin: 5px;
    }
    .gutter {
        display: none !important;
    }

    /* Masquer le menu principal et afficher le hamburger */
    .topmenu {
        display: none !important;
    }
    .menu-icon {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 8px;
    }
    .menu-icon span {
        height: 4px;   /* plus épais pour être bien visible */
        width: 28px;
        background: #fff;
        margin: 5px 0;
        border-radius: 2px;
    }
}
