/* ==================================================
   PAGE ANNONCES — ICI DAR BOUAZZA
================================================== */

.annonces-page {
    --annonce-primary: #f3073e;
    --annonce-primary-dark: #d90435;
    --annonce-dark: #151515;
    --annonce-text: #343434;
    --annonce-muted: #777;
    --annonce-border: #e9e9e9;
    --annonce-bg: #f6f7f9;

    padding: 55px 0 75px;
    background:
        radial-gradient(
            circle at top right,
            rgba(243, 7, 62, 0.07),
            transparent 30%
        ),
        var(--annonce-bg);
}

/* ==================================================
   EN-TÊTE
================================================== */

.annonces-header {
    max-width: 100%;
    margin: 0 auto 42px;
    text-align: center;
}

.annonces-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    padding: 8px 16px;
    color: var(--annonce-primary);
    background: rgba(243, 7, 62, 0.09);
    border: 1px solid rgba(243, 7, 62, 0.15);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.annonces-title {
    margin-bottom: 13px;
    color: var(--annonce-dark);
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
}

.annonces-intro {
    margin: 0;
    color: #6b6b6b;
    font-size: 17px;
    line-height: 1.7;
}

/* ==================================================
   CARTE ANNONCE
================================================== */

.card-annonce {
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--annonce-border);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.055);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.card-annonce:hover {
    transform: translateY(-7px);
    border-color: rgba(243, 7, 62, 0.2);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
}

/* ==================================================
   IMAGE
================================================== */

.annonce-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #ececec;
}

.main-img {
    display: block;
    width: 100%;
    height: 245px;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.card-annonce:hover .main-img {
    transform: scale(1.055);
}

.annonce-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.34) 100%
    );
    pointer-events: none;
}

.annonce-category {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    max-width: calc(100% - 155px);
    padding: 7px 12px;
    overflow: hidden;
    color: #252525;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    text-transform: capitalize;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.price-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    padding: 8px 14px;
    color: #fff;
    background: linear-gradient(
        135deg,
        #ff174f,
        var(--annonce-primary-dark)
    );
    border-radius: 50px;
    box-shadow: 0 7px 20px rgba(243, 7, 62, 0.3);
    font-size: 14px;
    font-weight: 800;
}

/* ==================================================
   CONTENU CARTE
================================================== */

.card-annonce .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 23px;
}



.annonce-card-title {
    display: -webkit-box;
    min-height: 53px;
    margin-bottom: 11px;
    overflow: hidden;
    color: var(--annonce-dark);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.annonce-card-description {
    display: -webkit-box;
    min-height: 68px;
    margin-bottom: 19px;
    overflow: hidden;
    color: var(--annonce-muted);
    font-size: 14.5px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* ==================================================
   CONTACT
================================================== */

.annonce-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    margin-bottom: 18px;
    padding: 13px 14px;
    background: #f8f8f8;
    border: 1px solid #ededed;
    border-radius: 13px;
}

.annonce-contact-avatar {
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--annonce-dark),
        #4a4a4a
    );
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
}

.annonce-contact-info {
    min-width: 0;
}

.annonce-contact-label {
    display: block;
    margin-bottom: 2px;
    color: #8a8a8a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.annonce-contact-name {
    display: block;
    overflow: hidden;
    color: #252525;
    font-size: 14px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.annonce-phone {
    margin: 3px 0 0;
    color: var(--annonce-primary);
    font-size: 13px;
    font-weight: 700;
}

.blur-contact {
    filter: blur(5px);
    cursor: pointer;
    user-select: none;
    transition: filter 0.25s ease;
}

.blur-contact:hover {
    filter: blur(3px);
}

.annonce-phone a {
    color: var(--annonce-primary);
    text-decoration: none;
}

/* ==================================================
   BOUTONS
================================================== */

.actions-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 0;
}

.btn-annonce-premium,
.btn-whatsapp-premium {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 13px;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.btn-annonce-premium {
    color: #fff;
    background: linear-gradient(135deg, #08162a, #223858);
    box-shadow: 0 7px 18px #aec5dd;
}

.btn-annonce-premium:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px #aec5dd;
}

.btn-whatsapp-premium {
    color: #fff;
    background: #21c763;
    box-shadow: 0 7px 18px rgba(33, 199, 99, 0.18);
}

.btn-whatsapp-premium:hover {
    color: #fff;
    background: #17af54;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(33, 199, 99, 0.26);
}

/* ==================================================
   AUCUNE ANNONCE
================================================== */

.annonces-empty {
    padding: 55px 25px;
    background: #fff;
    border: 1px solid var(--annonce-border);
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.annonces-empty h3 {
    color: var(--annonce-dark);
    font-weight: 800;
}

.annonces-empty p {
    margin-bottom: 0;
    color: var(--annonce-muted);
}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 991px) {
    .annonces-page {
        padding-top: 45px;
    }

    .main-img {
        height: 230px;
    }
}

@media (max-width: 767px) {
    .annonces-page {
        padding: 35px 0 55px;
    }

    .annonces-header {
        margin-bottom: 30px;
    }

    .annonces-title {
        font-size: 31px;
        letter-spacing: -0.5px;
    }

    .annonces-intro {
        font-size: 15.5px;
    }

    .main-img {
        height: 255px;
    }

    .card-annonce .card-body {
        padding: 20px;
    }

    .annonce-card-title,
    .annonce-card-description {
        min-height: auto;
    }
}

@media (max-width: 420px) {
    .main-img {
        height: 225px;
    }

    .actions-buttons {
        grid-template-columns: 1fr;
    }

    .btn-annonce-premium,
    .btn-whatsapp-premium {
        width: 100%;
    }

    .annonce-category {
        max-width: 150px;
    }
}


/* ==================================================
   FILTRE DES ANNONCES
   Ajouter ce code à la fin de templates/annonces.css
   ================================================== */

.annonces-filter-panel {
    position: relative;
    margin: 0 0 2rem;
    padding: 1.4rem;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(243 7 62 / 10%),
            transparent 34%
        ),
        #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.annonces-filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.annonces-filter-heading h2 {
    margin: 0.25rem 0 0;
    color: #0f172a;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.annonces-filter-eyebrow {
    color: #d90435;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.annonces-results-count {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.95rem;
    border: 1px solid #dc3545;
    border-radius: 999px;
    background: rgba(243, 7, 62, 0.09);
    color: #334155;
    font-size: 0.88rem;
    white-space: nowrap;
}

.annonces-results-count strong {
    color: #d90435;
    font-size: 1rem;
}

.annonces-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: end;
    gap: 0.8rem;
}

.annonces-filter-field {
    min-width: 0;
}

.annonces-filter-field label {
    display: block;
    margin-bottom: 0.45rem;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 700;
}

.annonces-filter-select {
    width: 100%;
    min-height: 50px;
    padding: 0 2.8rem 0 1rem;
    border: 1px solid #ff174f;
    border-radius: 14px;
    outline: none;
    background-color: #f8fafc;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 600;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.annonces-filter-select:focus {
    border-color: #ff174f;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(238 197 216 / 12%);
}

.annonces-filter-submit,
.annonces-filter-reset {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.15rem;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.annonces-filter-submit {
    border: 1px solid #ff174f;
    background: linear-gradient(135deg, #ff174f, #d90435);
    box-shadow: 0 10px 22px rgba(238 197 216 / 12%);
    color: #ffffff;
    cursor: pointer;
}

.annonces-filter-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(238 197 216 / 12%);
}

.annonces-filter-reset {
    border: 1px solid #ff174f;
    background: #ffffff;
    color: #475569;
}

.annonces-filter-reset:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #0f172a;
}

.annonces-active-filter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #edf1f5;
    color: #64748b;
    font-size: 0.88rem;
}

.annonces-active-filter strong {
    color: #d90435;
}

/* ==================================================
   PAGINATION
   ================================================== */

.annonces-pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin: 2.5rem 0 0;
}

.annonces-pagination-info {
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 650;
}

.annonces-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.annonces-pagination a,
.annonces-pagination span {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.78rem;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.annonces-pagination a:hover {
    transform: translateY(-2px);
    border-color: #d90435;
    color: #d90435;
}

.annonces-pagination .active {
    border-color: #d90435;
    background: linear-gradient(135deg, #d90435, #056f31);
    box-shadow: 0 10px 22px rgba(7, 138, 60, 0.22);
    color: #ffffff;
}

.annonces-pagination .pagination-direction {
    padding-right: 1rem;
    padding-left: 1rem;
}

.annonces-pagination .disabled {
    border-color: #edf1f5;
    background: #f8fafc;
    box-shadow: none;
    color: #a0aec0;
    cursor: not-allowed;
}

.annonces-pagination .pagination-dots {
    min-width: 30px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: #94a3b8;
}

@media (max-width: 767.98px) {
    .annonces-filter-panel {
        padding: 1.1rem;
        border-radius: 18px;
    }

    .annonces-filter-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .annonces-results-count {
        white-space: normal;
    }

    .annonces-filter-form {
        grid-template-columns: 1fr;
    }

    .annonces-filter-submit,
    .annonces-filter-reset {
        width: 100%;
    }

    .annonces-pagination {
        gap: 0.35rem;
    }

    .annonces-pagination a,
    .annonces-pagination span {
        min-width: 40px;
        min-height: 40px;
        padding: 0.5rem 0.65rem;
        font-size: 0.84rem;
    }

    .annonces-pagination .pagination-direction {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }
}
