/* assets/css/gestnav.css */

:root {
    --gn-primary: #003a64;     /* bleu foncé aviation */
    --gn-primary-light: #0a548b;
    --gn-accent: #f0a500;      /* rappel soleil/orange */
    --gn-bg: #e5e7eb;          /* gris accentué pour le fond */
    --gn-text: #1a202c;
    --gn-muted: #4a5568;
    --gn-card-bg: #ffffff;
    --gn-border: #cbd5e0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* iOS tap highlight fix */
a, button, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling iOS */
html {
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--gn-bg);
    color: var(--gn-text);
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height pour iOS Safari */
    min-height: -webkit-fill-available;
    margin: 0;
    padding: 0;
    /* Safe area pour iPhone avec encoche */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Global iOS input fixes - IMPORTANT: font-size 16px pour éviter zoom auto sur iPhone */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    font-size: 16px !important;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0; /* iOS default reset */
}

/* Restore native appearance for checkboxes and radios */
input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: checkbox;
    appearance: auto;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

input[type="radio"] {
    -webkit-appearance: radio;
}

/* Restore border-radius for form controls */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    border-radius: 0.375rem;
}

/* iOS select arrow fix */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
}

/* NAVBAR */

.gn-navbar {
    background: linear-gradient(90deg, var(--gn-primary) 0%, var(--gn-primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: -webkit-sticky; /* Safari iOS */
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Safe area pour iPhone avec encoche */
    padding-top: env(safe-area-inset-top);
}

/* Machines & équipages (sortie_info) */
.machines-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; justify-content: start; }
@media (max-width: 1200px) { .machines-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .machines-grid { grid-template-columns: 1fr; } }
.machine-card { border: 1px solid #e6ebf2; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: transform .1s ease, box-shadow .1s ease; }
.machine-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,0.09); }
.machine-photo { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; display: block; }
.machine-header { display:flex; align-items: baseline; justify-content: space-between; gap:.5rem; }
.immatriculation-badge { display:inline-flex; align-items:center; padding: .2rem .55rem; border-radius: 999px; border:1px solid #d0d7e2; font-size:.75rem; color:#5b6b7c; background:#f6f8fa; }
.roles-list { margin-top:.5rem; }
.roles-list .list-group-item { border: 1px solid #edf2f7; }
.role-badge { display:inline-flex; align-items:center; gap:.35rem; padding:.22rem .55rem; border-radius:999px; font-size:.75rem; font-weight:600; }
.sortie-info-bar { display:flex; flex-wrap: wrap; align-items:center; justify-content: space-between; gap:.5rem; padding:.5rem .8rem; background:#f8fafc; border:1px solid #e6ebf2; border-radius:8px; margin-bottom:.75rem; }
.sortie-info-bar .title { font-weight:600; font-size:1rem; }
.sortie-info-bar .meta { display:flex; gap:.5rem; flex-wrap:wrap; }
.role-pilote { background:#eaf3ff; color:#0b5cab; border:1px solid #cfe1fb; }
.role-copilote { background:#f0f7ff; color:#004b8d; border:1px solid #cfe1fb; }
.role-valider { background:#fff7e6; color:#9a6700; border:1px solid #f1c76e; }
.aff-anchor:target { outline: 2px solid #00a0c6; outline-offset: 2px; }
.gn-detail-item { margin-top: 0.5rem; }
.gn-detail-label { font-weight: 600; color: #444; }
.gn-badge-pill { display:inline-block; padding:0.15rem 0.5rem; border-radius:999px; font-size:0.85rem; border:1px solid #e6ebf2; }
.gn-badge-km { background:#eef3ff; color:#1e4dd8; border-color:#dbe2ff; }
.gn-badge-eta { background:#f0f7ff; color:#0b5cab; border-color:#d9ecff; }
.gn-note-org { padding:0.6rem 0.8rem; border:1px solid #f0d48a; background:#fff8e1; border-radius:0.75rem; color:#6b5800; }
.gn-photos-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:0.75rem; margin-top:0.5rem; }
.gn-photos-grid img { width:100%; border-radius:0.75rem; display:block; object-fit:cover; max-height:140px; }
.gn-inscrit-item { display:flex; justify-content:space-between; padding:0.3rem 0; border-bottom:1px solid #eef1f7; }
.gn-inscrit-item:last-child { border-bottom:none; }
.gn-inscrit-name { font-weight:500; }
.gn-inscrit-email { color:#666; font-size:0.85rem; }

.gn-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.gn-navbar .navbar-brand span {
    font-weight: 400;
    opacity: 0.85;
    font-size: .9rem;
}

.gn-navbar .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: .5rem .9rem;
    border-radius: 999px;
    transition: background .2s ease, transform .1s ease;
    font-size: .95rem;
    /* iOS touch target minimum */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.gn-navbar .nav-link:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

.gn-navbar .nav-link.active {
    background: rgba(255,255,255,0.2);
}

/* Bouton menu mobile en blanc */
.navbar-toggler {
    border-color: rgba(255,255,255,0.5) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Bouton retour homepage mobile en blanc */
.navbar-collapse .btn-outline-light {
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.6) !important;
}

.navbar-collapse .btn-outline-light:hover {
    background-color: rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
}

.gn-navbar-user {
    font-size: .9rem;
    color: rgba(255,255,255,0.85);
}

/* LAYOUT */

.gn-wrapper {
    max-width: 1400px;
    margin: 0.75rem auto 2rem;
    padding: 0 1.5rem;
}

/* ADMIN LAYOUT */

.gn-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gn-page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gn-primary);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.gn-page-subtitle {
    color: var(--gn-muted);
    font-size: .95rem;
}

/* HERO DASHBOARD (accueil) */

.gn-hero {
    background: linear-gradient(135deg, rgba(0,58,100,0.92), rgba(240,165,0,0.60)),
                url("../img/Ulm.jpg") center/cover no-repeat;
    border-radius: 1.4rem;
    padding: 1.8rem 1.8rem;
    color: #fff;
    margin-bottom: 1.8rem;
    position: relative;
    overflow: visible;
    box-shadow: 0 10px 30px rgba(0,0,0,0.22);
    min-height: 200px;
    display: block;
}


.gn-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.3), transparent 55%);
    pointer-events: none;
}

.gn-hero-content {
    position: relative;
    max-width: 420px;
    z-index: 1;
}

.gn-hero-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: .4rem;
}

.gn-hero-text {
    font-size: .95rem;
    opacity: 0.92;
}

.gn-hero-badges {
    margin-top: .8rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.gn-badge {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-radius: 999px;
    padding: .25rem .6rem;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(0,0,0,0.12);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: white;
}

/* CARDS */

.gn-card {
    background: var(--gn-card-bg);
    border: 1px solid var(--gn-border);
    border-radius: 1.1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--gn-border);
    box-shadow: 0 10px 30px rgba(15,23,42,0.06);
    padding: 1.25rem 1.4rem;
    margin-bottom: 1rem;
}

.gn-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .8rem;
}

.gn-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gn-primary);
    display: flex;
    align-items: center;
    gap: .4rem;
}

.gn-card-subtitle {
    font-size: .8rem;
    color: var(--gn-muted);
}

/* TABLES */

.gn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.gn-table th,
.gn-table td {
    padding: .55rem .6rem;
    border-bottom: 1px solid var(--gn-border);
}

.gn-table th {
    text-align: left;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gn-muted);
    background: #f9fafb;
}

.gn-table tr:nth-child(even) td {
    background: #fafbff;
}

.gn-table tr:hover td {
    background: #eef5ff;
}

/* FORMULAIRES */

.gn-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.gn-form-group label {
    display: block;
    font-size: .85rem;
    margin-bottom: .2rem;
    color: var(--gn-muted);
}

.gn-form-group input,
.gn-form-group select,
.gn-form-group textarea {
    width: 100%;
    padding: .4rem .55rem;
    border-radius: .55rem;
    border: 1px solid var(--gn-border);
    font-size: 16px; /* IMPORTANT: 16px minimum pour éviter zoom auto iOS */
    outline: none;
    transition: border .15s ease, box-shadow .15s ease;
    /* iOS input styling fixes */
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
}

.gn-form-group input:focus,
.gn-form-group select:focus,
.gn-form-group textarea:focus {
    border-color: var(--gn-primary-light);
    box-shadow: 0 0 0 2px rgba(0,58,100,0.12);
}

/* BOUTONS */

.gn-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border-radius: 999px;
    border: none;
    padding: .45rem 1.1rem;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: transform .1s ease, box-shadow .15s ease, background .15s ease;
    /* iOS touch target minimum 44px */
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.gn-btn-primary {
    background: var(--gn-accent);
    color: #1f2933;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.gn-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}

.gn-btn-outline {
    background: transparent;
    color: var(--gn-primary);
    border: 1px solid var(--gn-primary-light);
}

.gn-btn-outline:hover {
    background: rgba(0,58,100,0.06);
}

/* CARTE LEAFLET */

.map-wrapper {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
    background: #f0f2f5;
}

#map {
    width: 100%;
    height: 100%;
}

/* ANNUAIRE MEMBRES */

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
    padding: 1rem 0;
}

@media (max-width: 1200px) {
    .members-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .members-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

.member-card {
    background: var(--gn-card-bg);
    border: 1px solid var(--gn-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.member-photo-wrapper {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gn-primary-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gn-text);
}

.member-lastname {
    font-size: 0.95rem;
    color: var(--gn-muted);
    margin-bottom: 0.5rem;
}

.member-qualification {
    margin: 0.5rem 0;
}

.badge-qualification {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

.qualification-pilot {
    background: #dbeafe;
    color: #1e40af;
}

.qualification-student {
    background: #fef3c7;
    color: #92400e;
}

.member-contact {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.contact-item i {
    color: var(--gn-primary);
    font-size: 0.85rem;
}

.contact-item a {
    color: var(--gn-primary);
    text-decoration: none;
    word-break: break-word;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* FOOTER */

.gn-footer {
    text-align: center;
    font-size: .8rem;
    color: var(--gn-muted);
    padding: 1rem 0 1.4rem;
    /* Safe area pour iPhone avec barre home */
    padding-bottom: calc(1.4rem + env(safe-area-inset-bottom));
}

/* Lien utilisateur dans navbar */
.gn-user-link {
    transition: all 0.2s;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.gn-user-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ================================================
   FIX DROPDOWN BOOTSTRAP SUR iOS/MOBILE
   ================================================ */

/* Dropdown menu - meilleur comportement mobile */
.dropdown-menu {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Sur mobile : dropdown scrollable avec hauteur max */
@media (max-width: 991.98px) {
    /* Dropdown admin en scroll */
    .navbar .dropdown-menu {
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        margin: 0;
        padding: 0.5rem 0;
    }
    
    /* Items plus grands pour touch */
    .navbar .dropdown-item {
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Séparateurs plus visibles */
    .navbar .dropdown-divider {
        margin: 0.5rem 0;
        border-color: rgba(0,0,0,0.1);
    }
    
    /* Toggle dropdown plus accessible */
    .navbar .dropdown-toggle {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Fix pour éviter le blocage du scroll body quand dropdown ouvert */
    .navbar-collapse.show {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .dropdown-menu {
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
    }
    
    .navbar .dropdown-menu.show {
        animation: none;
    }
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .gn-hero {
        padding: 1.5rem 1rem !important;
        margin-bottom: 1.5rem !important;
        min-height: auto !important;
        border-radius: 1rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
    }
    
    .gn-hero-content {
        max-width: 100% !important;
        display: block !important;
    }
    
    .gn-hero-title {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }
    
    .gn-hero-text {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-top: 0.5rem !important;
        margin-bottom: 1rem !important;
        display: block !important;
    }
    
    .gn-hero-badges {
        margin-top: 1.25rem !important;
        gap: 0.5rem !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }
    
    .gn-badge {
        font-size: 0.65rem !important;
        padding: 0.5rem 0.6rem !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.25rem !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        min-height: 36px !important;
        color: white !important;
        text-decoration: none !important;
    }
    
    .gn-badge i {
        font-size: 0.75rem !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 480px) {
    .gn-hero {
        padding: 1.25rem 1rem !important;
    }
    
    .gn-hero-title {
        font-size: 1.4rem !important;
    }
    
    .gn-hero-text {
        font-size: 0.85rem !important;
    }
    
    .gn-hero-badges {
        grid-template-columns: 1fr !important;
    }
    
    .gn-badge {
        font-size: 0.7rem !important;
        padding: 0.6rem 1rem !important;
        min-height: 40px !important;
    }
}

/* ================================================
   PAGES DE LOGS - STYLES RESPONSIVE MOBILE
   ================================================ */

/* Stats cards en grille 2x2 sur tablette, 1 colonne sur mobile */
@media (max-width: 991.98px) {
    .container-fluid.mt-4 > .row.g-3.mb-4 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    .container-fluid.mt-4 > .row.g-3.mb-4 > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
}

@media (max-width: 575.98px) {
    .container-fluid.mt-4 > .row.g-3.mb-4 {
        grid-template-columns: 1fr !important;
    }
}

/* Titres de page sur mobile */
@media (max-width: 767.98px) {
    .container-fluid.mt-4 > .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    .container-fluid.mt-4 > .d-flex h1 {
        font-size: 1.4rem !important;
    }
}

/* Formulaires de filtres en stack sur mobile */
@media (max-width: 767.98px) {
    .gn-card .p-4 form.row.g-3 {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .gn-card .p-4 form.row.g-3 > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    /* Boutons de filtres en pleine largeur */
    .gn-card .p-4 form.row.g-3 > [class*="col-"].d-flex {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .gn-card .p-4 form.row.g-3 > [class*="col-"].d-flex .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Tables de logs - vue carte sur mobile */
@media (max-width: 767.98px) {
    /* Masquer la table et utiliser un affichage carte */
    .gn-card .table-responsive {
        overflow-x: visible !important;
    }
    
    .gn-card .table-responsive table.table {
        display: block !important;
    }
    
    .gn-card .table-responsive table.table thead {
        display: none !important;
    }
    
    .gn-card .table-responsive table.table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 0.5rem !important;
    }
    
    .gn-card .table-responsive table.table tbody tr {
        display: block !important;
        background: #f9fafb !important;
        border-radius: 0.75rem !important;
        padding: 1rem !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    }
    
    .gn-card .table-responsive table.table tbody tr td {
        display: flex !important;
        flex-wrap: wrap !important;
        padding: 0.35rem 0 !important;
        border-bottom: none !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }
    
    .gn-card .table-responsive table.table tbody tr td::before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #6b7280 !important;
        font-size: 0.8rem !important;
        min-width: 80px !important;
        flex-shrink: 0 !important;
    }
    
    /* Logs affectations table custom */
    .logs-table {
        display: block !important;
    }
    
    .logs-table thead {
        display: none !important;
    }
    
    .logs-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .logs-table tbody tr {
        display: block !important;
        background: #f9fafb !important;
        border-radius: 0.75rem !important;
        padding: 1rem !important;
        border: 1px solid #e5e7eb !important;
    }
    
    .logs-table tbody tr td {
        display: block !important;
        padding: 0.3rem 0 !important;
        border-bottom: none !important;
    }
}

/* Log header responsive */
@media (max-width: 575.98px) {
    .logs-header {
        flex-direction: column !important;
        text-align: center !important;
        padding: 1.25rem !important;
    }
    
    .logs-header h1 {
        font-size: 1.3rem !important;
    }
    
    .logs-header-icon {
        font-size: 2rem !important;
    }
}

/* Pagination mobile */
@media (max-width: 575.98px) {
    .pagination {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.25rem !important;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
        min-width: 40px !important;
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Cards de stats logs compactes sur mobile */
@media (max-width: 575.98px) {
    .card.border-primary .card-body,
    .card.border-info .card-body,
    .card.border-warning .card-body,
    .card.border-success .card-body {
        padding: 0.75rem !important;
    }
    
    .card.border-primary .card-body h3,
    .card.border-info .card-body h3,
    .card.border-warning .card-body h3,
    .card.border-success .card-body h3 {
        font-size: 1.3rem !important;
    }
    
    .card.border-primary .card-body h6,
    .card.border-info .card-body h6,
    .card.border-warning .card-body h6,
    .card.border-success .card-body h6 {
        font-size: 0.75rem !important;
    }
    
    /* Stats h2 sur mobile */
    .card.border-primary .card-body h2,
    .card.border-info .card-body h2,
    .card.border-warning .card-body h2,
    .card.border-success .card-body h2 {
        font-size: 1.5rem !important;
    }
}

/* Stats connexions - responsive additions */
@media (max-width: 767.98px) {
    /* Progress bar mobile - texte lisible */
    .progress[style*="height: 40px"] {
        height: 60px !important;
        flex-direction: column !important;
    }
    
    .progress[style*="height: 40px"] .progress-bar {
        width: 100% !important;
        height: auto !important;
        min-height: 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.85rem !important;
    }
    
    /* Card header avec bouton mobile */
    .card-header.d-flex {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: flex-start !important;
    }
    
    .card-header.d-flex .btn {
        width: 100% !important;
    }
    
    /* Alert mobile */
    .alert {
        font-size: 0.9rem !important;
        padding: 0.75rem !important;
    }
    
    /* Table sm responsive */
    .table-sm.table-hover tbody tr td,
    .table-striped.table-hover tbody tr td {
        display: flex !important;
        padding: 0.5rem 0 !important;
        border-bottom: none !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }
    
    .table-sm.table-hover tbody tr td::before,
    .table-striped.table-hover tbody tr td::before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #6b7280 !important;
        font-size: 0.8rem !important;
        min-width: 70px !important;
    }
    
    .table-sm.table-hover thead,
    .table-striped.table-hover thead {
        display: none !important;
    }
    
    .table-sm.table-hover tbody,
    .table-striped.table-hover tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .table-sm.table-hover tbody tr,
    .table-striped.table-hover tbody tr {
        display: block !important;
        background: #f9fafb !important;
        border-radius: 0.5rem !important;
        padding: 0.75rem !important;
        border: 1px solid #e5e7eb !important;
    }
    
    /* Fix text-end on mobile */
    .table-sm.table-hover tbody tr td.text-end {
        text-align: left !important;
    }
}
