/* Avinow — site vitrine. Couleurs = jetons de l'application (avinow/theme/Color.kt). */

@font-face { font-family: "Poppins"; src: url("assets/fonts/poppins_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("assets/fonts/poppins_medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("assets/fonts/poppins_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("assets/fonts/poppins_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --teal: #1f6f5f;
  --teal-pressed: #185a4d;
  --deep: #0e3b35;
  --deeper: #0a2c27;
  --mint: #7fd3bc;
  --gold: #f4b740;
  --gold-stroke: #d99a1e;
  --ink: #13302c;
  --muted: #4a5f5b;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --line: #d5e0dc;
  --reply: #eaf4f0;
  --reply-line: #c4ddd5;
  --alert: #fcEAE5;
  --on-alert: #9a2f1c;
  --success: #dcefe7;
  --on-success: #17574a;
  --radius: 16px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal: #7fd3bc;
    --teal-pressed: #9adfcc;
    --ink: #e4efec;
    --muted: #a3bab4;
    --bg: #0a1c19;
    --surface: #122b27;
    --line: #29443f;
    --reply: #123a33;
    --reply-line: #265a4f;
    --alert: #2e2420;
    --on-alert: #ffb4a6;
    --success: #173f35;
    --on-success: #a5e6d0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--teal); }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ en-tête (toujours sombre) */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 600px at 85% 110%, rgba(31, 111, 95, .55), transparent 60%),
    radial-gradient(800px 500px at 0% 0%, rgba(127, 211, 188, .10), transparent 60%),
    var(--deep);
  isolation: isolate;
}
/* Grain très léger : la surface paraît matière, pas écran. */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Ondes concentriques : une surface d'eau qui se calme. */
.ripples { position: absolute; z-index: -1; right: -18vmax; bottom: -22vmax; width: 70vmax; aspect-ratio: 1; pointer-events: none; }
.ripples span {
  position: absolute; inset: 0;
  border: 1px solid rgba(127, 211, 188, .16);
  border-radius: 50%;
  animation: ripple 14s linear infinite;
  opacity: 0;
}
.ripples span:nth-child(2) { animation-delay: -3.5s; }
.ripples span:nth-child(3) { animation-delay: -7s; }
.ripples span:nth-child(4) { animation-delay: -10.5s; }
@keyframes ripple {
  0% { transform: scale(.15); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; }
.nav img { height: 36px; width: auto; }
.nav a.cta-small {
  color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 10px 18px;
  transition: background .2s, border-color .2s;
}
.nav a.cta-small:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }

.hero-grid {
  display: grid; gap: 48px; align-items: center;
  padding: 40px 0 88px;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; padding: 56px 0 120px; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; letter-spacing: .02em;
  color: var(--mint);
  background: rgba(127, 211, 188, .10);
  border: 1px solid rgba(127, 211, 188, .22);
  border-radius: 999px; padding: 6px 14px;
}
.hero h1 {
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 1.06;
  letter-spacing: -.025em;
  font-weight: 700;
  margin: 22px 0 20px;
}
.hero h1 em { font-style: normal; color: var(--mint); }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: #cfe3dd; max-width: 34ch; margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border-radius: 999px;
  font: 600 16px/1 "Poppins", sans-serif; text-decoration: none;
  transition: transform .15s ease, background .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: #fff; color: var(--deep); }
.btn-primary:hover { background: #e9f5f1; }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.soon { font-size: 14px; color: #9fc3b8; margin-top: 14px; }

/* ------------------------------------------------------------ téléphone (démonstration CSS) */
.phone {
  position: relative;
  width: min(330px, 86vw);
  margin-inline: auto;
  aspect-ratio: 9 / 18.5;
  border-radius: 44px;
  padding: 12px;
  background: linear-gradient(160deg, #1b4a43, #08221e);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transform: rotate(-3deg);
}
.screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 34px;
  background: #f6f8f7;
  color: #13302c;
  font-size: 13px; line-height: 1.45;
}
.screen-top { background: var(--deep); color: #fff; padding: 30px 16px 14px; }
.screen-top strong { display: block; font-size: 15px; }
.screen-top small { color: #a9cfc4; }
.screen-body { padding: 12px; display: grid; gap: 10px; }
.card { background: #fff; border: 1px solid #d5e0dc; border-radius: 14px; padding: 12px; }
.card .who { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.badge { font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 3px 9px; }
.badge.todo { background: #fceae5; color: #9a2f1c; }
.badge.done { background: #dcefe7; color: #17574a; }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 13px; margin: 4px 0; }
.stars .off { color: #b5c4c0; }
.reply { background: #eaf4f0; border: 1px solid #c4ddd5; border-radius: 14px; padding: 12px; }
.reply b { display: block; color: #1f6f5f; font-size: 11.5px; margin-bottom: 4px; }
.phone-cta {
  margin-top: 4px; background: #1f6f5f; color: #fff; text-align: center;
  border-radius: 999px; padding: 11px; font-weight: 600; font-size: 13px;
}
/* Les deux états de l'écran se relaient : réponse proposée -> publiée. */
.state { animation: swap 9s ease-in-out infinite; }
.state.after { position: absolute; inset: 0; opacity: 0; animation-delay: -4.5s; }
@keyframes swap { 0%, 42% { opacity: 1; } 50%, 92% { opacity: 0; } 100% { opacity: 1; } }
.toast {
  background: #dcefe7; color: #17574a; border-radius: 12px; padding: 10px 12px; font-weight: 600;
}
.notif {
  position: absolute; left: -26px; right: 26px; top: 64px;
  background: rgba(255, 255, 255, .97); color: #13302c;
  border-radius: 18px; padding: 12px 14px;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .55);
  font-size: 12.5px; line-height: 1.4;
  transform: rotate(3deg);
  animation: drop 1s cubic-bezier(.2, .8, .2, 1) .6s both;
}
.notif .app { display: flex; align-items: center; gap: 8px; color: #4a5f5b; font-size: 11px; }
.notif .app img { width: 18px; height: 18px; }
.notif strong { display: block; margin-top: 4px; }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) rotate(3deg); } to { opacity: 1; transform: rotate(3deg); } }

/* ------------------------------------------------------------ sections */
section { padding: 88px 0; }
.kicker { color: var(--teal); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; letter-spacing: -.02em; margin: 10px 0 16px; }
.intro { color: var(--muted); max-width: 60ch; margin: 0 0 48px; }

.steps { display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px 24px;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--reply); color: var(--teal); font-weight: 700; margin-bottom: 16px;
}
.step h3 { margin: 0 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } }
.story { display: grid; gap: 14px; }
.story .card, .story .reply { font-size: 15.5px; color: var(--ink); }
.story .card { background: var(--surface); border-color: var(--line); }
.story .reply { background: var(--reply); border-color: var(--reply-line); }
.story .reply b { color: var(--teal); font-size: 13px; }
.story .stars { font-size: 16px; }
.story .stars .off { color: var(--muted); opacity: .5; }
.story-note { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--on-success); background: var(--success); border-radius: 12px; padding: 12px 16px; }

.features { display: grid; gap: 16px; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { border-top: 1px solid var(--line); padding-top: 20px; }
.feature h3 { font-size: 18px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }
.feature .ico { width: 28px; height: 28px; color: var(--teal); margin-bottom: 12px; }

.alt { background: var(--surface); border-block: 1px solid var(--line); }
.for { display: flex; flex-wrap: wrap; gap: 10px; }
.for span { border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; background: var(--bg); font-weight: 500; }

.contact {
  text-align: center; color: #fff; border-radius: 28px; padding: 64px 24px;
  background: radial-gradient(600px 300px at 50% 120%, rgba(127, 211, 188, .25), transparent 70%), var(--deep);
}
.contact h2 { color: #fff; }
.contact p { color: #cfe3dd; max-width: 52ch; margin: 0 auto 28px; }

footer { padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
footer .row { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer img { height: 28px; width: auto; }

/* ------------------------------------------------------------ apparition au défilement */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; opacity: 1; transform: none; }
.hero .reveal:nth-child(2) { animation-delay: .08s; }
.hero .reveal:nth-child(3) { animation-delay: .16s; }
.hero .reveal:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .state.after { display: none; }
}

/* ------------------------------------------------------------ pages légales */
.legal { padding: 48px 0 80px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -.02em; }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal .todo { background: var(--alert); color: var(--on-alert); border-radius: 8px; padding: 2px 8px; font-weight: 600; }
.topbar { background: var(--deep); }
.topbar .nav img { height: 32px; }
