/* ============================================================
   NOVA — Mobile-first CSS
   ============================================================ */

/* --- Variables & Reset --- */
:root {
    --bg:           #F8F9FB;
    --surface:      #FFFFFF;
    --surface2:     #F1F2F6;
    --accent:       #7F77DD;
    --accent-glow:  rgba(127,119,221,0.2);
    --danger:       #E24B4A;
    --danger-glow:  rgba(226,75,74,0.18);
    --text:         #1A1A2E;
    --text-muted:   #7878A0;
    --radius:       16px;
    --radius-sm:    10px;
    --nav-height:   64px;
    --safe-bottom:  env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overscroll-behavior: none;
}

body {
    background:  var(--bg);
    color:       var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    font-size:   16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Screens --- */
.screen {
    display:        none;
    flex-direction: column;
    min-height:     100dvh;
    padding:        0 16px calc(var(--nav-height) + var(--safe-bottom) + 16px);
    overflow-y:     auto;
}

.screen.active {
    display: flex;
}

/* --- Header --- */
.app-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         20px 0 8px;
    position:        sticky;
    top:             0;
    background:      var(--bg);
    border-bottom:   1px solid rgba(26,26,46,0.07);
    z-index:         10;
}

.logo {
    font-size:      22px;
    font-weight:    800;
    letter-spacing: 5px;
    color:          var(--accent);
    text-transform: uppercase;
}

.summary-badge {
    background:    var(--accent);
    color:         #fff;
    font-size:     12px;
    font-weight:   700;
    padding:       2px 8px;
    border-radius: 20px;
    min-width:     24px;
    text-align:    center;
}

/* --- Mic Zone --- */
.mic-zone {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    padding:         40px 0 28px;
    flex-shrink:     0;
}

.mic-btn {
    position:      relative;
    width:         50px;
    height:        50px;
    border-radius: 50%;
    border:        none;
    background:    var(--accent);
    color:         #fff;
    cursor:        pointer;
    display:       flex;
    align-items:   center;
    justify-content: center;
    box-shadow:    0 0 0 0 var(--accent-glow),
                   0 8px 32px var(--accent-glow);
    transition:    transform 0.15s ease, box-shadow 0.15s ease;
    outline:       none;
}

.mic-btn:active {
    transform: scale(0.94);
}

/* État : en cours d'enregistrement */
.mic-btn.recording {
    background: var(--danger);
    box-shadow: 0 0 0 16px var(--danger-glow),
                0 8px 32px var(--danger-glow);
    animation:  mic-pulse 1.2s ease-in-out infinite;
}

@keyframes mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0px  var(--danger-glow), 0 8px 32px var(--danger-glow); }
    50%       { box-shadow: 0 0 0 20px var(--danger-glow), 0 8px 32px var(--danger-glow); }
}

/* État : chargement (envoi à l'API) */
.mic-btn.loading {
    background: var(--surface2);
    animation:  spin-border 1s linear infinite;
    box-shadow: none;
}

@keyframes spin-border {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.mic-icon {
    width:  25px;
    height: 25px;
    flex-shrink: 0;
    /* Empêche l'icône de tourner quand loading */
    animation: inherit;
}

.mic-btn.loading .mic-icon {
    animation: counter-spin 1s linear infinite;
}

@keyframes counter-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

.mic-status {
    margin-top:  16px;
    font-size:   14px;
    color:       var(--text-muted);
    letter-spacing: 0.3px;
    transition:  color 0.2s;
}

/* --- Transcript Box --- */
.transcript-box {
    background:    var(--surface);
    border-radius: var(--radius);
    padding:       14px 16px;
    margin-bottom: 16px;
    border-left:   3px solid var(--accent);
    animation:     slide-up 0.25s ease;
}

.transcript-text {
    font-size:  15px;
    color:      var(--text);
    font-style: italic;
    line-height: 1.5;
}

/* --- Feed & Cards --- */
.feed {
    display:        flex;
    flex-direction: column;
    gap:            10px;
    padding-bottom: 8px;
}

.action-card {
    background:    var(--surface);
    border-radius: var(--radius);
    padding:       14px 16px;
    border-left:   3px solid var(--accent);
    animation:     slide-up 0.3s ease;
    display:       flex;
    align-items:   flex-start;
    gap:           12px;
}

.action-card.priority-1 { border-left-color: var(--danger); }
.action-card.priority-3 { border-left-color: var(--text-muted); }

.card-icon {
    font-size:   20px;
    flex-shrink: 0;
    margin-top:  1px;
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size:   15px;
    font-weight: 600;
    color:       var(--text);
    white-space: nowrap;
    overflow:    hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size:  12px;
    color:      var(--text-muted);
    margin-top: 3px;
}



.card-check::after {
    content:   '✓';
    font-size: 16px;
    font-weight: 800;
    color:     transparent;
    transition: color 0.15s;
}

.card-check:hover::after {
    color: var(--text-muted);
}

.card-check.done {
    background:   #1D9E75;
    border-color: #1D9E75;
}

.card-check.done::after {
    color: #fff;
}



/* --- Bottom Nav --- */
.bottom-nav {
    position:   fixed;
    bottom:     0;
    left:       0;
    right:      0;
    height:     calc(var(--nav-height) + var(--safe-bottom));
    background: #1E1E2E;
    border-top: 1px solid rgba(255,255,255,0.08);
    display:    flex;
    padding-bottom: var(--safe-bottom);
    z-index:    100;
}

.nav-btn {
    flex:       1;
    background: none;
    border:     none;
    cursor:     pointer;
    display:    flex;
    align-items:    center;
    justify-content: center;
    opacity:    0.35;
    transition: opacity 0.2s;
}

.nav-btn svg {
    width:  24px;
    height: 24px;
    stroke: #FFFFFF;
}

.nav-btn.active {
    opacity: 1;
}

.nav-btn.active svg {
    stroke: var(--accent);
}

/* --- Utilitaires --- */
.hidden {
    display: none !important;
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(10px); }
}


/* --- États vides / loading des feeds --- */
.feed-empty,
.feed-loading {
    color:      var(--text-muted);
    font-size:  14px;
    text-align: center;
    padding:    40px 16px;
    animation:  slide-up 0.25s ease;
}

.feed-loading {
    opacity: 0.6;
}

/* --- Section headers (Aujourd'hui / En retard) --- */
.section-header {
    font-size:      11px;
    font-weight:    700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding:        8px 4px 6px;
    color:          var(--text-muted);
}

.section-header--danger {
    color: var(--danger);
}

.section-header--muted {
    color: var(--text-muted);
}



/* --- Swipe-to-action --- */
.swipe-card {
    will-change:   transform;
    background:    var(--surface);
    border-radius: var(--radius);
    cursor:        grab;
}
.swipe-card:active { cursor: grabbing; }



/* --- Auth Screen --- */
.auth-container {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    min-height:      100dvh;
    padding:         32px 24px;
    gap:             16px;
}

.auth-logo {
    font-size:      36px;
    font-weight:    800;
    letter-spacing: 8px;
    color:          var(--accent);
    text-transform: uppercase;
}

.auth-tagline {
    font-size:  14px;
    color:      var(--text-muted);
    text-align: center;
    margin-bottom: 8px;
}

.auth-tabs {
    display:       flex;
    gap:           8px;
    background:    var(--surface);
    border-radius: var(--radius);
    padding:       4px;
    width:         100%;
    max-width:     320px;
}

.auth-tab {
    flex:          1;
    background:    none;
    border:        none;
    color:         var(--text-muted);
    font-size:     14px;
    font-weight:   600;
    padding:       8px;
    border-radius: var(--radius-sm);
    cursor:        pointer;
    transition:    background 0.2s, color 0.2s;
}

.auth-tab.active {
    background: var(--accent);
    color:      #fff;
}

.auth-form {
    display:        flex;
    flex-direction: column;
    gap:            12px;
    width:          100%;
    max-width:      320px;
}

.auth-input {
    background:    var(--surface);
    border:        1px solid rgba(26,26,46,0.08);
    border-radius: var(--radius-sm);
    color:         var(--text);
    font-size:     16px;
    padding:       14px 16px;
    outline:       none;
    transition:    border-color 0.2s;
    width:         100%;
}

.auth-input:focus {
    border-color: var(--accent);
}

.auth-submit {
    background:    var(--accent);
    border:        none;
    border-radius: var(--radius-sm);
    color:         #fff;
    font-size:     16px;
    font-weight:   700;
    padding:       16px;
    cursor:        pointer;
    transition:    opacity 0.2s;
    width:         100%;
}

.auth-submit:active { opacity: 0.8; }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-error {
    color:      var(--danger);
    font-size:  13px;
    text-align: center;
}


/* --- Header right group --- */
.header-right {
    display:     flex;
    align-items: center;
    gap:         10px;
}

/* --- Transcript cancel --- */
.transcript-cancel {
    display:       block;
    margin-top:    10px;
    background:    none;
    border:        1px solid rgba(26,26,46,0.09);
    border-radius: var(--radius-sm);
    color:         var(--text-muted);
    font-size:     12px;
    padding:       6px 12px;
    cursor:        pointer;
    transition:    border-color 0.2s, color 0.2s;
    width:         100%;
}

.transcript-cancel:active {
    border-color: var(--danger);
    color:        var(--danger);
}


/* --- Résumé quotidien --- */
.summary-card {
    background:    var(--surface); border: 0.5px solid rgba(26,26,46,0.08);
    border-radius: var(--radius);
    padding:       18px 16px;
    border-left:   3px solid var(--accent);
    margin-bottom: 4px;
    animation:     slide-up 0.3s ease;
}

.summary-header {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    margin-bottom:   10px;
}

.summary-greet {
    font-size:   16px;
    font-weight: 600;
    color:       var(--text);
}

.summary-total {
    font-size:     12px;
    font-weight:   700;
    background:    var(--accent);
    color:         #fff;
    padding:       2px 8px;
    border-radius: 20px;
}

.summary-stats {
    font-size:     13px;
    margin-bottom: 12px;
    display:       flex;
    flex-wrap:     wrap;
    gap:           6px;
}

.stat-danger { color: var(--danger); }
.stat-urgent { color: var(--danger); }
.stat-today  { color: var(--accent); }

.summary-tasks {
    display:        flex;
    flex-direction: column;
    gap:            6px;
    margin-bottom:  12px;
}

.summary-task {
    display:     flex;
    align-items: center;
    gap:         8px;
    font-size:   14px;
    color:       var(--text);
}

.summary-task-icon  { font-size: 16px; flex-shrink: 0; }

.summary-task-title {
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

.summary-cta {
    width:         100%;
    background:    rgba(124,106,247,0.15);
    border:        1px solid rgba(124,106,247,0.3);
    border-radius: var(--radius-sm);
    color:         var(--accent);
    font-size:     13px;
    font-weight:   600;
    padding:       10px;
    cursor:        pointer;
    transition:    background 0.2s;
}

.summary-cta:active { background: rgba(124,106,247,0.3); }


/* --- Force les couleurs contre le mode sombre navigateur --- */
@media (prefers-color-scheme: dark) {
    .summary-card,
    .summary-greet,
    .summary-task-title,
    .summary-stats,
    .summary-cta {
        color-scheme: dark;
    }
}

.summary-card * {
    color-scheme: dark;
}



/* --- Édition inline du titre --- */
.title-input {
    background:    transparent;
    border:        none;
    border-bottom: 1px solid var(--accent);
    color:         var(--text);
    font-size:     15px;
    font-weight:   600;
    font-family:   inherit;
    padding:       0 0 2px;
    width:         100%;
    outline:       none;
    caret-color:   var(--accent);
}

.title-input:focus {
    border-bottom-color: var(--accent);
}



/* ── Momentum hebdo ─────────────────────────────── */
.summary-momentum {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    margin: 4px 0 8px;
    letter-spacing: 0.02em;
}

/* ── Historique enrichi ─────────────────────────── */
.history-date-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #6b7280);
    padding: 18px 4px 6px;
}

.history-entry-group {
    background: var(--surface);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-left: 3px solid var(--accent, #6366f1);
    transition: opacity 0.2s;
}

.history-entry-group.all-done {
    border-left-color: var(--accent);
    opacity: 0.7;
}

.history-entry-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.history-entry-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

.history-entry-raw {
    font-size: 0.85rem;
    color: #4A4A6A;
    line-height: 1.4;
    font-style: italic;
}

.history-entry-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.history-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(26,26,46,0.07);
    border-radius: 2px;
    overflow: hidden;
}

.history-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.history-progress-label {
    font-size: 0.72rem;
    color: var(--text-muted, #6b7280);
    white-space: nowrap;
}

/* ── Badges urgence / retard ────────────────────── */
.card-badges { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }

.badge-urgent, .badge-late {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-urgent { background: #E24B4A; color: #FFFFFF; }
.badge-late { background: rgba(226,75,74,0.1); color: #A32D2D; }




/* ── Stat chips (summary home) ─────────────────────────── */
.summary-chips {
    display:   flex;
    flex-wrap: wrap;
    gap:       6px;
    margin:    8px 0 10px;
}

.stat-chip {
    display:       inline-flex;
    align-items:   center;
    gap:           4px;
    font-size:     0.72rem;
    font-weight:   700;
    padding:       4px 10px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

.chip-danger { background: rgba(226,75,74,0.1);    color: #A32D2D; }
.chip-urgent { background: #E24B4A;                color: #FFFFFF; }
.chip-today  { background: rgba(127,119,221,0.1);  color: #534AB7; }
.chip-done   { background: rgba(127,119,221,0.08); color: #7F77DD; }

/* ── Focus block (home summary) ───────────────────────── */
.focus-block {
    background:    rgba(124,106,247,0.08);
    border:        1px solid rgba(124,106,247,0.2);
    border-radius: var(--radius-sm);
    padding:       14px;
    margin:        10px 0;
}

.focus-label {
    font-size:     0.7rem;
    font-weight:   700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color:         var(--accent);
    margin-bottom: 8px;
}

.focus-task {
    display:     flex;
    align-items: center;
    gap:         10px;
    margin-bottom: 12px;
}

.focus-icon  { font-size: 20px; flex-shrink: 0; }

.focus-title {
    font-size:   15px;
    font-weight: 700;
    color:       var(--text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.focus-late {
    font-size:     0.65rem;
    font-weight:   800;
    background:    rgba(226,75,74,0.1);
    color:         #A32D2D;
    padding:       2px 7px;
    border-radius: 20px;
    flex-shrink:   0;
}

.focus-actions, .today-focus-actions {
    display: flex;
    gap:     8px;
}

.focus-btn, .today-focus-btn {
    flex:          1;
    border:        none;
    border-radius: var(--radius-sm);
    font-size:     13px;
    font-weight:   700;
    padding:       10px 8px;
    cursor:        pointer;
    transition:    opacity 0.15s;
}

.focus-btn:active, .today-focus-btn:active { opacity: 0.75; }

.focus-btn-done, .today-btn-done {
    background: rgba(127,119,221,0.1);
    color:      var(--accent);
    border:     1px solid rgba(127,119,221,0.2);
}

.focus-btn-snooze, .today-btn-snooze {
    background: rgba(124,106,247,0.12);
    color:      var(--accent);
    border:     1px solid rgba(124,106,247,0.2);
}

/* ── Streak badge ──────────────────────────────────────── */
.summary-streak {
    font-size:   0.8rem;
    font-weight: 700;
    color:       var(--accent);
    margin:      2px 0 8px;
}

/* ── Today Focus block (écran Today) ───────────────────── */
.today-focus-block {
    background:    rgba(127,119,221,0.06);
    border:        1px solid rgba(124,106,247,0.25);
    border-radius: var(--radius);
    padding:       16px;
    margin-bottom: 4px;
    animation:     slide-up 0.3s ease;
}

.today-focus-label {
    font-size:     0.68rem;
    font-weight:   800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color:         var(--accent);
    margin-bottom: 12px;
}

.today-focus-task {
    display:       flex;
    align-items:   center;
    gap:           12px;
    background:    var(--surface);
    border-radius: var(--radius-sm);
    padding:       12px 14px;
    margin-bottom: 12px;
    border-left:   3px solid var(--accent);
}

.today-focus-task.priority-1 { border-left-color: var(--danger); }

.focus-body {
    flex: 1;
    min-width: 0;
}

/* ── Bilan card (historique) ───────────────────────────── */
.bilan-card {
    background:    var(--surface2);
    border-radius: var(--radius);
    padding:       18px 16px;
    margin-bottom: 8px;
    animation:     slide-up 0.3s ease;
}

.bilan-header {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    margin-bottom:   14px;
}

.bilan-title {
    font-size:   15px;
    font-weight: 700;
    color:       var(--text);
}

.bilan-streak {
    font-size:     12px;
    font-weight:   700;
    color:         var(--accent);
    background:    rgba(127,119,221,0.1);
    padding:       3px 10px;
    border-radius: 20px;
}

.bilan-stats {
    display:         flex;
    justify-content: space-around;
    margin-bottom:   16px;
}

.bilan-stat {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            3px;
}

.bilan-stat-value {
    font-size:   26px;
    font-weight: 800;
    color:       var(--text);
    line-height: 1;
}

.bilan-stat-value.stat-pending { color: var(--danger); }

.bilan-stat-label {
    font-size:  11px;
    color:      var(--text-muted);
    text-align: center;
}

/* ── Mini graphe hebdo ─────────────────────────────────── */
.week-bars {
    display:        flex;
    align-items:    flex-end;
    gap:            4px;
    height:         52px;
    padding-bottom: 18px; /* espace pour les labels */
    position:       relative;
}

.week-bar-col {
    flex:           1;
    display:        flex;
    flex-direction: column;
    align-items:    center;
    height:         100%;
    position:       relative;
}

.week-bar-wrap {
    flex:          1;
    width:         100%;
    display:       flex;
    align-items:   flex-end;
    justify-content: center;
}

.week-bar-fill {
    width:         70%;
    min-height:    3px;
    background:    var(--accent);
    border-radius: 3px 3px 0 0;
    opacity:       0.8;
    transition:    height 0.4s ease;
}

.week-bar-label {
    position:  absolute;
    bottom:    0;
    font-size: 9px;
    color:     var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ── History entry body (badge inline) ─────────────────── */
.history-entry-body {
    display:     flex;
    align-items: flex-start;
    gap:         8px;
    flex:        1;
    min-width:   0;
}

.history-progress-badge {
    flex-shrink:   0;
    font-size:     0.65rem;
    font-weight:   700;
    padding:       2px 7px;
    border-radius: 20px;
    white-space:   nowrap;
}

.badge-all-done { background: rgba(127,119,221,0.1); color: var(--accent); }
.badge-partial  { background: rgba(124,106,247,0.15); color: var(--accent); }
.badge-none     { background: rgba(107,107,128,0.15); color: var(--text-muted); }




/* ── Snooze Modal ───────────────────────────────────────── */
.snooze-overlay {
    position:   fixed;
    inset:      0;
    background: rgba(10,10,20,0.4);
    z-index:    200;
    display:    flex;
    align-items: flex-end;
    animation:  fade-in 0.18s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.snooze-sheet {
    width:            100%;
    background:       var(--surface);
    border-radius:    var(--radius) var(--radius) 0 0;
    padding:          20px 16px calc(20px + var(--safe-bottom));
    animation:        sheet-up 0.22s cubic-bezier(0.25,0.46,0.45,0.94);
}

@keyframes sheet-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.snooze-handle {
    width:         40px;
    height:        4px;
    background:    rgba(26,26,46,0.1);
    border-radius: 2px;
    margin:        0 auto 18px;
}

.snooze-title {
    font-size:     13px;
    font-weight:   700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color:         var(--text-muted);
    margin-bottom: 14px;
    text-align:    center;
}

.snooze-task-name {
    font-size:     15px;
    font-weight:   700;
    color:         var(--text);
    text-align:    center;
    margin-bottom: 18px;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
    padding:       0 8px;
}

.snooze-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap:     8px;
    margin-bottom: 10px;
}

.snooze-btn {
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.07);
    border-radius: var(--radius-sm);
    color:         var(--text);
    font-size:     14px;
    font-weight:   600;
    padding:       14px 10px;
    cursor:        pointer;
    text-align:    center;
    transition:    background 0.15s, border-color 0.15s;
    display:       flex;
    flex-direction: column;
    align-items:   center;
    gap:           4px;
}

.snooze-btn:active { background: rgba(124,106,247,0.2); border-color: var(--accent); }

.snooze-btn-sub {
    font-size:  11px;
    color:      var(--text-muted);
    font-weight: 400;
}

.snooze-btn-cancel {
    width:         100%;
    background:    none;
    border:        none;
    color:         var(--text-muted);
    font-size:     14px;
    padding:       14px;
    cursor:        pointer;
    margin-top:    4px;
}

/* Sous-niveau (heures / moments) */
.snooze-sub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap:     8px;
    margin-bottom: 10px;
}

.snooze-sub-btn {
    background:    rgba(124,106,247,0.1);
    border:        1px solid rgba(124,106,247,0.2);
    border-radius: var(--radius-sm);
    color:         var(--accent);
    font-size:     13px;
    font-weight:   700;
    padding:       12px 6px;
    cursor:        pointer;
    text-align:    center;
    transition:    background 0.15s;
}

.snooze-sub-btn:active { background: rgba(124,106,247,0.3); }

.snooze-back-btn {
    background: none;
    border:     none;
    color:      var(--text-muted);
    font-size:  13px;
    padding:    10px;
    cursor:     pointer;
    display:    block;
    margin:     0 auto;
}

/* ── Saisie texte unifiée ───────────────────────────────── */
.text-input-zone {
    margin:        0 0 12px;
    position:      relative;
}

.text-input-field {
    width:         100%;
    background:    var(--surface);
    border:        1px solid rgba(26,26,46,0.08);
    border-radius: var(--radius);
    color:         var(--text);
    font-size:     15px;
    font-family:   inherit;
    padding:       14px 52px 14px 16px;
    outline:       none;
    height:        50px;
    transition:    border-color 0.2s, box-shadow 0.2s;
    caret-color:   var(--accent);
}

.text-input-field::placeholder {
    color:      var(--text-muted);
    font-size:  14px;
}

.text-input-field:focus {
    border-color: var(--accent);
    box-shadow:   0 0 0 3px var(--accent-glow);
}

.text-input-send {
    position:      absolute;
    right:         9px;
    top:           50%;
    transform:     translateY(-50%);
    width:         32px;
    height:        32px;
    border-radius: 50%;
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.08);
    color:         var(--text-muted);
    font-size:     16px;
    cursor:        pointer;
    display:       flex;
    align-items:   center;
    justify-content: center;
    transition:    background 0.15s, color 0.15s, transform 0.15s;
}

.text-input-send.active {
    background: var(--accent);
    color:      #fff;
    border-color: var(--accent);
}

.text-input-send:active {
    transform: translateY(-50%) scale(0.92);
}

.text-input-send:active { transform: scale(0.92); }

.text-input-send svg,
.text-input-send svg * {
    pointer-events: none;
}

/* Suggestions rapides sous le champ */
.text-suggestions {
    display:    flex;
    flex-wrap:  wrap;
    gap:        6px;
    margin-top: 8px;
    min-height: 0;
    transition: min-height 0.2s;
}

.text-suggestion-chip {
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.07);
    border-radius: 20px;
    color:         var(--text-muted);
    font-size:     12px;
    padding:       5px 12px;
    cursor:        pointer;
    transition:    background 0.15s, color 0.15s;
    white-space:   nowrap;
}

.text-suggestion-chip:active {
    background: rgba(124,106,247,0.2);
    color:      var(--accent);
}



/* ── Task panel sheet ───────────────────────────────────── */
.task-panel-sheet {
    width:            100%;
    background:       var(--surface);
    border-radius:    var(--radius) var(--radius) 0 0;
    padding:          20px 16px calc(24px + var(--safe-bottom));
    animation:        sheet-up 0.22s cubic-bezier(0.25,0.46,0.45,0.94);
}

.task-panel-title {
    font-size:     16px;
    font-weight:   700;
    color:         var(--text);
    text-align:    center;
    margin-bottom: 18px;
    padding:       0 8px;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

.task-panel-btn {
    display:       block;
    width:         100%;
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.06);
    border-radius: var(--radius-sm);
    color:         var(--text);
    font-size:     15px;
    font-weight:   600;
    padding:       14px 16px;
    cursor:        pointer;
    text-align:    left;
    margin-bottom: 8px;
    transition:    background 0.15s;
}

.task-panel-btn:active             { background: rgba(26,26,46,0.08); }
.task-panel-btn--danger            { color: var(--danger); border-color: rgba(247,106,142,0.2); }
.task-panel-btn--danger-soft       { background: rgba(247,106,142,0.08); color: var(--danger); border-color: rgba(247,106,142,0.15); }
.task-panel-btn--muted             { background: none; border-color: transparent; color: var(--text-muted); text-align: center; }
.task-panel-btn--accent            { background: rgba(124,106,247,0.15); color: var(--accent); border-color: rgba(124,106,247,0.25); }
.priority-option-active            { border-color: var(--accent) !important; background: rgba(124,106,247,0.15) !important; }

.task-panel-sep {
    height:     1px;
    background: rgba(26,26,46,0.06);
    margin:     8px 0;
}

/* ── Bouton ••• sur les cartes ───────────────────────────── */
.card-actions-right {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            12px;
    flex-shrink:    0;
    padding-left:   8px;
}

.card-check {
    width:           28px;
    height:          28px;
    border-radius:   6px;
    border:          2px solid #C4C4D8;
    background:      none;
    cursor:          pointer;
    flex-shrink:     0;
    transition:      background 0.2s, border-color 0.2s;
    align-self:      center;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       16px;
    color:           transparent;
}

.card-more {
    background:    none;
    border:        none;
    color:         var(--text-muted);
    font-size:     11px;
    font-weight:   700;
    cursor:        pointer;
    padding:       6px 8px;
    letter-spacing: 1px;
    line-height:   1;
    border-radius: 6px;
    transition:    color 0.15s, background 0.15s, opacity 0.15s;
    opacity:       0.5;
    min-width:     28px;
    min-height:    28px;
    display:       flex;
    align-items:   center;
    justify-content: center;
}

.card-more:active,
.action-card:hover .card-more {
    opacity:    1;
    color:      var(--text);
    background: rgba(26,26,46,0.08);
}

/* ── Badge récurrence ────────────────────────────────────── */
.badge-recur {
    display:       inline-block;
    font-size:     0.65rem;
    font-weight:   700;
    padding:       2px 7px;
    border-radius: 20px;
    background:    rgba(124,106,247,0.15);
    color:         var(--accent);
}

/* ── Reschedule date picker ──────────────────────────────── */
.reschedule-form {
    display:       flex;
    gap:           8px;
    margin-bottom: 14px;
}

.reschedule-date-input,
.reschedule-time-input {
    flex:          1;
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.08);
    border-radius: var(--radius-sm);
    color:         var(--text);
    font-size:     15px;
    padding:       12px;
    outline:       none;
    font-family:   inherit;
}

.reschedule-date-input:focus,
.reschedule-time-input:focus {
    border-color: var(--accent);
}




/* ── Highlight post-action ───────────────────────────────── */
@keyframes task-highlight {
    0%   { box-shadow: 0 0 0 2px var(--accent); background: rgba(124,106,247,0.15); }
    70%  { box-shadow: 0 0 0 2px var(--accent); background: rgba(124,106,247,0.08); }
    100% { box-shadow: none; background: var(--surface); }
}

.task-highlighted {
    animation: task-highlight 1.8s ease forwards;
}

/* ── Toast confirmation ──────────────────────────────────── */
.nova-toast {
    position:      fixed;
    bottom:        calc(var(--nav-height) + var(--safe-bottom) + 12px);
    left:          50%;
    transform:     translateX(-50%);
    background:    var(--surface2);
    border:        1px solid rgba(124,106,247,0.3);
    border-radius: var(--radius);
    color:         var(--text);
    font-size:     13px;
    font-weight:   600;
    padding:       10px 20px;
    z-index:       300;
    white-space:   nowrap;
    animation:     toast-in 0.2s ease;
    pointer-events: none;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ── Tâches historique ───────────────────────────────────── */
.history-task-item {
    display:       flex;
    align-items:   center;
    gap:           10px;
    background:    var(--surface);
    border-radius: var(--radius-sm);
    padding:       11px 14px;
    margin-bottom: 6px;
    animation:     slide-up 0.2s ease;
}

.history-task-icon   { font-size: 16px; flex-shrink: 0; }
.history-task-status { font-size: 16px; flex-shrink: 0; margin-left: auto; }

.history-task-body {
    flex:     1;
    min-width: 0;
}

.history-task-title {
    font-size:     14px;
    font-weight:   600;
    color:         var(--text);
    display:       block;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

.history-task-done {
    text-decoration: line-through;
    opacity:         0.6;
}

.history-cancel-reason {
    font-size:  11px;
    color:      var(--text-muted);
    margin-top: 2px;
    display:    block;
}

/* ── Métriques MVP ───────────────────────────────────────── */
.metrics-row {
    display:         flex;
    justify-content: space-around;
    margin-top:      14px;
    padding-top:     14px;
    border-top:      1px solid rgba(26,26,46,0.06);
}

.metric-item {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            3px;
}

.metric-value {
    font-size:   22px;
    font-weight: 800;
    line-height: 1;
}

.metric-label {
    font-size:  10px;
    color:      var(--text-muted);
    text-align: center;
}

.metric-green  { color: var(--accent); }
.metric-orange { color: var(--danger); }
.metric-red    { color: var(--danger); }


/* ── Filtres dans historique ───────────────────── */
.history-filters {
    display:        flex;
    flex-direction: column;
    gap:            6px;
    margin:         12px 0 8px;
}

.history-filter-row,
.history-period-row {
    display:            flex;
    gap:                6px;
    flex-wrap:          nowrap;
    overflow-x:         auto;
    scrollbar-width:    none;
    -ms-overflow-style: none;
    justify-content:    flex-start;
}

.history-filter-row::-webkit-scrollbar,
.history-period-row::-webkit-scrollbar {
    display: none;
}

.history-period-row { margin-top: 0; }

.history-filter-btn {
    flex-shrink:   0;
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.07);
    border-radius: 20px;
    color:         var(--text-muted);
    font-size:     11px;
    font-weight:   600;
    padding:       5px 10px;
    cursor:        pointer;
    white-space:   nowrap;
    transition:    background 0.15s, color 0.15s, border-color 0.15s;
}

.history-filter-btn.active {
    background:   rgba(124,106,247,0.2);
    color:        var(--accent);
    border-color: rgba(124,106,247,0.35);
}

.history-period-btn {
    flex-shrink:   0;
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.07);
    border-radius: 20px;
    color:         var(--text-muted);
    font-size:     11px;
    font-weight:   700;
    padding:       4px 10px;
    cursor:        pointer;
    white-space:   nowrap;
    transition:    background 0.15s, color 0.15s;
}

.history-period-btn.active {
    background:   rgba(124,106,247,0.2);
    color:        var(--accent);
    border-color: rgba(124,106,247,0.35);
}

/* ── Status chip dans panel historique ───────────────────── */
.history-panel-status {
    display:         flex;
    justify-content: center;
    gap:             6px;
    flex-wrap:       wrap;
    margin-bottom:   16px;
}

.chip-muted {
    background: rgba(107,107,128,0.15);
    color:      var(--text-muted);
}



/* Bannière offline — bande discrète en haut */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--surface2);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    padding: 6px 16px;
    border-bottom: 1px solid rgba(124, 106, 247, 0.2);
    animation: slideDown 0.25s ease;
    letter-spacing: 0.01em;
}
 
.offline-banner.hidden {
    display: none;
}
 
/* Micro désactivé en mode offline */
#mic-btn.mic-offline {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(1);
}
 
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
 


/* ── Cartes projets ──────────────────────────────────────────── */
.project-card {
    background:    var(--surface);
    border-radius: var(--radius);
    padding:       16px;
    cursor:        pointer;
    animation:     slide-up 0.25s ease;
    transition:    background 0.15s;
}
 
.project-card:active { background: var(--surface2); }
 
.project-card-top {
    display:     flex;
    align-items: center;
    gap:         12px;
    margin-bottom: 12px;
}
 
.project-card-icon {
    width:           44px;
    height:          44px;
    border-radius:   12px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       22px;
    flex-shrink:     0;
}
 
.project-card-body {
    flex:      1;
    min-width: 0;
}
 
.project-card-name {
    font-size:     15px;
    font-weight:   700;
    color:         var(--text);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}
 
.project-card-meta {
    font-size:  12px;
    color:      var(--text-muted);
    margin-top: 3px;
}
 
.project-card-empty { color: var(--text-muted); font-style: italic; }
 
.project-card-pct {
    font-size:   18px;
    font-weight: 800;
    flex-shrink: 0;
}
 
/* ── Barre de progression ────────────────────────────────────── */
.project-progress-bar-wrap {
    height:        6px;
    background:    rgba(26,26,46,0.07);
    border-radius: 999px;
    overflow:      hidden;
}
 
.project-progress-fill {
    height:        100%;
    border-radius: 999px;
    /*background:    var(--accent);*/
    transition:    width 0.4s ease;
}
 
.project-card-bar { margin-top: 0; }
 
/* ── État vide projets ───────────────────────────────────────── */
.projects-empty {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    padding:        60px 24px;
    text-align:     center;
    gap:            10px;
}
 
.projects-empty-icon { font-size: 48px; }
 
.projects-empty-text {
    font-size:   17px;
    font-weight: 700;
    color:       var(--text);
}
 
.projects-empty-sub {
    font-size: 14px;
    color:     var(--text-muted);
}
 
.projects-empty-cta {
    margin-top:    12px;
    background:    rgba(124,106,247,0.15);
    border:        1px solid rgba(124,106,247,0.3);
    border-radius: var(--radius);
    color:         var(--accent);
    font-size:     14px;
    font-weight:   700;
    padding:       12px 24px;
    cursor:        pointer;
}
 
/* ── Bouton + dans le header ─────────────────────────────────── */
.projects-add-btn {
    background:    none;
    border:        none;
    color:         var(--accent);
    cursor:        pointer;
    padding:       6px;
    border-radius: 50%;
    display:       flex;
    align-items:   center;
    transition:    background 0.15s;
}
 
.projects-add-btn:active { background: rgba(124,106,247,0.15); }
 
/* ── Vue détail projet ───────────────────────────────────────── */
.project-detail-header {
    display:     flex;
    align-items: center;
    gap:         10px;
    padding:     20px 0 8px;
    position:    sticky;
    top:         0;
    background:  var(--bg);
    z-index:     10;
}
 
.project-back-btn {
    display:     flex;
    align-items: center;
    gap:         4px;
    background:  none;
    border:      none;
    color:       var(--text-muted);
    font-size:   14px;
    cursor:      pointer;
    padding:     4px 8px;
    flex-shrink: 0;
}
 
.project-detail-title {
    flex:        1;
    font-size:   17px;
    font-weight: 800;
    white-space: nowrap;
    overflow:    hidden;
    text-overflow: ellipsis;
    text-align:  center;
}
 
.project-options-btn {
    background:  none;
    border:      none;
    color:       var(--text-muted);
    font-size:   13px;
    font-weight: 700;
    cursor:      pointer;
    padding:     4px 8px;
    flex-shrink: 0;
    letter-spacing: 1px;
}
 
.project-progress-block {
    display:        flex;
    align-items:    center;
    gap:            12px;
    margin-bottom:  16px;
}
 
.project-progress-block .project-progress-bar-wrap {
    flex: 1;
    height: 8px;
}
 
.project-progress-label {
    font-size:   12px;
    color:       var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
 
/* ── Modal création projet ───────────────────────────────────── */
.project-name-input {
    width:         100%;
    margin-bottom: 16px;
    font-size:     16px;
}
 
.project-modal-label {
    font-size:      11px;
    font-weight:    700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color:          var(--text-muted);
    margin-bottom:  10px;
}
 
.project-icons-grid {
    display:         flex;
    flex-wrap:       wrap;
    gap:             8px;
    margin-bottom:   16px;
}
 
.project-icon-btn {
    width:           40px;
    height:          40px;
    border-radius:   10px;
    border:          2px solid rgba(26,26,46,0.07);
    background:      var(--surface2);
    font-size:       20px;
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:      border-color 0.15s, background 0.15s;
}
 
.project-icon-btn.selected {
    border-color: var(--accent);
    background:   rgba(124,106,247,0.15);
}
 
.project-colors-grid {
    display:         flex;
    flex-wrap:       wrap;
    gap:             10px;
    margin-bottom:   20px;
}
 
.project-color-swatch {
    width:         32px;
    height:        32px;
    border-radius: 50%;
    border:        3px solid transparent;
    cursor:        pointer;
    transition:    transform 0.15s, border-color 0.15s;
}
 
.project-color-swatch.selected {
    border-color: #fff;
    transform:    scale(1.15);
}
 
.project-color-swatch:active { transform: scale(0.9); }


.badge-project {
    display:       inline-block;
    font-size:     0.65rem;
    font-weight:   700;
    padding:       2px 7px;
    border-radius: 20px;
    border:        1px solid;
    background:    transparent;
}


/* ── Projets archivés ─────────────────────────────────────── */
.project-card--archived {
    opacity: 0.6;
    filter:  grayscale(0.4);
}

.projects-archive-header {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    padding:         12px 4px 8px;
    margin-top:      8px;
    border-top:      1px solid rgba(26,26,46,0.06);
    font-size:       13px;
    font-weight:     700;
    color:           var(--text-muted);
}

.projects-archive-toggle {
    background:    rgba(124,106,247,0.12);
    border:        1px solid rgba(124,106,247,0.2);
    border-radius: 20px;
    color:         var(--accent);
    font-size:     11px;
    font-weight:   700;
    padding:       4px 12px;
    cursor:        pointer;
}

.projects-archive-list {
    display:        flex;
    flex-direction: column;
    gap:            10px;
}

.projects-section-empty {
    text-align:  center;
    color:       var(--text-muted);
    font-size:   13px;
    padding:     16px 0;
}

.projects-inline-cta {
    background:  none;
    border:      none;
    color:       var(--accent);
    font-size:   13px;
    font-weight: 700;
    cursor:      pointer;
}



/* ── Date cliquable sur carte ──────────────────────── */
.card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.card-date.tap-edit {
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background .15s, color .15s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.card-date.tap-edit:hover  { background: var(--surface2); color: var(--accent); }
.card-date.tap-edit.no-date { color: var(--text-muted); opacity: .5; font-style: italic; }
.card-has-desc { font-size: 0.75rem; opacity: .5; }

/* ── Popover date ──────────────────────────────────── */
.date-popover {
    position: absolute;
    left: 12px;
    bottom: calc(100% + 6px); /* s'ouvre vers le haut si en bas de l'écran */
    background: var(--surface2);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 12px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    min-width: 220px;
    animation: popover-in .15s ease;
}
@keyframes popover-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.date-popover-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.date-popover-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 40px;
    flex-shrink: 0;
}
.date-popover-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--surface);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.82rem;
    padding: 5px 8px;
    transition: border-color .2s;
}
.date-popover-input:focus { outline: none; border-color: var(--accent); }
.date-popover-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}
.date-popover-cancel {
    background: none;
    border: 1px solid var(--surface);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 5px 12px;
    cursor: pointer;
}
.date-popover-save {
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    cursor: pointer;
}
.date-popover-cancel:hover { border-color: var(--text-muted); color: var(--text); }
.date-popover-save:hover   { opacity: .85; }

.desc-textarea {
    width: 100%;
    min-height: 120px;
    background: var(--surface2);
    border: 1px solid var(--surface2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 12px;
    resize: vertical;
    box-sizing: border-box;
    margin: 12px 0 4px;
    font-family: inherit;
    transition: border-color .2s;
}
.desc-textarea:focus { border-color: var(--accent); outline: none; }
.desc-char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 12px;
}



/* ── Mic zone description ───────────────────────── */
.desc-mic-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 0 8px;
}
.desc-mic-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background .2s, box-shadow .2s;
    box-shadow: 0 0 0 0 var(--accent-glow);
}
.desc-mic-circle:hover {
    box-shadow: 0 0 0 8px var(--accent-glow);
}
.desc-mic-circle.recording {
    background: var(--danger);
    box-shadow: 0 0 0 10px rgba(247,106,142,0.3);
    animation: mic-pulse 1.2s ease-in-out infinite;
}
.desc-mic-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}
@keyframes mic-pulse {
    0%,100% { box-shadow: 0 0 0 6px rgba(247,106,142,0.3); }
    50%      { box-shadow: 0 0 0 14px rgba(247,106,142,0.08); }
}
/* ──────────────────────────────────────────────────────────── */


/* ── Bouton rapport dans onglet Historique ─────────────────── */
/* ──────────────────────────────────────────────────────────── */
.bilan-report-btn {
    background: var(--surface2);
    border: 1px solid var(--accent);
    border-radius: 20px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    cursor: pointer;
    transition: background .2s;
}
.bilan-report-btn:hover { background: var(--accent); color: #fff; }
/* ──────────────────────────────────────────────────────────── */


/* ── Modal config rapport ───────────────────────────────────── */
/* ──────────────────────────────────────────────────────────── */
.report-config-sheet { padding-bottom: 20px; }
 
.report-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.report-preset-btn {
    background: var(--surface2);
    border: 1px solid var(--surface2);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 6px 14px;
    cursor: pointer;
    transition: all .2s;
}
.report-preset-btn:hover,
.report-preset-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.report-period-row {
    display: flex;
    gap: 12px;
    margin: 8px 0;
}
.report-period-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.report-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.report-date-input,
.report-select {
    background: var(--surface2);
    border: 1px solid var(--surface2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    padding: 8px 10px;
    width: 100%;
    transition: border-color .2s;
}
.report-date-input:focus,
.report-select:focus { outline: none; border-color: var(--accent); }
.report-filter-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0 12px;
}
 
/* ── Rapport plein écran (aperçu avant impression) ─────────── */
#nova-report {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #f5f5f0;
    overflow-y: auto;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--text);
    padding: 0;
}
 
.rpt-close-btn,
.rpt-print-btn {
    position: fixed;
    bottom: 24px;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.rpt-close-btn {
    right: 170px;
    background: #e8e8e8;
    color: #333;
}
.rpt-print-btn {
    right: 24px;
    background: #7c6af7;
    color: #fff;
}
 
/* ── Pages ──────────────────────────────────────────────────── */
.rpt-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 48px;
    background: #fff;
    min-height: 100vh;
}
.rpt-page + .rpt-page {
    border-top: 3px solid #eee;
    margin-top: 0;
}
 
/* ── En-tête ────────────────────────────────────────────────── */
.rpt-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--text);
    margin-bottom: 28px;
}
.rpt-header-secondary {
    border-bottom-color: #7c6af7;
    margin-bottom: 20px;
}
.rpt-header-logo {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 5px;
    color: #7c6af7;
    flex-shrink: 0;
    font-family: 'Arial Black', sans-serif;
}
.rpt-header-info { flex: 1; }
.rpt-header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'Arial', sans-serif;
}
.rpt-header-period {
    font-size: 0.85rem;
    color: #666;
    margin-top: 2px;
    font-family: 'Arial', sans-serif;
}
.rpt-header-date {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
    font-family: 'Arial', sans-serif;
    align-self: flex-end;
}
 
/* ── Métriques principales ──────────────────────────────────── */
.rpt-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.rpt-metric {
    background: #f8f8fc;
    border: 1px solid #e8e8f0;
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
}
.rpt-metric-main {
    background: #7c6af7;
    color: #fff;
    border-color: #7c6af7;
}
.rpt-metric-main .rpt-metric-value,
.rpt-metric-main .rpt-metric-label { color: #fff; }
.rpt-metric-done { background: #f8f8fc; border-left: 3px solid #2ecc71; }
.rpt-metric-late { background: #f8f8fc; border-left: 3px solid #e74c3c; }
.rpt-metric-best { background: #f8f8fc; border-left: 3px solid #7c6af7; }
 
.rpt-metric-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    font-family: 'Arial Black', sans-serif;
    line-height: 1.2;
}
.rpt-metric-label {
    display: block;
    font-size: 0.7rem;
    color: #888;
    margin-top: 4px;
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
 
/* ── Deux colonnes ──────────────────────────────────────────── */
.rpt-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}
 
/* ── Sections ───────────────────────────────────────────────── */
.rpt-section {
    margin-bottom: 24px;
}
.rpt-section-title {
    font-family: 'Arial', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #7c6af7;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8f0;
}
 
/* ── Catégories ─────────────────────────────────────────────── */
.rpt-cat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.rpt-cat-icon { font-size: 1rem; flex-shrink: 0; }
.rpt-cat-name {
    width: 80px;
    font-size: 0.78rem;
    color: #555;
    font-family: 'Arial', sans-serif;
    flex-shrink: 0;
}
.rpt-cat-bar-wrap {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}
.rpt-cat-bar {
    height: 100%;
    background: #7c6af7;
    border-radius: 4px;
    min-width: 4px;
}
.rpt-cat-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: #333;
    width: 24px;
    text-align: right;
    font-family: 'Arial', sans-serif;
}
 
/* ── Projets ────────────────────────────────────────────────── */
.rpt-project-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.rpt-project-icon { font-size: 1.1rem; flex-shrink: 0; }
.rpt-project-info { flex: 1; }
.rpt-project-name {
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Arial', sans-serif;
    display: block;
    margin-bottom: 4px;
}
.rpt-project-bar-wrap {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}
.rpt-project-bar {
    height: 100%;
    border-radius: 3px;
    min-width: 4px;
}
.rpt-project-stats { text-align: right; flex-shrink: 0; }
.rpt-project-pct {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: #333;
    font-family: 'Arial Black', sans-serif;
}
.rpt-project-sub {
    display: block;
    font-size: 0.68rem;
    color: #999;
    font-family: 'Arial', sans-serif;
}
 
/* ── Jours de la semaine ────────────────────────────────────── */
.rpt-weekdays {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 80px;
    margin-bottom: 8px;
}
.rpt-wd-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}
.rpt-wd-cell.rpt-wd-empty { opacity: .4; }
.rpt-wd-cell.rpt-wd-best .rpt-wd-bar { background: #f7c96a; }
.rpt-wd-cell.rpt-wd-best .rpt-wd-rate { color: #c8952a; font-weight: 800; }
 
.rpt-wd-name {
    font-size: 0.65rem;
    color: #999;
    text-transform: uppercase;
    font-family: 'Arial', sans-serif;
    order: 3;
}
.rpt-wd-bar-wrap {
    width: 100%;
    height: 50px;
    background: #f0f0f8;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    order: 1;
}
.rpt-wd-bar {
    width: 100%;
    background: #7c6af7;
    border-radius: 4px 4px 0 0;
    min-height: 3px;
}
.rpt-wd-rate {
    font-size: 0.68rem;
    color: #666;
    font-family: 'Arial', sans-serif;
    order: 2;
}
.rpt-weekday-note {
    font-size: 0.78rem;
    color: #888;
    font-family: 'Arial', sans-serif;
    font-style: italic;
    margin-top: 6px;
}
 
/* ── Calendrier ─────────────────────────────────────────────── */
.rpt-calendar { display: flex; flex-direction: column; gap: 0; }
 
.rpt-day {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    align-items: start;
}
.rpt-day-empty-row { opacity: .5; }
.rpt-day-empty-row .rpt-day-tasks { font-style: italic; }
 
.rpt-day-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 2px;
}
.rpt-day-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #333;
    font-family: 'Arial', sans-serif;
    text-transform: capitalize;
}
.rpt-day-stat {
    font-size: 0.7rem;
    color: #7c6af7;
    font-family: 'Arial', sans-serif;
}
.rpt-day-tasks { display: flex; flex-direction: column; gap: 4px; }
.rpt-day-empty {
    font-size: 0.75rem;
    color: #ccc;
    font-family: 'Arial', sans-serif;
    font-style: italic;
}
 
.rpt-task-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f8f8fc;
    border-left: 3px solid #ddd;
}
.rpt-task-done    { background: #f0fff8; border-left-color: #6af7a8; opacity: .8; }
.rpt-task-cancelled { background: #fafafa; border-left-color: #ddd; opacity: .5; text-decoration: line-through; }
.rpt-task-snoozed { background: #fffbf0; border-left-color: #f7c96a; }
.rpt-task-pending { background: #fff5f7; border-left-color: #f76a8e; }
.rpt-task-urgent  { border-left-width: 4px; border-left-color: #f76a8e; }
 
.rpt-task-status { font-size: 0.8rem; flex-shrink: 0; }
.rpt-task-cat    { font-size: 0.8rem; flex-shrink: 0; }
.rpt-task-title  {
    flex: 1;
    font-size: 0.82rem;
    color: var(--text);
    font-family: 'Arial', sans-serif;
}
.rpt-task-time {
    font-size: 0.72rem;
    color: #888;
    font-family: 'Arial', sans-serif;
    flex-shrink: 0;
}
.rpt-task-proj {
    font-size: 0.68rem;
    font-family: 'Arial', sans-serif;
    flex-shrink: 0;
    font-weight: 700;
}
.rpt-task-badge-urgent {
    font-size: 0.6rem;
    font-family: 'Arial', sans-serif;
    font-weight: 800;
    color: #f76a8e;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.rpt-empty {
    font-size: 0.78rem;
    color: #bbb;
    font-family: 'Arial', sans-serif;
    font-style: italic;
}
 
@media screen and (max-width: 600px) {
    .rpt-page { padding: 20px 16px; }

    .rpt-header { flex-wrap: wrap; gap: 8px; }
    .rpt-header-date { width: 100%; }

    .rpt-metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .rpt-metric-value { font-size: 1.1rem; }

    .rpt-two-cols { grid-template-columns: 1fr; gap: 16px; }

    .rpt-day { grid-template-columns: 90px 1fr; gap: 8px; }
    .rpt-day-label { font-size: 0.72rem; }

    .rpt-task-row { padding: 3px 6px; gap: 4px; }
    .rpt-task-title { font-size: 0.75rem; }
    .rpt-task-proj,
    .rpt-task-badge-urgent { display: none; } /* trop chargé sur mobile */

    .rpt-weekdays { height: 60px; }

    .rpt-close-btn { right: auto; left: 16px; bottom: 16px; }
    .rpt-print-btn { right: 16px; bottom: 16px; }
}

/* ============================================================
   @media print — Ce qui est imprimé / sauvegardé en PDF
   ============================================================ */
@media print {
    /* Masque TOUT sauf le rapport */
    body > *:not(#nova-report) { display: none !important; }
 
    #nova-report {
        position: static;
        background: #fff;
        overflow: visible;
        padding: 0;
    }
 
    /* Boutons de contrôle masqués */
    .no-print { display: none !important; }
 
    /* Pages avec saut de page */
    .rpt-page {
        padding: 20mm 18mm;
        max-width: 100%;
        page-break-after: always;
        break-after: page;
    }
    .rpt-page:last-child {
        page-break-after: avoid;
        break-after: avoid;
    }
 
    /* Chaque jour ne se coupe pas */
    .rpt-day { page-break-inside: avoid; break-inside: avoid; }
 
    /* Sections ne se coupent pas */
    .rpt-section { page-break-inside: avoid; break-inside: avoid; }
 
    /* Métriques en grille serrée */
    .rpt-metrics { grid-template-columns: repeat(4, 1fr); }
 
    /* Couleurs préservées */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
 
    /* Format A4 portrait */
    @page {
        size: A4 portrait;
        margin: 0;
    }
}
/* ──────────────────────────────────────────────────────────── */

 

/* ── Navigation — 5 boutons ────────────────────────────────── */
/* ──────────────────────────────────────────────────────────── */
/* Le bottom-nav passe de 4 à 5 items — ajuste la taille des icônes */
.bottom-nav { gap: 0; }
.nav-btn {
    flex: 1;
    min-width: 0;
}
.nav-btn svg {
    width: 20px;
    height: 20px;
}
 
/* ── CTA row (bouton créer équipe) ─────────────────────────── */
.teams-cta-row {
    padding: 4px 0 12px;
}
.teams-create-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 18px;
    cursor: pointer;
    transition: opacity .2s;
    width: 100%;
    justify-content: center;
}
.teams-create-btn:hover { opacity: .85; }
 
/* ── État vide ─────────────────────────────────────────────── */
.teams-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 24px;
    text-align: center;
}
.teams-empty-icon { font-size: 3rem; }
.teams-empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.teams-empty-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 280px;
}
 
/* ── Carte équipe ──────────────────────────────────────────── */
.team-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background .15s;
}
.team-card:hover { background: var(--surface2); }
 
.team-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.team-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 1px;
}
.team-card-info { flex: 1; min-width: 0; }
.team-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.team-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}
 
/* ── Badges rôle ───────────────────────────────────────────── */
.team-badge-owner {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(124,106,247,0.2);
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}
.team-badge-member {
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--surface2);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.team-badge-pending {
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(247,201,106,0.15);
    color: #f7c96a;
    white-space: nowrap;
    flex-shrink: 0;
}
 
/* ── Détail équipe ─────────────────────────────────────────── */
.team-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0 12px;
}
.team-back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 0;
    flex-shrink: 0;
}
.team-detail-title {
    flex: 1;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-options-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
}
 
/* ── Progression équipe ────────────────────────────────────── */
.team-progress-block {
    margin-bottom: 20px;
}
.team-progress-bar-wrap {
    height: 6px;
    background: var(--surface2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
.team-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width .4s ease;
}
.team-progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
 
/* ── Titre de section ──────────────────────────────────────── */
.team-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
 
/* ── Bouton assigner (à côté du titre section) ─────────────── */
.team-assign-new-btn {
    background: var(--surface2);
    border: none;
    border-radius: 6px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    transition: background .15s;
    text-transform: none;
    letter-spacing: 0;
}
.team-assign-new-btn:hover { background: var(--accent); color: #fff; }
 
/* ── Ligne membre ──────────────────────────────────────────── */
.team-member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--surface2);
}
.team-member-row:last-child { border-bottom: none; }
.team-invite-row { opacity: .6; }
 
.team-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.team-member-avatar.pending { background: var(--surface2); color: var(--text-muted); }
 
.team-member-info { flex: 1; min-width: 0; }
.team-member-email {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-member-meta, .team-member-status {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 1px;
}
.team-member-rate {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.team-member-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 6px;
    opacity: .6;
    transition: opacity .15s;
    flex-shrink: 0;
}
.team-member-remove:hover { opacity: 1; }
 
/* ── Bouton inviter ────────────────────────────────────────── */
.team-invite-btn {
    width: 100%;
    margin-top: 10px;
    background: none;
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.85rem;
    padding: 10px;
    cursor: pointer;
    transition: background .15s;
}
.team-invite-btn:hover { background: rgba(124,106,247,0.1); }
 
/* ── Hint texte invitation ─────────────────────────────────── */
.team-invite-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 4px 0 12px;
}
 
/* ── Ligne tâche équipe ────────────────────────────────────── */
.team-task-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--surface2);
}
.team-task-row:last-child { border-bottom: none; }
.team-task-status { font-size: 0.9rem; flex-shrink: 0; margin-top: 1px; }
.team-task-info { flex: 1; min-width: 0; }
.team-task-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-task-meta {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.team-task-urgent .team-task-title { color: var(--danger); }
.team-task-badge-urgent {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--danger);
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-top: 3px;
}
 
/* ── Bandeau invitation en attente ─────────────────────────── */
.team-invite-banner {
    background: rgba(124,106,247,0.12);
    border: 1px solid rgba(124,106,247,0.3);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.team-invite-banner-text {
    flex: 1;
    min-width: 140px;
}
.team-invite-banner-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
}
.team-invite-banner-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.team-invite-banner-actions { display: flex; gap: 8px; }
.team-invite-accept {
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    transition: opacity .15s;
}
.team-invite-accept:hover { opacity: .85; }
.team-invite-decline {
    background: none;
    border: 1px solid var(--surface2);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 6px 12px;
    cursor: pointer;
}
.team-invite-decline:hover { border-color: var(--danger); color: var(--danger); }
 
/* ── Recherche tâche dans panel assignation ────────────────── */
.assign-task-results {
    margin-top: 4px;
    margin-bottom: 8px;
}
.assign-task-result-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--surface2);
    border: none;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.82rem;
    padding: 8px 12px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background .15s;
}
.assign-task-result-btn:hover { background: var(--accent); color: #fff; }
 
/* ── Avatar dans panel assignation ────────────────────────── */
.assign-member-btn {
    display: flex;
    align-items: center;
    gap: 10px;
}
.assign-member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
 
/* ── Badge assignation sur carte tâche ─────────────────────── */
.badge-assigned {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(124,106,247,0.15);
    color: var(--accent);
    border: 1px solid rgba(124,106,247,0.3);
}
/* ──────────────────────────────────────────────────────────── */




/* ── Panel assignation tâche ───────────────────────────── */
.assign-selected-task {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    padding: 4px 0 12px;
    margin: 0;
}
.assign-task-results {
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.assign-task-result-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--surface2);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s;
}
.assign-task-result-btn:hover { background: #2a2a3a; }
.assign-task-result-icon  { flex-shrink: 0; font-size: 1rem; }
.assign-task-result-title { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-task-result-meta  { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.assign-member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}
.reschedule-date-input.input-selected {
    border-color: var(--accent);
    color: var(--accent);
}



/* ── Détail équipe — description ───────────────────────── */
.team-detail-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 4px 0 8px;
    margin: 0;
    line-height: 1.5;
}

/* ── Résumé membres ────────────────────────────────────── */
.team-members-summary {
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0 0 10px;
    display: flex;
    gap: 6px;
}
.team-summary-pending { color: var(--warn); }

/* ── Membres cachés (collapse) ─────────────────────────── */
.member-hidden { display: none; }

/* ── Bouton voir tous ──────────────────────────────────── */
.team-show-more-btn {
    width: 100%;
    background: none;
    border: 1px dashed var(--surface2);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 8px;
    cursor: pointer;
    margin-top: 4px;
    transition: border-color 0.15s, color 0.15s;
}
.team-show-more-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}



/* ── Tâches équipe — avatars assignés ──────────────────── */
.team-task-assignees {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    align-items: center;
}
.team-task-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border: 2px solid var(--surface);
    flex-shrink: 0;
}
.team-task-avatar-more {
    background: var(--surface2);
    color: var(--text-muted);
    font-size: 0.6rem;
}

/* ── Badge tâche assignée dans le fil ──────────────────── */
.task-assigned-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #3C3489;
    background: rgba(83,74,183,0.12);
    border-radius: 6px;
    padding: 2px 6px;
    margin-top: 3px;
    font-weight: 700;
}



/* ══════════════════════════════════════════════════════════
   PANEL DÉTAIL TÂCHE (tdp)
   ══════════════════════════════════════════════════════════ */
.tdp-sheet {
    max-height: 88vh;
    overflow-y: auto;
    padding-bottom: 24px;
}

/* Header titre */
.tdp-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}
.tdp-icon  { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.tdp-title { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.4; }

/* Bloc infos structurées */
.tdp-info-block {
    background: var(--surface2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.tdp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.tdp-label { color: var(--text-muted); }
.tdp-value { color: var(--text); font-weight: 500; text-align: right; }

/* Titre de section interne */
.tdp-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Bouton "Modifier" inline */
.tdp-edit-btn {
    background: none;
    border: 1px solid var(--surface2);
    border-radius: 6px;
    color: var(--accent);
    font-size: 0.72rem;
    padding: 2px 8px;
    cursor: pointer;
    margin-left: auto;
}
.tdp-edit-btn:hover { background: rgba(124,106,247,0.1); }

/* Description en lecture */
.tdp-desc-view {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.6;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 12px;
    white-space: normal;
    word-break: break-word;
    min-height: 44px;
}

/* Assignés en ligne */
.tdp-assignees-inline {
    margin-bottom: 12px;
}
.tdp-team-label {
    font-size:    0.75rem;
    color:        var(--text-muted);
    margin-bottom: 6px;
}
.tdp-assignees-avatars {
    display:   flex;
    flex-wrap: wrap;
    gap:       8px;
}
.tdp-assignee-chip {
    display:     flex;
    align-items: center;
    gap:         6px;
    background:  var(--surface2);
    border-radius: 20px;
    padding:     3px 10px 3px 3px;
    font-size:   0.78rem;
    color:       var(--text);
}
.tdp-assignee-avatar-img {
    width:               26px;
    height:              26px;
    border-radius:       50%;
    background:          var(--accent);
    background-size:     cover;
    background-position: center;
    flex-shrink:         0;
}
.tdp-assignee-avatar-initials {
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       0.68rem;
    font-weight:     700;
    color:           #fff;
}

/* Zone saisie commentaire — micro + send à droite */
.tdp-comment-input-zone {
    border-top:  1px solid rgba(26,26,46,0.08);
    padding-top: 10px;
    margin-top:  4px;
}
.tdp-comment-input-row {
    display:     flex;
    gap:         6px;
    align-items: flex-end;
}
.tdp-comment-textarea {
    flex:          1;
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.1);
    border-radius: var(--radius-sm);
    color:         var(--text);
    font-size:     0.85rem;
    padding:       8px 10px;
    resize:        none;
    min-height:    38px;
    max-height:    100px;
    font-family:   inherit;
    line-height:   1.5;
}
.tdp-comment-textarea:focus {
    outline:      none;
    border-color: var(--accent);
}
.tdp-comment-actions {
    display:        flex;
    flex-direction: column;
    gap:            4px;
    flex-shrink:    0;
}
.tdp-comment-action-btn {
    width:           30px;
    height:          30px;
    border-radius:   50%;
    background:      var(--surface2);
    border:          1px solid rgba(26,26,46,0.1);
    color:           var(--text-muted);
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:      background 0.15s;
}
.tdp-comment-action-btn:hover    { background: var(--surface); color: var(--accent); }
.tdp-comment-action-btn.recording { background: rgba(226,75,74,0.1); color: var(--danger); }

.tdp-loading { font-size: 0.8rem; color: var(--text-muted); }

.card-desc-btn {
    width:            28px;
    height:           28px;
    border-radius:    6px;
    background:       #534AB7;
    border:           none;
    color:            #FFFFFF;
    font-size:        13px;
    font-weight:      800;
    font-style:       italic;
    cursor:           pointer;
    display:          flex;
    align-items:      center;
    justify-content:  center;
    flex-shrink:      0;
    transition:       background 0.15s;
    line-height:      1;
}
.card-desc-btn:active { background: #3C3489; }


/* ── Input email invitation — pleine largeur ───────────── */
#invite-email-input {
    width:      100%;
    box-sizing: border-box;
}

/* ── Swipe navigation — conteneur sans overflow ─────────── */
body {
    overflow-x: hidden;
}

/* ── Panel confirmation custom ─────────────────────────── */
.confirm-panel-title {
    font-size:     17px;
    font-weight:   700;
    color:         var(--text);
    text-align:    center;
    margin-bottom: 8px;
    padding:       0 8px;
}
.confirm-panel-sub {
    font-size:     13px;
    color:         var(--text-muted);
    text-align:    center;
    margin-bottom: 20px;
    padding:       0 8px;
    line-height:   1.5;
}


/* ══════════════════════════════════════════════════════════
   SECTIONS REPLIABLES — Aujourd'hui
   ══════════════════════════════════════════════════════════ */
.collapsible-section {
    margin-bottom: 4px;
}

.collapsible-header {
    display:         flex;
    align-items:     center;
    gap:             8px;
    padding:         10px 4px;
    cursor:          pointer;
    user-select:     none;
    border-radius:   var(--radius-sm);
    transition:      background 0.15s;
}
.collapsible-header:hover { background: rgba(26,26,46,0.04); }

.collapsible-label {
    font-size:   0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex:        1;
}
.collapsible-header--danger .collapsible-label { color: var(--danger); }
.collapsible-header--normal .collapsible-label { color: var(--accent); }
.collapsible-header--muted  .collapsible-label { color: var(--text-muted); }

.collapsible-count {
    font-size:        0.72rem;
    font-weight:      700;
    background:       rgba(26,26,46,0.07);
    color:            var(--text-muted);
    padding:          2px 8px;
    border-radius:    20px;
    flex-shrink:      0;
}

.collapsible-arrow {
    flex-shrink:  0;
    color:        var(--text-muted);
    transition:   transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.collapsible-header.collapsed .collapsible-arrow {
    transform: rotate(-90deg);
}

.collapsible-body {
    transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow:   hidden;
}


/* ══════════════════════════════════════════════════════════
   PROFIL UTILISATEUR — Avatar header + Panel
   ══════════════════════════════════════════════════════════ */

/* Bouton avatar dans le header */
.profile-avatar-btn {
    width:           36px;
    height:          36px;
    border-radius:   50%;
    border:          none;
    cursor:          pointer;
    padding:         0;
    position:        relative;
    display:         flex;
    align-items:     center;
    justify-content: center;
    background:      var(--accent);
    overflow:        hidden;
    flex-shrink:     0;
}

.profile-avatar-img {
    width:               100%;
    height:              100%;
    border-radius:       50%;
    background-size:     cover;
    background-position: center;
    display:             block;
}

.profile-avatar-initials {
    font-size:   13px;
    font-weight: 700;
    color:       #FFFFFF;
    line-height: 1;
}

/* Panel profil */
.profile-sheet { padding-bottom: 32px; }

.profile-panel-header {
    display:     flex;
    align-items: center;
    gap:         16px;
    padding:     8px 0 16px;
    border-bottom: 1px solid rgba(26,26,46,0.08);
    margin-bottom: 4px;
}

.profile-avatar-wrap {
    position:    relative;
    flex-shrink: 0;
}

.profile-panel-avatar {
    width:               72px;
    height:              72px;
    border-radius:       50%;
    background:          var(--accent);
    background-size:     cover;
    background-position: center;
    display:             flex;
    align-items:         center;
    justify-content:     center;
}

.profile-panel-avatar--initials {
    font-size:   22px;
    font-weight: 700;
    color:       #FFFFFF;
}

.profile-avatar-edit {
    position:        absolute;
    bottom:          0;
    right:           0;
    width:           24px;
    height:          24px;
    border-radius:   50%;
    background:      var(--surface);
    border:          1.5px solid rgba(26,26,46,0.12);
    display:         flex;
    align-items:     center;
    justify-content: center;
    cursor:          pointer;
    color:           var(--text-muted);
    transition:      background 0.15s;
}
.profile-avatar-edit:hover { background: var(--surface2); }

.profile-panel-info { flex: 1; min-width: 0; }

.profile-panel-name {
    font-size:     16px;
    font-weight:   700;
    color:         var(--text);
    margin-bottom: 3px;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

.profile-panel-email {
    font-size: 12px;
    color:     var(--text-muted);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

/* ── Panel profil — input surnom + boutons ─────────────── */
#profile-nick-input {
    width:         100%;
    box-sizing:    border-box;
    margin-bottom: 8px;
}
#profile-nick-save,
#profile-nick-cancel {
    width: 100%;
}


/* ── Panel assignation — champs pleine largeur ─────────── */
#assign-task-search {
    width:      100%;
    box-sizing: border-box;
}


/* ── Préférences email profil ──────────────────────────── */
.profile-email-prefs {
    display:        flex;
    flex-direction: column;
    gap:            8px;
    margin-bottom:  12px;
}
.profile-pref-row {
    display:     flex;
    align-items: center;
    gap:         12px;
    padding:     8px 0;
    border-bottom: 1px solid rgba(26,26,46,0.06);
    cursor:      pointer;
}
.profile-pref-label {
    flex:      1;
    font-size: 0.88rem;
    color:     var(--text);
}
.profile-pref-toggle {
    width:  18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}


/* ══════════════════════════════════════════════════════════
   COMMENTAIRES — Panel détail tâche
   ══════════════════════════════════════════════════════════ */
.tdp-comments-list {
    display:        flex;
    flex-direction: column;
    gap:            10px;
    max-height:     280px;
    overflow-y:     auto;
    padding:        4px 0 8px;
    margin-bottom:  8px;
}

/* Ligne commentaire */
.tdp-comment-row {
    display:     flex;
    align-items: flex-end;
    gap:         8px;
}
.tdp-comment-row--mine {
    flex-direction: row-reverse;
}

/* Avatar */
.tdp-comment-avatar {
    width:               32px;
    height:              32px;
    border-radius:       50%;
    background:          var(--accent);
    background-size:     cover;
    background-position: center;
    flex-shrink:         0;
}
.tdp-comment-avatar--initials {
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       11px;
    font-weight:     700;
    color:           #fff;
}

/* Bulle */
.tdp-comment-bubble {
    max-width:     75%;
    background:    var(--surface2);
    border-radius: 14px 14px 14px 4px;
    padding:       8px 12px;
    position:      relative;
}
.tdp-comment-row--mine .tdp-comment-bubble {
    background:    rgba(127,119,221,0.12);
    border-radius: 14px 14px 4px 14px;
}

.tdp-comment-author {
    font-size:     0.72rem;
    font-weight:   700;
    color:         var(--accent);
    margin-bottom: 3px;
}
.tdp-comment-content {
    font-size:   0.85rem;
    color:       var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break:  break-word;
}
.tdp-comment-time {
    font-size:  0.68rem;
    color:      var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

/* Bouton supprimer */
.tdp-comment-delete {
    background:  none;
    border:      none;
    color:       var(--text-muted);
    font-size:   16px;
    cursor:      pointer;
    padding:     0 2px;
    opacity:     0.4;
    transition:  opacity 0.15s;
    align-self:  center;
}
.tdp-comment-delete:hover { opacity: 1; color: var(--danger); }

/* Zone saisie */
.tdp-comment-input-zone {
    border-top:  1px solid rgba(26,26,46,0.08);
    padding-top: 12px;
    margin-top:  4px;
}
.tdp-comment-input-row {
    display:     flex;
    gap:         8px;
    align-items: flex-end;
}
.tdp-comment-textarea {
    flex:          1;
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.1);
    border-radius: var(--radius-sm);
    color:         var(--text);
    font-size:     0.85rem;
    padding:       10px 12px;
    resize:        none;
    min-height:    40px;
    max-height:    120px;
    font-family:   inherit;
    line-height:   1.5;
}
.tdp-comment-textarea:focus {
    outline:      none;
    border-color: var(--accent);
}
.tdp-comment-send-btn {
    width:           30px;
    height:          30px;
    border-radius:   50%;
    background:      var(--accent);
    border:          none;
    color:           #fff;
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    flex-shrink:     0;
    transition:      background 0.15s;
}
.tdp-comment-send-btn:hover   { background: #534AB7; }
.tdp-comment-send-btn:disabled { opacity: 0.5; cursor: default; }


/* ── Home — checkbox masquée sur les cartes d'aperçu ─────── */
#actions-feed .card-check {
    visibility: hidden;
    pointer-events: none;
}


/* ══════════════════════════════════════════════════════════
   FILTRE AUJOURD'HUI
   ══════════════════════════════════════════════════════════ */
.today-filter-bar {
    margin-bottom: 12px;
}

.today-filter-search-wrap {
    display:      flex;
    align-items:  center;
    gap:          8px;
    background:   var(--surface);
    border:       1px solid rgba(26,26,46,0.1);
    border-radius: var(--radius-sm);
    padding:      8px 12px;
    margin-bottom: 8px;
}

.today-filter-icon {
    color:       var(--text-muted);
    flex-shrink: 0;
}

.today-filter-input {
    flex:       1;
    border:     none;
    background: none;
    font-size:  0.875rem;
    color:      var(--text);
    outline:    none;
    font-family: inherit;
}
.today-filter-input::placeholder { color: var(--text-muted); }

.today-filter-clear {
    background:  none;
    border:      none;
    color:       var(--text-muted);
    cursor:      pointer;
    font-size:   13px;
    padding:     0;
    flex-shrink: 0;
    transition:  color 0.15s;
}
.today-filter-clear:hover { color: var(--danger); }

.today-filter-chips {
    display:   flex;
    gap:       6px;
    flex-wrap: wrap;
}

.today-chip {
    background:    var(--surface2);
    border:        1px solid rgba(26,26,46,0.08);
    border-radius: 20px;
    font-size:     0.75rem;
    font-weight:   600;
    padding:       4px 12px;
    cursor:        pointer;
    color:         var(--text-muted);
    transition:    background 0.15s, color 0.15s, border-color 0.15s;
}
.today-chip.active {
    background:   var(--accent);
    border-color: var(--accent);
    color:        #FFFFFF;
}
.today-chip:hover:not(.active) {
    background:   var(--surface);
    border-color: var(--accent);
    color:        var(--accent);
}

.team-member-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.team-task-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--surface);
}

.assign-member-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
    border: 2px solid var(--bg);
}
.profile-avatar-btn { position: relative; }


/* Notifications panel */
.notif-invite-card {
    background: var(--surface2);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
}
.notif-invite-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.notif-invite-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.notif-invite-avatar--initials {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notif-invite-info { display: flex; flex-direction: column; gap: 2px; }
.notif-invite-name { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.notif-invite-sub  { font-size: 0.82rem; color: var(--text-muted); }
.notif-invite-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 6px 0 10px;
    padding-left: 8px;
    border-left: 2px solid var(--accent);
}
.notif-invite-actions { display: flex; gap: 8px; margin-top: 10px; }
.notif-btn-accept {
    flex: 1; padding: 9px; border-radius: 8px;
    background: var(--accent); color: #fff;
    font-weight: 700; font-size: 0.85rem; border: none; cursor: pointer;
}
.notif-btn-decline {
    flex: 1; padding: 9px; border-radius: 8px;
    background: var(--surface); color: var(--text-muted);
    font-size: 0.85rem; border: 1px solid var(--surface2); cursor: pointer;
}


.task-panel-sheet .reschedule-date-input,
.task-panel-sheet textarea.reschedule-date-input {
    width: 100%;
    box-sizing: border-box;
}

.team-member-row.team-member-pending {
    opacity: 0.55;
    filter: grayscale(0.3);
}


.history-assigned-badge {
    font-size: 0.75rem;
    color: var(--accent);
    font-style: italic;
    display: block;
    margin-top: 2px;
}

.history-assigned-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 12px 0;
    font-style: italic;
}


.notif-btn-dismiss {
    width: 100%;
    margin-top: 8px;
    padding: 9px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.85rem;
    border: 1px solid var(--surface2);
    cursor: pointer;
}


/* ── Daily Briefing TTS ─────────────────────────────────── */
.briefing-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    margin-bottom: 8px;
}
.briefing-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.briefing-btn:hover { background: var(--accent); color: #fff; }
.briefing-btn.speaking {
    background: var(--accent);
    color: #fff;
    animation: pulse 1.5s infinite;
}
.briefing-stop {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.82rem;
    cursor: pointer;
}
.briefing-stop:hover { border-color: #E24B4A; color: #E24B4A; }

/* ── Smart Snooze suggestion ────────────────────────────── */
.smart-snooze-bar {
    margin: 8px 16px;
    padding: 12px 14px;
    background: var(--surface-2);
    border-left: 3px solid #f0b429;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.smart-snooze-bar strong { color: var(--text-primary); }
.smart-snooze-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.smart-snooze-btn {
    background: var(--surface-3, #2a2a3e);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 16px;
    padding: 5px 12px;
    font-size: 0.8rem;
    cursor: pointer;
}
.smart-snooze-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Score productivité ─────────────────────────────────── */
.productivity-score-card {
    margin: 12px 16px;
    padding: 16px;
    background: var(--surface-2);
    border-radius: 12px;
    text-align: center;
}
.productivity-score-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.productivity-score-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.productivity-score-delta {
    font-size: 0.82rem;
    margin-top: 6px;
    font-weight: 600;
}
.productivity-score-delta.up   { color: #1D9E75; }
.productivity-score-delta.down { color: #E24B4A; }
.productivity-score-delta.same { color: var(--text-muted); }
.productivity-score-breakdown {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.productivity-score-breakdown span strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
}



/* ── Sous-onglets Historique ────────────────────────────── */
.history-tabs {
    display: flex;
    gap: 0;
    margin: 0 16px 16px;
    background: var(--surface-2);
    border-radius: 12px;
    padding: 4px;
}
.history-tab-btn {
    flex: 1;
    padding: 9px 12px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 42px;
}
.history-tab-btn.active {
    background: var(--surface-3, #1e1e35);
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ── Score card moderne ─────────────────────────────────── */
.nova-score-card {
    margin: 0 16px 16px;
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3,#1a1a30) 100%);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(127,119,221,0.15);
    position: relative;
    overflow: hidden;
}
.nova-score-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(127,119,221,0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.nova-score-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.nova-score-left { display: flex; align-items: baseline; gap: 4px; }
.nova-score-number {
    font-size: 3.2rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -2px;
}
.nova-score-denom { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.nova-score-right { text-align: right; }
.nova-score-label { font-size: 0.78rem; color: var(--text-muted); display: block; }
.nova-score-delta {
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 2px;
    display: block;
}
.nova-score-delta.up   { color: #1D9E75; }
.nova-score-delta.down { color: #E24B4A; }
.nova-score-delta.same { color: var(--text-muted); }
.nova-score-bars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.nova-score-bar-item { display: flex; flex-direction: column; gap: 4px; }
.nova-score-bar-label { font-size: 0.72rem; color: var(--text-muted); }
.nova-score-bar-track {
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.nova-score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}
.nova-score-bar-fill.green  { background: #1D9E75; }
.nova-score-bar-fill.orange { background: #f0b429; }
.nova-score-bar-fill.red    { background: #E24B4A; }
.nova-score-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.nova-score-stat { text-align: center; }
.nova-score-stat-val {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}
.nova-score-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Section rapport inline ─────────────────────────────── */
.history-report-section {
    padding: 0 16px 16px;
}
.history-report-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.history-report-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.history-report-preset {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-primary);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
}
.history-report-preset.active,
.history-report-preset:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(127,119,221,0.08);
}
.history-report-dates {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.history-report-date-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.history-report-date-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.history-report-date-input {
    background: var(--surface-2);
    border: 1px solid rgba(127,119,221,0.3);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 0.85rem;
    width: 100%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
#inline-report-project {
    background: var(--surface-2);
    border: 1px solid rgba(127,119,221,0.3);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 0.85rem;
    width: 100%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.history-report-project-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.history-report-generate {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.history-report-generate:hover { opacity: 0.88; }
.history-report-generate:disabled { opacity: 0.5; cursor: not-allowed; }

.history-task-entry {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 2px;
    opacity: 0.8;
}


/* ── FAB Micro universel ────────────────────────────────── */
.fab-mic {
    position: fixed;
    bottom: 76px; /* au-dessus de la bottom nav */
    right: 16px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    box-shadow: 0 4px 16px rgba(127,119,221,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: transform 0.15s, box-shadow 0.15s;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}
.fab-mic.visible {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}
.fab-mic.recording {
    background: #E24B4A;
    animation: pulse 1.2s infinite;
    box-shadow: 0 4px 20px rgba(226,75,74,0.5);
}
.fab-mic svg { color: #fff; }

.fab-mic.fab-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
    transition: opacity 0.2s, transform 0.2s;
}

/* ── Panel vocal contextuel ─────────────────────────────── */
.fab-voice-panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-primary, #0a0a0f);
    border-radius: 20px 20px 0 0;
    padding: 16px 20px 40px;
    z-index: 500;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.7);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    min-height: 160px;
}
.fab-voice-panel.open {
    transform: translateY(0);
}
.fab-voice-panel-handle {
    width: 36px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 14px;
}
.fab-voice-panel-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 12px;
}
.fab-voice-panel-transcript {
    font-size: 0.9rem;
    color: var(--accent);
    text-align: center;
    font-style: italic;
    margin-bottom: 12px;
    min-height: 20px;
}
.fab-voice-panel-close {
    display: block;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 8px;
}

/* FAB au dessus du panel quand panel ouvert */
.fab-mic {
    z-index: 600;
}

/* Transcript lisible */
.fab-voice-panel-transcript {
    font-size: 0.88rem;
    color: var(--accent);
    text-align: center;
    font-style: italic;
    margin-bottom: 12px;
    min-height: 24px;
    max-height: 80px;
    overflow-y: auto;
    line-height: 1.5;
    padding: 0 8px;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(226,75,74,0.6); }
    70%  { box-shadow: 0 0 0 14px rgba(226,75,74,0); }
    100% { box-shadow: 0 0 0 0 rgba(226,75,74,0); }
}


/* ════════════════════════════════════════════════════════════════════════
// CSS À AJOUTER dans style.css
// ════════════════════════════════════════════════════════════════════════
*/
.voice-choice-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg, #fff);
    border-radius: 20px 20px 0 0;
    padding: 24px 16px 32px;
    z-index: 2000;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.voice-choice-sheet.slide-up {
    animation: slideUpSheet 0.25s ease-out;
}
@keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.voice-choice-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #111);
    margin-bottom: 8px;
    text-align: center;
}
.voice-choice-btn {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: var(--accent-light, #e8f0fe);
    color: var(--accent, #1a73e8);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.voice-choice-btn:active { background: var(--accent, #1a73e8); color: #fff; }
.voice-choice-cancel {
    background: transparent;
    color: var(--text-secondary, #666);
    font-weight: 400;
    text-align: center;
    margin-top: 4px;
}
.nova-mute-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.15s;
}
.nova-mute-btn:hover { background: var(--hover-bg, #f0f0f0); }


.voice-task-confirm-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(124,106,247,0.3);
    border-radius: 12px;
    font-size: 0.95rem;
    margin: 8px 0 12px;
    background: var(--surface2);
    color: var(--text);
    outline: none;
}
.voice-task-confirm-input:focus {
    border-color: var(--accent);
}



/* ── Nova Bridge — Validation Card ──────────────────────────── */
.nova-bridge-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.nova-bridge-icon  { font-size: 1.3rem; }
.nova-bridge-title { font-weight: 600; font-size: 0.95rem; color: var(--text-secondary); }

.nova-bridge-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 12px;
}
.nova-bridge-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.nova-bridge-badge--action {
    background: var(--accent-light, #ede9fe);
    color: var(--accent, #6366f1);
}
.nova-bridge-badge--target {
    background: var(--surface-2, #f3f4f6);
    color: var(--text-secondary, #6b7280);
}

.nova-bridge-progress-wrap {
    width: 100%;
    height: 3px;
    background: var(--surface-2, #f3f4f6);
    border-radius: 2px;
    margin: 10px 0;
    overflow: hidden;
}
.nova-bridge-progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent, #6366f1);
    border-radius: 2px;
}

.nova-bridge-btn-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.nova-bridge-btn-row .voice-choice-btn {
    flex: 1;
    margin: 0;
}
.nova-bridge-btn-confirm   { background: var(--accent, #6366f1) !important; color: white !important; }
.nova-bridge-btn-reanalyze { background: var(--surface-2, #f3f4f6) !important; color: var(--text, #111) !important; }


.nova-bridge-chip {
    padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500;
    border: 1.5px solid #e5e7eb;
    background: #ffffff; color: #374151;
    cursor: pointer; transition: all 0.15s;
    white-space: nowrap;
}
.nova-bridge-chip:hover {
    border-color: #6366f1; color: #6366f1; background: #f5f3ff;
}
.nova-bridge-chip--active {
    background: #6366f1 !important;
    color: #ffffff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}