/* U-ROCK · Adaptations tablette et mobile.
   Ce fichier n'applique AUCUNE règle au-dessus de 950px : la version PC validée reste intacte.
   Chargé après style.css sur toutes les pages. */

@media (max-width: 950px) {
    html { scroll-padding-top: 90px; }
    body { overflow-wrap: break-word; }
    .wrap { width: min(100% - 40px, 720px); }
    .header-inner { gap: 16px; }
    .brand { min-width: 0; }
    .brand img { flex-shrink: 0; }
    .brand span { line-height: 1.15; }
    nav { gap: 14px; }
    .hero {
        min-height: calc(100vh - 88px);
        min-height: calc(100dvh - 88px);
    }
    .hero-copy { transform: none; min-width: 0; }
    .hero h1, .hero .eyebrow, .hero-copy > p:not(.eyebrow),
    .hero .actions > .btn:first-child, .hero-social { margin-left: 0; }
    .hero h1 { max-width: 660px; font-size: clamp(40px, 6.6vw, 62px); }
    .hero-copy > p:not(.eyebrow) { max-width: 600px; }
    .hero:after {
        background:
          linear-gradient(90deg,rgba(8,8,11,.83),rgba(8,8,11,.72) 55%,rgba(8,8,11,.38)),
          linear-gradient(0deg,#101012,transparent 35%);
    }
    .section-heading { flex-wrap: wrap; align-items: flex-start; }
    .episode-grid, .video-grid, .gallery { gap: 18px; }
    .episode, .person, .chapter, .split, .teaser { min-width: 0; }
    .episode > div, .person > div, .chapter > div, .split > div,
    .teaser > div, .video-copy { min-width: 0; }
    .social-cards a { overflow-wrap: anywhere; }
    .footer-inner { min-width: 0; }
}

/* Tablette étroite : la navigation devient un menu, comme sur téléphone. */
@media (min-width: 651px) and (max-width: 800px) {
    .hero-copy { padding-top: 55px; padding-bottom: 65px; }
    .hero-art { object-position: 65% 25%; }
    .hero .actions .btn { margin-left: 0; }
    .person { grid-template-columns: 220px minmax(0, 1fr); }
    .person > div { padding: 24px; }
    .chapter { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 25px; }
    .teaser { grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; }
}

@media (max-width: 650px) {
    html { scroll-padding-top: 78px; }
    body { font-size: 16px; line-height: 1.65; }
    .wrap { width: calc(100% - 36px); max-width: 520px; }
    h1 { font-size: clamp(38px, 10vw, 46px); line-height: 1.12; }
    h2 { font-size: clamp(30px, 8.3vw, 38px); line-height: 1.18; }
    h3 { font-size: 24px; }
    p { line-height: 1.65; }
    .eyebrow { font-size: 11px; letter-spacing: .12em; line-height: 1.55; }
    .header-inner { min-height: 74px; gap: 9px; }
    .brand { gap: 9px; }
    .brand img { width: 46px; height: 46px; }
    .brand span { font-size: 19px; }
    .brand small { font-size: 7px; line-height: 1.6; letter-spacing: .15em; }
    .js .menu-btn {
        padding: 11px 14px;
        min-height: 44px;
        font-size: 14px;
        border-color: #665052;
        border-radius: 3px;
    }
    .js nav.open {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 5px 0 14px;
        border-top: 1px solid var(--line);
    }
    .js nav.open a {
        display: block;
        padding: 11px 12px;
        min-height: 44px;
        font-size: 15px;
    }
    .js nav.open a[aria-current] { background: #21191c; box-shadow: inset 3px 0 var(--red); }

    /* Hero mobile dédiée : art entier en haut, textes en-dessous sur un fond uni lisible. */
    .hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        min-height: calc(100svh - 74px);
        min-height: calc(100dvh - 74px);
        background: linear-gradient(180deg,#171114,#101012 78%);
        isolation: isolate;
    }
    .hero-art {
        position: relative;
        inset: auto;
        display: block;
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 1983 / 793;
        object-fit: contain;
        object-position: center;
        z-index: auto;
        background: #171114;
    }
    .hero:after { display: none; }
    .hero-copy {
        width: calc(100% - 36px);
        max-width: 520px;
        flex: 1 0 auto;
        min-width: 0;
        padding: 24px 0 30px;
        transform: none;
    }
    .hero .eyebrow {
        margin: 0 0 14px;
        font-size: 10.5px;
        letter-spacing: .15em;
        line-height: 1.5;
        color: #e9c999;
        text-shadow: none;
        -webkit-text-stroke: 0;
    }
    .hero h1 {
        max-width: 100%;
        margin: 0 0 18px;
        font-size: clamp(35px, 9.3vw, 47px);
        line-height: 1.13;
        text-shadow: 0 2px 9px rgba(0,0,0,.36);
    }
    .hero h1 em { color: #dbc096; }
    .hero-copy > p:not(.eyebrow) {
        margin: 0;
        max-width: 100%;
        color: #f0e8e1;
        font-size: 16px;
        line-height: 1.55;
        text-shadow: none;
    }
    .hero .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 23px;
    }
    .hero .actions .btn {
        width: 100%;
        min-width: 0;
        min-height: 50px;
        margin: 0;
        padding: 11px 12px;
        flex: initial;
        font-size: 12px;
        line-height: 1.35;
        text-align: center;
    }
    .hero .btn.secondary { background: rgba(40,31,35,.94); }
    .hero-social { margin: 24px 0 0; gap: 11px; align-items: flex-start; }
    .hero-social-label { font-size: 10px; letter-spacing: .17em; }
    .hero-social-links { gap: 12px; }
    .hero-social-links a { width: 46px; height: 46px; }

    /* Sections : lecture confortable et sans colonnes écrasées. */
    .section { padding-top: 44px; padding-bottom: 24px; }
    .page-intro { padding-top: 42px; padding-bottom: 30px; }
    .lead { font-size: 17px; line-height: 1.6; }
    .story { padding-top: 37px; text-align: left; }
    .section-heading { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
    .section-heading h2 { margin-bottom: 0; }
    .section-heading .text-link { padding-top: 6px; }
    .episode-grid, .video-grid, .gallery, .split,
    .social-cards { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .episode { grid-template-columns: minmax(0, 1fr); }
    .episode img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }
    .episode > div { padding: 20px; }
    .episode h3 { margin-bottom: 12px; }
    .episode .eyebrow { font-size: 10px; letter-spacing: .10em; }
    .episode span { font-size: 13px; }
    .split { gap: 24px; }
    .wide-image { aspect-ratio: 3/2; }
    .people { gap: 24px; padding-bottom: 50px; }
    .person { grid-template-columns: minmax(0, 1fr); }
    .person > img {
        display: block;
        width: 100%;
        height: auto;
        max-height: none;
        aspect-ratio: 5/4;
        object-fit: cover;
        object-position: center 25%;
    }
    .person > div { padding: 24px 20px 22px; }
    .person h2 { font-size: clamp(28px,7vw,36px); }
    .person .eyebrow { font-size: 10px; }
    .chapter { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 32px 0; }
    .chapter img { display: block; width: 100%; max-width: 100%; }
    .season-label { padding: 25px 0 16px; }
    .season-label span { margin-top: 5px; }
    .teaser {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 26px 22px;
        margin-top: 38px;
        margin-bottom: 48px;
    }
    .teaser h2 { font-size: clamp(34px,9vw,45px); }
    .teaser img { width: 135px; height: 160px; justify-self: center; margin: 0; }
    .video-copy { padding: 20px; }
    .video-copy h3 { font-size: 22px; }
    .gallery-item span { font-size: 13px; }
    .social-cards { gap: 12px; }
    .social-cards a { padding: 21px; font-size: 23px; min-height: 72px; }
    .contact-panel { padding-bottom: 30px; }
    .email { font-size: clamp(18px, 5vw, 24px); overflow-wrap: anywhere; }
    footer .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 17px; padding: 33px 0; }
    footer .social { gap: 12px 20px; flex-wrap: wrap; }
    footer .social a { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; }
    footer .copyright { text-align: left; }
}

@media (max-width: 380px) {
    .wrap, .hero-copy { width: calc(100% - 30px); }
    .hero h1 { font-size: 35px; }
    .hero .actions { grid-template-columns: 1fr; gap: 9px; }
    .hero .actions .btn { min-height: 46px; font-size: 13px; }
    .hero-social { margin-top: 18px; }
    .brand img { width: 44px; height: 44px; }
}

/* Paysage sur téléphone : autoriser la hauteur naturelle pour éviter tout masquage. */
@media (max-height: 500px) and (max-width: 950px) {
    .hero { min-height: 0; }
    .hero-copy { padding-top: 24px; padding-bottom: 30px; }
}
