/* =========================================================
   PAGE PORTFOLIO - HISTOIRE & MYTHOLOGIE AFRICAINE EN BD
   Prefix : hm-
========================================================= */

:root {
    --hm-bg: #07070b;
    --hm-bg-soft: #101018;
    --hm-card: rgba(18, 18, 28, 0.88);
    --hm-card-2: rgba(255, 255, 255, 0.06);
    --hm-border: rgba(255, 255, 255, 0.11);
    --hm-text: #ffffff;
    --hm-muted: rgba(255, 255, 255, 0.68);
    --hm-gold: #f4b942;
    --hm-red: #ff3d3d;
    --hm-orange: #ff8a2a;
    --hm-purple: #8e5cff;
    --hm-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

/* Header hero */
.sub-header.hm-bd-header {
    min-height: 92vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background:
    radial-gradient(circle at 18% 25%, rgba(244, 185, 66, 0.22), transparent 32%),
    radial-gradient(circle at 85% 18%, rgba(255, 61, 61, 0.20), transparent 34%),
    linear-gradient(135deg, rgba(5, 5, 10, 0.55), rgba(13, 11, 20, 0.50)),
    url("Illustration/BK1.jpg");

background-size: cover;
background-position: center;
background-repeat: no-repeat;
}

.sub-header.hm-bd-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(7, 7, 11, 0.96)),
        repeating-linear-gradient(
            90deg,
            rgba(255,255,255,0.03) 0,
            rgba(255,255,255,0.03) 1px,
            transparent 1px,
            transparent 80px
        );
    pointer-events: none;
}

.sub-header.hm-bd-header::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -180px;
    bottom: -180px;
    background: radial-gradient(circle, rgba(244, 185, 66, 0.20), transparent 70%);
    filter: blur(4px);
    pointer-events: none;
}

.hm-hero-content {
    width: min(1120px, 92%);
    margin: auto;
    padding: 140px 0 90px;
    position: relative;
    z-index: 2;
    text-align: left;
}

.hm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border: 1px solid rgba(244, 185, 66, 0.35);
    border-radius: 999px;
    color: var(--hm-gold);
    background: rgba(244, 185, 66, 0.08);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hm-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hm-gold);
    box-shadow: 0 0 18px var(--hm-gold);
}

.hm-hero-content h1 {
    max-width: 900px;
    margin: 24px 0 18px;
    color: var(--hm-text);
    font-size: clamp(2.4rem, 6vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    font-weight: 800;
}

.hm-hero-content p {
    max-width: 720px;
    color: var(--hm-muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.8;
}

.hm-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s ease;
}

.hm-btn-primary {
    color: #100b05;
    background: linear-gradient(135deg, var(--hm-gold), var(--hm-orange));
    box-shadow: 0 14px 38px rgba(244, 185, 66, 0.25);
}

.hm-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 50px rgba(244, 185, 66, 0.35);
}

.hm-btn-ghost {
    color: var(--hm-text);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
}

.hm-btn-ghost:hover {
    border-color: rgba(244, 185, 66, 0.55);
    background: rgba(244, 185, 66, 0.10);
    transform: translateY(-3px);
}

.hm-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 46px;
}

.hm-hero-stats div {
    min-width: 150px;
    padding: 18px 22px;
    border: 1px solid var(--hm-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.hm-hero-stats strong {
    display: block;
    color: var(--hm-text);
    font-size: 1.35rem;
}

.hm-hero-stats span {
    display: block;
    margin-top: 4px;
    color: var(--hm-muted);
    font-size: 0.88rem;
}

/* Main */
.hm-bd-main {
    background:
        radial-gradient(circle at top left, rgba(244, 185, 66, 0.08), transparent 32%),
        radial-gradient(circle at bottom right, rgba(142, 92, 255, 0.10), transparent 28%),
        var(--hm-bg);
    color: var(--hm-text);
    padding: 90px 0;
}

.hm-intro-section,
.hm-stories-grid,
.hm-cta-section {
    width: min(1180px, 92%);
    margin: 0 auto;
}

.hm-section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.hm-section-heading h2,
.hm-cta-section h2 {
    margin: 18px 0 14px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--hm-text);
}

.hm-section-heading p,
.hm-cta-section p {
    color: var(--hm-muted);
    line-height: 1.8;
    font-size: 1rem;
}

/* Filtres */
.hm-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 34px 0 46px;
}

.hm-filter-btn {
    border: 1px solid var(--hm-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--hm-muted);
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: 0.3s ease;
}

.hm-filter-btn:hover,
.hm-filter-btn.active {
    color: #151006;
    border-color: transparent;
    background: linear-gradient(135deg, var(--hm-gold), var(--hm-orange));
}

/* Grille des histoires */
.hm-stories-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.hm-story-card {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid var(--hm-border);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
        var(--hm-card);
    box-shadow: var(--hm-shadow);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.hm-story-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(244, 185, 66, 0.32), transparent 35%, rgba(255, 61, 61, 0.22));
    opacity: 0;
    transition: 0.35s ease;
    pointer-events: none;
}

.hm-story-card:hover {
    transform: translateY(-8px);
    border-color: rgba(244, 185, 66, 0.38);
    box-shadow: 0 28px 95px rgba(0, 0, 0, 0.62);
}

.hm-story-card:hover::before {
    opacity: 1;
}

.hm-story-visual,
.hm-story-content {
    position: relative;
    z-index: 2;
}

.hm-story-visual {
    padding: 16px 16px 0;
}

.hm-art-frame {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(244,185,66,0.23), rgba(255,61,61,0.14)),
        #15151f;
}

.hm-art-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72)),
        var(--art);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: 0.55s ease;
}

.hm-story-card:hover .hm-art-frame::before {
    transform: scale(1.12);
}

.hm-art-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: translateX(-100%);
    transition: 0.75s ease;
}

.hm-story-card:hover .hm-art-frame::after {
    transform: translateX(100%);
}

.hm-visual-label {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 3;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.hm-concept-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 13px 0 0;
}

.hm-concept-strip span {
    padding: 8px 11px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 0.75rem;
}

.hm-story-content {
    padding: 26px;
}

.hm-story-tag {
    display: inline-block;
    color: var(--hm-gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hm-story-content h3 {
    color: #fff;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.15;
    margin-bottom: 14px;
}

.hm-story-content p {
    color: var(--hm-muted);
    line-height: 1.75;
    font-size: 0.96rem;
}

.hm-story-meta {
    display: grid;
    gap: 8px;
    margin: 20px 0 24px;
}

.hm-story-meta span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
}

.hm-story-meta span::before {
    content: "✦";
    color: var(--hm-gold);
    margin-right: 8px;
}

.hm-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hm-youtube-link,
.hm-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.88rem;
    transition: 0.3s ease;
}

.hm-youtube-link {
    color: #fff;
    background: linear-gradient(135deg, #ff2f2f, #b70000);
    box-shadow: 0 14px 35px rgba(255, 47, 47, 0.20);
}

.hm-youtube-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgba(255, 47, 47, 0.32);
}

.hm-more-link {
    color: var(--hm-text);
    border: 1px solid var(--hm-border);
    background: rgba(255, 255, 255, 0.06);
}

.hm-more-link:hover {
    border-color: rgba(244, 185, 66, 0.5);
    color: var(--hm-gold);
}

/* CTA */
.hm-cta-section {
    margin-top: 78px;
    padding: 44px;
    border-radius: 36px;
    border: 1px solid rgba(244, 185, 66, 0.22);
    background:
        radial-gradient(circle at 85% 20%, rgba(244,185,66,0.16), transparent 30%),
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-shadow: var(--hm-shadow);
}

/* Animation */
.animate-fade {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-fade.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
    .hm-stories-grid {
        grid-template-columns: 1fr;
    }

    .hm-cta-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .hm-hero-content {
        padding-top: 120px;
    }
}

@media (max-width: 640px) {
    .sub-header.hm-bd-header {
        min-height: auto;
    }

    .hm-hero-content {
        width: 90%;
        padding: 115px 0 70px;
        text-align: left;
    }

    .hm-hero-actions,
    .hm-card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hm-btn,
    .hm-youtube-link,
    .hm-more-link {
        width: 100%;
    }

    .hm-hero-stats {
        flex-direction: column;
    }

    .hm-hero-stats div {
        width: 100%;
    }

    .hm-bd-main {
        padding: 60px 0;
    }

    .hm-filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .hm-filter-btn {
        white-space: nowrap;
    }

    .hm-story-content {
        padding: 22px;
    }

    .hm-art-frame {
        min-height: 240px;
    }

    .hm-cta-section {
        padding: 28px;
        border-radius: 26px;
    }
}

/****************************************************************************************************/

/* ===============================
   POPUP CONCEPT ART
================================ */

.hm-concept-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.hm-concept-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hm-concept-modal-content {
    position: relative;
    width: min(980px, 96%);
    max-height: 90vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        radial-gradient(circle at 20% 10%, rgba(244, 185, 66, 0.18), transparent 30%),
        linear-gradient(145deg, rgba(22, 22, 32, 0.98), rgba(8, 8, 13, 0.98));
    box-shadow: 0 35px 120px rgba(0, 0, 0, 0.75);
    transform: scale(0.92) translateY(24px);
    transition: transform 0.35s ease;
}

.hm-concept-modal.active .hm-concept-modal-content {
    transform: scale(1) translateY(0);
}

.hm-concept-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    background: rgba(0, 0, 0, 0.55);
    transition: 0.3s ease;
}

.hm-concept-close:hover {
    background: rgba(255, 61, 61, 0.85);
    transform: rotate(90deg);
}

.hm-concept-modal-image {
    position: relative;
    min-height: 520px;
    overflow: hidden;
}

.hm-concept-modal-image img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    display: block;
}

.hm-concept-modal-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 55%);
    pointer-events: none;
}

.hm-concept-modal-category {
    position: absolute;
    left: 22px;
    bottom: 22px;
    z-index: 2;
    padding: 9px 15px;
    border-radius: 999px;
    color: #151006;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #f4b942, #ff8a2a);
}

.hm-concept-modal-text {
    padding: 54px 42px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hm-concept-modal-text h2 {
    margin: 20px 0 18px;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hm-concept-modal-text p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    line-height: 1.85;
}

.hm-concept-modal-actions {
    margin-top: 28px;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 820px) {
    .hm-concept-modal {
        padding: 14px;
    }

    .hm-concept-modal-content {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .hm-concept-modal-image {
        min-height: 300px;
    }

    .hm-concept-modal-image img {
        min-height: 300px;
    }

    .hm-concept-modal-text {
        padding: 34px 24px 28px;
    }
}


/* ===============================
   POPUP GALLERY CONTROLS
================================ */

.hm-gallery-btn {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 1.6rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: 0.3s ease;
}

.hm-gallery-btn:hover {
    background: linear-gradient(135deg, #f4b942, #ff8a2a);
    color: #160f05;
    transform: translateY(-50%) scale(1.08);
}

.hm-gallery-prev {
    left: 18px;
}

.hm-gallery-next {
    right: 18px;
}

.hm-gallery-counter {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 4;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
}

.hm-concept-modal-image img {
    transition: opacity 0.25s ease, transform 0.35s ease;
}

.hm-concept-modal-image img.is-changing {
    opacity: 0;
    transform: scale(0.98);
}

@media (max-width: 640px) {
    .hm-gallery-btn {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .hm-gallery-prev {
        left: 12px;
    }

    .hm-gallery-next {
        right: 12px;
    }

    .hm-gallery-counter {
        right: 16px;
        bottom: 16px;
        font-size: 0.75rem;
    }
}

/* =====================================================================
   PORT_HM_BD — STABILISATION CIBLÉE DE LA PAGE
   Cette couche est volontairement limitée à .hm-bd-page. Elle neutralise
   les règles historiques de style.css / contact.css sans modifier les
   autres pages du site.
   ===================================================================== */

html:has(body.hm-bd-page) {
    min-height: 100%;
    height: auto !important;
    overflow-x: clip !important;
    overflow-y: scroll !important;
    scrollbar-gutter: stable;
    background: var(--hm-bg);
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 185, 66, 0.78) #08080d;
}

html:has(body.hm-bd-page)::-webkit-scrollbar {
    width: 13px;
}

html:has(body.hm-bd-page)::-webkit-scrollbar-track {
    background: #08080d;
    border-left: 1px solid rgba(244, 185, 66, 0.14);
}

html:has(body.hm-bd-page)::-webkit-scrollbar-thumb {
    min-height: 56px;
    border: 3px solid #08080d;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--hm-gold), var(--hm-orange));
}

body.hm-bd-page {
    --hm-nav-height: 78px;
    min-width: 0;
    min-height: 100%;
    height: auto !important;
    margin: 0;
    overflow-x: clip !important;
    overflow-y: visible !important;
    color: var(--hm-text);
    background: var(--hm-bg);
}

body.hm-bd-page *,
body.hm-bd-page *::before,
body.hm-bd-page *::after {
    box-sizing: border-box;
}

/* Une seule zone de défilement native : html. Les panneaux internes restent
   scrollables seulement lorsque le menu ou une popup le nécessite. */
body.hm-bd-page.menu-is-open,
html.site-menu-locked:has(body.hm-bd-page) {
    overflow: hidden !important;
    overscroll-behavior: none;
}

/* La barre reste fixe, au-dessus du contenu et s'arrête avant la scrollbar. */
body.hm-bd-page nav.sticky-nav {
    position: fixed !important;
    inset: 0 var(--site-scrollbar-width, 0px) auto 0 !important;
    width: auto !important;
    height: var(--hm-nav-height) !important;
    min-height: var(--hm-nav-height) !important;
    padding: 10px clamp(18px, 3vw, 42px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: clamp(12px, 2vw, 30px);
    z-index: 1000001 !important;
    overflow: visible !important;
    background: rgba(7, 7, 12, 0.94) !important;
    border-bottom: 1px solid rgba(244, 185, 66, 0.20);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    isolation: isolate;
}

body.hm-bd-page nav.sticky-nav > a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

body.hm-bd-page nav.sticky-nav #logoNav {
    display: block;
    width: clamp(112px, 10vw, 138px) !important;
    height: auto;
}

/* Tous les blocs de la page restent derrière la barre fixe. */
body.hm-bd-page .sub-header.hm-bd-header,
body.hm-bd-page .hm-bd-main,
body.hm-bd-page .main-footer {
    position: relative;
    z-index: 0 !important;
}

body.hm-bd-page .sub-header.hm-bd-header {
    min-height: max(700px, 100svh);
    padding: 0;
    isolation: isolate;
}

body.hm-bd-page .hm-hero-content {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: calc(var(--hm-nav-height) + clamp(58px, 9vh, 110px)) 0 clamp(56px, 8vh, 96px);
}

/* Réduit le coût de rendu des cartes hors écran sur les longues pages. */
body.hm-bd-page .hm-story-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 690px;
}

body.hm-bd-page .hm-story-card[hidden] {
    display: none !important;
}

body.hm-bd-page .hm-story-card.is-filtering-out {
    opacity: 0;
    transform: translateY(16px) !important;
    pointer-events: none;
}

/* =====================================================================
   NAVIGATION DESKTOP — 13, 14 et 16 pouces
   ===================================================================== */
body.hm-bd-page .mobile-menu-toggle,
body.hm-bd-page .mobile-menu-close {
    display: none;
}

@media (min-width: 1121px) {
    body.hm-bd-page .nav-links {
        position: static !important;
        right: auto !important;
        display: block !important;
        flex: 1 1 auto;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        text-align: right !important;
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
        transition: none !important;
    }

    body.hm-bd-page .nav-links > ul {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.hm-bd-page .nav-links > ul > li {
        display: block !important;
        flex: 0 0 auto;
        width: auto !important;
        margin: 0 !important;
        padding: 8px clamp(6px, 0.64vw, 11px) !important;
    }

    body.hm-bd-page .nav-links > ul > li > a {
        display: inline-flex !important;
        align-items: center;
        width: auto !important;
        padding: 0 !important;
        color: #f5f5f7 !important;
        font-size: clamp(0.68rem, 0.72vw, 0.82rem) !important;
        line-height: 1.3;
        white-space: nowrap;
    }

    body.hm-bd-page .nav-links .dropdown-content,
    body.hm-bd-page .nav-links .services-dropdown-content,
    body.hm-bd-page .nav-links .portfolio-dropdown-content {
        z-index: 1000002 !important;
    }
}

@media (min-width: 1121px) and (max-width: 1499px) {
    body.hm-bd-page nav.sticky-nav {
        padding-inline: clamp(16px, 2.1vw, 30px) !important;
        gap: 12px;
    }

    body.hm-bd-page .nav-links > ul > li {
        padding-inline: clamp(4px, 0.48vw, 8px) !important;
    }

    body.hm-bd-page .nav-links > ul > li > a {
        font-size: clamp(0.64rem, 0.67vw, 0.75rem) !important;
    }

    body.hm-bd-page .hm-hero-content {
        width: min(1180px, calc(100% - 56px));
        padding-top: calc(var(--hm-nav-height) + clamp(38px, 6vh, 72px));
        padding-bottom: 48px;
    }

    body.hm-bd-page .hm-hero-content h1 {
        max-width: 760px;
        font-size: clamp(3.25rem, 4.8vw, 4.65rem);
    }

    body.hm-bd-page .hm-hero-content p {
        max-width: 660px;
        line-height: 1.62;
    }

    body.hm-bd-page .hm-hero-actions {
        margin-top: 24px;
    }

    body.hm-bd-page .hm-hero-stats {
        margin-top: 30px;
    }

    body.hm-bd-page .hm-hero-stats div {
        min-width: 138px;
        padding: 15px 18px;
    }
}

/* =====================================================================
   MENU TABLETTE / MOBILE — jusqu'à 1120 px
   Le panneau est déplacé dans <body> par SmallResolution.js. Les règles
   ci-dessous sont donc volontairement liées à body, non à nav.
   ===================================================================== */
@media (max-width: 1120px) {
    body.hm-bd-page {
        --hm-nav-height: 72px;
    }

    body.hm-bd-page nav.sticky-nav {
        padding: 9px 18px !important;
    }

    body.hm-bd-page .mobile-menu-toggle,
    body.hm-bd-page .mobile-menu-close {
        appearance: none;
        border: 0;
        font: inherit;
    }

    body.hm-bd-page .mobile-menu-toggle {
        position: relative;
        z-index: 3;
        display: grid !important;
        place-content: center;
        gap: 5px;
        flex: 0 0 auto;
        width: 46px;
        height: 46px;
        padding: 0;
        cursor: pointer;
        border: 1px solid rgba(244, 185, 66, 0.40);
        border-radius: 15px;
        background: linear-gradient(145deg, rgba(255,255,255,0.10), rgba(244,185,66,0.08));
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
        transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
    }

    body.hm-bd-page .mobile-menu-toggle span {
        display: block;
        width: 21px;
        height: 2px;
        border-radius: 999px;
        background: #ffffff;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }

    body.hm-bd-page .mobile-menu-toggle:hover,
    body.hm-bd-page .mobile-menu-toggle:focus-visible {
        border-color: var(--hm-gold);
        background: rgba(244, 185, 66, 0.18);
        transform: translateY(-2px);
        outline: none;
    }

    body.hm-bd-page .nav-links {
        position: fixed !important;
        inset: 0 0 0 auto !important;
        z-index: 2147483646 !important;
        display: block !important;
        width: min(88vw, 396px) !important;
        max-width: 396px !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        margin: 0 !important;
        padding: 0 0 calc(26px + env(safe-area-inset-bottom)) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        text-align: left !important;
        background: linear-gradient(180deg, #14121a 0%, #08080d 100%) !important;
        border-left: 1px solid rgba(244, 185, 66, 0.25);
        box-shadow: -22px 0 58px rgba(0, 0, 0, 0.55);
        opacity: 1 !important;
        filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transform: translate3d(104%, 0, 0) !important;
        transition: none !important;
        will-change: auto;
    }

    body.hm-bd-page .nav-links.menu-motion-ready {
        transition: transform 0.32s cubic-bezier(.2, .8, .2, 1) !important;
        will-change: transform;
    }

    body.hm-bd-page .nav-links.menu-open {
        transform: translate3d(0, 0, 0) !important;
    }

    body.hm-bd-page .nav-links.menu-transition-disabled,
    body.hm-bd-page.is-resizing .nav-links,
    body.hm-bd-page.is-resizing .site-menu-backdrop {
        transition: none !important;
    }

    body.hm-bd-page .mobile-menu-close {
        position: sticky;
        top: 14px;
        z-index: 4;
        display: grid !important;
        place-items: center;
        width: 46px;
        height: 46px;
        margin: 14px 14px 0 auto;
        cursor: pointer;
        border: 1px solid rgba(255, 255, 255, 0.20);
        border-radius: 15px;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.10);
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
    }

    body.hm-bd-page .mobile-menu-close:hover,
    body.hm-bd-page .mobile-menu-close:focus-visible {
        border-color: var(--hm-gold);
        color: #1a1103;
        background: linear-gradient(135deg, var(--hm-gold), var(--hm-orange));
        outline: none;
    }

    body.hm-bd-page .mobile-menu-close .fa {
        display: block !important;
        margin: 0;
        color: inherit;
        font-size: 1.35rem;
    }

    body.hm-bd-page .nav-links > ul {
        display: block !important;
        margin: 0 !important;
        padding: 16px 20px 34px !important;
    }

    body.hm-bd-page .nav-links > ul > li {
        display: block !important;
        width: 100% !important;
        margin: 0 0 7px !important;
        padding: 0 !important;
    }

    body.hm-bd-page .nav-links > ul > li::after {
        display: none !important;
    }

    body.hm-bd-page .nav-links > ul > li > a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100% !important;
        min-height: 48px;
        padding: 12px 13px !important;
        border-radius: 13px;
        color: #ffffff !important;
        font-size: 0.91rem !important;
        font-weight: 700;
        line-height: 1.35;
        text-decoration: none;
    }

    body.hm-bd-page .nav-links > ul > li:not(.dropdown) > a:hover,
    body.hm-bd-page .nav-links > ul > li:not(.dropdown) > a:focus-visible {
        background: rgba(244, 185, 66, 0.12);
        outline: none;
    }

    body.hm-bd-page .nav-links .dropdown:hover > .dropdown-content,
    body.hm-bd-page .nav-links .services-dropdown:hover > .services-dropdown-content,
    body.hm-bd-page .nav-links .portfolio-dropdown:hover > .portfolio-dropdown-content {
        display: none !important;
    }

    body.hm-bd-page .nav-links .dropdown.open > .dropdown-content,
    body.hm-bd-page .nav-links .dropdown.open:hover > .dropdown-content {
        display: block !important;
    }

    body.hm-bd-page .nav-links .dropdown-content,
    body.hm-bd-page .nav-links .services-dropdown-content,
    body.hm-bd-page .nav-links .portfolio-dropdown-content {
        position: static !important;
        display: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 5px 0 12px !important;
        padding: 8px !important;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.055) !important;
        border: 1px solid rgba(255, 255, 255, 0.11) !important;
        border-radius: 14px !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    body.hm-bd-page .nav-links .dropdown-content > li {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.hm-bd-page .nav-links .dropdown-content > li::after {
        display: none !important;
    }

    body.hm-bd-page .nav-links .services-dropdown-content > li > a,
    body.hm-bd-page .nav-links .portfolio-dropdown-content > li > a {
        display: grid !important;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: start;
        width: 100% !important;
        margin: 0 !important;
        padding: 10px !important;
        gap: 10px;
        border-radius: 10px;
        color: #ffffff !important;
        white-space: normal !important;
        transform: none !important;
    }

    body.hm-bd-page .nav-links .service-icon,
    body.hm-bd-page .nav-links .portfolio-icon {
        display: grid !important;
        place-items: center;
        width: 38px;
        height: 38px;
        min-width: 38px;
        margin: 0;
        border-color: rgba(244, 185, 66, 0.28);
        background: rgba(244, 185, 66, 0.10);
    }

    body.hm-bd-page .nav-links .service-text,
    body.hm-bd-page .nav-links .portfolio-text {
        display: block !important;
        min-width: 0;
    }

    body.hm-bd-page .nav-links .service-text strong,
    body.hm-bd-page .nav-links .portfolio-text strong {
        display: block;
        color: #ffffff !important;
        font-size: 0.84rem;
        line-height: 1.3;
    }

    body.hm-bd-page .nav-links .service-text small,
    body.hm-bd-page .nav-links .portfolio-text small {
        display: block;
        margin-top: 3px;
        color: rgba(255, 255, 255, 0.78) !important;
        font-size: 0.70rem;
        line-height: 1.42;
        overflow-wrap: anywhere;
    }

    body.hm-bd-page .nav-links ul li.active-menu > a,
    body.hm-bd-page .nav-links ul li.active-parent > a {
        padding: 12px 13px !important;
        color: #ffffff !important;
        background: linear-gradient(90deg, rgba(244,185,66,0.20), rgba(244,185,66,0.05));
        border: 1px solid rgba(244,185,66,0.25);
        text-shadow: none;
    }

    /* Le backdrop assombrit uniquement la page. Il ne floute ni ne recouvre
       le panneau burger, placé avec un z-index supérieur. */
    body.hm-bd-page .site-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 2147483645 !important;
        display: block !important;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        background: rgba(0, 0, 0, 0.60) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transition: opacity 0.24s ease, visibility 0s linear 0.24s;
    }

    body.hm-bd-page .site-menu-backdrop.is-visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition: opacity 0.24s ease;
    }

    body.hm-bd-page .sub-header.hm-bd-header {
        min-height: 0;
    }

    body.hm-bd-page .hm-hero-content {
        width: min(900px, calc(100% - 48px));
        padding-top: calc(var(--hm-nav-height) + clamp(58px, 9vh, 92px));
        padding-bottom: 64px;
    }
}

@media (max-width: 700px) {
    body.hm-bd-page {
        --hm-nav-height: 68px;
    }

    body.hm-bd-page nav.sticky-nav {
        padding: 8px 14px !important;
    }

    body.hm-bd-page nav.sticky-nav #logoNav {
        width: 112px !important;
    }

    body.hm-bd-page .mobile-menu-toggle {
        width: 43px;
        height: 43px;
        border-radius: 14px;
    }

    body.hm-bd-page .nav-links {
        width: min(90vw, 390px) !important;
    }

    body.hm-bd-page .hm-hero-content,
    body.hm-bd-page .hm-intro-section,
    body.hm-bd-page .hm-stories-grid,
    body.hm-bd-page .hm-cta-section {
        width: calc(100% - 28px);
    }

    body.hm-bd-page .hm-hero-content {
        padding-top: calc(var(--hm-nav-height) + 52px);
        padding-bottom: 52px;
    }

    body.hm-bd-page .hm-hero-content h1 {
        font-size: clamp(2.45rem, 11.8vw, 3.45rem);
        line-height: 1.02;
        letter-spacing: -0.055em;
    }

    body.hm-bd-page .hm-hero-content p {
        font-size: 0.98rem;
        line-height: 1.68;
    }
}

/* =====================================================================
   POPUPS — au-dessus de la navigation, fermeture toujours accessible
   ===================================================================== */
body.hm-bd-page .hm-concept-modal {
    z-index: 2147483647 !important;
    padding: clamp(12px, 3vw, 24px);
    overscroll-behavior: contain;
}

body.hm-bd-page .hm-concept-modal-content {
    width: min(1020px, 100%);
    max-height: min(90svh, 840px);
    overflow: auto;
    overscroll-behavior: contain;
}

body.hm-bd-page .hm-concept-close {
    z-index: 30;
    top: 14px;
    right: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(8, 8, 13, 0.84);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.44);
}

body.hm-bd-page .hm-concept-modal-image {
    min-height: 0;
    background: #050508;
}

body.hm-bd-page .hm-concept-modal-image img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: contain;
    background: #050508;
}

body.hm-bd-page .hm-gallery-btn,
body.hm-bd-page .hm-gallery-counter {
    z-index: 12;
}

@media (max-width: 820px) {
    body.hm-bd-page .hm-concept-modal-content {
        max-height: calc(100dvh - 28px);
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    body.hm-bd-page .hm-concept-modal-image,
    body.hm-bd-page .hm-concept-modal-image img {
        min-height: 300px;
        height: min(46svh, 390px);
    }

    body.hm-bd-page .hm-concept-modal-text {
        padding: 34px 22px 26px;
    }
}

@media (max-width: 480px) {
    body.hm-bd-page .hm-concept-modal {
        padding: 10px;
    }

    body.hm-bd-page .hm-concept-modal-content {
        max-height: calc(100dvh - 20px);
        border-radius: 20px;
    }

    body.hm-bd-page .hm-concept-close {
        top: 10px;
        right: 10px;
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.hm-bd-page *,
    body.hm-bd-page *::before,
    body.hm-bd-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Le verrouillage ne s'applique que lorsqu'une popup est réellement ouverte. */
body.hm-bd-page.modal-open,
html:has(body.hm-bd-page.modal-open) {
    overflow: hidden !important;
    overscroll-behavior: none;
}

/* =====================================================================
   HOTFIX V2 — HERO : ACTIONS + STATISTIQUES TOUJOURS VISIBLES
   Corrige le découpage du hero hérité de style.css (height: 50vh +
   overflow: hidden). La correction ne concerne que Port_HM_BD.html.
   ===================================================================== */

/* Le hero doit pouvoir grandir avec son contenu : aucune action ou carte
   ne peut être coupée sur les écrans 13, 14, 16 pouces, tablettes ou mobile. */
body.hm-bd-page .sub-header.hm-bd-header {
    height: auto !important;
    min-height: max(700px, 100svh) !important;
    overflow: hidden !important;
}

/* Le contenu ne doit plus être verticalement centré dans une zone de hauteur
   contrainte : il se place naturellement sous la barre fixe et étend le hero. */
body.hm-bd-page .hm-hero-content {
    margin: 0 auto !important;
    min-width: 0;
}

/* Les deux CTA et les trois cartes restent des éléments réels du flux.
   Ils ne peuvent donc plus disparaître derrière la section suivante. */
body.hm-bd-page .hm-hero-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, max-content));
    align-items: stretch;
    justify-content: start;
    gap: 16px;
    min-width: 0;
}

body.hm-bd-page .hm-hero-actions .hm-btn {
    width: auto;
    min-width: 0;
    white-space: nowrap;
}

body.hm-bd-page .hm-hero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(640px, 100%);
    gap: 16px;
    margin-bottom: 0;
}

body.hm-bd-page .hm-hero-stats div {
    width: auto !important;
    min-width: 0;
}

/* 13–16 pouces et laptops à hauteur réduite : composition moins haute,
   mais sans réduire ni masquer les CTA / cartes. */
@media (min-width: 1121px) and (max-width: 1499px),
       (min-width: 1121px) and (max-height: 860px) {
    body.hm-bd-page .sub-header.hm-bd-header {
        min-height: 0 !important;
    }

    body.hm-bd-page .hm-hero-content {
        padding-top: calc(var(--hm-nav-height) + clamp(28px, 4.8vh, 54px)) !important;
        padding-bottom: clamp(42px, 5vh, 64px) !important;
    }

    body.hm-bd-page .hm-hero-content h1 {
        margin-top: 18px;
        margin-bottom: 15px;
        font-size: clamp(3.05rem, 4.45vw, 4.3rem);
        line-height: 0.98;
    }

    body.hm-bd-page .hm-hero-content p {
        line-height: 1.58;
    }

    body.hm-bd-page .hm-hero-actions {
        margin-top: 22px;
    }

    body.hm-bd-page .hm-hero-stats {
        margin-top: 24px;
        gap: 12px;
    }

    body.hm-bd-page .hm-hero-stats div {
        padding: 14px 16px;
        border-radius: 18px;
    }
}

/* Tablettes paysage et portrait : on conserve les deux boutons côte à côte
   dès que la largeur le permet, puis on passe proprement sur une colonne. */
@media (max-width: 1120px) {
    body.hm-bd-page .sub-header.hm-bd-header {
        height: auto !important;
        min-height: 0 !important;
    }

    body.hm-bd-page .hm-hero-content {
        padding-bottom: 66px !important;
    }

    body.hm-bd-page .hm-hero-stats {
        width: min(680px, 100%);
        margin-top: 34px;
    }
}

@media (max-width: 700px) {
    body.hm-bd-page .hm-hero-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        width: 100%;
    }

    body.hm-bd-page .hm-hero-actions .hm-btn {
        width: 100%;
        min-height: 52px;
        padding-inline: 18px;
        white-space: normal;
    }

    body.hm-bd-page .hm-hero-stats {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        gap: 10px;
        margin-top: 28px;
    }

    body.hm-bd-page .hm-hero-stats div {
        padding: 15px 16px;
        border-radius: 18px;
    }
}

@media (min-width: 701px) and (max-width: 1120px) {
    body.hm-bd-page .hm-hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =====================================================================
   HOTFIX V3 — NAVIGATION RÉELLEMENT FIXE AU SCROLL
   La navigation est remontée sous <body> par Port_HM_BD.js. Elle ne peut
   donc plus être affectée par le contexte du hero ou son overflow.
   Cette correction reste exclusive à Port_HM_BD.html.
   ===================================================================== */
body.hm-bd-page > nav.sticky-nav.hm-nav-isolated,
body.hm-bd-page nav.sticky-nav.hm-nav-isolated {
    position: fixed !important;
    top: 0 !important;
    right: var(--site-scrollbar-width, 0px) !important;
    bottom: auto !important;
    left: 0 !important;
    width: auto !important;
    margin: 0 !important;
    transform: translate3d(0, 0, 0) !important;
    z-index: 1000001 !important;
}

/* Le contenu défile toujours sous la barre fixe, jamais par-dessus. */
body.hm-bd-page .sub-header.hm-bd-header,
body.hm-bd-page .hm-bd-main,
body.hm-bd-page .main-footer {
    z-index: 0 !important;
}


/* =====================================================================
   HOTFIX V4 — POPUP IMAGE PLUS GRANDE + RESPONSIVE
   Objectif : mettre l'image de la carte popup en valeur sans modifier
   la structure HTML ni les fichiers partagés du site.
   ===================================================================== */

body.hm-bd-page .hm-concept-modal {
    padding: clamp(14px, 2.8vw, 42px) !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Base desktop : popup plus large, image prioritaire, texte conservé. */
body.hm-bd-page .hm-concept-modal-content {
    width: min(1480px, calc(100vw - 64px)) !important;
    max-height: calc(100dvh - 64px) !important;
    grid-template-columns: minmax(0, 1.62fr) minmax(320px, 0.78fr) !important;
    border-radius: clamp(24px, 2vw, 36px) !important;
    overflow: hidden !important;
}

/* La zone image devient le bloc dominant du popup. */
body.hm-bd-page .hm-concept-modal-image {
    min-height: clamp(560px, 72svh, 820px) !important;
    height: clamp(560px, 72svh, 820px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background:
        radial-gradient(circle at 50% 50%, rgba(244, 185, 66, 0.06), transparent 42%),
        #030306 !important;
}

/* L'image reste entière, mais elle profite de toute la largeur disponible. */
body.hm-bd-page .hm-concept-modal-image img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: transparent !important;
}

/* Le voile ne doit plus étouffer l'image : seulement une légère base basse
   pour garder le label et le compteur lisibles. */
body.hm-bd-page .hm-concept-modal-image::after {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.44) 0%,
        rgba(0, 0, 0, 0.18) 24%,
        transparent 54%
    ) !important;
}

/* Le panneau texte est compacté pour donner plus d'espace à l'image. */
body.hm-bd-page .hm-concept-modal-text {
    padding: clamp(34px, 3.2vw, 58px) clamp(28px, 3vw, 46px) !important;
}

body.hm-bd-page .hm-concept-modal-text h2 {
    font-size: clamp(2.05rem, 3.05vw, 4.1rem) !important;
    line-height: 1.02 !important;
}

body.hm-bd-page .hm-concept-modal-text p {
    font-size: clamp(0.95rem, 1vw, 1.08rem) !important;
    line-height: 1.78 !important;
}

/* Grands écrans 22, 23, 24 pouces et plus : image encore plus immersive. */
@media (min-width: 1700px) {
    body.hm-bd-page .hm-concept-modal-content {
        width: min(1760px, calc(100vw - 96px)) !important;
        grid-template-columns: minmax(0, 1.82fr) minmax(360px, 0.72fr) !important;
        max-height: calc(100dvh - 84px) !important;
    }

    body.hm-bd-page .hm-concept-modal-image {
        min-height: clamp(680px, 78svh, 980px) !important;
        height: clamp(680px, 78svh, 980px) !important;
    }

    body.hm-bd-page .hm-concept-modal-text {
        padding: clamp(42px, 3vw, 70px) clamp(34px, 2.6vw, 56px) !important;
    }
}

/* Laptops 14, 15 et 16 pouces : grand visuel sans couper le texte ni les boutons. */
@media (min-width: 1181px) and (max-width: 1699px) {
    body.hm-bd-page .hm-concept-modal-content {
        width: min(1420px, calc(100vw - 54px)) !important;
        grid-template-columns: minmax(0, 1.58fr) minmax(310px, 0.78fr) !important;
        max-height: calc(100dvh - 54px) !important;
    }

    body.hm-bd-page .hm-concept-modal-image {
        min-height: clamp(540px, 72svh, 760px) !important;
        height: clamp(540px, 72svh, 760px) !important;
    }

    body.hm-bd-page .hm-concept-modal-text {
        padding: clamp(30px, 2.8vw, 48px) clamp(24px, 2.5vw, 40px) !important;
    }

    body.hm-bd-page .hm-concept-modal-text h2 {
        font-size: clamp(2rem, 3vw, 3.65rem) !important;
    }
}

/* Tablette paysage / petits laptops : on garde une image dominante
   tout en évitant d'écraser la colonne texte. */
@media (min-width: 821px) and (max-width: 1180px) {
    body.hm-bd-page .hm-concept-modal {
        padding: 18px !important;
    }

    body.hm-bd-page .hm-concept-modal-content {
        width: calc(100vw - 36px) !important;
        max-height: calc(100dvh - 36px) !important;
        grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.86fr) !important;
        border-radius: 26px !important;
    }

    body.hm-bd-page .hm-concept-modal-image {
        min-height: clamp(460px, 66svh, 650px) !important;
        height: clamp(460px, 66svh, 650px) !important;
    }

    body.hm-bd-page .hm-concept-modal-text {
        padding: 32px 26px !important;
    }

    body.hm-bd-page .hm-concept-modal-text h2 {
        font-size: clamp(1.85rem, 3.8vw, 2.85rem) !important;
    }
}

/* Tablette portrait et mobile : image en haut, plus haute et lisible. */
@media (max-width: 820px) {
    body.hm-bd-page .hm-concept-modal-content {
        width: min(100%, calc(100vw - 24px)) !important;
        max-height: calc(100dvh - 24px) !important;
        grid-template-columns: 1fr !important;
        overflow-y: auto !important;
    }

    body.hm-bd-page .hm-concept-modal-image,
    body.hm-bd-page .hm-concept-modal-image img {
        min-height: clamp(320px, 58svh, 560px) !important;
        height: clamp(320px, 58svh, 560px) !important;
    }

    body.hm-bd-page .hm-concept-modal-text {
        padding: 30px 22px 26px !important;
    }
}

@media (max-width: 480px) {
    body.hm-bd-page .hm-concept-modal {
        padding: 8px !important;
    }

    body.hm-bd-page .hm-concept-modal-content {
        width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 16px) !important;
        border-radius: 20px !important;
    }

    body.hm-bd-page .hm-concept-modal-image,
    body.hm-bd-page .hm-concept-modal-image img {
        min-height: clamp(280px, 52svh, 430px) !important;
        height: clamp(280px, 52svh, 430px) !important;
    }

    body.hm-bd-page .hm-concept-modal-category {
        left: 14px !important;
        bottom: 14px !important;
        max-width: calc(100% - 110px);
        font-size: 0.68rem !important;
    }

    body.hm-bd-page .hm-gallery-counter {
        right: 14px !important;
        bottom: 14px !important;
    }
}

