
/* =====================================================
   PRECEY - ARRETES MUNICIPAUX
   CSS DU MODULE
   ===================================================== */


/* -----------------------------------------------------
   1. CONTENEUR PRINCIPAL
   ----------------------------------------------------- */

.precey-arretes {
    width: 100%;
    position: relative;
    font-size: 15px;
    color: #333;
}


/* -----------------------------------------------------
   2. FILTRES
   ----------------------------------------------------- */

.precey-arretes-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 30px;
}

.precey-arretes-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
    flex: 1;
}

.precey-arretes-filter label {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.precey-arretes-filter select {
    width: 100%;
    min-height: 48px;
    padding: 10px 40px 10px 14px;
    border: 1px solid #d5dbe1;
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.precey-arretes-filter select:focus {
    outline: none;
    border-color: #2e8b57;
    box-shadow: 0 0 0 2px rgba(46, 139, 87, 0.12);
}


/* -----------------------------------------------------
   3. TABLEAU
   ----------------------------------------------------- */

.precey-arretes-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e8eb;
    border-radius: 6px;
}

.precey-arretes-table {
    width: 100%;
    margin: 0 0 0 0 !important;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
    font-size: 14px;
}

.precey-arretes-table thead {
    background: #f3f5f6;
}

.precey-arretes-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #e2e6e9;
    white-space: nowrap;
}

.precey-arretes-table tbody tr {
    min-height: 65px;
    height: 65px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    font-size: 13px;
}

.precey-arretes-table td {
    padding: 16px 20px !important;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    color: #374151;
    font-weight: 600;	
}

.precey-arretes-table td a {
    display: inline-block;
    padding: 7px 11px;
    border: 1px solid #2e8b57;
    border-radius: 40px;
    color: #2e8b57 !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.precey-arretes-table td a:hover {
    background: #2e8b57;
    color: #fff !important;
}



.precey-arretes-table tbody tr:last-child td {
    border-bottom: none;
}

.precey-arretes-table tbody tr:hover {
    background-color: #f8faf9;
}


/* -----------------------------------------------------
   4. TYPE D'ARRETE
   ----------------------------------------------------- */

.precey-arretes-type {
    display: inline-block;
    padding: 4px 9px;
    margin: 2px 3px 2px 0;
    border-radius: 4px;
    background: #edf5ef;
    color: #28643d;
    font-size: 12px;
    font-weight: 600;
}

.precey-arretes-type-badge {
    display: inline-block;
    padding: 5px 10px;
   background: #eff7f2;
    color: #2b6e44;
    border: 1px solid #2b6e44;
    color: #1f603a;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}


/* -----------------------------------------------------
   5. LIEN PDF
   ----------------------------------------------------- */

.precey-arretes-pdf {
    display: inline-block;
    padding: 7px 11px;
    border: 1px solid #2e8b57;
    border-radius: 4px;
    color: #2e8b57 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.precey-arretes-pdf:hover {
    background: #2e8b57;
    color: #fff !important;
}


/* -----------------------------------------------------
   6. PAGINATION
   ----------------------------------------------------- */

.precey-arretes-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 25px;
}

.precey-arretes-page {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d5dbe1;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.precey-arretes-page:hover,
.precey-arretes-page.is-active {
    border-color: #2e8b57;
    background: #2e8b57;
    color: #fff;
}

.precey-arretes-page.is-active {
    font-weight: 700;
}



/* -----------------------------------------------------
   7. CHARGEMENT
   ----------------------------------------------------- */

.precey-arretes-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    margin-bottom: 15px;
    color: #555;
    font-size: 14px;
}

.precey-arretes-loading[hidden] {
    display: none !important;
}

.precey-arretes-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid #e1e7e3;
    border-top-color: #2e8b57;
    border-radius: 50%;
    animation: precey-arretes-spin 0.8s linear infinite;
}

@keyframes precey-arretes-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Le JavaScript ajoute is-loading au conteneur des résultats. */
.precey-arretes-results-container.is-loading {
    opacity: 0.45;
    pointer-events: none;
}



/* =====================================================
   ARRETES MUNICIPAUX - TABLEAU VIDE
   ===================================================== */

.precey-arretes-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 190px;
    width: 100%;
    box-sizing: border-box;

    margin-top: 15px;
    padding: 35px 20px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;

    color: #6b7280;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
}

.precey-arretes-empty::before {
    content: "📂";
    display: block;
    margin-bottom: 12px;
    font-size: 30px;
    opacity: 0.7;
}

/* =====================================================
   ARRETES MUNICIPAUX - ERREURS
   ===================================================== */

.precey-arretes-error {
    padding: 15px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    text-align: center;
    font-size: 13px;
}



/* -----------------------------------------------------
   9. RESPONSIVE TABLETTE
   ----------------------------------------------------- */

@media (max-width: 980px) {

    .precey-arretes-filters {
        gap: 15px;
    }

    .precey-arretes-filter {
        min-width: 180px;
    }

    .precey-arretes-table {
        min-width: 750px;
    }

}


/* -----------------------------------------------------
   10. RESPONSIVE MOBILE
   ----------------------------------------------------- */

@media (max-width: 767px) {

    .precey-arretes-filter {
        width: 100%;
        min-width: 0;
    }

    .precey-arretes-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 5px;
    }

    .precey-arretes-table {
        min-width: 750px;
        font-size: 13px;
    }

    .precey-arretes-table th,
    .precey-arretes-table td {
        padding: 12px 10px;
    }

    .precey-arretes-pagination {
        gap: 5px;
    }

    .precey-arretes-page {
        min-width: 35px;
        height: 35px;
    }

}
