@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=Nunito:wght@300;400;600;700&family=DM+Mono:wght@300;400&display=swap');

/* ─── VARIABLES ─────────────────────────────────────── */
:root {
  --cream:      #FDF8F0;
  --warm:       #F5EDD8;
  --burgundy:   #7B2D3E;
  --burg-dark:  #5C1F2D;
  --gold:       #C4922A;
  --gold-light: #E8C56A;
  --blush:      #F0D5CE;
  --charcoal:   #2C2420;
  --gray:       #9B8B84;
  --border:     #E0D5C8;

  --serif:  'Cormorant Garamond', Georgia, serif;
  --sans:   'Nunito', sans-serif;
  --mono:   'DM Mono', monospace;

  --radius: 14px;
  --shadow: 0 4px 32px rgba(44,36,32,0.10);
  --shadow-lg: 0 12px 48px rgba(44,36,32,0.16);
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(240,213,206,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(196,146,42,0.12) 0%, transparent 60%);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
}

img { max-width: 100%; border-radius: var(--radius); display: block; }

/* ─── TYPOGRAPHY ─────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--charcoal);
}

.display {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--burgundy);
}

.chapter-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.lead {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--gray);
}

.body-text {
  font-size: 1rem;
  color: var(--charcoal);
  max-width: 62ch;
}

.italian {
  font-family: var(--serif);
  font-style: italic;
  color: var(--burgundy);
}

/* ─── LAYOUT ─────────────────────────────────────────── */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3rem 0;
}

/* ─── SITE HEADER ────────────────────────────────────── */
.site-header {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.site-logo {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.08em;
}

/* ─── CHAPTER PROGRESS NAV ───────────────────────────── */
.chapter-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 1.5rem;
  background: var(--warm);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.chapter-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  opacity: 0.35;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.chapter-dot.active  { opacity: 1; }
.chapter-dot.done    { opacity: 0.7; }

.dot-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gray);
  background: var(--cream);
  transition: all 0.25s;
}

.chapter-dot.active .dot-circle {
  border-color: var(--burgundy);
  background: var(--burgundy);
  color: white;
  box-shadow: 0 0 0 4px rgba(123,45,62,0.15);
}

.chapter-dot.done .dot-circle {
  border-color: var(--gold);
  color: var(--gold);
}

.dot-label {
  font-size: 0.6rem;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  color: var(--gray);
  text-transform: uppercase;
}

.chapter-connector {
  width: 28px;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}

/* ─── CHAPTER HERO ───────────────────────────────────── */
.chapter-hero {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
}

.chapter-hero .chapter-num {
  display: block;
  margin-bottom: 1rem;
}

.chapter-hero .display {
  margin-bottom: 0.75rem;
}

.chapter-hero .lead {
  margin-top: 1rem;
}

/* ─── DIVIDER ────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  color: var(--border);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider-icon {
  font-size: 1rem;
  color: var(--gold);
}

/* ─── CARD ───────────────────────────────────────────── */
.card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ─── QUOTE BLOCK ────────────────────────────────────── */
.quote-block {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  background: var(--warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--burgundy);
  margin: 2rem 0;
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--burgundy);
  color: white;
}
.btn-primary:hover {
  background: var(--burg-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-gold {
  background: var(--gold);
  color: white;
}
.btn-gold:hover {
  background: #a87820;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--burgundy);
  border: 2px solid var(--burgundy);
}
.btn-outline:hover {
  background: var(--burgundy);
  color: white;
}

/* ─── FAKE TINDER UI ─────────────────────────────────── */
.phone-frame {
  max-width: 340px;
  margin: 0 auto;
  background: #f5f5f5;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.06);
  border: 6px solid #222;
}

.phone-top-bar {
  background: white;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #eee;
}

.phone-back { font-size: 1.1rem; color: #555; text-decoration: none; }
.phone-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blush), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.phone-name { font-size: 0.9rem; font-weight: 700; }
.phone-status { font-size: 0.72rem; color: #f55; }


.phone-chat {
  background: white;
  padding: 1rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 340px;
  overflow-y: auto;
}

.bubble-row {
  display: flex;
  flex-direction: column;
}

.bubble-row.left { align-items: flex-start; }
.bubble-row.right { align-items: flex-end; }

.bubble {
  max-width: 72%;
  padding: 0.6rem 0.9rem;
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.bubble-row.left .bubble {
  background: #f0f0f0;
  color: #333;
  border-bottom-left-radius: 4px;
}

.bubble-row.right .bubble {
  background: #FF4458;
  color: white;
  border-bottom-right-radius: 4px;
}

.bubble-blurred {
  background: #f0f0f0;
  filter: blur(4px);
  user-select: none;
  color: #333;
}

.bubble-time {
  font-size: 0.65rem;
  color: #aaa;
  margin-top: 0.2rem;
  padding: 0 0.3rem;
}

/* ─── QCM ────────────────────────────────────────────── */
.qcm-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--charcoal);
  margin-bottom: 1.2rem;
  text-align: center;
}

.qcm-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.qcm-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.95rem;
  background: white;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.qcm-option:hover {
  border-color: var(--burgundy);
  background: rgba(123,45,62,0.04);
}

.qcm-option .opt-letter {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gold);
  min-width: 1.5rem;
  font-weight: bold;
}

.qcm-option.wrong {
  border-color: #e05252;
  background: #fff5f5;
  animation: shake 0.4s ease;
}

.qcm-option.correct {
  border-color: var(--gold);
  background: rgba(196,146,42,0.08);
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.qcm-feedback {
  margin-top: 1rem;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  display: none;
}
.qcm-feedback.error {
  background: #fff0f0;
  border: 1px solid #f0a0a0;
  color: #c04040;
  display: block;
}
.qcm-feedback.success {
  background: rgba(196,146,42,0.08);
  border: 1px solid var(--gold-light);
  color: var(--burgundy);
  display: block;
}

/* ─── SUCCESS PANEL ──────────────────────────────────── */
.success-panel {
  display: none;
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--warm), rgba(240,213,206,0.4));
  border-radius: var(--radius);
  border: 1px solid var(--gold-light);
  animation: fadeUp 0.6s ease;
}
.success-panel.visible { display: block; }

.success-emoji { font-size: 3rem; margin-bottom: 1rem; }
.success-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-style: italic;
  color: var(--burgundy);
  margin-bottom: 0.75rem;
}
.success-text { color: var(--gray); margin-bottom: 1.5rem; }

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

/* ─── LOCK SCREEN ────────────────────────────────────── */
.lock-screen {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.lock-icon { font-size: 3.5rem; margin-bottom: 1.5rem; opacity: 0.4; }
.lock-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-style: italic;
  color: var(--burgundy);
  margin-bottom: 0.75rem;
}
.lock-subtitle { color: var(--gray); font-size: 1rem; }
.lock-date {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.6rem 1.5rem;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* ─── PHOTO GRID ─────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.photo-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.photo-grid .photo-wide {
  grid-column: 1 / -1;
  height: 260px;
}

/* ─── WORLD MAP PINS ─────────────────────────────────── */
.map-container {
  position: relative;
  background: var(--warm);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

.pin-dot {
  width: 14px; height: 14px;
  background: var(--burgundy);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(123,45,62,0.4);
}

.pin-label {
  background: var(--burgundy);
  color: white;
  font-size: 0.65rem;
  font-family: var(--mono);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

/* ─── STARDEW PIXEL ART ──────────────────────────────── */
.stardew-section {
  background: #1a1a2e;
  border-radius: var(--radius);
  padding: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.stardew-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' x='0' y='0' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.stardew-title {
  font-family: var(--mono);
  color: #F0A050;
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  text-align: center;
}

.pixel-characters {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 1.5rem 0;
}

.pixel-character {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pixel-name {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #aaa;
  letter-spacing: 0.05em;
}

.stardew-text {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #c8c8c8;
  line-height: 1.8;
  text-align: center;
}

.stardew-highlight {
  color: #F0A050;
  font-weight: bold;
}

/* ─── ENIGMA INPUT ───────────────────────────────────── */
.enigma-box {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  border: 2px solid var(--border);
  text-align: center;
}

.enigma-question {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
}

.enigma-input {
  width: 100%;
  max-width: 200px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 1.1rem;
  text-align: center;
  color: var(--charcoal);
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s;
}

.enigma-input:focus { border-color: var(--burgundy); }
.enigma-input.wrong { border-color: #e05252; animation: shake 0.4s ease; }
.enigma-input.correct { border-color: var(--gold); }

/* ─── HIGHLIGHT WORD (Étape 3) ───────────────────────── */
.highlight-word {
  color: var(--gold);
  font-style: italic;
  cursor: pointer;
  position: relative;
  font-weight: 600;
  transition: all 0.2s;
  border-bottom: 1.5px dotted var(--gold);
}

.highlight-word:hover {
  color: var(--burgundy);
}

/* ─── FOOTER ─────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  color: var(--gray);
  font-size: 0.82rem;
  font-family: var(--mono);
  letter-spacing: 0.05em;
}

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in {
  animation: fadeUp 0.7s ease both;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 480px) {
  .photo-grid { grid-template-columns: 1fr; }
  .photo-grid .photo-wide { height: 220px; }
  .photo-grid img { height: 180px; }
  .card { padding: 1.25rem; }
  .section { padding: 2rem 0; }
}
