/* ══════════════════════════════════════════════════════════════════════
   SECTION « PEUT S'ACCOMPAGNER » — carrousel page détail recette
   Variables Night Kitchen (night_kitchen.css). Dark + light gérés.
   ══════════════════════════════════════════════════════════════════════ */

.acc-section {
  position: relative;
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 0 32px;
}

/* En-tête : titre + accroche à gauche, nav desktop à droite */
.acc-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 26px;
}
.acc-head-text { min-width: 0; }

.acc-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Poppins', sans-serif; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--text-label); margin-bottom: 10px;
}
.acc-eyebrow svg { width: 14px; height: 14px; }

.acc-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 4vw, 36px); font-weight: 900;
  line-height: 1.1; letter-spacing: -0.5px;
  color: var(--text-primary); margin: 0 0 8px;
}
.acc-title em {
  font-style: italic; font-weight: 400;
  background: linear-gradient(120deg, var(--g1), var(--g2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.acc-sub {
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-style: italic;
  color: var(--text-secondary); margin: 0; line-height: 1.5; max-width: 46ch;
}

/* Boutons de navigation (desktop only) */
.acc-nav { display: flex; gap: 10px; flex-shrink: 0; }
.acc-nav-btn {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-element); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--tr);
}
.acc-nav-btn svg { width: 20px; height: 20px; }
.acc-nav-btn:hover:not(:disabled) {
  background: rgba(52,211,153,0.10);
  border-color: rgba(52,211,153,0.30);
  color: var(--g1); transform: translateY(-2px);
}
.acc-nav-btn:active:not(:disabled) { transform: translateY(0); }
.acc-nav-btn:disabled { opacity: 0.3; cursor: default; }
.acc-nav-btn:focus-visible {
  outline: 2px solid var(--g1); outline-offset: 2px;
}

/* ── Piste de scroll ── */
.acc-track {
  display: flex; gap: 18px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 6px 4px 22px;
  scroll-padding-inline: 4px;
}
/* Cale finale : décolle la dernière carte du bord du conteneur */
.acc-track::after { content: ''; flex: 0 0 8px; }
.acc-track::-webkit-scrollbar { height: 5px; }
.acc-track::-webkit-scrollbar-thumb { background: rgba(52,211,153,0.20); border-radius: 4px; }
.acc-track::-webkit-scrollbar-track { background: transparent; }

/* ── Carte accompagnement (version compacte de .rc) ── */
.acc-card {
  position: relative;
  flex: 0 0 270px; width: 270px;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  border-radius: 24px; overflow: hidden;
  text-decoration: none;
  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.10);
  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;
}
.acc-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52,211,153,0.28);
  box-shadow:
    0 22px 50px 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 (comme .rc::after) */
.acc-card::after {
  content: ''; position: absolute; inset: 0; border-radius: 24px;
  background: radial-gradient(circle at 50% 0%, rgba(52,211,153,0.07) 0%, transparent 60%);
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.acc-card:hover::after { opacity: 1; }
.acc-card:focus-visible {
  outline: 2px solid var(--g1); outline-offset: 3px;
}

/* Zone image 16:10 */
.acc-img {
  position: relative; width: 100%;
  aspect-ratio: 16 / 10; flex-shrink: 0; overflow: hidden;
}
.acc-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .65s cubic-bezier(.2,0,0,1);
}
.acc-card:hover .acc-img img { transform: scale(1.07); }

/* Placeholder image SVG (dégradé + forme) — pas d'émoji */
.acc-img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.acc-img-ph svg { width: 100%; height: 100%; display: block; }

/* Dégradé cinématique bas->haut sur l'image */
.acc-img-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(6,22,14,0.85) 0%, rgba(6,22,14,0.15) 50%, transparent 100%);
}

/* Pill sous-catégorie posée sur l'image, en bas à gauche */
.acc-tag {
  position: absolute; bottom: 11px; left: 11px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(6,22,14,0.78);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(52,211,153,0.30);
  font-family: 'Poppins', sans-serif;
  font-size: 9.5px; font-weight: 800;
  color: #34d399;
  text-transform: uppercase; letter-spacing: 1.2px;
  white-space: nowrap;
}
.acc-tag svg { width: 11px; height: 11px; }

/* Corps */
.acc-body {
  flex: 1; display: flex; flex-direction: column; gap: 8px;
  padding: 16px 18px 18px;
  position: relative;
}
/* Séparateur lumineux sous l'image (comme rc-body::before) */
.acc-body::before {
  content: ''; position: absolute; top: 0; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(52,211,153,0.18) 30%, rgba(52,211,153,0.18) 70%, transparent);
}

.acc-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 19px; font-weight: 700; line-height: 1.25;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.5em;
  transition: color .2s;
}
.acc-card:hover .acc-card-title { color: var(--g1); }

/* Méta basse : temps + flèche d'invitation */
.acc-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto;
}
.acc-time {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 700;
  color: var(--text-muted);
}
.acc-time svg { width: 13px; height: 13px; }
.acc-go {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.20);
  color: var(--g1); transition: all var(--tr);
}
.acc-go svg { width: 15px; height: 15px; }
.acc-card:hover .acc-go {
  background: rgba(52,211,153,0.20);
  border-color: rgba(52,211,153,0.45);
  transform: translateX(2px);
}

/* ── LIGHT MODE ── */
[data-theme="light"] .acc-card {
  background: rgba(255,255,255,0.96);
  border-color: rgba(10,31,18,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
[data-theme="light"] .acc-card:hover {
  border-color: rgba(5,150,105,0.35);
  box-shadow: 0 14px 40px rgba(0,0,0,0.10), 0 0 0 1px rgba(5,150,105,0.10);
}
[data-theme="light"] .acc-card::after {
  background: radial-gradient(circle at 50% 0%, rgba(16,185,129,0.05) 0%, transparent 60%);
}
[data-theme="light"] .acc-img-overlay {
  background: linear-gradient(to top, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
}
[data-theme="light"] .acc-tag {
  background: rgba(255,255,255,0.92);
  border-color: rgba(5,150,105,0.30);
  color: #047857;
}
[data-theme="light"] .acc-body::before {
  background: linear-gradient(to right, transparent, rgba(16,185,129,0.20) 30%, rgba(16,185,129,0.20) 70%, transparent);
}
[data-theme="light"] .acc-card-title { color: #0a1f12; }
[data-theme="light"] .acc-card:hover .acc-card-title { color: #059669; }
[data-theme="light"] .acc-go {
  background: #f0fdf4; border-color: rgba(16,185,129,0.30); color: #059669;
}
[data-theme="light"] .acc-card:hover .acc-go {
  background: #d1fae5; border-color: rgba(16,185,129,0.50); color: #047857;
}

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
  .acc-section { padding: 0 16px; }
  .acc-nav { display: none; }              /* swipe natif suffit sur mobile */
  .acc-head { align-items: flex-start; }
  .acc-card { flex-basis: 78vw; width: 78vw; max-width: 300px; }
  .acc-track { gap: 14px; padding-left: 2px; padding-right: 2px; }
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .acc-track { scroll-behavior: auto; }
  .acc-card, .acc-img img, .acc-go { transition: none; }
  .acc-card:hover { transform: none; }
  .acc-card:hover .acc-img img { transform: none; }
}
