/* =========================================================
   TrouveTonCadeau — style.css
   Design : violet-prune #7C3AED + or ambre #F59E0B
   Typo   : Playfair Display (titres) + Inter (corps)
   ========================================================= */

/* ── Reset & variables ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --clr-bg:        #FAFAF8;
  --clr-surface:   #FFFFFF;
  --clr-primary:   #7C3AED;
  --clr-primary-d: #5B21B6;
  --clr-primary-l: #EDE9FE;
  --clr-accent:    #F59E0B;
  --clr-accent-d:  #D97706;
  --clr-text:      #1C1917;
  --clr-muted:     #78716C;
  --clr-border:    #E7E5E4;
  --clr-success:   #10B981;
  --clr-ad-bg:     #F3F4F6;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --shadow-pri: 0 4px 20px rgba(124,58,237,.30);

  --transition: .22s ease;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Utility ── */
.hidden { display: none !important; }

/* =========================================================
   BANNIÈRES PUBLICITAIRES
   ========================================================= */
.ad-banner {
  width: 100%;
  background: var(--clr-ad-bg);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  padding: 10px 20px;
  text-align: center;
}

.ad-top { margin-bottom: 0; }
.ad-mid { margin: 32px 0; border-radius: var(--radius-md); border: 1px solid var(--clr-border); }
.ad-bottom { margin-top: 0; }

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 90px;
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-sm);
  color: #94A3B8;
  font-size: .78rem;
  font-family: var(--font-body);
  letter-spacing: .04em;
}

.ad-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.ad-size { font-size: .7rem; opacity: .7; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 20px 0 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon { font-size: 1.8rem; }

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--clr-primary);
  letter-spacing: -.01em;
}

.logo-text strong {
  color: var(--clr-accent-d);
}

.tagline {
  font-size: .82rem;
  color: var(--clr-muted);
  font-style: italic;
  letter-spacing: .02em;
}

/* =========================================================
   MAIN
   ========================================================= */
.site-main {
  flex: 1;
  padding: 40px 0 60px;
}

/* =========================================================
   SECTION QUIZ
   ========================================================= */
.quiz-section {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px 48px 48px;
  position: relative;
  overflow: hidden;
}

/* Trait décoratif supérieur */
.quiz-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
}

/* ── Barre de progression ── */
.progress-wrapper {
  margin-bottom: 36px;
}

.progress-bar {
  height: 6px;
  background: var(--clr-primary-l);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  border-radius: 99px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

.progress-steps {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--clr-border);
  background: var(--clr-bg);
  color: var(--clr-muted);
  font-size: .78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  user-select: none;
}

.step-dot.active {
  border-color: var(--clr-primary);
  background: var(--clr-primary);
  color: #fff;
  transform: scale(1.12);
  box-shadow: var(--shadow-pri);
}

.step-dot.done {
  border-color: var(--clr-success);
  background: var(--clr-success);
  color: #fff;
}

.progress-label {
  font-size: .78rem;
  color: var(--clr-muted);
  text-align: right;
}

/* ── Étape ── */
.quiz-step {
  display: none;
  animation: stepIn .35s ease both;
}

.quiz-step.active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-question {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 6px;
  line-height: 1.25;
}

.step-hint {
  font-size: .88rem;
  color: var(--clr-muted);
  margin-bottom: 28px;
}

/* ── Grille options (4 choix) ── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--clr-bg);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
}

.option-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--clr-primary-l), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.option-btn:hover {
  border-color: var(--clr-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.option-btn:hover::after { opacity: 1; }

.option-btn.selected {
  border-color: var(--clr-primary);
  background: var(--clr-primary-l);
  box-shadow: var(--shadow-pri);
  transform: translateY(-2px);
}

.option-btn.selected::after { opacity: 1; }

.option-icon { font-size: 2.2rem; position: relative; z-index: 1; }

.option-label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--clr-text);
  position: relative;
  z-index: 1;
  text-align: center;
}

/* ── Grille intérêts (multi-sélect) ── */
.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.interest-btn {
  padding: 10px 18px;
  background: var(--clr-bg);
  border: 2px solid var(--clr-border);
  border-radius: 99px;
  font-size: .88rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--clr-text);
}

.interest-btn:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  background: var(--clr-primary-l);
}

.interest-btn.selected {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  box-shadow: var(--shadow-pri);
}

/* ── Navigation étapes ── */
.step-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.btn-back {
  padding: 11px 22px;
  background: transparent;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  color: var(--clr-muted);
  transition: all var(--transition);
}

.btn-back:hover {
  border-color: var(--clr-muted);
  color: var(--clr-text);
}

.btn-next {
  padding: 13px 32px;
  background: var(--clr-primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-pri);
}

.btn-next:hover:not(:disabled) {
  background: var(--clr-primary-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124,58,237,.40);
}

.btn-next:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-submit {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent-d));
  font-size: 1rem;
  padding: 15px 36px;
  letter-spacing: .02em;
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--clr-primary-d), var(--clr-accent-d));
}

/* =========================================================
   LOADING
   ========================================================= */
.loading-section {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 80px 48px;
  text-align: center;
}

.loading-gift {
  font-size: 4rem;
  animation: pulse 1.2s ease-in-out infinite;
  display: block;
  margin-bottom: 24px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.12) rotate(8deg); }
}

.loading-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: var(--clr-primary);
}

.loading-subtitle {
  font-size: .9rem;
  color: var(--clr-muted);
  margin-bottom: 28px;
  min-height: 22px;
  transition: opacity .3s;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  background: var(--clr-primary);
  border-radius: 50%;
  animation: bounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40%           { transform: translateY(-12px); opacity: 1; }
}

/* =========================================================
   RÉSULTATS
   ========================================================= */
.results-section {
  animation: fadeUp .5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.results-header {
  text-align: center;
  margin-bottom: 8px;
}

.results-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--clr-primary);
  margin-bottom: 8px;
}

.results-subtitle {
  font-size: .9rem;
  color: var(--clr-muted);
  margin-bottom: 20px;
}

.results-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-share {
  padding: 10px 24px;
  background: var(--clr-surface);
  border: 2px solid var(--clr-primary);
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--clr-primary);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-share:hover {
  background: var(--clr-primary-l);
  transform: translateY(-2px);
}

.btn-restart {
  padding: 10px 24px;
  background: var(--clr-primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-pri);
}

.btn-restart:hover {
  background: var(--clr-primary-d);
  transform: translateY(-2px);
}

/* ── Grille cartes ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ── Carte cadeau ── */
.gift-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  animation: cardIn .4s ease both;
  cursor: default;
}

.gift-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--clr-primary-l);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Bande de couleur à gauche */
.gift-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--clr-primary), var(--clr-accent));
  border-radius: 4px 0 0 4px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.card-num {
  font-size: .72rem;
  font-weight: 700;
  color: var(--clr-primary);
  background: var(--clr-primary-l);
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}

.card-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: -2px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1.3;
  flex: 1;
}

.card-desc {
  font-size: .83rem;
  color: var(--clr-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.card-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
}

.card-badge.budget { border-color: var(--clr-accent); color: var(--clr-accent-d); background: #FFF8E6; }

.originality {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
}

.originality-label { color: var(--clr-muted); }

.originality-score {
  font-weight: 700;
  color: var(--clr-primary);
}

.stars {
  color: var(--clr-accent);
  font-size: .8rem;
  letter-spacing: -.05em;
}

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--clr-text);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--clr-border);
  background: var(--clr-surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 20px;
}

.footer-copy {
  font-size: .8rem;
  color: var(--clr-muted);
}

.footer-copy-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.amazon-disclosure {
  max-width: 520px;
  font-size: .68rem;
  line-height: 1.45;
  color: var(--clr-muted);
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  font-size: .78rem;
  color: var(--clr-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--clr-primary); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 640px) {
  .quiz-section { padding: 28px 20px 36px; }
  .loading-section { padding: 60px 24px; }

  .step-question { font-size: 1.35rem; }

  .options-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .option-btn { padding: 18px 10px; }
  .option-icon { font-size: 1.7rem; }
  .option-label { font-size: .8rem; }

  .cards-grid { grid-template-columns: 1fr; }

  .results-title { font-size: 1.5rem; }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .logo-text { font-size: 1.25rem; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .options-grid { grid-template-columns: 1fr; }
}

/* ── Réduction de mouvement ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   AMÉLIORATIONS V2
   ========================================================= */

/* ── Header right (tagline + bouton Surprends-moi) ── */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* ── AMÉLIORATION N°5 : Bouton Surprends-moi ── */
.btn-surprise {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--clr-accent), #E76F00);
  border: none;
  border-radius: var(--radius-md);
  font-size: .82rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: #fff;
  cursor: pointer;
  letter-spacing: .02em;
  transition: all var(--transition);
  box-shadow: 0 3px 12px rgba(245,158,11,.35);
  white-space: nowrap;
}

.btn-surprise:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 5px 18px rgba(245,158,11,.50);
}

/* ── AMÉLIORATION N°4 : Bouton Mes Favoris ── */
.btn-favorites {
  padding: 10px 24px;
  background: var(--clr-surface);
  border: 2px solid #E11D48;
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: #E11D48;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-favorites:hover {
  background: #FFF1F3;
  transform: translateY(-2px);
}

.fav-count {
  background: #E11D48;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
  display: none; /* affiché via JS quand > 0 */
}

.fav-count.visible { display: inline-block; }

/* ── AMÉLIORATION N°1 : Animation "Pas pour moi" ── */
@keyframes cardOut {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  40%  { opacity: 0; transform: translateY(-16px) scale(.95); }
  41%  { opacity: 0; transform: translateY(20px) scale(.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.gift-card.replacing {
  animation: cardOut .45s ease both;
  pointer-events: none;
}

/* ── Boutons d'action sur la carte ── */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* AMÉLIORATION N°1 : Pas pour moi */
.btn-skip {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--clr-muted);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-skip:hover {
  border-color: #F87171;
  color: #DC2626;
  background: #FFF5F5;
}

/* AMÉLIORATION N°2 : Voir le produit */
.btn-buy {
  flex: 1.5;
  padding: 8px 14px;
  background: var(--clr-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(124,58,237,.25);
}

.btn-buy:hover {
  background: var(--clr-primary-d);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
}

/* AMÉLIORATION N°4 : Favori */
.btn-fav {
  padding: 8px 12px;
  background: transparent;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--clr-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-fav:hover {
  border-color: #E11D48;
  color: #E11D48;
  background: #FFF1F3;
}

.btn-fav.is-fav {
  background: #FFF1F3;
  border-color: #E11D48;
  color: #E11D48;
}

/* AMÉLIORATION N°3 : Pourquoi ce cadeau */
.card-why {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--clr-primary-l);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--clr-primary);
}

.card-why-title {
  font-size: .72rem;
  font-weight: 700;
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 5px;
}

.card-why-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-why-list li {
  font-size: .75rem;
  color: var(--clr-primary-d);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── AMÉLIORATION N°4 : Modal Favoris ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,.55);
  backdrop-filter: blur(3px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeOverlay .2s ease both;
}

.modal-overlay.hidden { display: none !important; }

@keyframes fadeOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: modalIn .25s cubic-bezier(.4,0,.2,1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--clr-border);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--clr-primary);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--clr-border);
  background: var(--clr-bg);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--clr-muted);
}

.modal-close:hover { background: #FEE2E2; border-color: #FECACA; color: #DC2626; }

.modal-body {
  overflow-y: auto;
  padding: 20px 28px;
  flex: 1;
}

.fav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Carte dans le modal (plus compacte) */
.fav-grid .gift-card {
  animation: none; /* pas d'animation dans le modal */
}

.fav-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--clr-muted);
  font-size: .9rem;
  line-height: 1.7;
}

.modal-footer {
  padding: 16px 28px 20px;
  border-top: 1px solid var(--clr-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.btn-clear-favs {
  padding: 10px 20px;
  background: transparent;
  border: 1.5px solid #F87171;
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: #DC2626;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-clear-favs:hover { background: #FFF5F5; }

/* ── Toast Favori (couleur rose) ── */
.toast-fav {
  background: #E11D48;
}

/* ── Responsive V2 ── */
@media (max-width: 640px) {
  .header-right { align-items: flex-start; }
  .btn-surprise { font-size: .78rem; padding: 7px 14px; }
  .fav-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 16px 16px; }
  .modal-header { padding: 16px 16px 12px; }
  .modal-footer { padding: 12px 16px 16px; flex-wrap: wrap; }
  .card-actions { flex-wrap: wrap; }
  .btn-buy { min-width: 120px; }
}

/* =========================================================
   V1 FINAL — NOUVEAUTÉS
   ========================================================= */

/* ── Header : conteneur boutons + toggle thème ── */
.header-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--clr-border);
  background: var(--clr-bg);
  cursor: pointer;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.08); border-color: var(--clr-primary); }

/* ── Cartes : image réelle ── */
.gift-card { padding: 0; overflow: hidden; }
.gift-card::before { display: none; }
.card-body { padding: 18px 20px 20px; }
.card-image {
  position: relative;
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, var(--clr-primary-l), var(--clr-bg));
  overflow: hidden;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.gift-card:hover .card-image img { transform: scale(1.06); }
.card-image.img-fallback img { display: none; }
.card-image.img-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
}
.card-image.img-fallback .card-emoji-badge {
  position: static; font-size: 2.6rem; background: none; box-shadow: none; padding: 0;
}
.card-emoji-badge {
  position: absolute; bottom: 8px; left: 8px;
  font-size: 1.3rem;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.card-image .card-num {
  position: absolute; top: 8px; left: 8px;
  margin: 0;
  background: rgba(28,25,23,.65);
  color: #fff;
}

.btn-compare {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  text-decoration: none;
  flex-shrink: 0;
  transition: all var(--transition);
}
.btn-compare:hover { border-color: var(--clr-primary); transform: translateY(-2px); }

/* ── Sections d'accueil ── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--clr-text);
  margin: 36px 0 16px;
  text-align: center;
}

/* Cadeau du jour */
.gotd-section { margin-bottom: 8px; }
.gotd-card {
  display: flex;
  background: linear-gradient(120deg, var(--clr-primary), var(--clr-primary-d));
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  color: #fff;
  min-height: 170px;
}
.gotd-image {
  position: relative;
  width: 200px;
  flex-shrink: 0;
  background: rgba(255,255,255,.1);
}
.gotd-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gotd-image.img-fallback img { display: none; }
.gotd-image .gotd-emoji {
  position: absolute; bottom: 10px; right: 10px;
  font-size: 1.6rem;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
}
.gotd-image.img-fallback { display: flex; align-items: center; justify-content: center; }
.gotd-image.img-fallback .gotd-emoji { position: static; font-size: 3rem; background: none; width: auto; height: auto; }
.gotd-info { padding: 22px 26px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gotd-tag {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--clr-accent);
  background: rgba(255,255,255,.15);
  padding: 3px 10px; border-radius: 99px;
  width: fit-content;
}
.gotd-info h3 { font-family: var(--font-display); font-size: 1.25rem; }
.gotd-info p { font-size: .85rem; opacity: .9; max-width: 480px; }
.gotd-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.gotd-timer { font-size: .78rem; opacity: .85; }

/* Occasions */
.occasions-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.occasion-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 99px;
  font-size: .85rem; font-weight: 600;
  color: var(--clr-text);
  cursor: pointer;
  transition: all var(--transition);
}
.occasion-chip:hover { border-color: var(--clr-primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.occasion-days {
  font-size: .68rem; font-weight: 700;
  color: var(--clr-accent-d);
  background: #FFF8E6;
  padding: 2px 7px;
  border-radius: 99px;
}

/* Tendances */
.trending-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scroll-snap-type: x mandatory;
}
.trending-row::-webkit-scrollbar { height: 6px; }
.trending-row::-webkit-scrollbar-thumb { background: var(--clr-border); border-radius: 99px; }
.trend-card {
  flex: 0 0 140px;
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--clr-text);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.trend-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--clr-primary-l); }
.trend-img { position: relative; height: 90px; background: var(--clr-primary-l); }
.trend-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trend-img.img-fallback img { display: none; }
.trend-img span {
  position: absolute; bottom: 4px; right: 4px;
  font-size: 1rem;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.trend-img.img-fallback { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent)); }
.trend-img.img-fallback span { position: static; font-size: 1.8rem; background: none; width: auto; height: auto; }
.trend-title { font-size: .76rem; font-weight: 600; padding: 8px 10px 2px; line-height: 1.3; }
.trend-stars { display: block; padding: 0 10px 10px; color: var(--clr-accent); font-size: .72rem; }

/* ── Newsletter ── */
.newsletter-section {
  background: var(--clr-primary-l);
  padding: 38px 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}
.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.newsletter-text h2 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 4px; }
.newsletter-text p { font-size: .85rem; color: var(--clr-muted); }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  font-size: .88rem;
  min-width: 220px;
  font-family: var(--font-body);
}
.btn-newsletter {
  padding: 12px 22px;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-newsletter:hover { background: var(--clr-primary-d); transform: translateY(-2px); }

/* ── FAQ ── */
.faq-section { padding: 20px 0 50px; }
.faq-section .container { max-width: 720px; }
.faq-item {
  border-bottom: 1px solid var(--clr-border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 18px 4px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--clr-text);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
}
.faq-icon { font-size: 1.2rem; color: var(--clr-primary); transition: transform var(--transition); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
  font-size: .85rem;
  color: var(--clr-muted);
  line-height: 1.6;
}
.faq-item.open .faq-answer { max-height: 220px; }
.faq-answer p { padding: 0 4px 18px; }

/* ── Bouton flottant ── */
.sticky-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 22px;
  background: var(--clr-accent);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-weight: 700;
  font-size: .88rem;
  box-shadow: 0 6px 22px rgba(245,158,11,.45);
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  transform: translateY(20px) scale(.9);
  pointer-events: none;
  transition: all .25s ease;
}
.sticky-cta.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.sticky-cta:hover { background: var(--clr-accent-d); transform: translateY(-3px) scale(1.03); }

/* ── Confettis ── */
.confetti-container {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 9px; height: 14px;
  opacity: .9;
  animation: confettiFall linear forwards;
  border-radius: 2px;
}
@keyframes confettiFall {
  to { top: 110vh; transform: rotate(360deg); }
}

/* ── Modal légal : réutilise modal-overlay / modal-box existants ── */
#legalBody p { margin-bottom: 12px; font-size: .88rem; color: var(--clr-muted); line-height: 1.6; }
#legalBody a { color: var(--clr-primary); }

/* =========================================================
   MODE SOMBRE
   ========================================================= */
:root[data-theme="dark"] {
  --clr-bg:        #16141C;
  --clr-surface:   #211E29;
  --clr-primary:   #A78BFA;
  --clr-primary-d: #C4B5FD;
  --clr-primary-l: #322B45;
  --clr-accent:    #FBBF24;
  --clr-accent-d:  #FCD34D;
  --clr-text:      #F4F2FA;
  --clr-muted:     #A8A2B8;
  --clr-border:    #34303E;
  --clr-ad-bg:     #211E29;
}
:root[data-theme="dark"] .ad-placeholder { border-color: #43404f; color: #7d7891; }
:root[data-theme="dark"] .card-badge.budget { background: #3a2f12; }
:root[data-theme="dark"] .occasion-days { background: #3a2f12; }
:root[data-theme="dark"] .option-btn,
:root[data-theme="dark"] .interest-btn { background: var(--clr-surface); }

/* ── Responsive additions ── */
@media (max-width: 640px) {
  .gotd-card { flex-direction: column; }
  .gotd-image { width: 100%; height: 140px; }
  .newsletter-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .newsletter-form { justify-content: center; }
  .newsletter-form input { flex: 1; min-width: 0; }
  .sticky-cta { right: 16px; bottom: 16px; padding: 12px 18px; font-size: .82rem; }
}
