/* ============================================================
   INFO.FR - Feuille mobile dediee home (<= 768px)
   Charge APRES home-bundle.css, ne touche pas le desktop.
   Refonte mobile propre : 1 colonne, titres lisibles, pas de troncature abusive.
   ============================================================ */

@media (max-width: 768px) {

    /* --- Container : respire un peu --- */
    .container { padding: 0 12px; }

    /* --- Live ticker : plus compact --- */
    .live-ticker { border-bottom-width: 1px; }
    .ticker-inner { height: 36px; }
    .ticker-label { padding: 0 10px; font-size: 10px; letter-spacing: 1px; }
    .ticker-item { padding: 0 18px; font-size: 13px; gap: 6px; }
    .ticker-time { display: none; }

    /* ============================================================
       HERO : force 1 colonne empilee (ecrase le !important 58%/42%
       de tier_s_cards.css qui bloque la mobile)
       ============================================================ */
    .hero-section { margin: 0; }
    .hero-grid-new {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin: 14px 0 24px !important;
        align-items: stretch !important;
    }

    /* --- Hero main (grande carte) --- */
    .hero-main-new,
    .hero-main-v2 {
        border-radius: 10px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important;
        background: white;
    }
    .hero-main-v2 .hero-image-wrapper {
        aspect-ratio: 16 / 9;
        height: auto;
        width: 100%;
        flex: none;
    }
    .hero-image-new {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .hero-content-overlay,
    .hero-main-v2 .hero-content-overlay {
        padding: 14px 16px !important;
    }
    .hero-main-v2 .hero-content-overlay .hero-title-new,
    .hero-title-new {
        font-size: 20px !important;
        line-height: 1.22 !important;
        margin-bottom: 0 !important;
    }
    .hero-main-v2 .hero-below {
        padding: 14px 16px 18px !important;
        gap: 10px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .hero-main-v2 .hero-chapo,
    .hero-chapo {
        font-size: 14.5px !important;
        line-height: 1.5 !important;
        color: #2a2a2a !important;
        margin: 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    .hero-main-v2 .hero-below-meta,
    .hero-below-meta {
        font-size: 12px !important;
        gap: 4px 8px !important;
        padding-top: 8px !important;
        border-top: 1px solid #F0F0F0 !important;
        flex-wrap: wrap !important;
        align-items: center !important;
    }
    .hero-below-sep { display: none !important; }
    .hero-below-meta .card-byline-avatar { width: 24px !important; height: 24px !important; }
    .hero-below-meta .card-byline-name { font-weight: 600; color: #1a1a1a; }
    .hero-below-time,
    .hero-below-reading {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: #6b7280;
    }
    .hero-below-time::before { content: "·"; color: #cfcfcf; margin-right: 4px; }
    .hero-below-reading::before { content: "·"; color: #cfcfcf; margin-right: 4px; }

    /* ============================================================
       HERO SECONDARY : 4 cartes empilees, image a droite, titre a gauche
       (ecrase les !important de tier_s_cards.css)
       ============================================================ */
    .hero-secondary-new {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        background: white !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
        height: auto !important;
        min-height: 0 !important;
    }
    .hero-secondary-new .secondary-card-new {
        flex: 0 0 auto !important;
        display: block !important;
        border-bottom: 1px solid #F0F0F0 !important;
        background: white !important;
    }
    .hero-secondary-new .secondary-card-new:last-child {
        border-bottom: none !important;
    }
    .hero-secondary-new .secondary-link-new {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        grid-template-columns: none !important;
        grid-template-rows: none !important;
        padding: 12px 14px !important;
        gap: 12px !important;
        flex: none !important;
    }
    .hero-secondary-new .secondary-image-wrapper {
        width: 96px !important;
        min-width: 96px !important;
        height: 96px !important;
        aspect-ratio: 1 / 1 !important;
        padding: 2px !important;
        order: 2 !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        background: #F5F7FA !important;
    }
    .hero-secondary-new .secondary-image-new {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }
    .hero-secondary-new .secondary-content-new {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding: 0 !important;
        order: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        justify-content: flex-start !important;
    }
    .hero-secondary-new .secondary-badges-row {
        margin-bottom: 2px !important;
    }
    .hero-secondary-new .category-badge-small {
        font-size: 9.5px !important;
        padding: 2px 7px !important;
    }
    .hero-secondary-new .secondary-title-new {
        font-size: 14.5px !important;
        line-height: 1.3 !important;
        font-weight: 700 !important;
        color: #111 !important;
        margin: 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        word-break: break-word;
    }
    .hero-secondary-new .secondary-meta-new {
        font-size: 11px !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        color: #6b7280 !important;
        align-items: center !important;
        margin-top: 2px !important;
    }
    .hero-secondary-new .secondary-author {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        min-width: 0;
        max-width: 100%;
    }
    .hero-secondary-new .secondary-author-avatar {
        width: 18px !important;
        height: 18px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }
    .hero-secondary-new .secondary-author-name {
        font-size: 11.5px !important;
        font-weight: 600 !important;
        color: #2a2a2a !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 130px;
    }
    .hero-secondary-new .secondary-meta-item {
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        white-space: nowrap;
    }
    .hero-secondary-new .secondary-meta-item svg {
        width: 11px;
        height: 11px;
        opacity: 0.7;
    }

    /* ============================================================
       SECTION HEADERS : plus compactes
       ============================================================ */
    .section-header {
        padding: 12px 0 6px !important;
        margin-bottom: 10px !important;
        gap: 8px;
    }
    .section-title {
        font-size: 17px !important;
        padding-bottom: 5px !important;
    }
    .see-all { font-size: 12px !important; white-space: nowrap; }
    .category-block {
        margin-bottom: 26px !important;
        padding-top: 16px !important;
    }
    .hero-section + * { margin-top: 0 !important; }

    /* ============================================================
       LATEST NEWS GRID : liste verticale, image a droite
       (affine le mobile existant)
       ============================================================ */
    .main-with-sidebar {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .articles-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        background: white !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    }
    .grid-article,
    .grid-article-featured {
        border-radius: 0 !important;
        box-shadow: none !important;
        border-bottom: 1px solid #F0F0F0 !important;
        grid-column: auto !important;
        border: none !important;
        border-bottom: 1px solid #F0F0F0 !important;
    }
    .grid-article:last-child { border-bottom: none !important; }
    .grid-article .grid-link,
    .grid-article-featured .grid-link {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        padding: 12px 14px !important;
        gap: 12px !important;
        grid-template-columns: none !important;
    }
    .grid-article .grid-image-wrapper,
    .grid-article-featured .grid-image-wrapper {
        width: 96px !important;
        min-width: 96px !important;
        height: 96px !important;
        aspect-ratio: 1 / 1 !important;
        padding: 2px !important;
        order: 2 !important;
        border-radius: 8px !important;
        background: #F5F7FA !important;
    }
    .grid-article .grid-image-new,
    .grid-article-featured .grid-image-new {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    .grid-article .grid-content,
    .grid-article-featured .grid-content {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding: 0 !important;
        order: 1 !important;
    }
    .grid-title,
    .grid-article-featured .grid-title {
        font-size: 14.5px !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
        margin: 4px 0 !important;
        font-family: inherit !important;
        -webkit-line-clamp: 3 !important;
    }
    .grid-excerpt { display: none !important; }
    .grid-meta {
        font-size: 11px !important;
        gap: 8px !important;
        color: #7A8B9A;
        flex-wrap: wrap !important;
    }
    .grid-meta span:nth-of-type(n+3) { display: none; }

    /* Load more button */
    .grid-loadmore-wrap { padding: 14px 0; text-align: center; }
    .grid-loadmore-btn {
        width: 100%;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }

    /* ============================================================
       SIDEBAR : empilee sous main, ad cachee
       ============================================================ */
    .sidebar-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        position: static !important;
    }
    .sidebar-ad { display: none !important; }
    .sidebar-widget {
        padding: 16px !important;
        border-radius: 10px !important;
    }
    .sidebar-widget-title {
        font-size: 15px !important;
        margin-bottom: 12px !important;
        padding-bottom: 10px !important;
    }
    .popular-rank { font-size: 22px !important; min-width: 26px !important; }
    .popular-title { font-size: 13px !important; }
    .popular-meta { font-size: 10.5px !important; }
    .mustread-item { padding: 6px !important; gap: 10px; }
    .mustread-thumb { width: 64px !important; height: 64px !important; }
    .mustread-title { font-size: 13px !important; }

    /* ============================================================
       SPORTS : main empile + smalls en liste
       ============================================================ */
    .sports-grid-new { gap: 0 !important; }
    .sport-card-main {
        border-radius: 10px 10px 0 0 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
        margin-bottom: 0 !important;
    }
    .sport-card-main .sport-link {
        display: block !important;
        grid-template-columns: none !important;
    }
    .sport-card-main .sport-image-wrapper-main {
        aspect-ratio: 16 / 9;
        padding: 0 !important;
    }
    .sport-card-main .sport-image-main {
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }
    .sport-card-main .sport-content-main {
        padding: 14px 16px !important;
    }
    .sport-card-main .sport-title-main {
        font-size: 17px !important;
        font-family: 'Merriweather', Georgia, serif !important;
        line-height: 1.25 !important;
    }
    .sport-card-main .sport-excerpt {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        font-size: 13.5px !important;
    }
    .sport-small-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        background: white !important;
        border-radius: 0 0 10px 10px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    }
    .sport-card-small {
        border-radius: 0 !important;
        box-shadow: none !important;
        border-bottom: 1px solid #F0F0F0 !important;
    }
    .sport-card-small:last-child { border-bottom: none !important; }
    .sport-link-small {
        flex-direction: row !important;
        align-items: flex-start !important;
        padding: 12px 14px !important;
        gap: 12px !important;
    }
    .sport-thumb-small {
        width: 96px !important;
        min-width: 96px !important;
        height: 96px !important;
        aspect-ratio: 1 / 1 !important;
        padding: 2px !important;
        order: 2 !important;
        border-radius: 8px !important;
    }
    .sport-thumb-small .sport-img-small {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .sport-content-small {
        order: 1 !important;
        padding: 0 !important;
        flex: 1 1 auto !important;
    }
    .sport-title-small {
        font-size: 14.5px !important;
        -webkit-line-clamp: 3 !important;
    }

    /* ============================================================
       DUAL SECTIONS : empilees
       ============================================================ */
    .dual-sections {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-bottom: 26px !important;
    }
    .dual-list {
        border-radius: 10px !important;
    }
    .dual-item-featured .dual-link { padding: 12px 14px 14px !important; }
    .dual-image { border-radius: 8px !important; margin-bottom: 10px !important; }
    .dual-item:not(.dual-item-featured) .dual-link {
        padding: 10px 14px !important;
        gap: 12px !important;
    }
    .dual-thumb {
        width: 80px !important;
        min-width: 80px !important;
        height: 80px !important;
        aspect-ratio: 1 / 1 !important;
    }
    .dual-title { font-size: 14px !important; -webkit-line-clamp: 3 !important; }
    .dual-item-featured .dual-title {
        font-size: 16px !important;
        font-family: 'Merriweather', Georgia, serif !important;
    }
    .dual-time { font-size: 11px !important; }

    /* ============================================================
       PUB : reduite, centree
       ============================================================ */
    .home-ad-break { margin: 14px auto !important; }

    /* ============================================================
       CULTURE : carrousel natif, petites cards
       ============================================================ */
    .culture-carousel { padding: 0 !important; }
    .carousel-btn { display: none !important; }
    .culture-scroll {
        gap: 12px !important;
        padding: 4px 0 10px !important;
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
    .culture-scroll-card {
        min-width: 200px !important;
        max-width: 200px !important;
    }
    .culture-scroll-title { font-size: 13.5px !important; }

    /* ============================================================
       HOROSCOPE : 4 x 3
       ============================================================ */
    .horoscope-section {
        padding: 22px 14px !important;
        border-radius: 10px !important;
        margin-bottom: 26px !important;
    }
    .horoscope-section .section-header { margin-bottom: 16px !important; }
    .horoscope-grid-new {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
    }

    /* ============================================================
       BLOCS MODULAIRES : laisser respirer
       ============================================================ */
    .modular-block,
    .home-recap-section,
    .vitrine-section,
    .home-dossiers-section,
    .eeat-journalists-section,
    .eeat-method-section,
    .eeat-triple-section,
    .home-dept-section {
        margin-bottom: 22px;
    }
}

/* ============================================================
   PETIT MOBILE (<= 480px) : ajustements serres
   ============================================================ */
@media (max-width: 480px) {
    .container { padding: 0 10px; }

    .hero-main-v2 .hero-content-overlay .hero-title-new,
    .hero-title-new { font-size: 18px !important; }
    .hero-main-v2 .hero-below { padding: 12px 14px 14px !important; }
    .hero-main-v2 .hero-chapo { font-size: 13.5px !important; }

    .hero-secondary-new .secondary-image-wrapper {
        width: 84px !important;
        min-width: 84px !important;
        height: 84px !important;
    }
    .hero-secondary-new .secondary-title-new { font-size: 14px !important; }
    .hero-secondary-new .secondary-author-name { max-width: 100px; }

    .grid-article .grid-image-wrapper,
    .grid-article-featured .grid-image-wrapper,
    .sport-thumb-small {
        width: 84px !important;
        min-width: 84px !important;
        height: 84px !important;
    }
    .grid-title { font-size: 14px !important; }

    .sport-card-main .sport-title-main { font-size: 16px !important; }
    .sport-title-small { font-size: 14px !important; }

    .dual-thumb {
        width: 72px !important;
        min-width: 72px !important;
        height: 72px !important;
    }

    .culture-scroll-card {
        min-width: 180px !important;
        max-width: 180px !important;
    }

    .horoscope-grid-new {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
