/* ==========================================================================
   SONGBOOK.CSS - Feuille de style dédiée au carnet de morceaux & songbook
   Thème : Lutherie & Papier à musique, impression A4 haute définition
   Zéro style inline - Conformité W3C & CSP Stricte Grade A+
   ========================================================================== */

:root {
	--bg-app: #f6f4ee;
	--bg-surface: #ffffff;
	--bg-subtle: #eae5d9;
	--bg-card: #faf8f5;
	--border-color: #dcd4c3;
	--border-focus: #b45309;

	--text-primary: #1c1917;
	--text-secondary: #57534e;
	--text-muted: #78716c;

	--accent-gold: #b45309;
	--accent-gold-hover: #92400e;
	--accent-gold-light: #fef3c7;

	--danger-color: #dc2626;
	--danger-bg: #fee2e2;

	--fret-color: #292524;
	--string-color: #1c1917;
	--dot-color: #b45309;
	--dot-text-color: #ffffff;
	--nut-color: #1c1917;
	--marker-muted-color: #dc2626;
	--marker-open-stroke: #1c1917;

	--font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
	--shadow-sheet: 0 8px 30px rgba(0, 0, 0, 0.12);
	--shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* Réinitialisation de base */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: var(--font-stack);
	background-color: var(--bg-app);
	color: var(--text-primary);
	line-height: 1.5;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

/* Accessibilité */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* ==========================================================================
   BARRE D'OUTILS SUPÉRIEURE (NON IMPRIMÉE)
   ========================================================================== */

.toolbar {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--bg-surface);
	border-bottom: 1px solid var(--border-color);
	box-shadow: var(--shadow-sm);
	padding: 10px 16px;
}

.toolbar-inner {
	max-width: 1350px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.toolbar-left,
.toolbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.toolbar-options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	background-color: var(--bg-subtle);
	padding: 6px 14px;
	border-radius: 8px;
	border: 1px solid var(--border-color);
}

.toolbar-divider {
	width: 1px;
	height: 24px;
	background-color: var(--border-color);
	margin: 0 4px;
}

.option-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-secondary);
}

.option-item select,
.section-add-group select {
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	padding: 5px 10px;
	border-radius: 6px;
	border: 1px solid var(--border-color);
	background-color: var(--bg-surface);
	color: var(--text-primary);
	cursor: pointer;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.option-item select:focus,
.section-add-group select:focus {
	border-color: var(--border-focus);
	box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.2);
}

.section-add-group {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Boutons d'action */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.btn-sm {
	padding: 4px 10px;
	font-size: 0.8rem;
}

.btn-primary {
	background-color: var(--accent-gold);
	color: #ffffff;
	border-color: var(--accent-gold);
}

.btn-primary:hover {
	background-color: var(--accent-gold-hover);
	border-color: var(--accent-gold-hover);
}

.btn-secondary {
	background-color: var(--bg-surface);
	color: var(--text-primary);
	border-color: var(--border-color);
}

.btn-secondary:hover {
	background-color: var(--bg-subtle);
	border-color: #c7beab;
}

.btn-outline {
	background-color: transparent;
	color: var(--text-secondary);
	border-color: var(--border-color);
}

.btn-outline:hover {
	background-color: var(--bg-subtle);
	color: var(--text-primary);
	border-color: var(--border-focus);
}

.btn-danger-outline {
	background-color: transparent;
	color: var(--danger-color);
	border-color: #fca5a5;
}

.btn-danger-outline:hover {
	background-color: var(--danger-bg);
	border-color: var(--danger-color);
}

/* ==========================================================================
   CONTENEUR ET FEUILLE A4
   ========================================================================== */

.sheet-container {
	flex: 1;
	display: flex;
	justify-content: center;
	padding: 24px 16px 48px;
}

.sheet-a4 {
	background-color: #ffffff;
	width: 210mm;
	min-height: 297mm;
	padding: 10mm 14mm 10mm 14mm;
	box-shadow: var(--shadow-sheet);
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	position: relative;
	box-sizing: border-box;
}

/* En-tête de la feuille */
.sheet-header {
	margin-bottom: 12px;
	border-bottom: 2px solid #1c1917;
	padding-bottom: 10px;
}

.header-main-block {
	text-align: center;
	margin-bottom: 8px;
}

.sheet-title {
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #000000;
	outline: none;
	padding: 2px 8px;
	border-radius: 4px;
	transition: background-color 0.15s ease;
	display: inline-block;
	min-width: 280px;
}

.sheet-title:hover,
.sheet-title:focus {
	background-color: var(--accent-gold-light);
}

.sheet-hint {
	font-size: 0.75rem;
	color: var(--text-muted);
	margin-top: 2px;
}

.header-meta-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 24px;
	font-size: 0.85rem;
}

.meta-field {
	display: flex;
	align-items: baseline;
	gap: 6px;
}

.meta-field-wide {
	grid-column: 1 / -1;
}

.meta-label {
	font-weight: 600;
	color: #44403c;
	font-size: 0.8rem;
	white-space: nowrap;
}

.meta-value {
	flex: 1;
	border-bottom: 1px dotted #a8a29e;
	min-height: 1.2em;
	padding: 1px 4px;
	outline: none;
	font-weight: 500;
}

.meta-value:hover,
.meta-value:focus {
	background-color: var(--accent-gold-light);
	border-bottom-style: solid;
	border-bottom-color: var(--accent-gold);
}

/* ==========================================================================
   SECTIONS DU MORCEAU (Intro, Couplet, Refrain...)
   ========================================================================== */

.song-guide {
	padding: 12px 14px;
	margin: 0 0 14px;
	border: 1px solid #d6c8ac;
	border-left: 3px solid var(--accent-gold);
	border-radius: 4px;
	background: #faf7ef;
	color: var(--text-primary);
	font-size: 0.8rem;
	line-height: 1.55;
}

.song-guide h2 {
	font-size: 1rem;
	margin-bottom: 6px;
}

.song-guide-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 14px;
	margin-bottom: 8px;
}

.song-guide-header h2 {
	margin: 0;
}

.guide-edit-toggle[hidden] {
	display: none;
}

.song-guide-preview > p,
.song-guide-list dd {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.song-guide-empty,
.song-guide-edit-help {
	color: var(--text-secondary);
}

.song-guide-edit-help {
	margin-top: 8px;
}

.song-guide-editor {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.guide-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.guide-field label,
.guide-link-row legend,
.song-guide-more summary {
	font-weight: 600;
}

.guide-field textarea,
.guide-field input {
	width: 100%;
	min-width: 0;
	padding: 8px;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	background: var(--bg-surface);
	color: var(--text-primary);
	font: inherit;
}

.guide-field textarea {
	resize: vertical;
	min-height: 72px;
}

.guide-field textarea:focus-visible,
.guide-field input:focus-visible,
.song-guide-more summary:focus-visible {
	outline: 2px solid var(--border-focus);
	outline-offset: 2px;
}

.guide-field input[aria-invalid="true"] {
	border-color: var(--danger-color);
}

.song-guide-more summary {
	cursor: pointer;
	padding: 4px 0;
}

.song-guide-more .guide-field {
	margin-top: 8px;
}

.guide-link-rows {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.guide-link-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 8px 12px;
	padding: 10px;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	min-width: 0;
}

.guide-remove-link {
	grid-column: 1 / -1;
	justify-self: start;
}

.guide-add-link {
	align-self: flex-start;
}

.guide-editor-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.guide-error {
	color: #991b1b;
	font-weight: 600;
}

.guide-error:empty {
	display: none;
}

@media screen {
	.song-guide.is-editing .song-guide-preview {
		display: none;
	}
}

.song-guide-list {
	display: grid;
	grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
	gap: 6px 14px;
	margin: 10px 0;
}

.song-guide-list dt {
	font-weight: 700;
}

.song-guide-list dd {
	margin: 0;
}

.song-guide-sources {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 8px;
}

.song-guide a {
	color: #85430d;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.song-guide a:focus-visible {
	outline: 2px solid var(--accent-gold);
	outline-offset: 3px;
}

.song-guide-audio {
	margin-top: 10px;
	border-top: 1px solid #d6c8ac;
	padding-top: 8px;
}

@media screen and (max-width: 540px) {
	.guide-link-row {
		grid-template-columns: minmax(0, 1fr);
	}
	.guide-remove-link {
		grid-column: 1;
	}

	.song-guide-list {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}
	.song-guide-list dd {
		margin-bottom: 8px;
	}
}

.song-sections {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 8px 0;
}

.song-section {
	background-color: #ffffff;
	border-radius: 6px;
	border: 1px dashed #d6d3d1;
	padding: 10px 12px 12px;
	position: relative;
	transition: border-color 0.15s ease;
}

.song-section:hover {
	border-color: #a8a29e;
}

.section-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid #f0ede6;
}

.section-title-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background-color: #292524;
	color: #ffffff;
	padding: 3px 12px;
	border-radius: 4px;
}

.section-title-badge .section-title {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	outline: none;
	border: none;
	background: transparent;
	color: inherit;
}

.section-title-badge .section-title:hover,
.section-title-badge .section-title:focus {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 2px;
}

.section-tools {
	display: flex;
	align-items: center;
	gap: 6px;
}

.btn-section-tool {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 4px;
	border: 1px solid var(--border-color);
	background: var(--bg-surface);
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn-section-tool:hover {
	background-color: var(--bg-subtle);
	color: var(--text-primary);
	border-color: var(--border-focus);
}

.btn-section-tool.btn-delete-section:hover {
	background-color: var(--danger-bg);
	color: var(--danger-color);
	border-color: var(--danger-color);
}

/* Grille des accords de la section */
.section-chords-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
	gap: 10px;
	align-items: start;
}

/* Carte d'accord dans la section */
.song-chord-card {
	background-color: var(--bg-card);
	border: 1px solid #e7e5e4;
	border-radius: 6px;
	padding: 6px 4px 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	transition: all 0.15s ease;
}

.song-chord-card:hover {
	border-color: #b45309;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.chord-card-header {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 4px 4px;
	border-bottom: 1px solid #f0ede6;
}

.chord-name-row {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.chord-alert-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #b91c1c;
	background-color: #fee2e2;
	border: 1px solid #fca5a5;
	border-radius: 4px;
	padding: 1px 3px;
	cursor: help;
	line-height: 1;
	transition: all 0.15s ease;
}

.chord-alert-badge:hover {
	background-color: #fecaca;
	border-color: #f87171;
	transform: scale(1.1);
}

.chord-alert-badge svg {
	display: block;
}

.song-chord-card.has-chord-warning {
	border-color: #f87171;
	background-color: #fffaf0;
}

.picker-chord-card.has-chord-warning {
	border-color: #f87171;
	background-color: #fffaf0;
}

.picker-empty-message {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--text-muted);
	font-size: 0.85rem;
	padding: 1.5rem 1rem;
}

.chord-card-name {
	font-size: 0.95rem;
	font-weight: 700;
	color: #000000;
	line-height: 1.1;
}

.chord-card-name-fr {
	font-size: 0.7rem;
	color: var(--text-muted);
	font-weight: 500;
	display: block;
}

.chord-card-actions {
	display: flex;
	align-items: center;
	gap: 2px;
	opacity: 0.4;
	transition: opacity 0.15s ease;
}

.song-chord-card:hover .chord-card-actions {
	opacity: 1;
}

.btn-chord-action {
	background: transparent;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	padding: 2px;
	border-radius: 3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.btn-chord-action:hover {
	background-color: #e7e5e4;
	color: #000000;
}

.btn-chord-action.btn-remove:hover {
	background-color: var(--danger-bg);
	color: var(--danger-color);
}

/* Support SVG du diagramme */
.chord-diagram-holder {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 4px 0 2px;
}

.chord-diagram-holder .chord-diagram-svg {
	width: 95px;
	max-width: 100%;
	height: auto;
	aspect-ratio: 100 / 120;
	display: block;
}

/* Barre d'écoute audio sur la carte d'accord */
.chord-audio-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 2px 0 4px;
	width: 100%;
}

.btn-chord-audio {
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: 6px;
	color: var(--text-secondary);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px 6px;
	transition: all 0.15s ease;
}

.btn-chord-audio:hover {
	background: var(--bg-subtle);
	color: var(--accent-gold);
	border-color: var(--accent-gold);
	transform: scale(1.08);
}

.song-chord-card.pulse-playing,
.picker-chord-card.pulse-playing {
	animation: cardPlayPulse 0.5s ease-out;
}

@keyframes cardPlayPulse {
	0% {
		border-color: var(--accent-gold);
		box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.25);
	}
	100% {
		border-color: #e7e5e4;
		box-shadow: none;
	}
}

/* Slot d'annotation sous l'accord (ex: x2, arpège, 3 temps) */
.chord-card-note {
	width: 100%;
	font-size: 0.72rem;
	text-align: center;
	color: var(--text-secondary);
	border-top: 1px dotted #d6d3d1;
	padding: 2px 4px 0;
	margin-top: 2px;
	min-height: 1.3em;
	outline: none;
}

.chord-card-note:hover,
.chord-card-note:focus {
	background-color: var(--accent-gold-light);
}

/* Carte bouton d'ajout d'accord dans la section */
.add-chord-slot {
	min-height: 135px;
	border: 1px dashed #d6d3d1;
	border-radius: 6px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	padding: 10px;
	font-size: 0.8rem;
	font-weight: 600;
	transition: all 0.15s ease;
}

.add-chord-slot:hover {
	border-color: var(--accent-gold);
	color: var(--accent-gold);
	background-color: rgba(254, 243, 199, 0.4);
}

/* Pied de page de la feuille A4 */
.sheet-footer {
	margin-top: auto;
	padding-top: 8px;
	border-top: 1px solid #d6d3d1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.75rem;
	color: var(--text-muted);
}

/* ==========================================================================
   MODALE DE SÉLECTION D'ACCORD (CHORD PICKER)
   ========================================================================== */

.modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(3px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.modal-backdrop[hidden] {
	display: none;
}

.modal-window {
	background-color: var(--bg-surface);
	border-radius: 12px;
	box-shadow: var(--shadow-modal);
	width: 100%;
	max-width: 820px;
	max-height: 90vh;
	max-height: 90dvh;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border-color);
	overflow: hidden;
}

.modal-header {
	padding: 14px 18px;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: var(--bg-card);
}

.modal-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--text-primary);
}

.modal-subtitle {
	font-size: 0.8rem;
	color: var(--text-muted);
	margin-top: 2px;
}

.btn-modal-close {
	background: transparent;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	padding: 6px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
}

.btn-modal-close:hover {
	background-color: var(--bg-subtle);
	color: var(--text-primary);
}

/* Filtres de la modale */
.modal-filter-bar {
	padding: 12px 18px;
	border-bottom: 1px solid var(--border-color);
	background-color: var(--bg-surface);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.picker-search-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.picker-search-wrapper .search-icon {
	position: absolute;
	left: 10px;
	color: var(--text-muted);
	pointer-events: none;
}

.picker-search-wrapper input {
	width: 100%;
	font-family: inherit;
	font-size: 0.9rem;
	padding: 8px 36px 8px 34px;
	border-radius: 8px;
	border: 1px solid var(--border-color);
	background-color: var(--bg-app);
	color: var(--text-primary);
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.picker-search-wrapper input:focus {
	border-color: var(--border-focus);
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15);
}

.btn-clear-search {
	position: absolute;
	right: 8px;
	background: transparent;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	display: flex;
}

.btn-clear-search[hidden] {
	display: none;
}

.picker-quick-roots {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.root-chip {
	font-family: inherit;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
	border: 1px solid var(--border-color);
	background-color: var(--bg-subtle);
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.15s ease;
}

.root-chip:hover {
	border-color: var(--border-focus);
	color: var(--text-primary);
}

.root-chip.is-active {
	background-color: var(--accent-gold);
	border-color: var(--accent-gold);
	color: #ffffff;
}

/* Grille de sélection des accords */
.modal-chords-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 16px 18px;
	max-height: 55vh;
}

.picker-chords-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
	gap: 12px;
}

.picker-chord-card {
	background-color: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 8px 6px;
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	transition: all 0.15s ease;
	position: relative;
}

.picker-chord-card:hover {
	border-color: var(--accent-gold);
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
	background-color: #fffdfa;
}

.picker-chord-card:focus {
	outline: 2px solid var(--accent-gold);
}

.picker-card-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-primary);
	line-height: 1.1;
	margin-bottom: 2px;
}

.picker-card-subtitle {
	font-size: 0.72rem;
	color: var(--text-muted);
	margin-bottom: 4px;
	text-align: center;
}

.picker-card-diagram {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.picker-card-diagram .chord-diagram-svg {
	width: 85px;
	height: auto;
	aspect-ratio: 100 / 120;
	display: block;
}

/* ==========================================================================
   STYLES DU DIAGRAMME SVG
   ========================================================================== */

.fret-nut {
	fill: var(--nut-color);
}

.fret-line {
	stroke: var(--fret-color);
	stroke-width: 1.2;
}

.string-line {
	stroke: var(--string-color);
}

.fret-number-text {
	font-size: 10px;
	font-weight: bold;
	fill: var(--text-muted);
	font-family: inherit;
}

.marker-muted {
	font-size: 10px;
	font-weight: bold;
	fill: var(--marker-muted-color);
	font-family: inherit;
}

.marker-open {
	fill: none;
	stroke: var(--marker-open-stroke);
	stroke-width: 1.4;
}

.fret-dot {
	fill: var(--dot-color);
}

.barre-pill {
	fill: var(--dot-color);
}

.finger-text {
	font-size: 7px;
	font-weight: bold;
	fill: var(--dot-text-color);
	font-family: inherit;
}

/* ==========================================================================
   RÈGLES D'IMPRESSION A4 STRICTES (@media print)
   ========================================================================== */

@media print {
	@page {
		size: A4 portrait;
		margin: 8mm 10mm 8mm 10mm;
	}

	html, body {
		background: #ffffff !important;
		color: #000000 !important;
		min-height: auto !important;
		height: auto !important;
	}

	.no-print {
		display: none !important;
	}

	.sheet-container {
		padding: 0 !important;
		margin: 0 !important;
		width: 100% !important;
		background: transparent !important;
	}

	.sheet-a4 {
		box-shadow: none !important;
		border: none !important;
		border-radius: 0 !important;
		width: 100% !important;
		max-width: none !important;
		min-height: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.sheet-header {
		margin-bottom: 8px !important;
		border-bottom: 2px solid #000000 !important;
	}

	.sheet-title {
		font-size: 1.5rem !important;
		color: #000000 !important;
	}

	.meta-label {
		color: #000000 !important;
	}

	.meta-value {
		border-bottom: 1px dotted #666666 !important;
	}

	.song-section {
		border: 1px solid #999999 !important;
		page-break-inside: avoid !important;
		break-inside: avoid !important;
		margin-bottom: 10px !important;
		padding: 8px !important;
	}

	.section-title-badge {
		background-color: #000000 !important;
		color: #ffffff !important;
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}

	.song-chord-card {
		background: #ffffff !important;
		border: 1px solid #777777 !important;
		page-break-inside: avoid !important;
		break-inside: avoid !important;
	}

	.chord-alert-badge {
		display: none !important;
	}

	.chord-card-name {
		color: #000000 !important;
	}

	.chord-card-note {
		border-top: 1px dotted #888888 !important;
		color: #000000 !important;
	}

	.fret-dot, .barre-pill {
		fill: #000000 !important;
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}

	.sheet-footer {
		border-top: 1px solid #999999 !important;
		color: #555555 !important;
	}
}

/* Responsive mobile */
@media screen and (max-width: 860px) {
	.toolbar-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.toolbar-options {
		justify-content: center;
	}

	.sheet-a4 {
		width: 100%;
		min-height: auto;
		padding: 16px 12px;
	}
}

@media screen and (max-width: 560px) {
	.header-meta-grid {
		grid-template-columns: 1fr;
		gap: 8px 12px;
	}
}
