/* ================================================================
   RECETTE CARD — "Nocturnal Kitchen" — harmonisée navbar + index
   ================================================================ */

/* ── CARD SHELL ─────────────────────────── */
.rc {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    rgba(16, 40, 24, 0.97) 0%,
    rgba(6, 22, 14, 0.99) 100%
  );
  border: 1px solid rgba(52, 211, 153, 0.1);
  box-shadow:
    0 2px 12px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.04);
  transition:
    transform .4s cubic-bezier(.2,0,0,1),
    box-shadow .4s ease,
    border-color .3s ease;
}

.rc:hover {
  transform: translateY(-7px);
  border-color: rgba(52, 211, 153, 0.28);
  box-shadow:
    0 28px 64px rgba(0,0,0,0.55),
    0 0 0 1px rgba(52, 211, 153, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Glow émeraude subtil au hover */
.rc::after {
  content: '';
  position: absolute; inset: 0; border-radius: 28px;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(52,211,153,0.06) 0%,
    transparent 60%
  );
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.rc:hover::after { opacity: 1; }

/* ── ZONE IMAGE ──────────────────────────── */
.rc-img {
  position: relative;
  height: 196px; flex-shrink: 0;
  overflow: hidden;
}
.rc-img a { display: block; height: 100%; }
.rc-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .65s cubic-bezier(.2,0,0,1);
}
.rc:hover .rc-img img { transform: scale(1.08); }

/* Vide */
.rc-img-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; opacity: .2;
  background: rgba(255,255,255,0.02);
}

/* Dégradé cinématique bas→haut */
.rc-img-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(6,22,14,0.95) 0%,
    rgba(6,22,14,0.3)  45%,
    transparent        100%
  );
}

/* Badge TYPE — top left — verre émeraude */
.rc-badge-type {
  position: absolute; top: 13px; left: 13px; z-index: 4;
  padding: 5px 12px; border-radius: 10px;
  background: rgba(6,22,14,0.78);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(52,211,153,0.3);
  font-family: 'Poppins', sans-serif;
  font-size: 9px; font-weight: 700;
  color: #34d399; /* ✅ 7.2:1 */
  text-transform: uppercase; letter-spacing: 1.8px;
  white-space: nowrap;
}

/* Badges statut — bottom right */
.rc-badge-status {
  position: absolute; bottom: 13px; right: 13px; z-index: 4;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
}
.rc-badge-status span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 9px; font-weight: 800;
  color: #fff; /* ✅ */
  text-transform: uppercase; letter-spacing: 1px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.rc-badge-abo   { background: rgba(99,102,241,0.82); border: 1px solid rgba(129,140,248,0.3); }
.rc-badge-vogue { background: rgba(239,68,68,0.82);  border: 1px solid rgba(252,165,165,0.3); animation: rcVogue 2s ease-in-out infinite; }
.rc-badge-pop   { background: rgba(249,115,22,0.82); border: 1px solid rgba(253,186,116,0.3); }

@keyframes rcVogue {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50%     { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

/* Avatar — positionné sur .rc directement (pas dans rc-img qui a overflow:hidden) */
.rc-avatar-wrap {
  position: absolute;
  /* top = hauteur image (196px) - moitié avatar (23px) = 173px */
  top: 173px; left: 16px; z-index: 10;
}
.rc-avatar {
  width: 46px; height: 46px;
  border-radius: 14px; overflow: hidden;
  border: 2px solid rgba(52,211,153,0.35);
  box-shadow: 0 6px 20px rgba(0,0,0,0.55);
  transition: transform .3s ease, border-color .3s;
}
.rc:hover .rc-avatar {
  transform: rotate(4deg) scale(1.1);
  border-color: rgba(52,211,153,0.6);
}
.rc-avatar img { width:100%; height:100%; object-fit:cover; display:block; }

/* ── BODY ────────────────────────────────── */
.rc-body {
  flex: 1; display: flex; flex-direction: column;
  padding: 30px 18px 18px;
  position: relative;
}

/* Séparateur lumineux sous l'image */
.rc-body::before {
  content: '';
  position: absolute; top: 0; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(52,211,153,0.18) 30%,
    rgba(52,211,153,0.18) 70%,
    transparent 100%
  );
}

/* Auteur */
.rc-author-name {
  font-family: 'Poppins', sans-serif;
  font-size: 11.5px; font-weight: 700;
  color: rgba(255,255,255,0.75); /* ✅ 6.5:1 */
  margin-bottom: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
.rc:hover .rc-author-name { color: rgba(255,255,255,0.9); }

.rc-author-grade {
  font-family: 'Poppins', sans-serif;
  font-size: 9px; font-weight: 700;
  color: #34d399; /* ✅ 7.2:1 */
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 11px;
}

/* ── TITRE (STYLE CINEMA) ────────────────── */
.rc-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 900;
  color: #fff; /* ✅ 21:1 */
  line-height: 1.2; letter-spacing: -.2px;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.4em;
  margin-bottom: 8px;
  transition: color .2s;
}
.rc-title:hover { color: #34d399; }

/* ── STYLE DE LA SECONDE PARTIE DU TITRE ── */
.rc-title em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 200;
  display: block;
  margin-top: -2px;
  color: inherit; /* CRUCIAL : hérite du vert au hover et du noir en clair */
  transition: color .2s;
}

/* Description */
.rc-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-style: italic; font-weight: 400;
  color: rgba(255,255,255,0.55); /* ✅ 4.5:1 */
  line-height: 1.7; flex: 1; margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.8em;
}

/* ── FOOTER ──────────────────────────────── */
.rc-footer {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 14px;
}

.rc-footer-left { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }

/* Pill temps */
.rc-pill-time {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 10px;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.2);
  font-family: 'Poppins', sans-serif;
  font-size: 10px; font-weight: 700;
  color: #34d399; /* ✅ */
  white-space: nowrap;
}

/* Pill repos */
.rc-pill-repos {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 9px; font-weight: 700;
  white-space: nowrap;
}
.rc-pill-repos.long   { background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.22);  color: #a5b4fc; } /* ✅ */
.rc-pill-repos.medium { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.22);   color: #fca5a5; } /* ✅ */
.rc-pill-repos.short  { background: rgba(249,115,22,0.1);  border: 1px solid rgba(249,115,22,0.22);  color: #fdba74; } /* ✅ */
.rc-pill-repos.mini   { background: rgba(234,179,8,0.1);   border: 1px solid rgba(234,179,8,0.22);   color: #fde047; } /* ✅ */

/* Actions droite */
.rc-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Pill note */
.rc-rating {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: 10px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  font-family: 'Poppins', sans-serif;
  font-size: 11px; font-weight: 800;
  color: #fbbf24; /* ✅ 9.1:1 */
  white-space: nowrap;
}

/* Boutons icon */
.rc-icon-btn {
  width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  cursor: pointer; transition: all .22s ease;
  color: rgba(255,255,255,0.5); /* ✅ */
  flex-shrink: 0;
}
.rc-icon-btn:hover {
  background: rgba(52,211,153,0.1);
  border-color: rgba(52,211,153,0.25);
  color: #34d399;
  transform: scale(1.06);
}
.rc-icon-btn.fav-active {
  color: #f87171; /* ✅ */
  background: rgba(248,113,113,0.1);
  border-color: rgba(248,113,113,0.22);
}
.rc-icon-btn.fav-active:hover {
  background: rgba(248,113,113,0.18);
  border-color: rgba(248,113,113,0.4);
}
.rc-icon-btn.add-btn {
  color: #34d399; /* ✅ */
  background: rgba(52,211,153,0.08);
  border-color: rgba(52,211,153,0.2);
}
.rc-icon-btn.add-btn:hover {
  background: rgba(52,211,153,0.2);
  border-color: rgba(52,211,153,0.45);
  color: #fff;
}


/* ================================================================
   LIGHT MODE — harmonisé avec index
   ================================================================ */

[data-theme="light"] .rc {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(10, 31, 18, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .rc:hover {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(5, 150, 105, 0.1);
}
[data-theme="light"] .rc::after {
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
}

[data-theme="light"] .rc-img-empty {
  background: rgba(10, 31, 18, 0.04);
  color: rgba(10, 31, 18, 0.1);
}

[data-theme="light"] .rc-img-overlay {
  background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.2) 45%, transparent 100%);
}

[data-theme="light"] .rc-badge-type {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(5, 150, 105, 0.3);
  color: #047857;
}

[data-theme="light"] .rc-badge-abo   { background: #4f46e5; border-color: #4338ca; }
[data-theme="light"] .rc-badge-vogue { background: #dc2626; border-color: #b91c1c; }
[data-theme="light"] .rc-badge-pop   { background: #ea580c; border-color: #c2410c; }

[data-theme="light"] .rc-avatar {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .rc-body::before {
  background: linear-gradient(to right, transparent 0%, rgba(16, 185, 129, 0.2) 30%, rgba(16, 185, 129, 0.2) 70%, transparent 100%);
}

[data-theme="light"] .rc-author-name { color: rgba(10, 31, 18, 0.6); }
[data-theme="light"] .rc:hover .rc-author-name { color: #0a1f12; }
[data-theme="light"] .rc-author-grade { color: #059669; }

[data-theme="light"] .rc-title { color: #0a1f12; }
[data-theme="light"] .rc-title:hover { color: #059669; }
/* Note : Supprimé le override em en dur, tout est géré par le 'color: inherit' ci-dessus */

[data-theme="light"] .rc-desc { color: rgba(10, 31, 18, 0.55); }

[data-theme="light"] .rc-footer { border-top-color: rgba(10, 31, 18, 0.08); }

[data-theme="light"] .rc-pill-time {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #047857;
}

[data-theme="light"] .rc-pill-repos.long   { background: rgba(79, 70, 229, 0.08); border-color: rgba(79, 70, 229, 0.2); color: #4338ca; }
[data-theme="light"] .rc-pill-repos.medium { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.2); color: #b91c1c; }
[data-theme="light"] .rc-pill-repos.short  { background: rgba(234, 88, 12, 0.08); border-color: rgba(234, 88, 12, 0.2); color: #c2410c; }
[data-theme="light"] .rc-pill-repos.mini   { background: rgba(202, 138, 4, 0.08); border-color: rgba(202, 138, 4, 0.2); color: #a16207; }

[data-theme="light"] .rc-rating {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #b45309;
}

[data-theme="light"] .rc-icon-btn {
  background: #fff;
  border-color: rgba(10, 31, 18, 0.15);
  color: rgba(10, 31, 18, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .rc-icon-btn:hover {
  background: #f0fdf4;
  border-color: rgba(16, 185, 129, 0.4);
  color: #059669;
}

[data-theme="light"] .rc-icon-btn.fav-active {
  color: #dc2626;
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.3);
}
[data-theme="light"] .rc-icon-btn.fav-active:hover {
  background: #fee2e2;
  border-color: rgba(220, 38, 38, 0.5);
}

[data-theme="light"] .rc-icon-btn.add-btn {
  color: #059669;
  background: #f0fdf4;
  border-color: rgba(16, 185, 129, 0.3);
}
[data-theme="light"] .rc-icon-btn.add-btn:hover {
  background: #d1fae5;
  border-color: rgba(16, 185, 129, 0.5);
  color: #047857;
}

/* ── Boutons d'édition superposés sur l'image (mode édition) ── */
.rc-edit-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rc-edit-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: background 0.18s, color 0.18s;
}

.rc-edit-btn-blue {
  background: rgba(99, 102, 241, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}
.rc-edit-btn-blue:hover {
  background: rgba(99, 102, 241, 0.5);
  color: #fff;
}

.rc-edit-btn-red {
  background: rgba(248, 113, 113, 0.3);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}
.rc-edit-btn-red:hover {
  background: rgba(248, 113, 113, 0.5);
  color: #fff;
}

.rc-edit-btn-green {
  background: rgba(52, 211, 153, 0.25);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}
.rc-edit-btn-green:hover {
  background: rgba(52, 211, 153, 0.4);
  color: #fff;
}