/* ============================================================
   "will you go on a date with me?" — feuille de style partagée
   Reproduit l'esthétique des 5 captures : fond rose/lavande,
   carte blanche arrondie, serif bordeaux, boutons pilule.
   ============================================================ */

:root {
  /* Fond dégradé rose -> lavande */
  --bg-1: #fbe6ef;
  --bg-2: #f1d9ec;
  --bg-3: #e3d2ef;

  /* Carte + encre */
  --card: #ffffff;
  --ink: #5e1f2e;        /* bordeaux profond (titres) */
  --ink-soft: #7a4a59;   /* sous-titres italiques */
  --muted: #8a6b76;      /* texte secondaire */
  --line: #ecd7e1;       /* bordures champs */

  /* Boutons */
  --rose: #ec5f9c;
  --rose-deep: #d83f86;
  --magenta: #d61f7a;
  --lav: #b9a3d6;
  --lav-ink: #473163;

  --radius: 28px;
  --shadow: 0 24px 70px rgba(94, 31, 46, .14);

  /* Police serif "éditoriale" sans dépendance externe.
     Pour passer à Fraunces : voir README. */
  --serif: Georgia, "Times New Roman", Cambria, "Hoefler Text", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--serif);
  color: var(--ink);
  min-height: 100dvh;
  display: grid;
  place-items: center;
  grid-template-columns: minmax(0, 1fr); /* évite que la colonne s'élargisse au contenu (mobile) */
  padding: 28px;
  background: radial-gradient(circle at 50% 32%,
              var(--bg-1) 0%, var(--bg-2) 44%, var(--bg-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Carte centrale ---------- */
.card {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  max-width: calc(100vw - 32px);   /* jamais plus large que l'écran */
  overflow-wrap: break-word;
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(30px, 5vw, 50px);
  box-shadow: var(--shadow);
  text-align: center;
  animation: pop .5s cubic-bezier(.2, .8, .25, 1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Typo ---------- */
h1 {
  font-size: clamp(1.7rem, 5.2vw, 2.45rem);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: .2px;
}
h1.shout {
  font-size: clamp(1.9rem, 6vw, 2.7rem);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.sub {
  font-style: italic;
  color: var(--ink-soft);
  margin-top: .55rem;
  font-size: clamp(1rem, 2.6vw, 1.18rem);
}
.tiny {
  font-style: italic;
  color: var(--muted);
  font-size: clamp(.92rem, 2.3vw, 1.02rem);
  line-height: 1.5;
  margin-top: 14px;
}

/* ---------- Boutons ---------- */
.btn {
  font-family: var(--serif);
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 15px 34px;
  font-size: 1.12rem;
  color: #fff;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  display: inline-block;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:active { transform: translateY(0); }

.btn-rose    { background: linear-gradient(180deg, var(--rose), var(--rose-deep));
               box-shadow: 0 10px 24px rgba(216, 63, 134, .35); }
.btn-magenta { background: var(--magenta);
               box-shadow: 0 10px 24px rgba(214, 31, 122, .35); }
.btn-lav     { background: var(--lav); color: var(--lav-ink);
               padding: 13px 26px; font-size: 1rem; }

.btn-block { width: 100%; padding: 17px; font-size: 1.15rem; margin-top: 28px; }
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; filter: grayscale(.2); }

.row { display: flex; gap: 16px; justify-content: center; align-items: center;
       flex-wrap: wrap; margin-top: 28px; }

/* ---------- Photo / icône d'app ---------- */
.photo {
  width: 122px; height: 122px; border-radius: 26px;
  object-fit: cover; display: block; margin: 0 auto 20px;
  box-shadow: 0 12px 26px rgba(94, 31, 46, .18);
  background: #efe6ec;
}
.appicon {
  width: 96px; height: 96px; border-radius: 22px;
  display: grid; place-items: center; font-size: 3rem; margin: 0 auto 20px;
  box-shadow: 0 12px 26px rgba(94, 31, 46, .14);
}
.appicon-red { background: #e23b2f; }
.appicon-cal { background: #f4eef6; }

/* ---------- Grille "food" ---------- */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-top: 24px;
}
.tile {
  background: #faf5f8; border: 2px solid transparent; border-radius: 18px;
  padding: 20px 10px; cursor: pointer; transition: .15s;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  font-family: var(--serif);
}
.tile .emoji { font-size: 2.1rem; line-height: 1; }
.tile .label { font-size: 1.02rem; color: var(--ink); }
.tile:hover { transform: translateY(-2px); background: #fff;
              box-shadow: 0 8px 18px rgba(94, 31, 46, .10); }
.tile.selected {
  border-color: var(--rose); background: #fdeef5;
  box-shadow: 0 8px 22px rgba(232, 95, 156, .28);
}
@media (max-width: 430px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Formulaire "date" ---------- */
label {
  display: block; text-align: left; font-weight: 700;
  margin: 20px 0 9px; font-size: 1.05rem;
}
input[type="date"], select {
  width: 100%; font-family: var(--serif); font-size: 1.05rem;
  padding: 15px 16px; border: 1px solid var(--line);
  border-radius: 14px; color: var(--ink); background: #fff;
}
input[type="date"]:focus, select:focus {
  outline: none; border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(232, 95, 156, .18);
}

/* ---------- Sélecteur de jour : semaine en grandes tuiles ---------- */
.week {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 8px; margin-top: 10px;
}
.day-tile {
  font-family: var(--serif); background: #faf5f8;
  border: 2px solid transparent; border-radius: 16px;
  padding: 14px 4px; cursor: pointer; transition: .15s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.day-tile:hover { transform: translateY(-2px); background: #fff;
  box-shadow: 0 8px 18px rgba(94, 31, 46, .10); }
.day-tile.selected {
  border-color: var(--rose); background: #fdeef5;
  box-shadow: 0 8px 22px rgba(232, 95, 156, .28);
}
.dt-wd { font-size: .82rem; color: var(--muted); text-transform: lowercase; }
.dt-num { font-size: 1.7rem; font-weight: 700; color: var(--ink); line-height: 1; }
.dt-mo { font-size: .76rem; color: var(--ink-soft); text-transform: lowercase; }
@media (max-width: 560px) {
  .week { grid-template-columns: repeat(4, 1fr); }
  .dt-num { font-size: 1.5rem; }
}

/* ---------- Lettre finale ---------- */
.hearts {
  color: var(--rose-deep); letter-spacing: .45rem;
  font-size: 1.25rem; margin: 22px 0 18px;
}
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: #c2410c; color: #fff; border-radius: 999px;
  padding: 11px 20px; font-family: system-ui, sans-serif;
  font-size: .95rem; font-weight: 600; text-decoration: none;
}
.badge .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; display: inline-grid; place-items: center;
}
.badge .dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #c2410c; }

/* ---------- Décor flottant (cœurs / fleurs) ---------- */
.decor { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.decor span {
  position: absolute; opacity: .55; will-change: transform;
  animation: bob var(--dur, 7s) ease-in-out var(--delay, 0s) infinite alternate;
  font-size: var(--size, 1rem);
}
@keyframes bob {
  from { transform: translateY(0) rotate(-4deg); }
  to   { transform: translateY(-22px) rotate(4deg); }
}

/* ---------- Confetti ---------- */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 5; }

/* ---------- Sélecteur de langue FR / EN ---------- */
.lang-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 6;
  font-family: system-ui, sans-serif; font-weight: 700; font-size: .9rem;
  letter-spacing: .5px; color: var(--ink);
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(94, 31, 46, .12);
  backdrop-filter: blur(6px);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.lang-toggle:hover { transform: translateY(-1px); background: #fff;
  box-shadow: 0 8px 20px rgba(94, 31, 46, .18); }
.lang-toggle:active { transform: translateY(0); }

/* ============================================================
   Animation d'ouverture : la carte sort d'une enveloppe
   ============================================================ */
.intro {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 32%, var(--bg-1) 0%, var(--bg-2) 44%, var(--bg-3) 100%);
  perspective: 1100px; cursor: pointer;
  animation: introSafety .6s ease 3.4s forwards; /* filet de sécurité si le JS échoue */
}
.intro.intro-skip { opacity: 0; pointer-events: none; transition: opacity .55s ease; }
@keyframes introSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.envelope {
  position: relative; width: 300px; height: 200px;
  filter: drop-shadow(0 20px 36px rgba(94, 31, 46, .22));
  animation: envIn .6s cubic-bezier(.2, .8, .25, 1) both;
}
@keyframes envIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

/* La carte qui glisse hors de l'enveloppe */
.letter-card {
  position: absolute; left: 50%; bottom: 34px; width: 232px; height: 152px; margin-left: -116px;
  background: #fff; border-radius: 12px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 22px rgba(94, 31, 46, .16);
  opacity: 0; transform: translateY(0);
  animation: lcRise 1.05s cubic-bezier(.2, .8, .25, 1) 1.05s forwards;
}
.lc-heart { font-size: 2.5rem; line-height: 1; }
.lc-text { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 1.06rem; }
@keyframes lcRise {
  0%   { opacity: 0; transform: translateY(0); }
  18%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(-132px); }
}

/* Corps de l'enveloppe (devant) */
.env-body {
  position: absolute; left: 0; bottom: 0; width: 300px; height: 162px; z-index: 4;
  background: linear-gradient(160deg, #f7d3e4, #efbcd6); border-radius: 12px;
}
.env-body::after { /* le "V" du devant de l'enveloppe */
  content: ""; position: absolute; inset: 0; border-radius: 12px;
  background:
    linear-gradient(48deg, transparent 49.2%, rgba(94, 31, 46, .07) 50%, transparent 50.8%),
    linear-gradient(-48deg, transparent 49.2%, rgba(94, 31, 46, .07) 50%, transparent 50.8%);
}

/* Rabat du haut, qui s'ouvre */
.env-flap {
  position: absolute; left: 0; top: 0; width: 300px; height: 118px;
  background: linear-gradient(160deg, #f1c4da, #e6a8cb);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center; transform: rotateX(0deg); backface-visibility: hidden;
  animation: flapOpen .75s ease .4s forwards;
}
@keyframes flapOpen {
  0%   { transform: rotateX(0deg);   z-index: 6; }
  49%  {                             z-index: 6; }
  50%  { transform: rotateX(92deg);  z-index: 2; }
  100% { transform: rotateX(172deg); z-index: 2; }
}

/* ============================================================
   Pages "vendeur" du SaaS (home / create / checkout)
   ============================================================ */
.card-wide { width: min(760px, 100%); max-width: calc(100vw - 32px); text-align: center; }
.saas h1 { margin-bottom: .2rem; }
.saas .sub { margin-bottom: 1.4rem; }
.nowrap { white-space: nowrap; }

.demo-flag {
  position: fixed; top: 16px; left: 16px; z-index: 6;
  font-family: system-ui, sans-serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase; color: #8a3b00;
  background: #ffe7c2; border: 1px solid #f3cd95; border-radius: 999px;
  padding: 6px 13px;
}

.back {
  display: inline-block; margin-bottom: 12px; text-decoration: none;
  color: var(--muted); font-size: .95rem; font-family: system-ui, sans-serif;
}
.back:hover { color: var(--ink); }

/* ---- Offres ---- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; text-align: left; }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }

.plan {
  position: relative; background: #faf5f8; border: 2px solid var(--line);
  border-radius: 20px; padding: 24px 22px; display: flex; flex-direction: column;
}
.plan-feature { border-color: var(--rose); background: #fdeef5;
  box-shadow: 0 10px 26px rgba(232, 95, 156, .18); }
.plan-tag {
  position: absolute; top: -12px; right: 18px; background: var(--magenta); color: #fff;
  font-family: system-ui, sans-serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; border-radius: 999px; padding: 5px 12px;
}
.plan h2 { font-size: 1.4rem; margin-bottom: .35rem; }
.plan-desc { color: var(--ink-soft); font-size: .98rem; line-height: 1.4; margin-bottom: 12px; }
.plan-feats { list-style: none; margin: 0 0 16px; padding: 0; }
.plan-feats li { color: var(--muted); font-size: .95rem; line-height: 1.7;
  font-family: system-ui, sans-serif; }
.price { margin: auto 0 16px; }
.price .amount { font-size: 2rem; font-weight: 700; color: var(--ink); }
.price-unit { color: var(--muted); font-size: 1rem; font-family: system-ui, sans-serif; }
.feats-center { display: inline-block; max-width: 100%; text-align: left; margin: 4px auto 20px; }
.price-inline { text-align: center; margin: 22px 0 14px; }
.secured { text-align: center; color: var(--muted); }

/* ---- Bloc "personnaliser davantage" (repliable) ---- */
.more { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px;
  background: #faf5f8; overflow: hidden; }
.more > summary {
  cursor: pointer; list-style: none; padding: 13px 16px;
  font-family: system-ui, sans-serif; font-weight: 600; font-size: .95rem;
  color: var(--ink-soft); user-select: none;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: " ＋"; color: var(--rose); float: right; }
.more[open] > summary::after { content: " －"; }
.more[open] > summary { border-bottom: 1px solid var(--line); }
.more-body { padding: 6px 16px 16px; }
.more-body label:first-child { margin-top: 12px; }

/* ---- Formulaires SaaS ---- */
.form { text-align: left; margin-top: 8px; }
.form label .opt { color: var(--muted); font-weight: 400; font-size: .85rem; }
.form textarea {
  width: 100%; font-family: var(--serif); font-size: 1.02rem;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); background: #fff; resize: vertical;
}
.form textarea:focus, .form input:focus {
  outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(232, 95, 156, .18);
}
.form input[type="text"], .form input[type="url"] {
  width: 100%; font-family: var(--serif); font-size: 1.05rem;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); background: #fff;
}
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- Récapitulatif / paiement ---- */
.summary { background: #faf5f8; border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 18px; text-align: left; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 1.1rem; }
.summary-row strong { font-size: 1.35rem; }
.summary-note { color: var(--muted); font-size: .92rem; margin-top: 6px; font-style: italic; }

/* ---- Lien généré ---- */
.link-box { display: flex; gap: 10px; margin: 18px 0; }
.link-box input {
  flex: 1; min-width: 0; font-family: system-ui, monospace; font-size: .92rem;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: #faf5f8; color: var(--ink-soft);
}
.link-box .btn { padding: 13px 20px; font-size: 1rem; white-space: nowrap; }

/* ============================================================
   Responsive — petits écrans (téléphones)
   ============================================================ */
html, body { max-width: 100%; overflow-x: hidden; }

@media (max-width: 480px) {
  body { padding: 16px; }
  .card { padding: clamp(22px, 6vw, 40px); border-radius: 22px; }
  .lang-toggle { top: 12px; right: 12px; padding: 7px 13px; font-size: .85rem; }
  .demo-flag { top: 12px; left: 12px; font-size: .68rem; padding: 5px 11px; }

  /* Lien généré : input + bouton empilés */
  .link-box { flex-direction: column; }
  .link-box .btn { width: 100%; }

  /* Boutons en colonne quand ils sont serrés */
  .row { gap: 12px; }
}

@media (max-width: 360px) {
  .envelope { transform: scale(.82); }       /* l'enveloppe d'intro reste dans l'écran */
  .week { grid-template-columns: repeat(3, 1fr); }
}
