/* Kasalma — site. Couleurs et typo reprises du handoff design (tokens/colors.css, typography.css). */

@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito_500Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --font-sans: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;

  --bg-app: #FFF8F1;
  --bg-sunken: #FDEFE4;
  --surface-card: #FFFDF9;
  --surface-hearth: #FDEBDD;
  --border-soft: #F5E0D0;
  --border-strong: #D4AE97;
  --text-strong: #5A3A30;
  --text-body: #5A3A30;
  --text-muted: #8C6455;
  --text-link: #B9532F;
  --accent: #B9532F;
  --accent-hover: #9E4626;
  --text-on-accent: #FFFFFF;
  --gentle-bg: #FFF4E2;
  --gentle-fg: #94621F;
  --focus-ring: #4E7563;

  --radius-card: 20px;
  --radius-pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-app: #33231E;
    --bg-sunken: #2B1D18;
    --surface-card: #402D26;
    --surface-hearth: #4A3128;
    --border-soft: #4A352D;
    --border-strong: #5A4239;
    --text-strong: #FBEFE6;
    --text-body: #FBEFE6;
    --text-muted: #D9C2B5;
    --text-link: #F6A882;
    --accent: #F6A882;
    --accent-hover: #F9BB9A;
    --text-on-accent: #33231E;
    --gentle-bg: #3A2A15;
    --gentle-fg: #FFD190;
    --focus-ring: #93C2AC;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-body);
  font: 500 1.0625rem/1.6 var(--font-sans);
  overflow-wrap: break-word;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

a {
  color: var(--text-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* En-tête */
.site-header {
  border-bottom: 1px solid var(--border-soft);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text-strong);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
}
.brand img { width: 32px; height: 37px; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  color: var(--text-strong);
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover { background: var(--bg-sunken); }
.site-nav a[aria-current="page"] {
  background: var(--surface-hearth);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Contenu */
main { padding: 32px 0 56px; }

h1, h2, h3 {
  color: var(--text-strong);
  font-weight: 800;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.25rem); line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 1.375rem; line-height: 1.3; margin: 40px 0 12px; scroll-margin-top: 16px; }
h3 { font-size: 1.1875rem; line-height: 1.35; margin: 24px 0 8px; }

p, ul, ol, table { margin: 0 0 14px; }
li + li { margin-top: 6px; }
strong { font-weight: 800; color: var(--text-strong); }

.meta {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.summary-box {
  margin: 0 0 32px;
  padding: 20px 22px;
  background: var(--surface-hearth);
  border-radius: var(--radius-card);
}
.summary-box h2 { margin-top: 0; font-size: 1.1875rem; }
.summary-box ul { margin-bottom: 0; }

.toc {
  margin: 0 0 32px;
  padding: 18px 22px;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
}
.toc h2 { margin: 0 0 8px; font-size: 1.0625rem; }
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li + li { margin-top: 2px; }
.toc a { display: inline-block; padding: 6px 0; }

/* Mention à compléter avant publication */
.todo {
  padding: 0 4px;
  background: var(--gentle-bg);
  color: var(--gentle-fg);
  border-radius: 4px;
  font-weight: 700;
}

.table-scroll { overflow-x: auto; margin: 0 0 14px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}
caption {
  text-align: left;
  font-weight: 700;
  color: var(--text-strong);
  padding-bottom: 8px;
}
th, td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-soft);
}
thead th {
  background: var(--bg-sunken);
  color: var(--text-strong);
  font-weight: 800;
}

/* Accueil */
.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 24px 0 8px;
}
.hero img { width: 140px; height: auto; margin-bottom: 16px; }
.hero .tagline {
  font-size: 1.1875rem;
  max-width: 32rem;
  margin: 8px auto 24px;
}

/* Pied de page */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 24px 0 32px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.site-footer li + li { margin-top: 0; }
.site-footer a { display: inline-block; padding: 10px 0; }
.site-footer p { margin: 0; }

/* Sur téléphone, les tableaux deviennent des fiches : chaque cellule affiche son intitulé. */
@media (max-width: 559px) {
  table.stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  table.stack,
  table.stack caption,
  table.stack tbody,
  table.stack tr,
  table.stack th,
  table.stack td {
    display: block;
  }
  table.stack tr {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: var(--surface-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
  }
  table.stack th,
  table.stack td {
    padding: 4px 0;
    border: 0;
  }
  table.stack [data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 700;
  }
  table.stack th[scope="row"]::before { display: none; }
  table.stack th[scope="row"] { font-size: 1.0625rem; }
}

/* ——— Utilitaires ——— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.wrap-wide { max-width: 68rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--text-on-accent);
  font: 800 1.0625rem/1 var(--font-sans);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.site-nav a.nav-cta {
  background: var(--accent);
  color: var(--text-on-accent);
}
.site-nav a.nav-cta:hover { background: var(--accent-hover); }

/* ——— Accueil ——— */
main.landing { padding: 0; }

.hero-split { padding: 40px 0 48px; }
.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 48px; }
}
.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  background: var(--surface-hearth);
  border-radius: var(--radius-pill);
  color: var(--text-strong);
  font-weight: 700;
  font-size: 0.9375rem;
}
.hero-text h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  line-height: 1.1;
  margin-bottom: 16px;
}
.lead { font-size: 1.1875rem; line-height: 1.55; margin-bottom: 28px; }

.hero-visual { display: flex; justify-content: center; }
.hero-visual img,
.step img {
  width: 100%;
  height: auto;
  border-radius: 36px;
  box-shadow: 0 18px 40px rgba(90, 58, 48, 0.16);
}
.hero-visual img { max-width: 340px; }

/* Liste d'attente */
.waitlist {
  padding: 20px;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
}
.waitlist-title { margin: 0 0 12px; font-size: 1.1875rem; }
.waitlist-row { display: flex; flex-wrap: wrap; gap: 10px; }
.waitlist input[type="email"] {
  flex: 1 1 14rem;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-app);
  color: var(--text-body);
  font: 500 1.0625rem var(--font-sans);
}
.waitlist input[type="email"]::placeholder { color: var(--text-muted); }
.waitlist .btn { flex: 0 0 auto; }
@media (max-width: 420px) {
  .waitlist .btn { flex: 1 1 100%; }
}
.device {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}
.device legend { float: left; margin-right: 8px; padding: 0; font-weight: 700; }
.device label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
}
.device input { width: 20px; height: 20px; accent-color: var(--accent); }
.optional { color: var(--text-muted); font-weight: 500; }
.fine { margin: 8px 0 0; font-size: 0.875rem; color: var(--text-muted); }
.status:empty { display: none; }
.status { margin: 12px 0 0; font-weight: 700; }
.status[data-state="ok"] { color: var(--text-strong); }
.status[data-state="error"] { color: var(--gentle-fg); }

.waitlist-center { max-width: 34rem; margin: 0 auto; text-align: left; }

/* Bandeau */
.band { background: var(--surface-hearth); padding: 28px 0; }
.band-quote {
  margin: 0;
  text-align: center;
  color: var(--text-strong);
  font-weight: 800;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.625rem);
  line-height: 1.35;
}

/* Sections */
.section { padding: 56px 0; }
.section-soft { background: var(--bg-sunken); }
.section-hearth { background: var(--surface-hearth); text-align: center; }
.section-title {
  margin: 0 0 28px;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  line-height: 1.2;
}
.section-hearth .section-title { text-align: center; margin-bottom: 20px; }
.cta-alma { display: block; margin: 0 auto 8px; }

/* Étapes */
.steps {
  display: grid;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}
.step { margin: 0; }
.step img { display: block; max-width: 280px; margin: 0 auto 20px; }
.step h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.25rem; }
.step-num {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 1rem;
}
.example {
  max-width: 280px;
  min-height: 300px;
  margin: 0 auto 20px;
  padding: 18px;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: 0 18px 40px rgba(90, 58, 48, 0.10);
  font-size: 0.9375rem;
  line-height: 1.4;
}
@media (min-width: 860px) {
  .example { min-height: 0; margin-top: 60px; margin-bottom: 80px; }
}
.example-title { margin: 0 0 12px; font-weight: 800; color: var(--text-strong); }
.example ul { margin: 0; padding: 0; list-style: none; }
.example li {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 10px 0 10px 30px;
  border-top: 1px solid var(--border-soft);
  position: relative;
}
.example li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
}
.example .due { color: var(--text-muted); font-size: 0.8125rem; font-weight: 700; }

/* Points forts */
.features {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .features { grid-template-columns: 1fr 1fr; }
}
.features li {
  margin: 0;
  padding: 22px;
  background: var(--surface-card);
  border-radius: var(--radius-card);
}
.features h3 { margin: 0 0 6px; }
.features p { margin: 0; }

/* Questions */
.faq details {
  border-bottom: 1px solid var(--border-soft);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  cursor: pointer;
  color: var(--text-strong);
  font-weight: 800;
  font-size: 1.125rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-link);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; }

/* Sur téléphone, le menu de l'accueil se réduit au bouton d'inscription. */
@media (max-width: 559px) {
  .site-nav li:has(> a[href^="#"]:not(.nav-cta)) { display: none; }
}
