/* GÉNÉRÉ depuis static/motion/index.html et gallery-presentation.css : ne pas éditer à la main.
   Feuille de la racine fantôme de la galerie (features.html). */
:host { all: initial; display: block; }

        
        

        :host {
            color-scheme: dark;
            --ink: #171257;
            --night: #0d0b38;
            --night-soft: #17134c;
            --coral: #ff797a;
            --coral-soft: #ff917d;
            --lavender: #b6bbfc;
            --paper: #fffaf8;
            --muted: #aaa8c6;
        }

        * { box-sizing: border-box; }
        
        .motion-body {
            margin: 0;
            min-height: 100%;
            overflow-x: hidden;
            color: var(--paper);
            background:
                radial-gradient(circle at 84% 8%, rgba(255, 121, 122, .16), transparent 27rem),
                radial-gradient(circle at 8% 32%, rgba(137, 144, 240, .12), transparent 32rem),
                var(--night);
            font-family: WcMotionInter, sans-serif;
            -webkit-font-smoothing: antialiased;
        }

        button, select { font: inherit; }
        button { color: inherit; }

        .shell {
            width: min(1480px, calc(100% - 48px));
            margin: 0 auto;
            padding: 44px 0 80px;
        }

        header {
            display: flex;
            align-items: end;
            justify-content: space-between;
            gap: 32px;
            margin-bottom: 42px;
        }

        .eyebrow {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 0 0 14px;
            color: var(--coral-soft);
            font-size: 12px;
            font-weight: 750;
            letter-spacing: .17em;
            text-transform: uppercase;
        }
        .eyebrow::before {
            width: 28px;
            height: 2px;
            content: '';
            border-radius: 999px;
            background: currentColor;
        }
        h1 {
            max-width: 820px;
            margin: 0;
            font-family: WcMotionAttribute, WcMotionInter, sans-serif;
            font-size: clamp(48px, 6.4vw, 96px);
            font-weight: 700;
            line-height: .9;
            letter-spacing: -.045em;
        }
        h1 span { color: var(--coral); }
        .lede {
            max-width: 620px;
            margin: 22px 0 0;
            color: var(--muted);
            font-size: 16px;
            line-height: 1.65;
        }

        .toolbar {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: none;
            padding: 7px;
            border: 1px solid rgba(255, 255, 255, .1);
            border-radius: 999px;
            background: rgba(255, 255, 255, .055);
            box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
            backdrop-filter: blur(18px);
        }
        .filters { display: flex; gap: 4px; }
        .filter, .language {
            min-height: 38px;
            border: 0;
            border-radius: 999px;
            background: transparent;
            cursor: pointer;
        }
        .filter {
            padding: 0 16px;
            color: var(--muted);
            font-size: 13px;
            font-weight: 650;
        }
        .filter:hover { color: #fff; }
        .filter[aria-pressed="true"] {
            color: var(--ink);
            background: var(--paper);
        }
        .language {
            padding: 0 30px 0 13px;
            color: #fff;
            background: var(--night-soft);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        .summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            margin: 0 2px 18px;
            color: var(--muted);
            font-size: 13px;
        }
        .summary strong { color: #fff; font-weight: 650; }
        /* Aide clavier : seulement dans la fenêtre de la démonstration, pas au-dessus de la grille. */
        .hint { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(13, 11, 56, .78); color: var(--muted); font-size: 13px; white-space: nowrap; backdrop-filter: blur(14px); }

        .grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 24px;
        }
        .motion-card {
            position: relative;
            min-width: 0;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, .1);
            border-radius: 24px;
            background: rgba(255, 255, 255, .04);
            box-shadow: 0 28px 70px rgba(0, 0, 0, .23);
            transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
        }
        .motion-card:hover,
        .motion-card:focus-within {
            z-index: 1;
            transform: translateY(-5px);
            border-color: rgba(255, 145, 125, .55);
            box-shadow: 0 34px 90px rgba(0, 0, 0, .34);
        }
        .motion-card[hidden] { display: none; }
        .preview {
            position: relative;
            overflow: hidden;
            aspect-ratio: 16 / 9;
            background: linear-gradient(145deg, #ff917d, #ff6e78);
        }
        .preview::after {
            position: absolute;
            inset: 0;
            content: '';
            pointer-events: none;
            background: linear-gradient(180deg, transparent 62%, rgba(7, 5, 34, .5));
        }
        iframe {
            display: block;
            width: 100%;
            height: 100%;
            border: 0;
            background: #ff797a;
        }
        .open-motion {
            position: absolute;
            z-index: 2;
            inset: 0;
            width: 100%;
            border: 0;
            background: transparent;
            cursor: zoom-in;
        }
        .open-motion:focus-visible {
            outline: 3px solid #fff;
            outline-offset: -6px;
        }
        .play {
            position: absolute;
            z-index: 1;
            right: 20px;
            bottom: 18px;
            display: grid;
            width: 48px;
            height: 48px;
            place-items: center;
            border: 1px solid rgba(255, 255, 255, .5);
            border-radius: 50%;
            background: rgba(13, 11, 56, .72);
            box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
            backdrop-filter: blur(10px);
            transition: transform .25s ease, background .25s ease;
        }
        .motion-card:hover .play { transform: scale(1.08); background: var(--coral); }
        .play svg { width: 15px; margin-left: 3px; }
        .meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 20px 22px 22px;
        }
        .meta h2 {
            margin: 0 0 6px;
            color: #fff;
            font-size: 18px;
            font-weight: 680;
            letter-spacing: -.02em;
        }
        .slug {
            margin: 0;
            color: var(--muted);
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 11px;
        }
        .tool {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            margin: 0;
            color: var(--coral-soft);
            font-size: 12px;
            font-weight: 600;
        }
        .tool svg { width: 13px; height: 13px; flex: none; }
        .plan {
            flex: none;
            padding: 7px 11px;
            border-radius: 999px;
            color: var(--coral-soft);
            background: rgba(255, 121, 122, .12);
            font-size: 10px;
            font-weight: 800;
            letter-spacing: .09em;
            text-transform: uppercase;
        }
        .plan.premium { color: var(--lavender); background: rgba(182, 187, 252, .12); }
        .plan.free { color: #9fe3c4; background: rgba(159, 227, 196, .12); }
        .plan .kind { margin-left: 6px; opacity: .75; }

        dialog {
            width: 100vw;
            max-width: none;
            height: 100vh;
            max-height: none;
            margin: 0;
            padding: 0;
            overflow: hidden;
            border: 0;
            background: var(--night);
        }
        dialog::backdrop { background: var(--night); }
        .viewer-frame { position: absolute; inset: 0; }
        .viewer-bar {
            position: fixed;
            z-index: 4;
            top: 20px;
            left: 20px;
            right: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            pointer-events: none;
        }
        .viewer-title, .viewer-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            pointer-events: auto;
        }
        .viewer-title {
            min-height: 44px;
            max-width: min(560px, calc(100vw - 220px));
            padding: 0 18px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, .14);
            border-radius: 999px;
            background: rgba(13, 11, 56, .78);
            color: #fff;
            font-size: 13px;
            font-weight: 650;
            text-overflow: ellipsis;
            white-space: nowrap;
            backdrop-filter: blur(14px);
        }
        .viewer-button {
            display: grid;
            width: 44px;
            height: 44px;
            place-items: center;
            border: 1px solid rgba(255, 255, 255, .14);
            border-radius: 50%;
            background: rgba(13, 11, 56, .78);
            cursor: pointer;
            backdrop-filter: blur(14px);
        }
        .viewer-button:hover { background: var(--coral); }
        .viewer-button svg { width: 18px; height: 18px; }

        @media (max-width: 900px) {
            .shell { width: min(100% - 28px, 720px); padding-top: 28px; }
            header { align-items: start; flex-direction: column; margin-bottom: 32px; }
            .toolbar { width: 100%; justify-content: space-between; }
            .grid { grid-template-columns: 1fr; }
        }
        @media (max-width: 540px) {
            h1 { font-size: 52px; }
            .lede { font-size: 14px; }
            .toolbar { align-items: stretch; flex-direction: column; border-radius: 20px; }
            .filters { display: grid; grid-template-columns: repeat(2, 1fr); }
            .language { width: 100%; }
            .hint { display: none; }
            .motion-card { border-radius: 18px; }
            .meta { padding: 16px; }
            .viewer-bar { top: 12px; left: 12px; right: 12px; }
            .viewer-title { max-width: calc(100vw - 132px); }
        }

        @media (prefers-reduced-motion: reduce) {
            
            .motion-card, .play { transition: none; }
        }
        .switch-link {
            display: inline-flex;
            margin-top: 18px;
            color: var(--coral-soft);
            font-size: 13px;
            font-weight: 650;
            text-decoration: none;
        }
        .switch-link:hover { text-decoration: underline; }
    
/* Palette des pages publiques, commune aux 16 thèmes de l'éditeur.
   Référence : component/home2/home2-shared-style.html. */
:host {
    color-scheme: light;
    --bleu: #1A156E;
    --corail: #FF797A;
    --corail-50: #FFF3F1;
    --corail-100: #FFE5E1;
    --bleu-50: #F3F4FF;
    --gallery-background: var(--corail-50);
    --gallery-surface: #FFFFFF;
    --gallery-text: var(--bleu);
    --gallery-muted: #595490;
    --gallery-border: var(--corail-100);
    --gallery-shadow: rgba(26, 21, 110, .06);
}
.motion-body { color: var(--gallery-text); background: var(--gallery-background); }
.shell { max-width: 1380px; padding-top: 64px; }
header { flex-direction: column; align-items: stretch; gap: 32px; }
.eyebrow { color: var(--gallery-muted); }
.eyebrow::before { background: var(--corail); }
h1 { max-width: 1100px; font-size: clamp(36px, 4.5vw, 64px); line-height: 1.12; letter-spacing: -.025em; }
h1 span { color: var(--gallery-text); }
.lede { max-width: 800px; color: var(--gallery-muted); margin-top: 20px; }
.toolbar { align-self: flex-start; border-color: var(--gallery-border); background: var(--gallery-surface); box-shadow: 0 8px 24px var(--gallery-shadow); backdrop-filter: none; }
.filter { color: var(--gallery-text); }
.filter:hover { color: var(--gallery-text); background: var(--corail-50); }
.filter[aria-pressed="true"] { color: var(--gallery-surface); background: var(--bleu); }
.language { color: var(--gallery-text); background: var(--bleu-50); }
.summary { color: var(--gallery-muted); }
.summary strong { color: var(--gallery-text); }
.hint { opacity: 1; }
.motion-card { border-color: var(--gallery-border); background: var(--gallery-surface); box-shadow: 0 12px 32px var(--gallery-shadow); }
.motion-card:hover, .motion-card:focus-within { border-color: var(--corail); box-shadow: 0 16px 40px var(--gallery-shadow); }
.meta h2 { color: var(--gallery-text); margin-bottom: 0; }
.slug, .switch-link, .safe-toggle { display: none; }
.plan, .plan.premium, .plan.free { color: var(--gallery-text); background: var(--corail-50); }
.plan.premium { background: var(--bleu-50); }
.plan.free { background: var(--gallery-background); }
.play, .viewer-button { color: #FFFFFF; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--bleu); outline-offset: 3px; }
.open-motion:focus-visible { outline: 3px solid #FFFFFF; outline-offset: -6px; }
.viewer-button:focus-visible { outline-color: #FFFFFF; }
@media (max-width: 900px) { .shell { padding-top: 36px; } .toolbar { align-self: stretch; } }
@media (max-width: 540px) { h1 { font-size: 36px; } .meta { align-items: flex-start; } .meta h2 { font-size: 16px; } }

/* Same lightweight posters as Discover; portrait applies to the opened player. */
.preview { aspect-ratio: 16 / 9; }
.poster-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview::after { background: none; }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }

/* Search and descriptions share the embedded application's live theme tokens. */
.search { display: flex; gap: 10px; max-width: 720px; margin: 0 0 28px; flex-wrap: wrap; }
.search input { flex: 1; min-width: 0; width: 100%; padding: 13px 18px; border: 1px solid var(--gallery-border); border-radius: 24px; font: inherit; color: var(--gallery-text); background: var(--gallery-surface); }
.search input::placeholder { color: var(--gallery-muted); opacity: 1; }
.search input:focus-visible { outline: 2px solid var(--gallery-text); outline-offset: 3px; }
.search button { padding: 10px 16px; border: 1px solid var(--gallery-border); border-radius: 24px; color: var(--gallery-text); background: var(--gallery-surface); cursor: pointer; }
.search button:hover { background: var(--gallery-background); }
.search [hidden], #emptySearch[hidden] { display: none; }
#emptySearch { color: var(--gallery-muted); }
.description { margin: -6px 22px 22px; color: var(--gallery-muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 540px) { .search input { flex-basis: 100%; } .description { margin: -4px 16px 16px; } }

/* Keep the language control above the heading, including on narrow screens. */
.language-toolbar { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.language-toolbar .language { width: auto; max-width: 100%; color: var(--gallery-text); background: var(--gallery-surface); border: 1px solid var(--gallery-border); letter-spacing: normal; text-transform: none; }
.language-toolbar .language:focus-visible { outline-color: var(--gallery-text); }
