/* Correctifs de la version publique /01/ — charger après style.css. */

/* Le texte tourné débordait de sa section. Le recadrage se limite au décor. */
.story {
    overflow: hidden;
    overflow: clip;
    grid-template-columns: minmax(0, 50fr) minmax(0, 33fr) minmax(0, 17fr);
}

.story > * {
    min-width: 0;
}

.handwriting {
    max-width: 100%;
    padding-right: 12px;
    overflow-wrap: anywhere;
}

/* Les grilles et les éléments flexibles doivent pouvoir se rétrécir. */
.header,
.hero-copy,
.section-heading > * {
    min-width: 0;
}

.video-meta,
.video-title,
.artist,
.newsletter-copy,
.newsletter-form,
.footer-main > div {
    min-width: 0;
}

.video-title,
.video-sub,
.artist strong,
.footer-main a,
.footer-main button {
    overflow-wrap: anywhere;
}

img {
    max-width: 100%;
}

.newsletter h2 {
    white-space: normal;
    overflow-wrap: break-word;
}

.newsletter-form input {
    min-width: 0;
    flex: 1 1 0;
    width: 0;
}

.newsletter-form .button {
    flex: 0 0 auto;
}

.footer-main {
    grid-template-columns:
        minmax(0, 2.1fr)
        minmax(0, 1fr)
        minmax(0, 1.05fr)
        minmax(0, 1.05fr)
        minmax(0, 1.1fr);
}

.footer-main .brand {
    max-width: 100%;
}

.footer-main .brand > span {
    min-width: 0;
}

.footer-main .brand strong {
    font-size: clamp(18px, 2.1vw, 25px);
}

.footer-main .brand small {
    white-space: normal;
    line-height: 1.5;
}

.footer-bottom > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Les filtres défilent dans leur propre bande, jamais sur la page entière. */
.filters {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.filters button {
    flex: 0 0 auto;
}

/* Les éléments décoratifs restent dans la largeur disponible. */
.hero-art {
    right: -6.1%;
    max-width: 106.1%;
}

@media (max-width: 1100px) {
    .footer-main {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 25px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand > p {
        max-width: 420px;
    }

    .footer-main .brand strong {
        font-size: 25px;
    }

    .story {
        grid-template-columns: minmax(0, 50fr) minmax(0, 50fr);
    }

    .handwriting {
        display: none;
    }

    .newsletter {
        padding-right: 4%;
        gap: 18px;
    }

    .newsletter-copy {
        flex: 1 1 0;
    }

    .newsletter-form {
        flex: 0 1 37%;
        width: 37%;
    }
}

/* La navigation se replie avant de manquer de place sur tablette. */
@media (max-width: 1000px) {
    .header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 14px;
        height: 78px;
    }

    .header .brand {
        min-width: 0;
        max-width: 100%;
    }

    .header .brand > span {
        min-width: 0;
    }

    .header .brand strong {
        font-size: 27px;
    }

    .header .brand small {
        font-size: 6.5px;
    }

    .header .brand img {
        width: 36px;
        height: 45px;
        flex: 0 0 auto;
    }

    .header-actions {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
    }

    .header-actions .divider,
    .search-shortcut {
        display: none;
    }

    .menu-toggle {
        grid-column: 3;
        grid-row: 1;
        display: block;
        border: 1px solid var(--line);
        border-radius: 7px;
        background: #ffffff06;
        padding: 6px 10px;
        font-size: 21px;
        line-height: 1.2;
    }

    .header nav {
        display: none;
        position: absolute;
        right: 0;
        top: 72px;
        min-width: 220px;
        max-width: 100%;
        margin: 0;
        padding: 20px;
        background: #0b1b31;
        border: 1px solid var(--line);
        border-radius: 10px;
        box-shadow: 0 10px 30px #0009;
        font-size: 14px;
        z-index: 5;
    }

    .header nav.open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 19px;
    }

    .hero h1 {
        white-space: normal;
        font-size: clamp(32px, 4.8vw, 48px);
        line-height: 1.03;
    }

    .hero-copy > p {
        white-space: normal;
        line-height: 1.6;
        max-width: 500px;
    }

    .benefits {
        white-space: normal;
        gap: 14px;
        align-items: flex-start;
    }

    .benefits span {
        min-width: 0;
    }
}

@media (min-width: 701px) and (max-width: 850px) {
    .hero {
        min-height: 285px;
    }

    .hero-copy {
        width: 72%;
    }

    .hero-art {
        top: 0;
        height: 280px;
    }

    .hero .search {
        width: 91%;
    }

    .benefits {
        font-size: 9px;
        gap: 10px;
    }

    .newsletter {
        padding-left: 23%;
        padding-right: 4%;
        display: block;
    }

    .newsletter h2 {
        font-size: 22px;
    }

    .newsletter p {
        font-size: 11px;
        line-height: 1.7;
    }

    .newsletter-form {
        width: 100%;
        max-width: 460px;
        margin-top: 16px;
        height: 40px;
    }
}

@media (max-width: 700px) {
    .header {
        height: 76px;
        gap: 11px;
    }

    .hero h1 {
        font-size: clamp(29px, 6.8vw, 46px);
        white-space: normal;
    }

    .hero-copy {
        width: 100%;
    }

    .hero-art {
        right: -4.94%;
        max-width: 104.94%;
    }

    .hero-copy > p {
        font-size: 13px;
        line-height: 1.6;
    }

    .story {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .story > img {
        width: 100%;
        height: auto;
        aspect-ratio: 2.5;
    }

    .section-heading {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
    }

    .section-heading h2 {
        flex: 1 1 220px;
        min-width: 0;
    }

    .section-heading .text-link {
        margin-left: auto;
    }

    .newsletter {
        padding: 23px 18px;
        display: block;
    }

    .newsletter-form {
        width: 100%;
        max-width: 100%;
        margin-top: 17px;
        height: 44px;
    }

    .newsletter-form input {
        font-size: 11px;
    }

    .newsletter-form .button {
        font-size: 11px;
        padding-inline: 16px;
        white-space: nowrap;
    }

    .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 13px;
        line-height: 1.7;
    }

    dialog {
        max-width: calc(100% - 24px);
        width: 620px;
        padding: 32px 23px;
    }

    .modal-content iframe {
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    .header {
        gap: 8px;
    }

    .header .brand {
        gap: 6px;
    }

    .header .brand img {
        width: 28px;
        height: 36px;
    }

    .header .brand strong {
        font-size: clamp(20px, 5.7vw, 24px);
        letter-spacing: -.7px;
    }

    .header .brand small {
        font-size: 4.7px;
        letter-spacing: 0;
        white-space: normal;
        line-height: 1.5;
    }

    .header .login {
        font-size: 9px;
        padding: 10px 9px;
        border-radius: 8px;
        white-space: nowrap;
    }

    .menu-toggle {
        font-size: 18px;
        padding: 5px 7px;
    }

    .header-actions {
        gap: 0;
    }

    .hero {
        min-height: 460px;
    }

    .hero h1 {
        font-size: clamp(26px, 7.4vw, 31px);
        line-height: 1.09;
        letter-spacing: -.7px;
    }

    .hero .search {
        gap: 10px;
        padding-left: 14px;
        width: 100%;
    }

    .hero .search input {
        font-size: 10px;
    }

    .hero .search .button {
        font-size: 9px;
        padding-inline: 13px;
    }

    .hero .benefits {
        gap: 11px;
        flex-direction: column;
        width: 125px;
    }

    .hero-art {
        top: 200px;
        height: 260px;
        width: 83%;
    }

    .genres {
        gap: 8px;
    }

    .genre span {
        font-size: 18px;
    }

    .artist-grid {
        gap: 22px 12px;
    }

    .artist strong {
        font-size: 12px;
    }

    .artist small {
        font-size: 10px;
    }

    .video-title {
        font-size: 13px;
    }

    .video-meta button {
        flex: 0 0 auto;
    }

    .newsletter-form {
        gap: 7px;
        padding-left: 10px;
    }

    .newsletter-form input {
        font-size: 10px;
    }

    .newsletter-form .button {
        font-size: 10px;
        padding-inline: 12px;
    }
}

@media (max-width: 340px) {
    .header .brand strong {
        font-size: 19px;
    }

    .header .brand img {
        width: 25px;
    }

    .header .brand small {
        display: none;
    }

    .header {
        gap: 7px;
    }

    .header .login {
        font-size: 8px;
        padding-inline: 8px;
    }

    .menu-toggle {
        padding-inline: 6px;
    }

    .newsletter-form .button {
        font-size: 9px;
        padding-inline: 9px;
    }
}

/* Mobile : texte, recherche, illustration entière, puis les trois intitulés. */
@media (max-width: 700px) {
    .hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        height: auto;
        padding-top: 20px;
        padding-bottom: 24px;
        isolation: isolate;
    }

    .hero-copy {
        display: contents;
    }

    .hero-copy > h1 {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .hero-copy > p {
        grid-column: 1;
        grid-row: 2;
        margin: 14px 0 18px;
    }

    .hero-copy > .search {
        grid-column: 1;
        grid-row: 3;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
    }

    .hero .hero-art {
        grid-column: 1;
        grid-row: 4;
        position: static;
        inset: auto;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 474 / 246;
        margin: 16px 0 0;
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        mask-image: none;
        -webkit-mask-image: none;
        z-index: auto;
    }

    .hero .benefits {
        grid-column: 1;
        grid-row: 5;
        position: static;
        inset: auto;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        max-width: 100%;
        margin: 18px 0 0;
        gap: 12px;
        white-space: normal;
        font-size: 10px;
        line-height: 1.5;
        align-items: start;
    }

    .hero .benefits > span {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        width: auto;
        max-width: none;
        min-width: 0;
        text-align: center;
        overflow-wrap: normal;
    }

    .hero .benefits b {
        font-size: 25px;
        line-height: 1.1;
    }
}

@media (max-width: 360px) {
    .hero .benefits {
        gap: 8px;
        font-size: 9px;
    }

    .hero .benefits b {
        font-size: 23px;
    }
}