/*
 * Habillage de la page d'accueil de Ki&La (index.html). Les pages légales ne la chargent pas :
 * elles gardent assets/style.css seule, dont celle-ci reprend les polices et le fond.
 *
 * Charte reprise de jitavision.com (navy, papier, corail, Saira Condensed + Manrope), accents de
 * Ki&La (bleu égyptien, champagne, statuts). Aucune ombre portée : les éléments se détachent par
 * leur fond et leur filet. Le logo est peint par marque/marque.css, engendré.
 */

/* Rethink Sans : la police de l'application, pour l'écran reproduit dans le téléphone. */
@font-face {
  font-family: "Rethink Sans";
  font-weight: 500;
  font-display: swap;
  src: url("polices/rethink-sans-500.ttf") format("truetype");
}
@font-face {
  font-family: "Rethink Sans";
  font-weight: 600;
  font-display: swap;
  src: url("polices/rethink-sans-600.ttf") format("truetype");
}
@font-face {
  font-family: "Rethink Sans";
  font-weight: 700;
  font-display: swap;
  src: url("polices/rethink-sans-700.ttf") format("truetype");
}
@font-face {
  font-family: "Rethink Sans";
  font-weight: 800;
  font-display: swap;
  src: url("polices/rethink-sans-800.ttf") format("truetype");
}

:root {
  --core-blue: #0b0f58;
  --core-blue-soft: #0c38a1;
  --accent-coral: #fc7154;
  --accent-champagne: #f4c08e;
  --accent-sand: #d7cfc5;
  --ink: #040623;
  --muted: #3c3f79;
  --line: #e3dfd8;
  --card: #ffffff;
  --present-bg: #ebfbf5;
  --present-bd: #99d6c0;
  --present-tx: #197f5a;
  --absent-bg: #fde9e9;
  --absent-bd: #f5a7a7;
  --absent-tx: #b91c1c;
  --retard-bg: #fff3e3;
  --retard-bd: #ffd3a0;
  --retard-tx: #9a5200;
  --excuse-bg: #e7e7ee;
  --excuse-bd: #cecfde;
  --excuse-tx: #3c3f79;
  --degrade-cta: linear-gradient(90deg, #fc7154 0%, #f4c08e 55%, #d7cfc5 100%);
}

html {
  -webkit-text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--core-blue-soft);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus {
  top: 16px;
}
:where(a, button):focus-visible {
  outline: 3px solid var(--core-blue-soft);
  outline-offset: 2px;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px max(16px, env(safe-area-inset-right)) 56px max(16px, env(safe-area-inset-left));
}

/* ── En-tête ─────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar .marque {
  width: 140px;
}
.topbar nav {
  display: none;
  gap: 18px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
}
.topbar nav a:hover {
  color: var(--accent-coral);
}

/* ── Typo commune ────────────────────────────────────── */
h1,
h2,
h3 {
  margin: 0;
  color: var(--core-blue);
  font-family: "Saira Condensed", "Arial Narrow", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--core-blue-soft);
}
.section-head h2 {
  margin-top: 6px;
  font-size: clamp(1.9rem, 4.8vw, 3rem);
  line-height: 0.95;
  max-width: 20ch;
}
.section-head p {
  margin: 12px 0 0;
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  margin-top: 32px;
  display: grid;
  gap: 36px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.7rem, 8.3vw, 5.4rem);
  line-height: 0.9;
  max-width: 11ch;
}
.hero h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(
    90deg,
    var(--core-blue-soft),
    var(--accent-champagne) 55%,
    var(--accent-coral)
  );
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-sub {
  max-width: 42ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.55;
}
.hero-tags {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-tags li {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--core-blue);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.btn-primary,
.btn-secondary {
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 800;
  transition: transform 180ms ease;
}
.btn-primary {
  color: #10142a;
  background: var(--degrade-cta);
}
.btn-secondary {
  color: var(--core-blue);
  background: #fff;
  border: 1px solid var(--line);
}
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}

/*
 * ── Le téléphone ─────────────────────────────────────
 * L'écran « Prochain appel » de l'application, reproduit d'après src/app/(tabs)/appel.tsx :
 * mêmes mesures, même police, mêmes icônes Phosphor, mêmes couleurs de thème. Il est
 * dessiné à la taille réelle d'un iPhone (390 × 844 points) puis mis à l'échelle par --k :
 * c'est la seule variable à toucher d'un format d'écran à l'autre. Noms fictifs.
 */
.hero-visual {
  display: grid;
  justify-items: center;
}
.phone {
  --k: 0.7;
  width: calc(414px * var(--k));
  height: calc(868px * var(--k));
  padding: calc(12px * var(--k));
  border-radius: calc(62px * var(--k));
  background: #14161f;
  border: 1px solid #2a2d3a;
}
.screen-clip {
  width: 100%;
  height: 100%;
  border-radius: calc(50px * var(--k));
  overflow: hidden;
}
.app {
  width: 390px;
  height: 844px;
  transform: scale(var(--k));
  transform-origin: top left;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #f8f5f3;
  font-family: "Rethink Sans", "Manrope", sans-serif;
  color: #040623;
}
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("marque/texture-grain.png") center / 100% 100%;
  opacity: 0.075;
}
.app > * {
  position: relative;
}
.app svg {
  fill: currentColor;
  flex: 0 0 auto;
}

.app-statut {
  height: 54px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 34px 0 42px;
  font-weight: 600;
  font-size: 16px;
}
.app-statut .ilot {
  position: absolute;
  left: 50%;
  top: 11px;
  width: 124px;
  height: 36px;
  margin-left: -62px;
  border-radius: 20px;
  background: #000;
}
.app-statut .reseau {
  display: flex;
  gap: 6px;
  align-items: center;
}
.app-statut .batterie {
  width: 26px;
  height: 12px;
  border: 1.5px solid #040623;
  border-radius: 4px;
  padding: 1.5px;
}
.app-statut .batterie::after {
  content: "";
  display: block;
  height: 100%;
  width: 70%;
  background: #040623;
  border-radius: 1.5px;
}

.app-entete {
  padding: 20px 20px 10px;
}
.app-entete-haut {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.app-surtitre {
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6d6f9b;
}
.app-lien {
  font-size: 12px;
  font-weight: 600;
  color: #0c38a1;
}
.app-titre {
  margin-top: 4px;
  font-size: 24px;
  line-height: 29px;
  letter-spacing: -0.48px;
  font-weight: 800;
  color: #0b0f58;
}

.app-compteurs {
  display: flex;
  gap: 6px;
  padding: 0 20px 10px;
}
.app-compteur {
  flex: 1;
  display: grid;
  justify-items: center;
  padding: 7px 0;
  border-radius: 12px;
  border: 1px solid;
}
.app-compteur b {
  font-size: 17px;
  line-height: 21px;
  font-weight: 600;
}
.app-compteur span {
  font-size: 10px;
  line-height: 14px;
  font-weight: 500;
}

.app-recherche {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 20px 10px;
  padding: 0 13px;
  height: 42px;
  background: #fff;
  border: 1px solid #e7e7ee;
  border-radius: 12px;
  color: #6d6f9b;
  font-size: 15px;
  font-weight: 500;
}

.app-liste {
  flex: 1;
  overflow: hidden;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.app-ligne {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e7e7ee;
  border-radius: 12px;
}
.app-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6e0d8;
  color: #0b0f58;
  font-size: 13px;
  font-weight: 700;
}
.app-nom {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 21px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-pastille {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.app-pied {
  flex: 0 0 auto;
  padding: 10px 20px 14px;
  border-top: 1px solid #e7e7ee;
}
.app-bouton {
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--degrade-cta);
  font-size: 16px;
  font-weight: 600;
  color: #040623;
}

.app-onglets {
  flex: 0 0 auto;
  height: 114px;
  padding: 8px 0 34px;
  display: flex;
  background: #fff;
}
.app-onglets div {
  flex: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  color: #6d6f9b;
  font-size: 12px;
  line-height: 14px;
  letter-spacing: -0.36px;
  font-weight: 500;
  text-align: center;
}
.app-onglets svg {
  color: #0b0f58;
}
.app-onglets .actif {
  color: #0b0f58;
}
.app-onglets::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 3px;
  background: #040623;
}

.s-present {
  background: var(--present-bg);
  border-color: var(--present-bd);
  color: var(--present-tx);
}
.s-absent {
  background: var(--absent-bg);
  border-color: var(--absent-bd);
  color: var(--absent-tx);
}
.s-retard {
  background: var(--retard-bg);
  border-color: var(--retard-bd);
  color: var(--retard-tx);
}
.s-excuse {
  background: var(--excuse-bg);
  border-color: var(--excuse-bd);
  color: var(--excuse-tx);
}

/* ── Bénéfices ───────────────────────────────────────── */
.benefits {
  margin-top: 64px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.soft-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
}
.soft-card .num {
  font-family: "Saira Condensed", sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent-coral);
}
.soft-card h2 {
  margin-top: 8px;
  font-size: 1.6rem;
  line-height: 1.05;
}
.soft-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Produit : trois étapes ──────────────────────────── */
.produit,
.audiences,
.confiance,
.final-cta {
  margin-top: 64px;
}
.etapes {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: etape;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.etapes li {
  position: relative;
  padding: 22px 22px 22px 70px;
  background: linear-gradient(180deg, #fff, #f8f6f2);
  border: 1px solid var(--line);
  border-radius: 22px;
  counter-increment: etape;
}
.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--core-blue);
  color: #fff;
  font-weight: 800;
}
.etapes h3 {
  font-size: 1.5rem;
  line-height: 1.05;
}
.etapes p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.statuts {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.statut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.85rem;
  font-weight: 800;
}
.statut svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Pour qui ────────────────────────────────────────── */
.audience-grid {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.audience-card {
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(180deg, #fff, #f8f6f2);
  border: 1px solid var(--line);
}
.audience-label {
  margin: 0;
  color: #c43f2b;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.75rem;
  font-weight: 800;
}
.audience-card h3 {
  margin-top: 4px;
  font-size: 1.8rem;
  line-height: 1.05;
}
.audience-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Confiance : bandeau navy ────────────────────────── */
.confiance {
  padding: 32px 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 0%, rgba(12, 56, 161, 0.9), transparent 55%), var(--core-blue);
  color: #fff;
}
.confiance .eyebrow {
  color: var(--accent-champagne);
}
.confiance h2 {
  color: #fff;
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: 0.95;
  max-width: 16ch;
}
.confiance > p {
  margin: 14px 0 0;
  max-width: 58ch;
  color: #d6d8ee;
  line-height: 1.55;
}
.garanties {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.garanties li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.45;
}
.garanties svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--accent-champagne);
}
.garanties strong {
  display: block;
}
.garanties span {
  color: #c8cbe6;
  font-size: 0.92rem;
}
.confiance .lien-clair {
  display: inline-block;
  margin-top: 20px;
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ── Téléchargement ──────────────────────────────────── */
.final-cta {
  padding: 32px 20px;
  border-radius: 28px;
  background: linear-gradient(160deg, #fff, #f2f0eb);
  border: 1px solid var(--line);
  text-align: center;
}
.final-cta .marque {
  width: min(64vw, 260px);
}
.final-cta h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 0.92;
}
.final-cta p {
  margin: 12px auto 0;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.55;
}
.badges {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.store-badge {
  min-width: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 18px;
  background: #14161f;
  color: #fff;
  text-align: left;
  transition: transform 180ms ease;
}
a.store-badge:hover {
  transform: translateY(-2px);
}
.store-badge svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}
.store-badge span {
  display: grid;
}
.store-badge small {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.store-badge strong {
  font-size: 1.02rem;
  line-height: 1.15;
}
.store-badge[aria-disabled="true"] {
  opacity: 0.72;
  cursor: default;
}
.final-cta .gratuit {
  margin-top: 14px;
  font-size: 0.88rem;
}

/* ── Pied de page ────────────────────────────────────── */
.site-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}
.site-footer a {
  color: var(--core-blue-soft);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.site-footer p {
  margin: 0;
}

/*
 * ── Formats d'écran ──────────────────────────────────
 * Téléphone portrait (< 600) : une colonne, le téléphone sous le message.
 * Téléphone paysage et tablette portrait (600–1023) : deux colonnes, téléphone réduit.
 * Tablette paysage et ordinateur (≥ 1024) : deux colonnes, téléphone à pleine taille.
 * Les grilles de cartes, elles, se replient seules (auto-fit) selon la place disponible.
 */
@media (max-width: 380px) {
  .phone {
    --k: 0.64;
  }
  .store-badge {
    width: 100%;
  }
}
@media (min-width: 600px) {
  .page-shell {
    padding-top: 26px;
    padding-bottom: 72px;
  }
  .topbar nav {
    display: flex;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
  }
  .phone {
    --k: 0.6;
  }
  .confiance,
  .final-cta {
    padding: 40px 32px;
  }
  .garanties {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .page-shell {
    padding: 30px 34px 84px;
  }
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
  }
  .phone {
    --k: 0.72;
  }
  .confiance,
  .final-cta {
    padding: 48px;
  }
}
/* Paysage peu haut (téléphone couché) : le téléphone ne doit pas écraser le message. */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    margin-top: 20px;
  }
  .hero h1 {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
  }
  .phone {
    --k: 0.52;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-secondary,
  .store-badge {
    transition: none;
  }
}
