:root {
    font-family:
        system-ui,
        -apple-system,
        sans-serif;
    color: #eef0fa;
    background: #11152c;
    color-scheme: dark;
    font-size: 14px;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px 12px;
}
small {
    color: #8d98b4;
    font-size: 9px;
    letter-spacing: 0.22em;
}
h1 {
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -1.5px;
    margin: 3px 0;
}
h1 span {
    color: #c9fb46;
    font-size: 12px;
    letter-spacing: 0;
    margin-left: 10px;
    vertical-align: top;
}
button,
select,
input {
    font: inherit;
}
button,
select,
input[type='number'] {
    border: 1px solid #38415b;
    border-radius: 10px;
    background: #1c233d;
    color: #edf0fb;
    min-height: 42px;
    padding: 9px 13px;
}
button {
    cursor: pointer;
}
button:hover {
    border-color: #c9fb46;
}
button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid #58efd9;
    outline-offset: 3px;
}
button:disabled {
    opacity: 0.4;
}
.acide {
    background: #c9fb46;
    color: #182027;
    border-color: #c9fb46;
    font-weight: 700;
}
nav {
    display: flex;
    gap: 8px;
    padding: 0 28px 14px;
    border-bottom: 1px solid #29314c;
}
nav button {
    min-width: 85px;
}
main {
    display: flex;
    flex: 1;
    min-height: 0;
}
#instrument {
    min-width: 0;
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 28px 8px;
}
.lecture {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #b3bed5;
}
#masque {
    color: #c9fb46;
    font-family: monospace;
    border: 1px solid #38415b;
    padding: 4px 9px;
    border-radius: 15px;
}
#cadre {
    flex: 1;
    min-height: 80px;
    position: relative;
}
canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}
.sabliers {
    display: flex;
    gap: 30px;
    justify-content: center;
    padding: 7px 0;
}
.sabliers > div {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sabliers label {
    font-size: 11px;
    color: #bcc5dd;
    display: block;
}
.sabliers input {
    display: block;
    width: 145px;
    margin: 5px 0;
}
.sens {
    color: #c9fb46;
    font-size: 22px;
    padding: 3px 12px;
}
.rose {
    color: #ff6ace;
}
input[type='range'] {
    accent-color: #c9fb46;
    touch-action: none;
}
#sablier1 {
    accent-color: #ff6ace;
}
footer {
    display: flex;
    justify-content: center;
    gap: 7px;
    padding-top: 7px;
}
#etat {
    font-size: 11px;
    color: #a8b2cd;
    min-height: 27px;
    margin: 8px 0 0;
    text-align: center;
}
aside {
    width: 320px;
    background: #171e35;
    border-left: 1px solid #343c57;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
aside[hidden],
.page[hidden],
[hidden] {
    display: none !important;
}
.entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #303952;
}
.entete h2 {
    font-size: 18px;
    font-weight: 500;
}
.defilant {
    overflow: auto;
    padding: 14px 18px;
    overscroll-behavior: contain;
}
.page {
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.page label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 12px;
    color: #bcc5dd;
}
.page p {
    font-size: 12px;
    line-height: 1.65;
    margin: 0;
    color: #a8b2cd;
}
.page h3 {
    font-size: 13px;
    margin: 5px 0;
}
.classes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.classes button {
    padding: 6px;
    min-height: 39px;
    font-size: 12px;
}
.classes .actif {
    background: #c9fb46;
    color: #172026;
    border-color: #c9fb46;
}
.paire {
    display: flex;
    gap: 8px;
}
.paire select {
    min-width: 0;
    width: 50%;
}
.fichier input {
    max-width: 100%;
    font-size: 11px;
}
a {
    color: #58efd9;
    font-size: 12px;
}
.page label:has(input[type='checkbox']) {
    flex-direction: row;
}
#ordreNotes {
    word-break: break-word;
}
@media (max-width: 700px) {
    header {
        padding: 10px 14px 8px;
    }
    h1 {
        font-size: 27px;
    }
    nav {
        padding: 0 12px 9px;
        gap: 6px;
    }
    nav button {
        min-width: 0;
        flex: 1;
        font-size: 12px;
        padding: 8px;
    }
    main {
        flex-direction: column;
    }
    #instrument {
        padding: 8px 12px 4px;
    }
    aside {
        width: 100%;
        max-height: 38dvh;
        border-left: 0;
        border-top: 1px solid #343c57;
        flex-shrink: 0;
    }
    .entete {
        padding: 4px 12px;
    }
    .entete h2 {
        margin: 6px 0;
    }
    .entete button {
        min-height: 33px;
        padding: 5px 10px;
    }
    .defilant {
        padding: 10px 14px;
    }
    .sabliers {
        gap: 14px;
    }
    .sabliers > div {
        gap: 7px;
    }
    .sabliers input {
        width: 105px;
    }
    .sabliers label {
        font-size: 10px;
    }
    .sens {
        padding: 3px 8px;
        font-size: 18px;
        min-height: 37px;
    }
    footer select {
        font-size: 11px;
        min-width: 0;
    }
    footer button {
        padding: 7px 11px;
    }
    #etat {
        font-size: 10px;
        margin-top: 5px;
    }
    .lecture {
        font-size: 10px;
    }
}
@media (max-height: 520px) {
    header {
        padding: 4px 14px;
    }
    header small {
        display: none;
    }
    h1 {
        font-size: 22px;
    }
    nav {
        padding-bottom: 5px;
    }
    nav button {
        min-height: 32px;
        padding: 5px;
    }
    #etat {
        display: none;
    }
    .sabliers {
        padding: 2px;
    }
    footer {
        padding-top: 2px;
    }
    footer button,
    footer select {
        min-height: 32px;
        padding: 5px;
    }
}
