/* Patine'N'Rythme — site vitrine
   Palette reprise telle quelle de l'app (PNR/Views/Theme.swift) : magenta,
   cyan, et le noir chaud du logo. Rien d'autre. */

:root {
  --magenta: #ec008c;
  --cyan: #00b3d3;
  --ink: #100e14;
  --ink-soft: #17141d;
  --ink-card: #1d1926;
  --white: #f7f5fa;
  --grey: #9b96a6;
  --android: #3ddc84;
  --magenta-soft: rgba(236, 0, 140, 0.14);
  --cyan-soft: rgba(0, 179, 211, 0.14);
  --android-soft: rgba(61, 220, 132, 0.12);
  --max-width: 1080px;
  --radius: 20px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Safari iOS grossit le texte des colonnes etroites en paysage ; sur une
     mise en page deja responsive, ca ne fait que casser les proportions. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

a { color: inherit; }

/* Le focus clavier doit rester visible partout : la nav, les boutons de
   telechargement et les boutons Google sortent tous du style natif. */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--magenta);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

nav.top {
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 18px 24px;
  background: rgba(16, 14, 20, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 14px var(--magenta);
}

nav.top .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 0.92rem;
  color: var(--grey);
}

/* Cinq entrees de menu ne tiennent pas sur un telephone. Plutot que de les
   laisser s'empiler et doubler la hauteur d'une barre collante, elles glissent
   horizontalement — la barre garde une seule ligne. */
@media (max-width: 700px) {
  nav.top {
    padding: 12px 0 12px 18px;
    flex-wrap: nowrap;
    gap: 14px;
  }
  nav.top .links {
    flex-wrap: nowrap;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 18px 4px 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  nav.top .links::-webkit-scrollbar { display: none; }
  nav.top .links a { white-space: nowrap; }
  .brand { font-size: 0.98rem; }
}

nav.top .links a { text-decoration: none; transition: color 0.15s; }
nav.top .links a:hover { color: var(--white); }

/* ---------- Hero ---------- */

header.hero {
  padding: 96px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(circle at 30% 20%, var(--magenta-soft), transparent 55%),
    radial-gradient(circle at 75% 10%, var(--cyan-soft), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

header.hero .inner { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--magenta);
  background: var(--magenta-soft);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}

/* L'app est sortie : la pastille passe au vert « en ligne » plutot qu'au
   magenta « en preparation » d'avant. */
.eyebrow.live {
  color: var(--android);
  background: var(--android-soft);
}

.eyebrow .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--android);
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 22px;
}

h1 .accent, h2 .accent {
  background: linear-gradient(100deg, var(--magenta), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--grey);
  max-width: 640px;
  margin: 0 auto 40px;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:active { transform: scale(0.97); }

.btn.primary {
  background: var(--magenta);
  color: white;
  box-shadow: 0 10px 30px -8px rgba(236, 0, 140, 0.55);
}

.btn.primary:hover { box-shadow: 0 14px 34px -6px rgba(236, 0, 140, 0.7); }

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn.support {
  background: linear-gradient(100deg, var(--magenta), var(--cyan));
  color: white;
  box-shadow: 0 10px 30px -8px rgba(236, 0, 140, 0.45);
}

.btn.support:hover {
  box-shadow: 0 14px 34px -6px rgba(0, 179, 211, 0.55);
}

/* ---------- Boutons de telechargement ---------- */

/* Les deux boutons du hero font la meme hauteur : l'artwork Apple impose la
   sienne (62px), le bouton Google Play s'aligne dessus plutot que l'inverse — les
   regles d'Apple demandent que rien ne domine leur badge. */

.stores {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.badge-apple {
  display: block;
  line-height: 0;
  border-radius: 10px;
  transition: transform 0.15s;
}

.badge-apple img { height: 62px; width: auto; display: block; }
.badge-apple:hover { transform: translateY(-2px); }
.badge-apple:active { transform: scale(0.97); }

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 62px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: #000;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn-play:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.5); }
.btn-play:active { transform: scale(0.97); }
.btn-play svg { width: 26px; height: 26px; flex-shrink: 0; }
.btn-play .lines { text-align: left; line-height: 1.2; font-size: 1.25rem; }

.btn-play small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2px;
}

/* ---------- Ligne de reassurance ---------- */

.reassure {
  display: flex;
  gap: 8px 22px;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--grey);
  font-size: 0.84rem;
}

.reassure li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.reassure li::before { content: "✓"; color: var(--android); font-weight: 700; }

/* ---------- Captures de l'app ---------- */

/* Les captures viennent de la fiche App Store : chacune porte en haut un
   bandeau de titre qui n'a rien a faire dans un cadre de telephone. Le cadre
   est donc plus court que l'image, et l'image remonte de la hauteur du
   bandeau (238 px sur 1948, soit 14,34 % de la hauteur du cadre). */

/* L'eventail est le meme partout — il retrecit, il ne se reorganise pas.
   `--shot-w` porte la largeur d'une carte : 210 px sur grand ecran, puis une
   fraction de la largeur de fenetre en dessous. Tout le reste en decoule. */
.fan {
  --shot-w: clamp(96px, 30vw, 210px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: 60px;
}

.shot {
  position: relative;
  overflow: hidden;
  width: var(--shot-w, 210px);
  flex: none;
  aspect-ratio: 900 / 1660;
  border-radius: clamp(13px, 3.4vw, 28px);
  background: #0b0910;
  border: clamp(2px, 0.55vw, 4px) solid #2b2735;
  box-shadow: 0 30px 64px -28px rgba(0, 0, 0, 0.9);
}

.shot img {
  position: absolute;
  left: 0;
  top: -14.34%;
  width: 100%;
  height: auto;
  display: block;
}

/* Les decalages sont en pourcentage de la carte elle-meme — un `translate`
   en % se resout sur la taille de l'element, pas sur son parent. L'eventail
   garde donc exactement la meme figure a 390 px qu'a 1280 px, sans un seul
   point de rupture a maintenir. */
.fan .shot:nth-child(1) { transform: rotate(-7deg) translate(22%, 4.6%) scale(0.9); z-index: 1; }
.fan .shot:nth-child(2) { z-index: 3; }
.fan .shot:nth-child(3) { transform: rotate(7deg) translate(-22%, 4.6%) scale(0.9); z-index: 2; }

/* ---------- Sections ---------- */

section {
  padding: 100px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

section .kicker {
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

section h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  max-width: 640px;
}

section > .wrap > p.section-lede {
  color: var(--grey);
  max-width: 560px;
  font-size: 1.05rem;
  margin-bottom: 56px;
}

/* Huit fonctionnalites : quatre colonnes les rangent en deux lignes pleines,
   la ou trois en laisseraient une a moitie vide. */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(224px, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--ink-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 28px;
}

/* L'apparition au defilement ne s'arme que si le script tourne : sinon les
   cartes resteraient invisibles pour toujours, et c'est desormais la
   presentation de l'app qui y est ecrite. */
.js .feature-card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .feature-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.feature-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.feature-card .icon.magenta { background: var(--magenta-soft); }
.feature-card .icon.cyan { background: var(--cyan-soft); }

.feature-card h3 {
  font-size: 1.08rem;
  margin: 0 0 8px;
  font-weight: 800;
}

.feature-card p {
  color: var(--grey);
  font-size: 0.92rem;
  margin: 0;
}

/* La confidentialite n'est pas une fonctionnalite de plus : elle ferme la
   liste au lieu d'y prendre une case. */
.privacy-strip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 22px 0 0;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--grey);
  font-size: 0.9rem;
}

.privacy-strip strong { color: var(--white); }
.privacy-strip .lock { font-size: 1.1rem; line-height: 1.4; }
.privacy-strip a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }

section#app { scroll-margin-top: 76px; }

/* ---------- Telephones ---------- */

@media (max-width: 560px) {
  header.hero { padding: 54px 20px 56px; }
  section { padding: 64px 20px; }
  .wrap { padding: 0 20px; }
  footer { padding: 44px 20px 32px; }

  /* Deux boutons cote a cote ne tiennent plus : ils passent l'un sous l'autre,
     centres, chacun a la largeur de son contenu — etirer le bouton Google Play le
     ferait paraitre plus important que le badge Apple, ce que les regles
     d'Apple interdisent. */
  .stores { flex-direction: column; align-items: center; gap: 12px; }
  .btn-play { justify-content: center; }
  .reassure { font-size: 0.8rem; gap: 6px 16px; }
  .fan { margin-top: 40px; }
  .privacy-strip { flex-direction: column; gap: 10px; padding: 18px; }
  .feature-card { padding: 22px; }
}

/* ---------- Demo strip (scroll reveal) ---------- */

.demo-strip {
  display: flex;
  flex-direction: column;
  gap: 90px;
}

.demo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.demo-row.in-view { opacity: 1; transform: translateY(0); }

.demo-row:nth-child(even) { direction: rtl; }
.demo-row:nth-child(even) > * { direction: ltr; }

.demo-text .kicker { margin-bottom: 10px; }
.demo-text h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.demo-text p { color: var(--grey); font-size: 1rem; }

.demo-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--ink-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--grey);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.demo-visual .glyph { font-size: 2.6rem; }

.demo-visual .tag {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 10px;
  border-radius: 999px;
}

@media (max-width: 760px) {
  .demo-row, .demo-row:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

/* ---------- Cities strip ---------- */

.cities {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.city-chip {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.city-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.city-chip .dot.magenta { background: var(--magenta); }
.city-chip .dot.cyan { background: var(--cyan); }

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  background: linear-gradient(135deg, var(--ink-card), var(--ink-soft));
  border-radius: 28px;
  padding: 72px 32px;
  margin: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cta-band h2 { margin: 0 auto 16px; }
.cta-band p { color: var(--grey); max-width: 480px; margin: 0 auto 32px; }

/* ---------- Footer ---------- */

footer {
  padding: 56px 24px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

footer .footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

footer .col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin: 0 0 14px;
}

footer .col a {
  display: block;
  text-decoration: none;
  color: var(--white);
  font-size: 0.92rem;
  margin-bottom: 10px;
  opacity: 0.85;
}
footer .col a:hover { opacity: 1; color: var(--magenta); }

footer .bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--grey);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Legal pages ---------- */

.legal-doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 100px;
}

.legal-doc h1 {
  font-size: 1.9rem;
  margin-bottom: 6px;
}

.legal-doc .updated {
  color: var(--grey);
  font-size: 0.88rem;
  margin-bottom: 40px;
}

.legal-doc h2 {
  font-size: 1.2rem;
  margin: 40px 0 12px;
  color: var(--white);
}

.legal-doc h3 {
  font-size: 1rem;
  margin: 24px 0 8px;
  color: var(--cyan);
}

.legal-doc p, .legal-doc li { color: #d6d2de; font-size: 0.98rem; }

.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.88rem;
}

.legal-doc th, .legal-doc td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-doc th { color: var(--grey); font-weight: 600; }

.legal-doc .lang-switch {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 0.85rem;
}
.legal-doc .lang-switch a {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: var(--grey);
}
.legal-doc .lang-switch a.active {
  color: white;
  border-color: var(--magenta);
  background: var(--magenta-soft);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--grey);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 24px;
}
.back-link:hover { color: var(--white); }

/* ---------- Instagram ---------- */

/* Revele au defilement, comme .feature-card et .demo-row. */
.js .insta {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .insta.in-view { opacity: 1; transform: translateY(0); }

.insta > .wrap { text-align: center; }

.insta h2 { max-width: 640px; margin-inline: auto; }

.insta > .wrap > p.section-lede {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

.insta-embed {
  max-width: var(--max-width);
  margin: 0 auto 36px;
}

/* Ecran de consentement affiche tant que les scripts Meta ne sont pas charges. */
.insta-consent {
  max-width: 540px;
  margin: 0 auto;
  background: var(--ink-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 40px 28px;
}

.insta-consent p {
  color: var(--grey);
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto 22px;
}

.insta-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
  align-items: start;
}

/* Instagram impose ses propres marges au blockquote : on les neutralise. */
.insta-posts .instagram-media {
  margin: 0 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Repli quand Meta refuse d'afficher l'embed (visiteur deconnecte). */
.insta-fallback {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 9 / 16;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(160deg, var(--magenta-soft), var(--cyan-soft)),
    var(--ink-card);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
  line-height: 1.35;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.insta-fallback:hover {
  transform: translateY(-4px);
  border-color: var(--magenta);
}
