/* ============================================================
   style.css — Agents de Sentier · Thème MDT Police
   ============================================================
   Variables CSS en haut → modifiez les couleurs ici pour
   changer le thème de toute l'application en une fois.
   ============================================================ */

/* ── VARIABLES DE THÈME ───────────────────────────────────── */
:root {
    /* Couleurs principales */
    --bg-base:        #0b1120;   /* Fond principal (noir bleuté) */
    --bg-surface:     #111827;   /* Cartes, panneaux */
    --bg-surface-2:   #1a2438;   /* Hover, sélection */
    --bg-surface-3:   #1f2d45;   /* Élément actif */

    /* Bordures */
    --border:         #1e3050;
    --border-light:   #2a4070;

    /* Texte */
    --text-primary:   #e2e8f2;
    --text-secondary: #8a9bba;
    --text-muted:     #4a5e80;

    /* Couleur accent: bleu police */
    --police-blue:    #1a56db;
    --police-blue-lt: #2563f0;
    --police-blue-dim:#0d2a70;

    /* Couleur accent secondaire: cyan */
    --cyan:           #06b6d4;
    --cyan-dim:       #0e4f5c;

    /* États */
    --success:        #22c55e;
    --warning:        #f59e0b;
    --danger:         #ef4444;
    --info:           #3b82f6;

    /* Dimensions de la mise en page */
    --sidebar-width:  240px;
    --topnav-height:  54px;

    /* Typographie */
    --font-ui:        'Source Sans 3', system-ui, sans-serif;
    --font-display:   'Rajdhani', sans-serif;
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.5;
    min-height: 100vh;
}

/* ── PAGE DE CONNEXION ────────────────────────────────────── */

/* Fond de la page login */
.login-body {
    background-color: var(--bg-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Grille animée en arrière-plan */
.login-grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(26, 86, 219, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 86, 219, 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Bande de couleur en haut */
.login-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--police-blue), var(--cyan), var(--police-blue));
    background-size: 200% 100%;
    animation: shimmer 4s linear infinite;
    z-index: 10;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Conteneur principal login */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* La carte blanche/foncée */
.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(26,86,219,0.15),
        0 20px 60px rgba(0,0,0,0.5);
}

/* En-tête de la carte */
.login-card-header {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, #111e35 0%, var(--bg-surface) 100%);
    border-bottom: 1px solid var(--border);
}

/* Bouclier central */
.login-shield {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--police-blue), var(--cyan-dim));
    border: 2px solid var(--police-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    color: #fff;
    box-shadow: 0 0 20px rgba(26,86,219,0.4);
}

.login-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Séparateur "AUTHENTIFICATION REQUISE" */
.login-separator {
    padding: 0.6rem 1.5rem;
    background: var(--police-blue-dim);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.login-separator span {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--cyan);
    text-transform: uppercase;
}

/* Corps du formulaire */
.login-form {
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Message d'erreur */
.login-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.4);
    color: #fca5a5;
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
}

/* Champ individuel */
.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.login-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.login-input-wrap {
    position: relative;
}

.login-input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.login-input:focus {
    border-color: var(--police-blue);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.2);
}

.login-input.is-invalid {
    border-color: var(--danger);
}

.login-input::placeholder {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Champ mot de passe avec bouton œil */
.login-input-password .login-input {
    padding-right: 2.8rem;
}

.login-pw-toggle {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    transition: color 0.2s;
}

.login-pw-toggle:hover { color: var(--text-secondary); }

/* Case à cocher "se souvenir de moi" */
.login-remember {
    margin: -0.25rem 0;
}

.login-check-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.login-check {
    display: none; /* Caché, remplacé par le carré CSS */
}

.login-check-custom {
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.login-check:checked + .login-check-custom {
    background: var(--police-blue);
    border-color: var(--police-blue);
}

.login-check:checked + .login-check-custom::after {
    content: '\f00c'; /* Icône FA checkmark */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    color: #fff;
}

/* Bouton connexion */
.login-btn {
    background: var(--police-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    margin-top: 0.25rem;
}

.login-btn:hover {
    background: var(--police-blue-lt);
    box-shadow: 0 4px 16px rgba(26,86,219,0.4);
}

.login-btn:active {
    transform: translateY(1px);
}

/* Pied de la carte */
.login-card-footer {
    padding: 0.75rem 2rem;
    background: var(--bg-base);
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Boîte de démonstration (DEBUG) */
.login-demo-box {
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
}

.login-demo-title {
    color: #fcd34d;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.login-demo-accounts {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.login-demo-account {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.login-demo-account:hover {
    background: rgba(245,158,11,0.1);
}

.login-demo-account code {
    color: var(--cyan);
    font-size: 0.82rem;
}

.login-demo-pw {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.login-demo-pw code { color: var(--text-secondary); }


/* ── BARRE DE NAVIGATION SUPÉRIEURE ──────────────────────── */

.mdt-topnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topnav-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0,0,0,0.4);
}

/* Bande de couleur en haut */
.mdt-topnav::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--police-blue), var(--cyan));
}

/* Logo */
.mdt-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.mdt-brand .fa-shield-halved {
    color: var(--police-blue);
    font-size: 1.2rem;
}

.mdt-brand:hover { color: #fff; }

/* Horloge */
.mdt-clock {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.05em;
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
}

/* Bouton hamburger (mobile) */
.mdt-hamburger {
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mdt-hamburger:hover {
    background: var(--bg-surface-2);
    color: var(--text-primary);
}

/* Bouton utilisateur (dropdown) */
.mdt-user-btn {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 0.88rem;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    transition: background 0.2s;
}

.mdt-user-btn:hover,
.mdt-user-btn[aria-expanded="true"] {
    background: var(--bg-surface-3);
    border-color: var(--police-blue);
}

/* Menu déroulant MDT */
.mdt-dropdown {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    min-width: 200px;
    padding: 0.25rem 0;
}

.mdt-dropdown .dropdown-header {
    color: var(--text-primary);
    font-size: 0.88rem;
    padding: 0.6rem 1rem 0.4rem;
}

.mdt-dropdown .dropdown-item {
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 0.45rem 1rem;
    transition: background 0.15s, color 0.15s;
}

.mdt-dropdown .dropdown-item:hover {
    background: var(--bg-surface-2);
    color: var(--text-primary);
}

.mdt-dropdown .dropdown-item.text-danger:hover {
    background: rgba(239,68,68,0.1);
    color: #fca5a5;
}

.mdt-dropdown .dropdown-divider {
    border-color: var(--border);
    margin: 0.25rem 0;
}


/* ── BARRE LATÉRALE ───────────────────────────────────────── */

.mdt-sidebar {
    position: fixed;
    left: 0;
    top: var(--topnav-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 900;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease;
}

/* Infos utilisateur en haut de la sidebar */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    background: var(--police-blue-dim);
    border: 1px solid var(--police-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--police-blue-lt);
    font-size: 1rem;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-user-id {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.sidebar-divider {
    border-color: var(--border);
    margin: 0;
}

/* Liste de navigation */
.sidebar-nav {
    list-style: none;
    margin: 0.5rem 0;
    padding: 0 0.5rem;
    flex: 1;
}

.sidebar-nav-item + .sidebar-nav-item {
    margin-top: 1px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.85rem;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.sidebar-nav-link:hover {
    background: var(--bg-surface-2);
    color: var(--text-primary);
}

.sidebar-nav-link.active {
    background: var(--police-blue-dim);
    color: var(--text-primary);
    border-left: 2px solid var(--police-blue);
}

.sidebar-nav-icon {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.sidebar-nav-link.active .sidebar-nav-icon {
    color: var(--police-blue-lt);
    opacity: 1;
}

/* Version en bas de sidebar */
.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

/* Sidebar mobile: cachée par défaut */
@media (max-width: 991.98px) {
    .mdt-sidebar {
        transform: translateX(-100%);
    }
    .mdt-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 850;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
    }
    .sidebar-overlay.is-open {
        opacity: 1;
        pointer-events: all;
    }
}


/* ── MISE EN PAGE PRINCIPALE ──────────────────────────────── */

.mdt-layout {
    display: flex;
    padding-top: var(--topnav-height);
    min-height: 100vh;
}

.mdt-main {
    flex: 1;
    min-width: 0; /* Évite le débordement */
    margin-left: var(--sidebar-width);
    transition: margin-left 0.25s ease;
}

@media (max-width: 991.98px) {
    .mdt-main {
        margin-left: 0;
    }
}

/* ── CONTENU DES PAGES ────────────────────────────────────── */

.page-content {
    padding: 1.5rem;
}

/* En-tête de page (titre + boutons d'action) */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    letter-spacing: 0.02em;
}

/* Fil d'Ariane MDT */
.mdt-breadcrumb {
    margin: 0;
    font-size: 0.8rem;
}

.mdt-breadcrumb .breadcrumb-item,
.mdt-breadcrumb .breadcrumb-item.active {
    color: var(--text-muted);
}

.mdt-breadcrumb .breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.mdt-breadcrumb .breadcrumb-item a:hover {
    color: var(--text-primary);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mdt-datetime {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ── CARTES MDT ───────────────────────────────────────────── */

.mdt-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.mdt-card-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mdt-card-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0;
}

.mdt-card-body {
    padding: 1.25rem;
}

/* ── CARTE DE BIENVENUE ───────────────────────────────────── */

.welcome-card {
    background: linear-gradient(135deg, #111e35 0%, var(--bg-surface) 60%);
    border-color: var(--border-light);
}

.welcome-card-body {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.welcome-icon {
    width: 56px;
    height: 56px;
    background: var(--police-blue-dim);
    border: 1px solid var(--police-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--police-blue-lt);
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(26,86,219,0.25);
}

.welcome-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--text-primary);
}

.welcome-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mdt-badge-role {
    background: var(--police-blue-dim);
    color: var(--police-blue-lt);
    border: 1px solid var(--police-blue);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.25em 0.6em;
}

.welcome-matricule {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.welcome-lastlogin {
    font-size: 0.82rem;
}

/* ── TUILES DE MODULES ────────────────────────────────────── */

.mdt-module-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color 0.2s, background 0.2s;
}

.mdt-module-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.mdt-module-link:hover {
    border-color: var(--police-blue);
    background: var(--bg-surface-2);
    color: inherit;
}

.mdt-module-placeholder {
    opacity: 0.5;
    cursor: default;
}

.module-card-icon {
    width: 44px;
    height: 44px;
    background: var(--police-blue-dim);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--police-blue-lt);
}

.module-card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.module-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}

.module-card-footer {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.mdt-module-arrow {
    color: var(--police-blue-lt);
}

/* ── ALERTE FLASH ─────────────────────────────────────────── */

.mdt-alert {
    border-radius: 6px;
    font-size: 0.9rem;
    border: none;
}

.alert-success { background: rgba(34,197,94,0.12); color: #86efac; border-left: 3px solid var(--success); }
.alert-danger  { background: rgba(239,68,68,0.12);  color: #fca5a5; border-left: 3px solid var(--danger); }
.alert-warning { background: rgba(245,158,11,0.12); color: #fcd34d; border-left: 3px solid var(--warning); }
.alert-info    { background: rgba(59,130,246,0.12); color: #93c5fd; border-left: 3px solid var(--info); }

/* ── UTILITAIRES ──────────────────────────────────────────── */

/* Scrollbar custom (Webkit) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Sélection de texte */
::selection { background: var(--police-blue); color: #fff; }


/* ── RUBAN HORS-LIGNE ─────────────────────────────────────── */

#offline-ribbon {
    position: fixed;
    top: var(--topnav-height);  /* Juste sous la barre de navigation */
    left: 0;
    right: 0;
    z-index: 990;
    background: repeating-linear-gradient(
        -45deg,
        #1a1a00,
        #1a1a00 10px,
        #2a2600 10px,
        #2a2600 20px
    );
    border-top: 1px solid var(--warning);
    border-bottom: 1px solid var(--warning);
    color: var(--warning);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.35rem 1rem;
    /* Caché par défaut */
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

#offline-ribbon.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Icône clignotante */
#offline-ribbon .ribbon-icon {
    animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* Quand le ruban est visible, pousser le contenu vers le bas */
body.is-offline .mdt-main {
    padding-top: 2rem; /* Hauteur approximative du ruban */
}

/* Sur mobile, le ruban est un peu plus haut */
@media (max-width: 575px) {
    #offline-ribbon {
        font-size: 0.72rem;
        padding: 0.3rem 0.75rem;
    }
}


/* ── FORMULAIRES MDT (champs, boutons) ────────────────────── */

.mdt-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.mdt-input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.93rem;
    padding: 0.55rem 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.mdt-input:focus {
    border-color: var(--police-blue);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.18);
}

.mdt-input::placeholder { color: var(--text-muted); }

/* Champ avec bouton a droite (ex: oeil mot de passe) */
.mdt-input-group {
    position: relative;
}

.mdt-input-group .mdt-input {
    padding-right: 2.6rem;
}

.mdt-input-eye {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    transition: color 0.15s;
}
.mdt-input-eye:hover { color: var(--text-secondary); }

/* Boutons */
.mdt-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.55rem 1.1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.mdt-btn:active { transform: translateY(1px); }

.mdt-btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

.mdt-btn-primary {
    background: var(--police-blue);
    color: #fff;
}
.mdt-btn-primary:hover {
    background: var(--police-blue-lt);
    box-shadow: 0 3px 12px rgba(26,86,219,0.35);
    color: #fff;
}

.mdt-btn-warning {
    background: rgba(245,158,11,0.15);
    color: #fcd34d;
    border: 1px solid rgba(245,158,11,0.3);
}
.mdt-btn-warning:hover {
    background: rgba(245,158,11,0.25);
    color: #fde68a;
}

.mdt-btn-danger {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.3);
}
.mdt-btn-danger:hover {
    background: rgba(239,68,68,0.25);
    color: #fecaca;
}

.mdt-btn-ghost-danger {
    background: none;
    color: var(--text-muted);
    border: 1px solid transparent;
    padding: 0.3rem 0.6rem;
}
.mdt-btn-ghost-danger:hover {
    color: #fca5a5;
    border-color: rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.08);
}


/* ── PAGE PROFIL ──────────────────────────────────────────── */

/* Grille des champs d'identification (lecture seule) */
.profile-id-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 575px) {
    .profile-id-grid { grid-template-columns: 1fr; }
}

.profile-id-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.profile-id-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.profile-id-value {
    font-size: 0.93rem;
    color: var(--text-primary);
}

.profile-mono {
    font-family: 'Courier New', monospace;
    color: var(--cyan);
    font-size: 0.88rem;
}

/* Indicateur de force du mot de passe */
.pw-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.pw-strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.pw-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.pw-strength-label {
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}


/* ── LISTE DES SESSIONS ───────────────────────────────────── */

.sessions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.session-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.session-item:last-child { border-bottom: none; }

.session-item:hover { background: var(--bg-surface-2); }

/* Session courante: liseree bleue a gauche */
.session-current {
    border-left: 3px solid var(--police-blue);
    background: rgba(26,86,219,0.05);
}
.session-current:hover { background: rgba(26,86,219,0.08); }

/* Session expiree: grisee */
.session-expired { opacity: 0.5; }

.session-icon {
    width: 34px;
    height: 34px;
    background: var(--bg-surface-3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.session-current .session-icon {
    background: var(--police-blue-dim);
    color: var(--police-blue-lt);
}

.session-info {
    flex: 1;
    min-width: 0;
}

.session-browser {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.session-badge-current {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--police-blue-dim);
    color: var(--police-blue-lt);
    border: 1px solid var(--police-blue);
    border-radius: 3px;
    padding: 0.1em 0.45em;
}

.session-badge-expired {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(100,100,100,0.15);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.1em 0.45em;
}

.session-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    line-height: 1.6;
}

.session-revoke {
    flex-shrink: 0;
    align-self: center;
}

/* Message quand aucune session */
.sessions-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.sessions-empty .fa {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.sessions-empty p  { margin: 0 0 0.25rem; font-size: 0.9rem; }
.sessions-empty small { font-size: 0.8rem; }

/* Note en bas de la carte sessions */
.card-footer-note {
    padding: 0.65rem 1.25rem;
    background: var(--bg-base);
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    border-radius: 0 0 8px 8px;
}
