/* clips.css - Page Highlights vidéo BleuBlancDunk */

.clips-wrap {
  padding-top: 20px;
  padding-bottom: 56px;
}

/* ── Loading / Empty ── */
.clips-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 20px;
  color: var(--muted, #64748b);
  font-size: 14px;
}

.clips-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0,0,0,.1);
  border-top-color: #0055A4;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.clips-empty {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #dbe2ea);
  border-radius: var(--radius-md, 14px);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted, #64748b);
  font-size: 14px;
  line-height: 1.7;
}

/* ── Date section ── */
.clips-date-section {
  margin-bottom: 32px;
}

.clips-date-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clips-date-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #dbe2ea);
}

/* ── Grid de cartes ── */
.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* ── Carte clip ── */
.clip-card {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #dbe2ea);
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, border-color .15s, transform .12s;
}

.clip-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #b6c5db;
  transform: translateY(-2px);
}

.clip-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0c1220 0%, #1a2540 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}

.clip-card__photo {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: bottom right;
  opacity: .92;
  filter: drop-shadow(-4px 0 12px rgba(0,0,0,.5));
  pointer-events: none;
}

.clip-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: .85;
  transition: opacity .12s, transform .12s;
  z-index: 1;
}

.clip-card:hover .clip-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}

.clip-card__info {
  padding: 12px 14px 14px;
}

.clip-card__name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink, #0f172a);
  margin: 0 0 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.clip-card__flag {
  font-size: 13px;
}

/* ── Overlay matchup sur la vignette ── */
.clip-card__matchup {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px 8px;
  background: linear-gradient(to top, rgba(8,12,24,.90) 0%, rgba(8,12,24,.30) 100%);
  z-index: 2;
}

.clip-card__mteam {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,.90);
  letter-spacing: .04em;
  min-width: 0;
}

.clip-card__mteam--r {
  flex-direction: row-reverse;
}

.clip-card__tlogo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}

.clip-card__mscore {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .01em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.clip-card__mscore strong {
  font-weight: 900;
}

.clip-card__result {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 5px;
  letter-spacing: .04em;
}

.clip-card__result--v {
  background: #dcfce7;
  color: #15803d;
}

.clip-card__result--d {
  background: #fee2e2;
  color: #b91c1c;
}

.clip-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink, #0f172a);
}

.clip-card__stats span {
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.clip-card__min {
  background: linear-gradient(135deg, #dbeafe, #ede9fe) !important;
  color: #3730a3 !important;
}

/* ── Modal ── */
.clips-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.clips-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 32, .75);
  backdrop-filter: blur(5px);
}

.clips-modal__inner {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: min(1280px, 96vw);
  max-height: 95vh;
  overflow: auto;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(12, 18, 32, .35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clips-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .12s;
}

.clips-modal__close:hover { background: #f1f5f9; }

.clips-modal__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink, #0f172a);
  margin: 0;
  padding-right: 40px;
}

.clips-modal__meta {
  font-size: 13px;
  color: var(--muted, #64748b);
  margin: 0;
}

.clips-modal__video {
  width: 100%;
  border-radius: 10px;
  margin-top: 8px;
  background: #000;
  max-height: 75vh;
}

/* ── Boutons actions modal ── */
.clips-modal__actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.clips-modal__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-family: inherit;
  transition: background .12s;
}

.clips-modal__btn--dark {
  background: #0f172a;
  color: #fff;
}

.clips-modal__btn--dark:hover { background: #1e293b; }

.clips-modal__btn--light {
  background: #f1f5f9;
  color: #0f172a;
}

.clips-modal__btn--light:hover { background: #e2e8f0; }

/* ── Mobile ── */
@media (max-width: 600px) {
  .clips-grid {
    grid-template-columns: 1fr;
  }

  .clips-modal__inner {
    padding: 14px;
  }
}
