/* lameilleurecopine.pyforge.fr — feuille de style */

:root {
  --pink: #ff5f9e;
  --pink-dark: #e03d80;
  --purple: #8b5cf6;
  --cream: #fff7fb;
  --ink: #2c1b33;
  --ink-soft: #6b5570;
  --card: #ffffff;
  --ok: #34d399;
  --radius: 20px;
  --shadow: 0 18px 40px -18px rgba(140, 40, 100, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 12% -10%, #ffd9ec 0%, transparent 60%),
    radial-gradient(900px 650px at 92% 8%, #e0d7ff 0%, transparent 62%),
    linear-gradient(170deg, var(--cream), #f6efff 70%, #fdeaf4);
  background-attachment: fixed;
  padding: 24px 16px 40px;
  overflow-x: hidden;
}

/* --- Paillettes de fond --- */
.sparkles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sparkle {
  position: absolute;
  font-size: 18px;
  opacity: .35;
  animation: float linear infinite;
}
@keyframes float {
  from { transform: translateY(110vh) rotate(0deg); }
  to   { transform: translateY(-15vh) rotate(360deg); }
}

/* --- Carte principale --- */
.app {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 26px 22px 30px;
  border: 1px solid rgba(255, 95, 158, .15);
}

.app__head { margin-bottom: 22px; }

.logo {
  margin: 0 0 14px;
  font-size: clamp(22px, 6vw, 28px);
  letter-spacing: -.5px;
  text-align: center;
  font-weight: 800;
  color: var(--ink);
}
.logo span {
  background: linear-gradient(90deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.progress {
  height: 8px;
  border-radius: 99px;
  background: #f1e5f0;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 20%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}
.progress__label {
  margin: 8px 0 0;
  font-size: 12px;
  text-align: center;
  color: var(--ink-soft);
  letter-spacing: .3px;
}

/* --- Étapes --- */
.step { display: none; animation: stepIn .45s ease both; }
.step.is-active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.step__title {
  margin: 0 0 6px;
  font-size: clamp(20px, 5.4vw, 26px);
  line-height: 1.25;
  font-weight: 800;
}
.step__sub {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

/* --- Champs --- */
.field { margin-bottom: 18px; }
.field label:not(.photo), .label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px; /* évite le zoom auto sur iOS */
  font-family: inherit;
  color: var(--ink);
  background: #fdf8fc;
  border: 2px solid #f0e2ee;
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input[type="text"]:focus {
  outline: none;
  background: #fff;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 95, 158, .16);
}
input[type="text"].is-invalid { border-color: #f87171; }

.field__error {
  margin: 7px 2px 0;
  min-height: 0;
  font-size: 13px;
  color: #e11d48;
}

/* --- Commentaire surprise --- */
.comment {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0 0;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-style: italic;
  color: #8a2d63;
  background: linear-gradient(90deg, #ffe7f2, #f3e8ff);
  border: 1px dashed rgba(255, 95, 158, .5);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.comment__emoji { font-size: 20px; font-style: normal; }
.comment[hidden] { display: none; }

/* Ce commentaire-là arrive tout seul après la frappe : sa place est réservée
   dès le départ, sinon il décale la page pile quand elle vise le bouton. */
.comment--slot { visibility: hidden; animation: none; }
.comment--slot.is-shown { visibility: visible; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop {
  from { opacity: 0; transform: scale(.85) translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* --- Photo --- */
.photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 170px;
  padding: 16px;
  cursor: pointer;
  border-radius: 18px;
  border: 2px dashed #e6cfe2;
  background: #fdf8fc;
  overflow: hidden;
  transition: border-color .2s, background .2s, transform .15s;
}
.photo:hover, .photo.is-drag { border-color: var(--pink); background: #fff1f8; }
.photo.is-drag { transform: scale(1.01); }
.photo__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
}
.photo__placeholder[hidden] { display: none; }
.photo__icon { font-size: 34px; }
.photo__preview {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 10px 26px -10px rgba(140, 40, 100, .6);
  animation: pop .4s ease both;
}

.linkbtn {
  margin-top: 10px;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--pink-dark);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

/* --- Boutons --- */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}
.actions .btn { flex: 1; }
.actions--back { justify-content: flex-start; }

.btn {
  padding: 15px 22px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 12px 24px -12px rgba(200, 60, 140, .9);
}
.btn--primary:hover { box-shadow: 0 16px 30px -12px rgba(200, 60, 140, .95); }

.btn--ghost {
  color: var(--ink-soft);
  background: #f6eef5;
}
.btn--ghost:hover { background: #efe3ee; }

/* --- Arène du Oui / Non --- */
.arena {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 210px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(160deg, #fff4fa, #f5efff);
  border: 1px solid rgba(139, 92, 246, .16);
}

.btn--yes {
  color: #fff;
  background: linear-gradient(135deg, #ff4f93, #ff8ab8);
  box-shadow: 0 12px 26px -12px rgba(255, 79, 147, .95);
  animation: heartbeat 1.9s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  8%       { transform: scale(1.07); }
  16%      { transform: scale(1); }
  24%      { transform: scale(1.05); }
  32%      { transform: scale(1); }
}

.btn--no {
  color: var(--ink-soft);
  background: #ece4ef;
  transition: transform .18s cubic-bezier(.2, 1.3, .5, 1), opacity .2s;
  will-change: transform;
  touch-action: none;
}
.btn--no.is-fleeing {
  position: fixed;
  z-index: 50;
  margin: 0;
}

.taunt {
  min-height: 24px;
  margin: 16px 2px 0;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  color: var(--pink-dark);
}
.taunt.is-new { animation: pop .35s ease both; }

/* --- Curseurs --- */
.slider {
  margin-bottom: 26px;
  padding: 16px 16px 10px;
  border-radius: 18px;
  background: #fdf8fc;
  border: 1px solid #f2e4f0;
}
.slider__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.slider__head label { margin: 0; font-size: 14px; text-transform: none; color: var(--ink); }
.slider__value {
  min-width: 44px;
  padding: 4px 0;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}
.slider__caption {
  margin: 10px 2px 4px;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
  min-height: 18px;
}

input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}
input[type="range"]::-moz-range-track {
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--pink);
  box-shadow: 0 4px 10px -2px rgba(140, 40, 100, .5);
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--pink);
  box-shadow: 0 4px 10px -2px rgba(140, 40, 100, .5);
}
input[type="range"]:focus-visible { outline: 3px solid rgba(139, 92, 246, .45); outline-offset: 4px; border-radius: 99px; }

/* --- Choix Oui / Non classiques --- */
.choices { display: flex; gap: 12px; }
.choice {
  flex: 1;
  padding: 20px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  background: #fdf8fc;
  border: 2px solid #f0e2ee;
  border-radius: 16px;
  cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s;
}
.choice:hover { border-color: var(--pink); background: #fff1f8; }
.choice:active { transform: scale(.97); }
.choice.is-selected {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

/* --- Fin --- */
.step--end { text-align: center; }
.end__badge {
  font-size: 56px;
  margin-bottom: 10px;
  animation: heartbeat 1.9s ease-in-out infinite;
}
.step--end .step__sub { margin-bottom: 18px; }

.recap {
  text-align: left;
  padding: 18px;
  border-radius: 18px;
  background: #fdf8fc;
  border: 1px solid #f2e4f0;
}
.recap__photo {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 10px 22px -10px rgba(140, 40, 100, .6);
}
.recap__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px dashed #eddfeb;
}
.recap__row:last-child { border-bottom: none; }
.recap__key { color: var(--ink-soft); }
.recap__val { font-weight: 700; text-align: right; }

.sendstatus {
  margin: 14px 0 0;
  min-height: 20px;
  font-size: 14px;
  color: var(--ink-soft);
}
.sendstatus.is-ok { color: #0f9d68; font-weight: 700; }
.sendstatus.is-err { color: #e11d48; }

.foot {
  position: relative;
  z-index: 1;
  margin: 22px auto 0;
  max-width: 560px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  opacity: .8;
}

/* --- Confettis --- */
.confetti {
  position: fixed;
  top: -20px;
  z-index: 99;
  font-size: 22px;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

@media (max-width: 420px) {
  body { padding: 14px 10px 30px; }
  .app { padding: 20px 16px 24px; border-radius: 22px; }
  .actions { flex-direction: column-reverse; }
  .arena { min-height: 240px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --- Zone de texte (rendez-vous de rêve) --- */
textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;      /* évite le zoom auto sur iOS */
  line-height: 1.55;
  color: var(--ink);
  background: #fdf8fc;
  border: 2px solid #f0e2ee;
  border-radius: 14px;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 95, 158, .16);
}
textarea.is-invalid { border-color: #f87171; }
textarea:disabled { opacity: .75; cursor: not-allowed; }

.btn--validate { width: 100%; }

/* --- Fenêtre contextuelle --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(60, 20, 50, .45);
  backdrop-filter: blur(3px);
  animation: fade .25s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal__box {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 28px 24px 24px;
  text-align: center;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 60px -20px rgba(80, 20, 60, .6);
  animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both;
}
.modal__emoji { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.modal__title {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 800;
}
.modal__text {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--ink-soft);
}
.modal__box .btn { width: 100%; }

.recap__note { font-weight: 400; font-size: 12px; font-style: italic; color: var(--ink-soft); }
.recap__val { max-width: 62%; }

.btn:disabled {
  opacity: .55;
  cursor: default;
  box-shadow: none;
}
.btn:disabled:active { transform: none; }

/* --- Réécriture en place du rendez-vous de rêve --- */
.linkbtn--right { display: block; margin: 10px 0 0 auto; }
textarea.is-poem {
  font-style: italic;
  color: #6d2a58;
  background: linear-gradient(160deg, #fff2f8, #f4ecff);
  border-color: rgba(255, 95, 158, .45);
  opacity: 1;
}
textarea.is-rewriting { caret-color: transparent; }

/* --- Mini-jeu --- */
.puzzle { margin-top: 4px; }

.puzzle__board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px;
  border-radius: 18px;
  background: linear-gradient(160deg, #fff4fa, #f3efff);
  border: 1px solid rgba(139, 92, 246, .16);
}
.puzzle__op {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-soft);
}

.slot {
  position: relative;
  width: 84px;
  height: 66px;
  border-radius: 14px;
  border: 2px dashed #e2c8dd;
  background: rgba(255, 255, 255, .6);
  transition: border-color .18s, background .18s, transform .18s;
}
.slot.is-target { border-color: var(--pink); background: #fff0f7; transform: scale(1.05); }
.slot.is-filled { border-style: solid; border-color: transparent; background: transparent; }
.slot.is-wrong { animation: shake .4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

.puzzle__tray[hidden] { display: none; }
.puzzle__tray {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 78px;
  margin-top: 16px;
}

.piece {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 66px;
  font-family: inherit;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border: none;
  border-radius: 14px;
  box-shadow: 0 10px 20px -10px rgba(200, 60, 140, .9);
  cursor: grab;
  touch-action: none;           /* le glisser au doigt ne fait pas défiler la page */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s, box-shadow .18s;
}
.piece:active { cursor: grabbing; }
.piece.is-selected { outline: 3px solid rgba(139, 92, 246, .55); outline-offset: 3px; }
.piece.is-dragging {
  position: fixed;
  z-index: 150;
  margin: 0;
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 20px 34px -12px rgba(120, 30, 90, .75);
  transition: none;
  pointer-events: none;
}
.piece.is-placed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: default;
  animation: snap .35s cubic-bezier(.2, 1.5, .4, 1) both;
}
@keyframes snap {
  from { transform: scale(1.2); }
  to   { transform: scale(1); }
}

.puzzle__hint {
  margin: 14px 2px 0;
  min-height: 22px;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  color: var(--pink-dark);
}

.puzzle__win {
  margin-top: 16px;
  padding: 18px;
  text-align: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0f7, #f0e9ff);
  border: 1px solid rgba(255, 95, 158, .35);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.puzzle__win[hidden] { display: none; }
.puzzle__bravo { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.puzzle__pourcent {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Le chaton --- */
.kitten { text-align: center; margin: -6px 0 6px; }
.kitten__gif { max-width: 220px; border-radius: 18px; }
.kitten__gif[hidden] { display: none; }
.kitten__svg { width: 190px; max-width: 62vw; height: auto; }
.kitten__svg[hidden] { display: none; }
.kitten__body { animation: bob 2.6s ease-in-out infinite; transform-origin: 100px 100px; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-5px) rotate(-1.5deg); }
}
.kitten__eyes { animation: blink 4.2s infinite; transform-origin: 100px 92px; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(.1); }
}
.kitten__tail { animation: wag 1.8s ease-in-out infinite; transform-origin: 156px 138px; }
@keyframes wag {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(12deg); }
}
.kitten__heart { animation: heartFloat 2.4s ease-in-out infinite; transform-origin: 170px 28px; }
@keyframes heartFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: .9; }
  50%      { transform: translateY(-8px) scale(1.12); opacity: 1; }
}

/* --- Le planning du date --- */
.planner, .vibes {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background: #fdf8fc;
  border: 1px solid #f2e4f0;
  animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both;
}
.planner[hidden], .vibes[hidden] { display: none; }
.planner__title { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.planner__grid { display: grid; gap: 14px; }
.planner .field { margin-bottom: 0; }
.planner__recap {
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #8a2d63;
  background: linear-gradient(90deg, #ffe7f2, #f3e8ff);
}
.planner__recap[hidden] { display: none; }

select {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 2px solid #f0e2ee;
  border-radius: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b07ba0' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  padding-right: 42px;
}
select:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 95, 158, .16);
}

/* --- Tu es plutôt quoi ? --- */
.vibes__title { margin: 0 0 14px; font-size: 17px; font-weight: 800; }
.vibes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vibe {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 2px solid #f0e2ee;
  border-radius: 16px;
  cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s;
}
.vibe span { font-size: 30px; line-height: 1; }
.vibe:hover { border-color: var(--pink); background: #fff1f8; }
.vibe:active { transform: scale(.96); }
.vibe.is-selected {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

@media (max-width: 380px) {
  .slot, .piece { width: 74px; height: 60px; font-size: 17px; }
  .puzzle__board { gap: 5px; padding: 16px 6px; }
}
