/* ============================================================
   MISS NIGER — Styles custom (complète Tailwind CDN)
   ============================================================ */

/* --- Palette brand --- */
:root {
  --pink-brand:   #C9A84C;   /* doré */
  --pink-light:   #faf5e4;   /* doré clair */
  --pink-dark:    #0d0d0d;   /* noir */
  --gold:         #C9A84C;
  --gold-light:   #faf5e4;
  --text-main:    #1a1a1a;
  --text-muted:   #6b7280;
  --bg-soft:      #f8f7f2;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--text-main);
  background: #fff;
  min-height: 100vh;
}

/* --- Scrollbar discrète --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: #0d0d0d;
  border-bottom: 2px solid #C9A84C;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.3rem;
  color: #C9A84C;
  letter-spacing: -0.5px;
}

.nav-link {
  color: rgba(255,255,255,.85);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all .2s;
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  background: rgba(201,168,76,.15);
  color: #C9A84C;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 60%, #2d2a1e 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/hero-pattern.svg') center/cover;
  opacity: 0.06;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.1rem;
  opacity: .85;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}

.btn-primary {
  background: #C9A84C;
  color: #0d0d0d;
}
.btn-primary:hover {
  background: #a8882e;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(201,168,76,.45);
  color: #0d0d0d;
}

.btn-gold {
  background: var(--gold);
  color: #0d0d0d;
}
.btn-gold:hover {
  background: #a8882e;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #C9A84C;
  border: 2px solid #C9A84C;
}
.btn-outline:hover {
  background: #C9A84C;
  color: #0d0d0d;
}

.btn-white {
  background: white;
  color: #C9A84C;
}
.btn-white:hover {
  background: #faf5e4;
}

.btn-dark {
  background: #0d0d0d;
  color: #C9A84C;
}
.btn-dark:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
}

.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: transform .25s, box-shadow .25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(201,168,76,.2);
}

.card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.card-body { padding: 1rem 1.2rem 1.2rem; }

.card-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

/* ============================================================
   CANDIDATE CARD (public)
   ============================================================ */
.candidate-card { position: relative; }

.candidate-card .badge-phase {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gold);
  color: #0d0d0d;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}

.vote-count {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  color: #C9A84C;
  font-size: 0.95rem;
}

/* ============================================================
   WIZARD STEPS (inscription)
   ============================================================ */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 20px;
  overflow-x: auto;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  min-width: 64px;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.wizard-step.done::after  { background: #C9A84C; }
.wizard-step.active::after { background: linear-gradient(to right, #C9A84C, #e5e7eb); }

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  position: relative;
  border: 2px solid #e5e7eb;
  transition: all .3s;
}

.wizard-step.done  .step-circle {
  background: #C9A84C;
  color: #0d0d0d;
  border-color: #C9A84C;
}

.wizard-step.active .step-circle {
  background: white;
  color: #C9A84C;
  border-color: #C9A84C;
  box-shadow: 0 0 0 4px rgba(201,168,76,.2);
}

.step-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 64px;
  line-height: 1.2;
}

.wizard-step.active .step-label { color: #C9A84C; font-weight: 600; }
.wizard-step.done   .step-label { color: #C9A84C; }

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-group { margin-bottom: 1.2rem; }

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: #374151;
}

.form-label .required { color: #C9A84C; margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.93rem;
  background: white;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  color: var(--text-main);
}

.form-control:focus {
  border-color: #C9A84C;
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.form-control.is-error { border-color: #ef4444; }
.form-error { color: #ef4444; font-size: 0.8rem; margin-top: 4px; }

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control { appearance: none; cursor: pointer; }

/* Upload zone */
.upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #fafafa;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: #C9A84C;
  background: #faf5e4;
}

.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 8px; }
.upload-preview { max-width: 120px; max-height: 120px; border-radius: 8px; margin-top: 8px; }

/* ============================================================
   DASHBOARD SIDEBAR
   ============================================================ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  background: #0d0d0d;
  border-right: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.5rem 1.2rem 1rem;
  border-bottom: 1px solid #2a2a2a;
}

.sidebar-brand span {
  font-weight: 800;
  font-size: 1.1rem;
  color: #C9A84C;
}

.sidebar-nav { padding: 1rem 0.75rem; flex: 1; }

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #5a5a5a;
  padding: 0.5rem 0.5rem 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  color: rgba(255,255,255,.75);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .18s;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: rgba(201,168,76,.12);
  color: #C9A84C;
}

.sidebar-link.active {
  background: #C9A84C;
  color: #0d0d0d;
}

.sidebar-link .icon { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-badge {
  margin-left: auto;
  background: #C9A84C;
  color: #0d0d0d;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}

.sidebar-link.active .sidebar-badge { background: rgba(0,0,0,.2); color: #0d0d0d; }

.main-content {
  flex: 1;
  background: var(--bg-soft);
  overflow-y: auto;
}

.page-header {
  background: white;
  border-bottom: 1px solid #e8ddb5;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-header h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}

.content-body { padding: 2rem; }

/* ============================================================
   STATS CARDS (dashboard)
   ============================================================ */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.3rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.pink  { background: #faf5e4; }
.stat-icon.gold  { background: var(--gold-light); }
.stat-icon.green { background: #d1fae5; }
.stat-icon.blue  { background: #dbeafe; }

.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  background: #f8f7f2;
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 2px solid #e8ddb5;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f5f0e0;
  vertical-align: middle;
}

.data-table tr:hover td { background: #f8f7f2; }

/* ============================================================
   BADGES STATUS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-success   { background: #d1fae5; color: #065f46; }
.badge-warning   { background: #fef9c3; color: #92400e; }
.badge-danger    { background: #fee2e2; color: #991b1b; }
.badge-info      { background: #dbeafe; color: #1e3a8a; }
.badge-pink      { background: #faf5e4; color: #8a6c1e; }
.badge-gold      { background: var(--gold-light); color: #7a5c00; }
.badge-gray      { background: #f3f4f6; color: #4b5563; }

/* ============================================================
   VOTE SECTION (public)
   ============================================================ */
.vote-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(201,168,76,.15);
  max-width: 420px;
  margin: 0 auto;
}

.vote-hero-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top;
}

.vote-pack-option {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vote-pack-option:hover,
.vote-pack-option.selected {
  border-color: #C9A84C;
  background: #faf5e4;
}

.vote-pack-option .pack-votes {
  font-weight: 800;
  color: #C9A84C;
  font-size: 1.1rem;
}

.vote-pack-option .pack-price {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ============================================================
   POLLING / LOADER
   ============================================================ */
.polling-box {
  text-align: center;
  padding: 3rem 2rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #faf5e4;
  border-top-color: #C9A84C;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 1.5rem;
}

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

.pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #C9A84C;
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: .5; }
}

/* ============================================================
   SCORE BARS (jury)
   ============================================================ */
.score-bar-wrap { margin: 6px 0; }

.score-bar-bg {
  background: #f3f4f6;
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(to right, #C9A84C, #0d0d0d);
  transition: width .6s ease;
}

/* ============================================================
   BLOG POST
   ============================================================ */
.post-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  margin-bottom: 1.5rem;
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.post-meta .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e8ddb5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #2a2a2a;
  }

  .dashboard-layout { flex-direction: column; }

  .wizard-steps { gap: 0; }

  .step-label { display: none; }

  .content-body { padding: 1rem; }

  .page-header { padding: 1rem; }

  .hero { padding: 50px 16px; }
}

/* ============================================================
   PRINT (reçu PDF affiché à l'écran avant téléchargement)
   ============================================================ */
@media print {
  .sidebar, .navbar, .btn, nav { display: none !important; }
  body { background: white !important; }
}

/* ============================================================
   UTILS
   ============================================================ */
.text-brand   { color: #C9A84C; }
.text-gold    { color: var(--gold); }
.bg-brand     { background: #C9A84C; }
.bg-brand-soft{ background: #faf5e4; }
.border-brand { border-color: #C9A84C; }

.section-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.divider {
  height: 3px;
  width: 48px;
  background: #C9A84C;
  border-radius: 2px;
  margin: 0.5rem 0 1.5rem;
}

.avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e8ddb5;
}

.glass {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.25);
}
