/* ============================
   RESET & BASE
============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #222;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* Fond dynamique */
.dynamic-bg {
    background-image: var(--bg-url);
}

/* ============================
   HERO BOX
============================ */
.hero-box,
#center-box {
    max-width: 420px;
    margin: 40px auto;
    padding: 25px;
    background: rgba(130, 130, 130, 0.88);
    border-radius: 14px;
    box-shadow: 0 0 14px rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
    text-align: center;
}

.hero-box h1,
.hero-box h2,
#center-box h1,
#center-box h2 {
    margin-bottom: 18px;
    font-weight: 700;
    color: #222;
}

/* ============================
   INPUTS
============================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    margin: 10px 0 15px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

/* ============================
   BOUTONS
============================ */
.btn,
.menu-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 10px 0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: 0.2s;
}

.btn-blue,
.menu-btn {
    background: #007bff;
    color: white;
}
.btn-blue:hover,
.menu-btn:hover {
    color: #000;
}

.btn-danger,
.logout-btn {
    background: #ff4d4d;
    color: white;
}
.btn-danger:hover,
.logout-btn:hover {
    background: #d93636;
}

/* ============================
   LIENS
============================ */
a {
    color: #007bff;
}
a:hover {
    color: #005fcc;
}

/* ============================
   RESPONSIVE DE BASE
============================ */
@media (max-width: 480px) {
    .hero-box,
    #center-box {
        margin: 20px;
        padding: 20px;
    }
}

/* ============================
   PANELS & GRID
============================ */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

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

.panel {
    background: rgba(255, 255, 255, 0.85);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ============================
   TABLEAU VEHICULES
============================ */
.vehicules-table {
    width: 100%;
    border-collapse: collapse;
}

.actions-cell {
    position: relative;
    width: 40px;
}

.table-row {
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background-color: rgba(0, 120, 255, 0.15);
}

.delete-icon {
    position: absolute;
    right: 8px;
    bottom: 6px;
    color: #cc0000;
    font-size: 18px;
    text-decoration: none;
    opacity: 0.8;
}

.delete-icon:hover {
    opacity: 1;
}

/* ============================
   SMARTPHONE FRIENDLY (fusion optimisée)
============================ */
@media (max-width: 600px) {

    /* Conteneurs */
    .hero-box, #center-box {
        max-width: 95%;
        width: 95%;
        margin: 10px auto;
        padding: 20px;
        border-radius: 12px;
        font-size: 1.15rem;
    }

    /* Titres */
    .hero-box h1, .hero-box h2,
    #center-box h1, #center-box h2 {
        font-size: 1.4rem;
        margin-bottom: 14px;
    }

    /* Inputs */
    input[type="file"],
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select {
        width: 100%;
        font-size: 1.15rem;
        padding: 14px;
        margin-bottom: 14px;
        border-radius: 10px;
    }

    /* Boutons */
    .btn, .menu-btn {
        font-size: 1.25rem;
        padding: 16px;
        border-radius: 10px;
        margin-top: 12px;
    }

    /* Tableaux scrollables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }

    table {
        width: 700px; /* largeur virtuelle pour scroll */
        font-size: 1rem;
    }

    th, td {
        padding: 10px 6px;
        font-size: 1rem;
    }

    /* Icône suppression */
    .delete-icon {
        font-size: 26px;
        right: 4px;
        bottom: 4px;
    }
}