@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;1,600&family=Quicksand:wght@400;600;700&display=swap");

:root {
  --bg: #fdf4ee;
  --bg-soft: #f9e8e0;
  --card: #fffdfb;
  --ink: #4a3733;
  --ink-soft: #8a6f68;
  --accent: #c96f6f;
  --accent-deep: #a24f57;
  --gold: #c9992b;
  --shadow: 0 10px 30px rgba(162, 79, 87, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Quicksand", system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--bg-soft), transparent),
    radial-gradient(900px 500px at -10% 100%, #f6e3ea, transparent),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 60px;
  overflow-x: hidden;
}

main {
  width: 100%;
  max-width: 640px;
  position: relative;
  z-index: 1;
  /* La page reste invisible jusqu'à ce que son contenu soit prêt (évite les flashs d'éléments vides) */
  opacity: 0;
}
body.ready main {
  opacity: 1;
  transition: opacity 0.35s ease;
}

h1, h2, .serif {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  margin: 0.4em 0 0.2em;
  text-align: center;
  color: var(--accent-deep);
}

.subtitle {
  text-align: center;
  color: var(--ink-soft);
  margin: 0 auto 1.6em;
  max-width: 46ch;
  line-height: 1.55;
}

/* ---------- Cœurs flottants en fond ---------- */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hearts-bg span {
  position: absolute;
  bottom: -40px;
  font-size: 22px;
  opacity: 0;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(-8deg); opacity: 0; }
  10%  { opacity: 0.35; }
  90%  { opacity: 0.15; }
  100% { transform: translateY(-110vh) rotate(10deg); opacity: 0; }
}

/* ---------- Badge de compte ---------- */
.account-badge {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid #eed6cf;
  border-radius: 999px;
  padding: 5px 5px 5px 13px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: 0 4px 12px rgba(74, 55, 51, 0.08);
}
.account-badge button {
  border: none;
  background: #fdeae4;
  color: var(--accent-deep);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition: 0.15s;
}
.account-badge button:hover { background: var(--accent); color: #fff; }

/* ---------- Progression ---------- */
.progress {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 4px;
  font-size: 1.35rem;
  user-select: none;
}
.progress .heart { filter: grayscale(1) opacity(0.35); transition: 0.3s; }
.progress .heart.done { filter: none; transform: scale(1.1); }

.letters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
  min-height: 38px;
}
.letters .slot {
  width: 34px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  border: 2px dashed #e5c9c2;
  display: grid;
  place-items: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-deep);
}
.letters .slot.filled {
  border-style: solid;
  border-color: var(--accent);
  background: #fdeae4;
  animation: pop 0.4s ease;
}
@keyframes pop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ---------- Cartes & boutons ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
}

.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  padding: 14px 30px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(162, 79, 87, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(162, 79, 87, 0.35); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: #fff;
  color: var(--accent-deep);
  border: 2px solid var(--accent);
  box-shadow: none;
}
.center { text-align: center; }

/* ---------- Pièce 1 : choisis ton date ---------- */
.candidates {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  min-height: 60vh;
}
.candidate {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.2s;
  touch-action: manipulation;
}
.candidate:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: calc(50% - 8px);
  justify-self: center;
}
.candidate img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  pointer-events: none;
}
.candidate .name {
  font-weight: 700;
  margin-top: 8px;
  pointer-events: none;
}
.candidate.dodger {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 0.2s;
}
.dodge-bubble {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
}
.dodge-bubble.show { opacity: 1; }

/* ---------- Pièce 2 : puzzle ---------- */
.puzzle {
  display: grid;
  gap: 6px;
  width: min(90vw, 420px);
  margin: 0 auto;
  aspect-ratio: 1;
}
.puzzle .tile {
  border-radius: 10px;
  background-repeat: no-repeat;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  transition: transform 0.15s, outline 0.15s;
  outline: 3px solid transparent;
}
.puzzle .tile.selected {
  outline-color: var(--gold);
  transform: scale(0.94);
  z-index: 2;
}
.puzzle.solved .tile { cursor: default; outline: none; }

/* ---------- Pièce 3 : captcha ---------- */
.captcha-box {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.captcha-head {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  padding: 16px 18px;
  font-weight: 600;
}
.captcha-head strong { font-size: 1.15rem; display: block; }
.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
}
.captcha-cell {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
}
.captcha-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.captcha-cell.checked img { transform: scale(0.82); }
.captcha-cell .tick {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #4285f4;
  color: #fff;
  display: none;
  place-items: center;
  font-size: 0.9rem;
  z-index: 2;
}
.captcha-cell.checked .tick { display: grid; }
.captcha-word {
  position: relative;
  padding: 14px;
}
.captcha-svg svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #eee;
}
.captcha-refresh {
  position: absolute;
  top: 22px;
  right: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s;
}
.captcha-refresh:hover { transform: rotate(180deg); }
.captcha-answer { padding: 0 14px 6px; }
.captcha-answer input {
  width: 100%;
  border-radius: 12px;
  border: 2px solid #eed6cf;
  padding: 13px 15px;
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  letter-spacing: 0.06em;
}
.captcha-answer input:focus { border-color: var(--accent); }
.captcha-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid #eee;
}
.captcha-error {
  color: #c0392b;
  font-weight: 600;
  padding: 0 14px 10px;
  min-height: 1.4em;
}

/* ---------- Pièce 4 : quiz ---------- */
.quiz-q { font-size: 1.15rem; font-weight: 700; margin-bottom: 18px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option {
  background: #fff;
  border: 2px solid #eed6cf;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  transition: 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiz-option img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  flex: none;
}
.quiz-option:hover { border-color: var(--accent); }
.quiz-option.wrong { border-color: #c0392b; background: #fdecea; animation: shake 0.4s; }
.quiz-option.right { border-color: #27ae60; background: #eafaf1; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.quiz-feedback { min-height: 1.6em; margin-top: 14px; font-weight: 600; color: var(--accent-deep); }
.quiz-step { color: var(--ink-soft); font-weight: 600; margin-bottom: 8px; }

/* ---------- Pièce 5 : machine à sous ---------- */
.slot-machine {
  max-width: 400px;
  margin: 0 auto;
  background: linear-gradient(160deg, #c96f6f, #a24f57);
  border-radius: 26px;
  padding: 18px 18px 26px;
  box-shadow: 0 18px 44px rgba(162, 79, 87, 0.4);
  text-align: center;
}
.slot-top {
  color: #ffe9b8;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.9rem;
  margin-bottom: 14px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.reels {
  display: flex;
  gap: 10px;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 18px;
  padding: 14px;
}
.reel {
  width: 92px;
  height: 100px;
  background: linear-gradient(#fff, #fdf4ee);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.15);
  user-select: none;
}
.reel.spin { animation: reelShake 0.12s linear infinite; filter: blur(1.5px); }
@keyframes reelShake {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(3px); }
}
.reel.land { animation: reelLand 0.3s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes reelLand {
  0% { transform: translateY(-14px) scale(1.15); }
  100% { transform: none; }
}
.reel.win {
  background: linear-gradient(#fff7e0, #ffe9b8);
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.1), 0 0 22px rgba(255, 233, 184, 0.9);
  animation: winPulse 0.7s ease-in-out infinite;
}
@keyframes winPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
/* ---------- Les trois poules ---------- */
.hens {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  min-height: 110px;
  margin-top: 12px;
  padding: 0 6px;
}
.hen {
  width: 62px;
  transform-origin: bottom center;
  transition: transform 0.45s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.hen svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.25)); }
.hen.fed { animation: henHop 0.45s; }
@keyframes henHop {
  0%, 100% { translate: 0 0; }
  35% { translate: 0 -12px; }
  60% { translate: 0 0; }
  75% { translate: 0 -4px; }
}
.hen.panic { animation: henPanic 0.14s linear infinite; }
@keyframes henPanic {
  0%, 100% { rotate: -7deg; }
  50% { rotate: 7deg; }
}
.hen.gone { opacity: 0; transform: scale(0.1) !important; transition: 0.35s; }

/* La pièce d'or qui vole vers une poule */
.coin-fly {
  position: fixed;
  z-index: 250;
  font-size: 28px;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.3, 0.8, 0.4, 1), opacity 0.6s;
}

/* Plumes et éclats de l'explosion */
.burst {
  position: fixed;
  z-index: 260;
  font-size: 24px;
  pointer-events: none;
  animation: burstFly 0.95s ease-out forwards;
}
@keyframes burstFly {
  from { transform: translate(0, 0) rotate(0); opacity: 1; }
  to   { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* La machine s'emballe */
.slot-machine.frenzy { animation: machineFrenzy 0.14s linear infinite; }
@keyframes machineFrenzy {
  0%, 100% { transform: translate(-3px, 1px) rotate(-0.6deg); }
  50% { transform: translate(3px, -1px) rotate(0.6deg); }
}

.slot-message {
  color: #fff;
  font-weight: 700;
  min-height: 1.6em;
  margin: 16px 0 12px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.slot-btn {
  font-size: 1.15rem;
  padding: 15px 40px;
  background: linear-gradient(135deg, #ffd77a, var(--gold));
  color: #6b4210;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.slot-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ---------- Coffre ---------- */
.code-inputs { display: flex; justify-content: center; gap: 10px; margin: 24px 0; }
.code-inputs input {
  width: 52px;
  height: 60px;
  border-radius: 12px;
  border: 2px solid #e5c9c2;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: #fff;
  outline: none;
}
.code-inputs input:focus { border-color: var(--accent); }
.vault-error { color: #c0392b; font-weight: 600; text-align: center; min-height: 1.6em; }

/* ---------- Coffre : le twist de la 6e lettre ---------- */
@keyframes vaultShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-10px) rotate(-1deg); }
  35% { transform: translateX(9px) rotate(1deg); }
  55% { transform: translateX(-7px); }
  75% { transform: translateX(5px); }
}
.card.shake { animation: vaultShake 0.55s; }
.twist-msg {
  text-align: center;
  font-weight: 700;
  color: var(--accent-deep);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 18px;
}
.slot-box {
  width: 46px;
  height: 54px;
  border-radius: 12px;
  border: 2px dashed #e5c9c2;
  background: #fff;
  display: grid;
  place-items: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-deep);
  cursor: pointer;
  transition: 0.15s;
}
.slot-box.filled {
  border-style: solid;
  border-color: var(--accent);
  background: #fdeae4;
  animation: pop 0.3s ease;
}
.tile-rack {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 44px 0 8px;
}
/* Les lettres à choisir : même taille que celles du mot, pour une animation fluide */
.letter-tile {
  width: 46px;
  height: 54px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  background: linear-gradient(#fff, #fdeae4);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-deep);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(162, 79, 87, 0.2);
  transition: transform 0.15s, opacity 0.15s;
}
.letter-tile:hover:not(:disabled) { transform: translateY(-3px); }
.letter-tile:disabled { opacity: 0.2; transform: scale(0.9); cursor: default; }

/* La nouvelle case qui s'ouvre pour accueillir la lettre manquante */
.slot-new { animation: slotGrow 0.4s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
@keyframes slotGrow {
  from { width: 0; opacity: 0; transform: scale(0.4); }
  to   { width: 46px; opacity: 1; transform: scale(1); }
}

/* Une mauvaise lettre est recrachée par le coffre */
.letter-tile.wrong { animation: tileSpit 0.5s; border-color: #c0392b; color: #c0392b; }
@keyframes tileSpit {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-8px, -14px) rotate(-14deg); }
  45% { transform: translate(9px, -20px) rotate(12deg); }
  70% { transform: translate(-5px, -6px) rotate(-6deg); }
}

/* La tuile fantôme qui vole vers sa case (FLIP) */
.tile-ghost {
  position: fixed;
  margin: 0;
  z-index: 300;
  pointer-events: none;
  transition: transform 0.95s cubic-bezier(0.25, 1, 0.35, 1);
  box-shadow: 0 12px 30px rgba(162, 79, 87, 0.45);
}

/* Le bouton "Découvrir ton cadeau" surgit une fois le mot complété */
.gift-btn-wrap { margin-top: 26px; animation: rise 0.5s cubic-bezier(0.2, 1.3, 0.4, 1); }
.gift-btn-wrap .btn { animation: heartbeat 1.6s ease-in-out 0.6s infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.06); }
  24% { transform: scale(1); }
}

/* Le mot complet s'illumine */
.slot-box.glow {
  border-color: var(--gold);
  background: #fff7e0;
  color: var(--gold);
  box-shadow: 0 0 18px rgba(201, 153, 43, 0.55);
  transition: 0.3s;
}
.gift-reveal { text-align: center; }
.gift-reveal img { max-width: 100%; border-radius: var(--radius); margin: 18px 0; box-shadow: var(--shadow); }

/* ---------- Overlay de succès ---------- */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 55, 51, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  place-items: center;
  z-index: 100;
  padding: 20px;
}
.success-overlay.show { display: grid; }
.success-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 34px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  animation: rise 0.45s cubic-bezier(0.2, 1.3, 0.4, 1);
}
@keyframes rise {
  from { transform: translateY(50px) scale(0.9); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.success-card .big-letter {
  font-family: "Cormorant Garamond", serif;
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin: 10px 0;
  text-shadow: 0 4px 14px rgba(201, 153, 43, 0.35);
}
.success-card h2 { margin: 0; font-size: 1.8rem; color: var(--accent-deep); }
.success-card p { color: var(--ink-soft); line-height: 1.5; }

/* ---------- Confettis ---------- */
.confetti {
  position: fixed;
  top: -30px;
  font-size: 22px;
  z-index: 200;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(115vh) rotate(720deg); }
}

/* ---------- Confirmation (pièce 1) ---------- */
.confirm-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.confirm-btns .btn { transition: transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
.confirm-no-msg {
  min-height: 1.5em;
  color: var(--ink-soft);
  font-weight: 600;
  font-style: italic;
  margin: 6px 0 0;
}

/* ---------- Journal : bandeau crépuscule ---------- */
.journal-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(150deg, #b76e79 0%, #96586f 45%, #6f4a6b 100%);
  color: #fff;
  text-align: center;
  padding: 38px 24px 32px;
  margin-bottom: 26px;
  box-shadow: 0 16px 40px rgba(111, 74, 107, 0.35);
}
.journal-hero h1 { color: #fff; margin-top: 0; text-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.journal-hero p { color: #ffffffd9; max-width: 42ch; margin: 0 auto 18px; line-height: 1.5; }
.hero-stars { position: absolute; inset: 0; pointer-events: none; }
.hero-stars span {
  position: absolute;
  color: #ffe9b8;
  animation: twinkle 3.5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.15); }
}
.cd-label {
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffe9b8;
  margin-bottom: 10px;
}
.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
}
.cd-box {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 68px;
}
.cd-box span {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cd-box small {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffffb3;
  margin-top: 4px;
}
.cd-sep {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
  padding-top: 8px;
  color: #ffe9b8;
}
/* La pensée du jour */
.hero-quote {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.hero-quote-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffe9b8;
  margin-bottom: 8px;
}
.hero-quote-text {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  color: #fff;
  margin: 0 auto 6px;
  max-width: 40ch;
}
.hero-quote-author { color: #ffffffb3; font-size: 0.9rem; font-weight: 600; }

.quote-post {
  background: linear-gradient(150deg, #fff7e0, #fdeae4) !important;
  border: 1px solid rgba(201, 153, 43, 0.35);
  text-align: center;
}
.quote-post .quote-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.quote-post .quote-text {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 8px;
}
.quote-post .quote-author { color: var(--ink-soft); font-weight: 600; font-size: 0.9rem; }

/* ---------- Page compte à rebours plein écran (avant le jour J) ---------- */
.count-page {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(255, 233, 184, 0.12), transparent),
    radial-gradient(900px 600px at -10% 110%, rgba(240, 161, 168, 0.18), transparent),
    linear-gradient(160deg, #b76e79 0%, #96586f 45%, #6f4a6b 100%);
  justify-content: center;
  padding: 16px;
}
.count-page main.count-main {
  max-width: none;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 4vh, 44px);
}
.stars-fixed { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.stars-fixed span {
  position: absolute;
  color: #ffe9b8;
  animation: twinkle 3.5s ease-in-out infinite;
}
.pulse-heart {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  display: inline-block;
  animation: heartbeat 1.6s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
}
.count-grid {
  display: flex;
  align-items: flex-start;
  gap: clamp(10px, 2.4vw, 30px);
}
.count-cell { text-align: center; }
.count-cell span {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(3.6rem, 12.5vw, 9.5rem);
  line-height: 0.95;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 34px rgba(255, 233, 184, 0.4), 0 6px 26px rgba(0, 0, 0, 0.3);
}
.count-cell span.tick { animation: countTick 0.5s ease-out; }
@keyframes countTick {
  from { transform: scale(1.08); text-shadow: 0 0 46px rgba(255, 233, 184, 0.75), 0 6px 26px rgba(0, 0, 0, 0.3); }
  to   { transform: scale(1); }
}
.count-cell small {
  display: block;
  margin-top: clamp(8px, 1.6vh, 16px);
  font-size: clamp(0.6rem, 1.4vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
  color: #ffe9b8;
}
.count-sep {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 6.5rem);
  line-height: 1.1;
  color: #ffe9b8;
  opacity: 0.55;
}
/* iPhone : grille 2×2, chiffres géants, sans séparateurs */
@media (max-width: 620px) {
  .count-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6vh 10vw;
  }
  .count-sep { display: none; }
  .count-cell span { font-size: clamp(4.2rem, 24vw, 6.5rem); }
}

.today-badge {
  display: inline-block;
  background: #ffe9b8;
  color: #6f4a6b;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

/* ---------- Journal : posts façon polaroid ---------- */
.journal-feed { display: grid; gap: 22px; }
.post {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.journal-feed .post {
  position: relative;
  border-radius: 8px;
  padding: 24px 22px 22px;
  box-shadow: 0 8px 24px rgba(74, 55, 51, 0.15);
}
.journal-feed .post:nth-child(odd) { transform: rotate(-0.8deg); }
.journal-feed .post:nth-child(even) { transform: rotate(0.8deg); }
.journal-feed .post::before {
  /* petit bout de ruban adhésif */
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 90px;
  height: 26px;
  background: rgba(255, 233, 184, 0.75);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.post .date {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.post .text { line-height: 1.6; white-space: pre-wrap; }
.post img {
  max-width: 100%;
  border-radius: 14px;
  margin-top: 12px;
  display: block;
}
.new-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}
.empty-state { text-align: center; color: var(--ink-soft); padding: 40px 0; }

/* ---------- Admin ---------- */
.admin-form textarea {
  width: 100%;
  min-height: 110px;
  border-radius: 14px;
  border: 2px solid #eed6cf;
  padding: 14px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  outline: none;
}
.admin-form textarea:focus { border-color: var(--accent); }
.admin-form input[type="password"],
.admin-form input[type="text"] {
  width: 100%;
  border-radius: 12px;
  border: 2px solid #eed6cf;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
}
.admin-form .row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.post .delete-btn {
  background: none;
  border: none;
  color: #c0392b;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
  margin-top: 10px;
}

footer.nav {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
