/* ==============================================
   Famille ! - Styles
   Palette inspirée du logo (bleu, vert, orange)
   ============================================== */

:root {
    --color-primary: #2b87d1;
    --color-primary-hover: #1e6ab4;
    --color-primary-light: #e0f0ff;
    --color-danger: #ef4444;
    --color-danger-hover: #dc2626;

    --color-confirmed: #5BB030;
    --color-confirmed-bg: #f0fdf4;
    --color-pending: #f5a623;
    --color-pending-bg: #fff8eb;
    --color-declined: #ef4444;
    --color-declined-bg: #fef2f2;
    --color-cancelled: #6b7280;
    --color-cancelled-bg: #f3f4f6;

    --color-bg: #f0f4f8;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-light: #94a3b8;
    --color-muted: #94a3b8;

    --color-accent-green: #5BB030;
    --color-accent-orange: #f5a623;

    --sidebar-width: 280px;
    --header-height: 56px;
    --radius: 10px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.logo {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.sidebar-user svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

.sidebar-user span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar menu navigation */
.sidebar-menu {
    padding: 8px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    font-family: inherit;
}

.sidebar-menu-item:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.sidebar-menu-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

.sidebar-menu-item.active svg {
    color: var(--color-primary);
}

.sidebar-menu-item span {
    flex: 1;
}

.sidebar-menu-item.has-submenu {
    margin-top: 2px;
}

.submenu-chevron {
    transition: transform 0.2s;
    opacity: 0.5;
}

.sidebar-menu-group.open .submenu-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    padding: 2px 0 2px 20px;
}

.sidebar-submenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    font-family: inherit;
}

.sidebar-submenu-item:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.sidebar-submenu-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

/* Sidebar sections */
.sidebar-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-section-header {
    padding: 8px 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    gap: 8px;
}

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

.list-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

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

.list-item-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-count {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.list-item.active .list-item-count {
    color: var(--color-primary);
    opacity: 0.7;
}

.list-item-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
}

.list-item:hover .list-item-actions {
    opacity: 1;
}

/* Main */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.main-header {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.main-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Welcome */
.welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--color-text-secondary);
}

.welcome-icon {
    margin-bottom: 16px;
}

.welcome-icon img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    opacity: 0.7;
}

.welcome h2 {
    font-size: 20px;
    color: var(--color-text);
    margin-bottom: 8px;
}

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    overflow-x: auto;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    min-width: 120px;
    flex: 1;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.confirmed .stat-card-value { color: var(--color-confirmed); }
.stat-card.pending .stat-card-value { color: var(--color-pending); }
.stat-card.declined .stat-card-value { color: var(--color-declined); }
.stat-card.cancelled .stat-card-value { color: var(--color-cancelled); }
.stat-card.total .stat-card-value { color: var(--color-primary); }

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
    transition: border-color 0.15s;
}

.search-box:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(43,135,209,.1);
}

.search-box svg {
    color: var(--color-text-light);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    width: 100%;
    color: var(--color-text);
}

.filter-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-surface);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    color: var(--color-text);
}

.filter-btn:hover {
    background: var(--color-bg);
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Table */
.persons-table-wrapper {
    padding: 0 24px 24px;
    overflow-x: auto;
}

.persons-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.persons-table thead {
    background: var(--color-bg);
}

.persons-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}

.persons-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.persons-table tbody tr:last-child td {
    border-bottom: none;
}

.persons-table tbody tr:hover {
    background: var(--color-bg);
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.status-badge:hover {
    opacity: 0.8;
}

.status-badge.confirmed {
    background: var(--color-confirmed-bg);
    color: var(--color-confirmed);
}

.status-badge.pending {
    background: var(--color-pending-bg);
    color: var(--color-pending);
}

.status-badge.declined {
    background: var(--color-declined-bg);
    color: var(--color-declined);
}

.status-badge.cancelled {
    background: var(--color-cancelled-bg);
    color: var(--color-cancelled);
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Status dropdown */
.status-dropdown {
    position: relative;
    display: inline-block;
}

.status-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    min-width: 140px;
    padding: 4px;
}

.status-menu.open {
    display: block;
}

.status-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--color-text);
}

.status-menu-item:hover {
    background: var(--color-bg);
}

/* Action buttons in table */
.row-actions {
    display: flex;
    gap: 4px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-secondary);
}

.empty-state svg {
    color: var(--color-text-light);
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1.4;
    font-family: inherit;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

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

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

.btn-secondary:hover {
    background: var(--color-bg);
}

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

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

.btn-block {
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.15s;
}

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

.btn-icon.danger:hover {
    background: var(--color-declined-bg);
    color: var(--color-danger);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
    animation: fadeIn 0.15s;
}

.modal {
    background: var(--color-surface);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.2s;
}

.modal-small {
    max-width: 400px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(43,135,209,.1);
}

.form-row {
    display: flex;
    gap: 12px;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--color-text);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.2s;
    max-width: 360px;
}

.toast.success { border-left: 4px solid var(--color-confirmed); }
.toast.error { border-left: 4px solid var(--color-danger); }

/* Helpers */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--color-text-light);
    font-size: 14px;
}

.guests-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-text-secondary);
}

.guests-count svg {
    opacity: 0.5;
}

/* ---- Tâches : boutons sidebar ---- */
.btn-accent {
    background: var(--color-accent-green);
    color: white;
    border-color: var(--color-accent-green);
}
.btn-accent:hover {
    background: #4a9626;
}
.btn-outline {
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}
.btn-outline:hover {
    background: var(--color-bg);
    color: var(--color-text);
}
.btn-small {
    padding: 4px 12px;
    font-size: 13px;
}

/* ---- Tâches : navigation jour ---- */
.tasks-date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px 8px;
}

.tasks-date-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.tasks-date-label:hover {
    background: var(--color-bg);
}

/* ---- Tâches : barre de progression ---- */
.tasks-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px 12px;
}

.tasks-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--color-bg);
    border-radius: 4px;
    overflow: hidden;
}

.tasks-progress-fill {
    height: 100%;
    background: var(--color-confirmed);
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 0;
}

.tasks-progress-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

/* ---- Tâches : toggle jour/semaine ---- */
.tasks-view-toggle {
    display: flex;
    gap: 4px;
    padding: 0 24px 12px;
}

.tasks-toggle-btn {
    padding: 6px 16px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-surface);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--color-text);
}
.tasks-toggle-btn:hover { background: var(--color-bg); }
.tasks-toggle-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ---- Tâches : checklist quotidienne ---- */
.tasks-daily-content {
    padding: 0 24px 24px;
}

.task-category-group {
    margin-bottom: 16px;
}

.task-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    border-left: 3px solid;
    margin-bottom: 4px;
}

.task-category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-category-icon {
    font-size: 14px;
}

.task-check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    min-height: 56px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.task-check-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(43,135,209,.1);
}

.task-check-item.done {
    background: var(--color-confirmed-bg);
    border-color: var(--color-confirmed);
}

.task-check-item.done .task-check-name {
    text-decoration: line-through;
    color: var(--color-text-secondary);
}

/* ---- Tâches : checkbox ---- */
.task-checkbox {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: white;
    padding: 0;
}

.task-checkbox:hover {
    border-color: var(--color-confirmed);
}

.task-checkbox.done {
    background: var(--color-confirmed);
    border-color: var(--color-confirmed);
}

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

.task-check-name {
    font-size: 14px;
    font-weight: 500;
}

.task-check-time {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.task-check-done-info {
    font-size: 12px;
    color: var(--color-confirmed);
    font-weight: 500;
    white-space: nowrap;
}

.task-history-btn {
    opacity: 0.4;
    transition: opacity 0.15s;
}
.task-check-item:hover .task-history-btn {
    opacity: 1;
}

/* ---- Tâches : vue semaine ---- */
.tasks-weekly-content {
    padding: 0 24px 24px;
}

.weekly-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.weekly-day {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.weekly-day:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}

.weekly-day.today {
    border-color: var(--color-primary);
    border-width: 2px;
}

.weekly-day.all-done {
    background: var(--color-confirmed-bg);
    border-color: var(--color-confirmed);
}

.weekly-day-header {
    margin-bottom: 8px;
}

.weekly-day-name {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    display: block;
}

.weekly-day-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    display: block;
}

.weekly-day.today .weekly-day-number {
    color: var(--color-primary);
}

.weekly-day-progress {
    height: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 6px;
}

.weekly-day-bar {
    width: 16px;
    height: 100%;
    background: var(--color-bg);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.weekly-day-fill {
    width: 100%;
    background: var(--color-confirmed);
    border-radius: 3px;
    transition: height 0.3s;
}

.weekly-day-count {
    font-size: 11px;
    color: var(--color-text-secondary);
    font-weight: 600;
}

/* ---- Tâches : admin ---- */
.tasks-admin-tabs {
    display: flex;
    gap: 4px;
    padding: 16px 24px 0;
}

.tasks-admin-tab {
    padding: 8px 20px;
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: var(--color-bg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--color-text-secondary);
}
.tasks-admin-tab.active {
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 600;
}

.tasks-admin-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0 var(--radius) var(--radius) var(--radius);
    margin: 0 24px 24px;
}

.tasks-admin-list,
.categories-admin-list {
    padding: 8px 16px 16px;
}

.task-admin-card,
.category-admin-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    transition: background 0.15s;
}

.task-admin-card:hover,
.category-admin-card:hover {
    background: var(--color-bg);
}

.task-admin-card.inactive {
    opacity: 0.5;
}

.task-admin-color {
    width: 4px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
}

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

.task-admin-name {
    font-size: 14px;
    font-weight: 600;
}

.task-admin-meta {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.task-inactive-badge {
    display: inline-block;
    background: var(--color-cancelled-bg);
    color: var(--color-cancelled);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 4px;
}

.task-admin-actions {
    display: flex;
    gap: 4px;
}

.category-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: white;
}

.category-admin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ---- Tâches : modal formulaire ---- */
.days-picker {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.day-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--color-text);
}
.day-btn:hover { background: var(--color-bg); }
.day-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.time-slot-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.time-slot-row .slot-time-input {
    width: 120px;
    min-width: 120px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-surface);
}
.time-slot-row .slot-time-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(43,135,209,.1);
}

.time-slot-row .slot-label-input {
    flex: 1;
    min-width: 80px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-surface);
}
.time-slot-row .slot-label-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(43,135,209,.1);
}

/* ---- Tâches : historique ---- */
.task-history-list {
    max-height: 400px;
    overflow-y: auto;
}

.task-history-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}
.task-history-item:last-child { border-bottom: none; }

.task-history-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.task-history-who {
    font-size: 12px;
    color: var(--color-confirmed);
}

.task-history-note {
    font-size: 12px;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-top: 2px;
}

/* ---- FAB : bouton flottant ---- */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--color-accent-green);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(91, 176, 48, 0.4);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s;
}

.fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(91, 176, 48, 0.5);
}

.fab:active {
    transform: scale(0.95);
}

/* ---- Quick log : panneau déclaration rapide ---- */
.quick-log-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.15s;
}

.quick-log-panel {
    background: var(--color-surface);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: slideUpPanel 0.25s ease;
}

@keyframes slideUpPanel {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.quick-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.quick-log-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.quick-log-list {
    overflow-y: auto;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
}

.quick-log-category {
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-log-category .ql-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.quick-log-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    min-height: 52px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.1s;
    text-align: left;
    font-family: inherit;
}

.quick-log-item:hover {
    background: var(--color-bg);
}

.quick-log-item:active {
    background: var(--color-confirmed-bg);
}

.quick-log-item svg {
    color: var(--color-text-light);
    flex-shrink: 0;
}

.quick-log-item .ql-name {
    flex: 1;
}

.quick-log-item .ql-slots {
    font-size: 12px;
    color: var(--color-text-secondary);
    font-weight: 400;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        z-index: 50;
        transition: left 0.25s ease;
        box-shadow: none;
    }

    .sidebar.open {
        left: 0;
        box-shadow: var(--shadow-lg);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 40;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .main-header {
        display: flex;
    }

    .stats-bar {
        padding: 12px 16px;
        gap: 8px;
    }

    .stat-card {
        min-width: 100px;
        padding: 10px 12px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    .toolbar {
        padding: 12px 16px;
        gap: 8px;
    }

    .search-box {
        max-width: none;
        min-width: 0;
    }

    .filter-group {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .persons-table-wrapper {
        padding: 0 16px 16px;
    }

    .persons-table th:nth-child(3),
    .persons-table td:nth-child(3) {
        display: none;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .toast {
        max-width: none;
    }

    .list-item-actions {
        opacity: 1;
    }

    .modal {
        border-radius: 14px;
    }

    /* Tâches responsive */
    .tasks-date-nav { padding: 12px 16px 8px; }
    .tasks-date-label { font-size: 13px; }
    .tasks-progress { padding: 8px 16px 8px; }
    .tasks-view-toggle { padding: 0 16px 8px; }
    .tasks-daily-content { padding: 0 16px 16px; }
    .tasks-weekly-content { padding: 0 16px 16px; }

    .weekly-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }

    .weekly-day { padding: 8px 4px; }
    .weekly-day-number { font-size: 15px; }
    .weekly-day-progress { height: 30px; }

    .tasks-admin-tabs { padding: 12px 16px 0; }
    .tasks-admin-panel { margin: 0 16px 16px; }

    .task-check-item { min-height: 56px; }
    .task-admin-actions { opacity: 1; }
    .task-history-btn { opacity: 1; }

    .time-slot-row { flex-wrap: wrap; }
    .slot-time-input { width: 100px; }
}

@media (max-width: 480px) {
    .persons-table th:nth-child(2),
    .persons-table td:nth-child(2) {
        display: none;
    }

    .stat-card {
        min-width: 80px;
    }
}
