/* card.css — poster cards (.short) parity with french-stream.net + info modal + hover action trio.
   Loaded after local.css / extra.css (coordinator). Owned by Agent A. */

/* ---------------------------------------------------------------- card */
.short-in { position: relative; }
.short .short-poster { position: relative; overflow: hidden; }
.short .short-poster img { transition: transform .6s cubic-bezier(.23, 1, .32, 1); }
.short:hover .short-poster img,
.short:focus-within .short-poster img { transform: scale(1.03); }

/* play mask: dark gradient + orange inset glow (reference .short-mask) and the play icon */
.short .short-mask {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  padding: 10px; text-align: center; opacity: 0; z-index: 5;
  background: linear-gradient(135deg, rgba(0,0,0,.15), rgba(0,0,0,.55));
  box-shadow: inset 0 0 0 0 rgba(255,120,0,.2);
  transition: opacity .35s ease, box-shadow .35s ease;
}
.short:hover .short-mask,
.short:focus-within .short-mask { opacity: 1; box-shadow: inset 0 0 8px 1px rgba(255,120,0,.35), inset 0 0 0 2px rgba(255,120,0,.4); }
.short .short-mask span.fa {
  width: 60px; height: 60px; line-height: 60px; font-size: 60px; border-radius: 50%;
  color: #f48625; background: #fff; margin: 0 auto;
  transform: scale(.85); transition: transform .35s cubic-bezier(.23, 1, .32, 1);
}
.short:hover .short-mask span.fa { transform: scale(1); }

.short .short-title {
  position: absolute; left: 0; bottom: 0; width: 100%; z-index: 10;
  padding: 26px 6px 8px; text-align: center; color: #fff; font-size: 13px; line-height: 1.25;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.95) 70%);
  transition: color .3s ease;
}
/* clamp on an inner span so nothing leaks through the padding (2 lines + ellipsis) */
.short .short-title > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.short:hover .short-title { color: #f0f0f0; }

/* badges (top-left column): version, then quality (films) or "Ep 06 sur 08" (séries) */
.short .film-version,
.short .film-quality {
  position: absolute; left: 2px; z-index: 6; display: inline-block;
  padding: 0; font-size: 0; line-height: 1; border-radius: 1px;
  transition: opacity .3s ease, transform .3s ease;
}
.short .film-version { top: 2px; }
.short .film-quality { top: 21px; }
.short .film-version a,
.short .film-quality a {
  display: block; padding: 2px 5px; font-size: 10px; line-height: 13px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase; color: #fff; cursor: default;
  background: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(30,20,0,.9));
  box-shadow: inset 0 0 0 .4px #dfdfdf, 0 0 1px rgba(255,204,0,.3);
  text-shadow: 0 0 1px rgba(0,0,0,.5); border-left: 1px solid rgba(255,204,0,.5); border-radius: 1px;
}
.short .film-quality a { color: #00ff88; }
.short .short-in .mli-eps {
  position: absolute; left: 2px; right: auto; top: 21px; bottom: auto; z-index: 6; height: auto; margin: 0;
  padding: 2px 5px; font-size: 10px; line-height: 13px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  color: #fff; text-shadow: 0 0 2px rgba(248,170,12,.8); white-space: nowrap;
  background: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(30,20,0,.9));
  box-shadow: inset 0 0 0 .4px #dfdfdf, 0 0 1px rgba(255,204,0,.3); border: 0; border-left: 1px solid rgba(255,204,0,.5); border-radius: 1px;
  transition: opacity .3s ease, transform .3s ease;
}
.short .short-in .mli-eps.mli-year { font-weight: 400; text-shadow: none; }
.short .short-in .mli-eps i { display: none; }

/* vote circle (top-right): TMDB score, colour by class */
.short .vote-circle {
  position: absolute; top: 2px; right: 2px; z-index: 6;
  min-width: 27px; height: 16px; padding: 0 4px; border-radius: 2px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.18);
}
.short .vote-circle.high { border-color: rgba(0,255,136,.45); }
.short .vote-circle.medium { border-color: rgba(244,134,37,.55); }
.short .vote-circle.low { border-color: rgba(229,9,20,.5); }
.short .vote-score { color: #fff; font-weight: 700; font-size: 10px; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.short .vote-circle.high .vote-score { color: #6dffb0; }
.short .vote-circle.medium .vote-score { color: #ffb45e; }

/* ℹ button: hidden until hover; the badges fade out to make room (reference modal15.css) */
.short .info-btn {
  position: absolute; top: 3px; left: 3px; z-index: 12;
  width: 22px; height: 22px; border-radius: 3px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30,20,0,.78); color: #ff8533; font-size: 17px; line-height: 1; font-weight: 700;
  font-family: Georgia, "Times New Roman", serif; text-transform: none;
  opacity: 0; transform: translateY(-10px); transition: all .3s ease; user-select: none;
}
.short .info-btn:hover, .short .info-btn:focus { background: #000; color: #fff; transform: scale(1.1); outline: none; }
.short:hover .film-version, .short:hover .film-quality, .short:hover .mli-eps,
.short:focus-within .film-version, .short:focus-within .film-quality, .short:focus-within .mli-eps { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.short:hover .info-btn, .short:focus-within .info-btn { opacity: 1; transform: translateY(0); }

/* hover action trio: heart (Ma liste) / play / star (À voir plus tard) */
.short .short-actions {
  position: absolute; left: 0; right: 0; bottom: 46px; z-index: 20;
  display: flex; justify-content: center; align-items: center; gap: 7px; margin: 0; padding: 0;
  opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; pointer-events: none;
}
.short:hover .short-actions, .short:focus-within .short-actions { opacity: 1; transform: translateY(0); pointer-events: auto; }
.short .short-actions .fav-btn,
.short .short-actions .play-btn,
.short .short-actions .later-btn {
  position: static; top: auto; right: auto; margin: 0; padding: 0; opacity: 1;
  width: 32px; height: 32px; line-height: 32px; border-radius: 50%; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.83); color: #fff; font-size: 14px; cursor: pointer; text-decoration: none;
  box-shadow: 0 0 1px 1px rgba(255,255,255,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: transform .2s ease, background .2s ease, color .2s ease; user-select: none;
}
.short .short-actions .play-btn { width: 36px; height: 36px; background: #f48625; color: #fff; font-size: 15px; padding-left: 3px; }
.short .short-actions > *:hover, .short .short-actions > *:focus { transform: scale(1.18); background: rgba(0,0,0,.9); color: #fff; outline: none; }
.short .short-actions .play-btn:hover, .short .short-actions .play-btn:focus { background: #ff9a3c; }
.short .short-actions > *:active { transform: scale(.9); }
.short .short-actions .fav-btn.is-fav { color: #e50914; }
.short .short-actions .fav-btn.is-fav:hover { color: #ff1a2a; text-shadow: 0 0 8px rgba(229,9,20,.6); }
.short .short-actions .later-btn.is-later { color: #e5a00d; }
.short .short-actions .later-btn.is-later:hover { color: #ffc107; text-shadow: 0 0 8px rgba(229,160,13,.6); }
.short .short-actions .fav-btn::after { content: none; }
/* tooltip above each action (reference .ul-act::after) */
.short .short-actions > [title] { position: relative; }
.short .short-actions > [title]::before {
  content: attr(title); position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.92); color: #fff; font-size: 11px; line-height: 1.3; font-weight: 500;
  padding: 4px 9px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.short .short-actions > [title]:hover::before { opacity: 1; }
.short .short-actions > [title]:first-child::before { left: 0; transform: none; }
.short .short-actions > [title]:last-child::before { left: auto; right: 0; transform: none; }

/* touch devices: no hover → ℹ always visible (top-right, under the vote) and the trio always shown */
@media (hover: none) {
  .short .info-btn { opacity: 1; transform: none; left: auto; right: 2px; top: 21px; width: 20px; height: 20px; font-size: 15px; }
  .short .short-actions { opacity: 1; transform: none; pointer-events: auto; bottom: 40px; gap: 6px; }
  .short .short-actions .fav-btn, .short .short-actions .later-btn { width: 28px; height: 28px; font-size: 12px; }
  .short .short-actions .play-btn { width: 32px; height: 32px; font-size: 13px; }
  .short .short-actions > [title]::before { display: none; }
  .short:hover .film-version, .short:hover .film-quality, .short:hover .mli-eps { opacity: 1; transform: none; pointer-events: auto; }
}
@media (max-width: 480px) {
  .short .short-title { font-size: 12px; padding: 22px 4px 6px; }
  .short .film-version a, .short .film-quality a, .short .short-in .mli-eps { font-size: 9px; padding: 2px 4px; }
}

/* ---------------------------------------------------------------- info modal (bottom sheet) */
.fs-info-overlay {
  position: fixed; inset: 0; z-index: 99998; background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.fs-info-overlay.open { opacity: 1; pointer-events: auto; }
.fs-info-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999;
  height: 36vh; min-height: 300px; max-height: 70vh;
  display: flex; overflow: hidden;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  border-top: 1px solid rgba(244,134,37,.45); border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.6), 0 -2px 0 rgba(244,134,37,.2);
  transform: translateY(110%); transition: transform .35s cubic-bezier(.2,.8,.3,1);
  font-family: inherit; color: #eee;
}
.fs-info-sheet.open { transform: translateY(0); }
.fs-info-handle { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 44px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); z-index: 5; }
#fs-info-sheet .fs-info-close {
  position: absolute; margin: 0; width: 34px; height: 34px; line-height: 34px; padding: 0;
  position: absolute; top: 14px; right: 14px; z-index: 6; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; border: 0; cursor: pointer; font-size: 18px; line-height: 34px; text-align: center;
  display: flex; align-items: center; justify-content: center; transition: background .15s, transform .15s;
}
#fs-info-sheet .fs-info-close:hover, #fs-info-sheet .fs-info-close:focus { background: rgba(229,9,20,.9); transform: scale(1.08); outline: none; }

/* left: trailer / poster (40 %) */
.fs-info-media { flex: 0 0 40%; position: relative; min-width: 0; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fs-info-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.fs-info-still { position: absolute; inset: 0; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.fs-info-still::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,.65), rgba(0,0,0,.35)); }
.fs-info-still.no-trailer { cursor: default; }
.fs-info-still .fs-info-play {
  position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; background: #f48625; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 26px; padding-left: 5px;
  box-shadow: 0 6px 24px rgba(0,0,0,.6); transition: transform .2s ease, background .2s ease;
}
.fs-info-still:hover .fs-info-play { transform: scale(1.1); background: #ff9a3c; }
.fs-info-still .fs-info-nolabel { position: relative; z-index: 1; color: #ddd; font-size: 13px; background: rgba(0,0,0,.65); padding: 8px 16px; border-radius: 20px; }
.fs-info-still .fs-info-cap { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 1; text-align: center; color: #fff; font-size: 12px; text-shadow: 0 1px 3px #000; }

/* right: info (60 %) */
.fs-info-body { flex: 1 1 60%; min-width: 0; display: flex; flex-direction: column; padding: 34px 32px 22px; overflow-y: auto; }
.fs-info-head { display: flex; gap: 16px; align-items: flex-start; }
.fs-info-poster { flex: 0 0 auto; width: 74px; height: 111px; border-radius: 6px; overflow: hidden; background: #222; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.fs-info-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fs-info-titles { min-width: 0; flex: 1; }
.fs-info-title { margin: 0 0 4px; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -.3px; color: #fff; }
.fs-info-sub { margin: 0 0 8px; font-size: 12px; color: #999; }
.fs-info-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.fs-info-meta span, .fs-info-meta a {
  display: inline-block; padding: 3px 9px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.15); text-decoration: none;
}
.fs-info-meta .m-year { color: #ffd699; border-color: rgba(255,214,153,.3); }
.fs-info-meta .m-vote { color: #ffb45e; border-color: rgba(244,134,37,.5); }
.fs-info-meta .m-vote .fa { color: #f48625; margin-right: 3px; }
.fs-info-meta .m-version { background: #f48625; color: #fff; border-color: #f48625; }
.fs-info-meta .m-cert { color: #ff8a8a; border-color: rgba(255,120,120,.4); }
.fs-info-meta .m-eps { color: #6dffb0; border-color: rgba(0,255,136,.35); }
.fs-info-meta a.m-genre { text-transform: none; font-weight: 600; color: #ccc; }
.fs-info-meta a.m-genre:hover { color: #fff; border-color: #f48625; }
.fs-info-desc { flex: 1; margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; color: #c8c8c8; overflow-y: auto; }
.fs-info-desc.is-loading { color: #888; font-style: italic; }
.fs-info-desc.is-error { color: #ff8a8a; }
.fs-info-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
#fs-info-sheet .fs-info-actions .fs-info-btn,
#fs-info-sheet .fs-info-actions .fav-btn,
#fs-info-sheet .fs-info-actions .later-btn {
  position: static; top: auto; right: auto; width: auto; height: auto; margin: 0; opacity: 1;
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px; border-radius: 8px; box-sizing: border-box;
  font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; text-decoration: none; user-select: none;
  background: transparent; color: #ddd; border: 1px solid rgba(255,255,255,.2); box-shadow: none;
  transition: background .15s, color .15s, transform .15s, box-shadow .15s;
}
#fs-info-sheet .fs-info-actions .fs-info-btn.primary { background: linear-gradient(135deg, #f48625, #ffa347); color: #000; border-color: transparent; box-shadow: 0 4px 14px rgba(244,134,37,.3); }
#fs-info-sheet .fs-info-actions .fs-info-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(244,134,37,.5); color: #000; }
#fs-info-sheet .fs-info-actions .fav-btn:hover, #fs-info-sheet .fs-info-actions .later-btn:hover, #fs-info-sheet .fs-info-actions .fs-info-btn.ghost:hover { background: rgba(255,255,255,.08); color: #fff; transform: none; }
#fs-info-sheet .fs-info-actions .fav-btn.is-fav { color: #ff3d4a; border-color: rgba(229,9,20,.6); }
#fs-info-sheet .fs-info-actions .fav-btn.is-fav::after { content: none; }
#fs-info-sheet .fs-info-actions .later-btn.is-later { color: #ffc107; border-color: rgba(229,160,13,.6); }

@media (max-width: 700px) {
  .fs-info-sheet { height: auto; min-height: 0; max-height: 88vh; flex-direction: column; }
  .fs-info-media { flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; }
  .fs-info-body { flex: 1 1 auto; padding: 16px 16px 14px; }
  .fs-info-poster { display: none; }
  .fs-info-title { font-size: 18px; }
  .fs-info-meta span, .fs-info-meta a { padding: 2px 7px; font-size: 10px; }
  .fs-info-desc { font-size: 12.5px; line-height: 1.5; max-height: 30vh; }
  .fs-info-actions { margin-top: 12px; }
  #fs-info-sheet .fs-info-actions .fs-info-btn, #fs-info-sheet .fs-info-actions .fav-btn, #fs-info-sheet .fs-info-actions .later-btn { flex: 1 1 auto; justify-content: center; padding: 10px 12px; font-size: 12px; }
  #fs-info-sheet .fs-info-close { top: 10px; right: 10px; width: 30px; height: 30px; font-size: 16px; }
}

/* small toast used when ui.js (Agent H) does not provide window.fsToast */
.fs-card-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100000; transform: translate(-50%, 20px);
  background: #2a2a2a; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 13px;
  border-left: 3px solid #f48625; box-shadow: 0 4px 20px rgba(0,0,0,.5); opacity: 0; transition: all .25s ease; pointer-events: none;
}
.fs-card-toast.show { opacity: 1; transform: translate(-50%, 0); }
body.fs-info-open { overflow: hidden; }
