/**
 * Espace technicien To Go — design CampsiteTech / TECHPRO
 * Connexion + dashboard avec sidebar (Relevés, Alertes, Contrôle)
 */

:root {
    --tg-tech-bg: #0f172a;
    --tg-tech-surface: #1e293b;
    --tg-tech-border: #475569;
    --tg-tech-primary: #2563eb;
    --tg-tech-primary-hover: #1d4ed8;
    --tg-tech-success: #10b981;
    --tg-tech-error: #ef4444;
    --tg-tech-text: #f1f5f9;
    --tg-tech-muted: #94a3b8;
    /* Light theme (app) */
    --tg-app-bg: #f9fafb;
    --tg-app-surface: #ffffff;
    --tg-app-border: #e5e7eb;
    --tg-app-text: #111827;
    --tg-app-muted: #6b7280;
}

/* ——— Écran de connexion (inchangé) ——— */
#to-go-technician-app.to-go-tech-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
}

.to-go-tech-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--tg-tech-surface);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--tg-tech-border);
}

.to-go-tech-login-card h1 { margin: 0 0 8px; font-size: 1.5rem; font-weight: 700; color: var(--tg-tech-text); }
.to-go-tech-login-card .subtitle { color: var(--tg-tech-muted); font-size: 0.9rem; margin-bottom: 28px; }
.to-go-tech-login-card .icon-wrap {
    width: 56px; height: 56px; border-radius: 14px;
    background: rgba(37, 99, 235, 0.2); color: #60a5fa;
    display: flex; align-items: center; justify-content: center; margin-bottom: 24px;
}
.to-go-tech-login-card label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--tg-tech-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.to-go-tech-login-card input[type="text"],
.to-go-tech-login-card input[type="password"] {
    width: 100%; padding: 12px 14px; border: 1px solid var(--tg-tech-border); border-radius: 10px;
    background: #334155; color: var(--tg-tech-text); font-size: 1rem; box-sizing: border-box; margin-bottom: 18px;
}
.to-go-tech-login-card input:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2); }
.to-go-tech-login-card .error-msg { background: rgba(239, 68, 68, 0.15); color: #fca5a5; padding: 10px 14px; border-radius: 10px; font-size: 0.9rem; margin-bottom: 18px; }
.to-go-tech-login-card button[type="submit"] {
    width: 100%; padding: 14px; background: var(--tg-tech-primary); color: #fff; border: none; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.to-go-tech-login-card button[type="submit"]:hover { background: var(--tg-tech-primary-hover); }

/* ——— Dashboard (après connexion) ——— */
.to-go-tech-app.tech-dashboard {
    min-height: 100vh;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--tg-app-text);
    background: var(--tg-app-bg);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .to-go-tech-app.tech-dashboard { flex-direction: row; }
}

/* Mobile header */
.tech-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--tg-app-surface);
    border-bottom: 1px solid var(--tg-app-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

@media (min-width: 768px) {
    .tech-mobile-header { display: none; }
}

.tech-mobile-header .tech-logo-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tech-mobile-header .tech-logo-icon {
    width: 36px; height: 36px; background: var(--tg-tech-primary); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.tech-mobile-header .tech-logo-text { font-weight: 700; font-size: 1.125rem; color: var(--tg-app-text); }
.tech-mobile-header .tech-menu-btn {
    padding: 8px; color: var(--tg-app-muted); background: none; border: none; cursor: pointer;
}

/* Sidebar */
.tech-sidebar {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    z-index: 40;
    width: 256px;
    background: var(--tg-app-surface);
    border-right: 1px solid var(--tg-app-border);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    /* Sur mobile : dégager le contenu sous l’en-tête (évite que la 1re ligne soit cachée) */
    padding-top: 64px;
}

.tech-sidebar.open { transform: translateX(0); }

@media (min-width: 768px) {
    .tech-sidebar {
        position: relative;
        transform: none;
        flex-shrink: 0;
        padding-top: 0;
    }
}

.tech-sidebar .tech-sidebar-brand {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border-bottom: 1px solid var(--tg-app-border);
}

@media (min-width: 768px) {
    .tech-sidebar .tech-sidebar-brand { display: flex; }
}

.tech-sidebar .tech-logo-icon-lg {
    width: 40px; height: 40px; background: var(--tg-tech-primary); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.tech-sidebar .tech-brand-text { font-weight: 800; font-size: 1.25rem; color: #1e3a8a; letter-spacing: -0.02em; }

.tech-sidebar-nav {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tech-sidebar-nav a,
.tech-sidebar-nav button.tech-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--tg-app-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.tech-sidebar-nav a:hover,
.tech-sidebar-nav button.tech-nav-btn:hover {
    background: #f3f4f6;
    color: var(--tg-app-text);
}

.tech-sidebar-nav a.active,
.tech-sidebar-nav button.tech-nav-btn.active {
    background: var(--tg-tech-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.tech-sidebar-nav .tech-nav-icon { flex-shrink: 0; }

.tech-sidebar-user {
    padding: 16px;
    margin: 0 16px 16px;
    background: #f9fafb;
    border-radius: 16px;
    border: 1px solid var(--tg-app-border);
}

.tech-sidebar-user .tech-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.tech-sidebar-user .tech-user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: #dbeafe; border: 2px solid #fff;
    display: flex; align-items: center; justify-content: center; color: var(--tg-tech-primary);
}
.tech-sidebar-user .tech-user-name { font-weight: 700; font-size: 0.875rem; color: var(--tg-app-text); }
.tech-sidebar-user .tech-user-role { font-size: 0.75rem; color: var(--tg-app-muted); }
.tech-sidebar-user .tech-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 600;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.tech-sidebar-user .tech-logout-btn:hover { background: #fef2f2; }

/* Overlay mobile */
.tech-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
}
.tech-overlay.show { display: block; }
@media (min-width: 768px) {
    .tech-overlay.show { display: none; }
}

/* Main content */
.tech-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tech-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 32px;
    background: var(--tg-app-surface);
    border-bottom: 1px solid var(--tg-app-border);
    position: sticky;
    top: 0;
    z-index: 30;
}

@media (min-width: 768px) {
    .tech-topbar { display: flex; }
}

.tech-topbar .tech-breadcrumb { color: var(--tg-app-muted); font-weight: 500; }
.tech-topbar .tech-breadcrumb span { color: var(--tg-app-text); font-weight: 700; }
.tech-topbar .tech-topbar-right { display: flex; align-items: center; gap: 20px; }
.tech-topbar .tech-meteo {
    font-size: 0.875rem;
    color: var(--tg-app-muted);
    max-width: 22rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tech-topbar-alert-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--tg-app-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.tech-topbar-alert-btn:hover {
    background: #f1f5f9;
    color: var(--tg-app-text);
}
.tech-topbar-alert-btn:focus-visible {
    outline: 2px solid var(--tg-tech-primary);
    outline-offset: 2px;
}
.tech-topbar-alert-btn--na {
    cursor: default;
    pointer-events: none;
}
.tech-topbar-alert-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.tech-topbar-alerts-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.125rem;
    text-align: center;
    display: none;
    box-sizing: border-box;
}
.tech-topbar-alerts-badge.is-visible { display: inline-block; }

.tech-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .tech-content { padding: 32px; }
}

.tech-content-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.tech-panel { display: none; }
.tech-panel.active { display: block; }
.tech-panel.tech-panel--home.active {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    width: 100%;
}
.tech-home-welcome {
    margin: 0;
    max-width: 28rem;
    text-align: center;
    color: var(--tg-app-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
    padding: 24px 16px;
}
.tech-plates-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
@media (min-width: 900px) {
    .tech-plates-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 28px;
    }
    .tech-plates-layout__col--barrier {
        flex: 0 0 min(380px, 38%);
        max-width: 420px;
    }
    .tech-plates-layout__col--form {
        flex: 1;
        min-width: 0;
    }
}
.tech-plates-barrier-wrap {
    margin-bottom: 0;
    max-width: none;
    width: 100%;
}

/* ——— Relevés : design moderne (cartes à la chaîne) ——— */
.readings-modern { margin-bottom: 24px; }
.readings-modern-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}
.readings-modern-header__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.readings-tour-settings-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--tg-app-text);
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.readings-tour-settings-link:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: var(--tg-tech-primary);
}
.readings-tour-settings-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.readings-tour-settings-link svg { flex-shrink: 0; opacity: 0.85; }

/* Modale ordre de tournée */
.tech-modal {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.tech-modal.is-open {
    display: flex;
}
.tech-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
}
.tech-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    max-height: min(90vh, 760px);
    display: flex;
    flex-direction: column;
    background: var(--tg-app-surface);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--tg-app-border);
    overflow: hidden;
}
.tech-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tg-app-border);
    flex-shrink: 0;
}
.tech-modal__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tg-app-text);
}
.tech-modal__close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin: -8px -8px -8px 0;
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--tg-app-muted);
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
}
.tech-modal__close:hover {
    background: #f3f4f6;
    color: var(--tg-app-text);
}
.tech-modal__body {
    padding: 16px 18px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.tour-order-settings--modal .tour-order-settings__desc {
    margin-top: 0;
}
.tech-settings-summary {
    max-width: 520px;
}
.tech-settings-summary__title {
    margin: 0 0 10px;
    font-size: 1.5rem;
    font-weight: 700;
}
.tech-settings-summary__desc {
    margin: 0 0 18px;
    color: var(--tg-app-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}
.readings-modern-title { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--tg-app-text); }
.readings-modern-badge {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}
.readings-modern-empty {
    color: var(--tg-app-muted);
    padding: 24px;
    text-align: center;
    background: var(--tg-app-surface);
    border-radius: 12px;
    border: 1px dashed var(--tg-app-border);
}
.readings-modern-list { display: flex; flex-direction: column; gap: 12px; }

.readings-card {
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.readings-card:hover { border-color: #d1d5db; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.readings-card--focus { border-color: var(--tg-tech-primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15); }

.readings-card__main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.readings-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fef3c7;
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.readings-card__info { flex: 1; min-width: 140px; }
.readings-card__name { font-weight: 600; font-size: 1rem; color: var(--tg-app-text); margin: 0 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.readings-card__today {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #d1fae5;
    color: #047857;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    vertical-align: middle;
}
.readings-card__today svg { flex-shrink: 0; }
.readings-card__today-text { white-space: nowrap; }
.readings-card__meta { font-size: 0.875rem; color: var(--tg-app-muted); margin: 0; }
.readings-card__tag {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.readings-card__form { flex-shrink: 0; }
.readings-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.readings-input {
    width: 100px;
    min-width: 80px;
    padding: 10px 12px;
    border: 1px solid var(--tg-app-border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: right;
}
.readings-input:focus {
    outline: none;
    border-color: var(--tg-tech-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.readings-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.05s;
}
.readings-btn:active { transform: scale(0.98); }
.readings-btn--primary {
    background: var(--tg-tech-primary);
    color: #fff;
}
.readings-btn--primary:hover { background: var(--tg-tech-primary-hover); }
.readings-btn--secondary {
    background: var(--tg-app-surface);
    color: var(--tg-tech-primary);
    border: 1px solid var(--tg-tech-primary);
}
.readings-btn--secondary:hover { background: #eff6ff; }

.readings-card__history {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--tg-app-border);
}
.readings-card__history summary {
    font-size: 0.8rem;
    color: var(--tg-app-muted);
    cursor: pointer;
    font-weight: 500;
}
.readings-card__history summary:hover { color: var(--tg-app-text); }
.readings-history-empty { margin: 8px 0 0; font-size: 0.85rem; color: var(--tg-app-muted); }
.readings-history-table {
    width: 100%;
    margin-top: 8px;
    font-size: 0.85rem;
    border-collapse: collapse;
}
.readings-history-table th,
.readings-history-table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--tg-app-border); }
.readings-history-table th { color: var(--tg-app-muted); font-weight: 600; }

@media (max-width: 640px) {
    .readings-card__main { flex-direction: column; align-items: stretch; }
    .readings-card__form { width: 100%; }
    .readings-form { width: 100%; }
    .readings-input { flex: 1; min-width: 0; }
}

/* ——— Paramètres : ordre de tournée ——— */
.tour-order-settings { max-width: 560px; }
.tour-order-settings__title { margin: 0 0 8px; font-size: 1.5rem; font-weight: 700; color: var(--tg-app-text); }
.tour-order-settings__desc { color: var(--tg-app-muted); font-size: 0.9rem; margin: 0 0 20px; line-height: 1.5; }
.tour-order-settings__empty { color: var(--tg-app-muted); padding: 16px 0; }
.tour-order-form__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; align-items: center; }
.tour-order-reset-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--tg-app-border);
    color: var(--tg-app-muted);
}
.tour-order-reset-btn:hover { border-color: var(--tg-app-text); color: var(--tg-app-text); }

.tour-order-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.tour-order-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--tg-app-border);
    background: var(--tg-app-surface);
}
.tour-order-list__item:last-child { border-bottom: 0; }
.tour-order-list__drag {
    color: var(--tg-app-muted);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.tour-order-list__name { flex: 1; font-weight: 500; color: var(--tg-app-text); }
.tour-order-list__two-meters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 0.875rem;
    color: var(--tg-app-muted);
    cursor: pointer;
}
.tour-order-list__two-meters input { margin: 0; }
.tour-order-list__actions { display: flex; gap: 4px; flex-shrink: 0; }
.tour-order-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tg-app-border);
    background: var(--tg-app-surface);
    color: var(--tg-app-muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.tour-order-btn:hover { border-color: var(--tg-tech-primary); color: var(--tg-tech-primary); background: #eff6ff; }

/* ——— Relevés (contenu existant, style light) ——— */
.tech-dashboard .to-go-tech-card,
.tech-dashboard .card {
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tech-dashboard .to-go-tech-card h2,
.tech-dashboard .to-go-tech-card h3,
.tech-dashboard .card h2,
.tech-dashboard .card h3 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tg-app-text);
}

.tech-dashboard .to-go-tech-card p,
.tech-dashboard .to-go-tech-card .description,
.tech-dashboard .card p,
.tech-dashboard .card .description {
    color: var(--tg-app-muted);
    font-size: 0.9rem;
}

.tech-dashboard .to-go-tech-card label,
.tech-dashboard .card label { color: var(--tg-app-muted); }
.tech-dashboard .to-go-tech-card input,
.tech-dashboard .to-go-tech-card select,
.tech-dashboard .card input,
.tech-dashboard .card select {
    border: 1px solid var(--tg-app-border);
    background: var(--tg-app-surface);
    color: var(--tg-app-text);
}
.tech-dashboard .to-go-tech-notice.success { background: #d1fae5; border-color: #6ee7b7; color: #047857; }
.tech-dashboard .to-go-tech-notice.error { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.tech-dashboard .widefat th,
.tech-dashboard .widefat td { border-color: var(--tg-app-border); color: var(--tg-app-text); }
.tech-dashboard .widefat th { color: var(--tg-app-muted); }

.tech-dashboard .to-go-tech-fonctionnement .step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}
.tech-dashboard .to-go-tech-fonctionnement .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tg-tech-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}
.tech-dashboard .to-go-tech-fonctionnement .step h4 { margin: 0 0 6px; font-size: 1rem; }
.tech-dashboard .to-go-tech-fonctionnement .step p { margin: 0; font-size: 0.9rem; color: var(--tg-app-muted); }
.tech-dashboard .tech-alert-empty { color: var(--tg-app-muted); margin-bottom: 16px; font-size: 0.9rem; }

/* ——— Relevés : style liste type design (optionnel) ——— */
.tech-readings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.tech-readings-header h2 { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--tg-app-text); }
.tech-badge-pending {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tech-reading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tech-reading-row .tech-reading-info { display: flex; align-items: center; gap: 16px; }
.tech-reading-row .tech-reading-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.tech-reading-row .tech-reading-icon.electricity { background: #fef3c7; color: #d97706; }
.tech-reading-row .tech-reading-icon.water { background: #dbeafe; color: #2563eb; }
.tech-reading-row .tech-reading-meta h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 600; }
.tech-reading-row .tech-reading-meta p { margin: 0; font-size: 0.875rem; color: var(--tg-app-muted); }
.tech-reading-row .tech-reading-actions { display: flex; align-items: center; gap: 12px; }
.tech-reading-row input.tech-input-value {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid var(--tg-app-border);
    border-radius: 8px;
    font-size: 0.875rem;
}
.tech-reading-row .tech-btn-validate {
    padding: 8px 16px;
    background: var(--tg-tech-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}
.tech-reading-row .tech-btn-validate:hover { background: var(--tg-tech-primary-hover); }
.tech-reading-done {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
    font-weight: 500;
    background: #d1fae5;
    padding: 8px 12px;
    border-radius: 8px;
}

/* ——— Alertes (signalements résidents) ——— */
.tech-alerts-list { }
.tech-alerts-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.tech-alerts-header h2 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.tech-alerts-header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tech-notifications-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--tg-app-muted);
    cursor: pointer;
    user-select: none;
}
.tech-notifications-toggle input { margin: 0; width: 1rem; height: 1rem; }
.tech-notifications-toggle__label { white-space: nowrap; }
.tech-priority-urgent { background: #fee2e2; color: #b91c1c; font-size: 0.625rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 9999px; }
.tech-alert-card {
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}
.tech-alert-card--pending { border-left: 3px solid #ef4444; }
.tech-alert-card:hover { border-color: #d1d5db; }
.tech-alert-card__inner { display: flex; gap: 16px; }
.tech-alert-card .tech-alert-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.tech-alert-card .tech-alert-dot.high { background: #ef4444; }
.tech-alert-card .tech-alert-dot.medium { background: #f97316; }
.tech-alert-card .tech-alert-dot.low { background: #22c55e; }
.tech-alert-card .tech-alert-body { flex: 1; min-width: 0; }
.tech-alert-card .tech-alert-title { font-weight: 700; margin-bottom: 4px; }
.tech-alert-card .tech-alert-desc { color: var(--tg-app-muted); font-size: 0.9rem; margin-bottom: 6px; }
.tech-alert-card .tech-alert-cat { font-size: 0.8rem; color: var(--tg-app-muted); margin: 0 0 10px; }
.tech-alert-photos { margin: 12px 0; }
.tech-alert-photos-label { font-size: 0.75rem; font-weight: 600; color: var(--tg-app-muted); display: block; margin-bottom: 8px; }
.tech-alert-photos-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-alert-photo-link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--tg-app-border);
    background: var(--tg-app-surface);
    flex-shrink: 0;
}
.tech-alert-photo-img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: cover;
    vertical-align: middle;
}
.tech-alert-photo-link:hover { border-color: var(--tg-tech-primary); opacity: 0.95; }
.tech-alert-card .tech-alert-footer {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
    font-size: 0.75rem; color: var(--tg-app-muted);
}
.tech-alert-status {
    font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 6px;
}
.tech-alert-status--reçu { background: #fee2e2; color: #b91c1c; }
.tech-alert-status--en-cours { background: #fef3c7; color: #b45309; }
.tech-alert-status--résolu { background: #d1fae5; color: #047857; }
.tech-alert-action-form { display: inline; margin: 0; }
.tech-alert-card .tech-alert-action {
    border: none; background: none; padding: 0; font: inherit; cursor: pointer;
    color: var(--tg-tech-primary); font-size: 0.875rem; font-weight: 600;
}
.tech-alert-card .tech-alert-action:hover { text-decoration: underline; }
.tech-alert-card .tech-alert-action--secondary { color: var(--tg-app-muted); }

/* ——— Contrôle (arrivées / départs) ——— */
.tech-control-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.tech-control-header h2 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.tech-control-grid { display: grid; gap: 16px; }
@media (min-width: 768px) {
    .tech-control-grid { grid-template-columns: 1fr 1fr; }
}
.tech-control-box {
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tech-control-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 1rem; font-weight: 700; }
.tech-control-box .tech-bar { width: 4px; height: 24px; border-radius: 2px; }
.tech-control-box .tech-bar.blue { background: #2563eb; }
.tech-control-box .tech-bar.orange { background: #f97316; }
.tech-control-item {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.tech-control-item:last-child { border-bottom: 0; }
.tech-control-item:hover { background: #f9fafb; margin: 0 -12px; padding: 12px; border-radius: 8px; }
.tech-control-item .tech-time { font-size: 0.875rem; font-weight: 700; color: var(--tg-tech-primary); }
.tech-control-item .tech-time.orange { color: #f97316; }
.tech-control-item .tech-badge { font-size: 0.625rem; padding: 2px 8px; border-radius: 9999px; font-weight: 600; }
.tech-control-item .tech-badge.ready { background: #d1fae5; color: #047857; }
.tech-control-item .tech-badge.pending { background: #fef3c7; color: #b45309; }

.tech-control-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 640px) {
    .tech-control-summary { grid-template-columns: 1fr; }
}
.tech-control-summary__card {
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tech-control-summary__card--in { border-left: 4px solid #2563eb; }
.tech-control-summary__card--out { border-left: 4px solid #f97316; }
.tech-control-summary__value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--tg-app-text);
}
.tech-control-summary__label { font-size: 0.875rem; font-weight: 600; color: var(--tg-app-text); }
.tech-control-summary__sub { font-size: 0.8125rem; color: var(--tg-app-muted); }

.tech-control-unavailable {
    margin: 0 0 16px;
    padding: 12px 16px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 10px;
    font-size: 0.9rem;
}
.tech-control-empty {
    margin: 0;
    font-size: 0.875rem;
    color: var(--tg-app-muted);
}
.tech-control-table-wrap {
    overflow-x: auto;
    margin: 0 -4px;
}
.tech-control-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.tech-control-table th,
.tech-control-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}
.tech-control-table th {
    font-weight: 600;
    color: var(--tg-app-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.tech-control-table tbody tr:last-child td { border-bottom: 0; }
.tech-control-muted { color: var(--tg-app-muted); font-size: 0.75rem; }
.tech-control-footnote {
    margin: 16px 0 0;
    font-size: 0.75rem;
    color: var(--tg-app-muted);
}

/* ——— Plaques barrière (technicien) ——— */
.tech-plates-header { margin-bottom: 20px; }
.tech-plates-header h2 { margin: 0 0 8px; font-size: 1.5rem; font-weight: 700; }
.tech-plates-lead {
    margin: 0;
    font-size: 0.9rem;
    color: var(--tg-app-muted);
    line-height: 1.45;
    max-width: 42rem;
}
.tech-plates-offline {
    margin: 0;
    padding: 12px 16px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 10px;
    font-size: 0.9rem;
}
.tech-plates-layout__col--form .tech-plates-form {
    max-width: none;
}
.tech-plates-form { max-width: 640px; }
.tech-plates-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}
@media (min-width: 560px) {
    .tech-plates-grid { grid-template-columns: 1fr 1fr; }
}
.tech-plates-field { display: flex; flex-direction: column; gap: 6px; }
.tech-plates-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tg-app-text);
}
.tech-plates-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tg-app-border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--tg-app-surface);
    color: var(--tg-app-text);
}
.tech-plates-input:focus {
    outline: none;
    border-color: var(--tg-tech-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.tech-plates-hint {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: var(--tg-app-muted);
    line-height: 1.4;
}
.tech-plates-actions { margin-top: 18px; }
.tech-plates-status {
    margin: 14px 0 0;
    font-size: 0.875rem;
    min-height: 1.25em;
}
.tech-plates-status.is-success { color: var(--tg-tech-success); }
.tech-plates-status.is-error { color: var(--tg-tech-error); }

.tech-maintenance-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #fff;
    padding: 24px;
    border-radius: 16px;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
}
.tech-maintenance-card h4 { margin: 0 0 8px; font-size: 1.125rem; }
.tech-maintenance-card p { margin: 0 0 16px; color: #93c5fd; font-size: 0.875rem; }
.tech-maintenance-card .tech-btn-planning {
    background: #fff;
    color: #1e3a8a;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
.tech-maintenance-card .tech-btn-planning:hover { background: #eff6ff; }

/* Loading overlay */
#to-go-electricity-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.7);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
#to-go-electricity-loading-overlay[style*="flex"] { display: flex !important; }
.to-go-tech-loading-box {
    background: var(--tg-app-surface);
    padding: 32px 40px;
    border-radius: 16px;
    border: 1px solid var(--tg-app-border);
    text-align: center;
    max-width: 360px;
}
.to-go-tech-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--tg-app-border);
    border-top-color: var(--tg-tech-primary);
    border-radius: 50%;
    animation: to-go-tech-spin 0.9s linear infinite;
    margin: 0 auto 20px;
}
@keyframes to-go-tech-spin { to { transform: rotate(360deg); } }
.to-go-tech-loading-box p { margin: 0; font-size: 15px; color: var(--tg-app-text); }

/* Accueil — barrière (carte, tactile) */
.tech-barrier-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: var(--tg-app-surface);
    border-radius: 20px;
    border: 1px solid var(--tg-app-border);
    box-shadow: 0 12px 40px -16px rgba(15, 23, 42, 0.14);
    padding: 22px 18px 20px;
    box-sizing: border-box;
}
.tech-barrier-card--offline {
    border-style: dashed;
    box-shadow: none;
}
.tech-barrier-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.tech-barrier-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.32);
}
.tech-barrier-card__icon--muted {
    background: #e2e8f0;
    color: #64748b;
    box-shadow: none;
}
.tech-barrier-card__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tg-app-text);
    line-height: 1.15;
}
.tech-barrier-card__sub {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--tg-app-muted);
}
.tech-barrier-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tech-barrier-stack__btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 16px 18px;
    min-height: 56px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: transform 0.08s ease, filter 0.2s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}
.tech-barrier-stack__btn:active:not(:disabled) {
    transform: scale(0.98);
}
.tech-barrier-stack__btn:disabled {
    opacity: 0.55;
    cursor: wait;
}
.tech-barrier-stack__label {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
}
.tech-barrier-stack__hint {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    opacity: 0.9;
}
.tech-barrier-stack__btn--pulse {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}
.tech-barrier-stack__btn--pulse .tech-barrier-stack__hint { opacity: 0.92; }
.tech-barrier-stack__btn--pulse:hover:not(:disabled) {
    filter: brightness(1.04);
}
.tech-barrier-stack__btn--hold {
    background: #eff6ff;
    color: #1e40af;
    border: 2px solid #93c5fd;
}
.tech-barrier-stack__btn--hold:hover:not(:disabled) {
    background: #dbeafe;
}
.tech-barrier-stack__btn--stop {
    background: #f8fafc;
    color: var(--tg-app-text);
    border: 1px solid var(--tg-app-border);
}
.tech-barrier-stack__btn--stop:hover:not(:disabled) {
    background: #f1f5f9;
}
.tech-barrier-status {
    margin: 14px 0 0;
    min-height: 1.35em;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    color: var(--tg-app-muted);
}
.tech-barrier-status.is-success { color: var(--tg-tech-success); }
.tech-barrier-status.is-error { color: var(--tg-tech-error); }
.tech-barrier-offline-msg {
    margin: 0;
    font-size: 0.9rem;
    color: var(--tg-app-muted);
    text-align: center;
    line-height: 1.45;
}
@media (min-width: 480px) {
    .tech-barrier-card { padding: 26px 24px 22px; }
}

/* ——— Accueil technicien (cases : barrière, mouvements, pages) ——— */
.tech-home-head {
    margin-bottom: 20px;
    width: 100%;
}
.tech-home-title { margin: 0 0 8px; font-size: 1.35rem; font-weight: 700; color: var(--tg-app-text); }
.tech-home-lead { margin: 0; font-size: 0.95rem; color: var(--tg-app-muted); max-width: 48rem; }

/* Accueil — accessibilité (titre masqué visuellement) */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.tech-home-dash-kicker {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tg-app-muted);
}
.tech-home-box__head--dash {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 14px;
    margin-bottom: 12px;
}
.tech-home-box__head--dash .tech-home-dash-kicker {
    flex: 1 1 auto;
    min-width: 0;
}
.tech-home-dash-meta {
    font-size: 0.8125rem;
    color: var(--tg-app-muted);
}
.tech-home-dash-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tg-tech-primary);
    text-decoration: none;
    white-space: nowrap;
}
.tech-home-dash-link:hover { text-decoration: underline; }

/* ——— Dashboard KPI strip ——— */
.tech-dash-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.tech-dash-kpi {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 16px;
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.tech-dash-kpi:hover {
    border-color: var(--tg-tech-primary);
    box-shadow: 0 2px 10px rgba(37, 99, 235, .08);
}
.tech-dash-kpi:focus-visible {
    outline: 2px solid var(--tg-tech-primary);
    outline-offset: 2px;
}
.tech-dash-kpi--alert {
    border-color: #fca5a5;
    background: #fef2f2;
}
.tech-dash-kpi__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}
.tech-dash-kpi__icon svg { display: block; }
.tech-dash-kpi__icon--blue  { background: rgba(37, 99, 235, .1); color: #2563eb; }
.tech-dash-kpi__icon--red   { background: rgba(220, 38, 38, .1); color: #dc2626; }
.tech-dash-kpi__icon--green { background: rgba(22, 163, 74, .1); color: #16a34a; }
.tech-dash-kpi__icon--teal  { background: rgba(13, 148, 136, .1); color: #0d9488; }
.tech-dash-kpi__icon--slate { background: rgba(100, 116, 139, .1); color: #64748b; }
.tech-dash-kpi__value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--tg-app-text);
}
.tech-dash-kpi__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 700;
    background: #dc2626;
    color: #fff;
    vertical-align: middle;
}
.tech-dash-kpi__label {
    font-size: .75rem;
    font-weight: 500;
    color: var(--tg-app-muted);
    line-height: 1.3;
}
.tech-dash-kpi__duo {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
}
.tech-dash-kpi__in  { color: #2563eb; }
.tech-dash-kpi__out { color: #f97316; }
.tech-dash-kpi__sep { color: var(--tg-app-muted); font-weight: 400; font-size: 1rem; }

.tech-dash-kpi__icon--amber { background: rgba(245, 158, 11, .12); color: #d97706; }
.tech-dash-kpi__icon--orange { background: rgba(234, 88, 12, .1); color: #ea580c; }

.tech-dash-kpi--action {
    cursor: pointer;
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    font-family: inherit;
    text-align: left;
    position: relative;
}
.tech-dash-kpi--action:hover {
    border-color: #d97706;
    box-shadow: 0 4px 16px rgba(245, 158, 11, .2);
    transform: translateY(-1px);
}
.tech-dash-kpi--action:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(245, 158, 11, .15);
}
.tech-dash-kpi--action:disabled {
    opacity: .7;
    cursor: wait;
}
.tech-dash-kpi--action.is-sending {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    animation: tech-pulse .9s ease-in-out infinite;
}
.tech-dash-kpi--action.is-ok {
    border-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    animation: tech-flash-ok .4s ease-out;
}
.tech-dash-kpi--action.is-err {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    animation: tech-flash-err .4s ease-out;
}
@keyframes tech-pulse {
    0%, 100% { opacity: .7; }
    50% { opacity: 1; }
}
@keyframes tech-flash-ok {
    0% { transform: scale(1.06); }
    100% { transform: scale(1); }
}
@keyframes tech-flash-err {
    0%, 25%, 50% { transform: translateX(-3px); }
    12%, 37% { transform: translateX(3px); }
    62% { transform: translateX(0); }
}
.tech-dash-kpi__status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .75rem;
    font-weight: 600;
    min-height: 1.2em;
    color: var(--tg-app-muted);
    transition: color .2s;
}
.tech-dash-kpi__status.is-success { color: #16a34a; }
.tech-dash-kpi__status.is-error { color: #dc2626; }
.tech-dash-kpi__spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #93c5fd;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: tech-spin .6s linear infinite;
    flex-shrink: 0;
}
@keyframes tech-spin {
    to { transform: rotate(360deg); }
}

/* ——— Dashboard panels grid ——— */
.tech-dash-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}
@media (min-width: 768px) {
    .tech-dash-panels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}
@media (min-width: 1200px) {
    .tech-dash-panels {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.tech-home-box--compact {
    padding: 14px 16px;
}

/* ——— Mini summary cards (inside panels) ——— */
.tech-dash-mini-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.tech-dash-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--tg-app-bg, #f8fafc);
    border-left: 3px solid transparent;
}
.tech-dash-mini-stat--in  { border-left-color: #2563eb; }
.tech-dash-mini-stat--out { border-left-color: #f97316; }
.tech-dash-mini-stat__n {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--tg-app-text);
}
.tech-dash-mini-stat__l {
    font-size: .75rem;
    font-weight: 600;
    color: var(--tg-app-text);
    text-transform: capitalize;
}
.tech-dash-mini-stat__sub {
    font-size: .7rem;
    color: var(--tg-app-muted);
}

/* ——— Settings shortcut tile ——— */
.tech-dash-shortcut {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.tech-dash-shortcut:hover {
    border-color: var(--tg-tech-primary);
    box-shadow: 0 2px 10px rgba(37, 99, 235, .08);
}
.tech-dash-shortcut__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 116, 139, .08);
    color: #64748b;
    border-radius: 8px;
}
.tech-dash-shortcut__icon svg { display: block; }
.tech-dash-shortcut__label {
    font-weight: 600;
    font-size: .9375rem;
    color: var(--tg-app-text);
}

/* Legacy .tech-home-dashboard kept for backwards compat */
.tech-home-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Sur l’accueil, le kicker « Barrière » suffit : masquer le bandeau interne de la carte */
.tech-home-box--barrier .tech-barrier-card__head {
    display: none;
}
.tech-home-box--barrier .tech-barrier-card {
    padding-top: 16px;
}

.tech-home-box {
    background: var(--tg-app-surface);
    border: 1px solid var(--tg-app-border);
    border-radius: 14px;
    padding: 18px 20px;
    box-sizing: border-box;
}
.tech-home-box__head { margin-bottom: 14px; }
.tech-home-box__head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
}
.tech-home-box__title {
    margin: 0 0 4px;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--tg-app-text);
}
.tech-home-box__lead {
    margin: 0;
    font-size: 0.875rem;
    color: var(--tg-app-muted);
    line-height: 1.4;
}
.tech-home-box__meta {
    margin: 4px 0 0;
    font-size: 0.8125rem;
    color: var(--tg-app-muted);
}
.tech-home-box__tablink {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tg-tech-primary);
    text-decoration: none;
    white-space: nowrap;
}
.tech-home-box__tablink:hover { text-decoration: underline; }
.tech-home-box__body { width: 100%; }
.tech-home-box__body--barrier .tech-barrier-card { max-width: 440px; }

.tech-home-box--barrier .tech-home-box__head { margin-bottom: 12px; }

.tech-home-box--movements .tech-home-box__body,
.tech-home-box--peche .tech-home-box__body { padding-top: 0; }
.tech-control-summary--compact {
    margin-bottom: 16px;
    gap: 12px;
}
.tech-control-summary--compact .tech-control-summary__card {
    padding: 12px 14px;
}
.tech-home-movements-split,
.tech-home-peche-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
}
@media (min-width: 900px) {
    .tech-home-movements-split,
    .tech-home-peche-split {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}
.tech-home-peche-offline {
    margin: 0;
    font-size: 0.875rem;
    color: var(--tg-app-muted);
}
.tech-home-peche-table th:nth-child(2),
.tech-home-peche-table td:nth-child(2) {
    white-space: nowrap;
}
.tech-home-movements-col__title {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--tg-app-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tech-home-table-wrap {
    max-height: 280px;
    overflow: auto;
    border-radius: 8px;
    border: 1px solid var(--tg-app-border);
}
.tech-home-table { font-size: 0.8125rem; }
.tech-home-table th,
.tech-home-table td { padding: 8px 10px; }
.tech-home-movements-foot {
    margin: 12px 0 0;
    font-size: 0.75rem;
}

.tech-home-pages-grid {
    display: grid;
    width: 100%;
    gap: 14px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .tech-home-pages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .tech-home-pages-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}
@media (min-width: 1280px) {
    .tech-home-pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

.tech-home-pages-grid--dash {
    gap: 12px;
}
@media (min-width: 520px) {
    .tech-home-pages-grid--dash {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 900px) {
    .tech-home-pages-grid--dash {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}
@media (min-width: 1200px) {
    .tech-home-pages-grid--dash {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.tech-home-tile__metric {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tg-app-muted);
    line-height: 1.35;
}

.tech-home-box.tech-home-box--page {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tech-home-box.tech-home-box--page:hover {
    border-color: var(--tg-tech-primary);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}
.tech-home-box.tech-home-box--page:focus-visible {
    outline: 2px solid var(--tg-tech-primary);
    outline-offset: 2px;
}

.tech-home-pages-grid--dash .tech-home-box.tech-home-box--page {
    gap: 8px;
    padding: 14px 16px;
    min-height: 0;
}

.tech-home-box__page-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.tech-home-box__page-titles {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.tech-home-box__page-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--tg-app-text);
}
.tech-home-box__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #fef2f2;
    color: #b91c1c;
}
.tech-home-box__page-desc {
    font-size: 0.85rem;
    color: var(--tg-app-muted);
    line-height: 1.4;
    margin: 0;
}
.tech-home-box__page-action {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tg-tech-primary);
    margin-top: auto;
}

.tech-home-card__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: var(--tg-tech-primary);
    border-radius: 10px;
}
.tech-home-card__icon svg { display: block; }

/* ——— Onglet Pêche (Colvert Réservations Pêche) ——— */
.tech-peche { width: 100%; max-width: 100%; }
.tech-peche-header { margin-bottom: 20px; }
.tech-peche-title { margin: 0 0 6px; font-size: 1.35rem; font-weight: 700; color: var(--tg-app-text); }
.tech-peche-sub { margin: 0; font-size: 0.9rem; color: var(--tg-app-muted); max-width: 40rem; line-height: 1.45; }
.tech-peche-offline {
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px dashed var(--tg-app-border);
    background: #f8fafc;
    color: var(--tg-app-muted);
}
.tech-peche-today { margin-bottom: 28px; }
.tech-peche-today__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}
.tech-peche-today__title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--tg-app-text); }
.tech-peche-today__date { font-size: 0.875rem; color: var(--tg-app-muted); }
.tech-peche-today__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 900px) {
    .tech-peche-today__grid { grid-template-columns: 1fr 1fr; }
}
.tech-peche-today__kicker {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--tg-app-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tech-peche-today__count { font-weight: 500; color: var(--tg-app-muted); font-size: 0.85rem; }
.tech-peche-empty { margin: 0; font-size: 0.875rem; color: var(--tg-app-muted); }
.tech-peche-table-wrap {
    border-radius: 10px;
    border: 1px solid var(--tg-app-border);
    overflow: auto;
    max-height: 320px;
}
.tech-peche-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.tech-peche-table th,
.tech-peche-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--tg-app-border);
}
.tech-peche-table th { background: #f9fafb; font-weight: 600; color: var(--tg-app-muted); white-space: nowrap; }
.tech-peche-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tech-peche-badge--ok { background: #ecfdf5; color: #047857; }
.tech-peche-badge--wait { background: #fffbeb; color: #b45309; }

.tech-peche-planning-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}
@media (min-width: 640px) {
    .tech-peche-planning-head {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
}
.tech-peche-planning-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--tg-app-text); }
.tech-peche-planning-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}
.tech-peche-plan-nav-btn {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tg-tech-primary);
    text-decoration: none;
    white-space: nowrap;
}
.tech-peche-plan-nav-btn:hover { text-decoration: underline; }
.tech-peche-planning-month {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--tg-app-text);
    text-transform: capitalize;
}
.tech-peche-planning-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--tg-app-border);
    background: var(--tg-app-surface);
}
.tech-peche-plan-grid {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
}
@media (min-width: 768px) {
    .tech-peche-plan-grid { font-size: 0.75rem; }
}
.tech-peche-plan-grid th,
.tech-peche-plan-grid td {
    border: 1px solid var(--tg-app-border);
    padding: 4px 5px;
    vertical-align: top;
    min-width: 72px;
    max-width: 104px;
}
.tech-peche-plan-grid__poste,
.tech-peche-plan-grid__poste-name {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--tg-app-surface);
    min-width: 88px;
    max-width: 120px;
    font-weight: 600;
    text-align: left;
}
.tech-peche-plan-grid thead th.tech-peche-plan-grid__poste { z-index: 3; }
.tech-peche-plan-grid__day {
    text-align: center;
    color: var(--tg-app-muted);
    font-weight: 600;
    line-height: 1.2;
}
.tech-peche-plan-grid__day.is-today {
    background: rgba(37, 99, 235, 0.08);
    color: var(--tg-tech-primary);
}
.tech-peche-plan-grid__wd { display: block; font-size: 0.65rem; text-transform: lowercase; }
.tech-peche-plan-grid__dn { display: block; font-size: 0.85rem; font-weight: 700; color: var(--tg-app-text); }
.tech-peche-plan-grid__day.is-today .tech-peche-plan-grid__dn { color: var(--tg-tech-primary); }

.tech-peche-plan-cell {
    background: #fafafa;
    min-height: 2.5rem;
}
.tech-peche-plan-cell.is-today { background: rgba(37, 99, 235, 0.06); }
.tech-peche-plan-cell.has-booking { background: #eff6ff; }
.tech-peche-plan-cell__empty { color: #cbd5e1; display: block; text-align: center; }
.tech-peche-plan-cell__res { line-height: 1.25; }
.tech-peche-plan-cell__res--extra { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--tg-app-border); }
.tech-peche-plan-cell__name { display: block; color: var(--tg-app-text); font-weight: 500; word-break: break-word; }
.tech-peche-plan-cell__seg {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--tg-app-muted);
    margin-top: 3px;
    line-height: 1.2;
}
.tech-peche-plan-cell__seg--full { font-style: italic; opacity: 0.95; }
.tech-peche-plan-cell__dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 4px;
    border-radius: 50%;
    background: #f59e0b;
    vertical-align: middle;
}
.tech-peche-planning-note {
    margin: 12px 0 0;
    font-size: 0.75rem;
    color: var(--tg-app-muted);
}

/* ——— Résa restaurant (TableBook) ——— */
.tech-resto__head { margin-bottom: 1rem; }
.tech-resto__title { margin: 0 0 0.35rem; font-size: 1.25rem; font-weight: 700; color: var(--tg-app-text); }
.tech-resto__lead { margin: 0; font-size: 0.875rem; color: var(--tg-app-muted); line-height: 1.45; }
.tech-resto__offline {
    padding: 12px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    color: #9a3412;
    font-size: 0.9rem;
}
.tech-resto__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 8px;
}
.tech-resto__field { display: flex; flex-direction: column; gap: 4px; }
.tech-resto__label { font-size: 0.75rem; font-weight: 600; color: var(--tg-app-muted); }
.tech-resto__input {
    padding: 8px 10px;
    border: 1px solid var(--tg-app-border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    color: var(--tg-app-text);
    min-width: 9rem;
}
.tech-resto__actions { display: flex; align-items: flex-end; }
.tech-resto__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 4px 0 10px;
}
.tech-resto-badge-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.tech-resto-badge-pill__label { font-weight: 700; letter-spacing: 0.02em; }
.tech-resto-badge-pill__value {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.tech-resto-badge-pill__unit { font-size: 0.7rem; font-weight: 600; opacity: 0.85; }
.tech-resto-badge-pill--midi {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #ffb300;
    color: #e65100;
}
.tech-resto-badge-pill--soir {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-color: #8e24aa;
    color: #4a148c;
}
.tech-resto__status { min-height: 1.25rem; font-size: 0.8rem; color: var(--tg-app-muted); margin: 0 0 8px; }
.tech-resto__status.is-error { color: #b91c1c; }
.tech-resto__table-wrap {
    overflow-x: auto;
    border: 1px solid var(--tg-app-border);
    border-radius: 12px;
    background: var(--tg-app-surface);
}
.tech-resto-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.tech-resto-table th,
.tech-resto-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--tg-app-border);
}
.tech-resto-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--tg-app-muted);
    white-space: nowrap;
}
.tech-resto-table tbody tr:last-child td { border-bottom: none; }
.tech-resto-table__empty { text-align: center; color: var(--tg-app-muted); padding: 20px !important; }
.tech-resto-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tech-resto-badge--confirmed { background: #d1fae5; color: #065f46; }
.tech-resto-badge--pending { background: #fef3c7; color: #92400e; }
.tech-resto-badge--cancelled { background: #fee2e2; color: #991b1b; }
.tech-resto-badge--placed { background: #e0e7ff; color: #3730a3; }
