/* ═══════════════════════════════════════════
   AFROMADA VOTE — FRONTEND CSS
   Design assorti aux cards nominées existantes
═══════════════════════════════════════════ */

:root {
  --gold:    #fcd462;
  --gold-d:  #c9a52e;
  --gold-b:  rgba(252,212,98,.3);
  --cream:   #f5f0e8;
  --text:    #1a1612;
  --muted:   rgba(26,22,18,.5);
  --FD: 'Playfair Display', Georgia, serif;
  --FB: 'Lato', sans-serif;
}

/* ── NOMINEES WRAP ── */
.ama-nominees-wrap { font-family: var(--FB); }

/* ── CATÉGORIE HEADER ── */
.ama-cat-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--cream);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
  border: 1px solid rgba(0,0,0,.07);
}
.ama-cat-cover {
  width: 220px;
  min-height: 160px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.ama-cat-info { padding: 24px 24px 24px 0; flex: 1; }
.ama-cat-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-d);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.ama-cat-title {
  font-family: var(--FD);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.ama-cat-desc { font-size: 14px; color: var(--muted); margin: 0 0 12px; font-weight: 300; }
.ama-cat-meta { display: flex; gap: 20px; flex-wrap: wrap; }
.ama-cat-meta span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.ama-cat-meta span i { font-size: 11px; color: var(--gold-d); }
.ama-status.open  { color: #2d8a4e !important; }
.ama-status.closed { color: #c0392b !important; }
.ama-status.open  i { color: #2d8a4e !important; }
.ama-status.closed i { color: #c0392b !important; }

/* ── NOTICE DÉJÀ VOTÉ ── */
.ama-voted-notice {
  background: rgba(44,138,78,.1);
  border: 1px solid rgba(44,138,78,.3);
  color: #1a5c32;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.ama-voted-notice i { color: #2d8a4e; }

/* ── NOMINEES GRID ── */
.ama-nominees-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ── NOMINEE CARD ── */
.ama-nom-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .24s, border-color .24s, box-shadow .24s;
  cursor: pointer;
}
.ama-nom-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-d);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
}
.ama-nom-card.is-voted {
  border-color: var(--gold);
  background: #fffdf0;
}

/* Cover image */
.ama-nom-cover {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #e8e2d8;
}
.ama-nom-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.ama-nom-card:hover .ama-nom-cover img { transform: scale(1.04); }

.ama-nom-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2c1f0a, #4a3210);
  font-size: 52px; color: rgba(252,212,98,.3);
}

.ama-voted-badge {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #000;
}

/* Card body */
.ama-nom-body { padding: 16px; }
.ama-nom-name {
  font-family: var(--FD);
  font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
}
.ama-nom-cat {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 5px;
}
.ama-nom-bar-bg {
  background: #f0ece4; border-radius: 3px;
  height: 4px; margin-bottom: 10px;
}
.ama-nom-bar {
  height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-d), var(--gold));
  transition: width .6s ease;
}
.ama-nom-foot {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  flex-wrap: wrap;
}
.ama-nom-pct { font-size: 13px; color: var(--gold-d); font-weight: 700; }
.ama-nom-votes { font-size: 11px; color: var(--muted); }

/* Vote button */
.ama-vote-btn {
  background: var(--gold); color: #000;
  border: none; border-radius: 5px;
  padding: 7px 16px; font-size: 12px;
  font-weight: 700; font-family: var(--FB);
  cursor: pointer; transition: all .18s;
  display: inline-flex; align-items: center; gap: 6px;
}
.ama-vote-btn:hover { background: #ffe599; transform: translateY(-1px); }
.ama-vote-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.ama-vote-btn.loading { opacity: .7; cursor: wait; }

.ama-voted-label {
  background: rgba(44,138,78,.12);
  color: #2d8a4e;
  border-radius: 5px;
  padding: 7px 14px;
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
}

/* ── RESULTS PAGE ── */
.ama-results-wrap { font-family: var(--FB); }
.ama-results-header h2 {
  font-family: var(--FD);
  font-size: 32px; color: var(--text); margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
}
.ama-results-cat { margin-bottom: 40px; }
.ama-results-cat-title {
  font-family: var(--FD); font-size: 20px; font-weight: 700;
  color: var(--text); margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.ama-results-cat-title span { font-size: 13px; color: var(--muted); font-family: var(--FB); font-weight: 300; }
.ama-result-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: 8px;
  background: #fff; border: 1px solid rgba(0,0,0,.06);
  margin-bottom: 8px; transition: border-color .2s;
}
.ama-result-row.winner { border-color: var(--gold-b); background: #fffdf0; }
.ama-result-rank { font-size: 16px; width: 28px; text-align: center; flex-shrink: 0; }
.ama-result-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ama-result-img.placeholder {
  background: #e8e2d8; display: flex; align-items: center;
  justify-content: center; color: var(--muted); font-size: 16px;
}
.ama-result-info { flex: 1; }
.ama-result-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.ama-result-bar-bg { background: #f0ece4; border-radius: 3px; height: 4px; }
.ama-result-bar { height: 4px; border-radius: 3px; background: linear-gradient(90deg, var(--gold-d), var(--gold)); }
.ama-result-stats { text-align: right; flex-shrink: 0; }
.ama-result-pct { font-size: 14px; font-weight: 700; color: var(--gold-d); }
.ama-result-votes { font-size: 11px; color: var(--muted); }

/* ── CATEGORIES LIST ── */
.ama-cats-list { font-family: var(--FB); display: flex; flex-direction: column; gap: 14px; }
.ama-cat-list-item {
  display: flex; align-items: center; gap: 18px;
  background: #fff; border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.ama-cat-list-item:hover { border-color: var(--gold-d); transform: translateX(4px); }
.ama-cat-list-item.closed { opacity: .7; }
.ama-cat-list-img {
  width: 80px; height: 80px; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: #e8e2d8;
}
.ama-cat-list-img.placeholder { display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--gold-d); }
.ama-cat-list-content { flex: 1; padding: 14px 8px; }
.ama-cat-list-content h3 { font-family: var(--FD); font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.ama-cat-list-content p { font-size: 13px; color: var(--muted); margin: 0 0 8px; font-weight: 300; }
.ama-cat-list-meta { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.ama-cat-list-meta i { color: var(--gold-d); margin-right: 4px; }
.ama-cat-list-btn {
  background: var(--gold); color: #000;
  padding: 10px 20px; font-size: 13px; font-weight: 700;
  text-decoration: none; margin-right: 16px;
  border-radius: 6px; white-space: nowrap;
  transition: background .18s; display: flex; align-items: center; gap: 7px;
}
.ama-cat-list-btn:hover { background: #ffe599; }

/* ══════════════════════════════════════════
   MODAL LOGIN
══════════════════════════════════════════ */
.ama-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.6);
  display: flex !important;
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: ama-fade-in .2s ease;
}
@keyframes ama-fade-in { from{opacity:0} to{opacity:1} }

.ama-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  animation: ama-slide-up .3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes ama-slide-up { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }

.ama-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 22px;
  color: #999; cursor: pointer; line-height: 1;
  transition: color .15s;
}
.ama-modal-close:hover { color: #333; }

.ama-modal-header { text-align: center; margin-bottom: 24px; }
.ama-modal-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(252,212,98,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--gold-d);
  margin: 0 auto 14px;
}
.ama-modal-header h3 { font-family: var(--FD); font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.ama-modal-header p  { font-size: 13px; color: var(--muted); margin: 0; }

/* Social buttons */
.ama-social-btns { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.ama-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s; border: 1.5px solid;
  font-family: var(--FB);
}
.ama-social-btn.google  { background:#fff; border-color:#ddd; color:#3c4043; }
.ama-social-btn.google:hover  { border-color:#4285F4; background:#f8f9ff; }
.ama-social-btn.facebook { background:#1877F2; border-color:#1877F2; color:#fff; }
.ama-social-btn.facebook i { font-size: 16px; }
.ama-social-btn.facebook:hover { background:#1565D8; }
.ama-social-btn.loading { opacity:.7; cursor:wait; }

/* Divider */
.ama-divider {
  text-align: center; margin: 16px 0;
  display: flex; align-items: center; gap: 12px;
}
.ama-divider::before,.ama-divider::after {
  content:''; flex:1; height:1px; background:rgba(0,0,0,.1);
}
.ama-divider span { font-size: 12px; color: var(--muted); }

/* Tabs */
.ama-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid #f0ece4; }
.ama-tab {
  flex:1; background:none; border:none;
  padding: 10px; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; font-family: var(--FB);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .18s;
}
.ama-tab.active { color: var(--text); border-bottom-color: var(--gold-d); }

/* Forms */
.ama-form { display: none; }
.ama-form.active { display: block; }
.ama-form-group { margin-bottom: 14px; }
.ama-form-group label { display:block; font-size:12px; font-weight:700; color:var(--text); margin-bottom:5px; letter-spacing:.03em; }
.ama-form-group input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid rgba(0,0,0,.12); border-radius: 7px;
  font-size: 14px; font-family: var(--FB);
  transition: border-color .18s; outline: none;
}
.ama-form-group input:focus { border-color: var(--gold-d); }
.ama-form-msg { font-size: 13px; margin: 8px 0; border-radius: 6px; padding: 8px 12px; display: none; }
.ama-form-msg.success { background: rgba(44,138,78,.1); color: #1a5c32; display:block; }
.ama-form-msg.error   { background: rgba(192,57,43,.08); color: #8b2014; display:block; }
.ama-form-submit {
  width: 100%; padding: 13px; background: var(--gold); color:#000;
  border: none; border-radius: 8px; font-size: 14px; font-weight: 700;
  font-family: var(--FB); cursor: pointer; margin-top: 4px;
  transition: background .2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ama-form-submit:hover { background: #ffe599; }
.ama-form-submit:disabled { opacity:.6; cursor:wait; }

.ama-modal-footer {
  text-align: center; font-size: 11px; color: var(--muted);
  margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ── TOAST NOTIFICATION ── */
.ama-toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #1a1612; color: #f0ece4;
  padding: 14px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 500; font-family: var(--FB);
  z-index: 999999; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  animation: ama-toast-in .3s ease;
  max-width: 320px;
}
.ama-toast.success { border-left: 4px solid var(--gold); }
.ama-toast.error   { border-left: 4px solid #c0392b; }
.ama-toast i { flex-shrink: 0; }
@keyframes ama-toast-in { from{transform:translateX(20px);opacity:0} to{transform:translateX(0);opacity:1} }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .ama-nominees-grid { grid-template-columns: 1fr 1fr; }
  .ama-cat-cover { width: 120px; min-height: 120px; }
  .ama-modal { padding: 28px 20px; }
}
@media (max-width: 480px) {
  .ama-nominees-grid { grid-template-columns: 1fr; }
  .ama-cat-header { flex-direction: column; }
  .ama-cat-cover { width: 100%; height: 140px; }
  .ama-cat-info { padding: 16px; }
  .ama-cat-list-item { flex-wrap: wrap; }
}
