/* ==========================================================================
   Call to action — rendu front (page catégorie)
   ========================================================================== */

.cta-category {
    margin: 0 0 2rem;
}

.cta-category__row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -8px;
    margin-left: -8px;
}

/* En grille produit, l'espacement est géré par .p-2 de Bootstrap */
.cta-category__col {
    display: flex;
}

.cta-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    min-height: 160px;
    overflow: hidden;
    border-radius: 0;
    background-color: #f4f6f8;
    background-size: cover;
    background-position: center;
    transition: box-shadow .15s ease;
}

/* Carte entièrement cliquable (lien sans bouton) */
.cta-card--clickable {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.cta-card--clickable:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

/* Variante image de fond : voile pour lisibilité du texte */
.cta-card--bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .55) 100%);
}

.cta-card__media {
    line-height: 0;
}
.cta-card__media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.cta-card__body {
    position: relative;
    z-index: 1;
    padding: 16px;
}

/* Texte clair : fond sombre (couleur foncée) ou image de fond */
.cta-card--bg .cta-card__body,
.cta-card--light .cta-card__body {
    color: #fff;
}

.cta-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
}
.cta-card__title p:last-child {
    margin-bottom: 0;
}

.cta-card__btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    background: #1d2a33;
    border: 0;
    border-radius: 0;
    text-decoration: none;
    transition: background .15s ease;
}
.cta-card__btn:hover {
    background: #25b9d7;
    color: #fff;
}

.cta-card--bg .cta-card__btn,
.cta-card--light .cta-card__btn {
    background: #fff;
    color: #1d2a33;
}
.cta-card--bg .cta-card__btn:hover,
.cta-card--light .cta-card__btn:hover {
    background: #25b9d7;
    color: #fff;
}

/* Bloc newsletter intégré dans la carte ------------------------------------ */
.cta-card__newsletter {
    margin-top: 8px;
}
.cta-card__newsletter .block-newsletter,
.cta-card__newsletter .widget {
    margin: 0 !important;
    padding: 0 !important;
}
.cta-card__newsletter .widget-title {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 10px;
}
.cta-card__newsletter form { max-width: 100%; }

/* Reprise du design newsletter du site (footer) : pilule + flèche superposée */
.cta-card__newsletter .input-group-overlay {
    position: relative;
    width: 100%;
    max-width: 340px;
    border-radius: 21px;
    border: 1px solid rgba(255, 255, 255, .4);
}
.cta-card__newsletter .form-control,
.cta-card__newsletter input[type="email"] {
    width: 100%;
    height: 44px;
    padding: 10px 50px 10px 1rem;   /* padding-left 1rem, droite réservée pour la flèche */
    border: 0;
    border-radius: 21px;
    background: none;
    color: inherit;
    font-size: 15px;
    box-shadow: none;
    padding-left: 1rem !important;
}
.cta-card__newsletter .form-control:focus {
    box-shadow: none;
    outline: 0;
}
.cta-card__newsletter .form-control::placeholder {
    color: currentColor;
    opacity: .7;
}
.cta-card__newsletter .input-group-append {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    margin: 0;
    padding-right: 14px;
}
.cta-card__newsletter .input-group-append .btn,
.cta-card__newsletter button[name="submitNewsletter"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
}
.cta-card__newsletter button[name="submitNewsletter"] svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
/* Messages d'alerte compacts */
.cta-card__newsletter .alert {
    margin: 8px 0 0;
    padding: 8px 12px;
    font-size: .85rem;
}

/* Sur fond clair, on force un texte lisible (le widget est prévu clair) */
.cta-card:not(.cta-card--bg):not(.cta-card--light) .cta-card__newsletter .text-light {
    color: #363a41 !important;
}
