/* ==========================================================================
   LIVRE D'OR FARIDEEJAY — style.css
   Design : même identité que les autres supports Farideejay
   (Cormorant Garamond + Jost, crème / noir / or), avec l'esprit
   "beaucoup d'espace, typographie soignée" des interfaces premium.
   ========================================================================== */

/* ---------- 1. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: calc(var(--vh, 1vh) * 100); overflow: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- 2. DESIGN TOKENS ---------- */
:root {
  --cream: #FBF7F0;
  --cream-2: #F5EDE0;
  --ink: #2E2A24;
  --ink-soft: #5B5347;
  --gold: #B4863C;
  --gold-soft: #D9B771;
  --gold-dark: #8C6A2E;
  --line: #E2D3A8;

  --f-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --f-sans: 'Jost', -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.5s;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  font-family: var(--f-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--f-serif);
  font-weight: 500;
  line-height: 1.2;
}

::selection { background: var(--gold); color: var(--cream); }

/* ---------- 3. STRUCTURE ÉCRANS ---------- */
#app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: calc(28px + var(--safe-top)) 26px calc(28px + var(--safe-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
  overflow-y: auto;
}
.screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---------- 4. BOUTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(180, 134, 60, 0.55);
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary.btn-ghost-disabled {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  box-shadow: none;
}
.btn-primary.btn-ghost-disabled.is-ready {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 30px -12px rgba(180, 134, 60, 0.55);
}
.btn-ghost {
  background: var(--cream-2);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-text {
  background: none;
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 10px 12px;
}
.btn-large { width: 100%; padding: 18px 28px; font-size: 16px; }
.link-skip {
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 10px 6px;
}

/* ---------- 5. ÉCRAN 1 — HERO ---------- */
.screen-hero { padding: 0; overflow: hidden; }
.hero-media {
  position: absolute; inset: 0;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,13,10,0.65) 0%, rgba(15,13,10,0.15) 30%, rgba(15,13,10,0.15) 60%, rgba(15,13,10,0.7) 100%);
}
.hero-photo { width: 100%; height: 100%; object-fit: cover; }

.hero-content {
  position: relative; z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(48px + var(--safe-top)) 30px calc(40px + var(--safe-bottom));
}
.hero-bottom { display: flex; flex-direction: column; }
.hero-bottom .btn { align-self: flex-end; }
.hero-eyebrow {
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 10px;
}
.hero-title {
  font-size: clamp(30px, 8.5vw, 40px);
  line-height: 1.15;
  color: #fff;
}
.hero-title em { font-style: normal; color: var(--gold-soft); }
.hero-subtitle {
  color: #fff;
  font-size: 17.5px;
  line-height: 1.5;
  max-width: 34ch;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero-explainer {
  color: rgba(255,255,255,0.92);
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 32ch;
  margin-bottom: 24px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* ---------- 6. ÉCRANS QUESTIONS ---------- */
.screen-question { justify-content: flex-start; }
.flow-hint {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--gold-dark);
  margin-bottom: 28px;
}

.question-block { flex: 1; display: flex; flex-direction: column; }
.question-eyebrow {
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 14px;
}
.question-text {
  font-size: clamp(24px, 7vw, 30px);
  margin-bottom: 28px;
  max-width: 22ch;
}
.question-text-compact { max-width: none; }

.question-input {
  flex: 1;
  min-height: 140px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--f-serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  resize: none;
  padding: 6px 0 16px;
  transition: border-color var(--dur) var(--ease);
}
.question-input::placeholder { color: var(--ink-soft); opacity: 0.55; }
.question-input:focus { outline: none; border-color: var(--gold); }

.question-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px;
}

/* ---------- 8. ÉCRAN 4 — SATISFACTION ---------- */
.screen-satisfaction { justify-content: flex-start; }
.stars-block { margin: 26px 0 30px; text-align: center; }
.stars-label {
  font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 12px;
}
.stars-row { display: flex; justify-content: center; gap: 10px; }
.star {
  font-size: 40px; line-height: 1; color: var(--line);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.star.is-filled { color: var(--gold); }
.star.is-bounce { animation: starBounce 0.4s var(--ease); }
@keyframes starBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.chip-block { margin-bottom: 26px; }
.chip-label {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 10px;
}
.chip-hint {
  display: inline-block;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 10.5px;
  font-weight: 600;
  color: var(--gold-dark);
  background: var(--cream-2);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 13.5px;
  color: var(--ink);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip.is-selected {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* ---------- 9. ÉCRAN 6 — BROUILLON D'AVIS ---------- */
.screen-review { justify-content: flex-start; }
.review-note {
  color: var(--gold-dark);
  font-size: 15px;
  font-weight: 500;
  background: var(--cream-2);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
}
.review-stars {
  display: flex; justify-content: center; gap: 6px;
  margin-bottom: 14px;
  font-size: 22px; color: var(--gold);
}
.review-card {
  background: var(--cream-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 4px; margin-bottom: 18px;
}
.review-text {
  width: 100%; border: none; background: transparent;
  font-family: var(--f-serif); font-size: 17px; line-height: 1.65;
  color: var(--ink); padding: 16px; resize: vertical;
  transition: opacity 0.3s var(--ease);
}
.review-text:focus { outline: none; }

.review-actions { display: flex; gap: 10px; margin-bottom: 8px; }
.review-actions .btn { flex: 1; }
.copy-confirm {
  text-align: center; font-size: 13px; color: var(--gold-dark);
  opacity: 0; transition: opacity var(--dur) var(--ease); margin-bottom: 14px;
}
.copy-confirm.is-visible { opacity: 1; }

/* ---------- 10. ÉCRAN 7 — DÉPÔT ---------- */
.screen-deposit { justify-content: center; align-items: center; text-align: center; }
.deposit-content { max-width: 340px; }
.deposit-content .question-text { max-width: none; margin-bottom: 34px; }
.deposit-content .btn-large { margin-bottom: 16px; }
.deposit-hint {
  font-size: 13.5px; color: var(--gold-dark); font-style: italic;
  margin-bottom: 24px;
}
.deposit-motiv {
  font-size: 12.5px; color: var(--ink-soft); margin-top: 14px;
}

/* ---------- 11. ÉCRAN 8 — MERCI ---------- */
.screen-thanks {
  justify-content: center; align-items: center; text-align: center;
  background: var(--cream);
}
.thanks-mark { font-size: 22px; color: var(--gold); margin-bottom: 18px; }
.thanks-title { font-size: clamp(38px, 12vw, 52px); margin-bottom: 14px; }
.thanks-text { color: var(--ink-soft); font-size: 15.5px; }

/* ---------- 12. RESPONSIVE — TABLETTE / DESKTOP ---------- */
@media (min-width: 680px) {
  .screen { padding-left: 60px; padding-right: 60px; }
  .question-text, .deposit-content .question-text { max-width: 26ch; }
  .review-card, .length-switch { max-width: 480px; margin-inline: auto; }
  .stars-block, .chip-block { max-width: 480px; margin-inline: auto; }
  .hero-content { padding-left: 60px; padding-right: 60px; }
}
@media (min-width: 1024px) {
  body { display: flex; justify-content: center; background: var(--ink); }
  #app { max-width: 480px; box-shadow: 0 30px 80px rgba(0,0,0,0.35); }
}
