/* Rémanence : pierre bleue et brume, avec le radar comme seul écran sombre. */

:root {
  --mist: #e6ebef;
  --paper: #f8fafb;
  --stone: #22313c;
  --slate: #5d6c77;
  --line: #cbd4da;
  --glow: #5a4fcf;
  --glow-soft: rgba(90, 79, 207, 0.1);
  --gilt: #b07a1f;
  --radar: #020a04;
  --radar-green: #39ff6a;
  --error: #8c1d18;
  --error-wash: #fbeaea;

  --serif: "Spectral", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px;
}

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--stone);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--glow);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--stone);
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.4rem;
}

p {
  margin: 0 0 1em;
  max-width: 38em;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.lead {
  font-size: clamp(1.2rem, 2.4vw, 1.4rem);
  color: var(--slate);
}

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--slate);
  margin-bottom: 1.2rem;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--paper);
  padding: 0.6rem 1rem;
}

/* ------------------------------------------------------------- en-tête */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(230, 235, 239, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--stone);
  text-decoration: none;
}

.brand svg {
  width: 30px;
  height: 30px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  color: var(--stone);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
}

.nav a:hover {
  background: var(--glow-soft);
}

.nav a[aria-current="page"] {
  color: var(--glow);
  font-weight: 600;
}

.nav .button {
  margin-left: 0.5rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  color: var(--stone);
  cursor: pointer;
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--mist);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0.5rem;
    border-radius: 8px;
  }

  .nav .button {
    margin: 0.5rem 0 0;
    text-align: center;
  }
}

/* ------------------------------------------------------------- boutons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 2px solid var(--stone);
  background: var(--stone);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.button:hover {
  background: #31444f;
  color: var(--paper);
}

.button:active {
  transform: translateY(1px);
}

.button.ghost {
  background: transparent;
  color: var(--stone);
}

.button.ghost:hover {
  background: var(--paper);
}

.button.light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--stone);
}

.nav .button {
  padding: 0.7rem 1.1rem;
  font-size: 0.98rem;
  color: var(--paper);
}

.nav .button:hover {
  background: #31444f;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ------------------------------------------------------------- accueil */

.hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3rem, 8vw, 7rem);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.hero h1 {
  margin-bottom: 0.15em;
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero .phone {
    width: min(230px, 64vw);
  }
}

/* Le téléphone et son radar : l'élément marquant du site */

.device-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.device-stage .rings {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0;
  height: 0;
}

.device-stage .rings span {
  position: absolute;
  left: 0;
  top: 0;
  border: 1.5px solid var(--glow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ring 7s linear infinite;
  opacity: 0;
}

.device-stage .rings span:nth-child(2) {
  animation-delay: -1.75s;
}

.device-stage .rings span:nth-child(3) {
  animation-delay: -3.5s;
}

.device-stage .rings span:nth-child(4) {
  animation-delay: -5.25s;
}

@keyframes ring {
  0% {
    width: 220px;
    height: 220px;
    opacity: 0.35;
  }
  100% {
    width: 760px;
    height: 760px;
    opacity: 0;
  }
}

.phone {
  position: relative;
  width: min(280px, 72vw);
  aspect-ratio: 9 / 19;
  background: var(--stone);
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 30px 60px -25px rgba(34, 49, 60, 0.55);
}

.phone::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  width: 70px;
  height: 18px;
  margin-left: -35px;
  background: var(--stone);
  border-radius: 999px;
  z-index: 2;
}

.screen {
  height: 100%;
  background: var(--radar);
  border-radius: 33px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 3rem 1rem 1.5rem;
  color: var(--radar-green);
  font-family: var(--mono);
  text-align: center;
}

.screen .label {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  opacity: 0.75;
}

.screen .readout {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  border: 1px solid rgba(57, 255, 106, 0.4);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  line-height: 1.6;
}

.radar {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #06260f, var(--radar) 70%);
  border: 1.5px solid rgba(57, 255, 106, 0.6);
  overflow: hidden;
}

.radar .grid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 24%, rgba(57, 255, 106, 0.22) 24.5%, transparent 25.2%),
    radial-gradient(circle, transparent 49%, rgba(57, 255, 106, 0.22) 49.5%, transparent 50.2%),
    radial-gradient(circle, transparent 74%, rgba(57, 255, 106, 0.22) 74.5%, transparent 75.2%),
    linear-gradient(transparent calc(50% - 0.5px), rgba(57, 255, 106, 0.22) calc(50% - 0.5px), rgba(57, 255, 106, 0.22) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(57, 255, 106, 0.22) calc(50% - 0.5px), rgba(57, 255, 106, 0.22) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

.radar .sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 288deg, rgba(57, 255, 106, 0.45) 360deg);
  animation: sweep 4s linear infinite;
}

.radar .sweep::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 50%;
  margin-left: -1px;
  background: var(--radar-green);
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

.radar .blip {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--radar-green);
  box-shadow: 0 0 12px 3px rgba(57, 255, 106, 0.6);
  animation: blip 4s linear infinite;
  opacity: 0.12;
}

.radar .blip.rare {
  background: #ffc23d;
  box-shadow: 0 0 12px 3px rgba(255, 194, 61, 0.6);
}

.radar .me {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--radar-green);
}

@keyframes blip {
  0% {
    opacity: 1;
    transform: scale(1.35);
  }
  60%,
  100% {
    opacity: 0.12;
    transform: scale(1);
  }
}

/* ------------------------------------------------------------- sections */

section {
  padding: clamp(3.5rem, 9vw, 7rem) 0;
}

.section-intro {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.paper-band {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

/* Les trois temps d'une partie : une vraie séquence */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps figure {
  margin: 0 0 1.25rem;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--mist);
}

.steps figure svg {
  width: 100%;
  height: 100%;
}

.steps h3::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--stone);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  vertical-align: 0.15em;
}

.steps p {
  color: var(--slate);
  font-size: 1.05rem;
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
    max-width: 30rem;
  }
}

/* Une fiche d'écho, comme dans la collection */

.echo-showcase {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

@media (max-width: 860px) {
  .echo-showcase {
    grid-template-columns: 1fr;
  }
}

.echo-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 24px 50px -30px rgba(34, 49, 60, 0.35);
}

.echo-card .kind {
  color: var(--gilt);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 0.3rem;
}

.echo-card h3 {
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  margin-bottom: 0.35rem;
}

.echo-card .where {
  color: var(--slate);
  font-size: 0.98rem;
  margin-bottom: 1.4rem;
}

.echo-card blockquote {
  margin: 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--gilt);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.55;
}

/* Arguments */

.reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.reasons p {
  color: var(--slate);
  font-size: 1.05rem;
}

@media (max-width: 860px) {
  .reasons {
    grid-template-columns: 1fr;
  }
}

/* Bandeau final */

.call {
  background: var(--stone);
  color: var(--paper);
  text-align: center;
}

.call h2 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
}

.call p {
  margin-inline: auto;
  color: #c3ced6;
}

.call .actions {
  justify-content: center;
}

/* ------------------------------------------------------------- pages intérieures */

.page-head {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}

.page-head h1 {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
}

.page-body {
  padding-top: 0;
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  margin-top: 2.5em;
  scroll-margin-top: 6rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.8em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: 0.45em;
}

.guide-layout {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.toc {
  position: sticky;
  top: 6rem;
  font-size: 1rem;
}

.toc p {
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.toc a {
  display: block;
  padding: 0.35rem 0 0.35rem 1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--slate);
  text-decoration: none;
}

.toc a:hover {
  color: var(--stone);
  border-left-color: var(--glow);
}

@media (max-width: 860px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }
}

.tip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--glow);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 1.02rem;
}

.tip.caution {
  border-left-color: var(--gilt);
}

.tip p:last-child {
  margin-bottom: 0;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--glow);
}

details[open] summary::after {
  content: "−";
}

details > p {
  margin: 0.75rem 0 0;
  color: var(--slate);
}

/* ------------------------------------------------------------- téléchargement */

.download {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

@media (max-width: 860px) {
  .download {
    grid-template-columns: 1fr;
  }
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.5rem 0.95rem 1.2rem;
  border-radius: 14px;
  background: var(--stone);
  color: var(--paper);
  text-decoration: none;
  line-height: 1.2;
}

.store-button:hover {
  background: #31444f;
  color: var(--paper);
}

.store-button small {
  display: block;
  font-size: 0.85rem;
  opacity: 0.8;
}

.store-button strong {
  font-size: 1.25rem;
  font-weight: 600;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2rem);
}

.panel h2 {
  font-size: 1.6rem;
}

.permissions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.permissions li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.permissions li:last-child {
  border-bottom: 0;
}

.permissions strong {
  display: block;
}

.permissions span {
  color: var(--slate);
  font-size: 1rem;
}

/* ------------------------------------------------------------- contact */

.contact {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

@media (max-width: 860px) {
  .contact {
    grid-template-columns: 1fr;
  }
}

form {
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-weight: 600;
  font-size: 1rem;
}

.field .hint {
  font-size: 0.92rem;
  color: var(--slate);
}

input,
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--stone);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

textarea {
  min-height: 11rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--glow);
  box-shadow: 0 0 0 3px var(--glow-soft);
}

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 1rem;
  color: var(--slate);
}

.check input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  flex: none;
  accent-color: var(--glow);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 1.02rem;
}

.form-status:empty {
  display: none;
}

.form-status.success {
  background: var(--glow-soft);
}

.form-status.error {
  background: var(--error-wash);
  color: var(--error);
}

/* ------------------------------------------------------------- pied de page */

.site-footer {
  padding: 3rem 0 2.5rem;
  font-size: 1rem;
  color: var(--slate);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: var(--slate);
}

.site-footer a:hover {
  color: var(--stone);
}

.site-footer .brand {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

/* ------------------------------------------------------------- mouvement réduit */

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

  .device-stage .rings span,
  .radar .sweep,
  .radar .blip {
    animation: none;
  }

  .radar .sweep {
    transform: rotate(130deg);
  }

  .radar .blip {
    opacity: 0.9;
  }
}
