@import url("goal.css");
@import url("budgets.css");

:root {
    --bdg-text: #1f2430;
    --bdg-text-muted: #6b7280;
    --bdg-card: #ffffff;
    --bdg-border: rgba(0,0,0,.08);
    --bdg-soft: rgba(0,0,0,.05);
    --bdg-accent: #004bfc;
    --bdg-accent-soft: rgba(0,75,252,.08);
    --bdg-accent-text: #0043d6;
    --bdg-accent-border: rgba(0,75,252,.30);
    --bdg-danger-soft: rgba(229,57,53,.08);
    --bdg-danger-text: #c62828;
    --bdg-danger-border: rgba(229,57,53,.35);
    --bdg-hover: rgba(0,0,0,.04);
    --bdg-success: #1e9e56;
    --bdg-success-border: #27ae60;
    --bdg-danger: #e53935;
    --bdg-tooltip-bg: #ffffff;
    --bdg-tooltip-text: #1f2430;
    --bdg-input-bg: #ffffff;
    --bdg-input-text: #1f2430;

    /* Design tokens budgets.css */
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 20px;
    --tr-fast: .15s ease;
    --tr-base: .2s ease;

    --bg-card:      #ffffff;
    --bg-hover:     #f5f7fa;
    --border:       #e2e6ea;
    --text-primary: #1a1d23;
    --text-muted:   #6b7280;
    --accent:       #1a56ff;
    --accent-hover: #1440d6;
    --success:      #16a34a;
    --warning:      #d97706;
    --danger:       #dc2626;
    --info:         #0891b2;
    --radius:       8px;
    --radius-lg-nf: 12px;
}

/* ═══════ Base ═══════ */
body {
    background-color: #fcfcfc;
    font-family: "Montserrat", sans-serif;
    transition: background-color .3s ease, color .3s ease;
}

#content {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    background-color: #fcfcfc;
    color: #1f2430;
    font-size: 14px;
}

.bg-top, .bg-foot {
    font-family: "Montserrat", sans-serif;
    background-color: #ffffff;
    color: #1f2430;
    font-size: 14px;
}
.bg-foot a { text-decoration: none; color: #1f2430; font-size: 12px; transition: color var(--tr-fast); }
.bg-foot a:hover { color: var(--bdg-accent-text); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #004bfc; border-radius: 4px; }

/* Liens : pas de surlignage au survol / clic / tap */
a {
    text-decoration: none;
    color: var(--bdg-accent-text);
    transition: color var(--tr-fast);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
a::selection {
    background: transparent;
    color: inherit;
}
a:hover { 
    color: #004bfc;
    text-decoration: none;
 }

/* ═══════ Surfaces principales : une seule teinte, rayon 14px ═══════ */
#box, #page, #chartbox, #table, #navigation {
    font-family: "Montserrat", sans-serif;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: var(--radius-lg);
    color: #1f2430;
    padding: 15px;
    margin: auto;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
#table { overflow-x: auto; overflow-y: hidden; }

/* ═══════ KPI / card-box : version claire ═══════ */
.card-box {
    font-family: "Montserrat", sans-serif;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: var(--radius-lg);
    color: #1f2430;
    padding: 20px 24px;
    margin: auto;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    position: relative;
    transition: transform var(--tr-base), box-shadow var(--tr-base);
    overflow: hidden;
}
.card-box:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.card-label {
    font-family: "Montserrat", sans-serif;
    color: var(--bdg-text-muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.card-label i { margin-right: 6px; color: var(--bdg-accent-text); }
.card-value {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.5px;
    font-variant-numeric: tabular-nums;
    color: #1f2430;
}

/* ═══════ Boutons (pas de surlignage du texte) ═══════ */
#btn, #btnred, #btngreen, #btn-small, #btnred-small, #btn-sm {
    background-color: #004bfc;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    padding: 8px 20px;
    font-size: 12px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--tr-fast), transform var(--tr-fast);
}
#btn:hover, #btn-small:hover, #btn-sm:hover { background-color: #2967f8; transform: translateY(-1px); }
#btn:active, #btn-small:active, #btn-sm:active,
#btnred:active, #btngreen:active, #btnred-small:active { transform: translateY(0); }
#btn-small, #btnred-small { font-size: 9px; padding: 6px 16px; }
#btn-sm { padding: 6px 25px; }

#btnred { background-color: #c23616; }
#btnred:hover { background-color: #e84118; transform: translateY(-1px); }
#btngreen { background-color: #27ae60; }
#btngreen:hover { background-color: #2ecc71; transform: translateY(-1px); }
#btnred-small:hover { background-color: #e84118; transform: translateY(-1px); }

#btn-sm { background-color: #53b7ff; }
#btn-sm:hover { background-color: #86cbfd; }

/* ═══════ Barre ═══════ */
#bar {
    color: #fff;
    max-width: 100%;
    height: 5px;
    background-color: #004bfc;
    border-radius: 4px;
}
#bar a { color: #fff; }
#bar a:hover { color: #ccc; }

/* ═══════ Alertes ═══════ */
.alert_info, .alert_error, .alert_good, .alert_danger {
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    width: auto;
    margin-right: auto;
    margin-left: auto;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 5px;
}
.alert_info    { background: rgba(33,150,243,.08); color: #1565c0; border: 1px solid rgba(33,150,243,.30); }
.alert_error   { background: rgba(229,57,53,.08);  color: #c62828; border: 1px solid rgba(229,57,53,.30); }
.alert_good    { background: rgba(46,204,113,.08); color: #1e9e56; border: 1px solid rgba(46,204,113,.30); }
.alert_danger  { background: rgba(255,179,0,.08);  color: #bf5e00; border: 1px solid rgba(255,179,0,.30); }

/* ═══════ Formulaires : pilules budgets.css ═══════ */
.form-control,
.form-control:hover,
.form-control:active,
.form-control:focus {
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    background: var(--bdg-input-bg);
    color: var(--bdg-input-text);
    outline: none;
    border: 1px solid rgba(0,0,0,.12);
}
.form-control {
    border-radius: var(--radius-pill);
    padding: 9px 16px;
    transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
.form-control:hover { border-color: rgba(0,0,0,.25); }
.form-control:focus {
    border-color: #004bfc;
    box-shadow: 0 0 0 3px rgba(0,75,252,.15);
}

/* Inputs & selects natifs (hors .form-control) */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select {
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    line-height: 1.4;
    min-height: 42px;
    background: var(--bdg-input-bg);
    color: var(--bdg-input-text);
    border: 1px solid rgba(0,0,0,.12);
    border-radius: var(--radius-pill);
    padding: 9px 16px;
    outline: none;
    transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
select:focus {
    border-color: #004bfc;
    box-shadow: 0 0 0 3px rgba(0,75,252,.15);
}
input::placeholder { color: var(--bdg-text-muted); }

/* ═══════ CORRECTIF INPUTS DATE / DATETIME — harmonisation WEB ═══════
   Même police, même taille (13px), même hauteur (42px) que les
   autres inputs. Le 16px est réservé au mobile (media query plus bas). */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    -webkit-appearance: none;
    appearance: none;
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
    padding: 0 16px;
    line-height: normal;
    overflow: hidden;
}
/* Texte interne (la valeur affichée) : mêmes 13px que les autres inputs */
input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit {
    font-family: "Montserrat", sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle;
    color: var(--bdg-input-text);
}
/* Chaque segment (jour, mois, année, heure, minute) coloré explicitement */
input[type="date"]::-webkit-datetime-edit-year,
input[type="date"]::-webkit-datetime-edit-month,
input[type="date"]::-webkit-datetime-edit-day,
input[type="time"]::-webkit-datetime-edit-hour,
input[type="time"]::-webkit-datetime-edit-minute,
input[type="datetime-local"]::-webkit-datetime-edit-year,
input[type="datetime-local"]::-webkit-datetime-edit-month,
input[type="datetime-local"]::-webkit-datetime-edit-day,
input[type="datetime-local"]::-webkit-datetime-edit-hour,
input[type="datetime-local"]::-webkit-datetime-edit-minute {
    font-family: "Montserrat", sans-serif !important;
    font-size: 13px !important;
    color: var(--bdg-input-text);
}
/* Valeur affichée (Safari) : alignée, même typographie */
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
    font-family: "Montserrat", sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    font-variant-numeric: tabular-nums;
    line-height: 42px !important;
    height: 42px !important;
    text-align: left !important;
    padding-top: 0 !important;
}
/* Icône calendrier : discrète, grise, proportionnée */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: .6;
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    flex-shrink: 0;
    transition: opacity var(--tr-fast);
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Select : flèche custom + aspect pilule + texte jamais coupé */
select,
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    line-height: 1.4;
    min-height: 42px;
    padding: 9px 38px 9px 18px;
    text-indent: 0;
    text-overflow: ellipsis;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
}
select:focus-visible { outline: none; }
select::-moz-focus-inner { border: none; }
select option,
select optgroup {
    background: #ffffff;
    color: #1f2430;
}

/* ═══════ Inputs désactivés ═══════ */
input:disabled,
input[readonly],
select:disabled,
select[readonly],
textarea:disabled,
textarea[readonly],
.form-control:disabled,
.form-control[readonly] {
    background: #f5f7fa !important;
    color: #6b7280 !important;
    border-color: rgba(0,0,0,.10) !important;
    opacity: 1 !important;
    cursor: not-allowed;
    -webkit-text-fill-color: #6b7280;
}

/* Readonly (lecture seule, pas désactivé) : texte normal lisible */
input[readonly]:not(:disabled),
select[readonly]:not(:disabled),
.form-control[readonly]:not(:disabled) {
    background: #ffffff !important;
    color: #1f2430 !important;
    -webkit-text-fill-color: #1f2430;
    cursor: default;
}

/* ═══════ Textes ═══════ */
#txtbox, #txt-widget, #txtinfo, #txtpage, #txtmenu, #txt_devise {
    color: #1f2430;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}
#txtbox     { font-size: 12px; }
#txt-widget { font-size: 10px; }
#txtinfo    { font-size: 13px; }
#txtpage    { font-size: 16px; margin: 5px 0; }
#txtmenu    { font-size: 11px; }
#txt_devise { font-size: 22px; }

h1, h2, h3, h4, h5, h6 {
    text-transform: uppercase;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    color: #1f2430;
}
h1 { font-size: 24px; } h2 { font-size: 22px; } h3 { font-size: 20px; }
h4 { font-size: 18px; } h5 { font-size: 16px; } h6 { font-size: 14px; }

/* ═══════ Box accent (ex-bloc bleu plein) : soft ═══════ */
#box-blue {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    color: var(--bdg-accent-text);
    width: 100%;
    padding: 12px 15px 5px 15px;
    background: var(--bdg-accent-soft);
    border: 1px solid var(--bdg-accent-border);
    border-radius: var(--radius-lg);
    margin: auto;
    margin-bottom: 10px;
}

/* ═══════ Conteneurs de listes : carte budgets.css ═══════ */
.list-group {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    overflow: hidden;
}

/* Items : lignes internes, transparentes (la carte porte le fond) */
.list-group-item {
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,.05);
    border-radius: 0;
    color: #1f2430;
    transition: background var(--tr-fast);
}
.list-group-item:last-child { border-bottom: none; }
.list-group-item:hover { background: var(--bdg-hover); color: #1f2430; }

/* En-tête de widget (PORTEFEUILLES, DIVERSIFICATION, TOP 5...) */
.list-group-item.list-group-item-dark,
.list-group-item.active,
.list-group-item.header-item {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,.08);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: .6px;
    color: #1f2430;
}

/* Variante : titre uniquement dans les listes marquées "with-header" */
.list-group.with-header .list-group-item:first-child {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,.08);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: .6px;
    color: #1f2430;
}

/* Badge de valeur : pilule budgets */
.list-group-item .badge,
.list-group-item .badge-rounded {
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .74rem;
    padding: 6px 14px;
    background: var(--bdg-accent-soft);
    border: 1px solid var(--bdg-accent-border);
    color: var(--bdg-accent-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ═══════ Tableaux ═══════ */
#customers { border-collapse: collapse; width: 100%; }

#customers td, #customers th {
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

#customers tr:nth-child(even) { background-color: rgba(0,0,0,.02); }

/* Hover : fonctionne sur TOUTES les lignes, y compris paires */
#customers tr:hover,
#customers tr:hover td,
#customers tr:nth-child(even):hover {
    background: var(--bdg-hover) !important;
}

#customers th {
    padding-top: 12px; padding-bottom: 12px;
    text-align: left; color: #000;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .6px;
}

/* Colonne actions : jamais de retour à la ligne */
#customers td:last-child {
    white-space: nowrap;
}

/* ─── Boutons : alignement icône + texte (tailles intactes) ─── */
#customers td .btn,
#customers td button,
#customers td #btn-small,
#customers td #btnred-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    vertical-align: middle;
}

/* Icônes Font Awesome : proportionnelles, jamais déformées */
#customers td .btn i,
#customers td button i,
#customers td #btn-small i,
#customers td #btnred-small i {
    font-size: 0.85em;
    line-height: 1;
    flex-shrink: 0;
}

/* Espace régulier entre boutons voisins (horizontal OU vertical) */
#customers td .btn + .btn,
#customers td button + button,
#customers td #btn-small + #btn-small,
#customers td #btn-small + #btnred-small,
#customers td #btnred-small + #btn-small,
#customers td .btn + #btn-small,
#customers td #btn-small + .btn {
    margin-left: 6px;
    margin-top: 2px;
}

/* MOBILE & TABLETTE : scroll horizontal, boutons compacts */
@media (max-width: 767.98px) {
    #table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #customers {
        min-width: 620px;
    }
    #customers td, #customers th {
        padding: 8px 6px;
        font-size: 12px;
    }
    #customers td .btn,
    #customers td button,
    #customers td #btn-small,
    #customers td #btnred-small {
        gap: 4px;
    }
    #customers td .btn + .btn,
    #customers td button + button,
    #customers td #btn-small + #btn-small,
    #customers td #btn-small + #btnred-small {
        margin-left: 4px;
        margin-top: 6px;
    }
}


/* ═══════ Graphiques ═══════ */
.chart-container {
    position: relative;
    width: 80%;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 1;
    touch-action: manipulation;
}
.chart-canvas-container { width: 100%; height: 100%; position: relative; }
.chart-center-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    pointer-events: none;
    z-index: 10;
    font-family: "Montserrat", sans-serif;
}
.chart-amount { margin: 0; font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: bold; line-height: 1.2; }
.chart-label  { font-size: clamp(.8rem, 2.5vw, .9rem); opacity: .8; margin-top: .3rem; }

.chart-tooltip {
    position: absolute;
    background: var(--bdg-tooltip-bg);
    color: var(--bdg-tooltip-text);
    border: 1px solid rgba(0,0,0,.1);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    pointer-events: none;
    font-size: clamp(12px, 3vw, 14px);
    z-index: 20;
    max-width: 200px;
    text-align: center;
}
.chart-active-point {
    position: absolute;
    width: 12px; height: 12px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 15;
    box-shadow: 0 0 0 2px rgba(0,75,252,.5);
}

#link-stock { color: #1f2430; }

.staking-value {
    font-size: 11px;
    font-weight: bold;
    color: var(--bdg-success);
    padding: 5px 10px;
    background: rgba(46,204,113,.10);
    border-radius: var(--radius-pill);
    display: inline-block;
}

.badge_portfolio {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    background-color: var(--bdg-accent-soft);
    color: var(--bdg-accent-text);
    border: 1px solid var(--bdg-accent-border);
    vertical-align: middle;
    margin-left: 5px;
}

/* ═══════ Transactions ═══════ */
.custom-transaction-item {
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(0,0,0,.05) !important;
    border-radius: 0 !important;
    padding: 12px 18px !important;
    transition: background var(--tr-fast);
}
.custom-transaction-item:hover { background-color: var(--bdg-hover) !important; }
.custom-transaction-item:last-child { border-bottom: none !important; }

.calendar-box {
    display: flex;
    flex-direction: column;
    width: 46px; height: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.1);
    text-align: center;
    flex-shrink: 0;
}
.calendar-box .month {
    background-color: #004bfc;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 0;
    letter-spacing: .5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calendar-box .day {
    background-color: #ffffff;
    color: #1f2430;
    font-size: 1.05rem;
    font-weight: 700;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.empty-calendar .month { background-color: #d7dbe0; }
.empty-calendar .day   { background-color: #ffffff; }

.transaction-details { padding-left: 10px; display: flex; flex-direction: column; justify-content: center; }
.transaction-name { font-size: .8rem; font-weight: 600; color: #1f2430; line-height: 1.2; }
.transaction-expiry { font-size: .65rem; color: #6b7280 !important; margin-top: 4px; }
.transaction-sector { font-size: .75rem; color: #6b7280 !important; margin-top: 2px; }

.budget-badge {
    background-color: var(--bdg-accent-soft) !important;
    border: 1px solid var(--bdg-accent-border);
    border-radius: var(--radius-pill) !important;
    padding: 6px 14px !important;
    font-weight: 700 !important;
    font-size: .7rem !important;
    color: var(--bdg-accent-text) !important;
}
.budget-badge a { color: inherit !important; text-decoration: none !important; display: block; }
.budget-badge:hover { background-color: rgba(0,75,252,.15) !important; }

.service-logo-container {
    margin-left: 12px;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.service-logo-img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.service-logo-container + .transaction-details { margin-left: 0; }

.btn-details-toggle {
    color: #6b7280 !important;
    font-size: .78rem;
    text-decoration: none !important;
    padding: 0;
    margin-left: 15px;
    background: none;
    border: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--tr-fast);
    display: flex;
    align-items: center;
}
.btn-details-toggle:hover { color: #1f2430 !important; }

.details-toggle-container { position: relative; display: inline-block; }
.annotation-popover {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    white-space: nowrap;
    z-index: 99;
    box-shadow: 0 4px 15px rgba(0,0,0,.15);
}
.annotation-content { font-size: .75rem; color: #6b7280; }
.annotation-arrow {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ffffff;
}

.d-none { display: none !important; }

/* ═══════ Widget objectif ═══════ */
.objectif-widget { padding: 4px 2px; }
.widget-header { display: flex; flex-direction: column; gap: 6px; text-align: center; margin-bottom: 4px; }
.header-row { display: flex; justify-content: space-between; align-items: center; font-size: .92em; flex-wrap: wrap; gap: 4px; }
.header-row .label { font-weight: 600; color: #1f2430; }
.header-row .value { font-weight: 500; color: #1f2430; }
.reste-row .reste { color: #e67e00; font-weight: 700; }

.widget-hr { border: none; border-top: 1px solid rgba(0,0,0,.1); margin: 10px 0; }

.tendance-bloc { text-align: center; position: relative; }
.tendance-value { font-weight: bold; font-size: 1.15em; cursor: help; }
.tendance-label { display: block; font-size: .8em; color: rgba(0,0,0,.55); margin-top: 3px; }

.tendance-tooltip-wrapper { position: relative; display: inline-block; }
.tendance-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: .82em;
    line-height: 1.6;
    white-space: nowrap;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    color: #1f2430;
}
.tendance-tooltip::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #ffffff;
}
.tendance-tooltip-wrapper:hover .tendance-tooltip { display: block; }

.progress-wrapper { margin: 8px 0 4px; }
.progress-bar {
    width: 100%;
    background: rgba(0,0,0,.08);
    border-radius: var(--radius-pill);
    height: 12px;
    overflow: visible;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.08);
}
.progress-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, #004bfc, #53b7ff);
    transition: width 1.2s cubic-bezier(.4,0,.2,1);
    position: relative;
}
.progress-marker {
    position: absolute;
    right: 0; top: -4px;
    width: 3px; height: 20px;
    background: rgba(0,0,0,.25);
    border-radius: 2px;
}
.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: .72em;
    color: rgba(0,0,0,.5);
    margin-top: 4px;
    padding: 0 2px;
}
.percent { font-weight: bold; text-align: center; margin: 6px 0 0; font-size: 1em; }

.alerte {
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: .85em;
    font-weight: 600;
    text-align: center;
    margin: 6px 0;
}
.alerte-success { background: rgba(76,175,80,.10);  border: 1px solid rgba(76,175,80,.45); color: #2e7d32; }
.alerte-danger  { background: rgba(229,57,53,.08);  border: 1px solid rgba(229,57,53,.40); color: #c62828; }
.alerte-warning { background: rgba(230,126,0,.08);  border: 1px solid rgba(230,126,0,.40); color: #bf5e00; }
.alerte-info    { background: rgba(33,150,243,.08); border: 1px solid rgba(33,150,243,.40); color: #1565c0; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin: 6px 0; }
.stat-card {
    background: rgba(0,0,0,.04);
    border-radius: var(--radius-md);
    padding: 10px 8px;
    text-align: center;
    border: 1px solid rgba(0,0,0,.08);
    transition: background var(--tr-base);
}
.stat-card:hover { background: rgba(0,0,0,.07); }
.stat-icon { font-size: 1.3em; margin-bottom: 4px; }
.stat-label { font-size: .7em; color: rgba(0,0,0,.55); margin-bottom: 4px; line-height: 1.3; }
.stat-value { font-size: .82em; font-weight: 700; color: #1f2430; }
.stat-value.good { color: #2e7d32; }
.stat-value.bad { color: #c62828; }
.stat-value.effort { color: #bf5e00; }

.secteurs-title {
    font-size: .85em; font-weight: 700; color: rgba(0,0,0,.55);
    margin-bottom: 8px; text-align: center;
    letter-spacing: .04em; text-transform: uppercase;
}
.secteurs-list { display: flex; flex-direction: column; gap: 8px; }
.secteur-meta { display: flex; justify-content: space-between; font-size: .8em; margin-bottom: 3px; flex-wrap: wrap; gap: 2px; color: #1f2430; }
.secteur-label { font-weight: 600; }
.secteur-values { color: rgba(0,0,0,.55); }
.secteur-bar { width: 100%; background: rgba(0,0,0,.08); border-radius: 6px; height: 8px; overflow: hidden; }
.secteur-fill { height: 100%; border-radius: 6px; transition: width 1.4s cubic-bezier(.4,0,.2,1); }

/* ═══════ Notifications (legacy .notif-*) ═══════ */
.badge-counter {
    position: absolute;
    top: 2px; right: 2px;
    font-size: .65rem;
    padding: 2px 5px;
    border-radius: 10px;
}
.notif-unread { background: rgba(0,0,0,.04); font-weight: 600; }
.notif-read { opacity: .65; }

.icon-circle {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1em;
}
.notif-success { background: rgba(76,175,80,.15);  border: 1px solid #4caf50; }
.notif-warning { background: rgba(255,179,0,.15);  border: 1px solid #ffb300; }
.notif-danger  { background: rgba(229,57,53,.15);  border: 1px solid #e53935; }
.notif-info    { background: rgba(33,150,243,.15); border: 1px solid #2196f3; }

.notif-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    background: rgba(0,0,0,.03);
    transition: background var(--tr-base);
}
.notif-card:hover { background: rgba(0,0,0,.06); }
.notif-card.is-unread { border-left: 4px solid #2196f3; }
.notif-card.is-read { opacity: .7; border-left: 4px solid transparent; }
.notif-border-success { border-left-color: #4caf50 !important; }
.notif-border-warning { border-left-color: #ffb300 !important; }
.notif-border-danger { border-left-color: #e53935 !important; }
.notif-border-info { border-left-color: #2196f3 !important; }
.notif-card-icon { font-size: 1.8em; min-width: 40px; text-align: center; }
.notif-card-body { flex: 1; }
.notif-card-msg { margin: 0; font-size: .95em; color: #1f2430; }
.notif-card-date { color: rgba(0,0,0,.45); font-size: .8em; }
.notif-card-actions { display: flex; gap: 10px; font-size: 1.1em; }
.notif-card-actions a { text-decoration: none; cursor: pointer; }

/* ═══════ Notifications (nf-*) ═══════ */
.nf-wrapper { max-width: 920px; margin: 0 auto; padding: 28px 16px; font-family: "Montserrat", sans-serif; }

.nf-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.nf-header-left { display: flex; align-items: center; gap: 10px; }
.nf-page-title {
    font-size: 1rem; font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0;
}
.nf-badge-unread { background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; padding: 2px 9px; border-radius: var(--radius-pill); }
.nf-badge-unread.zero { background: var(--bg-hover); color: var(--text-muted); }
.nf-header-actions { display: flex; gap: 8px; }

.nf-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: .78rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: all .18s;
    white-space: nowrap;
}
.nf-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.nf-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.nf-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.nf-btn-ghost-danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(220,38,38,.05); }

.nf-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 22px; }
.nf-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex; flex-direction: column; gap: 5px;
    position: relative;
    overflow: hidden;
}
.nf-stat::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.nf-stat.s-all::after { background: var(--text-muted); }
.nf-stat.s-unread::after { background: var(--accent); }
.nf-stat.s-success::after { background: var(--success); }
.nf-stat.s-warning::after { background: var(--warning); }
.nf-stat.s-danger::after { background: var(--danger); }
.nf-stat.s-info::after { background: var(--info); }
.nf-stat-lbl { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.nf-stat-val { font-size: 1.4rem; font-weight: 800; line-height: 1; color: var(--text-primary); }
.nf-stat.s-unread .nf-stat-val { color: var(--accent); }
.nf-stat.s-success .nf-stat-val { color: var(--success); }
.nf-stat.s-warning .nf-stat-val { color: var(--warning); }
.nf-stat.s-danger .nf-stat-val { color: var(--danger); }
.nf-stat.s-info .nf-stat-val { color: var(--info); }

.nf-tabs {
    display: flex; gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    width: fit-content;
    margin-bottom: 18px;
}
.nf-tab {
    padding: 7px 20px;
    border-radius: var(--radius-sm);
    font-size: .8rem; font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    transition: all .15s;
    white-space: nowrap;
}
.nf-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.nf-tab.active { background: var(--accent); color: #fff; }

.nf-section-head {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px; margin-bottom: 12px;
}
.nf-section-lbl { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--text-primary); }
.nf-section-meta { font-size: .72rem; color: var(--text-muted); }

.nf-list { display: flex; flex-direction: column; gap: 6px; }
.nf-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    position: relative;
    overflow: hidden;
    transition: background .15s, border-color .15s, transform .15s;
}
.nf-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.nf-item.c-success::before { background: var(--success); }
.nf-item.c-warning::before { background: var(--warning); }
.nf-item.c-danger::before { background: var(--danger); }
.nf-item.c-info::before { background: var(--info); }
.nf-item.c-primary::before { background: var(--accent); }
.nf-item:hover { background: var(--bg-hover); border-color: #c9d0d8; transform: translateX(3px); }
.nf-item.unread { background: rgba(26,86,255,.04); border-color: rgba(26,86,255,.18); }
.nf-item.unread:hover { background: rgba(26,86,255,.07); }

.nf-ico {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    overflow: hidden;
}
.nf-ico img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}
.nf-body { flex: 1; min-width: 0; }
.nf-msg { font-size: .855rem; color: var(--text-primary); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-item.unread .nf-msg { font-weight: 700; }
.nf-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.nf-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px rgba(26,86,255,.4);
    flex-shrink: 0;
    animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.nf-time { font-size: .7rem; color: var(--text-muted); }
.nf-tag {
    font-size: .6rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: var(--bg-hover);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.nf-pill { font-size: .68rem; font-weight: 700; padding: 2px 10px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.nf-pill.c-success { background: rgba(22,163,74,.12); color: var(--success); }
.nf-pill.c-danger { background: rgba(220,38,38,.12); color: var(--danger); }
.nf-pill.c-warning { background: rgba(217,119,6,.12); color: var(--warning); }
.nf-pill.c-info { background: rgba(8,145,178,.12); color: var(--info); }
.nf-pill.c-primary { background: rgba(26,86,255,.12); color: var(--accent); }

.nf-actions { display: flex; gap: 5px; flex-shrink: 0; }
.nf-act-btn {
    width: 30px; height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: .8rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    transition: all .15s;
}
.nf-act-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.nf-act-btn.ok:hover { border-color: var(--success); color: var(--success); background: rgba(22,163,74,.08); }
.nf-act-btn.del:hover { border-color: var(--danger); color: var(--danger); background: rgba(220,38,38,.08); }

.nf-empty {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    padding: 60px 24px;
}
.nf-empty-ico { font-size: 2.5rem; opacity: .25; display: block; margin-bottom: 10px; }
.nf-empty-txt { font-size: .88rem; color: var(--text-muted); }

.nf-pages { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 22px; flex-wrap: wrap; }
.nf-pg {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    font-size: .8rem; font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    user-select: none;
    transition: all .15s;
}
.nf-pg:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }
.nf-pg.current { background: var(--accent); border-color: var(--accent); color: #fff; cursor: default; }
.nf-pg-dots { color: var(--text-muted); padding: 0 4px; font-size: .85rem; }

/* ═══════ Divers ═══════ */
.bg-primary { background-color: #004bfc; color: #fff; }
.badge.bg-primary { background-color: #004bfc; color: #fff; }

#badge-rate, #badge-default-round, #badge-default {
    background: var(--bdg-accent-soft);
    color: var(--bdg-accent-text);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
}
#badge-qty-round, #badge-qty {
    background: rgba(26,86,255,.10);
    color: #0043d6;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
}
#badge-buy-round, #badge-buy {
    background: rgba(46,204,113,.10);
    color: #1e9e56;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
}
#badge-sell-round, #badge-sell {
    background: rgba(229,57,53,.10);
    color: #c62828;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
}

.pills-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: var(--radius-pill);
    padding: 4px;
    gap: 3px;
    width: 100%;
    margin-bottom: 0;
}
.pills-wrapper::-webkit-scrollbar { display: none; }
.pill-btn {
    font-family: "Montserrat", sans-serif;
    appearance: none;
    border: none;
    background: transparent;
    color: #1f2430;
    font-size: 11px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .18s ease, color .18s ease;
    white-space: nowrap;
    flex: 0 1 auto;
}
.pill-btn:hover:not(.active) { color: #1f2430; background-color: rgba(0,0,0,.05); }
.pill-btn.active { background-color: #004bfc; color: #fff; }

.tab-panel { margin-top: 10px; display: none; }
.tab-panel.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
    .pills-wrapper { width: fit-content; max-width: 100%; }
}

/* ═══════ Responsive mobile ═══════ */
@media (max-width: 575.98px) {
    #box, #page, #chartbox, #table, #navigation { padding: 12px; }
    .card-box { padding: 14px 16px; }
    .card-value { font-size: 1.25rem; }
    .chart-container { width: 95%; }
    #customers td, #customers th { padding: 8px 6px; font-size: 12px; }
    #table { font-size: 12px; }
    input[type="text"], input[type="number"], input[type="email"],
    input[type="password"], input[type="date"], input[type="time"],
    input[type="datetime-local"],
    select, .form-control { font-size: 16px; }
}

/* ═══════ Tablette ═══════ */
@media (min-width: 640px) and (max-width: 1023px) {
    #box, #page, #chartbox, #navigation { padding: 16px; }
    .chart-container { width: 88%; }
    #customers td, #customers th { padding: 10px; }
}

/* ═══════ Paysage téléphone ═══════ */
@media (max-height: 500px) and (orientation: landscape) {
    #box, #page, #chartbox { padding: 8px 12px; margin-bottom: 6px; }
    .chart-container { max-width: 220px; }
    h1 { font-size: 18px; } h2 { font-size: 16px; } h3 { font-size: 15px; }
}

/* ═══════ Tactile : pas d'effets hover ═══════ */
@media (hover: none) {
    .card-box:hover { transform: none; }
    .list-group-item:hover, .custom-transaction-item:hover { background: transparent !important; }
    #btn:hover, #btn-small:hover, #btn-sm:hover, #btnred:hover, #btngreen:hover { transform: none; }
    .stat-card:hover, .notif-card:hover { background: rgba(0,0,0,.03); }
    .nf-item:hover { transform: none; }
}

/* ═══════ Accessibilité ═══════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 575.98px) {
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    select,
    .form-control,
    select.form-control {
        font-size: 16px !important;
    }
}

/* Anti-surlignage : liens, boutons et éléments cliquables */
a, button, .btn, .page-link, .page-item, .pill-btn,
.nf-btn, .nf-tab, .nf-pg, .nf-act-btn, .nav-link, .dropdown-item,
#btn, #btn-small, #btn-sm, #btnred, #btngreen, #btnred-small,
.btn-details-toggle, .budget-badge, [onclick] {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Si une sélection a quand même lieu (glisser sur un lien), elle est invisible */
a::selection,
a::-moz-selection,
button::selection,
[onclick]::selection,
.page-link::selection {
    background: transparent !important;
    color: inherit !important;
}

/* Pagination : force le style pilule partout, contre Bootstrap */
ul.pagination { gap: 4px; }
ul.pagination .page-item .page-link,
ul.pagination .page-item:first-child .page-link,
ul.pagination .page-item:last-child .page-link,
ul.pagination .page-item.active .page-link,
ul.pagination .page-item.disabled .page-link {
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 10px !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0,0,0,.1) !important;
    color: #1f2430 !important;
    font-size: .8rem !important;
    font-weight: 600 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: background .15s ease, border-color .15s ease !important;
}
ul.pagination .page-item .page-link:hover,
ul.pagination .page-item .page-link:focus {
    background-color: rgba(0,0,0,.05) !important;
    border-color: rgba(0,0,0,.2) !important;
    color: #1f2430 !important;
    box-shadow: none !important;
}
ul.pagination .page-item.active .page-link {
    background-color: #004bfc !important;
    border-color: #004bfc !important;
    color: #fff !important;
    cursor: default !important;
}
ul.pagination .page-item.disabled .page-link {
    color: rgba(0,0,0,.35) !important;
    border-color: rgba(0,0,0,.06) !important;
    background-color: #ffffff !important;
}

/* Selects : force padding/hauteur corrects même contre Bootstrap */
select,
select.form-control {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding: 9px 38px 9px 18px !important;
    line-height: 1.4 !important;
    min-height: 42px !important;
    text-indent: 0 !important;
    background-color: #ffffff !important;
    color: #1f2430 !important;
    border: 1px solid rgba(0,0,0,.12) !important;
    border-radius: 20px !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px !important;
}
select:focus {
    border-color: #004bfc !important;
    box-shadow: 0 0 0 3px rgba(0,75,252,.15) !important;
    outline: none !important;
}

/* ═══════ Box bleue — fond bleu boutons ═══════ */
#box-blue {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    color: #fff;
    width: 100%;
    padding: 12px 15px 10px 15px;
    background: #004bfc;
    border: 1px solid #3370ff;
    border-radius: 14px;
    margin: auto;
    margin-bottom: 10px;
}

#box-blue #txt-widget {
    color: #dce6ff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

#box-blue h3 {
    color: #fff;
    font-weight: 700;
    margin: 0;
}

/* ═══════════════════════════════════════════════
   NOTIFICATIONS (nf-*) — MOBILE
   ═══════════════════════════════════════════════ */
@media (max-width: 767.98px) {

    .nf-wrapper {
        padding: 16px 10px;
    }

    /* Header : tout empiler, boutons côte à côte pleine largeur */
    .nf-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 16px;
    }
    .nf-header-left {
        justify-content: center;
        flex-wrap: wrap;
    }
    .nf-page-title {
        font-size: .85rem;
        text-align: center;
        width: 100%;
    }
    .nf-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .nf-header-actions .nf-btn {
        justify-content: center;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
        padding: 9px 10px;
    }

    /* Stats : 3 colonnes au lieu de 6 */
    .nf-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 16px;
    }
    .nf-stat {
        padding: 10px 8px;
        align-items: center;
        text-align: center;
    }
    .nf-stat-lbl {
        font-size: .55rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        letter-spacing: .04em;
    }
    .nf-stat-val {
        font-size: 1.1rem;
    }

    /* Onglets : pleine largeur, scrollables */
    .nf-tabs {
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .nf-tabs::-webkit-scrollbar { display: none; }
    .nf-tab {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
        font-size: .72rem;
        white-space: nowrap;
    }

    /* Section head : empilée */
    .nf-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Items : message sur 2 lignes autorisé, actions compactes */
    .nf-item {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 10px;
    }
    .nf-msg {
        white-space: normal;
        word-break: break-word;
        font-size: .82rem;
    }
    .nf-ico {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    .nf-actions {
        margin-left: auto;
    }

    /* Pagination compacte */
    .nf-pages { gap: 3px; }
    .nf-pg {
        min-width: 30px;
        height: 30px;
        font-size: .74rem;
    }
}

/* Très petits écrans : stats en 2 colonnes, boutons empilés */
@media (max-width: 379.98px) {
    .nf-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .nf-header-actions {
        grid-template-columns: 1fr;
    }
}

/* ═══════ CORRECTIF DATE MOBILE — picker masqué + hauteur réimposée ═══════
   En mobile : 16px obligatoire (anti-zoom iOS) + picker natif masqué */
@media (max-width: 575.98px) {
    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator,
    input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        display: none !important;
    }
    input[type="date"]::-webkit-datetime-edit,
    input[type="time"]::-webkit-datetime-edit,
    input[type="datetime-local"]::-webkit-datetime-edit,
    input[type="date"]::-webkit-date-and-time-value,
    input[type="time"]::-webkit-date-and-time-value,
    input[type="datetime-local"]::-webkit-date-and-time-value {
        font-size: 16px !important;
    }
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"] {
        text-align: left;
        padding-left: 18px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        box-sizing: border-box !important;
    }
}