/* L'accueil de Comoony : ce qui ne sert qu'à la page d'accueil (les écrans animés, le ruban, la démonstration, les apparitions).
   Les couleurs et les briques communes sont dans style.css. */

/* les petits visages et emojis des écrans */
.face-mini { flex: none; width: 30px; height: 30px; border-radius: 50%; background: url("/img/comoony-icone.svg") center/cover no-repeat; }
.emoji { flex: none; font-size: 24px; line-height: 1; }
.task .ic { font-size: 20px; line-height: 1; }
.task .t, .task .m { display: block; }
.phone .kicker { font-size: 13px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange); margin: 4px 0 0; }
.phone .app { position: relative; }

/* le téléphone de l'accroche : il flotte, et les tâches se cochent toutes seules */
.tilt { transform: rotate(3deg); animation: bob 7s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(1.5deg) translateY(-10px); } }
.task { transition: opacity 0.4s ease, transform 0.4s ease; }
.task .ok { transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease; flex: none; }
.task.done { transform: scale(0.98); }
.task.done .ok { animation: tick 0.45s ease; }
.task.done .t { text-decoration: line-through; text-decoration-color: var(--sun); text-decoration-thickness: 3px; }
@keyframes tick { 40% { transform: scale(1.35); } }
.bar i { transition: width 0.8s ease; }
.toast { position: absolute; left: 14px; right: 14px; bottom: 96px; display: flex; align-items: center; gap: 10px; background: var(--ink);
  color: var(--milk); border-radius: 18px; padding: 12px 14px; font-size: 14px; font-weight: 800; opacity: 0; transform: translateY(16px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.confetti { position: absolute; width: 8px; height: 12px; border-radius: 2px; top: 50%; left: 50%; pointer-events: none; z-index: 3;
  animation: confetti 1.2s ease-out forwards; }
@keyframes confetti { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* le ruban des petites tâches que tout le monde oublie */
.ribbon { background: var(--ink); color: var(--milk); overflow: hidden; padding: 18px 0; transform: rotate(-1.2deg); margin: -12px -20px 0;
  box-shadow: 0 10px 30px rgba(29, 27, 44, 0.18); position: relative; z-index: 2; }
.ribbon-track { display: flex; gap: 14px; width: max-content; animation: marquee 48s linear infinite; }
.ribbon-track span { white-space: nowrap; font-weight: 800; font-size: 17px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; padding: 8px 18px; }
.ribbon-track span:nth-child(4n+1) { background: var(--sun); color: var(--ink); }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* la tête pleine de petites choses */
.head { position: relative; height: 440px; display: grid; place-items: center; }
.head::before { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: var(--sun-pale); }
.big-face { position: relative; width: 180px; height: 180px; animation: worry 5s ease-in-out infinite; }
.big-face img { display: block; width: 100%; height: 100%; }
@keyframes worry { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) scale(1.03); } }
.thought { position: absolute; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 22px;
  padding: 10px 16px; font-weight: 800; font-size: 16px; white-space: nowrap; animation: float 6s ease-in-out infinite; }
.thought::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); bottom: -16px; left: 30px; }
.t1 { top: 30px; left: 6%; animation-delay: -1s; }
.t2 { top: 10px; right: 8%; animation-delay: -2.5s; background: var(--sun-tint); border-color: var(--sun-tint); }
.t2::after { background: var(--sun-tint); border-color: var(--sun-tint); }
.t3 { top: 46%; left: 0; animation-delay: -4s; }
.t4 { bottom: 40px; right: 0; animation-delay: -0.5s; }
.t5 { bottom: 10px; left: 14%; animation-delay: -3.2s; background: var(--sun-tint); border-color: var(--sun-tint); }
.t5::after { background: var(--sun-tint); border-color: var(--sun-tint); }

/* la démonstration */
.person { animation: pop 0.35s ease both; }
.person .who .avatar { background: var(--sun); }
.person:nth-child(2) .who .avatar { background: var(--ink); color: var(--sun); }
.person:nth-child(3) .who .avatar { background: var(--orange); color: var(--white); }
.person:nth-child(4) .who .avatar { background: var(--sun-tint); }
.person li { display: flex; gap: 10px; align-items: flex-start; }
.person li .e { flex: none; font-size: 18px; line-height: 1.3; }
.stat b { transition: color 0.2s; }
.stat.bump b { animation: bump 0.4s ease; }
@keyframes bump { 40% { transform: scale(1.12); color: var(--orange); } }
.chip { transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.chip:active { transform: scale(0.95); }

/* les trois écrans de l'appli */
.showcase { display: grid; gap: 88px; margin-bottom: 88px; }
.show { max-width: 1000px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: center; }
.show:nth-child(even) { grid-template-columns: 1fr 340px; }
.show:nth-child(even) .phone { order: 2; }
.show h3 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; margin-bottom: 14px; }
.show p { font-size: 19px; color: var(--ink-soft); max-width: 520px; }
.show .phone { justify-self: center; transition: transform 0.5s ease; }
.show:nth-child(1) .phone { transform: rotate(-3deg); }
.show:nth-child(2) .phone { transform: rotate(3deg); }
.show:nth-child(3) .phone { transform: rotate(-2deg); }
.show:hover .phone { transform: rotate(0) translateY(-6px); }
.small-phone { width: 290px; }
.small-phone .screen { height: 580px; }
.small-phone .hello { font-size: 22px; }
.chipline { display: flex; flex-wrap: wrap; gap: 6px; }
.chipline span { font-size: 12px; font-weight: 800; background: var(--sun-tint); border-radius: 999px; padding: 4px 10px; }
.howto-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; font-size: 13px; font-weight: 600; }
.howto-card ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.fake-btn { margin-top: auto; background: var(--sun); border-radius: 999px; text-align: center; font-weight: 900; font-size: 15px; padding: 13px;
  box-shadow: 0 6px 16px rgba(255, 194, 51, 0.45); animation: nudge 3s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.05); } 90% { transform: scale(0.98); } }
.week { display: grid; gap: 8px; }
.week > div { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.week .avatar { width: 28px; height: 28px; font-size: 13px; flex: none; }
.week > div:nth-child(1) .avatar { background: var(--ink); color: var(--sun); }
.week > div:nth-child(2) .avatar { background: var(--sun); }
.week > div:nth-child(3) .avatar { background: var(--orange); color: var(--white); }
.away { display: flex; gap: 10px; align-items: flex-start; background: var(--sun-pale); border-radius: 16px; padding: 10px 12px; font-size: 13px; font-weight: 700; }
.goal { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.goal-t { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.goal-s { font-size: 13px; color: var(--grey); font-weight: 600; margin: 10px 0 0; }
.bar.big { height: 16px; }
.grow { background: linear-gradient(90deg, var(--sun), var(--orange)) !important; }
.reveal .grow { width: 0 !important; transition: width 1.6s cubic-bezier(0.3, 0.8, 0.3, 1) 0.3s; }
.reveal.visible .grow { width: 72% !important; }
.thanks-row { display: flex; flex-wrap: wrap; gap: 8px; }
.thanks-row span { background: var(--sun-pale); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 800; animation: pop 0.4s ease both; }
.more { margin-top: 8px; }
.feature .ic { font-size: 26px; transition: transform 0.3s ease; }
.feature:hover .ic { transform: rotate(-8deg) scale(1.1); }

/* pour qui, la foire aux questions, l'appel */
.who-emoji { font-size: 40px; line-height: 1; }
.who-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.who-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.center-link { text-align: center; margin-top: 24px; font-weight: 800; }
.wink { animation: wink 4s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes wink { 0%, 86%, 100% { transform: scale(1) rotate(0); } 90% { transform: scale(1.1, 0.9) rotate(-6deg); } 95% { transform: scale(0.95, 1.05) rotate(4deg); } }
.cta .box::before, .cta .box::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.28); }
.cta .box::before { width: 260px; height: 260px; left: -80px; top: -90px; }
.cta .box::after { width: 340px; height: 340px; right: -120px; bottom: -160px; }
.cta .box > * { position: relative; z-index: 1; }

/* les apparitions au défilement (seulement si le script tourne) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1); }
.js .reveal.visible { opacity: 1; transform: none; }
.js .steps .reveal:nth-child(2), .js .who-grid .reveal:nth-child(2), .js .values .reveal:nth-child(2) { transition-delay: 0.12s; }
.js .steps .reveal:nth-child(3), .js .who-grid .reveal:nth-child(3), .js .values .reveal:nth-child(3) { transition-delay: 0.24s; }
.js .who-grid .reveal:nth-child(4) { transition-delay: 0.36s; }

@media (max-width: 1040px) {
  .show, .show:nth-child(even) { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .show:nth-child(even) .phone { order: 0; }
  .show p { margin-left: auto; margin-right: auto; }
}
@media (max-width: 880px) {
  .head { height: 380px; }
  .showcase { gap: 64px; margin-bottom: 64px; }
}
@media (max-width: 560px) {
  .head { height: 340px; }
  .head::before { width: 260px; height: 260px; }
  .big-face { width: 130px; height: 130px; }
  .thought { font-size: 14px; padding: 8px 12px; }
  .ribbon-track span { font-size: 15px; }
  .small-phone { width: 270px; }
  .small-phone .screen { height: 560px; }
  .stage .bubble { font-size: 13px; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .reveal .grow { width: 72% !important; }
}

/* les tâches dans les téléphones : plus serrées, pour que les libellés respirent */
.phone .app { padding-left: 14px; padding-right: 14px; }
.phone .task { grid-template-columns: 34px 1fr 24px; gap: 10px; padding: 10px 12px; border-radius: 18px; }
.phone .task .ic { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }
.phone .task .t { font-size: 14px; }
.phone .task .m { font-size: 12px; }
.phone .task .ok { width: 24px; height: 24px; }
.phone .task.done .ok::after { left: 7px; top: 3px; width: 6px; height: 11px; }

/* l'écran grandit avec son contenu, pour que rien ne soit coupé sur un petit écran */
.phone .screen { height: auto; min-height: 600px; }
.small-phone .screen { height: auto; min-height: 580px; }
@media (max-width: 560px) {
  .phone { width: 296px; }
  .phone .screen, .small-phone .screen { min-height: 540px; }
}

/* ce qui arrive au lancement, dit franchement */
.soon-note { display: inline-block; font-size: 15px !important; font-weight: 700; color: var(--ink) !important; background: var(--sun-pale);
  border-radius: 14px; padding: 8px 14px; }
