/* =========================================================
   VideoDown — style.css
   VERSION STABLE (info-container + result-item + progress)
   ========================================================= */

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── VARIABLES ── */
:root {
  --bg-deep: #050507;
  --bg-card: #0b0c10;
  --bg-card-hover: #11131a;
  --bg-input: #141621;

  --border: #1e2030;

  --text-primary: #f5f6fa;
  --text-secondary: #9aa0b5;
  --text-muted: #5b607a;

  --accent: #ff2f92;
  --accent-soft: #ff6fb5;
  --accent-dim: rgba(255,47,146,.15);

  --progress-track: #16182a;
  --progress-fill: linear-gradient(
    90deg,
    #ff2f92,
    #ff6fb5,
    #ff2f92
  );

  --radius: 14px;
  --radius-sm: 8px;

  --shadow-card: 0 12px 40px rgba(0,0,0,.55);
}

/* ── GLOBAL ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── BACKGROUND ── */
.bg-layer { position: fixed; inset: 0; z-index: 0; }
.ui-layer { position: relative; z-index: 1; }

.grain {
  position: fixed;
  inset: 0;
  opacity: .03;
  pointer-events: none;
}

.sphere {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .12;
}

.sphere-1 {
  width: 480px;
  height: 480px;
  background: #ff2f92;
  top: -160px;
  left: -180px;
}

.sphere-2 {
  width: 360px;
  height: 360px;
  background: #ff6fb5;
  bottom: -140px;
  right: -140px;
}

/* ── LAYOUT ── */
.row {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── HEADER ── */
.site-header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon { color: var(--accent); font-size: 22px; }

.logo-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
}

.header-tagline {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── MAIN ── */
.main-content {
  padding: 48px 0 60px;
}

/* ── SEARCH ── */
.page-title-search {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

#keyword {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
}

#myDropdown {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-secondary);
}

#submit-button {
  background: linear-gradient(135deg,var(--accent),var(--accent-soft));
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-weight: 600;
  cursor: pointer;
}

/* ── PROGRESS BAR ── */
#download { margin-top: 32px; }

#progressBarDownload {
  height: 12px;
  background: var(--progress-track);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

#progressBarFill {
  height: 100%;
  width: 0%;
  background: var(--progress-fill);
}

#progressMeta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

#statusLabel {
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent-soft);
}

/* ── ERROR ── */
.error-banner {
  display: none;
  margin-top: 20px;
  padding: 14px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* =========================================================
   SEARCH RESULTS (result-item)
   ========================================================= */

.results-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 16px;
}

.result-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.result-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d1014;
}

.result-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 11px;
  background: rgba(0,0,0,.65);
  padding: 3px 6px;
  border-radius: 6px;
}

.result-info {
  padding: 12px;
}

.result-info h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.result-channel {
  font-size: 11px;
  color: var(--text-muted);
}

/* =========================================================
   INFO SECTION (info-container)
   ========================================================= */

.info-container {
  padding: 80px 20px;
  border-top: 1px solid var(--border);
}

.info-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.info-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 2px;
}

.info-intro {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.info-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
}

.info-card {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}

/* =========================================================
   RESULT PAGE (result.html) ✅ AJOUT FINAL
   ========================================================= */

.result-card {
  margin-top: 48px;
  padding: 36px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.result-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.result-title {
  font-size: 22px;
  margin-bottom: 6px;
}

.result-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.result-actions {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg,var(--accent),var(--accent-soft));
  color: #050507;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

/* ── FOOTER ── */
.site-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
}

.site-footer p {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .info-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 640px) {
  .page-title-search { flex-wrap: wrap; }
  #submit-button { width: 100%; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .results-grid { grid-template-columns: 1fr; }
}
