/* ===========================
   SECTION GLOBALE
   =========================== */

.tm-ac-section {
    border-radius: 32px;
    padding: 40px 36px 44px;
    background: linear-gradient(180deg, #e1f2ff 0%, #c8e4ff 100%);
}

/* Titre de section */
.tm-ac-section__title {
    text-align: center;
    font-size: 1.5rem;
    margin: 0 0 28px;
    color: #2c5f9e;
    font-weight: 600;
}

/* Contenu de la section (carte vedette + grille) */
.tm-ac-section__content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ===========================
   STRUCTURE DES CARTES
   =========================== */

/* Wrapper générique d’une carte (pas de bordure externe) */
.tm-ac-card {
    position: relative;
    border-radius: 24px;
    padding: 0;
    background: none;
}

/* Conteneur interne réel (fond bleu) */
.tm-ac-card__inner {
    display: flex;
    flex-direction: row;
    gap: 20px;
    border-radius: 20px;
    padding: 22px 28px;
    background: #6397d6;     /* bleu intérieur uniforme */
    align-items: stretch;
    color: #ffffff;          /* texte blanc par défaut */
    position: relative;      /* pour bouton + overlay */
}

/* Image à gauche (cas par défaut) */
.tm-ac-card__image-wrap {
    flex: 0 0 40%;
    max-width: 40%;
}

.tm-ac-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

/* Colonne texte */
.tm-ac-card__content-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* En-tête : titre + (ligne du haut) */
.tm-ac-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

/* Titre générique de carte */
.tm-ac-card__title {
    margin: 0 0 10px;
    color: #ffffff;
}

/* Texte / description */
.tm-ac-card__excerpt p {
    margin: 0 0 12px;
    color: #ffffff;
}

/* Meta “Publié par” / dates */
.tm-ac-card__meta {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #ffffff;
}

.tm-ac-card__meta-label {
    font-weight: 600;
}

.tm-ac-card__meta-value {
    margin-left: 4px;
    color: #ffffff;
}

/* ===========================
   BOUTON CIRCULAIRE
   =========================== */

/* Style de base du bouton (couleur unie) */
.tm-ac-card__cta {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #7fd4ff;   /* UNIFORME, plus de dégradé */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.18);
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

.tm-ac-card__cta-icon {
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
}

.tm-ac-card__cta:hover {
    transform: scale(1.06);
    box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.25);
}

/* Bouton spécifique carte vedette :
   en HAUT à DROITE de la carte */
.tm-ac-card--featured .tm-ac-card__inner {
    min-height: 230px;
    padding-right: 90px; /* réserve pour le bouton à droite */
}

.tm-ac-card--featured .tm-ac-card__cta {
    position: absolute;
    top: 22px;
    right: 28px;
    transform: none;      /* pas de translation verticale */
}

/* ===========================
   GRILLE DES PETITES CARTES
   =========================== */

.tm-ac-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Petites cartes : colonne (image en haut, texte en bas) */
.tm-ac-card--small .tm-ac-card__inner {
    flex-direction: column;
    padding: 16px 20px 22px;
}

/* Image des petites cartes : pleine largeur */
.tm-ac-card--small .tm-ac-card__image-wrap {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
}

.tm-ac-card--small .tm-ac-card__image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 18px;
}

/* Contenu des petites cartes */
.tm-ac-card__date {
    font-size: 0.9rem;
    color: #ffffff;
    opacity: 0.9;
    margin-bottom: 6px;
}

.tm-ac-card--small .tm-ac-card__title {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.tm-ac-card--small .tm-ac-card__excerpt p {
    font-size: 0.9rem;
    color: #ffffff;
    line-height: 1.5;
}

/* Overlay cliquable pour toute la carte (petites cartes) */
.tm-ac-card__link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Contenu par-dessus l’overlay */
.tm-ac-card__inner {
    z-index: 2;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 980px) {
    .tm-ac-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .tm-ac-section {
        padding: 28px 18px 32px;
    }

    .tm-ac-card__inner {
        flex-direction: column;
        padding-right: 28px; /* évite que le texte colle au bord */
    }

    .tm-ac-card__image-wrap {
        max-width: 100%;
        flex-basis: auto;
    }

    .tm-ac-grid {
        grid-template-columns: 1fr;
    }

    /* Sur mobile, on rapproche le bouton du coin mais pas trop bas */
    .tm-ac-card--featured .tm-ac-card__inner {
        padding-right: 64px;
    }

    .tm-ac-card--featured .tm-ac-card__cta {
        top: 20px;
        right: 18px;
    }
}
