body {
    font-family: Arial, sans-serif;
    /* margin: 20px; */
    background-color: #f9f9f9;
}  

.container {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px #0002;
    padding: 32px 28px;
}

h1 {
    text-align: center;
    color: #1a237e;
    /* margin-bottom: 40px;
    margin-top: 0; */
    font-size: 1.8em;
    /* letter-spacing: 1px; */
    font-weight: 700;
    /* position: relative;
    padding-bottom: 20px; */
}

h2 {
    text-align: center;
    color: #1a237e;
    font-size: 1.4em;
    font-weight: 700;
}

/* h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
} */

.card {
    background: #f9fafd;
    border-radius: 8px;
    box-shadow: 0 1px 6px #0001;
    padding: 22px 35px 16px 20px;
    margin-bottom: 24px;
    border-left: 1px solid #1976d2;
}

.section-title {
    color: #1976d2;
    font-size: 1.18em;
    margin-top: 0;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

label {
    display: block;
    /* margin-top: 14px; */
    font-weight: bold;
    color: #374151;
}

#demanderInspectionForm label {
    margin-top: 14px;
}

input[type="text"], input[type="search"], input[type="email"], textarea {
    width: 100%;
    padding: 9px 10px;
    margin-top: 5px;
    border: 1px solid #bfc9d1;
    border-radius: 4px;
    font-size: 1em;
    background: #f7fafc;
    transition: border 0.2s;
}
input[type="text"]:focus, input[type="search"]:focus, input[type="email"]:focus, textarea:focus {
    border: 1.5px solid #1976d2;
    outline: none;
    background: #fff;
}
textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    font-size: inherit; 
}

.row {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    margin-top: 0;
}
.col-cp {
    flex: 0 0 120px;
    min-width: 90px;
}
.col-ville {
    flex: 1;
    min-width: 120px;
}
.col-half {
    flex: 1;
}
.col-third {
    flex: 1;
    min-width: 120px;
}

button {
    margin-top: 18px;
    width: 100%;
    padding: 13px 0;
    background: linear-gradient(90deg, #1976d2 60%, #42a5f5 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.13em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px #1976d220;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.1s;
}
button:hover {
    background: linear-gradient(90deg, #1565c0 60%, #1976d2 100%);
    transform: scale(1.03);
}

.badge-wrapper {
    position: relative;
    display: inline-block;
}

.badge-wrapper img {
    display: block;
}

.badge {
    position: absolute;
    bottom: 0;
    right: 0;
    transform: translate(25%, 30%);
    background: rgb(29, 36, 114);
    color: white;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
    font-family: sans-serif;
}


@media (max-width: 800px) {
    .container {
        max-width: 98vw;
        padding: 14px 2vw;
    }
    .card {
        padding: 18px 6vw 12px 3vw;
    }
}
@media (max-width: 600px) {
    .row {
        flex-direction: column;
        gap: 0;
    }
    .col-cp, .col-ville, .col-half, .col-third {
        min-width: 0;
        width: 100%;
    }
    .card {
        padding: 12px 3vw 8px 3vw;
    }
}

/* --- TABLEAU DES INSPECTIONS --- */
.inspections-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 40px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-size: 1em;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inspections-table th, .inspections-table td {
    padding: 10px 18px;
    text-align: left;
}

.inspections-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* .inspections-table th {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 700;
    font-size: 1.15em;
    border-bottom: none;
    letter-spacing: 0.6px;
    text-align: left;
    padding-top: 18px;
    padding-bottom: 18px;
    vertical-align: middle;
    transition: all 0.3s ease;
    text-transform: uppercase;
} */

.inspections-table button {
    background: unset;
}

/* Amélioration de la lisibilité des titres lors du tri simple-datatables */
.dataTable-sorter, .datatable-sorter {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.15em;
    letter-spacing: 0.6px;
    vertical-align: middle;
    text-transform: uppercase;
}

.inspections-table th.is-sorted, .inspections-table th.is-sorted-desc, .inspections-table th.is-sorted-asc {
    background: linear-gradient(135deg, #5568d3 0%, #6a3a8a 100%) !important;
    color: #fff !important;
    filter: brightness(0.95);
}

.inspections-table th:hover, .inspections-table th:focus {
    background: linear-gradient(135deg, #5568d3 0%, #6a3a8a 100%);
    color: #fff;
    cursor: pointer;
    filter: brightness(1.05);
}

.inspections-table tbody tr {
    border-bottom: 1px solid #f0f2f7;
    transition: all 0.25s ease;
}

.inspections-table tbody tr:hover {
    background: #f9faff;
    box-shadow: inset 0 0 8px rgba(102, 126, 234, 0.05);
}

.inspections-table tbody tr:nth-child(odd) {
    background: #fafbff;
}

.inspections-table td {
    color: #2d3748;
    vertical-align: middle;
    font-weight: 500;
}

.inspections-table td:last-child {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inspections-table a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}
.inspections-table a:hover {
    color: #0d47a1;
    text-decoration: none;
    font-weight: 600;
}

/* Styles des icônes d'action */
.actionIco, .actionIco-grey {
    width: 28px;
    height: 28px;
    display: inline-block;
    transition: all 0.25s ease;
    filter: brightness(0.95);
}

.actionIco {
    cursor: pointer;
}

.actionIco:hover {
    transform: scale(1.15) rotate(5deg);
    filter: brightness(1.2) drop-shadow(0 2px 4px rgba(25, 118, 210, 0.3));
}

.actionIco-grey {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .inspections-table th, .inspections-table td {
        padding: 12px 14px;
        font-size: 0.95em;
    }

    .inspections-table th {
        font-size: 1em;
    }

    .actionIco, .actionIco-grey {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 700px) {
    .inspections-table th, .inspections-table td {
        padding: 10px 8px;
        font-size: 0.9em;
    }

    .inspections-table th {
        font-size: 0.9em;
        padding: 12px 8px;
    }

    .inspections-table td:last-child {
        gap: 4px;
    }

    .actionIco, .actionIco-grey {
        width: 20px;
        height: 20px;
    }
}

.actionIco {
    width: 24px;
    margin: 0 5px;
}

.actionIco-grey {
    width: 24px;
    margin: 0 5px;
    filter: grayscale(100%); 
    opacity: 0.3;
}

/* --- MENU DÉROULANT --- */
.dropdown-menu {
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: flex-start;
    padding: 0 0 0 0.5em;
    margin-bottom: 18px;

}
.dropdown-toggle {
    background: #1976d2;
    border: none;
    border-radius: 7px;
    padding: 10px 13px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s;
    box-shadow: 0 2px 8px #0001;
    margin-top: 10px;
        width: unset;
}
.dropdown-toggle .bar {
    display: block;
    width: 28px;
    height: 3.5px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}
.dropdown-toggle.open .bar:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}
.dropdown-toggle.open .bar:nth-child(2) {
    opacity: 0;
}
.dropdown-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}
.dropdown-content {
    display: none;
    position: absolute;
    left:62px;
    top: 5px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px #0002;
    min-width: 210px;
    padding: 10px 0 10px 0;
    list-style: none;
    margin: 0;
    border: 1px solid #e3eaf6;
    animation: fadeInMenu 0.22s;
}
.dropdown-content.open {
    display: block;
}
.dropdown-content li {
    margin: 0;
    padding: 0;
}
.dropdown-content a {
    display: block;
    padding: 12px 22px;
    color: #1a237e;
    text-decoration: none;
    font-size: 1.05em;
    transition: background 0.15s, color 0.15s;
}
.dropdown-content a:hover {
    background: #e3eaf6;
    color: #1976d2;
}
@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
    /* .dropdown-content {
        right: 50%;
        left: 50%;
        transform: translateX(-50%);
        min-width: 160px;
    } */
    /* .dropdown-menu {
        justify-content: center;
        padding: 0;
    } */
}
