/**
 * Styles pour le module Actus Home - Mosaïque d'actualités
 *
 * Layout:
 * - Desktop: 2 colonnes (1 grande à gauche + grille 2x2 à droite)
 * - Tablet: 1 colonne (featured en haut + grille 2x2 en bas)
 * - Mobile: 1 colonne (tout empilé)
 *
 * @package Astra_Child_RGAA
 * @subpackage Actus_Home
 */

/* ========================================
   SECTION PRINCIPALE
======================================== */

.actus-home-container {
    margin: 0 auto;
}

/* ========================================
   HEADER
======================================== */
.actus-home-header {
    margin-bottom: 50px;
    text-align: center;
}

.actus-home-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px 0;
    color: #1f2937;
}

.actus-home-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   MOSAÏQUE LAYOUT - DESKTOP
======================================== */
.actus-home-mosaique {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Colonne gauche : Article à la une */
.actus-home-featured {
    grid-column: 1;
    grid-row: 1;
}

/* Colonne droite : Grille 2x2 */
.actus-home-recent-grid {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
}

/* ========================================
   CARTE À LA UNE (grande carte gauche)
======================================== */
.featured-card {
    position: relative;
    overflow: hidden;
    padding: 1em;
    background: #f7d100;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
}

.featured-card:hover img {
    transform: translateY(-4px);
}

.featured-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    color: inherit;
}

/* Image de la carte à la une */
.featured-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: 13px;
}

.featured-img,
.placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    aspect-ratio: 3/2;
}

.featured-card:hover .featured-img,
.featured-card:hover .placeholder-img {
    transform: scale(1.08);
}

.placeholder-svg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
}

.featured-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    transition: opacity 0.3s ease;
}

.featured-card:hover .featured-image-overlay {
    opacity: 0.8;
}

/* Badge "À la une" */
.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-block;
    padding: 8px 16px;
    background: var(--ast-global-color-0, #0274be);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;

    z-index: 2;
}

/* Contenu de la carte à la une */
.featured-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 0;
}

.featured-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.featured-category {
    display: inline-block;
    padding: 4px 10px;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 40px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: thin solid;
}

.featured-date {
    font-size: 0.875rem;
    color: #9ca3af;
}

.featured-card-title {
    font-size: 1.75rem;
      font-weight: 800 !important;
      line-height: 1.3;
      margin: 0 0 16px 0;
        margin-top: 0px;
        margin-bottom: 16px;
      text-transform: uppercase !important;
}

.featured-card-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 auto 0;
    font-weight: 600;
}

.featured-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
}

.featured-link-text {
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
    color: var(--ast-global-color-0);
}

.featured-card:hover .featured-link-text {
    color: #0256a0;
}

.featured-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #003b48;
    transition: all 0.3s ease;
}

.featured-card:hover .featured-arrow {
    transform: translateX(4px);
}

/* ========================================
   CARTES RÉCENTES (petites cartes droite)
======================================== */
.recent-card {
    position: relative;
    overflow: hidden;
    /*border-radius: 8px;*/
    background: #fff;
    /*box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);*/
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.recent-card:hover img {
    transform: translateY(-3px);
}

.recent-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    color: inherit;
}

/* Image des cartes récentes */
.recent-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 3/2;
    border-radius: 13px;
}

.recent-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-card:hover .recent-img {
    transform: scale(1.05);
}

.recent-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

/*.recent-card:hover .recent-image-overlay {
    background: rgba(0, 0, 0, 0.2);
}*/

/* Badge catégorie */
.recent-category-badge {
    /*position: absolute;
    top: 10px;
    left: 10px;*/
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ast-global-color-1);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 40px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: thin solid;
}

/* Contenu des cartes récentes */
.recent-card-content {
    position: relative;
    /*display: flex;
    flex-direction: column;*/
    flex: 1;
    padding: 1em 0;
    background: #fff;
}

.recent-card-title {
    font-size: 1rem;
    font-weight: 800 !important;
    line-height: 1.4;
    margin: 10px 0 !important;
    color: color: var(--ast-global-color-0) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-date {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: auto;
}

.recent-card-arrow {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #0088a4;
    transition: all 0.3s ease;
}

.recent-card:hover .recent-card-arrow {
    transform: translateX(3px);
}

/* ========================================
   FOOTER BUTTON
======================================== */
.actus-home-footer {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.actus-home-footer-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    background: var(--ast-global-color-0, #0274be);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.actus-home-footer-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 116, 190, 0.3);
}

.button-arrow {
    transition: transform 0.3s ease;
}

.actus-home-footer-button:hover .button-arrow {
    transform: translateX(4px);
}

/* ========================================
   SHORTCODE INTEGRATION
======================================== */
.actus-home-module-wrapper.shortcode-integration {
    /* Styles spécifiques pour intégration via shortcode */
}

/* ========================================
   RESPONSIVE - TABLET (max-width: 1024px)
======================================== */
@media (max-width: 1024px) {
    .actus-home-mosaique {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Featured en haut */
    .actus-home-featured {
        grid-column: 1;
        grid-row: 1;
    }

    /* Grille récents en bas (toujours 2x2) */
    .actus-home-recent-grid {
        grid-column: 1;
        grid-row: 2;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 16px;
    }

    /* Ajuster la hauteur de l'image featured */
    .featured-card-image {
        height: 300px;
    }

    .featured-card-title {
        font-size: 1.5rem;
    }

    .featured-card-excerpt {
        font-size: 0.9375rem;
    }

    .recent-card-image {
        height: 140px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (max-width: 768px)
======================================== */
@media (max-width: 768px) {
    .actus-home-section {
        padding: 40px 0;
    }

    .actus-home-header {
        margin-bottom: 30px;
    }

    .actus-home-title {
        font-size: 2rem;
    }

    .actus-home-subtitle {
        font-size: 1rem;
    }

    .actus-home-mosaique {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Tout en une colonne */
    .actus-home-featured {
        grid-column: 1;
        grid-row: auto;
    }

    .actus-home-recent-grid {
        grid-column: 1;
        grid-row: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 16px;
    }

    /* Featured card */
    .featured-card {
        border-radius: 8px;
    }

    .featured-card-image {
        height: 250px;
    }

    .featured-badge {
        top: 12px;
        left: 12px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .featured-card-content {
        padding: 20px;
    }

    .featured-card-title {
        font-size: 1.375rem;
    }

    .featured-card-excerpt {
        font-size: 0.875rem;
    }

    .featured-card-footer {
        margin-top: 20px;
        padding-top: 16px;
    }

    .featured-link-text {
        font-size: 0.9375rem;
    }

    .featured-arrow {
        width: 36px;
        height: 36px;
    }

    /* Recent cards */
    .recent-card {
        border-radius: 6px;
    }

    .recent-card-image {
        height: 180px;
    }

    .recent-card-content {
        padding: 14px;
    }

    .recent-card-title {
        font-size: 0.9375rem;
    }

    .recent-date {
        font-size: 0.75rem;
    }

    .recent-card-arrow {
        width: 28px;
        height: 28px;
        bottom: 10px;
        right: 10px;
    }

    .recent-card-arrow svg {
        width: 16px;
        height: 16px;
    }

    /* Footer button */
    .actus-home-footer-button {
        width: 100%;
        justify-content: center;
        padding: 12px 24px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE SMALL (max-width: 480px)
======================================== */
@media (max-width: 480px) {
    .actus-home-container {
        padding: 0 16px;
    }

    .actus-home-title {
        font-size: 1.75rem;
    }

    .featured-card-image {
        height: 220px;
    }

    .featured-card-title {
        font-size: 1.25rem;
    }

    .recent-card-image {
        height: 160px;
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */
.featured-card-link:focus-visible,
.recent-card-link:focus-visible {
    outline: 2px solid #0274be;
    outline-offset: 2px;
}

.actus-home-footer-button:focus-visible {
    outline: 2px solid #0274be;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .featured-card,
    .recent-card,
    .featured-img,
    .recent-img,
    .featured-arrow,
    .recent-card-arrow,
    .actus-home-footer-button {
        transition: none;
    }
}

/* ========================================
   PRINT
======================================== */
@media print {
    .featured-arrow,
    .recent-card-arrow,
    .actus-home-footer {
        display: none;
    }
}
