/* Parroko — site vitrine WhatsApp. Identité : perroquet tropical, contours encre, couleurs franches. */
:root {
  --bg: #fff7e8;        /* crème tropicale */
  --bg-soft: #fdeccc;
  --card: #ffffff;
  --card-hi: #fff3dc;
  --line: #1b1a17;      /* contours encre, style « autocollant » */
  --soft-line: #eadcbf;
  --txt: #1b1a17;
  --dim: #5f574b;
  --green: #18a957;     /* plumes du perroquet */
  --green-ink: #0b7a3b; /* vert lisible pour le texte */
  --red: #ff4b3e;
  --gold: #ffc531;
  --blue: #2e7bff;
  --wa: #25d366;
  --wa-dark: #128c4a;
  --r: 20px;
  --shadow: 4px 4px 0 var(--line);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--txt);
  font: 16px/1.55 "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- En-tête ---------- */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { font-family: "Baloo 2"; font-weight: 800; font-size: 24px; letter-spacing: -.5px; line-height: 1; text-decoration: none; }
.logo b { color: var(--green); }
.logo::before { content: "🦜"; margin-right: 6px; font-size: .9em; }
.top nav { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex; border: 2px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg-soft);
}
.lang-switch button {
  border: 0; background: none; color: var(--dim); font: 600 13px "DM Sans"; padding: 6px 10px; border-radius: 999px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--txt); color: var(--bg); }

/* ---------- Boutons ---------- */
.btn-wa {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--wa); color: #06210f; text-decoration: none; border: 2px solid var(--line);
  font: 700 17px "DM Sans"; padding: 16px 26px; border-radius: 999px;
  box-shadow: 0 6px 0 var(--line);
  transition: transform .12s, box-shadow .12s;
}
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--line); }
.btn-wa:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--line); }
.btn-wa svg { width: 24px; height: 24px; flex: none; }
.btn-wa.small { font-size: 14px; padding: 9px 16px; box-shadow: 0 3px 0 var(--line); }
.btn-wa.small svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--txt); background: var(--gold);
  border: 2px solid var(--line); box-shadow: 2px 2px 0 var(--line); transform: rotate(-2deg); padding: 6px 12px; border-radius: 999px;
}
h1 {
  font-family: "Baloo 2"; font-weight: 800; letter-spacing: -1.5px; line-height: .95;
  font-size: clamp(44px, 6.6vw, 88px); margin: 18px 0 18px;
}
h1 .accent-word {
  display: inline-block; color: var(--green-ink); position: relative; white-space: nowrap;
}
h1 .accent-word .rotator > span { position: relative; justify-self: start; align-self: start; }
h1 .accent-word .rotator > span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .16em; background: var(--gold); z-index: -1; border-radius: 4px; transform: skew(-12deg);
}
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--dim); max-width: 34ch; }
.lead strong { color: var(--txt); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 30px; }
.cta-note { font-size: 14px; color: var(--dim); }
.cta-note b { color: var(--green-ink); }

/* Bulles d'accents qui défilent dans le titre */
.rotator { display: inline-grid; vertical-align: bottom; }
.rotator > span { grid-area: 1 / 1; opacity: 0; transform: translateY(40%) rotate(-3deg); transition: opacity .35s, transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.rotator > span.on { opacity: 1; transform: none; }

/* ---------- Téléphone ---------- */
.phone {
  width: min(360px, 100%); margin-inline: auto; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #2a2a38, #0f0f16); border: 2px solid var(--line);
  box-shadow: 10px 10px 0 var(--green), 0 0 0 8px #0d0d13 inset;
  transform: rotate(3deg);
}
.screen {
  height: 100%; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column;
  background: #0b141a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='4' cy='4' r='1.2' fill='%23ffffff0d'/%3E%3C/svg%3E");
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; background: #1f2c33; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font: 800 18px "Baloo 2"; }
.chat-head b { display: block; font-size: 15px; color: #e9edef; }
.chat-head small { color: #8696a0; font-size: 12px; }
.chat { flex: 1; padding: 14px 10px 22px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; min-height: 400px; }
.msg { color: #e9edef; max-width: 82%; padding: 7px 10px 8px; border-radius: 10px; font-size: 14px; line-height: 1.35; animation: pop .5s both cubic-bezier(.2, 1.4, .4, 1); }
.msg.me { align-self: flex-end; background: #005c4b; border-top-right-radius: 2px; }
.msg.bot { align-self: flex-start; background: #1f2c33; border-top-left-radius: 2px; }
.msg .t { display: block; text-align: right; font-size: 10px; color: #ffffff88; margin-top: 2px; }
.voice { display: flex; align-items: center; gap: 8px; min-width: 210px; }
.voice .play { width: 30px; height: 30px; border-radius: 50%; background: var(--green); display: grid; place-items: center; flex: none; }
.voice .play::before { content: ""; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.wave { display: flex; align-items: center; gap: 2px; height: 26px; flex: 1; }
.wave i { width: 3px; border-radius: 2px; background: #ffffffaa; animation: wave 1.1s infinite ease-in-out; }
.voice small { font-size: 11px; color: #ffffffaa; }
.flag-badge { font-size: 12px; color: var(--gold); display: block; margin-bottom: 4px; font-weight: 600; }
@keyframes wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ---------- Bandeau d'accents ---------- */
.marquee { border-block: 2px solid var(--line); background: var(--green); transform: rotate(-1deg); overflow: hidden; padding: 18px 0; margin-top: 30px; }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: slide 55s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; background: var(--card); border: 2px solid var(--line);
  border-radius: 999px; padding: 10px 16px 10px 12px; font-weight: 600;
}
.chip .fl { font-size: 22px; line-height: 1; }
.chip em { font-style: normal; color: var(--dim); font-weight: 500; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
h2 { font-family: "Baloo 2"; font-weight: 800; letter-spacing: -1px; line-height: 1; font-size: clamp(34px, 5vw, 56px); margin-bottom: 14px; }
h2 + p.sub { color: var(--dim); font-size: 18px; max-width: 52ch; margin-bottom: 36px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r); padding: 26px; position: relative; }
.step::before {
  counter-increment: s; content: counter(s); font: 800 30px/1 "Baloo 2"; color: #fff; background: var(--red);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line);
  margin-bottom: 14px;
}
.step h3 { font: 700 21px "Baloo 2"; margin-bottom: 6px; }
.step p { color: var(--dim); }

/* Carte des accents */
.accents { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.acc {
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 16px; display: flex; gap: 12px; align-items: flex-start;
  transition: transform .2s cubic-bezier(.2, 1.4, .4, 1), border-color .2s, background .2s; cursor: default;
}
.acc:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow); background: var(--card-hi); }
.acc .fl { font-size: 30px; line-height: 1; }
.acc b { display: block; font-family: "Baloo 2"; font-size: 17px; }
.acc span { color: var(--dim); font-size: 14px; }
.acc q { display: block; margin-top: 6px; font-size: 14px; color: var(--green-ink); font-weight: 600; quotes: "« " " »"; }
.acc[data-lang="en"] q { quotes: "“" "”"; }
.tabs { display: inline-flex; gap: 6px; margin-bottom: 22px; background: var(--card); padding: 5px; border-radius: 999px; border: 2px solid var(--line); }
.tabs button { border: 0; background: none; color: var(--dim); font: 600 15px "DM Sans"; padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--txt); color: var(--bg); }

/* Bloc final */
.final {
  text-align: center; background: var(--gold);
  border: 2px solid var(--line); box-shadow: 8px 8px 0 var(--line); border-radius: 28px; padding: 64px 24px;
}
.final p { color: var(--txt); font-size: 18px; margin: 0 auto 30px; max-width: 46ch; }
.qr { display: none; margin: 28px auto 0; width: max-content; text-align: center; color: var(--txt); font-size: 13px; }
.qr canvas, .qr img { background: #fff; padding: 10px; border-radius: 14px; border: 2px solid var(--line); margin: 0 auto 8px; }
@media (hover: hover) and (min-width: 900px) { .qr { display: block; } }

.faq details { border-bottom: 2px solid var(--soft-line); padding: 18px 0; }
.faq summary { cursor: pointer; font: 700 19px "Baloo 2"; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--red); font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--dim); margin-top: 10px; max-width: 70ch; }

/* ---------- Pied de page ---------- */
footer { border-top: 2px solid var(--line); padding: 36px 0 48px; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-start; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--txt); }
.legal-line { max-width: 60ch; }

/* ---------- Pages légales ---------- */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(38px, 6vw, 60px); letter-spacing: -1.5px; }
.doc .updated { color: var(--dim); margin-bottom: 36px; }
.doc h2 { font-size: 26px; letter-spacing: -.5px; margin: 40px 0 12px; }
.doc h3 { font: 700 18px "Baloo 2"; margin: 22px 0 8px; }
.doc p, .doc li { color: #3a352d; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 10px 0; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--green-ink); }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border: 1px solid var(--soft-line); vertical-align: top; }
.doc th { background: var(--bg-soft); font-weight: 600; }
.doc .box { background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow); border-radius: 14px; padding: 18px 20px; margin: 16px 0; }
.table-scroll { overflow-x: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding-top: 36px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .phone { transform: none; width: min(320px, 100%); }
  .steps { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}
@media (max-width: 520px) {
  h1 .accent-word { white-space: normal; }
  .top .btn-wa.small span { display: none; }
  .btn-wa { width: 100%; justify-content: center; }
  h1 { letter-spacing: -1px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
