/* === START MODIFICATION : Palette couleurs coherente Kartu (Claude Code - 2026-04-15) === */

:root {
    /* Couleurs principales */
    --kartu-primary: #1a237e;        /* Bleu fonce - brand */
    --kartu-primary-light: #3949ab;
    --kartu-secondary: #37474f;      /* Gris fonce */

    /* Statuts */
    --kartu-success: #2e7d32;        /* Vert - OK, en ligne, ponctuel */
    --kartu-success-light: #66bb6a;
    --kartu-success-bg: #e8f5e9;

    --kartu-warning: #f57c00;        /* Orange - pause, attention */
    --kartu-warning-light: #ffa726;
    --kartu-warning-bg: #fff3e0;

    --kartu-danger: #c62828;         /* Rouge - depassement, erreur */
    --kartu-danger-light: #ef5350;
    --kartu-danger-bg: #ffebee;

    --kartu-info: #1565c0;           /* Bleu - info, heures supp */
    --kartu-info-light: #42a5f5;
    --kartu-info-bg: #e3f2fd;

    --kartu-muted: #78909c;          /* Gris - hors ligne, inactif */
    --kartu-muted-light: #b0bec5;
    --kartu-muted-bg: #eceff1;

    /* Pauses (timeline) */
    --kartu-pause-matin: #ffa726;    /* Orange */
    --kartu-pause-dej: #42a5f5;      /* Bleu */
    --kartu-pause-pm1: #ab47bc;      /* Violet */
    --kartu-pause-pm2: #ec407a;      /* Rose */

    /* Surface */
    --kartu-bg: #ffffff;
    --kartu-bg-secondary: #f5f5f5;
    --kartu-border: #e0e0e0;
    --kartu-shadow: rgba(0, 0, 0, 0.08);

    /* Texte */
    --kartu-text: #212121;
    --kartu-text-secondary: #757575;

    /* Radius */
    --kartu-radius: 8px;
    --kartu-radius-lg: 12px;
}

/* Dark mode overrides */
body.dark-mode {
    --kartu-bg: #121212;
    --kartu-bg-secondary: #1e1e1e;
    --kartu-border: #333333;
    --kartu-text: #e0e0e0;
    --kartu-text-secondary: #9e9e9e;
    --kartu-shadow: rgba(0, 0, 0, 0.3);
}

/* === END MODIFICATION === */

/* === START MODIFICATION : Highlight "Aujourd'hui" reutilisable sur toute l'app (Claude Code - 2026-04-20) ===
   Classes a appliquer sur les en-tetes / cellules / lignes correspondant a la date du jour.
     - .today-col   -> en-tete ou cellule d'une colonne hebdomadaire
     - .today-row   -> ligne de tableau correspondant au jour courant
     - .today-cell  -> cellule isolee (case de calendrier mensuel)
     - .today-badge -> petit badge "AUJD" a coller dans un header ou label */

.today-col,
.today-cell,
th.today-col,
td.today-col {
    background-color: var(--kartu-info-bg) !important;
    box-shadow: inset 0 3px 0 0 var(--kartu-info);
    position: relative;
}

tr.today-row > td,
tr.today-row > th {
    background-color: var(--kartu-info-bg) !important;
    font-weight: 600;
}
tr.today-row > td:first-child,
tr.today-row > th:first-child {
    border-left: 3px solid var(--kartu-info);
}

.today-badge {
    display: inline-block;
    background-color: var(--kartu-info);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* === END MODIFICATION : Highlight Aujourd'hui === */

/* === START MODIFICATION : lisibilite en-tete du jour sur thead sombre (Abdelhak - 2026-09-24) ===
   Dans un <thead class="table-dark">, Bootstrap force le texte en blanc : sur le fond clair
   de .today-col, le jour courant devenait illisible (contraste ~1.1:1).
   Texte bleu fonce sur fond bleu clair : contraste ~5:1 (WCAG AA). */
th.today-col,
th.today-col small {
    color: var(--kartu-info) !important;
}
/* === END MODIFICATION === */

/* === START MODIFICATION : Fix icone calendrier invisible sur input bg-dark (Claude Code - 2026-05-09) === */
/* Sur Chromium, ::-webkit-calendar-picker-indicator est noir par defaut -> invisible sur bg-dark */
input[type="date"].bg-dark::-webkit-calendar-picker-indicator,
input[type="time"].bg-dark::-webkit-calendar-picker-indicator,
input[type="datetime-local"].bg-dark::-webkit-calendar-picker-indicator,
input[type="month"].bg-dark::-webkit-calendar-picker-indicator,
input[type="week"].bg-dark::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.2);
    cursor: pointer;
    opacity: 0.85;
}
input[type="date"].bg-dark::-webkit-calendar-picker-indicator:hover,
input[type="time"].bg-dark::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"].bg-dark::-webkit-calendar-picker-indicator:hover,
input[type="month"].bg-dark::-webkit-calendar-picker-indicator:hover,
input[type="week"].bg-dark::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
/* === END MODIFICATION : Fix icone calendrier === */
