/* ==========================================================================
   Vidéos du Sénat (extension WordPress)
   Marges, rayons et polices pilotés par des variables CSS issues des réglages.
   Responsive par « container queries » (s'adapte à la largeur réelle du bloc).
   ========================================================================== */

.yv-root { font-family: var(--yv-font); color: var(--yv-text); box-sizing: border-box; --yv-fs-k: 1; width: 100%; }
.yv-root *, .yv-root *::before, .yv-root *::after { box-sizing: border-box; }
.yv-root .yv-svg { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.14em; }
.yv-root .yv-scope { margin: var(--yv-wrap-m); padding: var(--yv-wrap-p); max-width: var(--yv-maxw); }
.yv-root [hidden] { display: none !important; }
.yv-root .yv-dot { width: .6em; height: .6em; border-radius: 50%; background: currentColor; display: inline-block; animation: yv-pulse 1.6s ease-out infinite; }
@keyframes yv-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 70% { box-shadow: 0 0 0 .5em rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

/* ---------- Présentation de la chaîne ---------- */
.yv-root .yv-intro {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px 22px;
  margin: var(--yv-intro-m); padding: var(--yv-intro-p); background: #fff; border-radius: var(--yv-radius); box-shadow: var(--yv-shadow);
  border-left: 6px solid var(--yv-btn-bg);
}
.yv-root .yv-intro__ico {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--yv-c1, #7f0000), var(--yv-c2, #c4302b)); color: #fff; font-size: 34px; box-shadow: 0 6px 16px rgba(196,48,43,.25);
}
.yv-root .yv-intro__ico img { width: 100%; height: 100%; object-fit: cover; }
.yv-root .yv-intro__title { margin: 0 0 4px; font-size: calc(var(--yv-f-pagetitle) * var(--yv-fs-k)); color: var(--yv-title-color); line-height: 1.2; font-weight: 700; }
.yv-root .yv-intro__text { margin: 0; font-size: calc(var(--yv-f-intro) * var(--yv-fs-k)); color: #5b6470; line-height: 1.55; }
.yv-root .yv-intro__chan { margin: 8px 0 0; font-size: calc(var(--yv-f-meta) * var(--yv-fs-k)); }
.yv-root .yv-intro__chan a { display: inline-flex; align-items: center; gap: 6px; color: #c4302b; font-weight: 700; }
.yv-root .yv-intro__side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.yv-root .yv-intro__stats { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.yv-root .yv-stat { min-width: 96px; padding: 9px 14px; border-radius: 14px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--yv-c1, #7f0000), var(--yv-c2, #c4302b)); }
.yv-root .yv-stat--light { background: #f3f4f6; color: #1f2a37; }
.yv-root .yv-stat__n { display: block; font-size: calc(var(--yv-f-stat) * var(--yv-fs-k)); font-weight: 800; line-height: 1.05; }
.yv-root .yv-stat__l { display: block; font-size: calc(var(--yv-f-badge) * var(--yv-fs-k)); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; opacity: .92; }
.yv-root .yv-btn--subscribe { background: #cc0000; color: #fff; font-weight: 700; }
.yv-root .yv-btn--subscribe:hover { filter: brightness(1.08); }
.yv-root .yv-notice { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: #fff8e1; border: 1px solid #ffe08a; color: #6d4c00; }
.yv-root .yv-notice__ico { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #ffecb3; color: #8d6e00; font-size: 17px; }
.yv-root .yv-notice__text { margin: 0; font-size: calc(var(--yv-f-intro) * var(--yv-fs-k) * .95); line-height: 1.5; }
.yv-root .yv-notice__admin { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed #ffd54f; font-size: .85em; color: #8a5a00; font-family: system-ui, sans-serif; }
.yv-root .yv-adminnote { margin: 0 0 14px; padding: 8px 12px; border-radius: 10px; background: #fff3e0; color: #8a4b00; font: 12.5px/1.4 system-ui, sans-serif; }

/* ---------- Recherche ---------- */
.yv-root .yv-filters { margin: var(--yv-filt-m); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.yv-root .yv-field { position: relative; display: flex; align-items: center; flex: 1 1 280px; max-width: 520px; }
.yv-root .yv-field__ico { position: absolute; left: 13px; color: #9aa1ab; font-size: 17px; pointer-events: none; }
.yv-root .yv-field input { width: 100%; font: inherit; font-size: calc(var(--yv-f-meta) * var(--yv-fs-k) * 1.08); padding: 10px 14px 10px 40px; border-radius: 999px; border: 1px solid #dfe3e8; background: #fff; color: #1f2a37; min-height: 44px; margin: 0; box-shadow: none; }
.yv-root .yv-field input:focus { outline: 2px solid var(--yv-btn-bg); outline-offset: 1px; }
.yv-root .yv-count { color: #8d949e; font-size: calc(var(--yv-f-meta) * var(--yv-fs-k)); }
.yv-root .yv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.yv-root .yv-noresult { text-align: center; color: #8d949e; padding: 24px; }

/* ---------- Vignette & lecteur ---------- */
.yv-root .yv-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; margin: 0; border: 0; cursor: pointer;
  background: #0b0b0b; overflow: hidden; border-radius: var(--yv-thumb-r); font: inherit;
}
.yv-root .yv-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .2s; }
.yv-root .yv-thumb:hover img, .yv-root .yv-thumb:focus-visible img { transform: scale(1.04); }
.yv-root .yv-thumb__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: var(--yv-play); height: calc(var(--yv-play) * .7); border-radius: calc(var(--yv-play) * .22);
  background: rgba(204,0,0,.92); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: calc(var(--yv-play) * .4);
  box-shadow: 0 6px 18px rgba(0,0,0,.35); transition: transform .2s ease, background .2s;
}
.yv-root .yv-thumb:hover .yv-thumb__play { transform: translate(-50%, -50%) scale(1.08); background: #ff0000; }
.yv-root .yv-thumb__dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.82); color: #fff; font: 600 12px/1.5 system-ui, sans-serif; }
.yv-root .yv-thumb__live { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; background: #cc0000; color: #fff; font: 800 11px/1.5 system-ui, sans-serif; letter-spacing: .06em; }
.yv-root .yv-thumb:focus-visible { outline: 3px solid var(--yv-btn-bg); outline-offset: 2px; }
.yv-root .yv-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--yv-thumb-r); background: #000; }

/* ---------- Vidéo vedette ---------- */
.yv-root .yv-featured-wrap { margin: var(--yv-feat-m); }
.yv-root .yv-featured {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); background: #fff; border-radius: var(--yv-radius);
  box-shadow: var(--yv-shadow); overflow: hidden;
}
.yv-root .yv-featured__media { background: #000; }
.yv-root .yv-featured__media .yv-thumb, .yv-root .yv-featured__media .yv-frame { border-radius: 0; height: 100%; }
.yv-root .yv-featured__info { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.yv-root .yv-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; margin-bottom: 8px;
  background: var(--yv-badge, #c4302b); color: #fff; font-weight: 800; font-size: calc(var(--yv-f-badge) * var(--yv-fs-k)); letter-spacing: .06em; text-transform: uppercase;
}
.yv-root .yv-featured__title { margin: 0 0 6px; font-size: calc(var(--yv-f-feat) * var(--yv-fs-k)); line-height: 1.3; color: var(--yv-title-color); font-weight: var(--yv-title-weight); overflow-wrap: anywhere; }
.yv-root .yv-featured__desc { margin: 4px 0 12px; font-size: calc(var(--yv-f-desc) * var(--yv-fs-k)); line-height: 1.6; color: var(--yv-text); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.yv-root .yv-featured__actions { margin-top: auto; display: flex; align-items: center; gap: var(--yv-btn-gap); flex-wrap: wrap; }

/* ---------- Grille ---------- */
.yv-root .yv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--yv-card-min, 0px), calc((100% - (var(--yv-cols) - 1) * var(--yv-col-gap)) / var(--yv-cols)))), 1fr));
  row-gap: var(--yv-row-gap); column-gap: var(--yv-col-gap); align-items: stretch;
}
.yv-root .yv-card {
  position: relative; margin: var(--yv-card-m); background: #fff; border-radius: var(--yv-radius); box-shadow: var(--yv-shadow);
  display: flex; flex-direction: column; min-width: 0; transition: transform .2s ease;
}
.yv-root .yv-card:hover { transform: translateY(var(--yv-hover)); }
.yv-root .yv-card.is-sharing { z-index: 20; transform: none; }
.yv-root .yv-card__media { overflow: hidden; border-radius: var(--yv-radius) var(--yv-radius) 0 0; }
.yv-root .yv-card__body { padding: var(--yv-body-p); flex: 1 1 auto; min-width: 0; }
.yv-root .yv-card__title {
  margin: var(--yv-title-m); font-size: calc(var(--yv-f-title) * var(--yv-fs-k)); line-height: 1.35; color: var(--yv-title-color); font-weight: var(--yv-title-weight);
  text-transform: var(--yv-title-tt); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--yv-title-lines); overflow: hidden;
}
.yv-root .yv-meta { margin: var(--yv-meta-m); display: flex; flex-wrap: wrap; gap: 4px 14px; color: #7a828c; font-size: calc(var(--yv-f-meta) * var(--yv-fs-k)); }
.yv-root .yv-meta span { display: inline-flex; align-items: center; gap: 5px; }
.yv-root .yv-card__desc { margin: var(--yv-desc-m); font-size: calc(var(--yv-f-desc) * var(--yv-fs-k)); line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--yv-desc-lines); overflow: hidden; }
.yv-root .yv-card__foot { margin: var(--yv-ft-m); padding: var(--yv-ft-p); display: flex; align-items: center; justify-content: flex-end; gap: var(--yv-btn-gap); }

/* Disposition « liste » */
.yv-root .yv-grid--liste { grid-template-columns: 1fr; }
.yv-root .yv-grid--liste .yv-card { display: grid; grid-template-columns: minmax(200px, 340px) 1fr auto; align-items: center; }
.yv-root .yv-grid--liste .yv-card__media { border-radius: var(--yv-radius) 0 0 var(--yv-radius); align-self: stretch; }
.yv-root .yv-grid--liste .yv-card__media .yv-thumb { height: 100%; }
.yv-root .yv-grid--liste .yv-card__foot { flex-direction: column; align-items: flex-end; }

/* ---------- Boutons, partage ---------- */
.yv-root .yv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; cursor: pointer;
  padding: var(--yv-btn-p); border-radius: 999px; border: 0; font: inherit; font-size: calc(var(--yv-f-btn) * var(--yv-fs-k)); line-height: 1.2; white-space: nowrap;
}
.yv-root .yv-btn .yv-svg { font-size: 1.25em; }
.yv-root .yv-btn--ghost { background: #f1f3f6; color: #374151; }
.yv-root .yv-btn--ghost:hover { background: #e3e7ec; }
.yv-root .yv-btn--ghost .yv-svg { color: #cc0000; }
.yv-root .yv-btn--primary { background: var(--yv-btn-bg); color: var(--yv-btn-fg); font-weight: 700; }
.yv-root .yv-btn--primary:hover { filter: brightness(1.08); }
.yv-root .yv-ico { position: relative; width: var(--yv-ico); height: var(--yv-ico); border-radius: 50%; border: 0; padding: 0; margin: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: #f1f3f6; color: #3d4652; font-size: calc(var(--yv-ico) * .5); }
.yv-root .yv-ico:hover { background: #e3e7ec; }
.yv-root .yv-share { position: relative; display: inline-flex; }
.yv-root .yv-share.is-open .yv-share__btn { background: var(--yv-btn-bg); color: var(--yv-btn-fg); }
.yv-root .yv-share__menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: max-content; max-width: min(340px, calc(100vw - 32px)); background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.18), 0 0 0 1px rgba(16,24,40,.06); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.yv-root .yv-share.is-up .yv-share__menu { top: auto; bottom: calc(100% + 10px); }
.yv-root .yv-featured .yv-share__menu { right: auto; left: 0; }
.yv-root .yv-share__head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; color: #1f2a37; font-size: 14px; }
.yv-root .yv-share__close { border: 0; background: #f1f3f6; color: #4b5563; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; padding: 0; }
.yv-root .yv-share__grid { display: grid; grid-template-columns: repeat(4, 68px); gap: 8px 6px; }
.yv-root .yv-share__item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; border: 0; background: none; padding: 6px 2px; border-radius: 12px; cursor: pointer; color: #374151; font: inherit; }
.yv-root .yv-share__item:hover { background: #f5f6f8; }
.yv-root .yv-share__ico { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--yv-net); color: #fff; font-size: 22px; }
.yv-root .yv-share__lbl { font-size: 11.5px; line-height: 1.2; text-align: center; color: #4b5563; }
.yv-root .yv-share__item.is-done .yv-share__ico { background: #2e7d32; }

/* ---------- Accordéon « Suivant » ---------- */
.yv-root .yv-acc { margin: var(--yv-acc-m); }
.yv-root .yv-acc__btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 13px 20px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; font-size: calc(var(--yv-f-btn) * var(--yv-fs-k) * 1.08); color: var(--yv-btn-bg); background: #fff; border: 2px solid var(--yv-btn-bg); }
.yv-root .yv-acc__btn:hover, .yv-root .yv-acc__btn:focus-visible { background: var(--yv-btn-bg); color: var(--yv-btn-fg); }
.yv-root .yv-acc__n { font-weight: 600; opacity: .8; font-size: .9em; }
.yv-root .yv-acc__n::before { content: "·"; margin-right: 10px; }
.yv-root .yv-acc__chev { font-size: 1.25em; transition: transform .3s ease; }
.yv-root .yv-acc.is-open .yv-acc__chev { transform: rotate(180deg); }
.yv-root .yv-acc.is-open .yv-acc__btn { margin-bottom: 20px; }
.yv-root .yv-acc__panel { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .4s ease, opacity .3s ease; }
.yv-root .yv-acc__inner { min-height: 0; overflow: hidden; padding: 4px 2px; margin: -4px -2px; }
.yv-root .yv-acc.is-open .yv-acc__inner { overflow: visible; }
html.yv-js .yv-root .yv-acc:not(.is-open) .yv-acc__panel, .yva .yv-root .yv-acc:not(.is-open) .yv-acc__panel { grid-template-rows: 0fr; opacity: 0; visibility: hidden; }
html:not(.yv-js) .yv-root .yv-acc__btn { display: none; }
.yva .yv-root .yv-acc__btn { display: flex; }

/* ---------- Fenêtre de lecture ---------- */
html.yv-noscroll { overflow: hidden; }
.yv-modal { position: fixed; inset: 0; z-index: 99999; background: rgba(8,10,14,.86); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity .2s; }
.yv-modal.is-on { opacity: 1; }
.yv-modal__box { width: min(1100px, 100%); }
.yv-modal__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; margin-bottom: 10px; font: 600 15px/1.4 system-ui, sans-serif; }
.yv-modal__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yv-modal__close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.yv-modal__close:hover { background: rgba(255,255,255,.28); }
.yv-modal__video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@container yvroot (max-width: 900px) {
  .yv-root .yv-featured { grid-template-columns: 1fr; }
  .yv-root .yv-intro { grid-template-columns: auto 1fr; }
  .yv-root .yv-intro__side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .yv-root .yv-intro__stats { justify-content: flex-start; }
}
@container yvroot (max-width: 640px) {
  .yv-root .yv-grid--liste .yv-card { grid-template-columns: 1fr; }
  .yv-root .yv-grid--liste .yv-card__media { border-radius: var(--yv-radius) var(--yv-radius) 0 0; }
  .yv-root .yv-grid--liste .yv-card__foot { flex-direction: row; justify-content: flex-end; }
  .yv-root .yv-featured__info { padding: 16px; }
}
@container yvroot (max-width: 520px) {
  .yv-root .yv-card__foot { position: relative; }
  .yv-root .yv-share { position: static; }
  .yv-root .yv-share__menu, .yv-root .yv-featured .yv-share__menu { left: 8px; right: 8px; width: auto; max-width: none; top: auto; bottom: calc(100% - 4px); }
  .yv-root .yv-featured__actions { position: relative; }
  .yv-root .yv-share__grid { grid-template-columns: repeat(4, 1fr); }
}
@container yvroot (max-width: 440px) {
  .yv-root .yv-intro { grid-template-columns: 1fr; gap: 12px; border-left-width: 0; border-top: 5px solid var(--yv-btn-bg); }
  .yv-root .yv-intro__side { flex-direction: column; align-items: stretch; }
  .yv-root .yv-stat { flex: 1 1 0; min-width: 0; }
  .yv-root .yv-btn--subscribe { width: 100%; }
}
@media (hover: none) { .yv-root .yv-card:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .yv-root .yv-card, .yv-root .yv-thumb img, .yv-root .yv-acc__panel { transition: none; } .yv-root .yv-dot { animation: none; } }

/* ---------- Protection contre les styles du thème ---------- */
.yv-root h2, .yv-root h3, .yv-root p { font-family: var(--yv-font); }
.yv-root h2::before, .yv-root h3::before, .yv-root li::before, .yv-root li::marker { content: none; }
.yv-root a, .yv-root a:hover, .yv-root a:focus { text-decoration: none; box-shadow: none; border-bottom: 0; }
.yv-root .yv-btn--primary, .yv-root .yv-btn--primary:hover, .yv-root .yv-btn--subscribe, .yv-root .yv-btn--subscribe:hover { color: #fff; }
.yv-root .yv-btn--ghost, .yv-root .yv-btn--ghost:hover { color: #374151; }
.yv-root .yv-btn, .yv-root .yv-share__item, .yv-root .yv-ico, .yv-root .yv-thumb { text-transform: none; letter-spacing: normal; box-shadow: none; }
.yv-root .yv-intro__stats li { margin: 0; }
.yv-root img { max-width: none; }

/* ---------- Bouton « Retour » ---------- */
.yv-root .yv-backbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: var(--yv-back-m); }
.yv-root .yv-btn--back {
  background: #fff; color: var(--yv-btn-bg); border: 1.5px solid color-mix(in srgb, var(--yv-btn-bg) 35%, #e3e7ef);
  font-weight: 700; box-shadow: 0 1px 3px rgba(16,24,40,.06);
}
.yv-root .yv-btn--back:hover, .yv-root .yv-btn--back:focus-visible { background: var(--yv-btn-bg); color: var(--yv-btn-fg); border-color: var(--yv-btn-bg); }
.yv-root .yv-btn--back .yv-svg { transition: transform .15s ease; }
.yv-root .yv-btn--back:hover .yv-svg { transform: translateX(-3px); }
.yv-root .yv-btn--reset .yv-svg { color: #6b7280; }
.yv-root .yv-scope > .yv-backbar:last-child { margin-top: 24px; }
