/* GearPackers - Styles personnalisés */

:root {
    --sidebar-width: 260px;
    --topbar-height: 0px;
    --mobile-nav-height: 62px;
}

body {
    background-color: #f0f2f5;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ─── Sidebar ─────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.75);
    border-radius: 8px;
    padding: .5rem .75rem;
    font-size: .9rem;
    transition: all .15s ease;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: #0d6efd;
}

/* ─── Main content ────────────────────────────────────── */
main {
    min-height: 100vh;
    max-width: calc(100vw - var(--sidebar-width));
}

/* ─── Cards ───────────────────────────────────────────── */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .15s ease, box-shadow .15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* ─── Tables ──────────────────────────────────────────── */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, .04);
    cursor: pointer;
}

.table th {
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

/* ─── Badges / Status ─────────────────────────────────── */
.badge-available   { background-color: #198754; }
.badge-reserved    { background-color: #0d6efd; }
.badge-maintenance { background-color: #fd7e14; color: #000; }

/* ─── Modal ───────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
}

.modal-header {
    border-bottom: 1px solid #eee;
}

/* ─── Forms ───────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
}

/* ─── Alerts / Toasts ─────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ─── Page header ─────────────────────────────────────── */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

/* ─── Kit cards ───────────────────────────────────────── */
.kit-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .15s ease;
    cursor: pointer;
}

.kit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* ─── Wikipedia product cards ─────────────────────────── */
.wiki-card:hover {
    background: #e8f0fe;
    border-color: #0d6efd !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,110,253,.15);
}

/* ─── Checklist ───────────────────────────────────────── */
.checklist-item {
    padding: .75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.checklist-item.packed {
    background-color: rgba(25,135,84,.05);
}

.checklist-item.missing {
    background-color: rgba(220,53,69,.05);
}

/* ─── Login / Register ────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

/* ─── Mobile bottom navigation ───────────────────────── */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    z-index: 1030;
    height: var(--mobile-nav-height);
    box-shadow: 0 -2px 12px rgba(0,0,0,.25);
    align-items: stretch;
}

.mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: .6rem;
    font-weight: 500;
    padding: .3rem .1rem;
    transition: color .15s ease;
    border-top: 2px solid transparent;
}

.mobile-nav a i {
    font-size: 1.25rem;
    line-height: 1;
}

.mobile-nav a.active {
    color: #fff;
    border-top-color: #0d6efd;
}

.mobile-nav a:not(.active):hover {
    color: rgba(255,255,255,.85);
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    /* Sidebar cachée, nav mobile visible */
    .sidebar {
        display: none !important;
    }
    .mobile-nav {
        display: flex;
    }

    /* Main prend toute la largeur, espace pour nav mobile */
    main {
        max-width: 100vw;
        padding: 1rem !important;
        padding-bottom: calc(var(--mobile-nav-height) + 1rem) !important;
    }

    /* Page header : titre + bouton s'enroulent si besoin */
    .page-header {
        flex-wrap: wrap;
        gap: .5rem;
        margin-bottom: 1rem;
    }

    .page-header h1 {
        font-size: 1.2rem;
    }

    /* Boutons plus grands pour le tactile */
    .btn {
        min-height: 38px;
    }

    /* Modals plein écran sur mobile */
    .modal-dialog {
        margin: .5rem;
        max-width: calc(100vw - 1rem);
    }

    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-width: calc(100vw - 1rem);
    }

    /* Tables : scroll horizontal + colonnes facultatives */
    .table-responsive {
        border-radius: 0;
    }

    .col-hide-mobile {
        display: none;
    }

    /* Stat cards : 2 par ligne sur mobile */
    .stat-card .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    /* Cards projets : empiler les colonnes */
    .project-card-body .border-start {
        border-left: none !important;
        border-top: 1px solid #dee2e6;
        padding-left: 0 !important;
        padding-top: 1rem;
        margin-top: 1rem;
    }

    /* Checklist boutons plus grands */
    .checklist-item {
        padding: .6rem .75rem;
    }
}
