/* =========================================================
   FLIPINGO — Page « Arrive bientôt » (version épurée)
   Dossier autonome. Mobile → tablette (≥ 700 px) → ordinateur (≥ 1100 px).
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@700;800;900&family=Noto+Sans+SC:wght@700;900&display=swap');

:root {
  --bg-1: #1d0848; --bg-2: #3c12a3; --bg-3: #6a2bff;
  --yellow: #ffc21a; --yellow-d: #d69a00;
  --green: #18c486;  --green-d: #0e8f60;
  --red: #ff3d6e; --pink: #ff6bd6; --cyan: #3ee6ff;
  --ink: #1a0f3d;
  --tone1: #18c486; --tone2: #ffc21a; --tone3: #2d8cff; --tone4: #ff3d6e;
  --font-ui: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-title: 'Nunito', 'Fredoka', system-ui, sans-serif;
  --font-hanzi: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg-1); }
html, body { overflow-x: clip; }
body {
  min-height: 100dvh;
  font-family: var(--font-ui); color: #fff; -webkit-font-smoothing: antialiased;
  background: radial-gradient(120% 120% at 20% 0%, var(--bg-3) 0%, var(--bg-2) 40%, var(--bg-1) 100%) fixed;
  display: flex; flex-direction: column;
}
button, input { font: inherit; color: inherit; border: 0; background: none; }

/* ---------- Fond animé */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: float 18s ease-in-out infinite alternate; }
.b1 { width: 70vmax; height: 70vmax; background: var(--pink); top: -30vmax; left: -25vmax; }
.b2 { width: 55vmax; height: 55vmax; background: var(--cyan); bottom: -30vmax; right: -20vmax; opacity: .3; animation-delay: -6s; }
.b3 { width: 35vmax; height: 35vmax; background: var(--yellow); top: 45%; left: 55%; opacity: .2; animation-delay: -12s; }
.glyphs {
  position: absolute; inset: -50%; transform: rotate(-12deg); animation: drift 60s linear infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='white' fill-opacity='.05' font-family='sans-serif' font-weight='700'%3E%3Ctext x='20' y='50' font-size='38'%3EA%3C/text%3E%3Ctext x='120' y='70' font-size='34'%3E%E5%AD%97%3C/text%3E%3Ctext x='60' y='150' font-size='30'%3E%C3%B1%3C/text%3E%3Ctext x='160' y='180' font-size='32'%3E%C3%9F%3C/text%3E%3Ctext x='10' y='205' font-size='26'%3E%C3%A9%3C/text%3E%3C/g%3E%3C/svg%3E");
}
@keyframes float { 50% { transform: translate(6vmax, 4vmax) scale(1.1); } 100% { transform: translate(-4vmax, 6vmax) scale(.95); } }
@keyframes drift { to { background-position: 440px 220px; } }

/* ---------- Cartes de langues qui bougent */
.cards { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.card {
  position: absolute; left: var(--x); top: var(--y);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 16px; border-radius: 16px;
  background: #fff; color: var(--ink); box-shadow: 0 6px 0 #d9d2f5, 0 14px 30px rgba(0,0,0,.3);
  transform: rotate(var(--r)); animation: bob var(--d, 7s) ease-in-out infinite alternate; animation-delay: var(--dl, 0s);
}
.card.yellow { background: var(--yellow); box-shadow: 0 6px 0 var(--yellow-d), 0 14px 30px rgba(0,0,0,.3); }
.card b { font-family: var(--font-title); font-weight: 900; font-size: 18px; white-space: nowrap; }
.card b.zh { font-family: var(--font-hanzi); font-size: 24px; }
.card small { font-size: 12px; font-weight: 700; opacity: .65; white-space: nowrap; }
.card.swap { animation: bob var(--d, 7s) ease-in-out infinite alternate, card-flip .6s var(--bounce); }
@keyframes bob {
  from { transform: translateY(0) rotate(var(--r)); }
  to   { transform: translateY(-18px) rotate(calc(var(--r) * -.6)); }
}
@keyframes card-flip { 0% { scale: 1 1; } 50% { scale: 0 1; } 100% { scale: 1 1; } }
.tone-1 { color: var(--tone1); } .tone-3 { color: var(--tone3); } .tone-4 { color: var(--tone4); }
.tone-2 { color: var(--tone2); -webkit-text-stroke: .03em rgba(26,15,61,.6); }
.card.yellow .tone-2 { color: #fff; }

/* ---------- Centre */
.page {
  position: relative; z-index: 2; flex: 1;
  width: 100%; max-width: 620px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  padding: calc(40px + var(--sat)) 20px 24px; text-align: center;
}
.logo {
  font-family: var(--font-title); font-weight: 900; line-height: .95;
  font-size: clamp(64px, 20vw, 110px); white-space: nowrap;
  text-shadow: 0 7px 0 rgba(0,0,0,.25); perspective: 600px;
}
.lw { display: inline-block; }
.l1 { transform: rotate(-4deg); }
.l2 { color: var(--yellow); margin: 0 .02em; animation: flip 5s var(--bounce) infinite; }
.l3 { transform: rotate(-2deg); }
@keyframes flip {
  0%, 78% { transform: rotate(3deg) translateY(-.04em) scale(1.08) rotateY(0); }
  90%, 100% { transform: rotate(3deg) translateY(-.04em) scale(1.08) rotateY(360deg); }
}
.soon-word {
  display: inline-block; padding: 6px 18px; border-radius: 99px;
  background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 16px; box-shadow: 0 4px 0 var(--yellow-d);
  animation: wobble 3s ease-in-out infinite;
}
@keyframes wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.headline { font-family: var(--font-title); font-weight: 900; font-size: clamp(21px, 6vw, 28px); line-height: 1.25; max-width: 22ch; }
.headline mark { background: none; color: var(--yellow); position: relative; }
.headline mark::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -.08em; height: .14em; border-radius: 99px;
  background: var(--pink); transform-origin: left; animation: underline 1.2s .5s var(--out) both;
}
@keyframes underline { from { transform: scaleX(0); } }

/* ---------- E-mail */
.notify { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.field {
  display: flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 18px;
  background: #fff; color: var(--ink); border: 3px solid transparent; transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 6px 0 #d9d2f5;
}
.field:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,194,26,.35); }
.field.bad { border-color: var(--red); }
.field input { flex: 1; min-width: 0; outline: none; font-size: 17px; font-weight: 700; color: var(--ink); padding: 14px 0; }
.field input::placeholder { color: rgba(26,15,61,.4); }
.btn {
  padding: 15px 24px; border-radius: 18px; background: var(--green); color: #fff; cursor: pointer;
  font-family: var(--font-title); font-weight: 900; font-size: 17px; text-transform: uppercase; letter-spacing: .04em;
  box-shadow: 0 6px 0 var(--green-d); transition: transform .12s var(--out), box-shadow .12s, filter .2s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--green-d); }
.btn:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.btn:disabled { filter: grayscale(.6); }
.notify-msg { min-height: 20px; font-weight: 700; font-size: 15px; }
.notify-msg:empty { display: none; }
.notify-msg.ok { color: #7dffc4; } .notify-msg.err { color: #ffb3c6; }
.notify.done { display: none; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- Barre de progression : en bas, centrée */
.progress-box {
  position: relative; z-index: 2; flex: none;
  width: min(560px, calc(100% - 40px)); margin: 0 auto calc(26px + var(--sab));
  display: flex; flex-direction: column; gap: 8px;
}
.progress-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 15px; }
.progress-head b { font-family: var(--font-title); font-size: 20px; color: var(--yellow); }
.progress { height: 16px; border-radius: 99px; background: rgba(0,0,0,.3); border: 2px solid rgba(255,255,255,.15); overflow: hidden; }
.progress span {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, #ffd85c 12px 24px);
  background-size: 34px 34px; animation: stripes 1s linear infinite;
  transition: width 2.4s var(--out);
}
@keyframes stripes { to { background-position: 34px 0; } }

.confetti { position: fixed; inset: 0; z-index: 10; pointer-events: none; }

/* =========================================================  Mobile : cartes plus petites */
@media (max-width: 699px) {
  .card { padding: 7px 11px; border-radius: 12px; }
  .card b { font-size: 14px; } .card b.zh { font-size: 18px; } .card small { font-size: 10px; }
}

/* =========================================================  TABLETTE (≥ 700 px) */
@media (min-width: 700px) {
  .page { gap: 26px; }
  .logo { font-size: clamp(110px, 17vw, 150px); }
  .soon-word { font-size: 19px; }
  .headline { font-size: 34px; }
  .notify { flex-direction: row; max-width: 560px; }
  .notify .field { flex: 1; }
  .card b { font-size: 22px; } .card b.zh { font-size: 30px; } .card small { font-size: 13px; }
}

/* =========================================================  ORDINATEUR / TV (≥ 1100 px, paysage) */
@media (min-width: 1100px) and (orientation: landscape) {
  .page { max-width: 120vmin; gap: 3.2vmin; padding-top: 4vmin; }
  .logo { font-size: 22vmin; }
  .soon-word { font-size: 2.4vmin; padding: 1vmin 2.6vmin; }
  .headline { font-size: 4.6vmin; max-width: 24ch; }
  .notify { max-width: 80vmin; gap: 1.6vmin; }
  .field { border-radius: 2.2vmin; padding: 0 2vmin; }
  .field input { font-size: 2.5vmin; padding: 1.9vmin 0; }
  .btn { font-size: 2.3vmin; padding: 1.9vmin 3.4vmin; border-radius: 2.2vmin; }
  .notify-msg { font-size: 2vmin; }
  .card { padding: 1.6vmin 2.6vmin; border-radius: 2vmin; }
  .card b { font-size: 3vmin; } .card b.zh { font-size: 4.2vmin; } .card small { font-size: 1.6vmin; }
  .progress-box { width: 70vmin; margin-bottom: 4vmin; gap: 1.2vmin; }
  .progress-head { font-size: 2vmin; } .progress-head b { font-size: 2.8vmin; }
  .progress { height: 2.2vmin; }
}

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

/* Mobile et tablette : pas de cartes sur les côtés (elles passeraient sur le texte) */
@media (max-width: 1099px), (orientation: portrait) { .card.side { display: none; } }

/* ---------- Formulaire : icône, consentement RGPD, anti-robot */
.notify { flex-direction: column !important; max-width: 560px; }
.notify-row { display: flex; flex-direction: column; gap: 10px; }
.field .ico { flex: none; width: 30px; height: 30px; }
.consent { position: relative; display: flex; align-items: flex-start; gap: 10px; text-align: left; cursor: pointer; font-size: 13px; line-height: 1.4; opacity: .92; }
.consent input { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: 0; opacity: 0; cursor: pointer; }
.consent .box { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 8px; background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.55); display: grid; place-items: center; transition: all .2s var(--bounce); }
.consent input:checked + .box { background: var(--green); border-color: var(--green); }
.consent input:checked + .box::after { content: '✓'; font-weight: 900; font-size: 15px; }
.consent input:focus-visible + .box { outline: 3px solid var(--yellow); outline-offset: 2px; }
.consent.bad .box { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,61,110,.35); }
.consent a { color: var(--yellow); font-weight: 700; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (min-width: 700px) {
  .notify-row { flex-direction: row; }
  .notify-row .field { flex: 1; }
  .consent { font-size: 14px; }
}
@media (min-width: 1100px) and (orientation: landscape) {
  .notify { max-width: 80vmin; }
  .notify-row { gap: 1.6vmin; }
  .field .ico { width: 3.8vmin; height: 3.8vmin; }
  .consent { font-size: 1.75vmin; gap: 1.4vmin; }
  .consent .box, .consent input { width: 3vmin; height: 3vmin; border-radius: 1vmin; }
}
