/* Polices hébergées sur le serveur (Google Fonts, téléchargées le 18/10/2026 : polices variables, latin et latin-ext) */
@font-face{font-family:'Exo 2';font-style:normal;font-weight:400 900;font-display:swap;src:url('../fonts/exo2-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Exo 2';font-style:normal;font-weight:400 900;font-display:swap;src:url('../fonts/exo2-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400 700;font-display:swap;src:url('../fonts/dmsans-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400 700;font-display:swap;src:url('../fonts/dmsans-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url('../fonts/jetbrainsmono-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url('../fonts/jetbrainsmono-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/* Sono Médoc CRM - Styles globaux
 * Charte du site (thème PrestaShop « sonomedoc ») : rouge du logo #C2272D, gris #4C4C4C,
 * graphite neutre en fond, titres en Exo 2, texte en DM Sans.
 * Palette Tailwind correspondante : assets/js/tailwind-theme.js */

:root {
    --sm-brand-red: #C2272D;
    --sm-brand-gray: #4C4C4C;
    --sm-bg: #0F0F10;
    --sm-surface: #19191B;
    --sm-surface2: #222225;
    --sm-line: #2C2C30;
    --sm-ink: #F5F5F5;
    --sm-muted: #ABABAF;
    --sm-accent: #C2272D;
    --sm-accent-ink: #F06167;
    --sm-font-d: 'Exo 2', system-ui, sans-serif;
    color-scheme: dark;
}

body {
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--sm-font-d);
    letter-spacing: -0.01em;
}

::selection {
    background: rgba(194, 39, 45, 0.55);
    color: #fff;
}

/* Logo : symbole + « Sono Médoc », comme sur le site */
.sm-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: inherit;
    text-decoration: none;
    line-height: 1;
}
.sm-brand-mark {
    flex: none;
    width: auto;
    height: 32px;
    transition: transform 0.5s cubic-bezier(.3, 1.4, .5, 1);
}
.sm-brand:hover .sm-brand-mark {
    transform: rotate(-5deg) scale(1.05);
}
.sm-brand-name {
    font-family: var(--sm-font-d);
    font-size: 20px;
    font-weight: 500;
    white-space: nowrap;
}
.sm-brand-sono { color: #fff; }
.sm-brand-medoc { color: var(--sm-brand-red); }
.sm-brand-tag {
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--sm-muted);
}
/* page de connexion / installation : version grand format, centrée */
.sm-brand-lg {
    flex-direction: column;
    gap: 14px;
}
.sm-brand-lg .sm-brand-mark { height: 64px; }
.sm-brand-lg .sm-brand-name { font-size: 34px; }
/* entre 1024 et 1280 px, les liens du menu prennent la place : on ne garde que le symbole */
@media (min-width: 1024px) and (max-width: 1279px) {
    .sm-nav .sm-brand-name,
    .sm-nav .sm-brand-tag { display: none; }
}
@media (max-width: 380px) {
    .sm-nav .sm-brand-tag { display: none; }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0F0F10;
}
::-webkit-scrollbar-thumb {
    background: #323236;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4A4A4F;
}

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Kanban board */
.kanban-board {
    min-height: calc(100vh - 200px);
}

.kanban-column {
    min-width: 280px;
}

.kanban-cards .sortable-ghost {
    opacity: 0.4;
}

.kanban-cards .sortable-drag {
    opacity: 0.9;
}

.kanban-card {
    cursor: grab;
    transition: transform 0.15s, box-shadow 0.15s;
}

.kanban-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.kanban-card:active {
    cursor: grabbing;
}

/* Calendrier */

/* Week view - all-day bars */
.cal-allday-bar {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.15s;
    color: white;
    line-height: 1.4;
}
.cal-allday-bar:hover { opacity: 0.8; }

/* Time grid */
.cal-time-slot {
    height: 28px;
    border-bottom: 1px solid rgba(44, 44, 48, 0.6);
    position: relative;
}
.cal-time-slot-hour {
    border-bottom-color: #2C2C30;
}
.cal-time-label {
    font-size: 10px;
    color: #8A8A90;
    text-align: right;
    padding-right: 6px;
    line-height: 28px;
}
.cal-time-marker {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    position: absolute;
    left: 2px;
    right: 2px;
}
.cal-time-marker:hover { opacity: 0.8; }

/* Month view */
.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #2C2C30;
}
.cal-month-cell {
    background: #19191B;
    min-height: 100px;
    padding: 4px;
    cursor: pointer;
    transition: background 0.15s;
}
.cal-month-cell:hover { background: #222225; }
.cal-month-cell.today {
    background: rgba(194, 39, 45, 0.08);
    box-shadow: inset 0 0 0 1px rgba(194, 39, 45, 0.45);
}
.cal-month-cell.other-month { opacity: 0.4; }
.cal-month-chip {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    display: block;
}
.cal-month-chip:hover { opacity: 0.8; }
.cal-month-more {
    font-size: 10px;
    color: #F06167;
    cursor: pointer;
    padding: 1px 4px;
}
.cal-month-more:hover { text-decoration: underline; }

/* Day header in month */
.cal-month-day-num {
    font-size: 12px;
    font-weight: 600;
    color: #ABABAF;
    margin-bottom: 2px;
}
.cal-month-cell.today .cal-month-day-num {
    color: #F06167;
}

/* Legend */
.cal-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

@media (max-width: 640px) {
    .cal-month-cell { min-height: 50px; padding: 2px; }
    .cal-month-chip { font-size: 0; padding: 0; height: 6px; width: 6px; border-radius: 50%; display: inline-block; margin: 1px; }
    .cal-month-day-num { font-size: 10px; }
    .cal-month-more { font-size: 8px; }
}

/* Scanner */
#qr-reader {
    width: 100%;
    border: none !important;
}

#qr-reader video {
    border-radius: 12px;
}

#qr-reader__scan_region {
    min-height: 200px;
}

#qr-reader__dashboard {
    padding: 10px !important;
}

#qr-reader__dashboard_section_csr button {
    background: #C2272D !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
}

#qr-reader__dashboard_section_swaplink {
    color: #F06167 !important;
    text-decoration: underline !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
}

.pulse-green {
    animation: pulse-green 1s ease-in-out 3;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.pulse-red {
    animation: pulse-red 1s ease-in-out 3;
}

/* Responsive tables */
@media (max-width: 640px) {
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 12px;
    }
}

/* Select styling for dark theme */
select option {
    background: #19191B;
    color: white;
}

/* Checkbox styling */
input[type="checkbox"] {
    accent-color: #C2272D;
}

/* File input */
input[type="file"]::file-selector-button {
    cursor: pointer;
}

/* iOS form field fixes */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0.5rem;
    font-size: 16px;
}

input[type="datetime-local"],
input[type="date"],
input[type="time"] {
    min-height: 44px;
}

/* Calendar picker icon fix for dark theme */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.8;
    cursor: pointer;
}

/* Modal scroll iOS */
.fixed.inset-0 > .absolute.overflow-y-auto {
    -webkit-overflow-scrolling: touch;
}

/* Focus ring */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #C2272D;
    box-shadow: 0 0 0 2px rgba(194, 39, 45, 0.25);
}

/* Print styles */
@media print {
    nav, .no-print, .sm-nav, .sm-drawer {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    main {
        padding-top: 0 !important;
    }
}

/* =====================================================================
   To-do du site (todo.php, assets/js/todo.js) : tableau de cartes animé
   ===================================================================== */
/* .todo-drag : la carte tenue est rattachée au <body> pendant le glisser, hors de .todo-page */
.todo-page, .todo-drag { --todo-ease: cubic-bezier(.2, .8, .2, 1); --todo-spring: cubic-bezier(.3, 1.4, .5, 1); --todo-faint: #8A8A90; }

/* en-tête */
.todo-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: 28px; }
.todo-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 11px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--sm-accent-ink); }
.todo-eyebrow i { display: inline-block; width: 6px; height: 6px; background: var(--sm-brand-red); }
.todo-eyebrow i:nth-child(2) { opacity: .6; transform: translateY(-4px); }
.todo-eyebrow i:nth-child(3) { opacity: .35; margin-right: 4px; }
.todo-h1 { margin: 12px 0 8px; font: 800 clamp(34px, 5vw, 56px)/1 var(--sm-font-d); letter-spacing: -.02em; color: var(--sm-ink); }
.todo-sub { margin: 0; max-width: 560px; color: var(--sm-muted); }
.todo-hero-side { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.todo-progress { min-width: 220px; }
.todo-progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; color: var(--sm-muted); }
.todo-progress-top b { font: 700 20px/1 var(--sm-font-d); color: var(--sm-ink); }
.todo-bar { height: 8px; border-radius: 999px; background: var(--sm-surface2); overflow: hidden; }
.todo-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sm-brand-red), #F06167); transition: width .9s var(--todo-ease); }

/* boutons */
.todo-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--sm-accent); color: #fff; font: 700 14px/1 var(--sm-font-d); cursor: pointer; transition: transform .3s var(--todo-spring), background-color .2s; }
.todo-btn:hover { background: #A31F25; transform: translateY(-2px); }
.todo-btn:active { transform: scale(.97); }
.todo-btn:focus-visible, .todo-btn-ghost:focus-visible, .todo-chip:focus-visible, .todo-check:focus-visible, .todo-del:focus-visible { outline: 2px solid var(--sm-accent-ink); outline-offset: 2px; }
.todo-btn kbd { padding: 3px 6px; border-radius: 6px; background: rgba(255, 255, 255, .18); font: 600 11px/1 'JetBrains Mono', monospace; }
.todo-btn-ghost { min-height: 44px; padding: 0 18px; border: 1px solid var(--sm-line); border-radius: 999px; background: transparent; color: var(--sm-ink); font-weight: 600; cursor: pointer; transition: background-color .2s; }
.todo-btn-ghost:hover { background: var(--sm-surface2); }

/* filtres et recherche */
.cat-site { --c: #F06167; } .cat-contenu { --c: #FFB547; } .cat-seo { --c: #4ADE80; } .cat-crm { --c: #60A5FA; } .cat-serveur { --c: #ABABAF; }
.todo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #ABABAF); }
.todo-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.todo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.todo-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--sm-line); border-radius: 999px; background: transparent; color: var(--sm-muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .3s var(--todo-spring); }
.todo-chip span { font: 600 11px/1 'JetBrains Mono', monospace; color: var(--todo-faint); }
.todo-chip:hover { color: var(--sm-ink); border-color: #4A4A4F; }
.todo-chip:active { transform: scale(.95); }
.todo-chip.is-on { background: var(--sm-ink); border-color: var(--sm-ink); color: #0F0F10; }
.todo-chip.is-on span { color: #4A4A4F; }
.todo-search { position: relative; display: flex; align-items: center; }
.todo-search svg { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--todo-faint); pointer-events: none; }
.todo-search input { width: 270px; max-width: 100%; height: 40px; padding: 0 16px 0 38px; border: 1px solid var(--sm-line); border-radius: 999px; background: var(--sm-surface); color: var(--sm-ink); }

/* colonnes */
.todo-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.todo-col { position: relative; display: flex; flex-direction: column; min-height: 280px; padding: 14px; border: 1px solid var(--sm-line); border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 140px), #141415; }
.todo-col-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; }
.todo-col-head h2 { margin: 0; font: 700 16px/1 var(--sm-font-d); color: var(--sm-ink); }
.todo-col-dot { width: 10px; height: 10px; border-radius: 3px; }
.todo-col[data-statut="a_faire"] .todo-col-dot { background: var(--sm-brand-red); box-shadow: 0 0 0 4px rgba(194, 39, 45, .18); }
.todo-col[data-statut="en_cours"] .todo-col-dot { background: #FFB547; box-shadow: 0 0 0 4px rgba(255, 181, 71, .15); animation: todo-pulse 2.4s ease-in-out infinite; }
.todo-col[data-statut="fait"] .todo-col-dot { background: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .14); }
.todo-count { margin-left: auto; min-width: 26px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--sm-surface2); font: 600 11px/22px 'JetBrains Mono', monospace; color: var(--sm-muted); text-align: center; }
.todo-quick input { width: 100%; height: 42px; margin-bottom: 12px; padding: 0 14px; border: 1px dashed #3A3A3F; border-radius: 14px; background: transparent; color: var(--sm-ink); transition: border-color .2s, background-color .2s; }
.todo-quick input:hover { border-color: #4A4A4F; }
.todo-quick input:focus { border-style: solid; background: var(--sm-surface); }
.todo-list { flex: 1; min-height: 130px; border-radius: 16px; outline: 2px dashed transparent; outline-offset: 4px; transition: outline-color .2s; }
.todo-board.is-dragging .todo-list { outline-color: #2C2C30; }
.todo-empty { display: none; margin: -110px 0 0; padding: 0 12px 50px; text-align: center; color: var(--todo-faint); font-size: 14px; pointer-events: none; }
.todo-col.is-empty .todo-empty { display: block; animation: todo-fade .4s var(--todo-ease); }
.todo-board:not(.is-ready) .todo-empty { visibility: hidden; }
.todo-loading { padding: 30px 0; text-align: center; color: var(--todo-faint); }

/* cartes */
.todo-card { position: relative; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; padding: 14px 12px 14px 16px; border: 1px solid var(--sm-line); border-radius: 18px; background: var(--sm-surface); cursor: grab; user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: transform .25s var(--todo-ease), border-color .2s, box-shadow .25s, opacity .3s; }
.todo-card[hidden] { display: none; }
.todo-card::before { content: ''; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: #4A4A4F; }
.todo-card[data-prio="1"]::before { background: var(--sm-brand-red); }
.todo-card[data-prio="2"]::before { background: #FFB547; }
.todo-card:hover { transform: translateY(-2px); border-color: #3A3A3F; box-shadow: 0 16px 34px -20px rgba(0, 0, 0, .95); }
.todo-card:focus-visible { outline: 2px solid var(--sm-accent-ink); outline-offset: 2px; }
.todo-card.is-done { opacity: .66; }
.todo-card.is-done:hover, .todo-card.is-done:focus-within { opacity: 1; }
.todo-check { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; padding: 0; border: 2px solid #4A4A4F; border-radius: 8px; background: transparent; color: #0F0F10; cursor: pointer; transition: background-color .25s, border-color .25s, transform .35s var(--todo-spring); }
.todo-check:hover { border-color: #4ADE80; transform: scale(1.1); }
.todo-check:active { transform: scale(.9); }
.todo-check svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .35s var(--todo-ease) .05s; }
.todo-card.is-done .todo-check { background: #4ADE80; border-color: #4ADE80; }
.todo-card.is-done .todo-check svg { stroke-dashoffset: 0; }
.todo-body { flex: 1; min-width: 0; }
.todo-title { margin: 0; font: 600 15px/1.35 var(--sm-font-d); letter-spacing: 0; color: var(--sm-ink); overflow-wrap: anywhere; transition: color .3s; }
/* trait qui barre le titre de gauche à droite, ligne par ligne */
.todo-title span { background: linear-gradient(currentColor, currentColor) no-repeat 0 56% / 0 1.5px; transition: background-size .45s var(--todo-ease); }
.todo-card.is-done .todo-title { color: var(--todo-faint); }
.todo-card.is-done .todo-title span { background-size: 100% 1.5px; }
.todo-note { margin: 5px 0 0; color: var(--sm-muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 12px; color: var(--todo-faint); }
.todo-tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); font-weight: 600; }
.todo-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.todo-prio { display: inline-flex; align-items: center; gap: 5px; }
.todo-prio::before, .todo-prio-sq { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: #4A4A4F; }
.todo-card[data-prio="1"] .todo-prio { color: #F06167; }
.todo-card[data-prio="1"] .todo-prio::before, [data-prio="1"] > span > .todo-prio-sq { background: var(--sm-brand-red); }
.todo-card[data-prio="2"] .todo-prio::before, [data-prio="2"] > span > .todo-prio-sq { background: #FFB547; }
.todo-del { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin: -4px -4px 0 0; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--todo-faint); opacity: 0; cursor: pointer; transition: opacity .2s, background-color .2s, color .2s; }
.todo-card:hover .todo-del, .todo-card:focus-within .todo-del { opacity: 1; }
.todo-del:hover { background: rgba(240, 97, 103, .14); color: #F06167; }
.todo-del svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: none) { .todo-del { opacity: .7; } }

/* glisser-déposer (SortableJS) : la carte se soulève et penche */
.todo-ghost { opacity: .4; border-style: dashed; background: transparent; box-shadow: none; }
.todo-ghost > * { visibility: hidden; }
.todo-chosen { cursor: grabbing; }
/* La carte tenue est déplacée par SortableJS (transform à chaque mouvement de souris) : sans transition,
   sinon elle traîne derrière le pointeur. Le « soulèvement » passe par rotate/scale, qui ne la gênent pas. */
.todo-drag, .sortable-fallback { transition: none !important; will-change: transform; }
.todo-drag { rotate: 2.5deg; scale: 1.04; opacity: 1 !important; cursor: grabbing; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .95), 0 0 0 1px rgba(194, 39, 45, .55); animation: todo-lift .16s var(--todo-ease, ease-out) both !important; }
@keyframes todo-lift { from { rotate: 0deg; scale: 1; } to { rotate: 2.5deg; scale: 1.04; } }
.todo-board.is-dragging .todo-card:not(.todo-drag) { transition: border-color .2s, box-shadow .2s, opacity .2s; }
.todo-board.is-dragging .todo-card:hover { transform: none; }

/* fenêtre d'ajout / de modification */
#todoModal { overflow-y: auto; }
.todo-modal-back { position: fixed; inset: 0; background: rgba(5, 5, 6, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s; }
#todoModal.is-open .todo-modal-back { opacity: 1; }
.todo-modal { position: relative; width: min(560px, calc(100% - 32px)); margin: 10vh auto 40px; padding: 26px; border: 1px solid var(--sm-line); border-radius: 24px; background: var(--sm-surface); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .95); opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .22s, transform .32s var(--todo-spring); }
#todoModal.is-open .todo-modal { opacity: 1; transform: none; }
.todo-modal h2 { margin: 0 0 18px; font: 700 22px/1.2 var(--sm-font-d); color: var(--sm-ink); }
.todo-field { display: block; margin-bottom: 14px; font-size: 13px; color: var(--sm-muted); }
.todo-field small { color: var(--todo-faint); }
.todo-field input, .todo-field textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 14px; border: 1px solid #3A3A3F; border-radius: 12px; background: #0F0F10; color: var(--sm-ink); }
.todo-field textarea { min-height: 86px; resize: vertical; }
.todo-field .is-invalid { animation: todo-shake .4s ease-in-out; border-color: #F06167; }
.todo-seg { margin: 0 0 14px; padding: 0; border: 0; }
.todo-seg legend { margin-bottom: 7px; font-size: 13px; color: var(--sm-muted); }
.todo-seg > div { display: flex; flex-wrap: wrap; gap: 6px; }
.todo-seg label { position: relative; }
.todo-seg input { position: absolute; opacity: 0; pointer-events: none; }
.todo-seg span { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--sm-line); border-radius: 999px; color: var(--sm-muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .3s var(--todo-spring); }
.todo-seg span:hover { color: var(--sm-ink); border-color: #4A4A4F; }
.todo-seg input:checked + span { background: var(--sm-ink); border-color: var(--sm-ink); color: #0F0F10; transform: scale(1.03); }
.todo-seg input:focus-visible + span { outline: 2px solid var(--sm-accent-ink); outline-offset: 2px; }
.todo-modal-foot { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.todo-del-btn { padding: 8px 4px; border: 0; background: transparent; color: #F06167; font-weight: 600; cursor: pointer; }
.todo-del-btn:hover { text-decoration: underline; }
.todo-del-btn[hidden] { display: none; }

/* message « Tâche supprimée · Annuler » */
.todo-toasts { position: fixed; left: 50%; bottom: 24px; z-index: 60; display: grid; gap: 8px; transform: translateX(-50%); }
.todo-toast { display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 18px; border: 1px solid var(--sm-line); border-radius: 16px; background: #222225; color: var(--sm-ink); font-size: 14px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .95); animation: todo-toast-in .4s var(--todo-spring, cubic-bezier(.3, 1.4, .5, 1)); transition: opacity .25s, transform .25s; }
.todo-toast button { padding: 8px 14px; border: 0; border-radius: 999px; background: rgba(240, 97, 103, .14); color: #F06167; font-weight: 700; cursor: pointer; }
.todo-toast button:hover { background: rgba(240, 97, 103, .24); }
.todo-toast.is-out { opacity: 0; transform: translateY(10px); }
.todo-pixel { position: fixed; z-index: 70; width: 7px; height: 7px; pointer-events: none; }

/* animations */
@keyframes todo-rise { from { opacity: 0; transform: translateY(22px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes todo-pop { 0% { opacity: 0; transform: translateY(-10px) scale(.86); } 60% { opacity: 1; transform: scale(1.025); } 100% { transform: none; } }
@keyframes todo-drop { 0% { scale: 1.05; } 100% { scale: 1; } }
@keyframes todo-flash { 0% { box-shadow: 0 0 0 0 rgba(194, 39, 45, .6); } 100% { box-shadow: 0 0 0 14px rgba(194, 39, 45, 0); } }
@keyframes todo-pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 181, 71, .05); } }
@keyframes todo-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes todo-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes todo-toast-in { from { opacity: 0; transform: translateY(18px) scale(.95); } to { opacity: 1; transform: none; } }
.todo-card.is-rising { animation: todo-rise .6s var(--todo-ease) both; }
.todo-card.is-new { animation: todo-pop .5s var(--todo-spring) both; }
.todo-card.is-dropped { animation: todo-drop .4s var(--todo-spring); }
.todo-card.is-flash { animation: todo-flash .7s ease-out; }

@media (max-width: 900px) {
    .todo-board { grid-template-columns: 1fr; }
    .todo-search, .todo-search input { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .todo-page *, .todo-page *::before, #todoModal *, .todo-toast, .todo-drag { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Barre de navigation (includes/nav.php, comportement dans assets/js/app.js)
   ===================================================================== */
.sm-nav { --nav-ease: cubic-bezier(.2, .8, .2, 1); position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 64px; background: rgba(15, 15, 16, .78); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .06); transition: background-color .3s, box-shadow .3s, border-color .3s; }
.sm-nav.is-scrolled { background: rgba(15, 15, 16, .92); border-bottom-color: rgba(255, 255, 255, .09); box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .9); }
.sm-nav-in { display: flex; align-items: center; gap: 20px; height: 100%; max-width: 80rem; margin: 0 auto; padding: 0 16px; }
.sm-nav .sm-brand { flex: none; }
.sm-nav-links { display: none; align-items: center; gap: 2px; min-width: 0; }
.sm-nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sm-nav-ic { flex: none; width: 18px; height: 18px; }
.sm-nav-chev { flex: none; width: 14px; height: 14px; opacity: .7; transition: transform .25s var(--nav-ease); }
[aria-expanded="true"] > .sm-nav-chev { transform: rotate(180deg); }

/* liens principaux : pilule grise au survol, rouge pour la page ouverte */
.sm-nav-link { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: #ABABAF; font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer; transition: color .2s, background-color .2s; }
.sm-nav-link:hover, .sm-nav-link[aria-expanded="true"] { color: #F5F5F5; background: rgba(255, 255, 255, .06); }
.sm-nav-link .sm-nav-ic { opacity: .8; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), opacity .2s; }
.sm-nav-link:hover .sm-nav-ic { opacity: 1; transform: translateY(-1px) scale(1.08); }
.sm-nav-link.is-active { color: #fff; background: rgba(194, 39, 45, .16); }
.sm-nav-link.is-active .sm-nav-ic { color: #F06167; opacity: 1; }
.sm-nav-link.is-active::after { content: ''; position: absolute; left: 50%; bottom: -13px; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px 3px 0 0; background: #C2272D; box-shadow: 0 0 12px rgba(194, 39, 45, .8); animation: sm-nav-in .4s var(--nav-ease); }
.sm-nav-link:focus-visible, .sm-nav-item:focus-visible, .sm-nav-user:focus-visible, .sm-burger:focus-visible, .sm-drawer-link:focus-visible, .sm-drawer-close:focus-visible { outline: 2px solid #F06167; outline-offset: 2px; }

/* menus déroulants (« Plus », compte) */
.sm-nav-drop { position: relative; }
.sm-nav-menu { position: absolute; top: calc(100% + 10px); left: 0; z-index: 10; min-width: 220px; padding: 6px; border: 1px solid #2C2C30; border-radius: 16px; background: #19191B; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .95); opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.97); transform-origin: top left; transition: opacity .18s, transform .22s var(--nav-ease), visibility 0s .22s; }
.sm-nav-menu-end { left: auto; right: 0; transform-origin: top right; }
.sm-nav-drop.is-open .sm-nav-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .22s var(--nav-ease), visibility 0s; }
.sm-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: #CFCFD2; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s; }
.sm-nav-item:hover { background: #222225; color: #fff; }
.sm-nav-item.is-active { background: rgba(194, 39, 45, .16); color: #fff; }
.sm-nav-item.is-active .sm-nav-ic { color: #F06167; }
.sm-nav-item.is-danger:hover { background: rgba(240, 97, 103, .12); color: #F06167; }
.sm-nav-menu-head { padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid #2C2C30; color: #8A8A90; font-size: 12px; }
.sm-nav-menu-head b { display: block; margin-top: 3px; color: #F5F5F5; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* compte */
.sm-nav-user { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 8px 0 4px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: #ABABAF; cursor: pointer; transition: background-color .2s, border-color .2s; }
.sm-nav-user:hover, .sm-nav-user[aria-expanded="true"] { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .08); }
.sm-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #C2272D, #861A1F); color: #fff; font: 700 14px/1 var(--sm-font-d); box-shadow: 0 0 0 2px rgba(194, 39, 45, .25); }

/* bouton menu (petits écrans) : trois traits qui deviennent une croix */
.sm-burger { position: relative; display: inline-grid; place-content: center; gap: 4px; width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: rgba(255, 255, 255, .04); cursor: pointer; }
.sm-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #F5F5F5; transition: transform .3s var(--nav-ease), opacity .2s; }
.sm-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sm-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sm-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* tiroir (petits écrans) */
.sm-drawer { position: fixed; inset: 0; z-index: 70; }
.sm-drawer[hidden] { display: none; }
.sm-drawer-back { position: absolute; inset: 0; background: rgba(5, 5, 6, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.sm-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px; width: min(320px, 86vw); padding: 16px 12px 24px; overflow-y: auto; background: #141415; border-left: 1px solid #2C2C30; box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .9); transform: translateX(100%); transition: transform .32s var(--nav-ease, cubic-bezier(.2, .8, .2, 1)); }
.sm-drawer.is-open .sm-drawer-back { opacity: 1; }
.sm-drawer.is-open .sm-drawer-panel { transform: none; }
.sm-drawer-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 14px; margin-bottom: 6px; border-bottom: 1px solid #2C2C30; }
.sm-drawer-user { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sm-drawer-user small { color: #8A8A90; font-size: 11px; }
.sm-drawer-user b { color: #F5F5F5; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-drawer-close { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: #ABABAF; cursor: pointer; }
.sm-drawer-close:hover { background: #222225; color: #fff; }
.sm-drawer-close svg { width: 20px; height: 20px; }
.sm-drawer-title { margin: 14px 12px 6px; font: 600 10.5px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: #8A8A90; }
.sm-drawer-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: #CFCFD2; font-size: 15px; text-decoration: none; opacity: 0; transform: translateX(16px); transition: background-color .15s, color .15s, opacity .3s, transform .35s var(--nav-ease, cubic-bezier(.2, .8, .2, 1)); }
.sm-drawer.is-open .sm-drawer-link { opacity: 1; transform: none; }
.sm-drawer-link:hover { background: #222225; color: #fff; }
.sm-drawer-link.is-active { background: rgba(194, 39, 45, .16); color: #fff; }
.sm-drawer-link.is-active .sm-nav-ic { color: #F06167; }
.sm-drawer-link.is-danger { color: #F06167; }
body.sm-noscroll { overflow: hidden; }

@keyframes sm-nav-in { from { opacity: 0; transform: scaleX(.2); } to { opacity: 1; transform: none; } }

@media (min-width: 1024px) {
    .sm-nav-links { display: flex; }
    .sm-burger { display: none; }
}
@media (max-width: 1023px) {
    .sm-nav-right > .sm-nav-drop { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sm-nav, .sm-nav *, .sm-drawer * { transition: none !important; animation: none !important; }
}
