/* ═══════════════════════════════════════════════════════════════════
   ORGANIS'ME — Design System
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --pink:       #ffb6b7;
    --pink-light: rgba(255,182,183,.15);
    --pink-mid:   rgba(255,182,183,.35);
    --pink-dark:  #e89899;
    --bg:         #f4f6f9;
    --surface:    #ffffff;
    --surface2:   #fafbfc;
    --border:     #e8eaed;
    --text:       #2d3142;
    --text-2:     #636878;
    --text-3:     #9aa0b0;
    --green:      #4caf80;
    --orange:     #f5a623;
    --red:        #e05555;
    --blue:       #4a80d4;
    --purple:     #8b5cf6;
    --radius:     14px;
    --radius-sm:  8px;
    --shadow:     0 2px 12px rgba(0,0,0,.07);
    --shadow-lg:  0 8px 30px rgba(0,0,0,.12);
    --font:       'Poppins', system-ui, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ═══ TOPBAR ═══════════════════════════════════════════════════════ */
.topbar {
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    position: relative;
    z-index: 200;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.topbar-left  { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.topbar-right { display: flex; align-items: center; gap: 10px; min-width: 160px; justify-content: flex-end; position: relative; }

.topbar-logo  { width: 32px; height: 32px; border-radius: 50%; }
.topbar-title { font-weight: 700; font-size: 15px; letter-spacing: 1px; color: var(--text); }

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 30px;
    padding: 7px 16px;
    width: 360px;
    max-width: 100%;
    transition: .2s;
}
.search-bar:focus-within { border-color: var(--pink); background: #fff; }
.search-bar input { border: none; background: transparent; font-family: var(--font); font-size: 13px; color: var(--text); width: 100%; outline: none; }
.search-bar input::placeholder { color: var(--text-3); }

.btn-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: .2s;
}
.btn-icon:hover { background: var(--pink-light); border-color: var(--pink); color: var(--pink-dark); }

.avatar-wrap { cursor: pointer; }
.avatar-circle {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--pink-dark));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
    box-shadow: 0 2px 6px rgba(255,182,183,.5);
    transition: .2s;
}
.avatar-circle:hover { transform: scale(1.05); }
.avatar-circle.lg { width: 44px; height: 44px; font-size: 18px; }

/* Profil dropdown */
.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    z-index: 300;
}
.profile-dropdown.active { display: block; }
.profile-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.profile-header strong { display: block; font-size: 14px; color: var(--text); }
.profile-header small { font-size: 11px; color: var(--text-3); }
.profile-stats { display: flex; justify-content: space-around; margin: 12px 0; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--text); }
.stat span:last-child { font-size: 10px; color: var(--text-3); }
.progress-wrap { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--pink), var(--pink-dark)); border-radius: 99px; transition: width .5s; }
.profile-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.btn-logout {
    display: block; width: 100%; text-align: center;
    padding: 8px; border-radius: var(--radius-sm);
    background: var(--pink-light); color: var(--pink-dark);
    text-decoration: none; font-size: 13px; font-weight: 600;
    transition: .2s;
}
.btn-logout:hover { background: var(--pink-mid); }

/* ═══ APP LAYOUT ════════════════════════════════════════════════════ */
.app-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 260px 1fr 240px;
    gap: 0;
    overflow: hidden;
    height: calc(100vh - 60px);
}

/* ═══ SIDEBARS ══════════════════════════════════════════════════════ */
.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-right { border-right: none; border-left: 1px solid var(--border); }

.sidebar-header {
    padding: 20px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.sidebar-header h2 { font-size: 16px; font-weight: 600; color: var(--text); }

.sidebar-controls {
    padding: 0 12px 10px;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.select-filter {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 12px;
    color: var(--text-2);
    background: var(--surface2);
    cursor: pointer;
    outline: none;
    transition: .2s;
}
.select-filter:focus { border-color: var(--pink); }

.btn-ghost {
    padding: 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface2);
    color: var(--text-2);
    font-family: var(--font);
    font-size: 12px;
    cursor: pointer;
    display: flex; align-items: center; gap: 5px;
    transition: .2s;
    white-space: nowrap;
}
.btn-ghost:hover, .btn-ghost--active { background: var(--pink-light); border-color: var(--pink); color: var(--pink-dark); }
.btn-sm { padding: 5px 8px; font-size: 11px; }

.task-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 20px;
}
.task-list::-webkit-scrollbar { width: 4px; }
.task-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ═══ TASK CARD (sidebar) ═══════════════════════════════════════════ */
.task-card {
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
    transition: .2s;
    position: relative;
}
.task-card:hover { border-color: var(--pink); box-shadow: 0 2px 10px rgba(255,182,183,.2); transform: translateY(-1px); }
.task-card--overdue { border-left: 4px solid var(--red); }
.task-card--done { opacity: .65; }
.task-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.task-card-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
.done-title { text-decoration: line-through; color: var(--text-3); }
.task-card-desc { font-size: 11px; color: var(--text-3); margin-bottom: 8px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.task-date { font-size: 11px; color: var(--text-3); margin-left: auto; }

.task-removing { opacity: 0; transform: scale(.95); transition: .3s; }

/* ═══ BADGES ════════════════════════════════════════════════════════ */
.badge {
    background: var(--pink-light);
    color: var(--pink-dark);
    border-radius: 99px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
}
.badge-green { background: rgba(76,175,128,.15); color: var(--green); }
.badge-col { background: rgba(255,182,183,.25); color: var(--pink-dark); font-size: 10px; padding: 2px 6px; }

/* ═══ CHIPS ═════════════════════════════════════════════════════════ */
.chip {
    display: inline-flex; align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.chip-facile    { background: rgba(76,175,128,.15);  color: #2e7d55; }
.chip-moyen     { background: rgba(245,166,35,.15);  color: #a0690b; }
.chip-difficile { background: rgba(224,85,85,.15);   color: var(--red); }
.chip-imp-indulgent { background: rgba(74,128,212,.15); color: var(--blue); }
.chip-imp-median    { background: rgba(139,92,246,.15); color: var(--purple); }
.chip-imp-urgent    { background: rgba(224,85,85,.15);  color: var(--red); }

/* ═══ BTN DONE (petit) ══════════════════════════════════════════════ */
.btn-done-sm {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-3);
    cursor: pointer;
    font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: .2s;
}
.btn-done-sm:hover { background: var(--green); border-color: var(--green); color: #fff; }

/* ═══ EMPTY STATE ═══════════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 30px 16px;
    color: var(--text-3);
}
.empty-state span { font-size: 28px; display: block; margin-bottom: 8px; }
.empty-state p { font-size: 12px; }

/* ═══ KANBAN CENTRAL ════════════════════════════════════════════════ */
.kanban-wrap {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.kanban-header {
    padding: 20px 20px 12px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-shrink: 0;
}
.kanban-header h2 { font-size: 18px; font-weight: 700; color: var(--text); }
.kanban-header small { font-size: 12px; color: var(--text-3); }

.kanban-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 0 16px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: start;
}
.kanban-grid::-webkit-scrollbar { width: 4px; }
.kanban-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.kanban-col {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    min-height: 200px;
    transition: .2s;
}
.kanban-col--today {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px var(--pink-light);
}
.kanban-col.drag-over {
    background: var(--pink-light);
    border-color: var(--pink);
    border-style: dashed;
}

.kanban-col-header {
    padding: 10px 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.col-label { font-size: 11px; font-weight: 600; color: var(--text); text-transform: capitalize; }
.col-date  { font-size: 10px; color: var(--text-3); }

.kanban-col-body {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    min-height: 80px;
}
.kanban-col-body::-webkit-scrollbar { width: 3px; }
.kanban-col-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.drop-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-3);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    min-height: 60px;
    opacity: .6;
}

/* ═══ KANBAN CARD ═══════════════════════════════════════════════════ */
.kanban-card {
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: grab;
    transition: .2s;
    position: relative;
}
.kanban-card:hover { border-color: var(--pink); box-shadow: 0 2px 8px rgba(255,182,183,.25); }
.kanban-card:active { cursor: grabbing; }

.kanban-card-top { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; }
.kanban-card-title { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; line-height: 1.3; }
.kanban-card-desc { font-size: 10px; color: var(--text-3); margin-bottom: 6px; line-height: 1.4; }
.kanban-card-meta { display: flex; gap: 4px; flex-wrap: wrap; }
.kanban-card-files { margin-top: 6px; border-top: 1px solid var(--border); padding-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.file-link { font-size: 10px; color: var(--blue); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-link:hover { text-decoration: underline; }

/* ═══ MODAL ═════════════════════════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 500;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--surface);
    border-radius: 20px;
    width: 540px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn .2s ease-out;
}
@keyframes modalIn { from { transform: scale(.95); opacity:0; } to { transform: scale(1); opacity:1; } }

.modal-header {
    padding: 20px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-3); line-height: 1; transition: .2s; }
.modal-close:hover { color: var(--red); }

.modal-form { padding: 20px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.form-group input[type=text],
.form-group input[type=date],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 13px;
    color: var(--text);
    background: var(--surface2);
    outline: none;
    transition: .2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--pink); background: #fff; }
.form-group textarea { resize: vertical; min-height: 70px; }
.form-group input[type=file] { font-size: 12px; color: var(--text-2); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.chip-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-opt {
    padding: 6px 14px;
    border-radius: 99px;
    border: 1.5px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    user-select: none;
    position: relative;
}
.chip-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-opt:hover { border-color: var(--pink); }
.chip-opt.selected { box-shadow: 0 0 0 2px var(--pink); }

.chip-facile.selected    { background: rgba(76,175,128,.15);  border-color: var(--green);   color: #2e7d55; }
.chip-moyen.selected     { background: rgba(245,166,35,.15);  border-color: var(--orange);  color: #a0690b; }
.chip-difficile.selected { background: rgba(224,85,85,.15);   border-color: var(--red);     color: var(--red); }
.chip-indulgent.selected { background: rgba(74,128,212,.15);  border-color: var(--blue);    color: var(--blue); }
.chip-median.selected    { background: rgba(139,92,246,.15);  border-color: var(--purple);  color: var(--purple); }
.chip-urgent.selected    { background: rgba(224,85,85,.15);   border-color: var(--red);     color: var(--red); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}
.btn-primary {
    padding: 10px 24px;
    background: var(--pink);
    border: none;
    border-radius: 30px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: .2s;
}
.btn-primary:hover { background: var(--pink-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,182,183,.5); }

/* ═══ AUTH PAGES (connexion, inscription, mot de passe) ══════════════ */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    overflow: auto;
    padding: 30px 16px;
}
.auth-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 36px 40px;
    width: 380px;
    max-width: 100%;
    box-shadow: var(--shadow-lg);
    border: 1.5px solid var(--border);
    transition: .3s;
}
.auth-card:hover { border-color: var(--pink-mid); box-shadow: 0 12px 40px rgba(255,182,183,.2); }
.auth-logo {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: block; margin: 0 auto 12px;
}
.auth-card h1 { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-card h4 { text-align: center; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.auth-card .auth-sub { text-align: center; font-size: 12px; color: var(--text-3); margin-bottom: 24px; }

.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.auth-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    background: var(--surface2);
    transition: .2s;
}
.auth-input-wrap:focus-within { border-color: var(--pink); background: #fff; box-shadow: 0 0 0 3px var(--pink-light); }
.auth-input-wrap img { width: 18px; height: 18px; opacity: .5; }
.auth-input-wrap input { flex: 1; border: none; background: transparent; font-family: var(--font); font-size: 14px; color: var(--text); outline: none; }

.auth-btn {
    width: 100%;
    padding: 13px;
    background: var(--pink);
    border: none;
    border-radius: 30px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: .2s;
    margin-top: 8px;
    letter-spacing: .5px;
}
.auth-btn:hover { background: var(--pink-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,182,183,.45); }

.auth-link { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 14px; cursor: pointer; transition: .2s; }
.auth-link:hover { color: var(--text); }
.auth-link a, .auth-link span { color: var(--pink-dark); text-decoration: none; font-weight: 500; }
.auth-link a:hover { text-decoration: underline; }

.auth-error   { background: rgba(224,85,85,.1); border: 1px solid rgba(224,85,85,.3); color: #c0392b; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.auth-success { background: rgba(76,175,128,.1); border: 1px solid rgba(76,175,128,.3); color: #2e7d55; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

/* Séparateur pour les pages d'inscription */
.auth-card.wide { width: 460px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE MOBILE — ORGANIS'ME
   Breakpoints : 768px (tablette), 480px (mobile)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Utilitaire : bottom nav mobile ─────────────────────────────────────── */
.mobile-nav {
    display: none;
}

/* ══════════════════════════════════════════════
   TABLETTE (≤ 768px)
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── body / layout global ── */
    body {
        height: auto;
        overflow: auto;
        overflow-x: hidden;
    }

    /* ── Topbar ── */
    .topbar {
        padding: 0 14px;
        gap: 10px;
    }
    .topbar-center {
        display: none; /* barre de recherche masquée, déplacée en mobile */
    }
    .topbar-left { min-width: 0; }
    .topbar-right { min-width: 0; gap: 8px; }
    .topbar-title { font-size: 13px; }

    /* ── App layout : on passe en colonne ── */
    .app-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    /* ── Sidebars : masquées sur tablette, accessibles via onglets ── */
    .sidebar {
        border: none;
        border-top: 1px solid var(--border);
        max-height: 320px;
    }
    .sidebar-right { border-left: none; border-top: 1px solid var(--border); }

    /* ── Kanban : scroll horizontal sur tablette ── */
    .kanban-wrap {
        overflow: visible;
    }
    .kanban-grid {
        grid-template-columns: repeat(6, minmax(140px, 1fr));
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    .kanban-col {
        scroll-snap-align: start;
        min-width: 140px;
    }

    /* ── Modal ── */
    .modal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 60px);
        border-radius: 16px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* ── Calendrier ── */
    #calendar-view { padding: 12px; margin-top: 60px; }
    .calendar-grid { gap: 2px; }
    .cal-cell { min-height: 60px; padding: 3px; font-size: 10px; }
    .cal-day-num { font-size: 10px; }
    .cal-task { font-size: 9px; padding: 1px 3px; }
}


/* ══════════════════════════════════════════════
   MOBILE (≤ 480px)
   ══════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* ── Body ── */
    body {
        height: auto;
        overflow: auto;
        overflow-x: hidden;
        /* Espace pour la bottom nav fixe */
        padding-bottom: 64px;
    }

    /* ── Topbar mobile ── */
    .topbar {
        height: 54px;
        padding: 0 12px;
        gap: 8px;
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 200;
    }
    .topbar-center { display: none; }
    .topbar-title { display: none; }
    .topbar-logo { width: 28px; height: 28px; }

    /* ── Navigation du bas (bottom bar) ── */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 60px;
        background: var(--surface);
        border-top: 1px solid var(--border);
        z-index: 300;
        align-items: stretch;
        box-shadow: 0 -2px 12px rgba(0,0,0,.08);
    }
    .mobile-nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: none;
        background: transparent;
        color: var(--text-3);
        font-family: var(--font);
        font-size: 9px;
        font-weight: 600;
        cursor: pointer;
        transition: .2s;
        letter-spacing: .3px;
        text-transform: uppercase;
        padding: 0 4px;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-nav-btn svg { width: 20px; height: 20px; }
    .mobile-nav-btn.active {
        color: var(--pink-dark);
        background: var(--pink-light);
        border-radius: 0;
    }
    .mobile-nav-btn:active { transform: scale(.93); }

    /* ── App layout : colonne, avec padding pour la topbar fixe ── */
    .app-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
        padding-top: 54px; /* hauteur topbar */
    }

    /* ── Vues : sidebars masquées par défaut (kanban visible) ── */
    /* Le JS gère l'affichage via style.display — le kanban reste visible par défaut */
    .sidebar {
        display: none;
    }

    /* ── Sidebar "À faire" ── */
    .sidebar {
        flex-direction: column;
        border: none;
        max-height: none;
        min-height: calc(100vh - 54px - 60px);
    }
    .sidebar-right { border: none; }

    /* ── Kanban : scroll horizontal snappé ── */
    .kanban-wrap {
        flex-direction: column;
        overflow: visible;
    }
    .kanban-header {
        padding: 12px 14px 8px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .kanban-header h2 { font-size: 14px; }
    .kanban-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        gap: 10px;
        padding: 8px 12px 16px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .kanban-grid::-webkit-scrollbar { display: none; }
    .kanban-col {
        flex: 0 0 calc(85vw);
        scroll-snap-align: center;
        min-height: 280px;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        border-radius: var(--radius);
    }

    /* ── Barre de recherche dans la topbar (mobile) ── */
    .mobile-search-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--bg);
        border: 1.5px solid var(--border);
        border-radius: 30px;
        padding: 6px 12px;
        flex: 1;
        transition: .2s;
    }
    .mobile-search-bar:focus-within { border-color: var(--pink); background: #fff; }
    .mobile-search-bar input {
        border: none; background: transparent;
        font-family: var(--font); font-size: 13px;
        color: var(--text); width: 100%; outline: none;
    }
    .mobile-search-bar svg { flex-shrink: 0; opacity: .5; }

    /* Masquer la search desktop sur mobile */
    .topbar-center { display: none !important; }

    /* ── Task cards : plus aérées sur mobile ── */
    .task-card { padding: 14px; margin-bottom: 10px; }
    .task-card-title { font-size: 14px; }
    .task-card-desc { font-size: 12px; white-space: normal; }
    .task-card-meta { gap: 6px; }
    .chip { font-size: 10px; padding: 3px 9px; }
    .task-date { font-size: 11px; margin-left: 0; }

    /* Boutons action sur les cartes : plus grands pour le toucher */
    .btn-done-sm {
        width: 28px; height: 28px;
        font-size: 13px;
    }
    .btn-delete-sm {
        font-size: 15px; padding: 3px 7px;
    }

    /* ── Kanban cards ── */
    .kanban-card { padding: 12px; }
    .kanban-card-title { font-size: 13px; }
    .kanban-card-desc { font-size: 11px; }

    /* ── Modal ── */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .modal {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        animation: modalSlideUp .25s ease-out;
    }
    @keyframes modalSlideUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }
    .modal-header { padding: 16px 16px 10px; }
    .modal-form { padding: 14px 16px; }
    .modal-footer { flex-direction: column-reverse; gap: 8px; }
    .modal-footer .btn-primary,
    .modal-footer .btn-ghost {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .form-row { grid-template-columns: 1fr; }
    .chip-selector { gap: 6px; }
    .chip-opt { padding: 8px 12px; font-size: 12px; }

    /* ── Profil dropdown : full width en bas ── */
    .profile-dropdown {
        position: fixed;
        top: auto; bottom: 68px;
        right: 8px; left: 8px;
        width: auto;
        border-radius: var(--radius);
        z-index: 400;
    }

    /* ── Calendrier ── */
    #calendar-view {
        padding: 8px;
        margin-top: 0;
    }
    .calendar-nav { gap: 6px; }
    .calendar-nav h3 { font-size: 14px; }
    .btn-ghost.btn-sm { padding: 5px 8px; font-size: 10px; }
    .calendar-grid { gap: 2px; }
    .cal-header-cell { font-size: 9px; padding: 4px 0; }
    .cal-cell {
        min-height: 50px;
        padding: 2px;
        border-radius: 6px;
    }
    .cal-day-num { font-size: 9px; font-weight: 700; }
    .cal-task {
        font-size: 8px;
        padding: 1px 2px;
        border-radius: 3px;
        margin-top: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Navigation semaine kanban ── */
    .kanban-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        padding: 10px 12px 6px;
    }
    .kanban-header > div { text-align: center; }

    /* ── Sidebar header / controls ── */
    .sidebar-header { padding: 16px 14px 10px; }
    .sidebar-header h2 { font-size: 15px; }
    .sidebar-controls { padding: 0 10px 10px; }
    .task-list { padding: 6px 10px 20px; }
}

/* ══════════════════════════════════════════════
   AUTH PAGES responsive (connexion, inscription)
   ══════════════════════════════════════════════ */
@media (max-width: 480px) {
    .auth-body {
        padding: 20px 12px;
        align-items: flex-start;
        padding-top: 40px;
    }
    .auth-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    .auth-card.wide { width: 100%; }
    .auth-logo { width: 52px; height: 52px; }
    .auth-card h1 { font-size: 18px; }
    .auth-btn { padding: 12px; font-size: 13px; }

    /* Landing page (index.php) */
    .lp-navbar { padding: 12px 16px; }
    .lp-hero { padding: 80px 16px 50px; }
    .lp-hero-title { font-size: 2em; }
    .lp-hero-sub { font-size: 14px; }
    .lp-cadre1 { padding: 18px 16px; }
    .lp-categories { gap: 8px; }
    .lp-cat-btn { width: 80px; height: 80px; font-size: 11px; }
    .lp-cat-btn img { width: 34px; height: 34px; }
    .lp-section { padding: 50px 16px; }
    .lp-section-title { font-size: 1.4em; }
    .lp-form { padding: 24px 18px; width: 100%; }
    .lp-cadre2, .lp-cadre3 { width: calc(100vw - 64px); }
    .lp-btn-lg { font-size: 14px; padding: 11px 28px; }

    /* Formulaire création tâche : les file inputs */
    .form-group input[type=file] {
        font-size: 11px;
    }
}
