/* ===================================
   IDENTS — STYLE PRINCIPAL
   idents.maximebertin.fr
   =================================== */

:root {
  --bg: #0a0a0e;
  --bg2: #111118;
  --bg3: #1a1a24;
  --surface: #16161f;
  --surface2: #1e1e2a;
  --border: rgba(255,255,255,0.07);
  --border-bright: rgba(255,255,255,0.14);

  --accent: #e8c547;
  --accent2: #ff6b35;
  --accent3: #4fc3f7;

  --text: #f0eee8;
  --text2: #9b99a6;
  --text3: #5a5870;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-accent: 0 0 30px rgba(232,197,71,0.15);

  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* NOISE */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

/* SELECTION */
::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }

/* ===================================
   HEADER
   =================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10,10,14,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.logo-icon { font-size: 20px; }
.logo-text { color: var(--text); letter-spacing: -0.01em; }
.logo-text em { color: var(--accent); font-style: normal; }

.main-nav {
  display: flex;
  gap: 8px;
  flex: 1;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-search-toggle {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.btn-search-toggle:hover { color: var(--text); background: var(--surface); }

.btn-admin {
  padding: 7px 16px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.btn-admin:hover { background: #f0cf5a; transform: translateY(-1px); }

.search-bar {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border-bright);
  padding: 12px 24px;
  display: none;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.2s ease;
}
.search-bar.open { display: flex; }

@keyframes slideDown {
  from { opacity:0; transform:translateY(-8px); }
  to { opacity:1; transform:translateY(0); }
}

.search-bar input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--accent); }
.search-close {
  background: none; border: none; color: var(--text2); cursor: pointer; font-size: 16px; padding: 8px;
  border-radius: 6px; transition: all 0.2s;
}
.search-close:hover { color: var(--text); background: var(--surface); }

/* ===================================
   HERO
   =================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--header-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 50%, rgba(232,197,71,0.04) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 80% 20%, rgba(255,107,53,0.06) 0%, transparent 60%);
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  opacity: 0.4;
}

.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  right: 15%; top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(232,197,71,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0.9;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(72px, 10vw, 140px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
  max-width: 600px;
}

.hero-title span {
  color: var(--accent);
  -webkit-text-stroke: 2px var(--accent);
  text-stroke: 2px var(--accent);
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text2);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  color: var(--text);
  letter-spacing: 0.02em;
}

.stat-label {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-bright);
}

/* TV DECORATION */
.hero-tv {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  opacity: 0.25;
  pointer-events: none;
}

.tv-frame {
  position: relative;
  width: 300px;
  padding: 20px;
  background: linear-gradient(135deg, #2a2a3a, #1a1a28);
  border-radius: 20px 20px 10px 10px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8), inset 0 0 0 3px rgba(255,255,255,0.05);
}

.tv-screen {
  aspect-ratio: 4/3;
  background: #050508;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}

.tv-static {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
  background-size: cover;
  opacity: 0.4;
  animation: staticFlicker 0.1s infinite;
}

@keyframes staticFlicker {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.45; }
}

.tv-text {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 32px;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.5em;
}

.tv-stand {
  width: 60px;
  height: 24px;
  background: #1a1a28;
  margin: 0 auto;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* ===================================
   FILTERS
   =================================== */
.filters-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 50;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.filters-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.filter-group label {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
}

.filter-group select, .filter-group input {
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 9px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a5870' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.filter-group select:focus { border-color: var(--accent); }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 12px;
}

.filter-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(232,197,71,0.1);
  border: 1px solid rgba(232,197,71,0.2);
  border-radius: 20px;
  font-size: 12px;
  color: var(--accent);
}

.filter-tag button {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0;
}

/* ===================================
   MAIN CONTENT / VIDEO GRID
   =================================== */
.main-content {
  padding: 48px 0 80px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.03em;
}

.results-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text3);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* VIDEO CARD */
.video-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  animation: fadeInUp 0.4s ease both;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

@keyframes fadeInUp {
  from { opacity:0; transform:translateY(16px); }
  to { opacity:1; transform:translateY(0); }
}

.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg3);
}

.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.video-card:hover .card-thumb img { transform: scale(1.04); }

.card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, var(--bg3), var(--surface2));
  color: var(--text3);
}

.card-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background 0.2s;
}

.card-play-btn::after {
  content: '';
  width: 44px; height: 44px;
  background: rgba(232,197,71,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230a0a0e'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'/%3E%3C/svg%3E");
  background-size: 18px;
  background-repeat: no-repeat;
  background-position: 55% 50%;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s;
}

.video-card:hover .card-play-btn { background: rgba(0,0,0,0.3); }
.video-card:hover .card-play-btn::after { opacity: 1; transform: scale(1); }

.card-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.card-chaine-badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.card-body {
  padding: 14px 16px 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card-category {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-date {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
}

.card-dot { color: var(--text3); }

.card-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--text3);
}
.empty-state span { font-size: 48px; display: block; margin-bottom: 16px; }
.empty-state p { font-size: 16px; }

/* LOAD MORE */
.load-more-wrap { text-align: center; margin-top: 48px; }
.btn-load-more {
  padding: 12px 40px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-load-more:hover { background: var(--surface2); border-color: var(--accent); color: var(--accent); }

/* ===================================
   PLAYER MODAL
   =================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5,5,8,0.95);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open { display: flex; }

@keyframes fadeIn {
  from { opacity:0; } to { opacity:1; }
}

.modal-inner {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  overflow: auto;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity:0; transform:scale(0.95) translateY(20px); }
  to { opacity:1; transform:scale(1) translateY(0); }
}

.modal-close {
  position: fixed;
  top: 20px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  z-index: 10;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--surface2); color: var(--accent); }

.player-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.player-left {}

.video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Anti-download overlay */
.video-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.video-wrapper video {
  width: 100%;
  display: block;
  max-height: 60vh;
  object-fit: contain;
  pointer-events: auto;
  -webkit-user-drag: none;
  user-drag: none;
}

.video-wrapper iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

.player-meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 0;
}

.player-chaine {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.player-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
}

.player-right { }

.player-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.player-category-badge {
  display: inline-block;
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}

.player-title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}

.player-description {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 16px;
}

.player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 3px 10px;
  background: var(--bg3);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
}

.related-videos {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.related-videos h3 {
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 14px;
}

.related-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.2s;
}
.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-item:hover { opacity: 0.7; }

.related-thumb {
  width: 70px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}

.related-thumb-placeholder {
  width: 70px;
  height: 44px;
  border-radius: 4px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.related-info { flex: 1; min-width: 0; }
.related-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-date { font-size: 11px; color: var(--text3); font-family: var(--font-mono); margin-top: 2px; }

/* ===================================
   FOOTER
   =================================== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 0;
}

.footer-inner {
  display: flex;
  gap: 48px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 32px;
}

.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 10px;
}
.footer-brand p {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 14px;
  color: var(--text2);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 900px) {
  .player-layout { grid-template-columns: 1fr; }
  .hero-tv { display: none; }
  .hero-title { font-size: clamp(52px, 12vw, 90px); }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .filters-row { flex-direction: column; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 20px; }
}

@media (max-width: 400px) {
  .video-grid { grid-template-columns: 1fr; }
}

/* ===================================
   SKELETON LOADING CARDS
   =================================== */
.skeleton-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-card::before {
  content: '';
  display: block;
  aspect-ratio: 16/9;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--surface2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}

.skeleton-card::after {
  content: '';
  display: block;
  height: 72px;
  margin: 12px 16px;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--surface2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
