/* Tennis Partner Israel — mise en page entièrement fluide : aucune taille d'écran en dur. */
:root {
  --paper: #f4f0e6;
  --card: #fffdf7;
  --ink: #11261d;
  --ink-soft: #46584f;
  --court: #0f3d2e;
  --court-2: #17523d;
  --line: #d9d3c2;
  --ball: #dcf23e;
  --ball-deep: #b9d016;
  --clay: #c5532f;
  --sky: #2f6fb3;
  --wa: #1f8f4e;

  --pad: clamp(1.125rem, 5vw, 3rem);
  --gap: clamp(1rem, 3vw, 2rem);
  --radius: clamp(0.875rem, 2vw, 1.25rem);
  --display: "Heebo", "Arial Hebrew", "Segoe UI", system-ui, sans-serif;
  --body: "Heebo", "Arial Hebrew", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  overflow-wrap: break-word;
}
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: max(var(--pad), env(safe-area-inset-left, 0px)) max(var(--pad), env(safe-area-inset-right, 0px));
}

/* ---------- En-tête ---------- */
.top {
  background: var(--court);
  color: #fff;
  padding-block-start: env(safe-area-inset-top, 0px);
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.875rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ball { flex: none; width: 1.75em; height: 1.75em; }
.ball circle { fill: var(--ball); }
.ball path { fill: none; stroke: var(--court); stroke-width: 1.6; stroke-linecap: round; }
.lang {
  flex: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 999px;
  padding: 0.375rem 0.875rem;
  min-height: 2.5rem;
  min-width: 3rem;
  cursor: pointer;
}
.lang:hover { background: rgb(255 255 255 / 0.12); }

/* ---------- Héros ---------- */
.hero {
  background: var(--court);
  color: #fff;
  padding-block: clamp(1.5rem, 5vw, 4rem) clamp(2.5rem, 7vw, 5.5rem);
}
.hero-in {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--court);
  background: var(--ball);
  border-radius: 999px;
  padding: 0.25rem 0.875rem;
}
h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.5rem, 1.5rem + 5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-block: 1rem 1.25rem;
  text-wrap: balance;
}
.lead {
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  color: rgb(255 255 255 / 0.88);
  max-width: 34rem;
  text-wrap: pretty;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 3.5rem;
  padding: 0.875rem 1.75rem;
  margin-block-start: 1.75rem;
  border-radius: 999px;
  background: var(--ball);
  color: var(--court);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 0.25rem 0 var(--ball-deep);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-0.125rem); box-shadow: 0 0.375rem 0 var(--ball-deep); }
.btn:active { transform: translateY(0.125rem); box-shadow: 0 0.125rem 0 var(--ball-deep); }
.btn:focus-visible, .lang:focus-visible, .brand:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.fine { margin-block-start: 1rem; font-size: 0.9375rem; color: rgb(255 255 255 / 0.72); }

/* Aperçu de conversation */
.chat {
  background: #e9e3d3;
  color: var(--ink);
  border-radius: calc(var(--radius) * 1.25);
  overflow: hidden;
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.28);
  justify-self: center;
  width: 100%;
  max-width: 27rem;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--court-2);
  color: #fff;
  padding: 0.875rem 1.125rem;
  font-size: 1.125rem;
}
.chat-head > div { min-width: 0; }
.chat-name { font-weight: 700; font-size: 1rem; line-height: 1.5; text-align: start; }
.chat-sub { font-size: 0.8125rem; line-height: 1.5; color: rgb(255 255 255 / 0.75); }
.msgs {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.125rem;
}
.msg {
  align-self: flex-start;
  max-width: 88%;
  background: #fff;
  border-radius: 1rem;
  border-start-start-radius: 0.25rem;
  padding: 0.625rem 0.875rem;
  line-height: 1.45;
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.08);
}
.msg.me {
  align-self: flex-end;
  background: #d5f0c0;
  border-start-start-radius: 1rem;
  border-start-end-radius: 0.25rem;
}
@media (prefers-reduced-motion: no-preference) {
  .msg { animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
  .msg:nth-child(1) { animation-delay: 0.25s; }
  .msg:nth-child(2) { animation-delay: 0.9s; }
  .msg:nth-child(3) { animation-delay: 1.55s; }
  .msg:nth-child(4) { animation-delay: 2.2s; }
  @keyframes pop {
    from { opacity: 0; transform: translateY(0.75rem) scale(0.96); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Sections ---------- */
.sec { padding-block: clamp(3rem, 8vw, 6rem); }
.eyebrow {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--clay);
  margin-block-end: 0.375rem;
}
h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.875rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.sec-lead { margin-block-start: 0.875rem; max-width: 40rem; color: var(--ink-soft); text-wrap: pretty; }

/* Comment écrire */
.how {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: var(--gap);
  margin-block-start: clamp(1.5rem, 4vw, 2.5rem);
  align-items: stretch;
}
.parts { display: grid; gap: 0.75rem; }
.part {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-inline-start: 0.375rem solid var(--tone);
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
}
.part > div { min-width: 0; }
.part p { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.5; }
.part-n {
  flex: none;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--tone);
  min-width: 1.5rem;
  text-align: center;
}
.p-when { --tone: var(--clay); }
.p-where { --tone: var(--sky); }
.p-level { --tone: var(--court-2); }
.example {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.875rem;
  background: var(--court);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2.25rem);
}
.example-label { font-weight: 700; font-size: 0.875rem; color: var(--ball); }
.example-msg {
  background: #fff;
  color: var(--ink);
  border-radius: 1rem;
  border-start-start-radius: 0.25rem;
  padding: 1rem 1.125rem;
  font-size: clamp(1.125rem, 1rem + 0.8vw, 1.5rem);
  font-weight: 500;
  line-height: 1.9;
}
.example-msg span {
  padding: 0.125rem 0.25rem;
  margin-inline: 0.1875rem;
  border-radius: 0.375rem;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hl-when { background: #f6d9cd; }
.hl-where { background: #d3e3f4; }
.hl-level { background: #d2ead9; }
.example-note { font-size: 0.9375rem; color: rgb(255 255 255 / 0.8); }

/* Niveaux */
.sec-dark { background: var(--court); color: #fff; }
.sec-dark .eyebrow { color: var(--ball); }
.sec-dark .sec-lead { color: rgb(255 255 255 / 0.82); }
.levels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 0.625rem clamp(1rem, 3vw, 2rem);
  margin-block-start: clamp(1.5rem, 4vw, 2.5rem);
}
.lv {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: var(--radius);
  padding: 0.75rem 1.125rem;
}
.lv p { min-width: 0; line-height: 1.45; }
.lv-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 3.25rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ball);
  color: var(--court);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
}
/* Écran large : deux colonnes lues de haut en bas (10 à 6, puis 5 à 1). */
@media (min-width: 56rem) {
  .levels { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, auto); grid-auto-flow: column; }
}

/* Zones */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4375rem 1rem;
  font-weight: 500;
  line-height: 1.4;
}
.chips-big { margin-block-start: clamp(1.25rem, 3vw, 2rem); gap: 0.625rem; }

/* Adhésion */
.sec-join { background: #e9e3d3; }
.join {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.steps { display: grid; gap: 0.875rem; margin-block-start: 1.5rem; }
.steps li { display: flex; gap: 0.875rem; align-items: flex-start; }
.steps p { min-width: 0; padding-block-start: 0.1875rem; }
.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--court);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
}
.rule {
  margin-block-start: 1.5rem;
  padding-inline-start: 0.875rem;
  border-inline-start: 0.25rem solid var(--clay);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.gate {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.25);
  padding: clamp(0.875rem, 4vw, 2rem);
  box-shadow: 0 1rem 2.5rem rgb(17 38 29 / 0.1);
  min-width: 0;
}
.ts { max-width: 100%; }
.ts:empty, .gate-status:empty { display: none; }
.gate-sub { color: var(--ink-soft); }
.gate-status { font-size: 0.9375rem; color: var(--ink-soft); }
.gate-status.is-error { color: #a3271b; font-weight: 500; }
.btn-wa { margin-block-start: 0; background: var(--wa); color: #fff; box-shadow: 0 0.25rem 0 #156b39; }
.btn-wa:hover { box-shadow: 0 0.375rem 0 #156b39; }
.btn-wa:focus-visible { outline-color: var(--ink); }
/* ---------- Pied ---------- */
.foot {
  background: var(--court);
  color: rgb(255 255 255 / 0.75);
  font-size: 0.875rem;
  text-align: center;
  padding-block: 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
