/* ==========================================================================
   Ya Délices SABS — Design System
   Épuré · Premium · Mobile-first
   ========================================================================== */

:root {
  /* Couleurs — chaleureux, gourmand, élégant */
  --yd-ivory: #FDFBF6;
  --yd-cream: #F7F2E8;
  --yd-ink: #1C1917;
  --yd-ink-soft: #57534E;
  --yd-muted: #A8A29E;
  --yd-terra: #8123AB;
  --yd-terra-deep: #5E1780;
  --yd-terra-soft: #F0E6F7;
  --yd-sage: #5B7C5A;
  --yd-gold: #D9A441;
  --yd-white: #FFFFFF;
  --yd-line: #EDE6D6;

  /* Typographie */
  --yd-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --yd-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Rayons & ombres */
  --yd-r-sm: 10px;
  --yd-r-md: 18px;
  --yd-r-lg: 28px;
  --yd-shadow: 0 12px 40px rgba(28, 25, 23, 0.08);
  --yd-shadow-lg: 0 24px 70px rgba(28, 25, 23, 0.12);

  /* Animations */
  --yd-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --yd-dur: 0.7s;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--yd-sans);
  background: var(--yd-ivory);
  color: var(--yd-ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Typographie ---------- */
h1, h2, h3, .yd-serif { font-family: var(--yd-serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 8vw, 4rem); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.4rem); margin: 0 0 0.5em; }
h3 { font-size: clamp(1.2rem, 4vw, 1.5rem); margin: 0 0 0.4em; }
p { margin: 0 0 1em; color: var(--yd-ink-soft); }

.yd-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yd-terra);
  margin-bottom: 1.1em;
}

.yd-lead { font-size: 1.12rem; color: var(--yd-ink-soft); max-width: 34em; }

/* ---------- Layout ---------- */
.yd-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.yd-section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.yd-center { text-align: center; }
.yd-center .yd-lead { margin-left: auto; margin-right: auto; }

/* ---------- Navigation ---------- */
.yd-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(253, 251, 246, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--yd-line);
  transition: transform 0.35s var(--yd-ease), box-shadow 0.35s;
}
.yd-nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.yd-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--yd-ink); }
.yd-brand-mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--yd-terra), var(--yd-terra-deep));
  color: #fff; display: grid; place-items: center;
  font-family: var(--yd-serif); font-weight: 700; font-size: 1.1rem;
}
.yd-brand-name { font-family: var(--yd-serif); font-weight: 700; font-size: 1.15rem; }
.yd-brand-name small { display: block; font-family: var(--yd-sans); font-weight: 600; font-size: 0.6rem; letter-spacing: 0.2em; color: var(--yd-terra); }

.yd-links { display: none; gap: 4px; }
.yd-links a {
  text-decoration: none; color: var(--yd-ink-soft); font-weight: 600; font-size: 0.92rem;
  padding: 8px 14px; border-radius: 999px; transition: all 0.25s;
}
.yd-links a:hover { color: var(--yd-ink); background: var(--yd-cream); }
.yd-links a.active { color: var(--yd-terra-deep); background: var(--yd-terra-soft); }

.yd-burger {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; background: transparent; cursor: pointer; border-radius: 12px;
}
.yd-burger span { display: block; width: 22px; height: 2px; background: var(--yd-ink); border-radius: 2px; position: relative; transition: all 0.3s var(--yd-ease); }
.yd-burger span::before, .yd-burger span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px;
  background: var(--yd-ink); border-radius: 2px; transition: all 0.3s var(--yd-ease);
}
.yd-burger span::before { top: -7px; }
.yd-burger span::after { top: 7px; }
.yd-burger.open span { background: transparent; }
.yd-burger.open span::before { top: 0; transform: rotate(45deg); }
.yd-burger.open span::after { top: 0; transform: rotate(-45deg); }

.yd-mobile-menu {
  position: fixed; inset: 64px 0 auto 0; z-index: 49;
  background: var(--yd-ivory); border-bottom: 1px solid var(--yd-line);
  padding: 12px 20px 20px; display: none; flex-direction: column; gap: 2px;
  box-shadow: var(--yd-shadow);
}
.yd-mobile-menu.open { display: flex; animation: ydSlideDown 0.35s var(--yd-ease); }
.yd-mobile-menu a {
  text-decoration: none; color: var(--yd-ink); font-weight: 600; font-size: 1.05rem;
  padding: 13px 8px; border-bottom: 1px solid var(--yd-line);
  display: flex; justify-content: space-between; align-items: center;
}
.yd-mobile-menu a:last-child { border-bottom: 0; }
.yd-mobile-menu a.active { color: var(--yd-terra-deep); }

@media (min-width: 860px) {
  .yd-links { display: flex; }
  .yd-burger, .yd-mobile-menu { display: none !important; }
}

/* ---------- Langue FR/EN ---------- */
.yd-lang { display: flex; background: var(--yd-cream); border-radius: 999px; padding: 3px; }
.yd-lang button {
  border: 0; background: transparent; cursor: pointer;
  font-weight: 700; font-size: 0.78rem; padding: 7px 13px; border-radius: 999px;
  color: var(--yd-ink-soft); transition: all 0.25s;
}
.yd-lang button.active { background: var(--yd-ink); color: #fff; }

/* ---------- Hero ---------- */
.yd-hero {
  position: relative; overflow: hidden;
  padding: calc(64px + clamp(3rem, 8vw, 5.5rem)) 0 clamp(3.5rem, 9vw, 6rem);
  background: linear-gradient(160deg, #1e1a16 0%, #3a2a1c 55%, #6b4423 100%);
  color: #fff;
}
.yd-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(217,164,65,0.22), transparent 60%),
              radial-gradient(ellipse 60% 50% at 20% 80%, rgba(194,112,61,0.18), transparent 60%);
  pointer-events: none;
}
.yd-hero-inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.yd-hero .yd-eyebrow { color: var(--yd-gold); }
.yd-hero h1 { color: #fff; max-width: 14em; }
.yd-hero p { color: rgba(255,255,255,0.78); max-width: 36em; font-size: 1.08rem; }
.yd-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- Boutons ---------- */
.yd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 0.98rem; text-decoration: none; cursor: pointer;
  padding: 14px 28px; border-radius: 999px; border: 0;
  transition: transform 0.2s var(--yd-ease), box-shadow 0.25s, background 0.25s;
  min-height: 50px;
}
.yd-btn:active { transform: scale(0.97); }
.yd-btn-primary { background: var(--yd-terra); color: #fff; box-shadow: 0 10px 28px rgba(194,112,61,0.35); }
.yd-btn-primary:hover { background: var(--yd-terra-deep); transform: translateY(-2px); }
.yd-btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.yd-btn-ghost:hover { background: rgba(255,255,255,0.2); }
.yd-btn-dark { background: var(--yd-ink); color: #fff; }
.yd-btn-dark:hover { transform: translateY(-2px); box-shadow: var(--yd-shadow); }
.yd-btn-light { background: var(--yd-cream); color: var(--yd-ink); }
.yd-btn-light:hover { background: var(--yd-terra-soft); }

/* ---------- Cartes ---------- */
.yd-card {
  background: var(--yd-white); border-radius: var(--yd-r-lg);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: var(--yd-shadow); border: 1px solid rgba(237,230,214,0.7);
  transition: transform 0.35s var(--yd-ease), box-shadow 0.35s;
}
.yd-card:hover { transform: translateY(-4px); box-shadow: var(--yd-shadow-lg); }

.yd-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .yd-grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .yd-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Menu de la semaine ---------- */
.yd-day { margin-bottom: 8px; }
.yd-day-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: var(--yd-white); border: 1px solid var(--yd-line); border-radius: var(--yd-r-md);
  padding: 18px 20px; cursor: pointer; font-family: var(--yd-serif);
  font-size: 1.25rem; font-weight: 700; color: var(--yd-ink); text-align: left;
  transition: all 0.3s var(--yd-ease);
}
.yd-day-head:hover { border-color: var(--yd-terra); }
.yd-day-head .yd-day-date { font-family: var(--yd-sans); font-size: 0.8rem; font-weight: 600; color: var(--yd-muted); }
.yd-day-head .yd-chev { transition: transform 0.35s var(--yd-ease); color: var(--yd-terra); font-size: 1.1rem; }
.yd-day.open .yd-day-head { background: var(--yd-ink); color: #fff; border-color: var(--yd-ink); }
.yd-day.open .yd-day-head .yd-day-date { color: var(--yd-gold); }
.yd-day.open .yd-chev { transform: rotate(180deg); }
.yd-day-body { max-height: 0; overflow: hidden; transition: max-height 0.5s var(--yd-ease); }
.yd-day.open .yd-day-body { max-height: 600px; }
.yd-day-inner { padding: 6px 4px 18px; display: grid; gap: 10px; }
.yd-meal {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--yd-cream); border-radius: var(--yd-r-sm); padding: 14px 16px;
}
.yd-meal-ico {
  flex: none; width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.3rem; background: var(--yd-white);
  box-shadow: 0 4px 12px rgba(28,25,23,0.06);
}
.yd-meal b { display: block; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--yd-terra-deep); margin-bottom: 2px; }
.yd-meal span { color: var(--yd-ink); font-weight: 500; }

/* ---------- Jeux ---------- */
.yd-game-card { text-align: center; cursor: pointer; }
.yd-game-ico { font-size: 2.6rem; margin-bottom: 0.6em; display: block; }
.yd-riddle { text-align: left; }
.yd-riddle-q { font-family: var(--yd-serif); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.8em; }
.yd-riddle-a {
  max-height: 0; overflow: hidden; transition: max-height 0.45s var(--yd-ease), opacity 0.3s;
  opacity: 0; background: var(--yd-terra-soft); border-radius: var(--yd-r-sm);
  padding: 0 16px; color: var(--yd-terra-deep); font-weight: 600;
}
.yd-riddle.open .yd-riddle-a { max-height: 200px; opacity: 1; padding: 14px 16px; margin-top: 10px; }

.yd-quiz-opt {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--yd-cream); border: 2px solid transparent; border-radius: var(--yd-r-sm);
  padding: 14px 16px; margin-bottom: 10px; font-size: 1rem; font-weight: 500; color: var(--yd-ink);
  transition: all 0.25s;
}
.yd-quiz-opt:hover { border-color: var(--yd-terra); }
.yd-quiz-opt.correct { background: #E8F5E9; border-color: var(--yd-sage); color: #2E7D32; }
.yd-quiz-opt.wrong { background: #FFEBEE; border-color: #C62828; color: #C62828; }
.yd-quiz-opt:disabled { cursor: default; opacity: 0.9; }

#yd-scratch-wrap { position: relative; border-radius: var(--yd-r-md); overflow: hidden; touch-action: none; }
#yd-scratch { display: block; width: 100%; border-radius: var(--yd-r-md); cursor: crosshair; }

.yd-ws-grid { display: grid; gap: 4px; justify-content: center; margin: 1.2em auto; user-select: none; }
.yd-ws-cell {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--yd-white); border: 1px solid var(--yd-line); border-radius: 8px;
  font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.15s;
}
.yd-ws-cell.sel { background: var(--yd-terra-soft); border-color: var(--yd-terra); }
.yd-ws-cell.found { background: var(--yd-sage); border-color: var(--yd-sage); color: #fff; }
.yd-ws-words { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.yd-ws-word { background: var(--yd-cream); padding: 6px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
.yd-ws-word.done { background: var(--yd-sage); color: #fff; text-decoration: line-through; }

/* ---------- Animations au scroll ---------- */
.yd-reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--yd-dur) var(--yd-ease), transform var(--yd-dur) var(--yd-ease); }
.yd-reveal.visible { opacity: 1; transform: none; }
.yd-reveal-d1 { transition-delay: 0.1s; }
.yd-reveal-d2 { transition-delay: 0.2s; }
.yd-reveal-d3 { transition-delay: 0.3s; }

@keyframes ydSlideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes ydFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ydPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.yd-float { animation: ydFloat 5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Pied de page ---------- */
.yd-footer { background: var(--yd-ink); color: rgba(255,255,255,0.7); padding: 3.5rem 0 2rem; margin-top: 2rem; }
.yd-footer h3 { color: #fff; }
.yd-footer a { color: var(--yd-gold); text-decoration: none; }
.yd-footer a:hover { text-decoration: underline; }
.yd-footer-grid { display: grid; gap: 2rem; margin-bottom: 2.5rem; }
@media (min-width: 700px) { .yd-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.yd-footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.5rem; font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Divers ---------- */
.yd-badge {
  display: inline-block; background: var(--yd-terra-soft); color: var(--yd-terra-deep);
  font-size: 0.78rem; font-weight: 700; padding: 6px 14px; border-radius: 999px;
}
.yd-divider { height: 1px; background: var(--yd-line); margin: 2.5rem 0; border: 0; }
.yd-back { display: inline-flex; align-items: center; gap: 8px; color: var(--yd-terra-deep); font-weight: 600; text-decoration: none; margin-bottom: 1.5rem; }

/* ==========================================================================
   Logo Ya'Délices — anneau translucide animé (victoire/laurier)
   ========================================================================== */
.yd-brand-mark-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.yd-brand-mark-wrap::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(129, 35, 171, 0.35) 60deg,
    transparent 120deg,
    transparent 180deg,
    rgba(129, 35, 171, 0.35) 240deg,
    transparent 300deg,
    transparent 360deg
  );
  animation: yd-ring-spin 6s linear infinite;
  pointer-events: none;
}
.yd-brand-mark-wrap::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(129, 35, 171, 0.25);
  pointer-events: none;
}
@keyframes yd-ring-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .yd-brand-mark-wrap::before { animation: none; }
}
.yd-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
