/* ============================================================
   YWebsite — addon Vidéos (bloc vidéo + galerie de réalisations)
   Couleurs et rayons pilotés par les variables du thème actif,
   avec des replis neutres pour les thèmes qui ne les fournissent pas.
   ============================================================ */

/* --- Vidéo seule ---------------------------------------------------- */
.yw-video { margin: 0 0 1.6em; }
.yw-video-frame {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden;
    background: #000; border-radius: var(--radius, 8px);
}
.yw-video-frame iframe,
.yw-video-frame video {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.yw-video figcaption {
    margin-top: .55em; font-size: .92em; color: var(--color-muted, #777);
}

/* Façade clic-pour-charger */
.yw-video-facade {
    position: absolute; inset: 0; width: 100%; height: 100%;
    padding: 0; border: 0; background: #000; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.yw-video-facade img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: .82; transition: opacity .25s ease, transform .4s ease;
}
.yw-video-facade:hover img { opacity: 1; transform: scale(1.03); }

.yw-video-play {
    position: relative; z-index: 1; width: 74px; height: 74px; border-radius: 50%;
    background: rgba(0, 0, 0, .55); border: 2px solid #fff;
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s ease, background .2s ease;
}
.yw-video-play::after {
    content: ""; margin-left: 6px;
    border-style: solid; border-width: 13px 0 13px 22px;
    border-color: transparent transparent transparent #fff;
}
.yw-video-facade:hover .yw-video-play,
.yw-videos-thumb:hover .yw-video-play { transform: scale(1.08); background: rgba(0, 0, 0, .75); }

/* --- Galerie de réalisations ---------------------------------------- */
.yw-videos h2 { margin-bottom: .6em; }

.yw-videos-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.4em; }
.yw-videos-filter {
    padding: 7px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88em;
    background: transparent; color: var(--color-text, #222);
    border: 1px solid var(--color-border, #ccc);
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.yw-videos-filter:hover { border-color: var(--color-text, #222); }
.yw-videos-filter.on { background: var(--color-text, #222); color: var(--color-bg, #fff); border-color: var(--color-text, #222); }

.yw-videos-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px 22px;
}
.yw-videos-item.hide { display: none; }
.yw-videos-thumb {
    position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden;
    padding: 0; border: 0; background: #000; cursor: pointer;
    border-radius: var(--radius, 8px);
    display: flex; align-items: center; justify-content: center;
}
.yw-videos-thumb img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: .85; transition: opacity .25s ease, transform .4s ease;
}
.yw-videos-thumb:hover img { opacity: 1; transform: scale(1.04); }
.yw-videos-thumb .yw-video-play { width: 56px; height: 56px; }
.yw-videos-thumb .yw-video-play::after { border-width: 10px 0 10px 17px; margin-left: 4px; }

.yw-videos-item h3 { margin: .65em 0 .15em; font-size: 1.02em; line-height: 1.3; }
.yw-videos-cat {
    margin: 0; font-size: .78em; letter-spacing: .12em; text-transform: uppercase;
    color: var(--color-muted, #777);
}
.yw-videos-desc { margin: .3em 0 0; font-size: .9em; color: var(--color-muted, #777); }

/* --- Lecture en surimpression (lightbox) ----------------------------- */
.yw-video-lightbox {
    position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .93);
    display: flex; align-items: center; justify-content: center; padding: 4vmin;
}
.yw-video-lightbox-box {
    position: relative; width: min(1100px, 100%); aspect-ratio: 16 / 9; background: #000;
}
.yw-video-lightbox-box iframe,
.yw-video-lightbox-box video {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.yw-video-lightbox-close {
    position: absolute; top: 14px; right: 18px;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5);
    background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
.yw-video-lightbox-close:hover { background: rgba(255, 255, 255, .15); }
