/* =============================================================================
   Clone Trello — interface inspirée de Trello
   ============================================================================= */

:root {
    --trello-blue: #0079bf;
    --trello-blue-dark: #026aa7;
    --trello-blue-light: #0c66e4;
    --text: #172b4d;
    --text-subtle: #44546f;
    --text-inverse: #ffffff;
    --text-inverse-subtle: rgba(255, 255, 255, 0.85);
    --surface: #ffffff;
    --surface-raised: #f1f2f4;
    --surface-hover: #f0f1f3;
    --border: #091e4224;
    --border-strong: #091e4221;
    --danger: #ae2e24;
    --danger-bg: #ffebe6;
    --success-bg: #dffcf0;
    --success-text: #216e4e;
    --nav-height: 3rem;
    --radius: 0.5rem;
    --radius-sm: 0.25rem;
    --shadow: 0 1px 1px #091e4240, 0 0 1px #091e424f;
    --shadow-lg: 0 8px 12px #091e4226, 0 0 1px #091e424f;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --board-list-bg: #ffffff3d;
    --board-list-bg-add: #ffffff29;
    --board-header-bg: #ffffff3d;
}

/* Mode sombre */
[data-theme="dark"] {
    --text: #b6c2cf;
    --text-subtle: #9fadbc;
    --text-inverse: #dee4ea;
    --surface: #22272b;
    --surface-raised: #1d2125;
    --surface-hover: #2c333a;
    --border: #a6c5e229;
    --shadow: 0 1px 1px #010c1a40;
    --shadow-lg: 0 8px 12px #010c1a40;
    --board-list-bg: #ffffff14;
    --board-list-bg-add: #ffffff0a;
    --board-header-bg: #ffffff1a;
}

[data-theme="dark"] .page-light {
    background: #1d2125;
}

/* Fond des pages board — style app moderne (accent couleur via --board-bg) */
body.page-board {
    background: var(--surface-raised);
    color: var(--text);
    overflow-x: hidden;
}

[data-theme="dark"] body.page-board {
    background: #161a1d;
    color: var(--text);
}

[data-theme="dark"] .card,
[data-theme="dark"] .calendar-grid-wrap,
[data-theme="dark"] .table-view-wrap,
[data-theme="dark"] .filter-panel,
[data-theme="dark"] .board-menu-panel,
[data-theme="dark"] .calendar-sidebar,
[data-theme="dark"] .archive-section {
    background: var(--surface);
    color: var(--text);
}

[data-theme="dark"] .global-search {
    background: #ffffff14;
    color: var(--text-inverse);
}

[data-theme="dark"] .navbar {
    background: #00000080;
}

[data-theme="dark"] .lists-scroll {
    scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .lists-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .lists-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .lists-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .list-column {
    background: var(--board-list-bg);
}

[data-theme="dark"] .list-column--add {
    background: var(--board-list-bg-add);
}

[data-theme="dark"] .board-title,
[data-theme="dark"] .board-view-switcher {
    background: var(--board-header-bg);
}

/* Surcharges mode sombre — pages tableau style app */
[data-theme="dark"] .page-board .board-title {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .page-board .board-view-switcher {
    background: var(--surface);
    border: 1px solid var(--border);
}

[data-theme="dark"] .page-board .view-tab {
    color: var(--text-subtle);
}

[data-theme="dark"] .page-board .view-tab.is-active {
    background: var(--trello-blue);
    color: #fff;
}

[data-theme="dark"] .page-board .list-column {
    background: var(--surface);
    border: 1px solid var(--border);
}

[data-theme="dark"] .page-board .list-column--add {
    background: var(--surface-raised);
}

[data-theme="dark"] .page-board .list-title {
    color: var(--text);
}

[data-theme="dark"] .page-board .list-btn-archive,
[data-theme="dark"] .page-board .card-btn-archive {
    color: var(--text-subtle);
}

[data-theme="dark"] .page-board .add-list-trigger {
    background: var(--surface-hover);
    color: var(--text);
}

[data-theme="dark"] .view-tab.is-active {
    background: var(--surface);
    color: var(--text);
}

[data-theme="dark"] .calendar-grid-wrap {
    background: var(--surface);
}

[data-theme="dark"] .calendar-cell {
    background: var(--surface-raised);
}

[data-theme="dark"] .calendar-cell--pad {
    background: transparent;
}

[data-theme="dark"] .card-modal-panel {
    background: var(--surface);
    color: var(--text);
}

[data-theme="dark"] .card-modal-title,
[data-theme="dark"] .card-modal-content,
[data-theme="dark"] .checklist-block,
[data-theme="dark"] .comment-item {
    color: var(--text);
}

[data-theme="dark"] .btn-secondary {
    background: var(--surface-hover);
    color: var(--text);
}

[data-theme="dark"] .btn-secondary:hover {
    background: #38414a;
}

[data-theme="dark"] .add-card-input,
[data-theme="dark"] .add-list-input,
[data-theme="dark"] .card-modal-desc,
[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .checklist-add-item input {
    background: var(--surface-raised);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--border);
}

[data-theme="dark"] .cards-table th {
    background: var(--surface-raised);
    color: var(--text);
}

[data-theme="dark"] .notif-item.is-unread {
    background: #0c66e422;
}

[data-theme="dark"] .search-result-item {
    color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* -------------------------------------------------------------------------- */
/* Barre de navigation (style Trello)                                          */
/* -------------------------------------------------------------------------- */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #0000003d;
    backdrop-filter: blur(4px);
    color: var(--text-inverse);
}

.search-wrap {
    flex: 0 1 22rem;
    min-width: 10rem;
    position: relative;
}

.global-search {
    width: 100%;
    padding: 0.35rem 0.65rem;
    border: none;
    border-radius: var(--radius-sm);
    background: #ffffff26;
    color: var(--text-inverse);
    font-size: 0.875rem;
}

.global-search::placeholder { color: var(--text-inverse-subtle); }

.global-search:focus {
    outline: 2px solid #ffffff66;
    background: #ffffff40;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    max-height: 18rem;
    overflow-y: auto;
    z-index: 200;
    padding: 0.35rem 0;
}

.search-result-item {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.search-result-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.search-result-item:hover { background: var(--surface-hover); }

.search-empty {
    padding: 0.75rem;
    margin: 0;
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
}

.theme-toggle-btn:hover { background: #ffffff1a; }

.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* Profil, thème, notifications — alignés à droite */
.navbar-end {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-left: auto;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-inverse);
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.navbar-brand:hover {
    background: #ffffff1a;
    text-decoration: none;
}

.trello-logo {
    width: 1.5rem;
    height: 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 38%, transparent 38%, transparent 62%, #ffffff 62%);
    border-radius: 2px;
    box-shadow: inset 0 0 0 2px #ffffff;
    flex-shrink: 0;
}

.nav-link {
    color: var(--text-inverse);
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s;
}

.nav-link:hover {
    background: #ffffff1a;
    text-decoration: none;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border-radius: 2rem;
    margin-left: 0.25rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.user-chip:hover { background: #ffffff1a; }

.avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #6554c0;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    flex-shrink: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/* Fond pages app (accueil, admin, archives) — style uniforme                   */
/* -------------------------------------------------------------------------- */

.page-home,
.page-light,
.page-board {
    background: var(--surface-raised);
    color: var(--text);
    min-height: 100vh;
}

.page-home .navbar,
.page-light .navbar,
.page-board .navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    backdrop-filter: none;
    color: var(--text);
}

.page-home .navbar-brand,
.page-home .nav-link,
.page-home .global-search,
.page-home .user-name,
.page-light .navbar-brand,
.page-light .nav-link,
.page-light .global-search,
.page-light .user-name,
.page-board .navbar-brand,
.page-board .nav-link,
.page-board .global-search,
.page-board .user-name {
    color: var(--text);
}

.page-home .global-search,
.page-light .global-search,
.page-board .global-search {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--text);
}

.page-home .global-search::placeholder,
.page-light .global-search::placeholder,
.page-board .global-search::placeholder {
    color: var(--text-subtle);
}

.page-home .global-search:focus,
.page-light .global-search:focus,
.page-board .global-search:focus {
    outline: 2px solid #0c66e433;
    background: var(--surface);
}

.page-home .navbar-brand:hover,
.page-home .nav-link:hover,
.page-home .user-chip:hover,
.page-home .theme-toggle-btn:hover,
.page-light .navbar-brand:hover,
.page-light .nav-link:hover,
.page-light .user-chip:hover,
.page-light .theme-toggle-btn:hover,
.page-board .navbar-brand:hover,
.page-board .nav-link:hover,
.page-board .user-chip:hover,
.page-board .theme-toggle-btn:hover,
.page-home .navbar-end .nav-link:hover,
.page-light .navbar-end .nav-link:hover,
.page-board .navbar-end .nav-link:hover {
    background: var(--surface-hover);
}

.page-home .trello-logo,
.page-light .trello-logo,
.page-board .trello-logo {
    background: linear-gradient(180deg, var(--trello-blue) 0%, var(--trello-blue) 38%, transparent 38%, transparent 62%, var(--trello-blue) 62%);
    box-shadow: inset 0 0 0 2px var(--trello-blue);
}

[data-theme="dark"] .page-home,
[data-theme="dark"] .page-light,
[data-theme="dark"] .page-board {
    background: #161a1d;
    color: var(--text);
}

[data-theme="dark"] .page-home .navbar,
[data-theme="dark"] .page-light .navbar,
[data-theme="dark"] .page-board .navbar {
    background: var(--surface);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .page-home .global-search,
[data-theme="dark"] .page-light .global-search,
[data-theme="dark"] .page-board .global-search {
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--border);
}

/* Alias historique page-home */
.page-home {
    background: var(--surface-raised);
    color: var(--text);
    min-height: 100vh;
}


/* Champs modales et panneaux membres */
.page-home input:not([type="submit"]):not([type="button"]):not([type="checkbox"]),
.page-home select,
.page-home textarea,
.home-modal-field input,
.home-modal-field select,
.home-search,
.workspace-invite-form input,
.workspace-invite-form select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.page-home input::placeholder,
.home-search::placeholder {
    color: var(--text-subtle);
    opacity: 1;
}

[data-theme="dark"] .page-home input:not([type="submit"]):not([type="button"]):not([type="checkbox"]),
[data-theme="dark"] .page-home select,
[data-theme="dark"] .home-modal-field input,
[data-theme="dark"] .home-modal-field select,
[data-theme="dark"] .home-search,
[data-theme="dark"] .workspace-invite-form input,
[data-theme="dark"] .workspace-invite-form select {
    background: var(--surface-raised);
    border-color: var(--border);
}

[data-theme="dark"] .home-sidebar {
    background: var(--surface);
}

[data-theme="dark"] .workspace-members-panel {
    background: var(--surface);
    border: 1px solid var(--border);
}

/* Sidebar et en-tête accueil */
.home-sidebar {
    box-shadow: inset -1px 0 0 var(--border);
}

.home-sidebar-add {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    line-height: 1;
}

.home-search-wrap {
    display: flex;
    align-items: center;
}

.home-search {
    width: min(14rem, 40vw);
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-search:focus {
    outline: none;
    border-color: var(--trello-blue);
    box-shadow: 0 0 0 2px #0c66e433;
}

.home-alert {
    margin-bottom: 1rem;
}

#home-ws-members-panel {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

/* Tuiles tableau accueil */
.home-boards-grid {
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 1rem;
}

.board-tile-card {
    position: relative;
}

.board-tile--home {
    flex-direction: column;
    align-items: stretch;
    min-height: 7.5rem;
    padding: 0;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    overflow: hidden;
}

.board-tile--home::after {
    display: none;
}

.board-tile-cover {
    height: 2.75rem;
    flex-shrink: 0;
    position: relative;
}

/* Bandeau couleur du tableau (couverture visuelle) */
.board-tile-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 100%);
    pointer-events: none;
}

.board-tile-actions {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.board-tile-fav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-subtle);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease;
    box-shadow: var(--shadow);
}

.board-tile-fav-btn.is-favorite {
    color: #f5a623;
    opacity: 1;
}

.board-tile-card:hover .board-tile-fav-btn,
.board-tile-fav-btn:focus-visible,
.board-tile-fav-btn.is-favorite {
    opacity: 1;
}

.board-tile-fav-btn:hover {
    background: #fff;
    color: #f5a623;
}

[data-theme="dark"] .board-tile-fav-btn {
    background: var(--surface-raised);
    color: var(--text-subtle);
}

[data-theme="dark"] .board-tile-fav-btn:hover {
    background: var(--surface-hover);
}

.board-tile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease, background 0.12s ease;
    box-shadow: var(--shadow);
}

.board-tile-card:hover .board-tile-menu-btn,
.board-tile-menu-btn:focus-visible {
    opacity: 1;
}

.board-tile-menu-btn:hover {
    background: #fff;
}

.board-tile-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    min-width: 11rem;
    padding: 0.35rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.board-tile-menu-label {
    margin: 0;
    padding: 0.35rem 0.75rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
}

.board-tile-menu-item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}

.board-tile-menu-item:hover {
    background: var(--surface-hover);
}

.board-tile-menu-item.is-current {
    font-weight: 600;
    color: var(--trello-blue);
}

.board-tile-menu-item.is-current::before {
    content: "✓ ";
}

[data-theme="dark"] .board-tile-menu-btn {
    background: var(--surface-raised);
    color: var(--text);
}

[data-theme="dark"] .board-tile-menu-btn:hover {
    background: var(--surface-hover);
}


.board-tile-title {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0.65rem 0.75rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.board-tile--home:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    filter: none;
    text-decoration: none;
}

.board-tile-create--home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 7.5rem;
    padding: 0.75rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-subtle);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.board-tile-create--home::after {
    display: none;
}

.board-tile-create--home:hover {
    border-color: var(--trello-blue);
    background: #0c66e40d;
    color: var(--trello-blue);
    transform: none;
    filter: none;
}

.board-tile-create-icon {
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 400;
}

[data-theme="dark"] .board-tile--home {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .board-tile-create--home:hover {
    background: #0c66e418;
}

/* Modales accueil — finition */
.home-modal-overlay {
    backdrop-filter: blur(2px);
}

.home-modal-panel {
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.home-empty {
    text-align: center;
    color: var(--text-subtle);
    font-size: 0.9rem;
    padding: 2rem 1rem;
}


/* -------------------------------------------------------------------------- */
/* Fond page tableau — style app (Kanban, calendrier, etc.)                    */
/* -------------------------------------------------------------------------- */

.page-board {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text);
}

.board-main {
    flex: 1;
    padding: 1rem 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

/* Libellés calendrier / timeline sur fond app */
.page-board .calendar-month-label,
.page-light .calendar-month-label {
    color: var(--text);
}

.page-board .gantt-toolbar-label,
.page-board .timeline-hint,
.page-board .timeline-empty,
.page-light .gantt-toolbar-label,
.page-light .timeline-hint,
.page-light .timeline-empty {
    color: var(--text-subtle);
}

/* -------------------------------------------------------------------------- */
/* Fond pages utilitaires (admin, archives)                                    */
/* -------------------------------------------------------------------------- */

.page-light {
    background: var(--surface-raised);
    min-height: 100vh;
}

.page-light .main-content {
    padding: 2rem 1.5rem;
    max-width: 68rem;
    margin: 0 auto;
}

.page-light input:not([type="submit"]):not([type="button"]):not([type="checkbox"]),
.page-light select,
.page-light textarea,
.board-menu-workspace select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.page-light input::placeholder {
    color: var(--text-subtle);
    opacity: 1;
}

[data-theme="dark"] .page-light input:not([type="submit"]):not([type="button"]):not([type="checkbox"]),
[data-theme="dark"] .page-light select,
[data-theme="dark"] .page-light textarea,
[data-theme="dark"] .board-menu-workspace select {
    background: var(--surface-raised);
    color: var(--text);
    border-color: var(--border);
    box-shadow: inset 0 0 0 1px var(--border);
}

[data-theme="dark"] .workspace-members-list {
    color: var(--text);
}

/* -------------------------------------------------------------------------- */
/* Sections et titres                                                            */
/* -------------------------------------------------------------------------- */

.section-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 0.75rem;
    color: var(--text);
    opacity: 1;
}

.page-light .section-title,
.page-light h1,
.page-light .page-header h1 {
    color: var(--text);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/* Grille des tableaux                                                         */
/* -------------------------------------------------------------------------- */

.boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
    gap: 0.75rem;
}

.board-tile {
    position: relative;
    display: flex;
    align-items: flex-start;
    min-height: 6rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-inverse);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.25;
    box-shadow: var(--shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    overflow: hidden;
    word-break: break-word;
}

.board-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.15));
    pointer-events: none;
    border-radius: inherit;
}

.board-tile span {
    position: relative;
    z-index: 1;
}

.board-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.05);
    text-decoration: none;
}

.board-tile-create {
    background: #ffffff3d;
    border: none;
    box-shadow: none;
    min-height: 6rem;
    padding: 0;
    display: block;
}

.board-tile-create::after { display: none; }

.board-tile-create:hover {
    background: #ffffff52;
    transform: none;
    filter: none;
}

/* Tuiles accueil — styles prioritaires sur .board-tile générique */
a.board-tile.board-tile--home {
    flex-direction: column;
    align-items: stretch;
    min-height: 7.5rem;
    padding: 0;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

a.board-tile.board-tile--home::after {
    display: none;
}

a.board-tile.board-tile--home:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    filter: none;
    text-decoration: none;
}

.board-tile--home .board-tile-title {
    color: var(--text);
}

[data-theme="dark"] a.board-tile.board-tile--home {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .board-tile--home .board-tile-title {
    color: var(--text);
}

/* Tuile « Créer un tableau » — priorité sur .board-tile / .board-tile-create génériques */
button.board-tile.board-tile-create.board-tile-create--home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 7.5rem;
    padding: 0.75rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-subtle);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

button.board-tile.board-tile-create.board-tile-create--home::after {
    display: none;
}

button.board-tile.board-tile-create.board-tile-create--home:hover {
    border-color: var(--trello-blue);
    background: rgba(12, 102, 228, 0.06);
    color: var(--trello-blue);
    transform: none;
    filter: none;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] button.board-tile.board-tile-create.board-tile-create--home {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] button.board-tile.board-tile-create.board-tile-create--home:hover {
    background: rgba(12, 102, 228, 0.12);
}

.create-board-form {
    padding: 0.65rem 0.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.create-board-form input {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
}

.create-board-form input:focus {
    outline: none;
    border-color: var(--trello-blue);
}

.create-board-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-subtle);
}

/* -------------------------------------------------------------------------- */
/* Cartes / panneaux                                                           */
/* -------------------------------------------------------------------------- */

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: var(--text);
}

.board-header-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.board-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--board-bg, var(--trello-blue));
    box-shadow: var(--shadow);
}

.board-placeholder {
    background: #ffffffeb;
    border-radius: var(--radius);
    padding: 2rem;
    color: var(--text-subtle);
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 32rem;
}

.board-placeholder h2 {
    margin: 0 0 0.5rem;
    color: var(--text);
    font-size: 1.25rem;
}

.board-placeholder .role-badge {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--surface-raised);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-subtle);
    text-transform: capitalize;
}

/* -------------------------------------------------------------------------- */
/* Formulaires et boutons                                                      */
/* -------------------------------------------------------------------------- */

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-subtle);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
    outline: none;
    border-color: var(--trello-blue);
    box-shadow: 0 0 0 1px var(--trello-blue);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, filter 0.12s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--trello-blue);
    color: #fff;
}

.btn-primary:hover { background: var(--trello-blue-dark); }

.btn-secondary {
    background: var(--surface-raised);
    color: var(--text);
}

.btn-secondary:hover { background: #dcdfe4; }

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover { filter: brightness(1.08); }

.btn-ghost {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.page-light .btn-ghost,
.page-board .btn-ghost {
    border-color: var(--border-strong);
    color: var(--text-subtle);
}

.btn-ghost:hover { background: #ffffff1a; }
.page-light .btn-ghost:hover,
.page-board .btn-ghost:hover { background: var(--surface-hover); }

.btn-block { width: 100%; }

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

.hidden { display: none !important; }

.board-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.board-actions form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.board-actions input[type="text"] {
    min-width: 12rem;
}

/* -------------------------------------------------------------------------- */
/* Alertes                                                                     */
/* -------------------------------------------------------------------------- */

.alert {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #ffbdad;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #7ee2b8;
}

/* -------------------------------------------------------------------------- */
/* Authentification                                                            */
/* -------------------------------------------------------------------------- */

.page-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        linear-gradient(160deg, #0c66e4 0%, #0079bf 40%, #026aa7 100%);
}

.auth-wrapper {
    width: 100%;
    max-width: 24rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.auth-logo .trello-logo {
    width: 2.25rem;
    height: 1.85rem;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem 2rem 1.5rem;
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    color: var(--text);
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-subtle);
}

.auth-footer a {
    color: var(--trello-blue);
    font-weight: 600;
}

.auth-footer a:hover { text-decoration: underline; }

/* -------------------------------------------------------------------------- */
/* Administration                                                              */
/* -------------------------------------------------------------------------- */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    font-weight: 600;
    color: var(--text-subtle);
    border-bottom: 2px solid var(--border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: var(--surface-raised);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-admin { background: #6554c0; color: #fff; }
.badge-inactive { background: var(--surface-raised); color: var(--text-subtle); }

.settings-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.settings-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--trello-blue);
}

.api-tokens-list .api-token-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle, #e2e4e9);
}

.api-tokens-list .api-token-row:last-child {
    border-bottom: none;
}

/* -------------------------------------------------------------------------- */
/* Liste archives                                                              */
/* -------------------------------------------------------------------------- */

.archive-list { padding: 0; }

.archive-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.archive-item:last-child { border-bottom: none; }

.archive-item-title {
    font-weight: 600;
    color: var(--text);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-subtle);
}

/* -------------------------------------------------------------------------- */
/* Vue Kanban — listes et cartes                                               */
/* -------------------------------------------------------------------------- */

.kanban-board .board-main,
.kanban-board.board-main {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nav-height));
    padding: 0.5rem 0 0;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.kanban-board .board-header-bar {
    flex-shrink: 0;
    padding: 0 0.75rem;
}

.board-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Onglets de vue (Kanban / Calendrier / Tableau) */
.board-view-switcher {
    display: flex;
    gap: 0.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.2rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.view-tab {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-subtle);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.view-tab:hover {
    background: var(--surface-hover);
    text-decoration: none;
    color: var(--text);
}

.view-tab.is-active {
    background: var(--trello-blue);
    color: #fff;
}

.board-menu {
    position: relative;
}

.board-menu summary {
    list-style: none;
    cursor: pointer;
}

.board-menu summary::-webkit-details-marker { display: none; }

.board-menu-panel {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.35rem;
    min-width: 14rem;
    z-index: 50;
    padding: 0.75rem;
}

.board-menu-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Zone Kanban — occupe tout l'espace sous l'en-tête du board */
.board-canvas {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    position: relative;
    width: 100%;
}

.lists-scroll {
    position: absolute;
    inset: 0;
    overflow-x: scroll;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    scrollbar-color: rgba(9, 30, 66, 0.45) rgba(9, 30, 66, 0.08);
    scrollbar-gutter: stable;
}

.lists-scroll::-webkit-scrollbar {
    height: 12px;
}

.lists-scroll::-webkit-scrollbar-track {
    margin: 0 0.75rem;
    background: rgba(9, 30, 66, 0.08);
    border-radius: 6px;
}

.lists-scroll::-webkit-scrollbar-thumb {
    background: rgba(9, 30, 66, 0.35);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.lists-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(9, 30, 66, 0.55);
    background-clip: padding-box;
}

.lists-track {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.75rem;
    height: 100%;
    padding: 0 0.75rem 0.5rem;
    vertical-align: top;
}

.list-column {
    flex: 0 0 17rem;
    width: 17rem;
    flex-shrink: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.list-column--add {
    background: var(--surface-raised);
    border-style: dashed;
    flex: 0 0 17rem;
    min-height: 2.5rem;
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.6rem;
    cursor: grab;
    gap: 0.35rem;
}

.list-column--unassigned {
    border-style: dashed;
    border-color: #f5a62388;
    background: #fff8e8;
}

[data-theme="dark"] .list-column--unassigned {
    background: #2a2418;
    border-color: #f5a62355;
}

.list-column--unassigned .list-title {
    color: #b8860b;
}

[data-theme="dark"] .list-column--unassigned .list-title {
    color: #f5a623;
}

.list-header-actions {
    position: relative;
    flex-shrink: 0;
}

.list-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-subtle);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease, background 0.12s ease;
}

.list-column:hover .list-menu-btn,
.list-menu-btn:focus-visible {
    opacity: 1;
}

.list-menu-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.list-menu {
    position: absolute;
    top: calc(100% + 0.2rem);
    right: 0;
    min-width: 10rem;
    padding: 0.35rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 20;
}

.list-menu-item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}

.list-menu-item:hover {
    background: var(--surface-hover);
}

.list-menu-item--danger {
    color: var(--danger);
}

.list-menu-item--danger:hover {
    background: var(--danger-bg);
}

.list-header:active { cursor: grabbing; }

.list-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    padding: 0.25rem 0.35rem;
    border-radius: var(--radius-sm);
}

.list-title:hover { background: var(--surface-hover); }

.list-btn-archive,
.card-btn-archive {
    background: transparent;
    border: none;
    color: var(--text-subtle);
    opacity: 0.6;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
}

.list-btn-archive:hover,
.card-btn-archive:hover {
    opacity: 1;
    background: var(--surface-hover);
}

.list-cards {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.5rem;
    min-height: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-item {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.6rem;
    box-shadow: var(--shadow);
    cursor: grab;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.35;
}

.card-item:active,
.card-item.card-dragging {
    cursor: grabbing;
}

.card-item .card-item-title { cursor: inherit; }
.card-item .card-item-title:active { cursor: inherit; }

.card-cover-img {
    display: block;
    width: calc(100% + 1.2rem);
    margin: -0.5rem -0.6rem 0.35rem;
    max-height: 5rem;
    object-fit: cover;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    pointer-events: none;
    user-select: none;
}

.card-item--cover .card-cover-img {
    margin-top: -0.35rem;
}

.card-item--cover {
    padding-top: 0.35rem;
}

.card-item-title {
    display: block;
    word-break: break-word;
}

/* Bandes colorées des étiquettes sur la carte (vue board) */
.card-item-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}

.card-label-stripe {
    display: inline-block;
    width: 2.5rem;
    height: 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.card-btn-archive {
    position: absolute;
    top: 0.15rem;
    right: 0.15rem;
    color: var(--text-subtle);
    opacity: 0;
    font-size: 0.95rem;
}

.card-item:hover .card-btn-archive { opacity: 0.7; }

.card-ghost {
    opacity: 0.4;
    background: var(--surface-raised);
}

.card-dragging {
    transform: rotate(2deg);
    box-shadow: var(--shadow-lg);
}

.list-ghost {
    opacity: 0.5;
}

.add-card-form {
    padding: 0 0.5rem 0.5rem;
    margin-top: 0.5rem; /* même espace qu'entre les cartes (gap de .list-cards) */
}

.add-card-input {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    resize: none;
    box-shadow: var(--shadow);
    margin-bottom: 0.35rem;
}

.add-card-input:focus {
    outline: 2px solid var(--trello-blue);
}

.add-list-form { padding: 0.5rem; }

.add-list-trigger {
    width: 100%;
    padding: 0.5rem;
    background: var(--surface-hover);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-subtle);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}

.add-list-trigger:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--trello-blue);
}

.add-list-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-list-input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    box-shadow: var(--shadow);
}

.add-list-actions {
    display: flex;
    gap: 0.35rem;
}

.inline-edit-input {
    width: 100%;
    padding: 0.25rem 0.35rem;
    border: 2px solid var(--trello-blue);
    border-radius: var(--radius-sm);
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
}

/* -------------------------------------------------------------------------- */
/* Modales — détail carte (centrée) et membres (latérale)                      */
/* -------------------------------------------------------------------------- */

.card-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.card-modal.hidden { display: none; }

.card-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 30, 66, 0.72);
}

/* Fenêtre centrée — détail carte */
.card-modal--center:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.card-modal--center .card-modal-panel {
    position: relative;
    z-index: 1;
    width: min(90vw, 90vw);
    max-width: none;
    max-height: 92vh;
    height: auto;
    background: var(--surface-raised);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 12px 40px rgba(9, 30, 66, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 900px) {
    .card-modal--center .card-modal-panel {
        width: 88vw;
    }
}

@media (min-width: 1400px) {
    .card-modal--center .card-modal-panel {
        width: 85vw;
    }
}

.card-modal--center .card-modal-content {
    overflow-y: auto;
    flex: 1;
    padding: 0 0 1.5rem;
    color: var(--text);
}

.card-modal-cover-banner {
    width: 100%;
    max-height: 10rem;
    overflow: hidden;
    background: #091e4214;
}

.card-modal-cover-banner img {
    display: block;
    width: 100%;
    height: 10rem;
    object-fit: cover;
}

.card-modal-cover-banner--color {
    height: 2.5rem;
}

.card-modal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem 0;
    gap: 0.75rem;
}

.card-modal-list-badge {
    font-size: 0.82rem;
    color: var(--text-subtle);
}

.card-modal-list-badge strong {
    color: var(--text);
    font-weight: 600;
}

.card-modal-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 26rem);
    gap: 1.25rem;
    align-items: start;
    padding: 0.75rem 1.25rem 0;
}

@media (min-width: 1200px) {
    .card-modal-body-grid {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 30rem);
    }
}

.card-modal-main {
    min-width: 0;
}

.card-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.card-modal-title-icon,
.card-title-complete {
    flex-shrink: 0;
    margin-top: 0.2rem;
    cursor: pointer;
    user-select: none;
}

.card-title-complete input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.card-title-complete-mark {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid #dfe1e6;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.card-title-complete:hover .card-title-complete-mark {
    border-color: #b3bac5;
    background: #f4f5f7;
}

.card-title-complete input:checked + .card-title-complete-mark {
    background: #61bd4f;
    border-color: #519839;
}

.card-title-complete input:checked + .card-title-complete-mark::after {
    content: '✓';
}

.card-title-complete--readonly {
    cursor: default;
    pointer-events: none;
}

.card-title-complete--readonly.is-complete .card-title-complete-mark {
    background: #61bd4f;
    border-color: #519839;
}

.card-title-complete--readonly.is-complete .card-title-complete-mark::after {
    content: '✓';
}

.card-modal-title--complete {
    text-decoration: line-through;
    color: var(--text-subtle);
}

[data-theme="dark"] .card-title-complete-mark {
    border-color: #596773;
}

[data-theme="dark"] .card-title-complete:hover .card-title-complete-mark {
    border-color: #738496;
    background: #2c333a;
}

.card-modal-quick-actions,
.card-modal-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    position: relative;
}

.card-modal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.85rem;
}

.card-modal-meta .card-modal-labels--row {
    margin-bottom: 0;
}

.card-modal-members-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 1.75rem;
    gap: 0;
}

.card-modal-members-row .card-member-bubble {
    margin-left: -0.35rem;
    border: 2px solid var(--surface, #fff);
    box-shadow: 0 0 0 1px rgba(9, 30, 66, 0.08);
    position: relative;
    z-index: 1;
}

.card-modal-members-row .card-member-bubble:first-child {
    margin-left: 0;
    z-index: 2;
}

.card-modal-members-row .card-member-bubble:nth-child(2) { z-index: 3; }
.card-modal-members-row .card-member-bubble:nth-child(3) { z-index: 4; }
.card-modal-members-row .card-member-bubble:nth-child(4) { z-index: 5; }

.card-members-popover-wrap {
    position: relative;
    display: inline-flex;
    margin-left: 0.15rem;
    z-index: 6;
}

.card-members-popover-wrap .card-popover {
    left: 0;
    min-width: 12rem;
}

.member-add-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 2px dashed var(--border);
    background: transparent;
    color: var(--text-subtle);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.member-add-btn:hover,
.member-add-btn.is-popover-open {
    border-color: var(--trello-blue);
    border-style: solid;
    color: var(--trello-blue);
    background: rgba(12, 102, 228, 0.06);
}

.card-meta-due {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
}

.card-popover-wrap {
    position: relative;
}

.card-popover {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 30;
    min-width: 14rem;
    max-width: min(18rem, 92vw);
    padding: 0.75rem;
    background: var(--surface, #fff);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(9, 30, 66, 0.18), 0 0 1px rgba(9, 30, 66, 0.2);
    border: 1px solid var(--border);
}

.card-action-pill.is-popover-open {
    background: #dfe1e6;
}

.card-popover-title {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-popover-hint {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    color: var(--text-subtle);
}

.card-popover-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.65rem;
    font-size: 0.82rem;
}

.card-popover-field input[type="datetime-local"],
.card-popover-field input[type="text"],
.card-popover-field input[type="file"] {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
}

.card-popover-checkbox {
    margin-bottom: 0;
}

.label-popover-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 16rem;
    overflow-y: auto;
}

.label-popover-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    text-align: left;
    color: var(--text);
}

.label-popover-item:hover {
    background: var(--surface-hover, #ebecf0);
}

.label-popover-color {
    flex-shrink: 0;
    width: 2rem;
    height: 1.35rem;
    border-radius: 4px;
}

.label-popover-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.label-popover-check {
    color: var(--trello-blue);
    font-weight: 700;
}

.label-popover-item.is-on .label-popover-color {
    outline: 2px solid var(--text);
    outline-offset: 1px;
}

.member-popover-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.member-popover-btn {
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.member-popover-btn.is-on {
    border-color: var(--trello-blue);
    box-shadow: 0 0 0 2px rgba(12, 102, 228, 0.2);
}

.member-popover-btn:hover {
    transform: scale(1.06);
}

#popover-cover .cover-color-picker {
    margin-bottom: 0.75rem;
}

#popover-cover .cover-image-form {
    margin-top: 0.25rem;
}

.btn-block {
    width: 100%;
}

[data-theme="dark"] .card-popover {
    background: var(--surface-raised);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.card-action-pill {
    border: none;
    background: var(--surface-hover, #ebecf0);
    color: var(--text);
    border-radius: var(--radius-sm, 4px);
    padding: 0.4rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
}

.card-action-pill:hover {
    background: #dfe1e6;
}

.card-modal-labels--row {
    margin-bottom: 1rem;
}

.card-modal-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
}

.card-modal-section-title .section-icon {
    width: 1.35rem;
    text-align: center;
    color: var(--text-subtle);
    flex-shrink: 0;
}

.card-modal-slot:empty {
    display: none;
}

.card-modal-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.card-modal-sidebar-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

#toggle-activity-btn {
    flex-shrink: 0;
    font-size: 0.75rem;
    white-space: nowrap;
}

.sidebar-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-logs-feed.hidden {
    display: none;
}

.activity-logs-title {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
}

.comment-feed-item--clickable {
    cursor: pointer;
    border-radius: var(--radius-sm, 4px);
    padding: 0.35rem;
    margin: -0.35rem;
    transition: background 0.12s;
}

.comment-feed-item--clickable:hover,
.comment-feed-item--clickable:focus {
    background: rgba(9, 30, 66, 0.06);
    outline: none;
}

.comment-feed-body {
    overflow: visible;
}

.comment-feed-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 0.35rem 0;
    cursor: zoom-in;
}

.comment-feed-edit-btn {
    margin-left: auto;
    padding: 0;
    border: none;
    background: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--trello-blue);
    cursor: pointer;
    text-decoration: underline;
}

.comment-feed-edit-btn:hover {
    color: var(--trello-blue-dark, #026aa7);
}

/* Fenêtre agrandie — lecture / édition d'un commentaire */
.comment-view-modal {
    position: fixed;
    inset: 0;
    z-index: 350;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.comment-view-modal.hidden {
    display: none;
}

.comment-view-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 30, 66, 0.55);
}

.comment-view-panel {
    position: relative;
    z-index: 1;
    width: min(92vw, 40rem);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: var(--surface-raised, #fff);
    color: var(--text, #172b4d);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 12px 40px rgba(9, 30, 66, 0.35);
    overflow: hidden;
}

.comment-view-close {
    position: absolute;
    top: 0.6rem;
    right: 0.65rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-subtle);
    border-radius: var(--radius-sm, 4px);
    z-index: 2;
}

.comment-view-close:hover {
    background: var(--surface-hover, #ebecf0);
}

.comment-view-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1.25rem 0.5rem;
}

.comment-view-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--trello-blue, #0c66e4);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comment-view-header strong {
    display: block;
    font-size: 0.95rem;
}

.comment-view-header time {
    font-size: 0.78rem;
    color: var(--text-subtle);
}

.comment-item--solution {
    /* cadre solution géré par .comment-bubble */
}

.comment-view-body {
    flex: 1;
    overflow-y: auto;
    margin: 0 1.25rem 1rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(9, 30, 66, 0.08);
}

.comment-view-body img {
    max-width: 100%;
    height: auto;
}

.comment-view-editor-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.25rem 0.5rem;
}

.comment-view-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--border, #dfe1e6);
}

.comment-view-footer .btn {
    color: var(--text, #172b4d);
}

.comment-view-footer .btn-ghost {
    background: #fff;
    color: var(--text, #172b4d);
    border: 1px solid #091e424d;
    font-weight: 600;
}

.comment-view-footer .btn-ghost:hover {
    background: #ebecf0;
    border-color: var(--trello-blue, #0c66e4);
    color: var(--trello-blue, #0c66e4);
}

.comment-view-footer .btn-secondary {
    background: #ebecf0;
    color: var(--text, #172b4d);
    border: 1px solid #091e4229;
}

.comment-view-delete {
    color: #b04632 !important;
    margin-right: auto;
    font-weight: 600;
}

.card-modal-sidebar {
    background: var(--surface-muted, #f4f5f7);
    border-radius: var(--radius-md, 8px);
    padding: 0.85rem 1rem 1rem;
    position: sticky;
    top: 0;
    max-height: calc(92vh - 6rem);
    overflow-y: auto;
}

.comment-form--sidebar {
    margin-bottom: 1rem;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.activity-feed-empty {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-subtle);
}

.activity-feed-item {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.activity-feed-avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--trello-blue, #0c66e4);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-feed-avatar--system {
    background: #dfe1e6;
    color: var(--text-subtle);
    font-size: 0.75rem;
}

.activity-feed-body {
    flex: 1;
    min-width: 0;
}

.activity-feed-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    width: 100%;
}

.activity-feed-meta strong {
    color: var(--text);
}

.activity-feed-meta time {
    color: var(--text-subtle);
    font-size: 0.75rem;
}

.activity-feed-text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text);
    word-break: break-word;
}

.activity-feed-item--comment .activity-feed-meta {
    margin-bottom: 0.35rem;
}

.activity-feed-item--comment .comment-bubble {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    box-shadow: 0 1px 0 rgba(9, 30, 66, 0.08);
}

.activity-feed-item--comment.comment-item--solution .comment-bubble {
    border-color: #61bd4f;
    background: rgba(97, 189, 79, 0.06);
}

.activity-feed-item--comment .comment-body {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text);
    word-break: break-word;
}

.activity-feed-item--comment .comment-timers-on-comment {
    margin-top: 0.4rem;
    padding-left: 0.1rem;
}

[data-theme="dark"] .activity-feed-item--comment .comment-bubble {
    background: var(--surface-raised, #22272b);
    border-color: var(--border);
    box-shadow: none;
}

[data-theme="dark"] .activity-feed-item--comment.comment-item--solution .comment-bubble {
    background: rgba(97, 189, 79, 0.1);
}

.activity-feed-item--imported .activity-feed-text,
.activity-feed-item--log .activity-feed-text,
.activity-feed-item--history .activity-feed-text {
    color: var(--text-subtle);
}

.activity-feed-item--comment .comment-body {
    margin: 0;
}

@media (max-width: 800px) {
    .card-modal-body-grid {
        grid-template-columns: 1fr;
    }

    .card-modal-sidebar {
        position: static;
        max-height: none;
    }
}

.card-modal--center .card-modal-close {
    top: 0.65rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-modal--center .card-modal-close:hover {
    background: var(--surface-hover, #ebecf0);
    color: var(--text);
}

/* Panneau latéral — membres du tableau */
.card-modal--side:not(.hidden) {
    display: flex;
    justify-content: flex-end;
}

.card-modal--side .card-modal-panel {
    position: relative;
    width: 100%;
    max-width: 30rem;
    height: 100%;
    background: var(--surface-raised);
    box-shadow: -4px 0 24px #091e4240;
    overflow-y: auto;
    z-index: 1;
}

.card-modal--side .card-modal-content {
    padding: 1rem 1.25rem 2rem;
    color: var(--text);
}

.card-modal--side .card-modal-close {
    top: 0.65rem;
    right: 0.75rem;
}

.card-modal-close {
    position: absolute;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-subtle);
    z-index: 2;
}

.card-modal-list {
    font-size: 0.8rem;
    color: var(--text-subtle);
    text-decoration: underline;
}

.card-modal-title {
    margin: 0;
    flex: 1;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    outline: none;
}

.card-modal-section {
    margin-bottom: 1.25rem;
}

.card-modal-section h3:not(.card-modal-section-title) {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
}

.card-modal-desc {
    width: 100%;
    min-height: 5rem;
    padding: 0.6rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    box-shadow: var(--shadow);
    line-height: 1.45;
}

.card-modal-row input[type="datetime-local"] {
    padding: 0.45rem 0.6rem;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    font-family: inherit;
}

.card-modal-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.label-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 2.5rem;
    min-height: 1.5rem;
}

.label-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.label-swatch {
    width: 2rem;
    height: 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.12s, transform 0.12s;
}

.label-swatch.is-on,
.label-swatch:hover {
    opacity: 1;
    transform: scale(1.05);
    outline: 2px solid var(--text);
    outline-offset: 1px;
}

.checklist-block {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
}

.checklist-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.checklist-head-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.checklist-delete {
    color: var(--text-subtle);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.15rem 0.35rem;
}

.checklist-delete:hover {
    color: var(--danger, #eb5a46);
}

.checklist-progress {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.checklist-bar {
    height: 0.35rem;
    background: var(--surface-raised);
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.checklist-bar-fill {
    height: 100%;
    background: var(--trello-blue);
    border-radius: 1rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    cursor: pointer;
}

.checklist-item .is-done {
    text-decoration: line-through;
    color: var(--text-subtle);
}

.checklist-add-item {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.checklist-add-item input {
    flex: 1;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1px var(--border);
}

.comments-list { margin-bottom: 0.75rem; }

.comment-item {
    background: var(--surface);
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow);
}

.comment-item p { margin: 0.35rem 0 0; font-size: 0.875rem; }

.comment-date {
    font-size: 0.7rem;
    color: var(--text-subtle);
    margin-left: 0.5rem;
}

.comment-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    margin-bottom: 0.35rem;
    box-shadow: var(--shadow);
}

.card-modal-activity ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.card-modal-activity time {
    font-size: 0.7rem;
    color: var(--text-subtle);
}

/* -------------------------------------------------------------------------- */
/* Notifications navbar                                                        */
/* -------------------------------------------------------------------------- */

.notif-wrap {
    position: relative;
    margin-left: auto;
}

.notif-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.35rem 0.5rem;
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #eb5a46;
    color: #fff;
    font-size: 0.65rem;
    min-width: 1rem;
    height: 1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.2rem;
}

.notif-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.35rem);
    width: min(22rem, 90vw);
    max-height: 24rem;
    overflow-y: auto;
    z-index: 200;
    padding: 0.5rem 0;
}

.notif-item {
    display: block;
    padding: 0.6rem 0.85rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
}

.notif-item:hover { background: var(--surface-hover); }

.notif-item.is-unread {
    background: rgba(0, 121, 191, 0.08);
    font-weight: 600;
}

.notif-item p {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--text-subtle);
}

.notif-item time {
    font-size: 0.7rem;
    color: var(--text-subtle);
}

.notif-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-subtle);
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Chronomètre actif dans la barre de navigation                               */
/* -------------------------------------------------------------------------- */
.navbar-timer {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 8px;
    padding: 0.2rem 0.45rem;
    margin-right: 0.4rem;
    max-width: min(26rem, 38vw);
    font-size: 0.85rem;
}

.navbar-timer.hidden { display: none; }

.navbar-timer-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #61bd4f;
    box-shadow: 0 0 0 0 rgba(97, 189, 79, 0.7);
    animation: navbar-timer-pulse 1.8s infinite;
    flex-shrink: 0;
}

.navbar-timer-dot.is-paused {
    background: #f2a93b;
    animation: none;
}

@keyframes navbar-timer-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(97, 189, 79, 0.6); }
    70%  { box-shadow: 0 0 0 6px rgba(97, 189, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(97, 189, 79, 0); }
}

.navbar-timer-card {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    padding: 0 0.15rem;
}

.navbar-timer-card:hover .navbar-timer-title {
    text-decoration: underline;
}

.navbar-timer-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 22rem;
}

.navbar-timer-elapsed {
    font-size: 0.72rem;
    color: var(--text-subtle, #6b778c);
    font-variant-numeric: tabular-nums;
}

.navbar-timer-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    padding: 0.15rem 0.4rem;
    font-size: 0.85rem;
    line-height: 1;
    color: var(--text, #172b4d);
}

.navbar-timer-btn:hover { background: var(--surface-hover, #f4f5f7); }
.navbar-timer-btn:disabled { opacity: 0.5; cursor: default; }

.navbar-timer-restart:hover { color: #61bd4f; }
.navbar-timer-stop:hover { color: #eb5a46; }
.navbar-timer-menu:hover { background: var(--surface-hover, #f4f5f7); }

.navbar-timer-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 0.35rem);
    width: min(22rem, 90vw);
    max-height: 24rem;
    overflow-y: auto;
    z-index: 200;
    padding: 0.35rem 0;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    text-align: left;
}

.navbar-timer-dropdown.hidden { display: none; }

.navbar-timer-dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-subtle, #6b778c);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.4rem 0.75rem 0.25rem;
}

.navbar-timer-task {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border, #dfe1e6);
    text-align: left;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: inherit;
}

.navbar-timer-task:last-child { border-bottom: none; }
.navbar-timer-task:hover { background: var(--surface-hover, #f4f5f7); }

.navbar-timer-task-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-timer-task-range {
    font-size: 0.75rem;
    color: var(--text-subtle, #6b778c);
}

.navbar-timer-empty {
    padding: 0.75rem;
    text-align: center;
    color: var(--text-subtle, #6b778c);
    margin: 0;
}

@media (max-width: 720px) {
    .navbar-timer { max-width: 60vw; }
    .navbar-timer-title { max-width: 9rem; }
}


/* -------------------------------------------------------------------------- */
/* Membres board                                                               */
/* -------------------------------------------------------------------------- */

.presence-badge {
    font-size: 0.75rem;
    color: #61bd4f;
    margin-right: 0.5rem;
}

.members-panel { max-width: 28rem; }

.invite-form-hint { font-size: 0.82rem; margin: -0.25rem 0 1rem; }
.members-pending-title { font-size: 0.95rem; margin: 1.25rem 0 0.5rem; color: var(--text-subtle); }
.members-list--pending .member-row--pending { opacity: 0.9; }
.members-flash { margin-bottom: 1rem; font-size: 0.9rem; }
.register-invite-banner { margin-bottom: 1rem; line-height: 1.45; }
.invite-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 1rem 0;
}

.invite-form input,
.invite-form select {
    flex: 1;
    min-width: 8rem;
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1px var(--border);
}

.members-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.member-email {
    display: block;
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.member-role {
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* -------------------------------------------------------------------------- */
/* Vue Calendrier                                                              */
/* -------------------------------------------------------------------------- */

.calendar-board.board-main {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--nav-height));
    padding: 0.5rem 1.25rem 2rem;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Libellés calendrier / timeline — toujours lisibles sur fond app */
.calendar-month-label {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
    min-width: 10rem;
    text-align: center;
}

.calendar-layout {
    display: grid;
    grid-template-columns: 1fr min(16rem, 28vw);
    gap: 1rem;
    align-items: start;
}

.calendar-grid-wrap {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-subtle);
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-cell {
    min-height: 5.5rem;
    background: var(--surface-raised);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
    border: 2px solid transparent;
}

.calendar-cell--pad {
    background: transparent;
    min-height: 0;
}

.calendar-cell.is-today {
    border-color: var(--trello-blue);
}

.calendar-cell.is-drag-over,
.calendar-no-date.is-drag-over {
    background: #0079bf22;
    border-color: var(--trello-blue);
}

.calendar-day-num {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-subtle);
    margin-bottom: 0.2rem;
}

.calendar-day-cards {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.cal-card {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    text-align: left;
    padding: 0.2rem 0.35rem;
    border: none;
    border-radius: 4px;
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: 0.7rem;
    cursor: pointer;
    color: var(--text);
}

.cal-card:hover { background: var(--surface-hover); }

.cal-card--slot {
    background: rgba(12, 102, 228, 0.1);
    border-left: 3px solid #0c66e4;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.cal-card--due {
    border-left: 3px solid #61bd4f;
}

.cal-slot-time {
    font-size: 0.68rem;
    font-weight: 700;
    color: #0c66e4;
}

.cal-card-badge {
    font-size: 0.7rem;
    flex-shrink: 0;
}

.cal-card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-label-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.calendar-sidebar {
    padding: 0.75rem 1rem;
}

.calendar-sidebar h3 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}

.calendar-no-date {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 3rem;
}

.cal-card--sidebar { font-size: 0.8rem; }

/* -------------------------------------------------------------------------- */
/* Vue Tableau (Table)                                                         */
/* -------------------------------------------------------------------------- */

.table-board.board-main {
    padding: 0.5rem 1.25rem 2rem;
    min-height: calc(100vh - var(--nav-height));
}

.table-view-wrap {
    overflow-x: auto;
    padding: 0;
    color: var(--text);
}

.table-board .cards-table th,
.table-board .cards-table td {
    color: var(--text);
}

.cards-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.cards-table th,
.cards-table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cards-table th {
    background: var(--surface-raised);
    font-weight: 700;
    position: sticky;
    top: 0;
}

.cards-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.cards-table th.sortable:hover {
    background: var(--surface-hover);
}

.table-card-row {
    cursor: pointer;
}

.table-card-row:hover {
    background: var(--surface-hover);
}

.table-labels {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
}

.text-muted {
    color: var(--text-subtle);
}

.table-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-subtle);
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Phase 6 — Filtres, archives, modèles                                        */
/* -------------------------------------------------------------------------- */

.card-item.is-filtered-out { display: none !important; }

.filter-overlay {
    position: fixed;
    inset: 0;
    background: #00000066;
    z-index: 150;
}

.filter-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 160;
    width: min(22rem, 92vw);
    max-height: 85vh;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.filter-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.filter-panel-head h2 { margin: 0; font-size: 1rem; }

.filter-field {
    display: block;
    margin-bottom: 0.85rem;
}

.filter-field > span,
.filter-field legend {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-subtle);
}

.filter-field input,
.filter-field select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1px var(--border);
}

.filter-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.filter-label-chip {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: var(--radius-sm);
}

.filter-label-chip input { display: none; }

.filter-label-chip:has(input:checked) {
    box-shadow: 0 0 0 2px var(--trello-blue);
}

.board-archives-content {
    display: grid;
    gap: 1rem;
    max-width: 40rem;
}

.archive-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.archive-restore-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.archive-restore-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.create-board-template-label {
    display: block;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.create-board-template-label select {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
}

.board-tile-create--wide { grid-column: span 1; }

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .user-name { display: none; }

    .navbar-end {
        order: 2;
        margin-left: auto;
    }

    .navbar-links {
        order: 3;
        width: 100%;
    }

    .search-wrap {
        max-width: none;
        order: 4;
        width: 100%;
        flex: 1 1 100%;
    }

    .navbar {
        flex-wrap: wrap;
        height: auto;
        min-height: var(--nav-height);
        padding: 0.5rem 0.75rem;
    }

    .list-column {
        flex: 0 0 16rem;
        width: 16rem;
        min-width: 16rem;
        max-width: none;
    }

    .card-item {
        padding: 0.65rem 0.75rem;
        min-height: 2.75rem;
    }

    .card-btn-archive,
    .list-btn-archive {
        opacity: 0.85;
        min-width: 2rem;
        min-height: 2rem;
    }

    .board-header-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .board-header-actions {
        margin-left: 0;
        flex-wrap: wrap;
    }

    .calendar-layout {
        grid-template-columns: 1fr;
    }

    .board-view-switcher {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .boards-grid {
        grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    }

    .home-main,
    .page-light .main-content {
        padding: 1.25rem 1rem 2rem;
    }

    .auth-card { padding: 1.5rem 1.25rem; }
}

/* -------------------------------------------------------------------------- */
/* Backlog — cartes enrichies, timeline, pièces jointes                      */
/* -------------------------------------------------------------------------- */

.card-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}

.card-due-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    line-height: 1.3;
}

.card-due-badge--overdue {
    background: var(--danger-bg);
    color: var(--danger);
}

.card-due-badge--soon {
    background: #fff7e6;
    color: #b65c02;
}

.card-due-badge--ok {
    background: var(--success-bg);
    color: var(--success-text);
}

.card-due-badge--complete {
    background: #61bd4f;
    color: #fff;
}

.card-item-title--complete {
    text-decoration: line-through;
    color: var(--text-subtle);
}

.card-attachment-badge {
    font-size: 0.7rem;
    color: var(--text-subtle);
    white-space: nowrap;
}

.card-time-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-subtle);
    background: var(--surface-raised, #ebecf0);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
}

.card-time-badge--over {
    color: var(--danger);
    background: var(--danger-bg);
}

/* Ligne temps passé/prévu sous le titre de la carte Kanban */
.card-time-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.4rem;
    padding: 0.25rem 0.4rem;
    border-radius: var(--radius-sm);
    background: #e4f0f6;
    color: #055a8c;
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.card-time-line-icon {
    flex-shrink: 0;
}

.card-time-line-values {
    white-space: nowrap;
}

.card-time-line--over {
    background: var(--danger-bg, #fbeaeb);
    color: var(--danger, #c9372c);
}

[data-theme="dark"] .card-time-line {
    background: rgba(0, 121, 191, 0.25);
    color: #8bbdd9;
}

[data-theme="dark"] .card-time-line--over {
    background: rgba(201, 55, 44, 0.25);
    color: #f5a8a2;
}

.board-tile-time {
    display: block;
    margin-top: 0.35rem;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.92);
    color: #055a8c;
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    box-shadow: var(--shadow);
    width: fit-content;
    max-width: 100%;
}

[data-theme="dark"] .board-tile-time {
    background: rgba(34, 39, 43, 0.92);
    color: #8bbdd9;
}

.card-due-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.card-members-row {
    display: flex;
    gap: 0.15rem;
    margin-left: auto;
}

.avatar--xs {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.55rem;
    line-height: 1.35rem;
}

/* Timeline Gantt */
.gantt-view {
    padding: 0.5rem 1.25rem 2rem;
}

.gantt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.gantt-toolbar-scales {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.gantt-period-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.gantt-period-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    min-width: 10rem;
    text-align: center;
    padding: 0 0.25rem;
}

.gantt-nav-btn {
    font-size: 1.1rem;
    line-height: 1;
    min-width: 2rem;
}

.timeline-period-empty {
    text-align: center;
    color: var(--text-subtle);
    font-size: 0.9rem;
    padding: 1.5rem 1rem;
}

.timeline-period-empty.hidden {
    display: none;
}

.gantt-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - 12rem);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.gantt-chart {
    width: 100%;
    min-width: 100%;
}

.gantt-axis-hour {
    position: absolute;
    top: 0;
    height: 100%;
    padding: 0.35rem 0.15rem;
    font-size: 0.65rem;
    color: var(--text-subtle);
    border-left: 1px solid var(--border);
    white-space: nowrap;
    transform: translateX(-50%);
}

.gantt-axis-weekday {
    position: absolute;
    top: 0;
    height: 100%;
    padding: 0.35rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-subtle);
    border-left: 1px solid var(--border);
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gantt-axis-weekday.is-today {
    color: var(--trello-blue);
    font-weight: 700;
}

.gantt-axis-daynum {
    position: absolute;
    top: 0;
    height: 100%;
    padding: 0.35rem 0.2rem;
    font-size: 0.68rem;
    color: var(--text-subtle);
    border-left: 1px solid var(--border);
    transform: translateX(-50%);
}

.gantt-toolbar-label {
    font-size: 0.875rem;
    color: var(--text-subtle);
}

.gantt-zoom-btn.is-active {
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
}

.gantt-axis {
    position: relative;
    height: 2rem;
    border-bottom: 1px solid var(--border);
    margin-left: 11rem;
    background: var(--surface-raised);
}

.gantt-axis-month {
    position: absolute;
    top: 0;
    height: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-subtle);
    border-left: 1px solid var(--border);
    white-space: nowrap;
}

.gantt-body {
    position: relative;
    margin-left: 0;
}

.gantt-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--danger);
    opacity: 0.7;
    z-index: 2;
    pointer-events: none;
    margin-left: 11rem;
}

.gantt-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    min-height: 2.75rem;
}

.gantt-row-label {
    flex: 0 0 11rem;
    padding: 0.5rem 0.65rem;
    background: var(--surface-raised);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    position: sticky;
    left: 0;
    z-index: 3;
}

.gantt-row-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.gantt-row-list {
    font-size: 0.7rem;
    color: var(--text-subtle);
}

.gantt-row-track {
    flex: 1;
    position: relative;
    min-height: 2.75rem;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent calc(14px - 1px),
        var(--border) calc(14px - 1px),
        var(--border) 14px
    );
}

.gantt-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 1.35rem;
    min-width: 2rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.65rem;
    color: #fff;
    padding: 0 0.35rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-shadow: var(--shadow);
}

.gantt-bar--ok { background: #61bd4f; }
.gantt-bar--soon { background: #d29034; }
.gantt-bar--overdue { background: var(--danger); }

.gantt-bar-label {
    pointer-events: none;
}

.gantt-bar--segment {
    background: #0c66e4;
    min-width: 0.35rem;
    z-index: 2;
}

.gantt-bar--segment:hover {
    background: #0055cc;
}

.gantt-due-marker {
    position: absolute;
    top: 0.15rem;
    bottom: 0.15rem;
    width: 3px;
    margin-left: -1px;
    border-radius: 2px;
    z-index: 3;
    pointer-events: none;
}

.gantt-due-marker--ok { background: #61bd4f; }
.gantt-due-marker--soon { background: #d29034; }
.gantt-due-marker--overdue { background: var(--danger); }

.gantt-due-marker::after {
    content: '';
    position: absolute;
    top: -0.2rem;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid currentColor;
}

.gantt-due-marker--ok { color: #61bd4f; }
.gantt-due-marker--soon { color: #d29034; }
.gantt-due-marker--overdue { color: var(--danger); }

/* Créneaux de travail — modale carte */
.work-slots-hint {
    font-size: 0.85rem;
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

.work-slots-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.work-slot-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem 0.6rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.work-slot-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    align-items: end;
}

.work-slot-actions {
    display: flex;
    gap: 0.2rem;
    align-items: center;
    padding-bottom: 0.1rem;
}

@media (max-width: 620px) {
    .work-slot-edit-grid {
        grid-template-columns: 1fr;
    }
    .work-slot-actions {
        justify-content: flex-end;
    }
}

.work-slot-range {
    font-size: 0.85rem;
    color: var(--text);
}

.work-slots-empty {
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.work-slot-add-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.work-slot-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.work-slot-field input {
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
}

.work-slots-subtitle {
    font-size: 0.9rem;
    margin: 1rem 0 0.5rem;
    color: var(--text-subtle);
}

.work-slot-recurrence-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.work-slot-recurrence-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    background: var(--surface-raised);
}

.work-slot-recurrence-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.work-slot-recurrence-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--trello-blue);
    background: rgba(0, 121, 191, 0.12);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.work-slot-recurrence-paused { color: var(--text-subtle); font-style: italic; }

.work-slot-recurrence-days {
    border: none;
    margin: 0 0 0.5rem;
    padding: 0;
}

.work-slot-recurrence-days legend,
.work-slot-field-label {
    font-size: 0.75rem;
    color: var(--text-subtle);
    margin-bottom: 0.35rem;
}

.work-slot-recurrence-days-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.work-slot-recurrence-day {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    cursor: pointer;
}

.work-slot-recurrence-day:has(input:checked) {
    border-color: var(--trello-blue);
    background: rgba(0, 121, 191, 0.08);
}

.work-slot-recurrence-active {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.work-slot-recurrence-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.work-slot-recurrence-add-form {
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.work-slot-recurrence-add-title {
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
}

.work-slots-recurring-details { margin-top: 0.75rem; font-size: 0.85rem; }

.work-slots-recurring-details summary {
    cursor: pointer;
    color: var(--trello-blue);
    font-weight: 600;
}

.work-slots-list--compact .work-slot-item { padding: 0.35rem 0.45rem; }

.work-slot-recurring-label { align-self: center; }

.work-slots-recurring-hint { font-size: 0.75rem; margin: 0.35rem 0 0; }

@media (max-width: 520px) {
    .work-slot-add-grid {
        grid-template-columns: 1fr;
    }
}

.timeline-view {
    padding: 1rem 1.25rem 2rem;
    overflow: hidden;
}

.timeline-hint {
    color: var(--text-subtle);
    font-size: 0.875rem;
    margin: 0 0 1rem;
}

.timeline-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0.5rem 1.5rem;
    scroll-snap-type: x mandatory;
}

.timeline-item {
    flex: 0 0 11rem;
    scroll-snap-align: start;
    background: var(--surface);
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-top: 3px solid var(--trello-blue);
}

.timeline-item--overdue { border-top-color: var(--danger); }
.timeline-item--soon { border-top-color: #d29034; }
.timeline-item--ok { border-top-color: #61bd4f; }

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.timeline-title {
    font-weight: 600;
    font-size: 0.875rem;
    word-break: break-word;
}

.timeline-list {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.timeline-empty {
    color: var(--text-subtle);
    text-align: center;
    padding: 2rem;
}

.timeline-empty.hidden { display: none; }

/* Éditeur WYSIWYG description */
.wysiwyg-toolbar,
.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}

.card-desc-editor {
    min-height: 5rem;
    outline: none;
    overflow-y: auto;
}

.card-desc-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--text-subtle);
    pointer-events: none;
}

.card-desc-editor h3 {
    font-size: 1rem;
    margin: 0.5rem 0 0.25rem;
}

.card-desc-editor ul,
.card-desc-editor ol {
    margin: 0.35rem 0;
    padding-left: 1.25rem;
}

.card-desc-editor a {
    color: var(--trello-blue);
}

.rich-btn {
    border: none;
    background: var(--surface-raised);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text);
    box-shadow: var(--shadow);
}

.rich-btn:hover {
    background: var(--surface-hover);
}

/* Pièces jointes modal */
.attachment-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attachment-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.5rem;
    background: var(--surface-raised);
    border-radius: var(--radius-sm);
}

.attachment-file-icon {
    font-size: 1.75rem;
    line-height: 1;
    width: 2.5rem;
    text-align: center;
    flex-shrink: 0;
}

.attachment-info {
    flex: 1 1 8rem;
    min-width: 0;
}

.attachment-thumb-link {
    flex-shrink: 0;
}

.attachment-dl-btn {
    padding: 0.2rem 0.45rem;
    min-width: auto;
}

.attachment-empty {
    list-style: none;
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.attachment-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}

.attachment-dropzone--active {
    border-color: var(--trello-blue);
    background: var(--bg-subtle);
}

.attachment-dropzone-text {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
}

.attachment-dropzone-hint {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    color: var(--text-subtle);
}

.attachment-preview {
    max-width: 4rem;
    max-height: 3rem;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.attachment-name {
    font-weight: 500;
    color: var(--trello-blue);
}

.attachment-meta {
    font-size: 0.75rem;
    color: var(--text-subtle);
    flex: 1;
}

.attachment-delete {
    border: none;
    background: transparent;
    color: var(--text-subtle);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 0.25rem;
}

.attachment-upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.cover-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cover-swatch {
    width: 2rem;
    height: 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
}

.cover-swatch.is-on {
    border-color: var(--text);
    box-shadow: var(--shadow-lg);
}

.cover-swatch--clear {
    background: var(--surface-raised);
    color: var(--text-subtle);
    font-size: 1rem;
    line-height: 1.2rem;
}

.cover-preview {
    display: block;
    width: 100%;
    max-height: 8rem;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.cover-image-form {
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
}

.cover-image-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.attachment-cover-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.25rem;
}
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.member-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border);
    background: var(--surface-raised);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text);
}

.member-toggle-btn.is-on {
    background: #dfe1e6;
    border-color: var(--trello-blue);
}

.copy-move-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.copy-move-select {
    flex: 1;
    min-width: 10rem;
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    font-family: inherit;
}

.template-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Accueil — espaces de travail */
.workspace-section {
    margin-bottom: 2rem;
}

.workspace-section-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
}

.workspace-group {
    margin-bottom: 1.25rem;
}

.workspace-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.boards-grid--nested {
    margin-left: 0.5rem;
}

.create-workspace-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.create-workspace-form input {
    flex: 1;
    min-width: 12rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
}

.workspace-empty {
    font-size: 0.875rem;
    margin: 0 0 0.75rem;
    color: var(--text-subtle);
}

.board-tile-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.board-workspace-label {
    font-size: 0.75rem;
}

.board-workspace-select,
.board-menu-workspace select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8rem;
}

.board-menu-workspace {
    display: block;
    margin: 0.5rem 0;
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.board-est-time-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--text);
}

.board-est-time-toggle input {
    margin: 0;
}

.board-time-totals {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
    white-space: nowrap;
    box-shadow: var(--shadow);
}

.card-estimated-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    background: var(--surface-raised, #ebecf0);
    border-radius: var(--radius-sm);
}

.card-estimated-time-label {
    color: var(--text-subtle);
    font-weight: 600;
}

.card-estimated-time-sep {
    color: var(--text-subtle);
}

.card-estimated-time-input {
    width: 5.5rem;
    min-width: 5.5rem;
    padding: 0.15rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, monospace;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.02em;
}

.card-estimated-time-input:focus {
    outline: 2px solid var(--trello-blue, #0079bf);
    outline-offset: 1px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Demande / discussion carte */
.section-hint {
    font-size: 0.8rem;
    margin: -0.25rem 0 0.5rem;
}

.page-light .section-hint {
    color: var(--text-subtle);
}

.card-request-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--trello-blue);
}

.card-discussion-section {
    background: var(--surface-raised);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.comment-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.comment-body {
    font-size: 0.875rem;
    line-height: 1.45;
}

.comment-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 0.35rem 0;
    cursor: pointer;
}

.inline-desc-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 0.35rem 0;
    cursor: pointer;
    display: block;
    box-shadow: var(--shadow);
}

.inline-desc-img.is-selected {
    outline: 2px solid var(--trello-blue);
    outline-offset: 2px;
}

.card-desc-editor img,
.comment-editor img {
    max-width: 100%;
}

.comment-solution-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #61bd4f;
    background: #61bd4f22;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
}

.comment-solution-toggle,
.comment-solution-new {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-top: 0.35rem;
}

.comment-editor {
    min-height: 3.5rem;
    margin-bottom: 0.35rem;
}

.gantt-axis-day {
    position: absolute;
    top: 0;
    height: 100%;
    padding: 0.35rem 0.25rem;
    font-size: 0.65rem;
    color: var(--text-subtle);
    border-left: 1px solid var(--border);
    white-space: nowrap;
    transform: translateX(-50%);
}

.gantt-bar--editable {
    cursor: grab;
}

.gantt-bar--editable:active {
    cursor: grabbing;
}

.gantt-bar--dragging {
    opacity: 0.92;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), var(--shadow-lg);
    z-index: 5;
}

.gantt-drag-preview {
    position: fixed;
    z-index: 1200;
    padding: 0.4rem 0.65rem;
    background: #172b4d;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(9, 30, 66, 0.35);
    pointer-events: none;
    white-space: nowrap;
}

.gantt-drag-preview.hidden {
    display: none;
}

[data-theme="dark"] .gantt-drag-preview {
    background: #1d2125;
    border: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.gantt-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: ew-resize;
    z-index: 1;
}

.gantt-handle-left { left: 0; }
.gantt-handle-right { right: 0; }

.workspace-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.workspace-members-panel {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 0.65rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
}

.workspace-members-panel.hidden { display: none; }

.workspace-members-list {
    margin: 0 0 0.5rem;
    padding-left: 1.25rem;
    font-size: 0.85rem;
}

.ws-member-role {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.workspace-invite-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.workspace-invite-form input,
.workspace-invite-form select {
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
}

/* Éditeur d'image (double-clic sur image inline) */
.image-editor-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.image-editor-modal.hidden {
    display: none;
}

.image-editor-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 30, 66, 0.72);
}

.image-editor-panel {
    position: relative;
    z-index: 1;
    width: min(96vw, 1100px);
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    background: var(--surface, #fff);
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 12px 40px rgba(9, 30, 66, 0.35);
    overflow: hidden;
}

.image-editor-header {
    padding: 1rem 1.25rem 0.5rem;
}

.image-editor-header h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.image-editor-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-subtle, #5e6c84);
}

.image-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border, #dfe1e6);
    background: #f4f5f7;
}

.img-tool-btn {
    border: 1px solid var(--border, #dfe1e6);
    background: #fff;
    border-radius: var(--radius-sm, 4px);
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
}

.img-tool-btn:hover {
    background: #ebecf0;
}

.img-tool-btn.is-active {
    border-color: var(--trello-blue, #0c66e4);
    background: #0c66e414;
    color: var(--trello-blue, #0c66e4);
    font-weight: 600;
}

.image-editor-sep {
    width: 1px;
    height: 1.5rem;
    background: var(--border, #dfe1e6);
    margin: 0 0.15rem;
}

.image-editor-size,
.image-editor-color {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-subtle, #5e6c84);
}

.img-editor-history-btn {
    border: 1px solid #091e424d;
    background: #fff;
    border-radius: var(--radius-sm, 4px);
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #172b4d;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(9, 30, 66, 0.12);
}

.img-editor-history-btn:hover:not(:disabled) {
    background: #ebecf0;
    border-color: var(--trello-blue, #0c66e4);
    color: var(--trello-blue, #0c66e4);
}

.img-editor-history-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.image-editor-zoom {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.image-editor-zoom-label {
    min-width: 3.25rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: #172b4d;
}

.img-editor-zoom-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid #091e424d;
    background: #fff;
    border-radius: var(--radius-sm, 4px);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    color: #172b4d;
    font-family: inherit;
}

.img-editor-zoom-btn:hover {
    background: #ebecf0;
    border-color: var(--trello-blue, #0c66e4);
    color: var(--trello-blue, #0c66e4);
}

.img-editor-zoom-reset {
    width: auto;
    padding: 0 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.image-editor-canvas-wrap {
    flex: 1;
    overflow: auto;
    padding: 1rem 1.25rem;
    background: #091e420a;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 200px;
    max-height: calc(96vh - 260px);
}

.image-editor-canvas-stack {
    position: relative;
    line-height: 0;
}

.image-editor-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    touch-action: none;
}

.image-editor-crop-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: #e3f2fd;
    border-bottom: 1px solid #90caf9;
    font-size: 0.82rem;
    color: #1565c0;
}

.image-editor-crop-bar.hidden {
    display: none;
}

.image-editor-crop-bar .btn-primary {
    margin-left: auto;
}

#image-editor-canvas {
    max-width: 100%;
    border-radius: var(--radius-sm, 4px);
    box-shadow: var(--shadow, 0 1px 3px rgba(9, 30, 66, 0.25));
    background: #fff;
    touch-action: none;
}

.image-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--border, #dfe1e6);
}

/* -------------------------------------------------------------------------- */
/* Accueil — layout sidebar + zone principale (étape 1)                        */
/* -------------------------------------------------------------------------- */

.home-shell {
    display: flex;
    min-height: calc(100vh - var(--nav-height));
}

.home-sidebar {
    flex: 0 0 15rem;
    padding: 1.25rem 0.75rem;
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.home-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.5rem 0.75rem;
}

.home-sidebar-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
}

.home-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.home-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.home-nav-item:hover {
    background: var(--surface-hover);
}

.home-nav-item.is-active {
    background: var(--trello-blue);
    color: #fff;
}

.home-nav-item.is-active .home-nav-count {
    color: rgba(255, 255, 255, 0.85);
}

.home-nav-count {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.home-main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.75rem 2.5rem;
}

.home-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.home-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.home-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--text-subtle);
}

.home-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.home-boards-grid {
    margin-top: 0.5rem;
}

.board-tile-card.is-hidden,
.board-tile-create.is-hidden {
    display: none !important;
}

/* Modales accueil */
.home-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.home-modal.hidden {
    display: none;
}

.home-modal-overlay {
    position: fixed;
    inset: 0;
    background: #091e4275;
}

.home-modal-panel {
    position: relative;
    width: min(28rem, 100%);
    max-height: min(90vh, calc(100vh - 2rem));
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.25rem 1.5rem 1.5rem;
    z-index: 1;
    margin: auto;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

#home-modal-board .home-modal-panel {
    width: min(34rem, 100%);
}

.home-modal-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    border: none;
    background: var(--surface);
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text-subtle);
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 0.15rem 0.35rem;
}

.home-modal-title {
    margin: 0 2rem 0.35rem 0;
    font-size: 1.15rem;
}

.home-modal-hint {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: var(--text-subtle);
}

.home-modal-hint--info {
    padding: 0.6rem 0.75rem;
    background: #e3f2fd;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--trello-blue);
}

[data-theme="dark"] .home-modal-hint--info {
    background: #1a2a3a;
}

.home-modal-hint--small {
    font-size: 0.8rem;
    margin-top: -0.35rem;
}

.home-modal-actions--inline {
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.import-trello-help {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.import-trello-help summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--trello-blue);
}

.import-trello-help-steps {
    margin: 0.75rem 0 0.5rem;
    padding-left: 1.25rem;
    color: var(--text-subtle);
}

.import-trello-help-steps li {
    margin-bottom: 0.45rem;
}

.import-trello-progress {
    margin: 0.75rem 0 1rem;
}

.import-trello-progress-bar {
    height: 8px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.import-trello-progress-fill {
    height: 100%;
    width: 0;
    background: var(--trello-blue);
    transition: width 0.25s ease;
}

.import-trello-progress-label {
    margin: 0.45rem 0 0;
    font-size: 0.85rem;
    color: var(--text-subtle);
}

#import-trello-error {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
}

.import-trello-preflight {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--surface-raised, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border);
    font-size: 0.88rem;
}

.import-trello-preflight-title {
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.import-trello-preflight-list,
.import-trello-preflight-warnings {
    margin: 0;
    padding-left: 1.1rem;
}

.import-trello-preflight-warnings {
    color: var(--warning-text, #b45309);
    margin-top: 0.5rem;
}

.home-modal--report {
    max-width: 32rem;
}

.import-trello-report-summary {
    margin: 0 0 1rem;
    color: var(--text-subtle);
    font-size: 0.9rem;
}

.import-trello-report-section {
    margin-bottom: 1rem;
}

.import-trello-report-section h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.import-trello-report-section dl {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 1rem;
    font-size: 0.88rem;
}

.import-trello-report-section dt {
    color: var(--text-subtle);
}

.import-trello-report-section dd {
    margin: 0;
    text-align: right;
    font-weight: 500;
}

.import-trello-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.import-trello-tab {
    flex: 1;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    font-size: 0.85rem;
}

.import-trello-tab.is-active {
    border-color: var(--trello-blue);
    background: #e3f2fd;
    font-weight: 600;
}

[data-theme="dark"] .import-trello-tab.is-active {
    background: #1a2a3a;
}

.btn-watch {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    border-radius: var(--radius-sm);
    opacity: 0.55;
    line-height: 1;
}

.btn-watch:hover,
.btn-watch.is-watching {
    opacity: 1;
    background: var(--surface-raised, rgba(0, 0, 0, 0.06));
}

.btn-watch.is-watching .btn-watch-icon {
    filter: none;
}

.btn-watch--sm {
    font-size: 0.85rem;
    margin-left: auto;
}

.list-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-mirror-badge {
    opacity: 0.65;
    margin-right: 0.2rem;
}

.desc-code {
    background: var(--surface-raised);
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.85rem;
}

.card-modal-desc pre,
.card-desc-editor pre {
    background: var(--surface-raised);
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.85rem;
    margin: 0.5rem 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.card-modal-desc pre code,
.card-desc-editor pre code {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
    font-size: 0.88em;
}

.card-modal-desc code,
.card-desc-editor code {
    background: var(--surface-raised);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
}

.card-modal-desc pre code,
.card-desc-editor pre code {
    background: transparent;
    padding: 0;
}

.desc-inline-code {
    background: var(--surface-raised);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.desc-list {
    margin: 0.35rem 0;
    padding-left: 1.25rem;
}

.desc-inline-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 0.35rem 0;
}

.home-modal-divider {
    margin: 1.25rem 0;
    border: none;
    border-top: 1px solid var(--border);
}

.home-modal-subtitle {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.home-modal-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.home-modal-checkbox input {
    width: auto;
}

.home-modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.home-modal-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-subtle);
}

.home-modal-field input,
.home-modal-field select {
    font-weight: 400;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--surface);
    color: var(--text);
}

.home-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

body.home-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .home-shell {
        flex-direction: column;
    }

    .home-sidebar {
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .home-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .home-nav-item {
        flex: 1 1 auto;
        min-width: 8rem;
    }
}

/* Champs personnalisés */
.custom-fields-list { display: flex; flex-direction: column; gap: 0.75rem; }
.custom-field-row { display: flex; flex-direction: column; gap: 0.25rem; }
.custom-field-label { font-size: 0.85rem; font-weight: 600; color: var(--text-subtle); }
.custom-field-input { max-width: 100%; }
.custom-fields-empty { color: var(--text-subtle); font-size: 0.9rem; }
.cf-admin-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.cf-type-badge { font-size: 0.75rem; color: var(--text-subtle); background: var(--surface-muted); padding: 0.15rem 0.4rem; border-radius: 4px; }
.cf-add-form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.cf-add-form input, .cf-add-form select { width: 100%; }
.cf-field-label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; color: var(--text-subtle); }
.cf-options-auto { display: flex; flex-direction: column; gap: 0.65rem; padding: 0.75rem; background: var(--surface-muted); border-radius: 8px; }
.cf-modal-panel { max-width: 520px; max-height: 90vh; overflow-y: auto; }
.comment-history-preview { font-size: 0.85rem; color: var(--text-subtle); margin-top: 0.25rem; max-height: 4rem; overflow: hidden; }
.activity-feed--history { margin-bottom: 1rem; }
.tutorial-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.tutorial-card { max-width: 420px; padding: 1.5rem; }
.tutorial-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.timer-controls { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.timer-entries { font-size: 0.85rem; color: var(--text-subtle); padding-left: 0; list-style: none; }
.timer-hint { font-size: 0.85rem; margin: 0 0 0.5rem; }
.timer-entry { margin-bottom: 0.65rem; }
.timer-attach-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; align-items: center; }
.timer-attach-row select { flex: 1 1 12rem; min-width: 0; }
.timer-linked { font-size: 0.85rem; color: var(--trello-blue); }
.timer-entry-head { display: flex; flex-direction: column; gap: 0.15rem; }
.timer-entry-range { font-size: 0.8rem; }
.timer-entry-actions { display: flex; gap: 0.25rem; margin-top: 0.25rem; }
.timer-edit-grid { margin-top: 0.5rem; display: grid; gap: 0.5rem; }
.timer-add-form { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.timer-add-label { margin: 0 0 0.5rem; font-size: 0.85rem; font-weight: 600; }
.timer-source-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--text-subtle);
}
.timer-source-badge--live { background: rgba(0, 121, 191, 0.15); color: var(--trello-blue); }
.work-slot-field--full { grid-column: 1 / -1; }
.comment-timers-summary { margin-bottom: 1rem; padding: 0.75rem; background: var(--surface-muted); border-radius: 8px; }
.comment-timers-title { font-size: 0.85rem; font-weight: 600; margin: 0 0 0.5rem; }
.comment-timers-list { list-style: none; padding: 0; margin: 0 0 0.5rem; font-size: 0.85rem; }
.comment-timer-row { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; padding: 0.2rem 0; border-bottom: 1px solid var(--border); }
.comment-timer-row:last-child { border-bottom: none; }
.comment-timer-user { font-weight: 600; }
.comment-timer-ref { color: var(--text-subtle); }
.comment-timer-dur { margin-left: auto; color: var(--trello-blue); font-weight: 600; }
.comment-timers-total { margin: 0; font-size: 0.9rem; }
.comment-timers-on-comment { margin-top: 0.5rem; font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.comment-timers-on-comment-label { color: var(--text-subtle); width: 100%; }
.comment-timer-chip { background: var(--surface-muted); padding: 0.1rem 0.4rem; border-radius: 4px; }
.comment-timers-on-comment-total { font-weight: 600; color: var(--trello-blue); }
.comment-view-timers { padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); background: var(--surface-muted); }
.board-bg-upload input { margin-top: 0.35rem; width: 100%; }
.export-menu { position: relative; display: inline-block; }
.export-menu summary { list-style: none; cursor: pointer; }
.export-menu summary::-webkit-details-marker { display: none; }
.export-menu-panel { position: absolute; right: 0; top: 100%; z-index: 50; min-width: 8rem; padding: 0.35rem; margin-top: 0.25rem; }
.custom-field-auto { font-weight: 600; color: var(--text); }
.smtp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.smtp-grid label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
.smtp-test-divider { margin: 1.25rem 0; border: none; border-top: 1px solid var(--border); }
.smtp-test-heading { font-size: 1rem; margin: 0 0 0.35rem; }
.smtp-test-hint { font-size: 0.85rem; margin: 0 0 0.75rem; }
.smtp-test-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.smtp-test-label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; flex: 1 1 14rem; }
.smtp-test-label input { width: 100%; }
.smtp-ovh-hint { font-size: 0.85rem; margin: 0 0 1rem; line-height: 1.45; }
.smtp-log-details summary { cursor: pointer; font-size: 0.85rem; color: var(--text-subtle); }
.smtp-log-pre { font-size: 0.75rem; background: var(--bg-subtle); padding: 0.75rem; border-radius: 6px; overflow-x: auto; margin-top: 0.5rem; max-height: 12rem; }
.mention-dropdown { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); max-height: 240px; overflow-y: auto; padding: 0.25rem; }
.mention-dropdown-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.45rem 0.6rem; border: none; background: transparent; text-align: left; border-radius: 6px; cursor: pointer; color: inherit; }
.mention-dropdown-item:hover, .mention-dropdown-item.is-active { background: var(--bg-subtle); }
.mention-dropdown-avatar { width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600; flex-shrink: 0; }
.mention-dropdown-text { display: flex; flex-direction: column; min-width: 0; }
.mention-dropdown-text strong { font-size: 0.85rem; }
.mention-dropdown-text small { font-size: 0.75rem; color: var(--text-subtle); }
.alert-danger { background: var(--danger-bg); color: var(--danger); padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }

/* —— Ma synthèse —— */
.synthesis-page .page-header { margin-bottom: 1rem; }
.synthesis-toolbar { padding: 1rem; margin-bottom: 1rem; }
.synthesis-toolbar-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; align-items: center; }
.synthesis-scales { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.synthesis-user-row { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.synthesis-user-label { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.synthesis-toolbar-actions { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.synthesis-scale-btn.is-active { background: var(--surface); font-weight: 700; }
.synthesis-totals { padding: 1rem; margin-bottom: 1rem; }
.synthesis-total-hero { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1rem; }
.synthesis-total-hero-label { font-size: 0.95rem; color: var(--text-subtle); font-weight: 600; }
.synthesis-total-hero-value { font-size: 1.75rem; font-weight: 700; color: var(--trello-blue); }
.synthesis-totals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.synthesis-totals-block h3 { font-size: 0.85rem; margin: 0 0 0.5rem; color: var(--text-subtle); }
.synthesis-totals-list { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; }
.synthesis-totals-list li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.synthesis-total-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.synthesis-total-val { font-weight: 700; color: var(--trello-blue); white-space: nowrap; }
.synthesis-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.synthesis-layout--stacked { grid-template-columns: 1fr; }
.synthesis-layout--stacked .synthesis-calendar-section { grid-column: 1; }
.synthesis-layout--stacked .synthesis-recap-section { grid-column: 1; }
@media (max-width: 960px) { .synthesis-layout { grid-template-columns: 1fr; } }
.synthesis-section-title { font-size: 1rem; margin: 0 0 0.75rem; }
.synthesis-calendar-section, .synthesis-recap-section { padding: 1rem; }
.synthesis-day-cal { display: grid; grid-template-columns: 3rem 1fr; gap: 0.5rem; min-height: 40rem; }
.synthesis-day-hours {
    position: relative;
    font-size: 0.7rem;
    color: var(--text-subtle);
    padding: 0.25rem 0;
}
.synthesis-hour-label {
    position: absolute;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    line-height: 1;
}
.synthesis-day-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    min-height: 28rem;
}
.synthesis-day-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.synthesis-day-panel-head {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    padding: 0.35rem 0.5rem;
    border-radius: 6px 6px 0 0;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-bottom: none;
}
.synthesis-day-panel--planned .synthesis-day-panel-head { color: var(--trello-blue); }
.synthesis-day-panel--actual .synthesis-day-panel-head { color: #1f845a; }
.synthesis-day-panel .synthesis-day-track {
    flex: 1;
    border-radius: 0 0 8px 8px;
}
.synthesis-day-track {
    position: relative;
    background: var(--surface-muted);
    border-radius: 8px;
    border: 1px solid var(--border);
    min-height: 28rem;
    touch-action: none;
    user-select: none;
}
.synthesis-hour-line { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); opacity: 0.6; }
.synthesis-cal-block { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 0.25rem 0.4rem; font-size: 0.72rem; overflow: hidden; box-sizing: border-box; }
.synthesis-cal-block--entry { background: rgba(31, 132, 90, 0.9); color: #fff; z-index: 1; }
.synthesis-cal-block--slot { background: rgba(0, 121, 191, 0.12); border: 1px dashed var(--trello-blue); color: var(--text); }
button.synthesis-slot-bar,
button.synthesis-entry-bar {
    display: block;
    width: auto;
    margin: 0;
    font: inherit;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    overflow: visible !important;
    border: none;
}
.synthesis-slot-bar,
.synthesis-entry-bar {
    cursor: grab;
    overflow: visible !important;
    z-index: 3;
    touch-action: none;
    min-height: 1.5rem;
}
.synthesis-entry-bar { border: 1px solid rgba(31, 132, 90, 0.6) !important; }
.synthesis-slot-bar.gantt-bar--dragging,
.synthesis-slot-bar.gantt-bar--editable:active,
.synthesis-entry-bar.gantt-bar--dragging,
.synthesis-entry-bar.gantt-bar--editable:active { cursor: grabbing; z-index: 6; }
.synthesis-slot-bar .synthesis-cal-block-title,
.synthesis-slot-bar .synthesis-cal-block-sub,
.synthesis-entry-bar .synthesis-cal-block-title,
.synthesis-entry-bar .synthesis-cal-block-sub { pointer-events: none; user-select: none; }
.synthesis-slot-handle,
.synthesis-entry-handle {
    position: absolute;
    left: 0;
    right: 0;
    height: 12px;
    z-index: 5;
    touch-action: none;
}
.synthesis-slot-handle { background: rgba(0, 121, 191, 0.3); }
.synthesis-entry-handle { background: rgba(255, 255, 255, 0.35); }
.synthesis-slot-handle-start,
.synthesis-entry-handle-start { top: 0; cursor: ns-resize; border-radius: 6px 6px 0 0; }
.synthesis-slot-handle-end,
.synthesis-entry-handle-end { bottom: 0; cursor: ns-resize; border-radius: 0 0 6px 6px; }
.synthesis-track-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 0.8rem;
    pointer-events: none;
}
@media (max-width: 720px) {
    .synthesis-day-split { grid-template-columns: 1fr; }
}
.synthesis-card-list {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
    max-height: 14rem;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.synthesis-card-list li { border-bottom: 1px solid var(--border); }
.synthesis-card-list li:last-child { border-bottom: none; }
.synthesis-card-pick {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.65rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    color: inherit;
}
.synthesis-card-pick:hover,
.synthesis-card-pick.is-selected { background: var(--bg-subtle); }
.synthesis-card-pick.is-selected { box-shadow: inset 3px 0 0 var(--trello-blue); }
.synthesis-card-pick-meta { font-size: 0.75rem; color: var(--text-subtle); }
.synthesis-card-pick-title { font-weight: 600; }
.synthesis-card-empty { padding: 0.65rem; font-size: 0.85rem; }
.synthesis-card-picker { margin-bottom: 0.75rem; }
.synthesis-cal-block-title { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.synthesis-cal-block-sub { display: block; opacity: 0.9; font-size: 0.68rem; }
/* Vue semaine : frise horaire sur 7 jours */
.synthesis-week-timeline {
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 0.5rem;
    min-height: 36rem;
}
.synthesis-week-hours {
    position: relative;
    font-size: 0.7rem;
    color: var(--text-subtle);
    padding: 2.1rem 0 0.25rem;
}
.synthesis-week-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
    padding-top: 0;
}
.synthesis-week-day {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.synthesis-week-day.is-today .synthesis-week-day-head {
    color: var(--trello-blue);
    background: rgba(0, 121, 191, 0.08);
}
.synthesis-week-day-head {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.4rem 0.25rem;
    text-align: center;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: var(--surface-muted);
}
.synthesis-week-day.is-today .synthesis-week-day-track {
    border-color: var(--trello-blue);
    box-shadow: 0 0 0 1px var(--trello-blue);
}
.synthesis-week-day-track {
    position: relative;
    flex: 1;
    min-height: 32rem;
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    background: var(--surface);
}
.synthesis-week-block {
    left: 2px;
    right: 2px;
    z-index: 1;
    pointer-events: auto;
    cursor: default;
}
.synthesis-week-block.synthesis-cal-block--slot { z-index: 0; }
.synthesis-week-track-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 0.8rem;
    pointer-events: none;
}
@media (max-width: 900px) {
    .synthesis-week-days {
        grid-template-columns: repeat(7, minmax(4.25rem, 1fr));
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }
}
.synthesis-week-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.synthesis-week-col { border: 1px solid var(--border); border-radius: 8px; background: var(--surface-muted); min-height: 12rem; }
.synthesis-week-col.is-today { border-color: var(--trello-blue); box-shadow: 0 0 0 1px var(--trello-blue); }
.synthesis-week-head { font-size: 0.75rem; font-weight: 700; padding: 0.4rem; border-bottom: 1px solid var(--border); text-align: center; }
.synthesis-week-body { padding: 0.35rem; display: flex; flex-direction: column; gap: 0.35rem; }
.synthesis-week-chip { border-radius: 6px; padding: 0.35rem; font-size: 0.72rem; }
.synthesis-week-chip--entry { background: rgba(0, 121, 191, 0.15); border-left: 3px solid var(--trello-blue); }
.synthesis-week-chip--slot { background: var(--surface); border: 1px dashed var(--border); }
.synthesis-week-chip-time { font-weight: 700; display: block; }
.synthesis-week-chip-title { display: block; font-weight: 600; }
.synthesis-week-chip-sub { display: block; color: var(--text-subtle); font-size: 0.68rem; }
.synthesis-week-empty { text-align: center; margin: 0.5rem 0; font-size: 0.8rem; }
.synthesis-recap-heading { font-size: 0.9rem; margin: 1rem 0 0.5rem; color: var(--text-subtle); }
.synthesis-recap-heading:first-child { margin-top: 0; }
.synthesis-recap-list { list-style: none; padding: 0; margin: 0; }
.synthesis-recap-item { padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.synthesis-recap-main { display: flex; justify-content: space-between; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.synthesis-recap-dur { color: var(--trello-blue); white-space: nowrap; }
.synthesis-recap-dur--planned { color: var(--text-subtle); font-weight: 600; }
.synthesis-recap-context { margin: 0.25rem 0 0; font-size: 0.85rem; }
.synthesis-recap-note { margin: 0.2rem 0 0; font-size: 0.8rem; }
.synthesis-recap-actions { display: flex; gap: 0.25rem; margin-top: 0.35rem; }
.synthesis-recap-edit { margin-top: 0.5rem; }
.synthesis-viewing-other { margin: 0 0 0.75rem; }
.synthesis-dialog { border: none; border-radius: var(--radius); padding: 0; max-width: 28rem; width: calc(100% - 2rem); box-shadow: var(--shadow-lg); }
.synthesis-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.synthesis-dialog form { padding: 1.25rem; }
.synthesis-dialog h3 { margin: 0 0 0.35rem; }
.synthesis-dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.synthesis-search-results { list-style: none; padding: 0; margin: 0.25rem 0 0; border: 1px solid var(--border); border-radius: 8px; max-height: 10rem; overflow-y: auto; }
.synthesis-search-results li { border-bottom: 1px solid var(--border); }
.synthesis-search-pick { display: block; width: 100%; text-align: left; padding: 0.5rem 0.65rem; border: none; background: transparent; cursor: pointer; font-size: 0.85rem; color: inherit; }
.synthesis-search-pick:hover { background: var(--bg-subtle); }
.synthesis-selected-card { margin: 0.35rem 0 0; font-size: 0.85rem; font-weight: 600; color: var(--trello-blue); }
.synthesis-drag-hint { font-size: 0.85rem; margin: 0 0 0.75rem; }
.synthesis-drag-hint.hidden { display: none; }

/* --- Accessibilité --- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 0.75rem 1rem;
    background: var(--trello-blue);
    color: var(--text-inverse);
    text-decoration: none;
    border-radius: var(--radius-sm);
}
.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

/* --- Admin dashboard --- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.75rem;
}
.admin-stat-card {
    text-align: center;
    padding: 1rem 0.75rem;
}
.admin-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--trello-blue);
}
.admin-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-top: 0.25rem;
}

/* Admin stats modernisées */
.admin-stats-grid--modern {
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 1rem;
}
.admin-stat-card--users { border-top: 3px solid #6554c0; }
.admin-stat-card--boards { border-top: 3px solid var(--trello-blue); }
.admin-stat-card--cards { border-top: 3px solid #00c2e0; }
.admin-stat-card--workspaces { border-top: 3px solid #51e898; }
.admin-stat-card--api { border-top: 3px solid #ff9f1a; }
.admin-stat-card--webhooks { border-top: 3px solid #eb5a46; }
.admin-stat-card--files { border-top: 3px solid #0079bf; }
.admin-stat-card--backup { border-top: 3px solid #5e6c84; }
.admin-stat-icon {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
    opacity: 0.85;
}
.admin-storage-panel {
    margin-top: 1.25rem;
    padding: 1.25rem;
}
.admin-storage-panel h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}
.admin-storage-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}
.admin-storage-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.65rem;
    background: var(--surface-raised);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.admin-orphan-panel {
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--surface-raised);
    border: 1px solid var(--border);
}
.admin-orphan-panel--alert {
    border-color: #eb5a46;
    background: #fff5f3;
}
.admin-orphan-panel h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}
[data-theme="dark"] .admin-orphan-panel--alert {
    background: #3d2926;
    border-color: #eb5a46;
}

.description-history-details {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}
.description-history-details summary {
    cursor: pointer;
    color: var(--text-subtle);
}
.description-history-list {
    margin-top: 0.5rem;
    max-height: 12rem;
    overflow-y: auto;
}

.notification-prefs-table th,
.notification-prefs-table td {
    vertical-align: middle;
}

/* ── Toast notifications ── */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100000;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 380px;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.3;
    color: #fff;
    background: #333;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .25s, transform .25s;
}
.toast--visible {
    opacity: 1;
    transform: translateY(0);
}
.toast--hiding {
    opacity: 0;
    transform: translateY(12px);
}
.toast--success { background: #22863a; }
.toast--error   { background: #cb2431; }
.toast--warn    { background: #d59e08; color: #1a1a1a; }
.toast--info    { background: #0366d6; }
.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 0 0 0.5rem;
    margin-left: auto;
    opacity: 0.7;
}
.toast-close:hover { opacity: 1; }

/* ── Panneau raccourcis clavier ── */
.shortcut-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
}
.shortcut-panel {
    background: var(--bg-card, #fff);
    border-radius: 12px;
    width: 380px;
    max-width: 92vw;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    overflow: hidden;
}
.shortcut-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border, #ddd);
}
.shortcut-panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
}
.shortcut-panel-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-primary, #333);
    padding: 0;
    line-height: 1;
}
.shortcut-panel-body {
    padding: 0.75rem 1.25rem 1.25rem;
}
.shortcut-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.4rem 0;
}
.shortcut-row kbd {
    display: inline-block;
    min-width: 2.2rem;
    text-align: center;
    padding: 0.2rem 0.5rem;
    background: var(--bg-secondary, #f4f5f7);
    border: 1px solid var(--border, #ddd);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
}
.shortcut-row span {
    font-size: 0.9rem;
    color: var(--text-primary, #333);
}

.help-panel {
    max-width: 36rem;
    width: 95vw;
}
.help-panel-body {
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem 1.25rem 1.25rem;
}
.help-section h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: var(--trello-blue);
}
.help-feature-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.88rem;
    line-height: 1.5;
}
.help-feature-list li {
    margin-bottom: 0.25rem;
}
.help-section--shortcuts {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}
#btn-help {
    font-weight: 700;
    min-width: 1.75rem;
}

/* ── Plier / déplier les listes Kanban ── */
.list-header-expanded {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.list-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    color: var(--text-subtle, #8993a4);
    transition: color .15s ease, background .15s ease;
    flex-shrink: 0;
}
.list-collapse-btn:hover {
    color: var(--text, #172b4d);
    background: var(--surface-raised, #ebecf0);
}
.list-collapse-icon {
    display: block;
    transition: transform .15s ease;
}

.list-collapsed-face {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    flex: 1;
    min-height: 0;
    width: 100%;
    padding: 0 0.1rem;
}

.list-collapsed-count {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--trello-blue, #0079bf);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}
.list-collapsed-count--empty {
    background: var(--surface-raised, #dfe1e6);
    color: var(--text-subtle, #8993a4);
}

.list-collapsed-name {
    margin: 0;
    flex: 1;
    min-height: 0;
    width: 100%;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: var(--text, #172b4d);
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 14;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Colonne pliée : même apparence que les listes, mais étroite */
.list-column--collapsed {
    flex: 0 0 4.25rem;
    width: 4.25rem;
    min-width: 4.25rem;
    transition: flex-basis .18s ease, width .18s ease, border-color .15s ease;
}

.list-column--collapsed:hover {
    border-color: var(--trello-blue, #0079bf);
}

.list-column--collapsed .list-header {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    min-height: 7rem;
    padding: 0.45rem 0.25rem 0.5rem;
    gap: 0.35rem;
    cursor: pointer;
}

.list-column--collapsed .list-collapse-btn {
    color: var(--trello-blue, #0079bf);
}
.list-column--collapsed .list-collapse-icon {
    transform: rotate(90deg);
}

.list-column--collapsed .list-header-expanded,
.list-column--collapsed .list-header-actions,
.list-column--collapsed .btn-watch,
.list-column--collapsed .list-wip-badge {
    display: none !important;
}

.list-column--collapsed .list-collapsed-face {
    display: flex;
}

.list-column--collapsed .list-collapsed-face[hidden] {
    display: flex;
}

.list-column--collapsed .list-cards,
.list-column--collapsed .add-card-form {
    display: none;
}

.list-column--collapsed.list-column--unassigned .list-collapsed-count {
    background: #e6a817;
    color: #fff;
}
.list-column--collapsed.list-column--unassigned .list-collapsed-count--empty {
    background: rgba(245, 166, 35, 0.25);
    color: #9a7b0a;
}
.list-column--collapsed.list-column--unassigned .list-collapsed-name {
    color: #9a7b0a;
}

[data-theme="dark"] .list-collapsed-name {
    color: #dfe1e6;
}
[data-theme="dark"] .list-collapsed-count--empty {
    background: #38414a;
    color: #9fadbc;
}
[data-theme="dark"] .list-column--collapsed.list-column--unassigned .list-collapsed-name {
    color: #f5a623;
}

/* ── Description du tableau ── */
.board-desc-toggle {
    font-size: 0.95rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.board-description-panel {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: var(--radius, 8px);
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.75rem 0.5rem;
    box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.1));
}
.board-description-content {
    min-height: 2.5rem;
    outline: none;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}
.board-description-content:empty::before {
    content: attr(data-placeholder);
    color: var(--text-subtle, #999);
}
.board-description-content:focus {
    border-bottom: 2px solid var(--trello-blue, #0079bf);
    padding-bottom: 2px;
}
.board-description-actions {
    margin-top: 0.5rem;
    text-align: right;
}

/* ── Réactions emoji sur les commentaires ── */
.comment-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
}
.reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--border, #ddd);
    border-radius: 1rem;
    background: var(--bg-secondary, #f4f5f7);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background .12s;
}
.reaction-badge:hover { background: #e2e4e9; }
.reaction-badge--me {
    border-color: var(--trello-blue, #0079bf);
    background: #e4f0ff;
}
[data-theme="dark"] .reaction-badge--me {
    background: #1a3a5c;
    border-color: #5ba7db;
}
.reaction-add-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border: 1px dashed var(--border, #ddd);
    border-radius: 1rem;
    background: transparent;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-subtle, #999);
}
.reaction-add-btn:hover { background: var(--bg-secondary, #f4f5f7); }
.reaction-picker {
    display: flex;
    gap: 0.15rem;
    padding: 0.35rem;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    position: absolute;
    z-index: 10;
    margin-top: 0.25rem;
}
.reaction-picker-item {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
    transition: background .1s;
}
.reaction-picker-item:hover { background: var(--bg-secondary, #f4f5f7); }

/* ── Avatar profil ── */
.profile-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.profile-avatar-wrap {
    flex-shrink: 0;
}
.profile-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}
/* ── Checklist améliorée ── */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0;
}
.checklist-item-title {
    flex: 1;
    cursor: text;
}
.checklist-item-delete {
    opacity: 0;
    transition: opacity .12s;
    font-size: 0.85rem;
    padding: 0 0.25rem;
}
.checklist-item:hover .checklist-item-delete { opacity: 1; }
.btn-xs { font-size: 0.75rem; padding: 0.1rem 0.3rem; }
.checklist-rename-input {
    font-size: inherit;
    font-weight: inherit;
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--trello-blue, #0079bf);
    border-radius: 4px;
    width: 100%;
}

.profile-avatar-initials {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--trello-blue, #0079bf);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* ── Actions en masse ── */
.mass-action-bar {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.mass-action-count {
    font-weight: 600;
    min-width: 6em;
}
.mass-action-select {
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border, #dfe1e6);
    border-radius: 4px;
    font-size: 0.85rem;
}
.mass-select-mode .card-item {
    cursor: pointer;
    position: relative;
}
.mass-cb {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    z-index: 5;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.mass-select-mode .card-item-title {
    padding-left: 1.4rem;
}
.card-item--selected {
    outline: 2px solid var(--trello-blue, #0079bf);
    outline-offset: -2px;
    background: rgba(0, 121, 191, 0.06);
}

/* ── Dashboard projet ── */
.dashboard-canvas { padding: 1rem 1.5rem; max-width: 1100px; margin: 0 auto; }
.dashboard-grid { display: flex; flex-direction: column; gap: 1.25rem; }
.dash-cards { display: flex; gap: 1rem; flex-wrap: wrap; }
.dash-stat { flex: 1; min-width: 8rem; padding: 1rem; text-align: center; }
.dash-stat-num { display: block; font-size: 2rem; font-weight: 700; }
.dash-stat-lbl { font-size: 0.85rem; color: var(--text-muted, #5e6c84); }
.dash-stat--warn .dash-stat-num { color: #eb5a46; }
.dash-section h2 { font-size: 1rem; margin: 0 0 0.75rem; }
.dash-bar-row { display: grid; grid-template-columns: 8rem 1fr 2rem; gap: 0.5rem; align-items: center; margin-bottom: 0.35rem; font-size: 0.85rem; }
.dash-bar-track { background: #ebecf0; border-radius: 4px; height: 1.25rem; overflow: hidden; }
.dash-bar-fill { background: var(--trello-blue, #0079bf); height: 100%; border-radius: 4px; }
.dash-time-row { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1px solid var(--border, #dfe1e6); }
.dash-burndown { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 0.5rem; }
.dash-burndown-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.dash-burndown-bar { width: 100%; background: #519839; border-radius: 3px 3px 0 0; min-height: 2px; }
.dash-burndown-date { font-size: 0.65rem; color: var(--text-muted, #5e6c84); margin-top: 0.25rem; }

/* ── Navigation mobile ── */
.navbar-burger { display: none; background: none; border: none; color: inherit; font-size: 1.4rem; cursor: pointer; padding: 0.25rem 0.5rem; }
.navbar-drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 800; }
.navbar-drawer-backdrop.is-open { display: block; }
.navbar-drawer { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: var(--bg-card, #fff); z-index: 810; transition: left .2s; padding: 1rem; box-shadow: 2px 0 12px rgba(0,0,0,.15); overflow-y: auto; }
.navbar-drawer.is-open { left: 0; }
.navbar-drawer .nav-link { display: block; padding: 0.6rem 0; }
@media (max-width: 768px) {
    .navbar-burger { display: block; }
    .navbar-links { display: none; }
    .navbar .global-search { max-width: 8rem; }
    .navbar-end .user-name { display: none; }
}

/* ── Limite WIP ── */
.list-wip-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #ebecf0;
    color: var(--text-muted, #5e6c84);
    margin-left: auto;
}
.list-wip-badge--over {
    background: #eb5a46;
    color: #fff;
}
.list-load-more { margin-top: 0.35rem; }

/* ── Swimlanes ── */
.kanban-board--swimlanes .lists-scroll { overflow: auto; }
.swimlanes-view { padding: 0.5rem 1rem 1rem; overflow-x: auto; }
.swimlane-row { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; align-items: flex-start; }
.swimlane-label {
    flex: 0 0 7rem;
    font-weight: 600;
    font-size: 0.85rem;
    padding-top: 0.5rem;
    color: var(--text-muted, #5e6c84);
}
.swimlane-lists { display: flex; gap: 0.5rem; flex: 1; min-width: 0; }
.swimlane-list-col {
    flex: 0 0 16rem;
    background: #ffffff40;
    border-radius: var(--radius-md, 8px);
    padding: 0.35rem;
    min-height: 3rem;
}
.swimlane-list-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-muted, #5e6c84);
}
.swimlane-cards .card-item { margin-bottom: 0.35rem; }
#btn-swimlanes.is-active { background: rgba(255,255,255,.2); }

/* ── Dépendances / sous-tâches (modale carte) ── */
.dep-block { margin-bottom: 0.75rem; }
.dep-subtitle { font-size: 0.8rem; margin: 0 0 0.35rem; color: var(--text-muted, #5e6c84); }
.card-parent-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0 0 0.5rem;
}

.card-family-color-block {
    margin: 0 0 0.65rem;
}

.card-family-color-label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.card-family-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.2rem 0 0.15rem;
    min-width: 0;
    font-size: 0.75rem;
    line-height: 1.2;
    color: var(--text-subtle, #5e6c84);
}

.card-family-dot {
    flex: 0 0 auto;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.card-family-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.card-family-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.card-family-swatch {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
}

.card-family-swatch.is-on {
    border-color: var(--text, #172b4d);
    box-shadow: 0 0 0 2px #fff;
}

.card-estimated-time-hint {
    font-size: 0.8rem;
    width: 100%;
    margin-top: 0.15rem;
}

.card-estimated-time--aggregate {
    flex-wrap: wrap;
}

.subtask-item-title {
    flex: 1;
    min-width: 8rem;
}

.subtask-time {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: var(--text-subtle);
    margin-left: auto;
}

.subtask-est-input {
    width: 4.5rem;
    padding: 0.15rem 0.35rem;
    font-size: 0.85rem;
}

.dep-list, .subtask-list { list-style: none; margin: 0; padding: 0; }
.dep-item, .subtask-item { display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0; flex-wrap: wrap; }
.dep-add-form, .subtask-add-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.dep-add-form select, .subtask-add-form input { flex: 1; min-width: 10rem; }
.card-parent-link { font-size: 0.85rem; margin-bottom: 0.5rem; }

/* ── Modèles personnalisés (accueil) ── */
.user-templates-section { margin-bottom: 1.25rem; padding: 1rem 1.25rem; }
.user-templates-head { margin-bottom: 0.75rem; }
.home-section-title { font-size: 1.1rem; margin: 0 0 0.25rem; }
.user-templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.75rem; }
.user-template-card { padding: 0.85rem; }
.user-template-name { font-size: 1rem; margin: 0 0 0.25rem; }
.user-template-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.5rem; }

/* ── Automatisations Butler ── */
.automation-row { padding: 0.75rem; margin-bottom: 0.5rem; }
.automation-row-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.automation-add-form { margin-top: 1rem; padding: 0.75rem; }
.automation-add-form h3 { font-size: 0.95rem; margin: 0 0 0.5rem; }
.automation-desc { font-size: 0.85rem; margin: 0.35rem 0; }

/* ── Flèches de dépendances (Timeline) ── */
.gantt-deps-svg {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}
.gantt-dep-arrow {
    fill: none;
    stroke: #89609e;
    stroke-width: 2;
    stroke-dasharray: 5 3;
    opacity: 0.85;
}
.gantt-dep-arrow-head {
    fill: #89609e;
    opacity: 0.85;
}

/* ── Pages avec sidebar (profil, admin) — onglets ── */
.page-shell {
    display: flex;
    height: calc(100vh - var(--nav-height));
    min-height: 0;
    overflow: hidden;
}
.page-shell .home-sidebar {
    flex-shrink: 0;
    overflow-y: auto;
}
.page-shell .home-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 1rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.page-shell .page-header {
    flex-shrink: 0;
    margin-bottom: 0.75rem;
}
.page-shell .page-header h1 {
    margin: 0;
    font-size: 1.35rem;
}
.page-shell .alert {
    flex-shrink: 0;
    margin-bottom: 0.75rem;
}
.page-tab-panels {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}
.page-tab-panel {
    display: none;
    height: 100%;
    overflow: hidden;
    margin: 0;
}
.page-tab-panel.is-active {
    display: flex;
    flex-direction: column;
}
.page-tab-panel--table.is-active {
    justify-content: flex-start;
}
.page-tab-panel--table h2 {
    flex-shrink: 0;
    margin: 0 0 0.75rem;
}
.page-tab-panel--table .admin-table {
    width: 100%;
    flex: 0 0 auto;
    height: auto;
}
.page-tab-panel--table .admin-table-pagination {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.75rem;
}
.admin-table-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border, #dfe1e6);
}
.admin-table-pagination--single {
    display: none;
}
.admin-table-page-info {
    font-size: 0.85rem;
    color: var(--text-muted, #5e6c84);
    min-width: 10rem;
    text-align: center;
}
.page-tab-panel .admin-table th,
.page-tab-panel .admin-table td {
    padding: 0.35rem 0.6rem;
    line-height: 1.35;
}
.page-tab-panel .admin-table tbody tr {
    height: auto;
}
.page-tab-panel.card {
    margin-top: 0;
}
button.home-nav-item.sidebar-tab-btn {
    width: 100%;
    border: none;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
.page-tab-panel .admin-stats-grid {
    margin-bottom: 0;
}
.page-tab-panel .admin-table {
    font-size: 0.875rem;
}
@media (max-width: 768px) {
    .page-shell {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - var(--nav-height));
        overflow: visible;
    }
    .page-shell .home-main {
        overflow: visible;
        min-height: 50vh;
    }
    .page-shell .home-sidebar {
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0.75rem;
    }
    .page-shell .page-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .page-shell .sidebar-tab-btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
        width: auto;
    }
    .page-tab-panels {
        overflow: visible;
    }
    .page-tab-panel {
        height: auto;
        max-height: none;
    }
}

/* ── Refonte visuelle (accueil, auth, board, modale) ── */
.auth-wrapper {
    min-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(160deg, #e4f0f6 0%, #f4f5f7 45%, #fff 100%);
}
.auth-card {
    width: 100%;
    max-width: 26rem;
    padding: 2rem 1.75rem;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(9, 30, 66, 0.12);
    border: 1px solid rgba(9, 30, 66, 0.08);
}
[data-theme="dark"] .auth-wrapper {
    background: linear-gradient(160deg, #1a1f24 0%, #22272b 100%);
}

.home-header {
    padding: 0.5rem 0 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.home-board-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.home-board-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.board-header-bar {
    /* Au-dessus de .board-canvas : sinon le menu ⋯ est visible mais non cliquable */
    position: relative;
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow);
}
[data-theme="dark"] .board-header-bar {
    background: rgba(34, 39, 43, 0.92);
}

.card-modal-panel {
    border-radius: 12px 0 0 12px;
}
.card-modal-section {
    border-left: 3px solid var(--trello-blue);
    padding-left: 0.75rem;
    margin-bottom: 1rem;
}

.public-board-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}
.public-board-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #e4f0f6;
    color: var(--trello-blue);
}

.my-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.75rem;
}
.my-card-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease;
}
.my-card-item:hover {
    box-shadow: var(--shadow-lg);
}
.my-card-board {
    font-size: 0.75rem;
    color: var(--text-subtle);
}
.my-card-due {
    font-size: 0.8rem;
    color: var(--trello-blue);
}

.card-vote-btn.is-active {
    color: var(--trello-blue);
    font-weight: 700;
}
