/**
 * VIDÉO V2 (v12) — compléments Portail pour le lecteur Sonaë : façade YouTube, consentement, minuteur,
 * avant-goût sonore, chapitres, panneau de fin, rail « continuer » sur écran étroit.
 * Tout le reste (panneau watch, fiche, notes, rails, colonne) vient de portail.css.
 *
 * @package SamRelaxe
 * @version 12.0.0
 */

/* ── Écran : façade avant YouTube ── */
.sp-player { position: relative; aspect-ratio: 16 / 9; background: var(--sr-night); border: var(--sr-hair) solid var(--sr-line); border-radius: .35rem; overflow: hidden; box-shadow: var(--sr-glow); }
.sp-player__poster { position: absolute; inset: 0; }
.sp-player__poster > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-player__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 18, 27, .05), rgba(3, 18, 27, .55)); pointer-events: none; }
.sp-player__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; display: grid; justify-items: center; gap: .7rem; color: var(--sr-cream); }
.sp-player__play i { width: 4.8rem; height: 4.8rem; border-radius: 50%; background: var(--sr-gold-gradient); display: grid; place-items: center; color: var(--sr-night); box-shadow: 0 0 0 .6rem rgba(215, 170, 87, .16), 0 0 2.4rem rgba(215, 170, 87, .45); transition: transform .35s var(--sr-ease), box-shadow .35s; }
.sp-player__play svg { width: 1.7rem; height: 1.7rem; margin-left: .25rem; }
.sp-player__play:hover i, .sp-player__play:focus-visible i { transform: scale(1.07); box-shadow: 0 0 0 .9rem rgba(215, 170, 87, .2), 0 0 3rem rgba(215, 170, 87, .6); }
.sp-player__play span { font-variant: small-caps; letter-spacing: .08em; font-size: .88rem; text-shadow: 0 1px 10px #000; }
.sp-player__dur { position: absolute; right: .7rem; bottom: .7rem; z-index: 1; padding: .2rem .55rem; border: var(--sr-hair) solid var(--sr-line); border-radius: .3rem; background: var(--sr-overlay); color: var(--sr-gold-bright); font-variant: small-caps; font-size: .85rem; }
.sp-player.is-live .sp-player__poster { display: none; }
#sr2YT, .sp-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sp-player__consent { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 1rem; background: var(--sr-overlay); backdrop-filter: blur(var(--sr-blur)); opacity: 0; transition: opacity .3s; }
.sp-player__consent.is-on { opacity: 1; }
.sp-player__consent[hidden] { display: none; }
.sp-consent { max-width: 28rem; text-align: center; display: grid; gap: .7rem; justify-items: center; }
.sp-consent__t { font-family: var(--sr-serif, inherit); font-size: 1.25rem; line-height: 1.15; color: var(--sr-gold-bright); font-variant: small-caps; }
.sp-consent > p:not(.sp-consent__t) { font-size: .9rem; }
.sp-consent__btns { display: flex; gap: .5rem; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ── Sous l'écran : avant-goût, minuteur ── */
.sp-audio-line .sp-btn[aria-pressed="true"] { background: var(--sr-gold); color: var(--sr-night); }
.sp-audio-line > label input { width: 6rem; }
@media (max-width: 600px) { .sp-audio-line { flex-wrap: wrap; } .sp-audio-line > label { flex: 1; justify-content: flex-end; } .sp-audio-line > label input { width: 7rem; } }
.sp-timer-line { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .2rem .3rem .5rem; }
.sp-timer-line > span:first-child { font-variant: small-caps; color: var(--sr-gold); font-size: .85rem; margin-right: .3rem; }
.sp-chip { border: var(--sr-hair) solid var(--sr-line); border-radius: 1rem; padding: .28rem .75rem; font-size: .8rem; line-height: 1.1; color: var(--sr-cream); background: var(--sr-light); transition: background .2s, color .2s; }
.sp-chip:hover { background: var(--sr-gold-shade); }
.sp-chip[aria-pressed="true"] { background: var(--sr-gold); color: var(--sr-night); border-color: var(--sr-gold); }
.sp-timer-line > p { flex-basis: 100%; margin: .1rem 0 0; font-size: .82rem; color: var(--sr-gold-bright); min-height: 1em; }

/* ── Fiche ── */
.sp-watch-copy > .sp-badge { margin-top: .4rem; gap: .35rem; }
.sp-badge img { width: 1.25rem; height: auto; }
.sp-watch-copy > .sp-tags > a { font-variant: small-caps; color: var(--sr-gold-bright); }
.sp-watch-copy > .sp-tags > a:hover { border-color: var(--sr-gold); }
.sp-after { margin-top: .9rem; padding: .8rem 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.sp-after[hidden] { display: none; }
.sp-after h3 { margin-bottom: .2rem; }
.sp-after p { font-size: .85rem; }

/* ── Notes ── */
.sp-video-notes .sp-ornament { margin-top: .5rem; text-align: left; }
.sp-chapter > b { font-weight: 400; min-width: 1.4rem; }
.sp-chapter > em { font-style: normal; color: var(--sr-gold); font-variant: small-caps; }
.sp-chapter[aria-current="true"] { color: var(--sr-gold-bright); }
.sp-chapter[aria-current="true"] > span { color: var(--sr-gold-bright); }
.sp-video-notes small { display: block; color: var(--sr-pale); margin-top: .5rem; }
.sp-guardian-q { font-style: italic; font-size: 1.05rem; line-height: 1.4; color: var(--sr-cream) !important; }
.sp-video-notes details { margin-top: .5rem; font-size: .85rem; }
.sp-video-notes summary { cursor: pointer; color: var(--sr-gold); font-variant: small-caps; }
.sp-video-notes details > div { margin-top: .5rem; color: var(--sr-pale); line-height: 1.4; white-space: pre-line; }
.sp-video-notes dl { row-gap: .55rem; }
.sp-video-notes dd a { color: var(--sr-gold-bright); text-decoration: underline; text-underline-offset: .25em; text-decoration-color: var(--sr-line); }

/* ── Cartes et rails ── */
.sp-video-thumb > img { object-fit: cover; display: block; }
.sp-video-card__t { min-width: 0; }
.sp-video-card small { display: block; margin-top: .2rem; font-size: .8rem; color: var(--sr-gold); }
.sp-recommended > h2 { margin-bottom: .8rem; }
.sp-recommended > .sp-btn { width: 100%; margin-top: .4rem; }
.sp-next-rail { display: none; }
@media (max-width: 1250px) { .sp-next-rail { display: block; } }

/* ── Pilule mobile (site-v2.js ajoute .is-visible après le seuil) ── */
.sr2-pill { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translate(-50%, 6rem); z-index: 40; opacity: 0; pointer-events: none; display: none; transition: transform .4s var(--sr-ease), opacity .3s; box-shadow: 0 .6rem 2rem rgba(0, 0, 0, .45), var(--sr-glow); }
.sr2-pill.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
@media (max-width: 900px) { .sr2-pill { display: inline-flex; } }
body.sr2-playing .sr2-pill { display: none; }

/* ── Ambiance de fond ── */
body.sr2-playing .sr2-realm-bg { opacity: .6; }
.sp-still .sr2-atmo { display: none; }
