/* Créateur de groove (public et espace élève). Couleurs du thème si elles existent. */
.mdl-gr-dlg { --g: var(--wp--preset--color--or, #c6bc89); --gt: var(--wp--preset--color--or-texte, #756425); --ink: #1c1c1c; --line: #e9e6de; --muted: #6a665c; --cream: #f7f4ec; }
.mdl-groove { --g: var(--wp--preset--color--or, #c6bc89); --gt: var(--wp--preset--color--or-texte, #756425); --ink: var(--wp--preset--color--noir, #1c1c1c); --line: var(--wp--preset--color--ivoire, #e9e6de); --muted: var(--wp--preset--color--gris-texte, #6a665c); --cream: var(--wp--preset--color--creme, #f7f4ec); color: var(--ink); font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-sizing: border-box; max-width: 100%; }
.mdl-groove *, .mdl-groove *::before { box-sizing: border-box; }
.mdl-groove button, .mdl-groove select, .mdl-groove input { font: inherit; color: inherit; }
.mdl-groove select, .mdl-groove input[type=number] { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; }
.mdl-gr-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-bottom: 14px; }
.mdl-gr-bar label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.mdl-gr-bar label select { color: var(--ink); font-size: 14px; }
.mdl-gr-play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--g); color: #1c1c1c; font-size: 20px; cursor: pointer; flex: none; }
.mdl-groove.is-playing .mdl-gr-play { background: var(--ink); color: #fff; }
.mdl-gr-tempo { display: flex; align-items: center; gap: 5px; }
.mdl-gr-tempo button { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font-size: 17px; }
.mdl-gr-tempo input { width: 68px; font-size: 22px !important; font-weight: 700; text-align: center; }
.mdl-gr-tempo span { font-weight: 600; font-size: 13px; line-height: 1.1; }
.mdl-gr-tempo small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
/* Grille */
.mdl-gr-grid { display: flex; flex-direction: column; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.mdl-gr-measure { min-width: max-content; }
.mdl-gr-mlabel { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--gt); margin: 0 0 4px 96px; }
.mdl-gr-row { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.mdl-gr-name { width: 90px; flex: none; text-align: right; font-size: 13px; background: none; border: 0; padding: 0 4px; cursor: pointer; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mdl-gr-row.is-muted .mdl-gr-name { text-decoration: line-through; color: var(--muted); }
.mdl-gr-row.is-muted .mdl-gr-cell { opacity: .35; }
.mdl-gr-cells { display: flex; gap: 2px; }
.mdl-gr-cell { position: relative; width: 30px; height: 30px; border-radius: 6px; background: #f1eee6; cursor: pointer; touch-action: none; display: grid; place-items: center; user-select: none; }
.mdl-gr-cell.is-beat { background: #e7e2d4; }
.mdl-gr-cell:hover { outline: 2px solid var(--g); outline-offset: -2px; }
.mdl-gr-cell:focus-visible { outline: 2px solid var(--gt); outline-offset: 1px; }
.mdl-gr-cell.is-on::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); }
.mdl-gr-cell.is-acc::after { width: 20px; height: 20px; background: var(--gt); }
.mdl-gr-cell.is-g::after { width: 9px; height: 9px; background: transparent; border: 2px solid var(--ink); }
.mdl-gr-cell.is-o::after { background: transparent; border: 3px solid var(--ink); width: 16px; height: 16px; }
.mdl-gr-cell.is-c::after { content: '×'; width: auto; height: auto; background: none; font-weight: 700; font-size: 18px; line-height: 1; }
.mdl-gr-cell.is-now { box-shadow: inset 0 0 0 2px var(--g); background: #fff6d6; }
.mdl-gr-count .mdl-gr-cells span { width: 30px; text-align: center; font-size: 11px; color: var(--muted); }
.mdl-gr-count .mdl-gr-name { cursor: default; }
/* Outils */
.mdl-gr-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 12px 0; font-size: 14px; }
.mdl-gr-link { background: none; border: 0; padding: 0; color: var(--gt); text-decoration: underline; cursor: pointer; }
.mdl-gr-check { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mdl-gr-check input[type=number] { width: 58px; padding: 3px 6px; }
.mdl-gr-trainer summary { cursor: pointer; color: var(--gt); }
.mdl-gr-trainer[open] { flex-basis: 100%; }
.mdl-gr-help { flex-basis: 100%; font-size: 12px; color: var(--muted); }
/* Partition */
.mdl-gr-score { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px; color: var(--ink); }
.mdl-gr-svg { display: block; overflow: visible; }
.mdl-gr-staff { stroke: currentColor; stroke-width: 1; opacity: .55; }
.mdl-gr-barline { stroke: currentColor; stroke-width: 1.2; }
.mdl-gr-ts { font: 700 21px/1 Georgia, 'Times New Roman', serif; fill: currentColor; text-anchor: middle; }
.mdl-gr-par { font: 15px Georgia, serif; fill: currentColor; }
.mdl-gr-tup { font: italic 700 12px Georgia, serif; fill: currentColor; text-anchor: middle; }
.mdl-gr-cursor { fill: var(--g); opacity: .3; }
/* Actions */
.mdl-gr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.mdl-gr-btn { display: inline-block; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--g); background: #fff; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 14px; }
.mdl-gr-btn.is-main, .mdl-gr-btn:hover { background: var(--g); color: #1c1c1c; }
.mdl-gr-msg { font-size: 13px; color: #2f7a3b; }
.mdl-gr-saved h3 { font-size: 15px; margin: 16px 0 6px; }
.mdl-gr-saved ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mdl-gr-saved li { display: inline-flex; align-items: center; gap: 4px; background: var(--cream); border-radius: 99px; padding: 4px 6px 4px 12px; }
.mdl-gr-del { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }
/* Version intégrée dans une leçon */
.mdl-groove.is-compact { padding: 12px; }
.mdl-groove.is-compact .mdl-gr-help { display: none; }
@media (max-width: 640px) {
	.mdl-groove { padding: 12px; }
	.mdl-gr-name { width: 64px; font-size: 11px; }
	.mdl-gr-mlabel { margin-left: 70px; }
	.mdl-gr-cell, .mdl-gr-count .mdl-gr-cells span { width: 26px; }
	.mdl-gr-cell { height: 30px; }
}
/* Impression : la partition seule */
@media print {
	body.mdl-gr-printing * { visibility: hidden; }
	body.mdl-gr-printing .mdl-gr-score, body.mdl-gr-printing .mdl-gr-score * { visibility: visible; }
	body.mdl-gr-printing .mdl-gr-score { position: absolute; left: 0; top: 0; width: 100%; border: 0; }
	body.mdl-gr-printing .mdl-gr-cursor { display: none; }
}
/* Familles d'instruments (cymbales, fûts, pieds) : un repère de couleur discret sur le nom */
.mdl-gr-row.is-cym .mdl-gr-name { box-shadow: inset 3px 0 0 #c6bc89; }
.mdl-gr-row.is-fut .mdl-gr-name { box-shadow: inset 3px 0 0 #8a6d3b; }
.mdl-gr-row.is-pied .mdl-gr-name { box-shadow: inset 3px 0 0 #1c1c1c; }
.mdl-gr-row.is-cym + .mdl-gr-row.is-fut, .mdl-gr-row.is-fut + .mdl-gr-row.is-pied { margin-top: 6px; }
/* Fenêtre d'inscription (PDF) */
.mdl-gr-dlg { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100vh - 32px); overflow: auto; border: 0; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 24px)); box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.mdl-gr-dlg::backdrop { background: rgba(20,20,20,.55); }
.mdl-gr-lead { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 24px 20px; font-size: 15px; color: #1c1c1c; }
.mdl-gr-lead h3 { margin: 0; font-size: 21px; padding-right: 30px; }
.mdl-gr-lead p { margin: 0; }
.mdl-gr-lead label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #6a665c; }
.mdl-gr-lead input[name=first_name], .mdl-gr-lead input[type=email] { font: inherit; font-size: 15px; color: #1c1c1c; border: 1px solid #e9e6de; border-radius: 10px; padding: 10px 12px; }
.mdl-gr-lead .mdl-gr-check { flex-direction: row; align-items: flex-start; gap: 8px; }
.mdl-gr-lead .mdl-gr-check input { margin-top: 3px; }
.mdl-gr-lead .mdl-gr-btn { padding: 12px 18px; font-size: 15px; font-weight: 600; }
.mdl-gr-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f1eee6; font-size: 20px; line-height: 1; cursor: pointer; }
.mdl-gr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mdl-gr-err { color: #b32d2e; font-size: 13px; min-height: 0; }
.mdl-gr-err:empty { display: none; }
.mdl-gr-small { font-size: 12px; color: #8a8576; }
.mdl-gr-credit { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* Vider la grille */
.mdl-gr-clear { margin-left: auto; align-self: flex-end; border: 1px solid #e3c9c9; background: #fff; color: #9b2c2c; border-radius: 99px; padding: 7px 14px; cursor: pointer; font-size: 13px; }
.mdl-gr-clear:hover { background: #fcf0f0; }
/* Mes grooves (élève) : en tête, bien visible */
.mdl-gr-saved { background: var(--cream); border: 1px solid var(--g); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.mdl-gr-saved h3 { margin: 0 0 8px !important; font-size: 17px !important; }
.mdl-gr-saved h3 small { font-weight: 400; color: var(--gt); font-size: 13px; }
.mdl-gr-saved p { margin: 0; font-size: 14px; color: var(--muted); }
.mdl-gr-saved li { background: #fff !important; border: 1px solid var(--line); }
