/* ============================================================
   lc_news — Bloc home style Culture Velo (version aeree)
   Layout : banniere carree a gauche + liste aeree de titres a droite.
   Couleurs configurables via CSS variables injectees inline par le template :
     --lcn-bg          fond de la section
     --lcn-item-bg     fond de la liste d'articles
     --lcn-banner-bg   fond de la banniere (si pas d'image)
     --lcn-item-title  couleur du titre des articles
     --lcn-item-date   couleur de la date / du magasin
   ============================================================ */

.lc-news-home-block {
    padding: 50px 15px 40px 15px;
    background: var(--lcn-bg, #ffffff);
    /* Fond pleine largeur ecran : on fait deborder le bloc de son conteneur
       limite, tout en gardant le .container interne centre. */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Conteneur interne cale sur les autres sections de la home (max 1200 + 15px),
   pour que l'image et les blocs aient la meme largeur que "Autres produits". */
.lc-news-home-block > .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.lc-news-home-header {
    margin-bottom: 32px;
    text-align: center;
}

.lc-news-home-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #414142;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.lc-news-home-title strong,
.lc-news-home-title b {
    font-weight: 700;
}

.lc-news-home-subtitle {
    color: #888;
    margin: 0;
    font-size: 0.95rem;
}

.lc-news-home-layout {
    display: grid;
    /* Colonne banniere en 'auto' : largeur dictee par le carre (cale sur la hauteur). */
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: stretch;
}

/* Si pas de banniere : la liste prend toute la largeur */
.lc-news-home-layout.lc-news-home-no-banner {
    grid-template-columns: 1fr;
}

/* ---------- BANNIERE GAUCHE (carre) ---------- */

.lc-news-home-banner {
    position: relative;
    display: block;
    /* Carre parfait cale sur la hauteur du bloc (= hauteur de la liste) */
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--lcn-banner-bg, #003c5b);
    background-size: cover;
    background-position: center;
    text-decoration: none;
    color: #fff;
    transition: box-shadow 0.2s;
}

.lc-news-home-banner:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #fff;
}

.lc-news-home-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
}

.lc-news-home-banner-text {
    margin-bottom: 18px;
}

.lc-news-home-banner-title {
    margin: 0 0 2px 0;
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.25;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.lc-news-home-banner-title strong,
.lc-news-home-banner-title b {
    color: #fff;
    font-weight: 700;
}

.lc-news-home-banner-subtitle {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 400;
    color: #fff;
    line-height: 1.25;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.lc-news-home-banner-subtitle strong,
.lc-news-home-banner-subtitle b {
    font-weight: 700;
}

.lc-news-home-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: rgba(255, 255, 255, 0.95);
    color: #414142;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
    transition: background 0.15s;
}

.lc-news-home-banner:hover .lc-news-home-banner-btn {
    background: #fff;
}

/* ---------- LISTE AEREE DROITE (cartes espacees) ---------- */

.lc-news-home-list {
    list-style: none;
    padding: 0;
    margin: 0;
    /* Chaque item est une carte distincte : on espace via gap (flex column) */
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
}

.lc-news-home-list > .lc-news-home-item,
.lc-news-home-list > .lc-news-home-item:first-child,
.lc-news-home-list > .lc-news-home-item:last-child,
.lc-news-home-list > .lc-news-home-item:nth-child(even),
.lc-news-home-list > .lc-news-home-item:nth-child(odd) {
    background: var(--lcn-item-bg, #ffffff);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    /* Annuler TOUTE marge/padding que le theme PrestaShop pourrait appliquer aux <li>,
       y compris sur first-child / last-child / nth-child, pour un espacement parfaitement
       regulier (seul le gap de la liste compte). */
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.lc-news-home-item-link {
    display: grid;
    /* date | titre | magasin — colonne date fixe (toutes au format JJ/MM) :
       dates alignees a gauche, titres parfaitement alignes entre eux. */
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    margin: 0;
    color: inherit;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.12s;
}

.lc-news-home-item-link:hover {
    background: rgba(0, 0, 0, 0.025);
    text-decoration: none;
    color: inherit;
}

.lc-news-home-item-date {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--lcn-item-date, #888888);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.lc-news-home-item-title {
    font-size: 0.9rem;
    font-weight: 400;
    /* Forcer la police standard du site (eviter une eventuelle police display
       imposee par le theme qui rend les titres trop gras). */
    font-family: inherit;
    color: var(--lcn-item-title, #414142);
    /* Titres en MAJUSCULES facon Culture Velo */
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lc-news-home-item-store {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--lcn-item-date, #888888);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-align: right;
}

/* ---------- CTA "Voir toutes les news" ---------- */

.lc-news-home-cta-row {
    text-align: right;
    margin-top: 28px;
    padding-right: 8px;
}

.lc-news-home-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #a7bc44;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
}

.lc-news-home-cta:hover {
    color: #93a539;
    text-decoration: none;
}

.lc-news-home-cta .lc-arr {
    transition: transform 0.15s;
}

.lc-news-home-cta:hover .lc-arr {
    transform: translateX(4px);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 992px) {
    .lc-news-home-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .lc-news-home-banner {
        /* Sur mobile/tablette : banniere centree, carre conserve (1:1, pas de deformation).
           On limite sa largeur pour ne pas qu'elle soit gigantesque en pleine largeur. */
        height: auto;
        aspect-ratio: 1 / 1;
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
    }
}

/* Mobile (idem breakpoint des autres sections) : l'image carree prend toute la
   largeur du contenu, donc la meme largeur que les blocs actus et les autres
   sections. Le format carre (aspect-ratio 1/1) est conserve. */
@media (max-width: 768px) {
    .lc-news-home-banner {
        max-width: none;
        margin: 0;
    }
}

@media (max-width: 600px) {
    .lc-news-home-block {
        padding: 30px 15px 24px 15px;
    }

    .lc-news-home-title {
        font-size: 1.4rem;
    }

    .lc-news-home-item-link {
        /* Colonne date plus large pour eviter le debordement de "AUJOURD'HUI" */
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 14px;
        padding: 14px 14px;
    }

    /* Date plus petite sur mobile */
    .lc-news-home-item-date {
        font-size: 0.62rem;
    }

    /* Magasin passe sous le titre sur mobile */
    .lc-news-home-item-store {
        grid-column: 2;
        text-align: left;
        margin-top: 3px;
        font-size: 0.7rem;
    }

    .lc-news-home-item-title {
        font-size: 0.88rem;
        white-space: normal;
    }
}
