@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

@font-face {
    font-family: 'Heavitas';
    src:
        local('Heavitas'),
        url('../fonts/Heavitas.woff2') format('woff2'),
        url('../fonts/Heavitas.woff') format('woff'),
        url('../fonts/Heavitas.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* DESIGN LEOMUSIQUE - MODERN DARK RED */
:root {
    --bg-deep: #050505;
    --bg-panel: #121212;
    --bg-light: #1c1c1c;
    --bg-item: #212124;
    --bg-selected: #2c2c31; /* Couleur du chant sélectionné */
    --red-main: #d32f2f;
    --red-hover: #f44336;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --blue-section: #448aff;
    --header-h: 58px;
    --radius: 6px;
}
* { box-sizing: border-box; outline: none; }
html, body, button, input, select, textarea {
    font-family: 'Poppins', sans-serif;
}
.title-font,
h1,
h2,
.panel-header h2,
.section-title,
.monitor-title,
.modal-content h2 {
    font-family: 'Heavitas', 'Poppins', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
}
html {
    height: 100%;
    background: var(--bg-deep);
}

@media (min-width: 901px) {
    body.admin-page {
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    body.admin-page .main-header {
        height: 58px !important;
        min-height: 58px !important;
        flex: 0 0 58px !important;
        margin: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        transform: none !important;
    }

    body.admin-page .powered-by-footer {
        flex: 0 0 30px !important;
        min-height: 30px !important;
    }

    body.admin-page .logo-admin {
        height: 38px !important;
    }

    body.admin-page .admin-grid {
        flex: 1 1 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 15px !important;
        gap: 15px !important;
        overflow: hidden !important;
    }

    body.admin-page .admin-col,
    body.admin-page .panel {
        min-height: 0 !important;
        overflow: hidden !important;
    }

    body.admin-page .admin-col {
        gap: 15px !important;
    }

    body.admin-page .panel-top,
    body.admin-page .panel-bottom {
        flex: 1 1 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }
}

@media (min-width: 901px) and (max-width: 1366px) {
    body.admin-page .main-header {
        padding: 0 14px;
    }

    body.admin-page .admin-grid {
        grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.05fr) minmax(280px, 1fr);
        gap: 10px !important;
        padding: 10px !important;
    }

    body.admin-page .panel-header,
    body.admin-page .panel-header-center {
        padding: 10px 12px;
    }

    body.admin-page .panel-header.chant-panel-header {
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
    }

    body.admin-page .chant-db-switch {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    body.admin-page .chant-panel-header #chant-header-btns {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
    }

    body.admin-page .chant-panel-header.is-trash-view {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body.admin-page .chant-panel-header.is-trash-view .chant-db-switch {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    body.admin-page .btn-standard {
        padding: 8px 9px;
        font-size: 10px;
        letter-spacing: 0.4px;
    }

    body.admin-page .screen-preview-iframe {
        width: 92%;
    }
}
body {
    margin: 0;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.main-header {
    height: var(--header-h);
    flex: 0 0 var(--header-h);
    background: var(--bg-panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid #222;
}
body.admin-page.admin-live-mode .main-header {
    background:
        linear-gradient(135deg, rgba(211,47,47,0.38), rgba(18,18,18,0.92) 48%, rgba(211,47,47,0.24)),
        rgba(18,18,18,0.86);
    border-bottom-color: transparent;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 10px 30px rgba(211,47,47,0.20);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.logo-admin { height: 38px; }
.header-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.login-logo-link {
    display: inline-flex;
    justify-content: center;
    line-height: 0;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="file"] {
    color: #d8d8d8;
    font-weight: 400;
}
input[type="file"]::file-selector-button {
    margin-right: 10px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background: #242424;
    color: #fff;
    padding: 8px 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: 0.18s;
}
input[type="file"]::file-selector-button:hover {
    background: var(--red-main);
    border-color: var(--red-main);
}
input[type="file"]::-webkit-file-upload-button {
    margin-right: 10px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background: #242424;
    color: #fff;
    padding: 8px 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    cursor: pointer;
}
select,
select option {
    background: #171717;
    color: #fff;
}

/* BOUTONS */
.btn-standard {
    background: var(--red-main); color: white; border: none;
    padding: 10px 20px; border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 700; font-size: 11px; cursor: pointer;
    text-transform: uppercase; letter-spacing: 1px; transition: 0.3s;
}
.btn-standard:hover { background: var(--red-hover); transform: translateY(-1px); }
.btn-standard.active { background: white; color: var(--red-main); }
.btn-grey { background: #444 !important; }

.btn-circle {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-light); border: none; color: white; cursor: pointer;
}
.main-header .btn-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}
.main-header .btn-circle::before {
    content: "";
    width: 21px;
    height: 21px;
    background: #fff;
    display: block;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}
.header-left .btn-circle:not(.admin-mode-toggle)::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M19.4 13.5c.1-.5.1-1 .1-1.5s0-1-.1-1.5l2-1.5-2-3.5-2.4 1a7 7 0 0 0-2.6-1.5L14 2h-4l-.4 2.5A7 7 0 0 0 7 6L4.6 5l-2 3.5 2 1.5a8 8 0 0 0 0 3l-2 1.5 2 3.5L7 18a7 7 0 0 0 2.6 1.5L10 22h4l.4-2.5A7 7 0 0 0 17 18l2.4 1 2-3.5-2-1.5ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M19.4 13.5c.1-.5.1-1 .1-1.5s0-1-.1-1.5l2-1.5-2-3.5-2.4 1a7 7 0 0 0-2.6-1.5L14 2h-4l-.4 2.5A7 7 0 0 0 7 6L4.6 5l-2 3.5 2 1.5a8 8 0 0 0 0 3l-2 1.5 2 3.5L7 18a7 7 0 0 0 2.6 1.5L10 22h4l.4-2.5A7 7 0 0 0 17 18l2.4 1 2-3.5-2-1.5ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E");
}
.main-header .admin-mode-toggle {
    background: #fff;
}
.main-header .admin-mode-toggle::before {
    background: #111;
    width: 19px;
    height: 19px;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 17.5V21h3.5L18.1 10.4l-3.5-3.5L4 17.5ZM20.7 7.8a1 1 0 0 0 0-1.4l-3.1-3.1a1 1 0 0 0-1.4 0l-1.4 1.4 4.5 4.5 1.4-1.4Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 17.5V21h3.5L18.1 10.4l-3.5-3.5L4 17.5ZM20.7 7.8a1 1 0 0 0 0-1.4l-3.1-3.1a1 1 0 0 0-1.4 0l-1.4 1.4 4.5 4.5 1.4-1.4Z'/%3E%3C/svg%3E");
}
.main-header .admin-mode-toggle.is-live {
    background: var(--red-main);
}
.main-header .admin-mode-toggle.is-live::before {
    background: #fff;
    width: 22px;
    height: 22px;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M8.5 16.5a5 5 0 0 1 0-9M15.5 7.5a5 5 0 0 1 0 9M5.2 19.8a9.5 9.5 0 0 1 0-15.6M18.8 4.2a9.5 9.5 0 0 1 0 15.6'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M8.5 16.5a5 5 0 0 1 0-9M15.5 7.5a5 5 0 0 1 0 9M5.2 19.8a9.5 9.5 0 0 1 0-15.6M18.8 4.2a9.5 9.5 0 0 1 0 15.6'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='black'/%3E%3C/svg%3E");
}
.header-right .btn-circle::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M16.5 2h-9A2.5 2.5 0 0 0 5 4.5v15A2.5 2.5 0 0 0 7.5 22h9a2.5 2.5 0 0 0 2.5-2.5v-15A2.5 2.5 0 0 0 16.5 2ZM7 5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V5Zm3.5 15h3a.75.75 0 0 0 0-1.5h-3a.75.75 0 0 0 0 1.5Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M16.5 2h-9A2.5 2.5 0 0 0 5 4.5v15A2.5 2.5 0 0 0 7.5 22h9a2.5 2.5 0 0 0 2.5-2.5v-15A2.5 2.5 0 0 0 16.5 2ZM7 5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V5Zm3.5 15h3a.75.75 0 0 0 0-1.5h-3a.75.75 0 0 0 0 1.5Z'/%3E%3C/svg%3E");
}
.header-right .btn-circle.btn-circle-desktop-remote::before {
    width: 22px;
    height: 22px;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M4 5h16v10H4zM9 20h6M12 15v5'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M4 5h16v10H4zM9 20h6M12 15v5'/%3E%3C/svg%3E");
}
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-circle-small {
    background: #333; border: none; color: white;
    width: 28px; height: 28px; border-radius: 50%;
    cursor: pointer; font-size: 12px; margin-left: 5px;
}
.btn-circle-small.icon-trash,
.btn-circle-small.icon-edit,
.btn-circle-small.icon-plus,
.btn-circle-small.icon-remove,
.btn-circle-small.icon-info,
.btn-circle-small.icon-grid,
.btn-circle-small.icon-remix,
.btn-circle-small.icon-archive,
.btn-circle-small.icon-desktop,
.btn-circle-small.icon-eye,
.btn-circle-small.icon-eye-off {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}
.btn-circle-small.icon-trash::before,
.btn-circle-small.icon-edit::before,
.btn-circle-small.icon-plus::before,
.btn-circle-small.icon-remove::before,
.btn-circle-small.icon-info::before,
.btn-circle-small.icon-grid::before,
.btn-circle-small.icon-remix::before,
.btn-circle-small.icon-archive::before,
.btn-circle-small.icon-desktop::before,
.btn-circle-small.icon-eye::before,
.btn-circle-small.icon-eye-off::before {
    content: "";
    width: 15px;
    height: 15px;
    background: #fff;
    display: block;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}
.btn-circle-small.icon-trash::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 7h16M10 11v6M14 11v6M6 7l1 14h10l1-14M9 7V4h6v3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 7h16M10 11v6M14 11v6M6 7l1 14h10l1-14M9 7V4h6v3'/%3E%3C/svg%3E");
}
.btn-circle-small.icon-edit::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 17.5V21h3.5L18.1 10.4l-3.5-3.5L4 17.5ZM20.7 7.8a1 1 0 0 0 0-1.4l-3.1-3.1a1 1 0 0 0-1.4 0l-1.4 1.4 4.5 4.5 1.4-1.4Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 17.5V21h3.5L18.1 10.4l-3.5-3.5L4 17.5ZM20.7 7.8a1 1 0 0 0 0-1.4l-3.1-3.1a1 1 0 0 0-1.4 0l-1.4 1.4 4.5 4.5 1.4-1.4Z'/%3E%3C/svg%3E");
}
.btn-circle-small.icon-plus::before {
    width: 16px;
    height: 16px;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M10 4h4v6h6v4h-6v6h-4v-6H4v-4h6V4Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M10 4h4v6h6v4h-6v6h-4v-6H4v-4h6V4Z'/%3E%3C/svg%3E");
}
.btn-circle-small.icon-remove::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m6.4 5 5.6 5.6L17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6L6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m6.4 5 5.6 5.6L17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6L6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5Z'/%3E%3C/svg%3E");
}
.btn-circle-small.icon-remix::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M20 11a8 8 0 0 0-13.7-5.6L4 7.7V3M4 13a8 8 0 0 0 13.7 5.6L20 16.3V21'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M20 11a8 8 0 0 0-13.7-5.6L4 7.7V3M4 13a8 8 0 0 0 13.7 5.6L20 16.3V21'/%3E%3C/svg%3E");
}
.btn-circle-small.icon-archive::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 7h16v13H4zM3 4h18v3H3zM9 11h6'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 7h16v13H4zM3 4h18v3H3zM9 11h6'/%3E%3C/svg%3E");
}
.btn-circle-small.icon-grid::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'/%3E%3C/svg%3E");
}
.btn-circle-small.icon-desktop::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M4 5h16v10H4zM9 20h6M12 15v5'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M4 5h16v10H4zM9 20h6M12 15v5'/%3E%3C/svg%3E");
}
.btn-circle-small.icon-eye::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 5c5.2 0 8.5 4.4 9.6 6.1.35.55.35 1.25 0 1.8C20.5 14.6 17.2 19 12 19s-8.5-4.4-9.6-6.1a1.7 1.7 0 0 1 0-1.8C3.5 9.4 6.8 5 12 5Zm0 2c-4.1 0-6.8 3.5-7.8 5 1 1.5 3.7 5 7.8 5s6.8-3.5 7.8-5c-1-1.5-3.7-5-7.8-5Zm0 2.2a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 5c5.2 0 8.5 4.4 9.6 6.1.35.55.35 1.25 0 1.8C20.5 14.6 17.2 19 12 19s-8.5-4.4-9.6-6.1a1.7 1.7 0 0 1 0-1.8C3.5 9.4 6.8 5 12 5Zm0 2c-4.1 0-6.8 3.5-7.8 5 1 1.5 3.7 5 7.8 5s6.8-3.5 7.8-5c-1-1.5-3.7-5-7.8-5Zm0 2.2a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6Z'/%3E%3C/svg%3E");
}
.btn-circle-small.icon-eye-off::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m3.3 2 18.7 18.7-1.3 1.3-3.1-3.1A10.4 10.4 0 0 1 12 20C7 20 3.3 15.5 2 13c.7-1.4 2.2-3.3 4.2-4.8L2 3.3 3.3 2Zm5 8.4A3 3 0 0 0 12 16a3 3 0 0 0 1.6-.5l-5.3-5.1ZM12 6c5 0 8.7 4.5 10 7a14 14 0 0 1-2.7 3.5l-2.1-2.1A3 3 0 0 0 13 10.1L10.7 7.8c.4-.1.9-.1 1.3-.1Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m3.3 2 18.7 18.7-1.3 1.3-3.1-3.1A10.4 10.4 0 0 1 12 20C7 20 3.3 15.5 2 13c.7-1.4 2.2-3.3 4.2-4.8L2 3.3 3.3 2Zm5 8.4A3 3 0 0 0 12 16a3 3 0 0 0 1.6-.5l-5.3-5.1ZM12 6c5 0 8.7 4.5 10 7a14 14 0 0 1-2.7 3.5l-2.1-2.1A3 3 0 0 0 13 10.1L10.7 7.8c.4-.1.9-.1 1.3-.1Z'/%3E%3C/svg%3E");
}
.btn-circle-small.is-active {
    background: var(--red-main);
}
.btn-circle-small.is-disabled,
.btn-circle-small:disabled {
    opacity: 0.45;
    cursor: default;
}
.btn-circle-small.is-disabled:hover,
.btn-circle-small:disabled:hover {
    background: #333;
}
.btn-circle-small:hover { background: var(--red-main); }

/* LAYOUT 3 COLONNES */
.admin-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    padding: 15px;
    overflow: hidden;
}
.admin-col { display: flex; flex-direction: column; gap: 15px; min-height: 0; overflow: hidden; }

.panel {
    background: var(--bg-panel); border-radius: 8px; border: 1px solid #222;
    display: flex; flex-direction: column; overflow: hidden; height: 100%; min-height: 0;
}
.panel-header {
    padding: 15px 20px; display: flex; justify-content: space-between;
    align-items: center; border-bottom: 1px solid #222; flex-shrink: 0;
}
.panel-header.chant-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
}
.chant-panel-header #chant-zone-title {
    white-space: nowrap;
}
.chant-panel-header #chant-header-btns {
    justify-self: start;
    min-width: max-content;
}
.chant-db-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
}
.chant-panel-header.is-trash-view {
    grid-template-columns: minmax(0, 1fr) auto;
}
.chant-panel-header.is-trash-view .chant-db-switch {
    grid-column: 2;
}
.chant-panel-header.is-trash-view #chant-header-btns {
    display: none;
}
.chant-db-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #444;
    border-color: #5a5a5a;
    color: #fff;
}
.chant-db-btn.official {
    background: #444;
    border-color: #5a5a5a;
}
.chant-db-btn.official img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    pointer-events: none;
}
.chant-db-btn.nr {
    color: #fff;
    font-size: 11px;
    letter-spacing: 0;
}
.chant-db-btn.trash::before {
    content: "";
    width: 17px;
    height: 17px;
    background: #fff;
    display: block;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 7h16M10 11v6M14 11v6M6 7l1 14h10l1-14M9 7V4h6v3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 7h16M10 11v6M14 11v6M6 7l1 14h10l1-14M9 7V4h6v3'/%3E%3C/svg%3E");
}
.chant-db-btn.active {
    background: var(--red-main);
    border-color: var(--red-main);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--red-main) 26%, transparent);
    border-color: #fff;
}
#set-header-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-circle-small.icon-info::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M12 11v6M12 7h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M12 11v6M12 7h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z'/%3E%3C/svg%3E");
}
.panel-header h2 { font-size: 12px; color: var(--text-secondary); margin: 0; letter-spacing: 0.3px; }
#set-header-btns,
#chant-header-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}
#chant-header-btns .btn-standard {
    white-space: nowrap;
    min-width: max-content;
}

.panel-top,
.panel-bottom {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
}
.scroll-area { flex: 1; overflow-y: auto; padding: 15px; }

/* PANEL FOOTER - CENTRAGE DU BOUTON */
.panel-footer {
    padding: 15px; border-top: 1px solid #222;
    display: flex; justify-content: center; align-items: center;
}

/* LISTES */
.item-list {
    background: var(--bg-item); margin-bottom: 8px; padding: 10px 15px; 
    border-radius: 6px; display: flex; justify-content: space-between;
    align-items: center; border: 1px solid #222; cursor: pointer; transition: 0.2s;
}
.item-list:hover { background: var(--bg-light); }
.item-list.selected { background: var(--bg-selected); border-color: var(--red-main); }
.item-list.chant-bg-black { background: #080808; border-color: #2b2b2b; }
.item-list.chant-bg-image { background: #211d0c; border-color: #d6a900; color: #fff; }
.item-list.chant-bg-video { background: #24170f; border-color: #f97316; color: #fff; }
.item-list.chant-bg-black:hover { background: #141414; }
.item-list.chant-bg-image:hover { background: #30280d; }
.item-list.chant-bg-video:hover { background: #352010; }
.item-list.selected { border-color: var(--red-main) !important; box-shadow: inset 0 0 0 1px var(--red-main); }
.item-list.set-item-hidden {
    opacity: 0.58;
    border-style: dashed;
}
.item-list.set-item-hidden.selected {
    opacity: 0.72;
}
.item-list.dragging { opacity: 0.45; }
.item-list.draggable-chant { cursor: grab; }
.item-list.draggable-chant:active { cursor: grabbing; }
.admin-sortable-chosen {
    border-color: var(--red-main) !important;
    background: #2a2020 !important;
    box-shadow: 0 0 0 1px rgba(211, 47, 47, 0.7), 0 12px 26px rgba(0,0,0,0.35);
}
.admin-sortable-ghost {
    opacity: 0.35;
    background: rgba(211, 47, 47, 0.28) !important;
    border: 1px dashed var(--red-main) !important;
}
.admin-sortable-drag,
.admin-sortable-fallback {
    opacity: 0.96 !important;
    transform: scale(1.035);
    box-shadow: 0 16px 34px rgba(0,0,0,0.55), 0 0 0 1px var(--red-main);
}
.item-list span { font-size: 13px; font-weight: 600; pointer-events: none; }
.item-list .handle { display: none; }
.chant-info {
    display: flex !important;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.chant-info strong {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chant-info small {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
}
.search-hit {
    background: rgba(211, 47, 47, 0.26);
    color: #fff;
    border-radius: 3px;
    padding: 0 2px;
    box-shadow: inset 0 -1px 0 var(--red-main);
    animation: searchHitIn 140ms ease-out;
}
@keyframes searchHitIn {
    from {
        background: rgba(211, 47, 47, 0);
    }
    to {
        background: rgba(211, 47, 47, 0.26);
    }
}

.filter-bar { padding: 10px 15px; display: flex; gap: 10px; }
.filter-bar input, .filter-bar select {
    background: #1a1a1a; border: 1px solid #333; color: white;
    padding: 8px; border-radius: 4px; font-size: 12px;
}
.filter-bar input {
    flex: 2 1 0;
    min-width: 0;
}
.filter-bar select {
    flex: 1 1 0;
    min-width: 0;
}
.filter-bar select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 32px;
    background-image:
        linear-gradient(45deg, transparent 50%, #fff 50%),
        linear-gradient(135deg, #fff 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

/* COLONNE CENTRALE */
.panel-header-center {
    position: relative;
    padding: 15px 20px;
    border-bottom: 1px solid #222;
    flex-shrink: 0;
}
.preview-info-btn {
    position: absolute;
    right: 14px;
    top: 14px;
    margin-left: 0;
}
.preview-info-btn[hidden] {
    display: none;
}
#song-preview-panel.has-song .song-meta {
    padding-right: 38px;
}
.song-meta h1 { font-size: 20px; margin: 0; }
.song-meta p { color: var(--text-secondary); margin: 3px 0 10px 0; font-size: 12px; }
/* --- SWITCH COLONNE CENTRALE (FAÇADE/RETOUR) --- */
.view-toggle {
    display: flex;
    background: #1a1a1a;
    padding: 3px;
    border-radius: 6px;
    gap: 5px;
}

.view-toggle .btn-standard {
    background: #444; /* Gris par défaut (inactif) */
    color: #fff;
    border: none;
    flex: 1;
    transition: 0.2s;
}

.view-toggle .btn-standard.active {
    background: var(--red-main) !important; /* Rouge si actif */
}

.section-block { margin-bottom: 30px; width: 100%; }
.section-title {
    font-family: 'Poppins', sans-serif;
    color: var(--blue-section);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #222;
    padding-bottom: 5px;
}
.chant-bg-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 11px;
}
.chant-bg-legend span {
    white-space: nowrap;
}
.tone-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.tone-info[hidden] {
    display: none;
}
.tone-value {
    color: #fff;
    font-weight: 800;
}
.tone-transposed {
    color: var(--chord-color, #ffca28);
    background: color-mix(in srgb, var(--chord-color, #ffca28) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--chord-color, #ffca28) 35%, transparent);
    border-radius: 4px;
    padding: 0 5px;
}
.preview-tone-info {
    margin-left: 6px;
}
.legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 5px;
    border: 1px solid rgba(255,255,255,0.35);
    vertical-align: -1px;
}
.legend-dot.chant-bg-black { background: #080808; }
.legend-dot.chant-bg-image { background: #d6a900; }
.legend-dot.chant-bg-video { background: #f97316; }

/* GRILLE 2 COLONNES FIXE */
.slides-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Deux colonnes */
    gap: 20px; 
    width: 100%;
}
.slide-card { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.slide-label { font-size: 10px; color: #555; text-transform: uppercase; }
.ratio-169 {
   container-type: size; /* Indispensable pour le calcul cqw */
    width: 100%; 
    aspect-ratio: 16/9; 
    background: #000; 
    border: 1px solid #222;
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: 5% !important; /* Même padding que les flux */
    text-align: center; 
    position: relative; 
    cursor: pointer;
    box-sizing: border-box;
}
.ratio-169.display-preview-slide {
    overflow: hidden;
}
.ratio-169.has-bg-image {
    align-items: flex-end;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: 2.4% 3% !important;
}
.ratio-169.has-bg-image .slide-text {
    width: 96%;
    margin: 0 auto;
    background: rgba(0,0,0,0.84);
    border-radius: 1.2cqw;
    padding: 1.6% 2.2%;
    font-size: calc(4.2cqw * var(--image-slide-text-scale, 1));
    line-height: 1.05;
    box-sizing: border-box;
}
.ratio-169.has-bg-video {
    align-items: flex-end;
    justify-content: center;
    padding: 2.4% 3% !important;
    overflow: hidden;
}
.slide-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}
.ratio-169.has-bg-video .slide-text {
    position: relative;
    z-index: 1;
    width: 96%;
    margin: 0 auto;
    background: rgba(0,0,0,0.84);
    border-radius: 1.2cqw;
    padding: 1.6% 2.2%;
    font-size: calc(4.2cqw * var(--image-slide-text-scale, 1));
    line-height: 1.16;
    box-sizing: border-box;
}
.ratio-169.mode-facade.has-bg-image .slide-text,
.ratio-169.mode-facade.has-bg-video .slide-text {
    margin-bottom: 3.8cqh;
}
.chord { color: var(--chord-color, #ffca28); font-weight: 700; background: rgba(255,255,255,0.1); padding: 0 4px; border-radius: 2px; font-size: calc(0.9em * var(--chord-text-scale, 1)); }
.ratio-169 .chord {
    padding: 0 0.5cqw;
}
.slide-capo-indicator {
    position: absolute;
    top: 2.2cqw;
    right: 2.8cqw;
    z-index: 3;
    color: var(--chord-color, #ffca28);
    font-weight: 700;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    padding: 0.2cqw 0.7cqw;
    font-size: calc(2.1cqw * var(--chord-text-scale, 1));
    line-height: 1.1;
}
.slide-capo-indicator.is-large {
    font-size: calc(3.2cqw * var(--chord-text-scale, 1));
    padding: 0.28cqw 0.9cqw;
}
.slide-facade-footer {
    position: absolute;
    left: 4cqw;
    right: 4cqw;
    bottom: 2.2cqh;
    z-index: 3;
    color: rgba(255,255,255,0.78);
    font-size: 1.35cqw;
    line-height: 1.2;
    text-align: center;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.75);
    pointer-events: none;
}
.editor-view-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
        border-radius: 4px;
    overflow: hidden;
    border: 1px solid #333;
    justify-content: center;
}
.editor-view-toggle .btn-standard {
    flex: 1;
    border-radius: 0;
    background: #444; /* Gris par défaut (inactif) */
    border: none;
}
.editor-view-toggle .btn-standard.active {
    background: var(--red-main) !important; /* Rouge si actif */
    color: white;
}

/* Alignement des boutons poubelle/crayon dans la liste */
.item-list div {
    display: flex;
    align-items: center;
    gap: 6px;
}
.item-list .btn-circle-small {
    margin-left: 0;
}
.editor-view-toggle .btn-standard:first-child { border-radius: 4px 0 0 4px; }
.editor-view-toggle .btn-standard:last-child { border-radius: 0 4px 4px 0; }
/* COLONNE DROITE */
.no-scroll { overflow: hidden; }
.flux{ display: flex; gap: 20px; align-items: center; justify-content: center; margin-bottom: 10px; }
.screen-preview { width: 100%; max-width: 80%; aspect-ratio: 16/9; background: #000; border: 2px solid var(--red-main); border-radius: 4px; }
.live-commands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; width: 100%; }
.btn-black { background: #000; color: white; border: 1px solid #333; padding: 12px; font-weight: 700; cursor: pointer; }
.btn-logo { background: white; color: black; border: none; padding: 12px; font-weight: 700; cursor: pointer; }

/* MODALES */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 9999; align-items: center; justify-content: center;
}
.admin-embed {
    background: transparent;
    overflow: hidden;
}
.admin-embed > .main-header,
.admin-embed > .admin-grid,
.admin-embed > .powered-by {
    display: none !important;
}
.admin-embed #modal-chant {
    background: transparent;
}
.admin-embed #modal-chant .modal-content {
    box-shadow: 0 24px 80px rgba(0,0,0,0.58);
}
#modal-set-section-preview {
    z-index: 10001;
}
.modal-content {
    background: var(--bg-panel); padding: 25px; border-radius: 8px;
    width: 90%; max-width: 700px; border: 1px solid #333;
}
.modal-content-full {
    width: min(1180px, calc(100vw - 28px));
    max-width: none;
    height: min(900px, calc(100vh - 24px));
    max-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.archive-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.archive-modal-header h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1;
}
.set-archive-container {
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 6px;
}
.set-archive-year {
    margin-bottom: 24px;
}
.set-archive-year h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 22px;
}
.set-archive-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.set-archive-item small,
.empty-state {
    color: #aaa;
}
#modal-chant .modal-content {
    width: min(1180px, calc(100vw - 28px));
    max-width: none;
    height: min(940px, calc(100vh - 12px));
    max-height: calc(100vh - 12px);
    display: grid;
    grid-template-rows: auto auto auto auto minmax(360px, 1fr) auto;
    gap: 8px;
    padding: 14px;
    overflow: hidden;
    background: #101010;
    border-color: #2b2b2b;
}
#modal-chant .modal-content.chant-frame-black,
#song-preview-panel.chant-frame-black {
    border-color: #3a3a3a;
}
#modal-chant .modal-content.chant-frame-image,
#song-preview-panel.chant-frame-image {
    border-color: #d6a900;
    box-shadow: 0 0 0 1px rgba(214,169,0,0.25);
}
#modal-chant .modal-content.chant-frame-video,
#song-preview-panel.chant-frame-video {
    border-color: #f97316;
    box-shadow: 0 0 0 1px rgba(249,115,22,0.28);
}
#modal-chant .chant-modal-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}
#modal-chant .modal-content h2 {
    margin: 0;
    font-size: 16px;
    color: #fff;
}
.chant-version-info {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 4px;
    border: 1px solid #303030;
    border-radius: 7px;
}
.chant-version-info.chant-frame-image {
    border-color: #d6a900;
    box-shadow: 0 0 0 1px rgba(214,169,0,0.25);
}
.chant-version-info.chant-frame-video {
    border-color: #f97316;
    box-shadow: 0 0 0 1px rgba(249,115,22,0.28);
}
#modal-chant .chant-version-info input {
    width: min(280px, 34vw);
    padding: 8px 10px;
    font-weight: 800;
    color: #fff;
}
#modal-chant .chant-version-info input:disabled {
    opacity: 0.72;
    color: #bdbdbd;
}
.chant-version-tabs {
    flex: 1 1 0;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 6px;
    border: 1px solid #303030;
    background: #151515;
    border-radius: 6px;
}
.chant-version-tab,
.chant-version-add {
    flex: 0 0 auto;
    border: 1px solid #333;
    background: #3d3d3d;
    color: #fff;
    border-radius: 5px;
    padding: 8px 11px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.chant-version-tab.active {
    background: var(--red-main);
    border-color: var(--red-main);
}
.chant-version-tab.complete {
    order: -2;
}
.chant-version-add {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 18px;
}
.chant-page-version-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    margin: 14px 0;
    padding: 8px;
    border: 1px solid #303030;
    background: #151515;
    border-radius: 6px;
}
.chant-version-panel[hidden] {
    display: none !important;
}
#modal-chant .chant-main-fields {
    display: grid;
    grid-template-columns: 1.25fr 1fr 0.75fr;
    gap: 8px;
    align-items: end;
}
#modal-chant .modal-content input,
#modal-chant .modal-content select {
    margin-bottom: 0;
    background: #171717;
    border-color: #303030;
    padding: 10px 11px;
}
#modal-chant .transpose-editor {
    margin-bottom: 0;
    padding: 7px 9px;
    background: #151515;
}
#modal-chant .editor-view-toggle {
    display: none;
}
#modal-chant .editor-view-toggle .btn-standard {
    padding: 9px 12px;
}
#modal-chant .editor-toolbar {
    margin-bottom: 0;
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(230px, 0.85fr) minmax(0, 2.15fr);
}
#modal-chant .editor-toolbar > select {
    min-width: 0;
    padding: 9px 12px;
}
#modal-chant .modal-actions {
    margin-top: 0;
    align-items: center;
    display: flex;
    width: 100%;
}
.modal-actions-spacer {
    flex: 0 0 0;
    display: none;
}
.chant-background-manage-btn {
    flex: 0 0 auto;
}
#modal-chant-background {
    z-index: 10003;
}
.chant-background-modal {
    width: min(980px, calc(100vw - 28px));
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #101010;
    border-color: #2b2b2b;
}
.chant-background-modal h2 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}
.background-preview-wrap {
    width: min(680px, 100%);
    margin: 0 auto;
}
.chant-background-preview {
    cursor: default;
}
.chant-background-preview .slide-text {
    font-size: clamp(18px, 4.2cqw, 36px);
    line-height: 1.12;
}
.chant-background-preview strong {
    color: var(--chord-color, #ffca28);
}
.chant-background-modal .modal-actions {
    margin-top: 2px;
}
.set-chant-override-modal h2 {
    margin-bottom: 4px;
    font-size: 26px;
    line-height: 1.15;
}
.set-chant-override-author {
    margin: 0 0 18px;
    color: #b8b8b8;
    font-weight: 700;
}
.set-chant-section-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(55vh, 520px);
    overflow-y: auto;
    padding-right: 4px;
}
.set-chant-version-modal {
    position: relative;
}
.set-version-close {
    position: absolute;
    top: 12px;
    right: 12px;
}
.set-version-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(55vh, 420px);
    overflow-y: auto;
}
.set-version-choice {
    width: 100%;
    text-align: left;
    border: 1px solid #333;
    background: #242424;
    color: #fff;
    border-radius: 6px;
    padding: 12px 14px;
    font-weight: 800;
    cursor: pointer;
}
.set-version-choice.active {
    background: var(--red-main);
    border-color: var(--red-main);
}
.set-version-pill {
    margin-left: 8px;
    color: #bdbdbd;
    font-size: 12px;
    font-weight: 800;
}
.chant-set-date {
    margin-left: 10px;
    color: #b8b8b8;
    font-size: 13px;
    font-weight: 800;
}
.chant-set-versions {
    margin-left: auto;
    text-align: right;
    color: #d7e7ff;
    font-size: 14px;
    font-weight: 800;
}
.set-chant-section-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px 34px;
    align-items: center;
    min-height: 46px;
    padding: 6px 8px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #171717;
}
.set-chant-section-row.is-hidden {
    opacity: 0.52;
}
.set-chant-section-handle {
    cursor: grab;
    color: #b8b8b8;
    font-size: 18px;
    text-align: center;
    user-select: none;
}
.set-chant-section-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #4f7cff;
    font-weight: 900;
    text-transform: uppercase;
}
.set-chant-eye {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.set-chant-eye::before {
    content: "";
    width: 17px;
    height: 17px;
    background: #fff;
    display: block;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 5c5 0 8.7 4.5 10 7-1.3 2.5-5 7-10 7S3.3 14.5 2 12c1.3-2.5 5-7 10-7Zm0 2.5c-3.2 0-6 2.4-7.2 4.5 1.2 2.1 4 4.5 7.2 4.5s6-2.4 7.2-4.5c-1.2-2.1-4-4.5-7.2-4.5Zm0 1.5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 5c5 0 8.7 4.5 10 7-1.3 2.5-5 7-10 7S3.3 14.5 2 12c1.3-2.5 5-7 10-7Zm0 2.5c-3.2 0-6 2.4-7.2 4.5 1.2 2.1 4 4.5 7.2 4.5s6-2.4 7.2-4.5c-1.2-2.1-4-4.5-7.2-4.5Zm0 1.5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E");
}
.set-chant-section-row.is-hidden .set-chant-eye::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m3.3 2 18.7 18.7-1.3 1.3-3.1-3.1A10.4 10.4 0 0 1 12 20C7 20 3.3 15.5 2 13c.7-1.4 2.2-3.3 4.2-4.8L2 3.3 3.3 2Zm5 8.4A3 3 0 0 0 12 16a3 3 0 0 0 1.6-.5l-5.3-5.1ZM12 6c5 0 8.7 4.5 10 7a14 14 0 0 1-2.7 3.5l-2.1-2.1A3 3 0 0 0 13 10.1L10.7 7.8c.4-.1.9-.1 1.3-.1Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m3.3 2 18.7 18.7-1.3 1.3-3.1-3.1A10.4 10.4 0 0 1 12 20C7 20 3.3 15.5 2 13c.7-1.4 2.2-3.3 4.2-4.8L2 3.3 3.3 2Zm5 8.4A3 3 0 0 0 12 16a3 3 0 0 0 1.6-.5l-5.3-5.1ZM12 6c5 0 8.7 4.5 10 7a14 14 0 0 1-2.7 3.5l-2.1-2.1A3 3 0 0 0 13 10.1L10.7 7.8c.4-.1.9-.1 1.3-.1Z'/%3E%3C/svg%3E");
}
.set-chant-eye:hover {
    background: var(--red-main);
}
.set-chant-preview {
    margin-left: 0;
}
.set-chant-empty {
    padding: 18px;
    border: 1px dashed #444;
    border-radius: 6px;
    color: #aaa;
    text-align: center;
    font-weight: 700;
}
.set-section-preview-modal {
    position: relative;
    width: min(1180px, calc(100vw - 36px));
    max-width: none;
    max-height: calc(100vh - 36px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}
.set-section-preview-modal h2 {
    margin: 0;
    padding-right: 42px;
    color: #fff;
    font-size: 28px;
    line-height: 1.12;
    text-transform: uppercase;
}
.set-section-preview-close {
    position: absolute;
    top: 14px;
    right: 14px;
    margin-left: 0;
}
.set-section-preview-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}
.set-section-preview-pane h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
}
.set-section-preview-grid {
    display: grid;
    gap: 12px;
}
.set-section-preview-grid .slide-card {
    width: 100%;
}
.modal-content input, .modal-content select, .modal-content textarea {
        appearance: none; /* Enlève les styles par défaut des navigateurs */

    width: 100%; background: #1a1a1a; border: 1px solid #333; color: white;
    padding: 12px; margin-bottom: 12px; border-radius: 4px; font-family: inherit;
}
.transpose-editor { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; background: #1a1a1a; padding: 10px; border-radius: 4px; margin-bottom: 12px; border: 1px solid #333; }
.chant-bg-field {
    display: grid;
    grid-template-columns: 112px 190px minmax(160px, 1fr) 96px;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    background: #151515;
    border: 1px solid #2c2c2c;
    border-radius: 6px;
    padding: 8px;
}
.chant-video-field {
    grid-template-columns: 112px 190px minmax(150px, 1fr) minmax(315px, max-content) 96px;
}
.chant-bg-field > span:first-child {
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
}
.chant-bg-field input {
    margin-bottom: 0;
}
.chant-bg-field input[type="file"] {
    min-width: 0;
    width: 190px;
    max-width: 100%;
    padding: 6px 14px;
    box-sizing: border-box;
    color: transparent;
    cursor: pointer;
}
.chant-bg-field input[type="file"]::file-selector-button,
.chant-bg-field input[type="file"]::-webkit-file-upload-button {
    margin: 0;
    padding: 7px 12px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #333;
    border-radius: 5px;
    background: #242424;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}
.chant-bg-field span {
    color: #fff;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chant-bg-field .btn-standard {
    padding: 8px 9px;
    font-size: 10px;
    width: 96px;
    min-width: 96px;
}
.chant-video-options {
    display: grid;
    grid-template-columns: max-content max-content 72px;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    min-width: 0;
}
.chant-video-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    white-space: nowrap;
}
.chant-video-options input[type="radio"] {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    width: 14px !important;
    height: 14px;
    margin: 0 !important;
    accent-color: var(--red-main);
}
.chant-video-options input[type="number"] {
    margin-bottom: 0 !important;
    padding: 7px !important;
    min-width: 0;
}
.chant-video-options input[type="number"]:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}
.editor-tool-item { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-secondary); }
.editor-tool-item span { font-weight: 700; color: var(--red-main); min-width: 15px; text-align: center; font-size: 14px; }
.editor-tone-info {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}
.editor-tone-info .tone-original {
    color: #fff;
}
.editor-tone-info .tone-transposed {
    font-size: 13px;
}
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.editor-toolbar > select {
    margin-bottom: 0;
}
.dual-song-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
    border: 1px solid #2d2d2d;
    border-radius: 6px;
    background: #0d0d0d;
}
.editor-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}
.editor-pane + .editor-pane {
    border-left: 2px solid var(--red-main);
    box-shadow: -8px 0 18px color-mix(in srgb, var(--red-main) 22%, transparent);
}
.editor-pane h3 {
    margin: 0;
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}
.editor-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    min-height: 44px;
    padding: 6px 10px;
    background: #151515;
    border-bottom: 1px solid #2d2d2d;
    box-sizing: border-box;
}
.editor-info-btn {
    flex: 0 0 auto;
    margin-left: 10px;
}
.editor-pane-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}
.editor-pane-tools .btn-circle-small {
    margin-left: 0;
}
.desktop-remote-editor[hidden] {
    display: none;
}
.desktop-remote-editor {
    position: fixed;
    inset: 0;
    z-index: 10005;
    background: #000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}
.desktop-edit-stage {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: 74px 52px 48px minmax(0, 1fr);
    background: var(--bg-deep);
    color: #fff;
}
.desktop-edit-header {
    display: grid;
    grid-template-columns: 64px 96px minmax(0, 1fr) 96px;
    align-items: center;
    gap: 14px;
    min-height: 0;
    padding: 0 18px;
    background: var(--bg-panel);
    border-bottom: 1px solid #2a2a2a;
}
.desktop-edit-close,
.desktop-edit-arrow {
    border: 1px solid #333;
    background: #1c1c1c;
    color: #fff;
    position: relative;
    cursor: pointer;
    transition: 0.16s ease;
}
.desktop-edit-close:hover,
.desktop-edit-arrow:hover {
    background: var(--red-main);
    border-color: var(--red-main);
}
.desktop-edit-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}
.desktop-edit-close::before,
.desktop-edit-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52%;
    height: 3px;
    border-radius: 99px;
    background: #fff;
    transform-origin: center;
}
.desktop-edit-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.desktop-edit-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.desktop-edit-arrow {
    justify-self: stretch;
    width: auto;
    height: 44px;
    border-radius: 6px;
}
.desktop-edit-arrow::before {
    content: "";
    position: absolute;
    inset: 10px 18px;
    background: #fff;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 90' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M45 4 4 45l41 41 9-9-26-26h88V39H28l26-26-9-9Z'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 90' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M45 4 4 45l41 41 9-9-26-26h88V39H28l26-26-9-9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.desktop-edit-next::before {
    transform: scaleX(-1);
}
.desktop-edit-title-stack {
    min-width: 0;
    text-align: center;
    display: grid;
    grid-template-rows: 16px 30px 16px;
    align-items: center;
}
.desktop-edit-title-stack h2 {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-family: 'Heavitas', 'Poppins', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: clamp(19px, 2.2vw, 34px);
    line-height: 1;
}
.desktop-edit-neighbor {
    min-height: 16px;
    color: var(--text-secondary);
    font-size: clamp(10px, 0.85vw, 13px);
    font-weight: 600;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.desktop-edit-sections {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    background: #171717;
    border-bottom: 1px solid #2a2a2a;
    scrollbar-width: none;
}
.desktop-edit-sections::-webkit-scrollbar { display: none; }
.desktop-edit-section {
    flex: 0 0 auto;
    min-width: 138px;
    max-width: 240px;
    border: 0;
    border-right: 1px solid #2e2e2e;
    background: #202020;
    color: #fff;
    padding: 0 18px;
    font-family: 'Heavitas', 'Poppins', sans-serif;
    font-size: clamp(13px, 1.25vw, 20px);
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.desktop-edit-section.active {
    background: var(--red-main);
}
.desktop-edit-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 18px;
    background: #242424;
    border-bottom: 1px solid #333;
    scrollbar-width: none;
}
.desktop-edit-toolbar::-webkit-scrollbar { display: none; }
.desktop-edit-toolbar .color-palette {
    display: flex;
    gap: 8px;
}
.desktop-edit-toolbar .color-dot {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}
.desktop-font-control,
.desktop-align-control {
    display: inline-flex;
    align-items: center;
    height: 36px;
    border: 1px solid #333;
    border-radius: 7px;
    background: #101010;
    flex: 0 0 auto;
}
.desktop-font-control {
    overflow: visible;
}
.desktop-align-control {
    overflow: hidden;
}
.desktop-font-control .style-tool-btn,
.desktop-align-control .style-tool-btn {
    border: 0;
    border-radius: 0;
    background: transparent;
}
.desktop-font-control .style-tool-btn:hover,
.desktop-align-control .style-tool-btn:hover {
    background: var(--red-main);
    box-shadow: none;
}
.desktop-size-combo {
    position: relative;
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    flex: 0 0 70px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    background: #151515;
}
.desktop-size-combo:has(.desktop-font-size-input.mixed) {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    flex-basis: 88px;
}
.desktop-font-size-input {
    width: 30px;
    min-width: 30px;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    padding: 0;
}
.desktop-font-size-input.mixed {
    width: 62px;
    min-width: 62px;
    text-align: center;
}
.desktop-font-size-input.mixed + .desktop-font-size-unit {
    display: none;
}
.desktop-font-size-input.invalid {
    color: #ff7d7d;
}
.desktop-font-size-input::selection {
    background: color-mix(in srgb, var(--red-main) 65%, transparent);
}
.desktop-font-size-unit {
    color: #a7a7a7;
    font-size: 11px;
    font-weight: 800;
    padding-right: 8px;
    pointer-events: none;
}
.desktop-font-size-menu {
    position: fixed;
    z-index: 20000;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    background: #151515;
    box-shadow: 0 16px 42px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
    scrollbar-width: thin;
}
.desktop-font-size-menu[hidden] {
    display: none;
}
.desktop-font-size-option {
    width: 100%;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    padding: 0 10px;
    text-align: left;
}
.desktop-font-size-option:hover,
.desktop-font-size-option:focus {
    background: #282828;
    outline: 0;
}
.desktop-font-size-option.active {
    background: var(--red-main);
    color: #fff;
}
.desktop-font-size-option.active::after {
    content: "";
    width: 7px;
    height: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    flex: 0 0 auto;
}
.desktop-size-btn,
.desktop-align-btn {
    font-size: 15px;
}
.desktop-align-btn {
    position: relative;
    font-size: 0;
}
.desktop-align-btn::before {
    content: "";
    width: 18px;
    height: 18px;
    display: block;
    margin: auto;
    background: #fff;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}
.desktop-align-btn.icon-align-left::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 10h10M4 14h16M4 18h10'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 10h10M4 14h16M4 18h10'/%3E%3C/g%3E%3C/svg%3E");
}
.desktop-align-btn.icon-align-center::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 6h16M7 10h10M4 14h16M7 18h10'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 6h16M7 10h10M4 14h16M7 18h10'/%3E%3C/g%3E%3C/svg%3E");
}
.desktop-align-btn.icon-align-right::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 6h16M10 10h10M4 14h16M10 18h10'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M4 6h16M10 10h10M4 14h16M10 18h10'/%3E%3C/g%3E%3C/svg%3E");
}
.desktop-edit-content {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
    background: #070707;
}
.desktop-slide-editor,
.desktop-edit-retour-preview {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}
.desktop-slide-editor.rich-song-editor {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #000;
    color: #fff;
    padding: 8px;
    font-size: clamp(24px, 3.2vw, 60px);
    font-weight: 500;
    line-height: 1.05;
    white-space: pre-wrap;
    display: block;
    align-items: initial;
    justify-content: initial;
    word-break: break-word;
    overflow-wrap: anywhere;
    resize: none;
    outline: none;
}
.desktop-editor-line {
    width: 100%;
    min-height: 1.05em;
    max-width: 100%;
    flex: 0 0 auto;
    overflow-wrap: anywhere;
    line-height: 1.05;
}
.desktop-slide-editor:focus {
    border: 0;
    box-shadow: inset 0 0 0 4px var(--red-main);
}
.desktop-slide-editor:empty::before {
    content: none;
}
.desktop-edit-retour-preview {
    background: #000;
    padding: 0;
}
.desktop-edit-retour-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}
.rich-song-editor .editor-line {
    min-height: 22px;
    padding: 2px 9px;
    outline: none;
}
.rich-song-editor .editor-line.slide-even {
    background: #202020;
}
.rich-song-editor .editor-line.slide-odd {
    background: #171717;
}
.rich-song-editor .editor-line.section-line {
    color: var(--blue-section);
    font-weight: 700;
    text-transform: uppercase;
}
.rich-song-editor .editor-line.slide-separator {
    min-height: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rich-song-editor .editor-line.virtual-empty-slide {
    opacity: 0.92;
    cursor: default;
}
.rich-song-editor .editor-line.virtual-empty-row {
    color: inherit;
}
.style-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    background: #151515;
    border: 1px solid #2f2f2f;
    border-radius: 6px;
    padding: 5px;
    flex: 1;
    min-width: 0;
}
.style-tool-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #202020;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
.style-tool-btn.slide-tool-btn {
    width: auto;
    min-width: 68px;
    padding: 0 9px;
    font-size: 12px;
}
.style-tool-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}
.style-tool-btn:disabled:hover,
.style-tool-btn:disabled:focus {
    border-color: #333;
    box-shadow: none;
    background: #202020;
}
.style-tool-btn:hover,
.style-tool-btn:focus {
    border-color: var(--red-main);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--red-main) 20%, transparent);
}
.style-tool-btn.active {
    background: var(--red-main);
    border-color: var(--red-main);
    color: #fff;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.12);
}
.style-tool-btn.mixed {
    background: #202020;
    border-color: #333;
    box-shadow: none;
}
.style-tool-btn.italic {
    font-style: italic;
    font-family: Georgia, serif;
}
.style-tool-btn.chord-detect-btn,
.style-tool-btn.chord-clear-btn {
    color: #ffff00;
    border-color: #777700;
    background: #222;
    font-weight: 900;
    box-shadow: inset 0 0 0 2px rgba(255,255,0,0.08);
}
.style-tool-btn.accidental-toggle-btn {
    color: #fff;
    border-color: var(--red-main);
    background: #2a1717;
}
.style-tool-btn.accidental-toggle-btn.flat {
    background: #182232;
    border-color: #38bdf8;
}
.style-tool-btn.chord-detect-btn {
    background: #2b2b00;
}
.style-tool-btn.chord-clear-btn {
    color: #d6d6d6;
    border-color: #6b6b6b;
    background: #282828;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.05);
}
.style-tool-btn.chord-detect-btn:hover,
.style-tool-btn.chord-detect-btn:focus {
    border-color: #ffff00;
    box-shadow: 0 0 0 3px rgba(255,255,0,0.18);
}
.style-tool-btn.chord-clear-btn:hover,
.style-tool-btn.chord-clear-btn:focus {
    border-color: #e5e5e5;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.14);
}
.color-palette {
    display: grid;
    grid-template-columns: repeat(12, 18px);
    gap: 7px;
    align-items: center;
    min-width: 0;
    padding: 0 2px;
}
.color-dot {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 50%;
    background: var(--dot-color);
    cursor: pointer;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.18);
}
.color-dot:hover,
.color-dot:focus {
    transform: translateY(-1px);
    border-color: white;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-color) 30%, transparent);
}
.color-dot.active {
    border-color: #fff;
    box-shadow:
        0 0 0 2px #151515,
        0 0 0 4px rgba(255,255,255,0.78),
        inset 0 0 0 2px rgba(0,0,0,0.18);
}
.color-dot.mixed {
    border-color: rgba(255,255,255,0.28);
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.18);
}
textarea#chant-contenu.rich-editor-source {
    display: none;
}
.rich-song-editor {
    width: 100%;
    height: 100%;
    min-height: 300px;
    overflow-y: auto;
    background: #0b0b0b;
    border: 1px solid #333;
    color: white;
    padding: 0;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
}
.rich-song-editor:focus {
    border-color: var(--red-main);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--red-main) 20%, transparent);
}
.rich-song-editor[data-structure-locked="1"] {
    cursor: default;
}
.rich-song-editor[data-structure-locked="1"]:focus {
    border-color: #333;
    box-shadow: none;
}
.rich-song-editor:empty::before {
    content: attr(data-placeholder);
    color: #777;
}
.rich-song-editor strong {
    font-weight: 800;
}
.rich-song-editor em {
    font-style: italic;
}
.editor-chord {
    display: inline-block;
    color: var(--chord-color);
    font-weight: 800;
    background: color-mix(in srgb, var(--chord-color) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--chord-color) 35%, transparent);
    border-radius: 4px;
    padding: 0 4px;
    margin: 0 1px;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 15px; }
.retour-info-modal {
    position: relative;
    width: fit-content;
    max-width: calc(100vw - 64px);
    padding: 0;
    background: transparent;
    overflow: hidden;
}
.retour-info-modal img {
    display: block;
    width: auto;
    max-width: min(980px, calc(100vw - 64px));
    max-height: calc(100vh - 96px);
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}
.retour-info-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    margin-left: 0;
    background: rgba(0,0,0,0.72);
    border: 1px solid rgba(255,255,255,0.2);
}
.video-upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.82);
    backdrop-filter: blur(8px);
}
.video-upload-overlay.show {
    display: flex;
}
.video-upload-card {
    width: min(420px, calc(100vw - 32px));
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}
.video-upload-logo {
    max-width: 220px;
    max-height: 76px;
    object-fit: contain;
    margin-bottom: 16px;
}
.video-upload-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
}
.video-upload-card p {
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: 13px;
}
.video-upload-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #242424;
    border: 1px solid #333;
    margin-bottom: 12px;
}
.video-upload-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--red-main);
    transition: width 160ms ease;
}
.video-upload-card strong {
    color: #fff;
    font-size: 13px;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
/* BORDURE LIVE ROUGE */
.slide-live {
    border: 3px solid var(--red-main) !important;
    box-shadow: 0 0 15px color-mix(in srgb, var(--red-main) 52%, transparent);
}
.live-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligne vers le haut */
    padding: 10px;
    gap: 20px; /* Espace entre les deux moniteurs */
}

.monitor-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screen-preview-iframe {
    width: 80%;
    aspect-ratio: 16 / 9;
    border: 2px solid var(--red-main);
    box-shadow: 0 0 15px color-mix(in srgb, var(--red-main) 52%, transparent);
    border-radius: 4px;
    background: black;
    pointer-events: none; /* Empêche les clics/scrolls dans l'iframe */
}

.monitor-title {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 400;
}
.slide-text {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    font-weight: 400; /* Poppins Regular */
    line-height: 1.2;
    font-size: calc(7cqw * var(--display-text-scale, 1));
}
.slide-text strong {
    font-weight: 700; /* Poppins Bold */
}
/* Force le rouge quand les boutons live sont actifs */
#admin-btn-noir.active, #admin-btn-logo.active {
    background: var(--red-main) !important;
    color: white !important;
}

.settings-page {
    flex: 1 1 auto;
    min-height: 0;
    padding: 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025), transparent 220px),
        var(--bg-deep);
}
.settings-body .powered-by-footer {
    flex: 0 0 34px;
}
.settings-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    margin-bottom: 18px;
    width: min(900px, 100%);
    background: #0f0f0f;
    border: 1px solid #242424;
    border-radius: 10px;
    box-shadow: 0 14px 45px rgba(0,0,0,0.22);
}
.settings-tab {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 7px;
    padding: 13px 18px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.2s ease;
}
.settings-tab:hover { color: #fff; background: #1a1a1a; }
.settings-tab.active {
    background: var(--red-main);
    color: #fff;
    box-shadow: 0 0 18px color-mix(in srgb, var(--red-main) 36%, transparent);
}
.settings-panel { display: none; }
.settings-panel.active {
    display: block;
    width: min(900px, 100%);
}
.settings-section {
    width: 100%;
    background: linear-gradient(180deg, #141414, #101010);
    border: 1px solid #282828;
    border-radius: 12px;
    padding: 26px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.3);
}
.settings-section h1 {
    margin: 0 0 20px;
    font-size: 24px;
    letter-spacing: 0;
}
.offline-card {
    display: grid;
    gap: 16px;
}
.settings-toggle {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #2b2b2b;
    border-radius: 8px;
    background: #151515;
}
.settings-toggle input {
    width: 20px !important;
    height: 20px;
    margin: 0 !important;
    accent-color: var(--red-main);
}
.offline-status {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}
.settings-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.settings-form label {
    display: grid;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}
.settings-form input,
.settings-form select {
    width: 100%;
    background: #171717;
    border: 1px solid #303030;
    color: #fff;
    border-radius: 7px;
    padding: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.settings-form select {
    min-height: 66px;
    align-self: center;
}
.file-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}
.file-name {
    max-width: 220px;
    color: #fff;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.settings-form input:focus,
.settings-form select:focus {
    border-color: var(--red-main);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--red-main) 22%, transparent);
}
.settings-form input[type="color"] { height: 46px; padding: 4px; }
.settings-actions { margin-bottom: 18px; }
.install-actions { margin-top: 18px; }
.settings-link { display: inline-flex; text-decoration: none; }
.settings-warning, .login-error {
    color: var(--red-main);
    font-size: 12px;
    grid-column: 1 / -1;
}
.settings-form .btn-standard { grid-column: 1 / -1; justify-self: center; min-width: 220px; }
.settings-logout { display: inline-block; margin-top: 18px; color: var(--text-secondary); }
.settings-message {
    position: fixed; right: 18px; bottom: 18px; background: #222; border: 1px solid #333;
    color: #fff; border-radius: 6px; padding: 12px 14px; opacity: 0;
    transform: translateY(8px); pointer-events: none; transition: 0.2s;
}
.settings-message.show { opacity: 1; transform: translateY(0); }
.settings-message.error { border-color: var(--red-main); }
.dashboard-icon::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'/%3E%3C/svg%3E") !important;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'/%3E%3C/svg%3E") !important;
}
.back-icon::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M15 6 9 12l6 6M10 12h10'/%3E%3C/svg%3E") !important;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M15 6 9 12l6 6M10 12h10'/%3E%3C/svg%3E") !important;
}
.login-page {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    background: #050505;
}
.powered-by {
    color: rgba(255,255,255,0.62);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-align: center;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
}
.powered-by a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--red-main) 70%, transparent);
}
.powered-by a:hover {
    color: var(--red-main);
}
.powered-by-floating {
    position: fixed;
    left: 50%;
    bottom: 42px;
    z-index: 3;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 40px);
}
.powered-by-footer {
    flex: 0 0 34px;
    min-height: 34px;
    background: #000;
    border-top: 1px solid #151515;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-background,
.login-background-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.login-background {
    z-index: 0;
    object-fit: cover;
    object-position: center;
}
.login-background-overlay {
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58)),
        rgba(0, 0, 0, 0.52);
}
.login-shell {
    position: relative;
    z-index: 2;
    width: min(420px, calc(100vw - 30px));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: rgba(18, 18, 18, 0.78); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
    padding: 26px; display: grid; gap: 14px;
    width: 100%;
    backdrop-filter: blur(16px);
    box-shadow: 0 0 48px color-mix(in srgb, var(--red-main) 16%, transparent), 0 24px 70px rgba(0,0,0,0.45);
}
.login-logo { max-height: 44px; justify-self: center; }
.login-card h1 { text-align: center; margin: 0; }
.login-card h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 22px;
    text-transform: none;
    letter-spacing: 0;
}
.login-card input {
    background: #1a1a1a; border: 1px solid #333; color: #fff;
    border-radius: 5px; padding: 12px;
}
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}
.password-field input {
    width: 100%;
    padding-right: 46px;
}
.password-toggle {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}
.password-toggle::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    margin: 7px auto;
    background: var(--text-secondary);
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 5c5.2 0 8.5 4.4 9.6 6.1.35.55.35 1.25 0 1.8C20.5 14.6 17.2 19 12 19s-8.5-4.4-9.6-6.1a1.7 1.7 0 0 1 0-1.8C3.5 9.4 6.8 5 12 5Zm0 2c-4.1 0-6.8 3.5-7.8 5 1 1.5 3.7 5 7.8 5s6.8-3.5 7.8-5c-1-1.5-3.7-5-7.8-5Zm0 2.2a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 5c5.2 0 8.5 4.4 9.6 6.1.35.55.35 1.25 0 1.8C20.5 14.6 17.2 19 12 19s-8.5-4.4-9.6-6.1a1.7 1.7 0 0 1 0-1.8C3.5 9.4 6.8 5 12 5Zm0 2c-4.1 0-6.8 3.5-7.8 5 1 1.5 3.7 5 7.8 5s6.8-3.5 7.8-5c-1-1.5-3.7-5-7.8-5Zm0 2.2a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.password-toggle:hover::before,
.password-toggle.is-visible::before {
    background: var(--red-main);
}

.set-page-body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    padding-bottom: 34px;
}
.set-page-body .powered-by-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
}
.set-close-icon::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") !important;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") !important;
}
.set-edit-icon::before {
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 17.5V21h3.5L18.1 10.4l-3.5-3.5L4 17.5ZM20.7 7.8a1 1 0 0 0 0-1.4l-3.1-3.1a1 1 0 0 0-1.4 0l-1.4 1.4 4.5 4.5 1.4-1.4Z'/%3E%3C/svg%3E") !important;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M4 17.5V21h3.5L18.1 10.4l-3.5-3.5L4 17.5ZM20.7 7.8a1 1 0 0 0 0-1.4l-3.1-3.1a1 1 0 0 0-1.4 0l-1.4 1.4 4.5 4.5 1.4-1.4Z'/%3E%3C/svg%3E") !important;
}
.set-detail-page {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 34px 0 60px;
}
.set-hero-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
}
.set-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 54px);
    letter-spacing: 0;
}
.set-copy-url {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid #333;
    background: #1c1c1c;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.set-copy-url::before {
    content: "";
    width: 20px;
    height: 20px;
    background: #fff;
    display: block;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.set-copy-feedback {
    opacity: 0;
    transform: translateX(-4px);
    color: #fff;
    background: #222;
    border: 1px solid #333;
    border-radius: 999px;
    padding: 8px 11px;
    font-size: 12px;
    pointer-events: none;
    transition: 0.18s;
    white-space: nowrap;
    flex: 0 0 auto;
}
.set-copy-feedback.show {
    opacity: 1;
    transform: translateX(0);
}
.set-meta-grid,
.set-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.set-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}
.set-meta-grid article,
.set-stats-grid article {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
}
.set-meta-grid span,
.set-stats-grid span {
    display: block;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
}
.set-meta-grid strong,
.set-stats-grid strong {
    font-size: 20px;
}
.chant-page-author {
    margin: -12px 0 20px;
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 800;
}
.chant-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}
.chant-sets-panel {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    margin: 16px 0;
    overflow: hidden;
}
.chant-sets-panel summary {
    cursor: pointer;
    padding: 14px 16px;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
}
.chant-sets-panel summary span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    margin-left: 8px;
    border-radius: 999px;
    background: #333;
    font-size: 12px;
}
.chant-sets-panel .set-song-list {
    padding: 0 12px 12px;
}
.chant-sets-panel .set-song-row {
    grid-template-columns: minmax(0, 1fr) auto;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}
.chant-sets-panel .set-song-row:visited {
    color: #fff;
}
.chant-sets-panel .set-song-row strong {
    min-width: 0;
}
.chant-sets-panel .set-song-row small {
    text-align: right;
}
.chant-sets-panel .set-song-row.chant-set-empty {
    display: block;
    cursor: default;
}
.chant-sets-panel .set-song-row.chant-set-empty strong {
    white-space: normal;
}
.chant-preview-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}
.chant-preview-column {
    min-width: 0;
}
.chant-preview-column > h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 18px;
    text-transform: uppercase;
}
.chant-page-section {
    border-top: 1px solid #242424;
    padding: 13px 0 18px;
}
.chant-page-section .slides-grid {
    display: grid;
    gap: 12px;
}
.chant-page-section .slide-card {
    width: 100%;
}
.chant-edit-frame-modal {
    z-index: 10002;
    background: rgba(0,0,0,0.72);
}
.chant-edit-frame-modal iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}
.set-song-section {
    margin-top: 28px;
}
.set-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #262626;
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.set-section-title h2 {
    margin: 0;
    font-size: 20px;
}
.set-song-list {
    display: grid;
    gap: 8px;
}
.set-song-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) minmax(80px, auto);
    align-items: center;
    gap: 14px;
    border: 1px solid #292929;
    border-radius: 8px;
    padding: 13px 15px;
    cursor: grab;
}
.set-detail-page:not(.chant-detail-page) .set-song-row {
    grid-template-columns: max-content 28px minmax(0, 1fr) minmax(80px, auto);
    column-gap: 12px;
}
.set-song-info-btn {
    margin-left: 0;
    text-decoration: none;
}
.set-song-row span {
    color: var(--text-secondary);
    font-weight: 800;
}
.set-song-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.set-song-row small {
    color: rgba(255,255,255,0.74);
}
.set-song-row.chant-bg-black { background: #080808; }
.set-song-row.chant-bg-image { background: #211d0c; border-color: #d6a900; }
.set-song-row.chant-bg-video { background: #24170f; border-color: #f97316; }

@media (max-width: 900px) {
    :root {
        --header-h: 58px;
    }

    body {
        height: auto;
        min-height: 100vh;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        display: block;
    }

    * {
        max-width: 100%;
    }

    .main-header {
        position: sticky;
        top: 0;
        z-index: 50;
        padding: 0 12px;
    }

    .logo-admin {
        height: 34px;
    }

    .btn-circle {
        width: 36px;
        height: 36px;
    }

    .admin-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: calc(100vh - var(--header-h));
        margin-top: 0;
        padding: 10px;
        gap: 12px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .powered-by-footer {
        min-height: 34px;
    }

    .admin-col {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        gap: 12px;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .panel,
    .panel-top,
    .panel-bottom {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 0;
    }

    .panel-top,
    .panel-bottom {
        max-height: 48vh;
    }

    .admin-col:first-child .panel-top {
        display: flex;
        flex-direction: column;
        flex: 0 0 auto;
        min-height: 0;
        max-height: none;
        height: auto;
    }

    .admin-col:first-child .panel-bottom {
        flex: 1 1 auto;
        min-height: 58vh;
        max-height: 70vh;
    }

    .admin-col:nth-child(2) .panel {
        min-height: 0;
        max-height: none;
    }

    .admin-col:nth-child(2) #song-preview-panel.has-song {
        min-height: 82vh;
    }

    .admin-col:nth-child(2) .scroll-area {
        max-height: none;
        min-height: 0;
    }

    .admin-col:nth-child(2) #song-preview-panel.has-song .scroll-area {
        min-height: 62vh;
    }

    .scroll-area {
        max-height: 34vh;
        padding: 10px;
    }

    #sets-container.scroll-area {
        flex: 0 0 auto;
        min-height: 0;
        max-height: none;
        height: auto;
        overflow-y: visible;
    }

    .panel-header,
    .panel-header-center {
        padding: 10px 12px;
        gap: 10px;
    }

    .panel-header {
        align-items: center;
    }

    .panel-header.chant-panel-header {
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
    }

    .chant-db-switch {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .chant-panel-header #chant-header-btns {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
    }

    .chant-panel-header.is-trash-view {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .chant-panel-header.is-trash-view .chant-db-switch {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .panel-header h2 {
        display: flex;
        align-items: center;
        min-height: 30px;
        line-height: 1;
    }

    #set-zone-title {
        font-size: 10px;
        line-height: 1.15;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .login-page {
        height: 100svh;
        min-height: 100svh;
        overflow: hidden;
    }

    .login-shell {
        min-height: 100svh;
        padding: 0 0 58px;
        align-items: center;
    }

    .login-page .powered-by-floating {
        bottom: 24px;
    }

    #set-header-btns {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 6px;
        min-width: 0;
    }

    #set-header-btns .btn-standard {
        flex: 0 0 auto;
    }

    .btn-standard {
        padding: 8px 10px;
        font-size: 10px;
        letter-spacing: 0.5px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .btn-circle-small {
        width: 30px;
        height: 30px;
        margin-left: 0;
    }

    .item-list {
        padding: 9px 10px;
        gap: 8px;
        min-width: 0;
        overflow: hidden;
    }

    .item-list.draggable-chant {
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr) auto;
        align-items: center;
    }

    .item-list.draggable-chant .handle {
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #333;
        color: #666;
        font-size: 18px;
        margin-right: 0;
        border-radius: 4px;
        cursor: grab;
        touch-action: none;
        flex-shrink: 0;
    }

    .item-list.draggable-chant .handle:active,
    .item-list.draggable-chant.admin-sortable-chosen .handle {
        background: var(--red-main);
        color: #fff;
        box-shadow: 0 0 0 2px rgba(255,255,255,0.18);
    }

    .item-list.draggable-chant > span {
        font-size: 11px;
        line-height: 1.15;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .item-list > span,
    .item-list > div {
        min-width: 0;
    }

    .chant-info {
        gap: 6px;
        min-width: 0;
        overflow: hidden;
        flex: 1;
    }

    .chant-info strong {
        min-width: 0;
    }

    .chant-info small {
        display: none;
    }

    .filter-bar {
        padding: 10px;
        flex-direction: column;
    }

    .panel-footer {
        padding: 10px;
    }

    .panel-header-center {
        flex-direction: column;
        align-items: stretch;
    }

    .song-meta h1 {
        font-size: 18px;
        margin: 0;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .song-meta p {
        margin: 4px 0 0;
        text-align: center;
    }

    .view-toggle,
    .editor-view-toggle,
    .live-commands {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .slides-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    .chant-preview-columns {
        grid-template-columns: 1fr;
    }

    .set-stats-grid.chant-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ratio-169 {
        width: 100%;
        min-width: 0;
    }

    .section-block {
        margin-bottom: 18px;
    }

    .col-right .panel {
        min-height: 0;
        max-height: none;
    }

    .live-wrapper {
        padding: 10px;
        gap: 14px;
    }

    .flux {
        margin-bottom: 8px;
    }

    .screen-preview-iframe {
        width: 100%;
        min-width: 0;
        max-height: 28vh;
    }

    .monitor-title {
        font-size: 13px;
    }

    .modal {
        align-items: flex-start;
        overflow-y: auto;
        padding: 10px;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        padding: 16px;
        margin: 0;
    }
    #modal-chant .modal-content {
        width: 100%;
        height: auto;
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
        display: grid;
        grid-template-rows: auto;
        gap: 12px;
        padding: 14px;
        box-sizing: border-box;
    }
    #modal-chant .chant-main-fields {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .chant-bg-field {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .chant-bg-field input[type="file"] {
        width: 100%;
    }

    .chant-video-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .chant-bg-field .btn-standard {
        width: 100%;
        min-width: 0;
    }

    #modal-chant .editor-toolbar > select {
        min-width: 0;
        width: 100%;
        min-height: 42px;
        padding: 10px 12px;
    }

    .form-group,
    .transpose-editor {
        flex-direction: column;
        gap: 8px;
    }

    .rich-song-editor {
        height: 48vh;
        min-height: 360px;
    }

    .dual-song-editor {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .editor-pane + .editor-pane {
        border-left: 0;
        border-top: 2px solid var(--red-main);
        box-shadow: 0 -8px 18px color-mix(in srgb, var(--red-main) 22%, transparent);
    }

    #modal-chant .editor-toolbar,
    .editor-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 8px;
    }

    .style-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(68px, auto)) repeat(5, 32px) minmax(0, 1fr);
        grid-auto-rows: 32px;
        width: 100%;
        justify-content: start;
        align-items: center;
        gap: 7px;
        overflow: hidden;
        box-sizing: border-box;
    }

    .color-palette {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 3px 2px 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .color-dot {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn-standard {
        width: 100%;
    }

    .settings-page {
        height: auto;
        padding: 10px;
    }

    .settings-tabs {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .settings-section {
        width: 100%;
        padding: 16px;
    }

    .settings-form {
        grid-template-columns: 1fr;
    }

    .settings-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .settings-actions .btn-standard,
    .settings-link {
        width: min(100%, 320px);
        justify-content: center;
        text-align: center;
    }

    .install-actions {
        align-items: center;
        text-align: center;
    }

    .set-detail-page {
        width: calc(100vw - 20px);
        padding-top: 22px;
    }

    .set-meta-grid,
    .set-stats-grid {
        grid-template-columns: 1fr;
    }

    .set-section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .set-song-row {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .set-song-row small {
        display: none;
    }
}

@media (min-width: 901px) {
    body.admin-page {
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    body.admin-page .main-header {
        height: 58px !important;
        min-height: 58px !important;
        flex: 0 0 58px !important;
        margin: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        transform: none !important;
    }

    body.admin-page .logo-admin {
        height: 38px !important;
    }

    body.admin-page .admin-grid {
        flex: 1 1 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 15px !important;
        gap: 15px !important;
        overflow: hidden !important;
    }

    body.admin-page .admin-col,
    body.admin-page .panel {
        min-height: 0 !important;
        overflow: hidden !important;
    }

    body.admin-page .admin-col {
        gap: 15px !important;
    }

    body.admin-page .panel-top,
    body.admin-page .panel-bottom {
        flex: 1 1 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    body.admin-page .view-toggle,
    body.admin-page .editor-view-toggle,
    body.admin-page .live-commands {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    body.admin-page .view-toggle .btn-standard,
    body.admin-page .editor-view-toggle .btn-standard,
    body.admin-page .live-commands .btn-standard {
        min-width: 0 !important;
        width: 100% !important;
        padding: 8px 10px !important;
        font-size: 10px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.admin-page .panel-header-center {
        gap: 10px;
    }
}

@media (min-width: 901px) and (max-width: 1366px) {
    body.admin-page .main-header {
        height: 50px !important;
        min-height: 50px !important;
        flex-basis: 50px !important;
    }

    body.admin-page .logo-admin {
        height: 32px !important;
    }

    body.admin-page .btn-circle {
        width: 34px;
        height: 34px;
    }

    body.admin-page .admin-grid {
        grid-template-columns: minmax(250px, 0.95fr) minmax(360px, 1.15fr) minmax(260px, 0.9fr) !important;
        gap: 8px !important;
        padding: 8px !important;
    }

    body.admin-page .panel-header,
    body.admin-page .panel-header-center {
        padding: 8px 10px !important;
    }

    body.admin-page .admin-col {
        gap: 8px !important;
    }

    body.admin-page .scroll-area {
        padding: 8px !important;
    }

    body.admin-page .panel-top {
        flex: 0 0 42% !important;
    }

    body.admin-page .panel-bottom {
        flex: 1 1 58% !important;
    }

    body.admin-page .item-list {
        min-height: 0;
        margin-bottom: 6px;
        padding: 7px 9px;
        gap: 6px;
    }

    body.admin-page .item-list span,
    body.admin-page .chant-info strong {
        font-size: 12px;
        line-height: 1.15;
    }

    body.admin-page .chant-info small {
        font-size: 11px;
    }

    body.admin-page .btn-circle-small {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    body.admin-page .filter-bar {
        padding: 8px;
        gap: 8px;
    }

    body.admin-page .filter-bar input,
    body.admin-page .filter-bar select {
        padding: 9px 10px;
        min-height: 38px;
    }

    body.admin-page .panel-header h2,
    body.admin-page .monitor-title {
        font-size: 11px;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    body.admin-page .flux {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        width: 100%;
        align-items: center;
        margin-bottom: 8px;
    }

    body.admin-page .flux .btn-container {
        min-width: 0;
    }

    body.admin-page .flux .btn-standard {
        width: 100%;
        min-width: 0;
        padding-inline: 10px !important;
    }

    body.admin-page .live-commands {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    body.admin-page .live-commands .btn-standard {
        min-width: 0 !important;
        padding-inline: 8px !important;
    }

    body.admin-page .screen-preview-iframe {
        width: min(100%, 38vh) !important;
        max-height: 21vh;
    }

    body.admin-page .live-wrapper {
        gap: 8px;
        padding: 8px;
    }

    body.admin-page .monitor-group {
        min-height: 0;
    }

    body.admin-page .monitor-title {
        margin: 0;
    }

    #modal-chant .modal-content {
        width: calc(100vw - 16px);
        height: calc(100dvh - 16px);
        max-height: calc(100dvh - 16px);
        grid-template-rows: auto auto auto auto minmax(260px, 1fr) auto;
        overflow-y: auto;
        gap: 6px;
        padding: 10px;
    }

    #modal-chant .modal-content h2 {
        font-size: 14px;
    }

    #modal-chant .chant-main-fields {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr) minmax(150px, 0.7fr);
        gap: 6px;
    }

    #modal-chant .modal-content input,
    #modal-chant .modal-content select {
        padding: 8px 9px;
    }

    .chant-background-modal .chant-bg-field {
        grid-template-columns: 72px 176px minmax(100px, 1fr) 72px;
        padding: 4px 6px;
        gap: 6px;
        font-size: 10px;
        min-height: 34px;
    }

    .chant-background-modal .chant-video-field {
        grid-template-columns: 72px 176px minmax(90px, 1fr) minmax(210px, max-content) 72px;
    }

    .chant-background-modal .chant-bg-field span {
        font-size: 10px;
    }

    .chant-background-modal .chant-bg-field input[type="file"] {
        width: 176px;
        padding: 5px 10px;
        font-size: 10px;
        box-sizing: border-box;
    }

    .chant-background-modal .chant-bg-field input[type="file"]::file-selector-button {
        padding: 5px 8px;
        margin-right: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .chant-background-modal .chant-bg-field .btn-standard {
        width: 72px;
        min-width: 72px;
        padding: 6px 5px;
        font-size: 9px;
    }

    .chant-background-modal .chant-video-options {
        grid-template-columns: max-content max-content 56px;
        gap: 6px;
        font-size: 10px;
    }

    .chant-background-modal .chant-video-options input[type="number"] {
        padding: 5px !important;
    }

    #modal-chant .transpose-editor {
        padding: 6px 8px;
        gap: 10px;
    }

    #modal-chant .editor-tool-item {
        gap: 6px;
    }

    #modal-chant .editor-tone-info {
        margin-left: 0;
    }

    #modal-chant .editor-toolbar {
        grid-template-columns: minmax(170px, 0.7fr) minmax(0, 2fr);
        gap: 8px;
    }

    #modal-chant .style-toolbar {
        min-width: 0;
        overflow: hidden;
    }

    #modal-chant .color-palette {
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: thin;
        padding: 0 2px;
    }

    #modal-chant .modal-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        min-width: 0;
        position: sticky;
        bottom: -10px;
        z-index: 2;
        padding-top: 6px;
        background: #101010;
    }

    #modal-chant .modal-actions .btn-standard {
        flex: 1 1 150px;
        max-width: 220px;
        min-width: 0;
    }

    #modal-chant .modal-actions-spacer {
        display: none;
    }

    #modal-chant .chant-background-manage-btn {
        margin-right: 0;
        max-width: none;
    }

    .chant-background-modal {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        overflow-y: auto;
        padding: 12px;
    }

    #modal-chant .rich-song-editor {
        min-height: 260px;
    }
}

@media (min-width: 901px) and (max-width: 1180px) {
    body.admin-page .admin-grid {
        grid-template-columns: minmax(230px, 0.9fr) minmax(330px, 1.2fr) minmax(230px, 0.85fr) !important;
    }

    body.admin-page .flux {
        grid-template-columns: 1fr;
        justify-items: stretch;
        text-align: center;
    }

    body.admin-page .live-commands {
        grid-template-columns: 1fr !important;
    }

    .chant-background-modal .chant-bg-field,
    .chant-background-modal .chant-video-field {
        grid-template-columns: 72px minmax(150px, 1fr) minmax(120px, 1fr) 76px;
    }

    .chant-background-modal .chant-video-options {
        grid-column: 2 / -1;
        grid-row: 2;
        justify-content: start;
    }
}

#desktop-remote-editor {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    overflow: hidden !important;
}

#desktop-remote-editor .desktop-edit-stage {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
}

#desktop-remote-editor .desktop-edit-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    grid-auto-flow: column !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
}

#desktop-remote-editor .desktop-slide-editor.rich-song-editor,
#desktop-remote-editor .desktop-edit-retour-preview {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
}

#desktop-remote-editor .desktop-slide-editor.rich-song-editor {
    overflow: hidden !important;
}

#desktop-remote-editor .desktop-edit-retour-preview {
    display: block !important;
}

#desktop-remote-editor .desktop-edit-retour-frame {
    width: 100% !important;
    height: 100% !important;
}

#desktop-remote-editor .desktop-slide-editor:empty::before {
    content: none !important;
}
