/*
 * Responsive V2 — Le Verger des Hespérides
 * Mobile/tablette only. The historical desktop CSS remains untouched.
 * Loaded AFTER every page-specific stylesheet from base.html.
 */

@media screen and (max-width: 1024px) {
    *, *::before, *::after {
        box-sizing: border-box;
    }

    html,
    body {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    #page {
        min-width: 0;
        font-size: 15px;
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
    }

    #page img {
        max-width: 100%;
        height: auto;
    }

    a,
    p,
    td,
    div {
        overflow-wrap: anywhere;
    }

    /* ---------- GLOBAL LAYOUT ---------- */

    #global {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    #main {
        order: 1;
        position: relative;
        left: auto;
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 10px 14px 24px;
        background: none;
    }

    #liste_gauche {
        order: 2;
        position: static;
        width: calc(100% - 28px);
        height: auto;
        margin: 8px 14px 18px;
        padding: 18px 14px;
        text-align: center;
        background: rgba(255, 255, 255, 0.94);
        border-radius: 14px;
    }

    #img_bas {
        display: none !important;
    }

    /* ---------- MAIN NAV ---------- */

    #nav_principal {
        position: static;
        width: 100%;
        max-width: 720px;
        height: auto;
        margin: 4px auto 12px;
        padding: 6px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
        overflow: visible;
        background: #050505;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    }

    #nav_principal li,
    #nav_principal_acc,
    #nav_principal_salon,
    #nav_principal_cmd,
    #nav_principal_cont {
        position: static;
        display: flex;
        float: none;
        min-width: 0;
        min-height: 48px;
        margin: 0;
        padding: 5px 8px;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #nav_principal a,
    #nav_principal_acc a,
    #nav_principal_salon a,
    #nav_principal_cmd a,
    #nav_principal_cont a {
        color: #fff !important;
        font-size: 13px;
        line-height: 1.2;
        font-weight: 700;
        text-decoration: none;
    }

    #panier {
        position: static;
        float: none;
        width: 100%;
        margin: 10px auto 4px;
        text-align: center;
    }

    #panier p {
        margin: 0 0 5px !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    #panier a {
        width: auto;
        margin: 0 auto;
        display: inline-block;
    }

    #panier img {
        width: 64px;
        height: auto;
    }

    #changement_langue {
        position: static;
        float: none;
        width: 100%;
        margin: 4px auto 16px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
    }

    #changement_langue a {
        display: inline-flex;
    }

    #changement_langue img {
        width: auto;
        max-width: 48px;
        height: auto;
    }

    /* ---------- LEFT CATALOG / COLLECTION MENU ---------- */

    #livre_numerique,
    #collection,
    #catalogue {
        position: static;
        width: 100%;
        height: auto;
        margin: 0 auto 22px;
        text-align: center;
    }

    #livre_numerique {
        margin-bottom: 24px;
    }

    #livre_numerique img {
        max-width: 150px;
    }

    #collection {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
        align-items: center;
    }

    #collection > img,
    #catalogue > img {
        display: block;
        max-width: 230px;
        margin: 0 auto 12px;
    }

    #collection > img {
        grid-column: 1 / -1;
    }

    #collection div,
    #catalogue div {
        position: static;
        width: 100%;
        margin: 0;
    }

    #collection div a,
    #catalogue div a {
        display: block;
    }

    #collection div a img {
        width: 100%;
        max-width: 160px;
        height: auto;
    }

    #catalogue div a img {
        width: 100%;
        max-width: 190px;
        height: auto;
    }

    /* ---------- FOOTER ---------- */

    footer {
        order: 3;
        position: static;
        width: calc(100% - 28px);
        height: auto !important;
        margin: 0 14px 20px;
        padding: 20px 14px 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
        background: rgba(255, 255, 255, 0.94);
        border-radius: 14px;
    }

    footer a {
        position: static !important;
        left: auto !important;
        top: auto !important;
        display: block;
        margin: 0 auto;
        font-size: 11px;
        line-height: 1.35;
    }

    footer a img {
        position: static !important;
        left: auto !important;
        top: auto !important;
        display: block;
        width: auto;
        max-width: 58px;
        height: auto;
        margin: 6px auto 0;
    }

    /* ---------- COMMON PAGE TITLES ---------- */

    #titre_cgv,
    #titre_mentions_legales,
    #titre_contact,
    #titre_commandes,
    #titre_salon,
    #titre_animations,
    #titre_genese {
        position: static;
        width: 100%;
        margin: 22px auto 16px;
        padding: 0 8px;
        font-size: clamp(22px, 6vw, 28px);
        line-height: 1.2;
        text-align: center;
    }

    img#titre_collection {
        position: static;
        display: block;
        width: auto;
        max-width: min(78%, 310px);
        height: auto;
        margin: 18px auto 14px;
    }

    div#titre_collection {
        position: static;
        width: 100%;
        margin: 22px auto 16px;
        font-size: clamp(22px, 6vw, 28px);
        line-height: 1.2;
        text-align: center;
    }

    /* ---------- HOME ---------- */

    #slider {
        position: relative;
        top: auto;
        width: 100%;
        max-width: 720px;
        height: auto;
        min-height: 230px;
        margin: 10px auto 22px;
        padding: 24px 46px;
        background-size: 100% 100%;
        background-position: center;
        background-repeat: no-repeat;
    }

    #slideshow {
        position: relative;
        left: auto;
        width: 100%;
        margin: 0;
        overflow: hidden;
    }

    #liste_slide {
        position: relative;
        display: flex;
        width: auto;
        height: auto;
        min-height: 180px;
        margin: 0;
        padding: 0;
        transition: margin-left 0.35s ease;
    }

    #liste_slide li {
        position: static;
        display: flex;
        flex: 0 0 100%;
        width: 100%;
        padding: 0;
        align-items: center;
        justify-content: center;
    }

    #liste_slide li a {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    #liste_slide li a img {
        display: block;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 185px !important;
        margin: 0 auto;
        object-fit: contain;
    }

    .commands {
        position: absolute;
        top: 50%;
        z-index: 10;
        padding: 4px;
        transform: translateY(-50%);
    }

    .commands img {
        width: 28px;
        height: auto;
    }

    #commands_prev {
        left: 8px;
    }

    #commands_next {
        right: 8px;
        float: none;
    }

    #slider ~ #animation,
    #slider ~ #genese,
    #slider ~ #info {
        position: relative;
        float: none;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 620px;
        height: auto;
        margin: 20px auto;
        background-position: top center;
        background-repeat: no-repeat;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    }

    #slider ~ #animation {
        min-height: 420px;
        padding: 118px 18px 22px;
        background-size: 100% 100%;
    }

    #slider ~ #animation > div {
        position: static;
        width: 100%;
        margin: 0;
        padding: 12px 14px;
        background: rgba(255, 255, 255, 0.96);
        border-radius: 4px;
    }

    #table_animation {
        width: 100%;
        border-collapse: collapse;
    }

    #table_animation td {
        padding: 5px 4px;
        vertical-align: top;
        font-size: 14px;
        line-height: 1.35;
    }

    #table_animation .date_animation {
        width: 34%;
        font-weight: 600;
    }

    #slider ~ #genese {
        min-height: 0;
        padding-top: min(132%, 720px);
        background-size: 100% auto;
        background-color: #fff;
    }

    #slider ~ #genese > div {
        position: static;
        width: 100%;
        margin: 0;
        padding: 18px 20px 20px;
        background: #fff;
        font-size: 15px;
        line-height: 1.55;
    }

    #slider ~ #info {
        min-height: 430px;
        padding: 58px 18px 24px;
        background-size: 100% 100%;
    }

    #slider ~ #info > div {
        position: static;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 8px 4px;
        color: #626262;
        font-size: 14px;
        line-height: 1.45;
    }

    #slider ~ #info > div * {
        max-width: 100%;
    }

    /* ---------- LEGAL PAGES ---------- */

    #div_cgv,
    #div_mentions_legales {
        position: static;
        width: 100%;
        max-width: 780px;
        height: auto;
        margin: 0 auto 20px;
        padding: 22px 18px 26px;
        background: #fff;
        border-radius: 12px;
    }

    #text_cgv,
    #text_mentions_legales {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        font-size: 15px;
        line-height: 1.58;
        word-break: normal;
    }

    #text_cgv h2,
    #text_mentions_legales h2 {
        margin: 24px 0 10px;
        font-size: 20px;
        line-height: 1.3;
    }

    #text_cgv h2:first-child,
    #text_mentions_legales h2:first-child {
        margin-top: 0;
    }

    #text_cgv h3,
    #text_mentions_legales h3 {
        margin: 16px 0 10px;
        font-size: 16px;
        line-height: 1.4;
    }

    #text_cgv p,
    #text_mentions_legales p {
        width: 100%;
        margin: 0 0 13px;
        font-size: 15px;
        line-height: 1.58;
    }

    #text_cgv a,
    #text_mentions_legales a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* ---------- CONTACT ---------- */

    #div_contact {
        position: static;
        width: 100%;
        max-width: 680px;
        height: auto;
        margin: 0 auto 22px;
        padding: 24px 20px;
        background-image: none;
        background-color: #fff;
        border-radius: 12px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.10);
    }

    #text_contact {
        width: 100%;
        margin: 0;
        padding: 0;
        font-size: 15px;
        line-height: 1.55;
    }

    #text_contact p {
        margin: 0;
    }

    /* ---------- ORDERS ---------- */

    #div_commandes {
        position: static;
        width: 100%;
        max-width: 760px;
        height: auto;
        margin: 0 auto 22px;
        padding: 22px 18px;
        background-image: none;
        background-color: #fff;
        border-radius: 12px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.10);
    }

    #text_commandes,
    #telechargement_commandes {
        position: static;
        width: 100%;
        margin: 0;
        padding: 0;
        font-size: 14px;
        line-height: 1.5;
    }

    #text_commandes table,
    #text_commandes tbody,
    #text_commandes tr,
    #text_commandes td {
        display: block;
        width: 100% !important;
    }

    #text_commandes tr {
        padding: 14px 0;
        border-bottom: 1px solid #ddd;
    }

    #text_commandes tr:last-child {
        border-bottom: 0;
    }

    #text_commandes td {
        padding: 0 0 8px !important;
    }

    #text_commandes td:first-child {
        font-size: 16px;
    }

    #telechargement_commandes {
        margin-top: 18px;
        padding-top: 16px;
        border-top: 1px solid #ddd;
    }

    #telechargement_commandes table,
    #telechargement_commandes tbody,
    #telechargement_commandes tr {
        display: block;
        width: 100%;
    }

    #telechargement_commandes td {
        display: block;
        width: 100% !important;
        padding: 5px 0;
        text-align: center;
    }

    #telechargement_commandes td:nth-child(3) {
        display: none;
    }

    #telechargement_commandes img {
        width: 42px;
        height: auto;
    }

    /* ---------- ANIMATIONS PAGE ---------- */

    #description_animation {
        position: static;
        width: 100%;
        max-width: 760px;
        margin: 0 auto 18px;
        padding: 16px 18px;
        background: #fff;
        border-radius: 12px;
        font-size: 15px;
        line-height: 1.5;
    }

    #titre_animations ~ #liste_salon {
        position: static;
        width: 100%;
        max-width: 780px;
        margin: 0 auto 22px;
        padding: 0;
        background: transparent;
    }

    #titre_animations ~ #liste_salon #head_table {
        display: none;
    }

    #titre_animations ~ #liste_salon > #table_salon,
    #titre_animations ~ #liste_salon > #table_salon > tbody {
        display: block;
        width: 100%;
        margin: 0;
    }

    #titre_animations ~ #liste_salon > #table_salon > tbody > tr.anim {
        display: block;
        width: 100%;
        height: auto;
        margin: 0 0 14px;
        padding: 0;
        background: #fff !important;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    #titre_animations ~ #liste_salon > #table_salon > tbody > tr.anim > td,
    #titre_animations ~ #liste_salon > #table_salon table,
    #titre_animations ~ #liste_salon > #table_salon table tbody,
    #titre_animations ~ #liste_salon > #table_salon table tr,
    #titre_animations ~ #liste_salon > #table_salon table td {
        display: block;
        width: 100% !important;
        height: auto;
    }

    #titre_animations ~ #liste_salon > #table_salon table tr:first-child {
        padding: 14px 16px 8px;
    }

    #titre_animations ~ #liste_salon > #table_salon table tr:last-child {
        padding: 0 16px 16px;
    }

    #titre_animations ~ #liste_salon > #table_salon table td {
        padding: 3px 0;
        font-size: 14px;
        line-height: 1.4;
        background: transparent !important;
    }

    #titre_animations ~ #liste_salon .date {
        color: #5a6f1b;
        font-weight: 700;
    }

    /* ---------- BOOK FAIRS ---------- */

    #div_salon {
        position: static;
        width: 100%;
        max-width: 780px;
        margin: 0 auto 22px;
        padding: 16px;
        background: #fff;
        border-radius: 12px;
    }

    #div_salon #liste_salon {
        width: 100%;
        margin: 0;
        background: none;
    }

    #div_salon #head_table {
        display: none;
    }

    #div_salon #table_salon,
    #div_salon #table_salon tbody {
        display: block;
        width: 100%;
    }

    #div_salon #table_salon tr {
        display: block;
        width: 100%;
        height: auto;
        margin: 0 0 12px;
        padding: 10px 14px;
        border-radius: 10px;
    }

    #div_salon #table_salon td {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        width: 100% !important;
        padding: 5px 0;
        text-align: left !important;
        font-size: 14px;
        line-height: 1.4;
    }

    #div_salon #table_salon td::before {
        content: attr(data-label);
        padding-right: 8px;
        font-weight: 700;
        color: #53661d;
    }

    #div_salon #foot_table {
        width: 100%;
        height: auto;
        margin-top: 14px;
        padding: 0;
        background: none;
    }

    #div_salon #album_lien {
        position: static;
        width: 100%;
        margin: 0;
        text-align: center;
    }

    /* ---------- COLLECTION LIST ---------- */

    #descritpion_collection {
        position: static;
        width: 100%;
        max-width: 720px;
        margin: 0 auto 12px;
        padding: 0 10px;
        font-size: 14px;
        line-height: 1.5;
        text-align: center;
    }

    #choix_lecteur {
        position: static;
        width: 100%;
        max-width: 720px;
        margin: 0 auto 14px;
        padding: 12px 14px;
        text-align: center;
        background: rgba(255, 255, 255, 0.94);
        border-radius: 10px;
    }

    #choix_lecteur > img {
        width: 32px;
        vertical-align: middle;
    }

    .collection-results {
        position: static !important;
        width: 100% !important;
        max-width: 780px;
        margin: 0 auto 20px !important;
        padding: 16px !important;
        background: #fff !important;
        border-radius: 12px;
    }

    .collection-results #div_liste_livre {
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .collection-results .livre {
        float: none;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 16px 0;
        border-bottom: 1px solid #e3e3e3;
    }

    .collection-results .livre:last-child {
        border-bottom: 0;
    }

    .collection-results .livre table,
    .collection-results .livre tbody {
        display: block;
        width: 100%;
    }

    .collection-results .livre td {
        display: block;
        width: 100%;
        padding: 0;
        text-align: center;
    }

    .collection-results .img_livre {
        padding: 0 0 12px;
    }

    .collection-results .img_livre a img {
        width: auto;
        max-width: min(70vw, 210px);
        max-height: 260px;
        margin: 0 auto;
    }

    .collection-results .txt_livre {
        padding: 0 6px;
    }

    .collection-results .titre_livre,
    .collection-results .prix_livre,
    .collection-results .description_livre {
        width: 100%;
        height: auto;
        margin: 6px 0;
        font-size: 14px;
        line-height: 1.45;
        text-align: center;
        overflow: visible;
    }

    #num_page {
        width: 100%;
        margin: 10px auto 0;
        padding: 10px 4px 2px;
        font-size: 14px;
        line-height: 1.8;
    }

    #num_page a {
        display: inline-block;
        min-width: 28px;
        padding: 3px 5px;
    }

    /* ---------- BOOK DETAIL ---------- */

    #retour {
        position: static;
        width: 100%;
        margin: 0 auto 12px;
        padding: 0 8px;
        font-size: 13px;
        text-align: center;
    }

    #table_livre {
        width: 100%;
        margin: 0;
    }

    #div_liste_livre.book-detail {
        position: static;
        width: 100%;
        max-width: 780px;
        margin: 0 auto 20px;
        padding: 18px;
        background: #fff;
        border-radius: 12px;
    }

    #table_livre,
    #table_livre > tbody,
    #table_livre > tbody > tr,
    #table_livre > tbody > tr > td {
        display: block;
        width: 100%;
        height: auto;
    }

    #img_livre {
        margin: 0;
        padding: 0 0 16px;
        text-align: center;
    }

    #img_livre a img {
        width: auto;
        max-width: min(76vw, 310px);
        height: auto;
        max-height: none;
        padding: 0;
    }

    #txt_livre {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 18px 16px;
        background-image: none;
        background-color: #f7f7f2;
        border-radius: 10px;
        font-size: 14px;
    }

    #txt_livre > div[style] {
        width: 100% !important;
        height: auto !important;
    }

    #prix {
        position: static !important;
        float: none !important;
        width: 100%;
        margin: 0 0 12px;
        text-align: center;
    }

    #caracteristique {
        position: static !important;
        left: auto !important;
        width: 100%;
    }

    #caracteristique p {
        margin: 6px 0;
    }

    #caracteristique table,
    #caracteristique table tbody,
    #caracteristique table td {
        display: block;
        width: 100% !important;
    }

    #caracteristique table td {
        padding: 3px 0;
    }

    #table_livre .bouton_livre {
        display: flex;
        width: 100%;
        margin: 16px 0 8px;
        padding: 0;
        align-items: center;
        justify-content: center;
        gap: 14px;
    }

    #table_livre .bouton_livre > img,
    #table_livre .bouton_livre > a img {
        width: auto;
        max-width: 64px;
        max-height: 64px;
    }

    #table_livre > tbody > tr:nth-child(2) > td:first-child,
    #table_livre > tbody > tr:nth-child(2) > td:last-child {
        display: none;
    }

    #table_livre #titre_livre {
        display: block;
        margin: 18px 0 8px;
        font-size: 18px;
        line-height: 1.35;
        text-align: center;
    }

    #table_livre #resume {
        margin: 0;
        font-size: 15px !important;
        line-height: 1.55 !important;
        text-align: left !important;
    }

    /* ---------- BOOKMARK LIST ---------- */

    .bookmark-results {
        position: static !important;
        width: 100% !important;
        max-width: 720px;
        margin: 0 auto 20px !important;
        padding: 14px 16px !important;
        background: #fff !important;
        border-radius: 12px;
    }

    .bookmark-results #div_liste_MP {
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .bookmark-results .MP {
        float: none;
        width: 100%;
        margin: 0;
        padding: 14px 0;
        border-bottom: 1px solid #e3e3e3;
    }

    .bookmark-results .MP:last-child {
        border-bottom: 0;
    }

    .bookmark-results .MP table {
        width: 100%;
    }

    .bookmark-results .img_MP {
        width: 95px;
        padding: 0 12px 0 0;
        text-align: center;
    }

    .bookmark-results .img_MP a img {
        width: auto;
        max-width: 70px;
        height: auto;
        max-height: 250px;
    }

    .bookmark-results .txt_MP {
        width: auto;
        padding: 0;
        vertical-align: middle;
    }

    .bookmark-results .titre_MP {
        font-size: 15px;
        line-height: 1.4;
    }

    .bookmark-results .prix_MP {
        position: static;
        margin: 12px 0 0;
        font-size: 14px;
    }

    /* ---------- BOOKMARK DETAIL ---------- */

    #div_liste_MarquePage {
        position: static;
        width: 100%;
        max-width: 720px;
        margin: 0 auto 20px;
        padding: 18px;
        background: #fff;
        border-radius: 12px;
    }

    #table_MarquePage,
    #table_MarquePage > tbody,
    #table_MarquePage > tbody > tr,
    #table_MarquePage > tbody > tr > td {
        display: block;
        width: 100%;
        height: auto;
    }

    #img_MarquePage {
        width: 100%;
        height: auto;
        margin: 0 0 16px;
        text-align: center;
    }

    #img_MarquePage a img {
        width: auto;
        max-width: 105px;
        height: auto;
        max-height: 420px;
        margin: 0 auto;
    }

    #txt_MarquePage {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 18px 16px;
        background-image: none;
        background-color: #f7f7f2;
        border-radius: 10px;
        font-size: 14px;
    }

    #txt_MarquePage #caracteristique,
    #txt_MarquePage #caracteristique > div[style] {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: 100%;
    }

    #txt_MarquePage #caracteristique p {
        margin: 7px 0 !important;
    }

    #table_MarquePage .bouton_MarquePage {
        display: flex;
        width: 100%;
        padding: 16px 0 0;
        justify-content: center;
    }

    #table_MarquePage .bouton_MarquePage img {
        max-width: 68px;
    }

    #table_MarquePage > tbody > tr:nth-child(2) > td:first-child,
    #table_MarquePage > tbody > tr:nth-child(2) > td:last-child {
        display: none;
    }

    #table_MarquePage #titre_MarquePage {
        position: static;
        width: 100%;
        margin: 14px 0 8px;
        font-size: 18px;
        line-height: 1.35;
        text-align: center;
    }

    #table_MarquePage #resume {
        position: static;
        margin: 0;
        font-size: 15px !important;
        line-height: 1.55 !important;
        text-align: left !important;
    }

    /* ---------- GENESIS PAGE ---------- */

    #titre_genese + #genese {
        position: static;
        width: 100%;
        max-width: 800px;
        height: auto;
        margin: 0 auto 20px;
        padding: 20px 18px;
        background: #fff;
        border-radius: 12px;
    }

    #titre_genese + #genese #img_genese {
        position: static;
        float: none;
        width: 100%;
        margin: 0 auto 18px;
        text-align: center;
    }

    #titre_genese + #genese #img_genese img {
        width: auto;
        max-width: 100%;
        max-height: 420px;
    }

    #titre_genese + #genese #descrition_genese {
        position: static;
        width: 100%;
        height: auto;
        margin: 0;
        font-size: 15px;
        line-height: 1.58;
    }

    #titre_genese + #genese #titre_liste_article {
        position: static;
        width: 100%;
        margin: 26px 0 12px;
        font-size: 17px;
        line-height: 1.4;
    }

    #titre_genese + #genese #liste_article {
        position: static;
        width: 100%;
        height: auto;
        margin: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #titre_genese + #genese #liste_article .article {
        float: none;
        width: 100%;
        max-width: none;
        height: auto;
        margin: 0;
        padding: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        background: #f4f4f4;
        border-radius: 8px;
    }

    #titre_genese + #genese #liste_article .article > div[style] {
        width: auto !important;
        flex: 1 1 auto;
    }

    #titre_genese + #genese #liste_article .article img {
        width: 28px;
        max-width: 28px;
    }

    /* ---------- CART ---------- */

    .cart-page-title,
    .cart-empty {
        position: static !important;
        width: 100%;
        margin: 22px auto 16px !important;
        padding: 0 8px;
        font-size: clamp(22px, 6vw, 28px) !important;
        line-height: 1.2;
        text-align: center;
    }

    .cart {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: 100%;
        max-width: 720px;
        margin: 0 auto 22px;
        padding: 18px 16px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.10);
        font-size: 14px;
    }

    .cart > div {
        max-width: 100%;
    }

    .cart .cart-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 64px 68px 32px;
        gap: 8px;
        width: 100% !important;
        align-items: center;
        font-size: 12px;
    }

    .cart .cart-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 64px 68px 32px;
        gap: 8px;
        width: 100% !important;
        align-items: center;
        min-width: 0;
        height: auto;
        margin: 0;
        padding: 8px 0;
    }

    .cart .cart-row > div {
        min-width: 0;
    }

    .cart .cart-row input {
        width: 52px !important;
        max-width: 100%;
        padding: 6px 3px;
    }

    .cart .cart-row img,
    .cart .cart-header img {
        width: 20px;
        height: auto;
    }

    .cart .cart-shipping-note {
        display: block !important;
        width: 100% !important;
        margin: 12px 0 0;
        padding: 12px;
        background: #f5f5f5;
        border-radius: 8px;
        line-height: 1.4;
    }

    .cart .cart-totals {
        width: 100% !important;
    }

    #paypal-boutons {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    /* ---------- CATALOGUE PAGE ---------- */

    .catalogue-page {
        max-width: 780px;
    }

    .catalogue-reader {
        min-height: 480px;
    }

    /* ---------- POPUPS / MODALS ---------- */

    #fond_gris {
        width: 100%;
        height: 100%;
    }

    #mouche,
    #mouche_catalogue_out,
    #mouche_livre_out,
    #mouche_MP_out {
        position: fixed;
        inset: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        margin: 0;
        padding: 18px;
        z-index: 110;
        align-items: center;
        justify-content: center;
    }

    #mouche,
    #mouche_catalogue_out,
    #mouche_livre_out,
    #mouche_MP_out {
        display: flex;
    }

    #mouche > div,
    #mouche_catalogue,
    #mouche_livre,
    #mouche_MP {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        max-width: 700px;
        max-height: calc(100vh - 36px);
        height: auto;
        margin: 0 auto;
        overflow: auto;
    }

    #mouche > div > img:first-child {
        display: block;
        width: 100% !important;
        height: auto !important;
    }

    #moucheTexte {
        position: static;
        display: block;
        width: 100%;
        margin: 0;
        padding: 14px;
        transform: none;
        line-height: 1.4;
        background: #fff;
    }

    #mouche_catalogue {
        max-width: 430px;
        min-height: 0;
        padding: 18px;
    }

    .catalogue_boutton {
        position: static !important;
        display: block;
        width: 100%;
        max-width: 280px;
        height: auto;
        margin: 12px auto;
    }

    #mouche_livre,
    #mouche_MP {
        max-width: min(88vw, 560px);
        text-align: center;
        background: #fff;
    }

    #mouche_livre > img:first-child,
    #mouche_MP > img:first-child {
        width: auto;
        max-width: 100%;
        max-height: 78vh;
        object-fit: contain;
    }
}

@media screen and (max-width: 520px) {
    #main {
        padding-left: 10px;
        padding-right: 10px;
    }

    #nav_principal {
        border-radius: 8px;
    }

    #nav_principal li,
    #nav_principal_acc,
    #nav_principal_salon,
    #nav_principal_cmd,
    #nav_principal_cont {
        min-height: 44px;
        padding: 4px;
    }

    #nav_principal a,
    #nav_principal_acc a,
    #nav_principal_salon a,
    #nav_principal_cmd a,
    #nav_principal_cont a {
        font-size: 12px;
    }

    #slider {
        min-height: 215px;
        padding: 20px 38px;
    }

    #liste_slide {
        min-height: 172px;
    }

    #liste_slide li a img {
        max-height: 172px !important;
    }

    #slider ~ #animation {
        min-height: 0;
        padding: 110px 12px 18px;
        background-size: 100% 100%;
    }

    #slider ~ #animation > div {
        padding: 10px 11px;
    }

    #table_animation td {
        font-size: 13px;
    }

    #slider ~ #genese {
        padding-top: 132%;
    }

    #slider ~ #info {
        min-height: 420px;
        padding-left: 14px;
        padding-right: 14px;
    }

    #titre_genese + #genese #liste_article {
        grid-template-columns: 1fr;
    }

    .cart {
        padding: 15px 10px;
    }

    .cart .cart-header,
    .cart .cart-row {
        grid-template-columns: minmax(0, 1fr) 52px 56px 26px;
        gap: 5px;
        font-size: 12px;
    }

    .cart .cart-row input {
        width: 46px !important;
    }

    #div_salon #table_salon td {
        grid-template-columns: 64px minmax(0, 1fr);
    }
}

/* ---------- HOME / SLIDER — PATCH 2026-10-03 ----------
 * Restore the original multi-book strip behaviour on mobile/tablet.
 * The V2 base made every <li> 100% wide, which displayed only one book.
 * Keep this change inside responsive breakpoints; desktop remains untouched.
 */
@media screen and (max-width: 1024px) {
    #liste_slide {
        display: table;
        width: auto;
        min-width: 100%;
    }

    #liste_slide li {
        display: table-cell;
        width: auto;
        padding: 0 6px;
        vertical-align: middle;
    }

    #liste_slide li a {
        display: block;
        width: auto;
    }

    #liste_slide li a img {
        width: auto !important;
        max-width: 145px !important;
        height: auto !important;
        max-height: 185px !important;
        margin: 0 auto;
    }
}

@media screen and (max-width: 520px) {
    #liste_slide li {
        padding-left: 5px;
        padding-right: 5px;
    }

    #liste_slide li a img {
        max-width: 120px !important;
        max-height: 172px !important;
    }
}

/* ---------- HOME / SLIDER — PATCH V2 MULTI-BOOKS 2026-10-03 ----------
 * Force several book covers to remain visible at once on mobile/tablet.
 * The slider JS still moves one item at a time using each <li> offsetWidth.
 */
@media screen and (max-width: 1024px) {
    #slideshow {
        overflow: hidden;
    }

    #liste_slide {
        display: flex !important;
        width: max-content !important;
        min-width: 0 !important;
        height: auto !important;
        align-items: center;
    }

    #liste_slide li {
        display: flex !important;
        flex: 0 0 150px !important;
        width: 150px !important;
        min-width: 150px !important;
        padding: 0 8px !important;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
    }

    #liste_slide li a {
        display: flex !important;
        width: 100% !important;
        align-items: center;
        justify-content: center;
    }

    #liste_slide li a img {
        display: block;
        width: auto !important;
        max-width: 130px !important;
        height: auto !important;
        max-height: 180px !important;
        margin: 0 auto !important;
        object-fit: contain;
    }
}

@media screen and (max-width: 520px) {
    #liste_slide li {
        flex-basis: 104px !important;
        width: 104px !important;
        min-width: 104px !important;
        padding: 0 5px !important;
    }

    #liste_slide li a img {
        max-width: 94px !important;
        max-height: 168px !important;
    }
}
