/* Simplified responsive CSS for mobile harmony */
body {
    background: #2E3847 url('granite-coast-background.jpg') center/cover fixed no-repeat;
    color: #D3D7DB;
    font-family: 'Indie Flower', cursive, sans-serif;
    font-size: 18px;
    margin: 0;
    padding: 10px;
    overflow-x: hidden;
}

h1, h2, h3 {
    color: #EAC4A3;
    font-family: 'Indie Flower', cursive, sans-serif;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.4);
    margin: 0.5em 0;
}
h1 { font-size: 2em; }
h2 { font-size: 1.4em; text-align: center; text-transform: uppercase; }
h3 { font-size: 1.1em; color: #BFC8CE; }

p, label, input, button, nav button {
    font-size: 1em;
    font-family: 'Indie Flower', cursive, sans-serif;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

input[type="text"] {
    width: 100%;
    height: 44px;
    border-radius: 6px;
    border: 1.5px solid #EAC4A3;
    background: #3E4E5E;
    color: #EAC4A3;
    font-weight: bold;
    margin-bottom: 10px;
    box-sizing: border-box;
    padding: 8px;
}

button, input[type="submit"], nav button {
    background: #6B7B8C;
    color: #EAC4A3;
    border: 1.5px solid #EAC4A3;
    border-radius: 6px;
    padding: 12px 0;
    font-size: 1.1em;
    font-weight: bold;
    width: 100%;
    margin: 8px 0;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover, nav button:hover {
    background: #5B6C7D;
}

nav {
    padding: 8px 0;
    text-align: center;
}

#menu-toggle {
    display: block;
    font-size: 1.5em;
    background: none;
    border: none;
    color: #EAC4A3;
    margin: 0 auto 10px auto;
}

#menu-items {
    display: none;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
}
#menu-items.show {
    display: flex;
}

#menu-items form {
    width: 100%;
    margin: 0;
}
#menu-items button {
    width: 100%;
    box-sizing: border-box;
}

.responsive-media {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
    border-radius: 8px;
}

audio {
    width: 100%;
    max-width: 100%;
    min-height: 54px; /* Hauteur standard pour les contrôles audio */
    background: #556070; /* Couleur de fond pour s'assurer que l'élément est visible */
    display: block;
    margin: 10px auto;
}

.progress-bar-container {
    width: 100%;
    background: #3E4E5E;
    border-radius: 6px;
    overflow: hidden;
    height: 18px;
}
.progress-bar {
    height: 100%;
    background: #FFAB91;
    color: #fff;
    font-weight: bold;
    text-align: center;
    line-height: 18px;
}
.star { color: gold; font-size: 1.2em; }
.star-empty { color: lightgray; }

/* Table: responsive, hide extra columns on mobile */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}
th, td {
    padding: 6px;
    text-align: center;
    word-break: break-word;
}
@media (max-width: 600px) {
    body { font-size: 18px; padding: 12px; }
    h1, h2 { font-size: 1.4em; }
    .container { padding: 10px; }
    th:nth-child(4), td:nth-child(4), th:nth-child(5), td:nth-child(5) {
        display: none;
    }
    button, input[type="submit"], nav button {
        font-size: 1.1em;
        padding: 14px 0;
    }
    input[type="text"] {
        height: 44px;
        font-size: 1.1em;
    }
}

/* --- MODALE CHANGEMENT DE NIVEAU --- */
#modal-niveau {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #0007;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
#modal-niveau .modal-niveau-content {
    background: #232b36;
    color: #EAC4A3;
    padding: 2em 2em 1em 2em;
    border-radius: 12px;
    min-width: 260px;
    max-width: 90vw;
    box-shadow: 0 4px 24px #0005;
    position: relative !important;
    display: block;
}
#close-modal-niveau {
    position: absolute !important;
    top: 0.7em !important;
    right: 1.2em !important;
    left: auto !important;
    margin: 0 !important;
    font-size: 1.7em;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    color: #FFD6B0;
    padding: 0;
    display: block;
    width: auto;
    height: auto;
    text-align: right;
}
#close-modal-niveau:hover {
    color: #c00;
    background: #eee;
    border-radius: 50%;
}
#modal-niveau h3 {
    margin-top: 0;
    margin-bottom: 1.2em;
    color: #FFD6B0;
    font-weight: 700;
    font-size: 1.25em;
    letter-spacing: 0.01em;
}
