@font-face { font-family: 'Lignage Marelle 1'; src: url('/font/Marelle1-Regular.ttf'); font-display: swap; }
@font-face { font-family: 'Lignage Luciole'; src: url('/font/Luciole-Regular.woff2'); font-display: swap; }
@font-face { font-family: 'Lignage OpenDyslexic'; src: url('/font/OpenDyslexic-Regular.otf'); font-display: swap; }
@font-face { font-family: 'Lignage Marelle'; src: url('/font/Marelle-Regular.ttf'); font-display: swap; }
@font-face { font-family: 'Lignage Marelle Baton'; src: url('/font/MarelleBaton-Regular.ttf'); font-display: swap; }
[hidden] { display: none !important; }
.open-editor-btn { width: 100%; margin-top: 12px; justify-content: center; }
.lignage-editor { min-width: 0; padding: 12px; border: 1px solid #d7e0e6; border-radius: 18px; background: #fff; }
.editor-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.editor-header h2 { color: #203b4e; font-size: 24px; }
#editorHelp { margin-bottom: 16px; }
#editorActions { max-width: 560px; margin-bottom: 16px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border: 1px solid #d7e0e6; border-radius: 12px; background: #f4f7f9; }
.editor-toolbar label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 700; }
.editor-toolbar input, .editor-toolbar select { font: inherit; max-width: 100%; padding: 8px; border: 1px solid #aebdc7; border-radius: 6px; background: white; color: #17202a; min-height: 44px; }
#editorSize { width: 72px; }
.editor-toolbar input[type=color] { width: 48px; padding: 4px; }
.editor-toolbar [aria-pressed=true] { background: #203b4e; color: white; }
.editor-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 14px 0; }
.editor-sheet-scroll { overflow: auto; scrollbar-gutter: stable; max-height: 80dvh; padding: 8px; background: #eef3f6; border: 1px solid #d7e0e6; border-radius: 8px; }
.editor-sheet { position: relative; margin: 0 auto; background: white; box-shadow: 0 3px 10px #17202a26; flex-shrink: 0; }
.editor-sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.editor-text-layer { z-index: 1; }
/* Le calque affiche les lettres entières ; le champ garde le curseur et la sélection. */
.editor-line { position: absolute; display: block; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; outline: 0; background: transparent; color: transparent; white-space: pre; font-kerning: normal; }
.editor-line:hover { background: #31536b0a; }
.editor-line:focus { outline: 2px solid #bd7200; outline-offset: 1px; background: #ffffff35; }
.editor-toolbar :focus-visible { outline: 3px solid #bd7200; outline-offset: 3px; }
#editorStatus { min-height: 1.5em; margin-top: 8px; }
@media (max-width: 600px) {
    .lignage-editor { padding: 10px; }
    .editor-sheet-scroll { padding: 4px; }
    .editor-pagination .lignage-action { font-size: 14px; padding: 8px; }
}
