
.note-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 3rem;
}

.masonry-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Styles pour la page Mes Notes */

:root {
    --brand-green: var(--accent);
}

/* Page Mes Notes — body, .wrap, .auth* → common-styles.css */

.notes-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--panel-light);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 2px 8px rgba(26, 82, 56, 0.18);
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted, #888);
    pointer-events: none;
}

.notes-stats {
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
    font-weight: 500;
}

.note-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.note-card::-webkit-scrollbar {
    width: 5px;
}

.note-card::-webkit-scrollbar-track {
    background: transparent;
}

.note-card::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.note-card::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.note-card.selected {
    border-color: var(--brand-green);
    border-width: 3px;
    background: rgba(26, 82, 56, 0.04);
    box-shadow: 0 10px 30px rgba(26, 82, 56, 0.15), 0 0 0 1px rgba(26, 82, 56, 0.1) inset;
    cursor: pointer;
}

.note-card.selected:hover {
    transform: translateY(-4px);
    border-color: var(--brand-green);
    box-shadow: 0 12px 30px rgba(26, 82, 56, 0.25), 0 0 0 1px rgba(26, 82, 56, 0.1) inset;
}

/* Thème sombre : doré au lieu du vert (cohérence avec .filters-btn / .filter-color-square) */
body.theme-noir .note-card.selected {
    border-color: var(--accent-gold, #b89e14);
    background: rgba(184, 158, 20, 0.08);
    box-shadow: 0 10px 30px rgba(184, 158, 20, 0.18), 0 0 0 1px rgba(184, 158, 20, 0.15) inset;
}

body.theme-noir .note-card.selected:hover {
    border-color: var(--accent-gold, #b89e14);
    box-shadow: 0 12px 30px rgba(184, 158, 20, 0.28), 0 0 0 1px rgba(184, 158, 20, 0.15) inset;
}

.note-checkbox-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.note-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--brand-green);
}

.note-checkbox:checked {
    filter: hue-rotate(100deg) saturate(1.5);
}

body.theme-noir .note-checkbox {
    accent-color: var(--accent-gold, #b89e14);
}

body.theme-noir .note-checkbox:checked {
    filter: none;
}

/* ══════════════════════════════════════════════════════════════
   Barre de sélection multiple (fixe, en bas de l'écran)
   ══════════════════════════════════════════════════════════════ */
.selection-toolbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10020;
    display: none;
    align-items: center;
    gap: 18px;
    background: var(--panel-light, #fff);
    border: 2px solid var(--brand-green);
    border-radius: 14px;
    padding: 12px 20px;
    box-shadow: 0 8px 28px rgba(26, 82, 56, 0.22), 0 2px 8px rgba(26, 82, 56, 0.12);
    font-family: 'Inter', sans-serif;
    max-width: calc(100vw - 32px);
}

body.theme-noir .selection-toolbar {
    border-color: var(--accent-gold, #b89e14);
    box-shadow: 0 8px 28px rgba(184, 158, 20, 0.22), 0 2px 8px rgba(184, 158, 20, 0.12);
}

#selection-count {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand-green);
    white-space: nowrap;
    flex-shrink: 0;
}

body.theme-noir #selection-count {
    color: var(--accent-gold, #b89e14);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.12));
    background: var(--panel, #F1F5F9);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toolbar-btn:hover {
    background: var(--hover-bg, rgba(0, 0, 0, 0.05));
    border-color: var(--brand-green);
    color: var(--brand-green);
}

.toolbar-btn.delete {
    background: rgba(192, 57, 43, 0.08);
    color: #c0392b;
    border-color: rgba(192, 57, 43, 0.25);
}

.toolbar-btn.delete:hover {
    background: rgba(192, 57, 43, 0.15);
    border-color: #c0392b;
    color: #c0392b;
}

.toolbar-btn.secondary {
    background: transparent;
}

body.theme-noir .toolbar-btn {
    background: var(--panel);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

body.theme-noir .toolbar-btn:hover {
    background: var(--hover-bg, rgba(255, 255, 255, 0.08));
    border-color: var(--accent-gold, #b89e14);
    color: var(--accent-gold, #b89e14);
}

body.theme-noir .toolbar-btn.delete {
    background: rgba(192, 57, 43, 0.15);
    color: #ff8a75;
    border-color: rgba(192, 57, 43, 0.3);
}

body.theme-noir .toolbar-btn.delete:hover {
    background: rgba(192, 57, 43, 0.22);
}

/* Popovers (couleur / tags) déclenchés depuis la barre de sélection —
   rattachées à <body> (pas à .selection-toolbar, voir mes-notes-script.js),
   déplaçables et fermées via une croix, comme les popups d'édition de note
   (position:fixed + .nem-drag-handle, voir js/popup-helpers.js makeDraggable). */
.toolbar-popover {
    position: fixed; /* left/top posés dynamiquement en JS (ouverture + drag) */
    background: var(--panel-light, #fff);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    width: 280px;
    z-index: 10030;
}

.toolbar-popover.hidden {
    display: none;
}

.toolbar-popover-header {
    height: 16px;
    border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    cursor: grab;
    border-radius: 12px 12px 0 0;
    position: relative;
}

/* Petit repère visuel pour signaler que la barre est déplaçable */
.toolbar-popover-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: var(--border-color, rgba(0, 0, 0, 0.15));
}

.toolbar-popover-header:active {
    cursor: grabbing;
}

.toolbar-popover-body {
    padding: 14px;
}

body.theme-noir .toolbar-popover-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Grille des tags (.filter-tag-item, réutilisée telle quelle) : scroll
   vertical si trop nombreux, et tronqués avec ellipse plutôt que de déborder
   de la popover (max-width:280px). */
.toolbar-popover .filter-tags-list {
    max-width: 100%;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
}

.toolbar-popover .filter-tag-item {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Suggestions du champ tag : la popover est étroite (max-width:280px) et
   proche du bas de l'écran (au-dessus de la barre de sélection) — les
   afficher à droite de l'input, ancrées en bas (elles grandissent vers le
   haut) plutôt qu'en dessous où elles déborderaient de la popover. */
.toolbar-popover .nem-tag-sug {
    top: auto;
    bottom: 0;
    left: 100%;
    right: auto;
    margin-top: 0;
    margin-left: 8px;
    width: 200px;
}

.toolbar-popover-btn-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.toolbar-popover-apply {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: var(--brand-green);
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: filter 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.toolbar-popover-apply:hover {
    filter: brightness(0.92);
}

.toolbar-popover-apply:disabled {
    opacity: 0.5;
    cursor: default;
    filter: none;
}

.toolbar-popover-apply.secondary {
    background: transparent;
    color: var(--brand-green);
    border: 1px solid var(--brand-green);
}

.toolbar-popover-apply.secondary:hover {
    background: rgba(26, 82, 56, 0.08);
    filter: none;
}

body.theme-noir .toolbar-popover-apply {
    background: var(--accent-gold, #b89e14);
    color: #1a2628;
}

body.theme-noir .toolbar-popover-apply.secondary {
    background: transparent;
    color: var(--accent-gold, #b89e14);
    border-color: var(--accent-gold, #b89e14);
}

body.theme-noir .toolbar-popover-apply.secondary:hover {
    background: rgba(184, 158, 20, 0.12);
}

body.theme-noir .toolbar-popover {
    background: var(--panel-light);
    border-color: rgba(255, 255, 255, 0.1);
}

.note-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 1;
    visibility: visible;
    transition: all 0.2s ease;
    z-index: 10;
}

.note-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--panel);
}

/* 40x60 -> 56x84 (retour utilisateur : trop petit pour lire le titre sans
   zoomer, alors que l'image source (COVER_SMALL, 160x240) est bien plus
   nette que ça — c'est la taille d'affichage qui manquait, pas la résolution). */
.book-cover-mini {
    width: 56px;
    height: 84px;
    object-fit: cover;
    border-radius: var(--cover-radius, 4px);
    background: var(--panel);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.book-info {
    flex: 1;
    min-width: 0;
}

.book-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.note-date {
    font-size: 0.8rem;
    color: var(--muted, #888);
}

.note-content {
    height: 175px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.selected-text {
    font-style: italic;
    color: var(--text-secondary, #444);
    padding-left: 0.8rem;
    border-left: 4px solid;
    /* Color will be set inline (darkened) */
    font-size: 0.95rem;
    /* Fixed height with scrollbar for overflow */
    display: block;
    height: 73px;
    overflow-y: auto;
    background: var(--hover-bg);
    padding: 0.5rem 0.5rem 0.5rem 0.8rem;
    border-radius: 0 4px 4px 0;
    flex-shrink: 0;
}

/* Wrapper édition inline */
.user-note-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    cursor: pointer;
}

.user-note {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    white-space: pre-wrap;
    word-break: break-word;
}

.note-content:not(:has(.note-tag)) .user-note {
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

/* Crayon */
.note-inline-pencil {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary, #999);
    opacity: 0.25;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 2;
    line-height: 1;
    pointer-events: none;
}

.user-note-wrapper.empty-note .note-inline-pencil {
    top: 0;
    left: 0;
}

.user-note-wrapper.has-content .note-inline-pencil {
    top: 0;
    right: 0;
}

.user-note-wrapper:hover .note-inline-pencil {
    opacity: 1;
    color: var(--accent);
    background: rgba(26, 82, 56, 0.08);
    pointer-events: auto;
}

/* Label "Ajouter une note" uniquement sur note vide au hover */
.note-inline-label {
    display: none;
}

.user-note-wrapper.empty-note:hover .note-inline-label {
    display: inline;
}

/* État édition */
.user-note-wrapper.editing .note-inline-pencil {
    display: none;
}

.user-note-wrapper.editing .user-note {
    display: none;
}

/* Textarea inline */
.user-note-textarea {
    width: 100%;
    height: 100%;
    min-height: 58px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent);
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    font-family: inherit;
    resize: none;
    padding: 0 0 2px 0;
    margin: 0;
    display: block;
    white-space: pre-wrap;
}

/* Tags sur une seule ligne */
.note-tags-line {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    max-height: 22px;
    flex-shrink: 0;
    overflow: hidden;
    align-items: center;
}

.note-tags-line:not(:has(.note-tag)) {
    max-height: 0;
    margin-top: 0;
}





.access-btn {
    font-size: 0.85rem;
    color: var(--brand-green);
    background: rgba(26, 82, 56, 0.08);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 600;
}


.loading-state,
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary, #666);
    font-size: 1.1rem;
}

.color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Scrollbar styling for the excerpt box */
.selected-text::-webkit-scrollbar {
    width: 5px;
}

.selected-text::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.selected-text::-webkit-scrollbar-track {
    background: transparent;
}

.selected-text::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 8px;
}

.selected-text::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18);
}

/* ✅ STYLES PAGINATION → communs dans common-styles.css (.page-ellipsis)
   et Bibliotheque-style.css (.pagination, .page-btn, .page-numbers, .page-number)
   Les classes .pagination-controls, .pagination-btn, etc. ont été supprimées. */

/* .filters-btn / .filters-count (+ états actif et thème sombre)
   -> factorisés dans public/popup-shared.css : bouton "Filtres" commun,
   réutilisé tel quel par la page Auteurs pour garder un look identique. */

/* Base commune des popups de filtres/tri (.filter-modal-overlay/-content/
   -header/-title/-section/-section-title, .popup-stats-section .popup-stats)
   -> voir public/popup-shared.css, chargé sur cette page via cssPaths */

.filter-colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.filter-color-square {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--panel-light);
    box-shadow: 0 0 0 1px var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    padding: 0;
}

.filter-color-square:hover {
    transform: scale(1.1);
}

.filter-color-square.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--panel-light), 0 0 0 4px var(--brand-green);
}

/* Thème sombre : doré au lieu du vert (cohérence avec .filters-btn) */
body.theme-noir .filter-color-square.active {
    box-shadow: 0 0 0 2px var(--panel-light), 0 0 0 4px var(--accent-gold);
}

/* .filter-empty-state, .filter-tags-list, .filter-tag-item (+ thème sombre)
   -> factorisés dans public/popup-shared.css : ce sont des "puces" de filtre
   génériques, réutilisées telles quelles par la popup de filtres de la page Auteurs. */

.filter-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--panel);
}

.popup-stats-section .popup-stats {
    color: var(--text-secondary, #666);
    font-size: 0.85rem;
}


.btn-secondary {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--panel-light);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.btn-primary {
    padding: 8px 16px;
    border: none;
    background: var(--brand-green);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

/* Sélecteur de vue (.view-controls / .view-btn) — style commun avec les
   onglets de Bibliothèque et les dispositions d'Auteurs, voir public/toolbar-shared.css */

/* Kanban / Columns Layout */

.kanban-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding-bottom: 2rem;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

/* Séparateur vertical style gradient entre colonnes */
.kanban-separator {
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    width: 3px;
    z-index: 2;
    background: linear-gradient(to bottom, transparent 0%, #111 10%, #111 90%, transparent 100%);
    pointer-events: none;
    opacity: 0.35;
    left: auto;
}

/* Séparateur horizontal entre les livres dans une même colonne */
.kanban-horizontal-separator {
    width: 80%;
    height: 3px;
    margin: 1.5rem auto;
    background: linear-gradient(to right, transparent 0%, #111 10%, #111 90%, transparent 100%);
    opacity: 0.35;
    pointer-events: none;
}

.kanban-column-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 0.5rem;
}

.kanban-column {
    width: 100%;
    background: var(--hover-bg);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-width: 0;
    overflow: hidden;
}

.kanban-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 1rem 1rem 0.8rem 1rem;
    border-bottom: 2px solid var(--border-color);
    min-height: 50px;
    position: sticky;
    top: 0;
    background: var(--hover-bg);
    z-index: 10;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.column-book-cover {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--cover-radius, 4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: var(--panel);
    flex-shrink: 0;
}

.kanban-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kanban-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-gold-light, #d4af5f);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: capitalize;
    line-height: 1.2;
}

.kanban-count {
    background: transparent;
    padding: 0;
    color: var(--text-secondary, #666);
    font-size: 0.8rem;
    font-weight: 500;
}

.kanban-content {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    flex: 1;
}

.kanban-content::-webkit-scrollbar {
    width: 8px !important;
}

.kanban-content::-webkit-scrollbar-track {
    background: transparent !important;
}

.kanban-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
}

.kanban-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18) !important;
}


/* Scrollbar styling for kanban children */
.kanban-container .kanban-content,
.kanban-container .kanban-column,
.kanban-container .selected-text {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* And override WebKit pseudo-elements for children to neutral thumb */
.kanban-container .kanban-content::-webkit-scrollbar-thumb,
.kanban-container .kanban-column::-webkit-scrollbar-thumb,
.kanban-container .selected-text::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
}

.kanban-container .kanban-content::-webkit-scrollbar-track,
.kanban-container .kanban-column::-webkit-scrollbar-track,
.kanban-container .selected-text::-webkit-scrollbar-track {
    background: transparent !important;
}

/* Adjust Note Card for Kanban */
.kanban-content .note-card {
    border-left: 4px solid var(--note-color, transparent);
    padding: 1rem;
}

/* Updates for compact Kanban cards */
.kanban-content .note-card {
    flex-shrink: 0 !important;
}

.note-card.compact-card {
    gap: 0.5rem;
}

.note-card.compact-card .note-header {
    display: none !important;
}

/* Align relative date to the right for compact (kanban) cards */
.note-card.compact-card>.note-date {
    display: block;
    font-size: 0.8rem;
    color: var(--muted, #999);
    align-self: flex-end;
    padding-right: 0.5rem;
}

/* ===== Mini-panel flottant kanban ===== */
.kanban-note-panel {
    position: fixed;
    z-index: 500000;
    background: var(--panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(8px);
}

.kanban-note-panel.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.knp-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Rond de fond toujours visible (pas seulement au survol) — teinte très
       légère de la couleur propre du bouton (gris pour éditer, rouge pour
       supprimer, cf. .knp-btn--danger) : distingue visuellement les deux
       actions au repos, pas seulement au clic. */
    background: color-mix(in srgb, currentColor 8%, transparent);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

/* Cible tactile agrandie (36px -> 44px, recommandation Apple/WCAG) sur TOUT
   appareil à pointeur tactile — pas seulement le petit mobile (l'ancienne
   règle dans mes-notes-mobile.css ne matchait qu'un écran ≤500px de large ou
   court en paysage, ce qui exclut l'iPad alors que c'est justement l'appareil
   concerné par le signalement "boutons éditer/supprimer trop petits"). Le
   panneau passe aussi en ligne (row) avec plus d'écart : les deux boutons
   étaient collés (gap:2px en colonne), l'un pouvant facilement être touché
   par erreur à la place de l'autre — surtout gênant pour "supprimer". Gap
   encore augmenté (10px -> 20px, retour utilisateur : pas encore assez
   séparé) avec une ligne verticale entre les deux comme repère visuel. */
@media (pointer: coarse) {
    .kanban-note-panel {
        flex-direction: row;
        gap: 20px;
        padding: 6px;
    }
    .knp-btn + .knp-btn::before {
        content: '';
        position: absolute;
        left: -10px;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 24px;
        background: var(--border-color);
    }
    .knp-btn {
        position: relative;
        width: 44px;
        height: 44px;
    }
    .knp-btn svg {
        width: 20px;
        height: 20px;
    }
}

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

.knp-btn--danger { color: #c0392b; }
.knp-btn--danger:hover { background: rgba(192,57,43,0.1); }