/* Import police moderne */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Palette LSPD */
:root {
    --bg-main: #020617;        /* fond global */
    --bg-elevated: #0b1220;    /* blocs */
    --bg-card: #111827;        /* cartes */
    --border-subtle: rgba(148, 163, 184, 0.25);
    --primary: #2563eb;        /* bleu LSPD */
    --primary-soft: rgba(37, 99, 235, 0.15);
    --accent: #38bdf8;         /* cyan accent */
    --danger: #ef4444;
    --text-main: #ebe5e5;
    --text-muted: #af9c9c;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.65);
}

/* GLOBAL */

body,
body.bg-dark {
    background: radial-gradient(circle at top, #1e293b 0, #020617 45%, #020617 100%);
    color: var(--text-main);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 sans-serif;
    min-height: 100vh;
}

/* Liens */
a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* NAVBAR – bandeau haut */

.navbar {
    background: linear-gradient(90deg, #020617, #020617, #0b1120);
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.7);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #e5e7eb !important;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.navbar-brand::before {
    content: "";
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #60a5fa, #1d4ed8);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4);
    display: inline-block;
}

.navbar-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.navbar-text strong {
    color: #f9fafb;
}

.navbar .btn-outline-danger.btn-sm {
    border-radius: 999px;
    padding-inline: 1rem;
}

/* DEFCON badge dans la navbar */
.navbar-text .defcon-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.06);
    border: 1px solid rgba(248, 250, 252, 0.1);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* CONTENEUR PRINCIPAL */

.container {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

/* CARTES */

.card {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(15,23,42,0.99));
    box-shadow: var(--shadow-soft);
}

.card.bg-secondary {
    background: linear-gradient(145deg, #020617, #020617) !important;
    border-color: var(--border-subtle) !important;
}

.card-title {
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* TABLES */

.table {
    color: #e5e7eb;
    border-color: rgba(31, 41, 55, 0.9);
    margin-bottom: 0;
}

.table thead {
    background: rgba(15, 23, 42, 0.9);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
}

.table tbody tr {
    transition: background 0.18s ease, transform 0.12s ease;
}
.table tbody tr:hover {
    background: rgba(37, 99, 235, 0.07);
    transform: translateY(-1px);
}

/* BOUTONS */

.btn {
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    border: none;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.5);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.65);
}

.btn-outline-light {
    border-color: rgba(148, 163, 184, 0.5);
    color: #e5e7eb;
}
.btn-outline-light:hover {
    background: rgba(148, 163, 184, 0.08);
}

.btn-warning {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: none;
}

/* FORMULAIRES */

.form-control,
.form-select {
    background-color: #020617;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: var(--text-main);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary-soft);
    background-color: #020617;
    color: var(--text-main);
}

.form-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- PAGE LOGIN LSPD ULTRA --- */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 92vh;
}

.login-card {
    background: rgba(10, 20, 40, 0.75);
    padding: 2rem 2.5rem;
    width: 380px;
    border-radius: 22px;
    border: 1px solid rgba(80, 120, 200, 0.25);
    box-shadow: 0 10px 40px rgba(0, 20, 60, 0.7),
                inset 0 0 25px rgba(0, 25, 50, 0.4);
    backdrop-filter: blur(12px);
    animation: fadeIn 0.6s ease;
    text-align: center;
    position: relative;
}

.login-logo img {
    width: 80px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.55));
}

.login-title {
    color: #e2e8f0;
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.title-underline {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    margin: 0 auto 1.5rem;
    border-radius: 10px;
    animation: underlineAnim 1.1s ease;
}

@keyframes underlineAnim {
    from { width: 0; opacity: 0; }
    to { width: 60px; opacity: 1; }
}

.login-input {
    margin-bottom: 14px;
    border-radius: 10px;
    background: rgba(20, 30, 60, 0.8);
    border: 1px solid rgba(100, 130, 200, 0.25);
    color: #e5e7eb;
}

.login-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

.login-btn {
    width: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    font-weight: 600;
    margin-top: 10px;
}

.login-btn:hover {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
    transform: scale(1.02);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-background {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: url('/assets/img/background.jpg') center/cover no-repeat;
    z-index: -2;
}
.login-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 25, 0.75);
    backdrop-filter: blur(4px);
    z-index: -1;
}
.remember {
    color: #cdd3df;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

/* ALERTES */

.alert {
    border-radius: 14px;
    border: none;
}

/* TITRES / PAGES */

h1, h2, h3, h4 {
    font-weight: 600;
}

h2 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

h2::before {
    content: "";
    width: 6px;
    height: 20px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}

/* DIVERS */

.badge-grade {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.4);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* --- PAGE D'ACCUEIL / HERO LSPD --- */

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(145deg, rgba(15,23,42,0.8), rgba(15,23,42,0.95));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
    animation: fadeInUp 0.8s ease forwards;
}

.hero-left {
    max-width: 600px;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: .75rem;
    line-height: 1.2;
}

.lspd-highlight {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.6rem;
}

.hero-buttons .btn {
    margin-right: .5rem;
    padding: .55rem 1.3rem;
}

.hero-right {
    position: relative;
    width: 350px;
    height: 250px;
}

.hero-img {
    position: absolute;
    opacity: 0.9;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.6));
    animation: float 6s ease-in-out infinite;
}

.hero-img.small {
    width: 90px;
}

.hero-img.medium {
    width: 150px;
}

.hero-img:nth-child(1) { top: 10px; left: 40px; }
.hero-img:nth-child(2) { bottom: 20px; right: 20px; animation-delay: 1s; }
.hero-img:nth-child(3) { top: 60px; right: 70px; animation-delay: 2s; }

.rotate-slow {
    animation: rotateSlow 12s linear infinite;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

@keyframes rotateSlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-divider {
    border-color: rgba(56, 189, 248, 0.1);
    margin: 2rem 0;
}
/* -------- PAGE D'ACCUEIL (USER) -------- */

.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(15,23,42,0.75), rgba(15,23,42,0.92));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 45px rgba(0,0,0,0.55);
    animation: fadeInUp 0.8s ease forwards;
}

.home-content {
    max-width: 650px;
    animation: fadeIn 1s ease forwards;
}

.home-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: .8rem;
}

.home-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    animation: fadeIn 1.2s ease forwards;
}

.home-buttons .btn {
    margin-right: 0.7rem;
    padding: .55rem 1.3rem;
}

.home-images {
    position: relative;
    width: 350px;
    height: 260px;
}

.home-img {
    position: absolute;
    opacity: 0.90;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.65));
    animation: float 6s ease-in-out infinite;
}

.home-img.small {
    width: 90px;
    top: 20px;
    right: 120px;
}

.home-img.medium {
    width: 160px;
    bottom: 10px;
    right: 40px;
    animation-delay: 1.2s;
}

/* animations réutilisées */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ----------- IMAGE FIXE POUR LA PAGE D'ACCUEIL ----------- */

.home-image-fixed {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 2rem;
}

.home-image-fixed img {
    max-width: 320px;       /* taille ajustable */
    opacity: 0.9;
    border-radius: 10px;    /* optionnel */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* effet propre */
}

/* enlève les anciennes animations */
.home-img,
.hero-img {
    animation: none !important;
    position: static !important;
    transform: none !important;
}


/* ---- TABLEAU CASIERS LSPD ---- */

.search-bar {
    width: 240px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #e5e7eb;
    transition: 0.2s;
}

.search-bar:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
    background: rgba(15, 23, 42, 0.8);
}

/* -------- TABLEAU SOMBRE LSPD -------- */

.casier-table-wrapper {
    background: rgba(10, 20, 40, 0.6);
    padding: 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(60, 100, 200, 0.15);
    box-shadow: 0 15px 35px rgba(10, 20, 40, 0.6);
    backdrop-filter: blur(10px);
}

.casier-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.casier-table thead th {
    background: rgba(20, 35, 70, 0.9);
    padding: 14px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.78rem;
    border: none;
    color: #cbd5e1;
    border-radius: 10px;
}

.casier-table tbody tr {
    background: rgba(25, 40, 80, 0.65);
    transition: 0.22s ease;
}

/* Fix important : empêcher les lignes blanches */
.casier-table tbody tr {
    background: rgba(20, 30, 60, 0.75) !important; /* bleu sombre */
    color: #e5e7eb !important;
}

/* cellules */
.casier-table td {
    background: transparent !important;
    color: #e5e7eb !important;
}


/* Coins arrondis */
.casier-table td:first-child,
.casier-table th:first-child {
    border-radius: 10px 0 0 10px;
}

.casier-table td:last-child,
.casier-table th:last-child {
    border-radius: 0 10px 10px 0;
}

/* Bouton Voir */
.btn-view {
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(37, 99, 235, 0.4);
    color: #93c5fd;
    font-size: 0.85rem;
    transition: 0.2s;
}

.btn-view:hover {
    background: rgba(37, 99, 235, 0.45);
    border-color: rgba(37, 99, 235, 0.8);
    color: white;
}
.navbar-brand::before {
    display: none !important;
    content: none !important;
}


/* 🔵 Liste déroulante stylée (multi-select mais propre et compacte) */
.grade-select {
    background: rgba(20, 25, 35, 0.6);
    color: #e5ecff;
    border: 1px solid rgba(60, 110, 255, 0.4);
    border-radius: 12px;

    padding: 10px 14px;
    height: auto;
    max-height: 120px; /* PAS un gros bloc */
    overflow-y: auto;

    font-size: 15px;
    transition: all 0.25s ease;
}

/* Focus bleu stylé */
.grade-select:focus {
    border-color: #4c8bff;
    box-shadow: 0 0 10px rgba(120, 160, 255, 0.3);
}

/* Options */
.grade-select option {
    background: #0f141b;
    color: #dce6ff;
    padding: 6px;
    border-radius: 6px;
}

/* Survol d'une option */
.grade-select option:hover {
    background: rgba(100, 140, 255, 0.25);
}

/* Scrollbar */
.grade-select::-webkit-scrollbar {
    width: 8px;
}

.grade-select::-webkit-scrollbar-thumb {
    background: rgba(120, 140, 255, 0.4);
    border-radius: 10px;
}


.stat-card {
    background: #0d1117;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 18px rgba(0, 123, 255, 0.25);
}

.stat-title {
    font-size: 14px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
}
.defcon-banner {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 25px;
    border-radius: 14px;
    margin: 0 auto;
    width: 90%;
    max-width: 1100px;
    gap: 25px;
    backdrop-filter: blur(6px);
}

.defcon-level {
    font-size: 42px;
    font-weight: bold;
    color: #ff3b3b;
    padding: 10px 22px;
    background: rgba(255, 0, 0, 0.15);
    border-radius: 12px;
    min-width: 70px;
    text-align: center;
}

.defcon-info {
    display: flex;
    flex-direction: column;
}

.defcon-title {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
    opacity: 0.9;
}

.defcon-text {
    margin-top: 4px;
    font-size: 14px;
    color: #d0d0d0;
    opacity: 0.9;
    line-height: 1.4;
}
/* Scrollbar globale (Chrome, Edge, Opera) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* Rail */
::-webkit-scrollbar-track {
    background: #0b1120; /* fond sombre */
    border-radius: 10px;
}

/* Barre */
::-webkit-scrollbar-thumb {
    background: #1e293b; /* gris bleuté */
    border-radius: 10px;
    border: 2px solid #0b1120; /* effet creusé */
}

/* Barre au hover */
::-webkit-scrollbar-thumb:hover {
    background: #38bdf8; /* bleu clair néon */
}

/* Scrollbar pour Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #1e293b #0b1120;
}
/* -------------------------------------
   NAVBAR LINKS (Mon profil / Casiers / Services / Administration)
-------------------------------------- */

.navbar .nav-link {
    position: relative;
    font-weight: 500;
    color: #9bbad1 !important;
    padding: 8px 14px !important;
    border-radius: 8px;
    transition: 0.25s;
}

/* Effet hover bleu néon */
.navbar .nav-link:hover {
    color: #00c6ff !important;
    background: rgba(0, 198, 255, 0.10);
    box-shadow: 0 0 10px rgba(0, 198, 255, 0.4);
}

/* Highlight du lien "Administration" */
.navbar .nav-link.text-warning.fw-bold {
    color: #ffcc00 !important;
}

.navbar .nav-link.text-warning.fw-bold:hover {
    background-color: rgba(255, 200, 0, 0.15);
    box-shadow: 0 0 12px rgba(255, 200, 0, 0.5);
}

/* -------------------------------------
   BOUTON DECONNEXION (style LSPD)
-------------------------------------- */

.navbar .btn-logout,
.navbar .btn-outline-danger {
    border: 1px solid #ff4d4d !important;
    color: #ff4d4d !important;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 600;
    transition: 0.25s;
}

.navbar .btn-logout:hover,
.navbar .btn-outline-danger:hover {
    color: #fff !important;
    background: #ff4d4d !important;
    box-shadow: 0 0 12px rgba(255, 77, 77, 0.6);
}

/* -------------------------------------
   BADGES ADMIN / OWNER
-------------------------------------- */

.badge.bg-danger {
    background: linear-gradient(45deg, #ff4d4d, #ff1a1a) !important;
    padding: 4px 8px;
    border-radius: 8px;
}

.badge.bg-warning {
    background: linear-gradient(45deg, #ffdd66, #ffbb00) !important;
    padding: 4px 8px;
    border-radius: 8px;
}
/* STYLE MENU NAVBAR LSPD */
.navbar-nav .nav-link {
    color: #7abaff !important;                  /* Bleu clair visible */
    font-weight: 500;
    font-size: 16px;
    padding: 10px 14px;
    transition: 0.25s;
}

/* État actif (Administration par exemple) */
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:focus {
    color: #ffd54a !important;                  /* Jaune LSPD */
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 213, 74, 0.5);
}

/* Survol */
.navbar-nav .nav-link:hover {
    color: #00c8ff !important;                  /* Neon bleu */
    text-shadow: 0 0 10px rgba(0, 200, 255, 0.7);
    transform: translateY(-1px);
}
/* Retire tout soulignement sur les liens */
a,
a:hover,
a:focus,
.nav-link,
.nav-link:hover,
.nav-link:focus {
    text-decoration: none !important;
}

/* Optionnel : retire aussi le soulignement des boutons */
.btn,
.btn:hover,
.btn:focus {
    text-decoration: none !important;
}
/* --- STYLE GLOBAL DES BOUTONS DU DASHBOARD --- */

.dashboard-btn {
    border-radius: 20px !important;
    padding: 8px 20px !important;
    font-weight: 600;
    transition: 0.2s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #dbe9ff !important;
    background: rgba(255,255,255,0.05) !important;
}

/* Effet au survol mais SANS rendre le texte invisible */
.dashboard-btn:hover {
    transform: scale(1.03);
    background: rgba(0, 200, 255, 0.15) !important;
    border-color: #00c8ff !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Empêche totalement les soulignements et surlignages */
a, a:hover, a:focus {
    text-decoration: none !important;
}

/* Variantes de couleurs */
.dashboard-btn.info {
    border-color: #00c8ff !important;
    color: #00c8ff !important;
}
.dashboard-btn.info:hover {
    background: rgba(0,200,255,0.20) !important;
}

.dashboard-btn.warning {
    border-color: #ffc400 !important;
    color: #ffc400 !important;
}
.dashboard-btn.warning:hover {
    background: rgba(255,196,0,0.20) !important;
}

