/* ==========================================================================
   Home – page d'accueil (codes des pages Booking / Events / Demo / Mastering)
   S'appuie sur booking-page.css (boutons, titres de section, cartes artistes, apparitions)
   et tp-player.css (lecteur). Remplace home-styles.css sur cette page.
   ========================================================================== */

.hm { color: #fff; width: 100%; min-width: 0; }
.hm *, .hm *::before, .hm *::after { box-sizing: border-box; }
.hm h2, .hm h3, .hm p, .hm ul { margin: 0; padding: 0; }
.hm-wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.hm-section { padding-top: 96px; scroll-margin-top: 80px; }
.hm-section .bk-section-head { margin-top: 0; }
.hm-section .bk-section-head a { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #d6d6d6; text-decoration: none; white-space: nowrap; }
.hm-section .bk-section-head a:hover { color: #fff; }
.hm-section-lead { max-width: 620px; margin: -8px 0 24px !important; font-size: 14px; line-height: 1.6; color: #d6d6d6; }

/* ---------- Bandeau vidéo ---------- */
.hm-hero {
    position: relative;
    margin-top: var(--hdr, 67px);
    /* plein écran, plafonné à 900 px (min-height l'emporte sur max-height : on plafonne directement) */
    min-height: min(calc(100vh - var(--hdr, 67px)), 900px);
    min-height: min(calc(100svh - var(--hdr, 67px)), 900px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    /* fond de secours tant que la vidéo n'est pas chargée (ou si elle est indisponible) */
    background:
        radial-gradient(80% 60% at 75% 30%, #2c2d2c 0%, rgba(44,45,44,0) 70%),
        radial-gradient(60% 50% at 10% 90%, #1f2020 0%, rgba(31,32,32,0) 70%),
        #0d0e0d;
    border-bottom: 1px solid #4c4d4c;
}
.hm-hero-media { position: absolute; inset: 0; }
.hm-hero-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(13,14,13,.35) 0%, rgba(13,14,13,0) 30%, rgba(13,14,13,.55) 65%, rgba(13,14,13,.95) 100%),
        linear-gradient(90deg, rgba(13,14,13,.7) 0%, rgba(13,14,13,0) 60%);
    pointer-events: none;
}
.hm-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: end;
    gap: 40px;
    padding-top: 80px;
    padding-bottom: 56px;
}
.hm-hero h2 {
    font-size: clamp(42px, 7.5vw, 96px);
    line-height: .95;
    font-weight: 700;
    letter-spacing: -.02em;
    max-width: 780px;
}
.hm-hero h2 span { color: transparent; -webkit-text-stroke: 1.5px #fff; }
.hm-hero .bk-lead { margin-top: 20px !important; max-width: 520px; font-size: 16px; line-height: 1.6; color: #e2e2e2; }
.hm-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hm-sound {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font: inherit;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(13,14,13,.6);
    border: 1px solid rgba(255,255,255,.35);
    cursor: pointer;
}
.hm-sound:hover { background: rgba(13,14,13,.85); border-color: #fff; }
.hm-sound[hidden] { display: none; }
/* Invitation à défiler : bouton cliquable "Discover" qui mène aux dernières sorties */
.hm-scroll {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 18px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 14px 6px;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    opacity: .85;
    transition: opacity .2s;
}
.hm-scroll:hover { opacity: 1; }
.hm-scroll:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hm-scroll svg { width: 22px; height: 22px; animation: hmScroll 1.8s ease-in-out infinite; }
@keyframes hmScroll { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
html:has(.hm-hero) { scroll-behavior: smooth; }

/* Carte "New release" dans le bandeau */
.hm-new {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: rgba(13,14,13,.78);
    border: 1px solid #4c4d4c;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.hm-new[hidden] { display: none; }
.hm-new-cover { position: relative; width: 96px; height: 96px; border: 1px solid #4c4d4c; overflow: hidden; }
.hm-new-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-new-label { font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: #a7a8a7; }
.hm-new-label b { display: inline-block; margin-right: 6px; padding: 2px 6px; background: #fff; color: #0d0e0d; letter-spacing: .12em; }
.hm-new-title { display: block; margin-top: 8px; font-size: 16px; font-weight: 700; line-height: 1.2; }
.hm-new-artist { display: block; margin-top: 2px; font-size: 13px; color: #d6d6d6; }
.hm-new-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; }
.hm-new-links a { color: #d6d6d6; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid #4c4d4c; white-space: nowrap; }
.hm-new-links a:hover { color: #fff; border-color: #fff; }

/* Bouton lecture de la carte du bandeau (composant de release-cards.css, en plus petit) */
.hm-new .rel-play.play-button { left: auto; right: 6px; bottom: 6px; width: 34px; height: 34px; }
.hm-new .rel-play.play-button.is-current.is-playing { width: 34px; height: 34px; }

/* ---------- Chiffres clés ---------- */
.hm-stats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid #4c4d4c;
    background: #1b1b1b;
}
.hm-stats[hidden] { display: none; }
.hm-stats li { padding: 24px 16px; text-align: center; border-right: 1px solid #4c4d4c; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #a7a8a7; }
.hm-stats li:last-child { border-right: 0; }
.hm-stats strong { display: block; margin-bottom: 4px; font-size: clamp(26px, 3.5vw, 40px); letter-spacing: -.01em; color: #fff; }

/* ---------- Dernières releases ---------- */
.hm-releases-head-actions { display: flex; align-items: center; gap: 18px; }
.hm-play-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font: inherit;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #0d0e0d;
    background: #fff;
    border: 1px solid #fff;
    cursor: pointer;
}
.hm-play-all:hover { background: #d9d9d9; }
.hm-play-all svg { width: 12px; height: 12px; }

/* Grille : composant partagé css/release-cards.css (classe rel-grid) */
#articles-release article:nth-child(2) { transition-delay: .06s; }
#articles-release article:nth-child(3) { transition-delay: .12s; }
#articles-release article:nth-child(4) { transition-delay: .18s; }
#articles-release article:nth-child(5) { transition-delay: .24s; }
#articles-release article:nth-child(6) { transition-delay: .3s; }

/* ---------- Prochain événement ---------- */
.hm-event {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    border: 1px solid #4c4d4c;
    background: #1b1b1b;
    min-height: 320px;
}
.hm-event[hidden] { display: none; }
.hm-event-media { position: relative; overflow: hidden; background: #000; border-right: 1px solid #4c4d4c; min-height: 280px; display: block; }
.hm-event-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.hm-event-media img.hm-event-bg { object-fit: cover; filter: blur(28px) brightness(.45); transform: scale(1.2); }
.hm-event-media:hover img:not(.hm-event-bg) { transform: scale(1.03); }
.hm-event-body { display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.hm-event-when { display: flex; align-items: center; gap: 14px; }
.hm-event-date { flex-shrink: 0; width: 74px; text-align: center; border: 1px solid #4c4d4c; background: rgba(13,14,13,.97); }
.hm-event-date span { display: block; }
.hm-event-date .m { padding: 5px 0; font-size: 11px; font-weight: 700; letter-spacing: .2em; background: #fff; color: #0d0e0d; }
.hm-event-date .d { padding: 8px 0 2px; font-size: 30px; font-weight: 700; line-height: 1; }
.hm-event-date .y { padding-bottom: 7px; font-size: 11px; color: #a7a8a7; }
.hm-event-status { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #a7a8a7; }
.hm-event-status b { color: #fff; }
.hm-event h3 { font-size: clamp(24px, 3vw, 34px); line-height: 1.1; font-weight: 700; }
.hm-event-place { font-size: 14px; color: #d6d6d6; }
.hm-event-lineup { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.hm-event-lineup li { padding: 5px 10px; font-size: 12px; font-weight: 700; border: 1px solid #4c4d4c; }
.hm-event-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* ---------- Artistes (cartes de booking-page.css) ---------- */
.hm .bk-roster { display: grid; grid-template-columns: repeat(var(--bk-cols, 3), minmax(0, 1fr)); gap: 12px; }
.hm a.bk-card { text-decoration: none; }

/* ---------- Services ---------- */
.hm-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hm-service {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 230px;
    padding: 26px 24px 22px;
    border: 1px solid #4c4d4c;
    background: #1b1b1b;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    transition: border-color .3s, background-color .3s;
}
.hm-service::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.hm-service:hover { border-color: #8a8b8a; background: #202120; }
.hm-service:hover::before { transform: scaleX(1); }
.hm-service-num { font-size: 42px; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1px #8a8b8a; }
.hm-service h3 { font-size: 20px; font-weight: 700; margin-top: 6px !important; }
.hm-service p { font-size: 13px; line-height: 1.6; color: #d6d6d6; }
.hm-service-cta { margin-top: auto; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #fff; }
.hm-service-cta span { display: inline-block; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.hm-service:hover .hm-service-cta span { transform: translateX(5px); }
.hm-service:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Playlists ---------- */
/* « Watch & listen » : cartes playlists / vidéos (lecteur chargé au clic) */
.hm-media { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hm-media-card { display: block; padding: 0; text-align: left; color: #fff; background: #1b1b1b; border: 1px solid #4c4d4c; cursor: pointer; font: inherit; transition: border-color .25s, transform .3s cubic-bezier(.2,.7,.2,1); }
.hm-media-card:hover { border-color: #fff; transform: translateY(-3px); }
.hm-media-card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hm-media-art { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #0d0e0d; }
.hm-media-art::before { content: ""; position: absolute; inset: -20px; background: var(--art) center / cover no-repeat; filter: blur(22px) brightness(.55); }
.hm-media-art img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.hm-media-card[data-type="spotify"] .hm-media-art img { width: auto; height: 82%; margin: 4.5% auto 0; aspect-ratio: 1 / 1; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.hm-media-card:hover .hm-media-art img { transform: scale(1.04); }
.hm-media-play { position: absolute; left: 14px; bottom: 14px; width: 48px; height: 48px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: 0 6px 18px rgba(0,0,0,.45); transition: transform .25s; }
.hm-media-play::before { content: ""; margin-left: 4px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #0d0e0d; }
.hm-media-card:hover .hm-media-play { transform: scale(1.08); }
.hm-media-info { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.hm-media-tag { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #a7a8a7; }
.hm-media-title { font-size: 18px; font-weight: 700; line-height: 1.25; }

html.hm-media-open { overflow: hidden; }
.hm-media-dialog { width: min(960px, calc(100vw - 32px)); max-height: none; overflow: visible; padding: 0; color: #fff; background: #1b1b1b; border: 1px solid #4c4d4c; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.hm-media-dialog::backdrop { background: rgba(0,0,0,.82); }
.hm-media-dialog[open] { animation: hmMediaIn .3s cubic-bezier(.2,.7,.2,1); }
@keyframes hmMediaIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.hm-media-dialog-inner { position: relative; }
.hm-media-close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; font: inherit; font-size: 18px; color: #fff; background: rgba(13,14,13,.85); border: 1px solid #4c4d4c; cursor: pointer; }
.hm-media-close:hover { background: #343634; }
.hm-media-frame iframe { display: block; width: 100%; border: 0; }
.hm-media-frame.youtube iframe { aspect-ratio: 16 / 9; }
/* Vidéo : la fenêtre ne dépasse jamais la hauteur de l'écran (place gardée pour le bouton ✕) */
.hm-media-dialog:has(.hm-media-frame.youtube) { width: min(960px, calc(100vw - 32px), calc((100vh - 140px) * 16 / 9)); }
.hm-media-frame.spotify iframe { height: 452px; }

/* ---------- Suivez-nous ---------- */
.hm-follow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin-bottom: 96px;
    padding: 36px 32px;
    border: 1px solid #4c4d4c;
    background: linear-gradient(120deg, #1b1b1b 0%, #252525 100%);
}
.hm-follow h2 { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.1; }
.hm-follow p { margin-top: 8px !important; font-size: 14px; color: #d6d6d6; }
.hm-socials { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-socials a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    font-size: 13px;
    color: #fff;
    text-decoration: none;
    border: 1px solid #4c4d4c;
    background: #0d0e0d;
    transition: background-color .25s, color .25s, border-color .25s;
}
.hm-socials a:hover { background: #fff; color: #0d0e0d; border-color: #fff; }
.hm-socials svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
    .hm-scroll svg { animation: none; }
    html:has(.hm-hero) { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1055px) {
    #articles-release { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-stats li:nth-child(2) { border-right: 0; }
    .hm-stats li:nth-child(-n+2) { border-bottom: 1px solid #4c4d4c; }
}
@media (max-width: 900px) {
    .hm-hero-inner { grid-template-columns: 1fr; gap: 28px; }
    .hm-new { max-width: 420px; }
    .hm-event { grid-template-columns: 1fr; }
    .hm-event-media { border-right: 0; border-bottom: 1px solid #4c4d4c; aspect-ratio: 16 / 10; min-height: 0; }
    .hm-services { grid-template-columns: 1fr; }
    .hm-service { min-height: 0; }
    .hm-media { grid-template-columns: 1fr 1fr; }
    .hm-media-card:first-child { grid-column: 1 / -1; }
    .hm-follow { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .hm-section { padding-top: 64px; }
    .hm-hero { min-height: min(calc(92svh - var(--hdr, 67px)), 760px); }
    .hm-hero-inner { padding-bottom: 60px; }
    .hm-hero .bk-lead { font-size: 15px; }
    .hm-hero-actions .bk-btn { flex: 1 1 auto; justify-content: center; }
    .hm-scroll { display: none; }
    #articles-release { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm .bk-roster {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .hm .bk-roster::-webkit-scrollbar { display: none; }
    .hm .bk-card { scroll-snap-align: start; aspect-ratio: 4 / 5; }
    .hm-section .bk-section-head span { display: none; }
    .hm-releases-head-actions a { display: none; }
    .hm-event-body { padding: 20px 16px; }
    .hm-event-actions .bk-btn { flex: 1 1 auto; justify-content: center; }
    .hm-follow { padding: 26px 18px; margin-bottom: 64px; }
    .hm-media { grid-template-columns: 1fr; }
    .hm-media-card:first-child { grid-column: auto; }
    .hm-media-frame.spotify iframe { height: 380px; }
    .hm-media-close { top: 8px; right: 8px; z-index: 2; }
}
