/* Actenote – Interventions : site de présentation.
   Couleurs et rayons repris du thème « Moderne » de l’application (frontend/src/assets/styles/tokens.css). */

@font-face {
  font-family: Geist;
  src: url('/assets/geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #e6e8ec;
  --line-strong: #c3c8d0;
  --ink: #0f1115;
  --text-2: #3d424d;
  --muted: #5d636e;
  --hover: #f0f2f5;
  --primary: #025285;
  --primary-hover: #033f6d;
  --primary-soft: #e4eff7;
  --on-primary: #ffffff;
  --accent: #03857c;
  --hero-bg: #033f6d;
  --hero-fg: #ffffff;
  --hero-fg-2: #d6e7f3;
  --hero-accent-bg: #05bb9f;
  --hero-accent-fg: #01263f;
  --st-plan-bg: #e4eff7;
  --st-plan-fg: #033f6d;
  --st-draft-bg: #fdf2dc;
  --st-draft-fg: #7a4a00;
  --st-ok-bg: #e5f5ec;
  --st-ok-fg: #146c3c;
  --tint: #eaf2f8;
  --fade: #f6f7f9;
  --r-card: 14px;
  --r-btn: 10px;
  --wrap: 1120px;
  --gutter: 16px;
  --section: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1113;
    --surface: #181b1f;
    --surface-2: #1e2226;
    --line: #2a2f35;
    --line-strong: #4a525b;
    --ink: #eef0f3;
    --text-2: #c6cbd1;
    --muted: #9aa1a9;
    --hover: #23282e;
    --primary: #6fb4e3;
    --primary-hover: #92c7ec;
    --primary-soft: #13304a;
    --on-primary: #04203a;
    --accent: #3fcfba;
    --hero-bg: #0d3352;
    --hero-fg: #e8f3fb;
    --hero-fg-2: #b9d4e8;
    --hero-accent-bg: #3fcfba;
    --st-plan-bg: #13304a;
    --st-plan-fg: #a9d3f0;
    --st-draft-bg: #3a2c12;
    --st-draft-fg: #f2cf8a;
    --st-ok-bg: #16332a;
    --st-ok-fg: #9edbb8;
    --tint: #142231;
    --fade: #f6f7f9;
    color-scheme: dark;
  }
}

@media (min-width: 720px) {
  :root {
    --gutter: 24px;
    --section: 104px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-wrap: anywhere;
  font:
    400 1rem/1.6 Geist,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 640;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

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

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 30;
  padding: 10px 14px;
  border-radius: var(--r-btn);
  background: var(--ink);
  color: var(--bg);
}

.skip-link:focus {
  top: 12px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Boutons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.button.primary {
  background: var(--primary);
  color: var(--on-primary);
}

.button.primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button.secondary:hover {
  background: var(--hover);
  color: var(--ink);
}

.button.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.94rem;
}

.button.light {
  background: #ffffff;
  color: #033f6d;
}

.button.light:hover {
  background: #e4eff7;
  color: #033f6d;
}

.button.outline-light {
  border-color: rgb(255 255 255 / 55%);
  color: var(--hero-fg);
}

.button.outline-light:hover {
  border-color: var(--hero-fg);
  background: rgb(255 255 255 / 8%);
  color: var(--hero-fg);
}

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

/* En-tête */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 680;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  padding-bottom: 8px;
}

.site-nav a:not(.button) {
  color: var(--text-2);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:not(.button):hover,
.site-nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline;
}

.menu-button {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.menu-lines {
  position: relative;
}

.menu-lines::before,
.menu-lines::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-lines::before {
  top: -5px;
}

.menu-lines::after {
  top: 5px;
}

.menu-button[aria-expanded='true'] .menu-lines {
  background: transparent;
}

.menu-button[aria-expanded='true'] .menu-lines::before {
  transform: translateY(5px) rotate(45deg);
}

.menu-button[aria-expanded='true'] .menu-lines::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* Menu replié sous 1 024 px, seulement si le script est actif */
@media (max-width: 1023px) {
  .js .menu-button {
    display: inline-flex;
  }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 12px 24px -16px rgb(16 17 21 / 30%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0s linear 0.18s;
  }

  .js .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 0.18s ease,
      transform 0.18s ease;
  }

  .js .site-nav a:not(.button) {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }

  .js .site-nav .button {
    margin-top: 16px;
  }
}

@media (min-width: 1024px) {
  .header-bar {
    flex-wrap: nowrap;
  }

  .site-nav {
    gap: 18px;
    padding-bottom: 0;
  }
}

/* Accroche */
.hero {
  padding-block: 40px 56px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.product-name {
  color: var(--primary);
  font-weight: 600;
}

.hero h1 {
  max-width: 14em;
  margin-top: 12px;
  font-size: clamp(2rem, 1.35rem + 3vw, 3.3rem);
  font-weight: 660;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 34em;
  margin-top: 20px;
  color: var(--text-2);
  font-size: 1.1rem;
}

.hero .actions {
  margin-top: 28px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.hero-screen {
  justify-self: center;
  width: min(100%, 270px);
}

.device {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--fade);
  box-shadow: 0 1px 2px rgb(16 17 21 / 5%);
}

.hero-screen .device {
  max-height: 360px;
}

.device::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 72px;
  background: linear-gradient(rgb(246 247 249 / 0%), var(--fade));
  pointer-events: none;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-screen figcaption {
  text-align: center;
}

@media (min-width: 900px) {
  .hero {
    padding-block: 64px 72px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    align-items: center;
    gap: 64px;
  }

  .hero-screen {
    justify-self: end;
    width: 300px;
  }

  .hero-screen .device {
    max-height: 520px;
  }
}

/* Sections */
.section {
  padding-block: var(--section);
}

.section-intro {
  max-width: 40rem;
}

.section-intro h2 {
  font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.4rem);
}

.section-intro p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.06rem;
}

/* Démonstration : récit et chapitres alignés sur le contenu à gauche, vraie vidéo dans le téléphone à droite. */
.video-demo {
  display: grid;
  gap: 24px;
}
.video-demo-story {
  min-width: 0;
}
.video-demo .section-intro {
  margin-bottom: 20px;
}
.video-demo-chapters {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.video-demo-chapters button {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  width: 100%;
  padding: 12px 14px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.video-demo-chapters button:hover {
  border-color: var(--line-strong);
}
.video-demo-chapters button[aria-current='step'] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--ink);
}
.video-demo-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}
[aria-current='step'] .video-demo-number,
.is-done .video-demo-number {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}
.video-demo-text {
  display: grid;
  gap: 2px;
}
.video-demo-text strong {
  color: var(--ink);
  font-size: 1.05rem;
}
.video-demo-text span {
  font-size: 0.94rem;
  line-height: 1.45;
}
.video-demo-progress {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--line);
}
.video-demo-progress span {
  display: block;
  height: 100%;
  background: var(--primary);
  transform: scaleX(var(--video-demo-progress, 0));
  transform-origin: left;
}
.video-demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 16px;
}
.video-demo-motion {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.video-demo-phone {
  /* 0,462 : rapport largeur/hauteur de la vidéo ; le téléphone tient sous l’en-tête de la page. */
  width: min(300px, 78vw, calc((100svh - 200px) * 0.462));
  min-width: 220px;
  overflow: hidden;
  border: 10px solid #15181c;
  border-radius: 40px;
  background: #15181c;
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 18px 40px rgb(0 0 0 / 18%);
}
.video-demo-phone video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 30px;
  background: #f6f7f9;
}
.video-demo button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.video-demo [hidden] {
  display: none;
}
/* Sur téléphone : titre, vidéo, puis chapitres réduits à leur titre. */
/* Une colonne : titre, vidéo centrée, puis chapitres et commandes sur toute la largeur du contenu. */
@media (max-width: 899px) {
  .video-demo {
    gap: 16px;
  }
  .video-demo-story {
    display: contents;
  }
  .video-demo .section-intro {
    margin-bottom: 0;
  }
  .video-demo-phone {
    order: 1;
    justify-self: center;
  }
  .video-demo-chapters,
  .video-demo-controls,
  .video-demo-note {
    order: 2;
  }
  .video-demo-controls {
    margin-top: 0;
  }
}
/* Sur téléphone, les chapitres sont réduits à leur titre. */
@media (max-width: 719px) {
  .video-demo-phone {
    width: min(300px, 78vw, calc((100svh - 130px) * 0.462));
  }
  .video-demo-text span {
    display: none;
  }
  .video-demo-chapters button {
    padding: 10px 12px 13px;
  }
}
/* Téléphone à gauche : l’accueil et la première fonctionnalité ont leur image à droite. */
@media (min-width: 900px) {
  .video-demo {
    grid-template-columns: auto minmax(0, 560px);
    justify-content: space-between;
    align-items: center;
    gap: 56px;
  }
  .video-demo-phone {
    order: -1;
  }
}

.video-demo-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Questions fréquentes : accordéons natifs, utilisables sans JavaScript */
.faq-layout {
  display: grid;
  gap: 32px;
}

.faq-list {
  min-width: 0;
  border-top: 1px solid var(--line-strong);
}

.faq-list details {
  border-bottom: 1px solid var(--line-strong);
}

.faq-list summary {
  position: relative;
  padding: 20px 32px 20px 0;
  font-weight: 600;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '';
  position: absolute;
  top: 26px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--primary);
  border-bottom: 1.5px solid var(--primary);
  transform: rotate(45deg);
}

.faq-list details[open] summary::after {
  top: 32px;
  transform: rotate(225deg);
}

.faq-list details > div {
  padding-bottom: 24px;
  color: var(--text-2);
}

.faq-list p + p {
  margin-top: 12px;
}

/* Fonctionnalités */
.features {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.feature {
  display: grid;
  gap: 28px;
  margin-top: 56px;
}

.feature + .feature {
  margin-top: 72px;
}

.feature-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 0.94rem;
  font-weight: 600;
}

.feature h3 {
  margin-top: 12px;
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.8rem);
}

.feature-copy > p:not(.feature-kicker) {
  max-width: 34em;
  margin-top: 14px;
  color: var(--text-2);
}

.ticks {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}

.ticks li {
  display: flex;
  gap: 10px;
  color: var(--text-2);
}

.ticks .icon {
  margin-top: 2px;
  color: var(--accent);
}

.feature-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  border-radius: 20px;
  background: var(--tint);
}

.feature-media .device {
  width: min(100%, 280px);
}

.device.cropped {
  max-height: 440px;
}

.feature-media.pair {
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
}

.feature-media.pair .device {
  width: calc(50% - 7px);
  max-width: 240px;
  max-height: 400px;
}

@media (max-width: 479px) {
  .feature-media.pair .device + .device {
    display: none;
  }

  .feature-media.pair .device {
    width: min(100%, 280px);
  }
}

.panel {
  width: min(100%, 340px);
}

.panel img {
  border-radius: 14px;
  box-shadow: 0 1px 2px rgb(16 17 21 / 6%);
}

.document {
  position: relative;
  width: 100%;
  max-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.document::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 96px;
  background: linear-gradient(rgb(255 255 255 / 0%), #ffffff);
}

.feature-media figcaption {
  align-self: flex-start;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 72px;
    margin-top: 72px;
  }

  .feature + .feature {
    margin-top: 112px;
  }

  .feature.reverse .feature-copy {
    order: 2;
  }

  .feature-media {
    padding: 40px;
  }

  .document {
    max-height: 520px;
  }
}

.also {
  display: grid;
  gap: 24px;
  margin-top: 88px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.also > div {
  display: grid;
  grid-template: 'icon title' auto 'icon text' 1fr / auto minmax(0, 1fr);
  align-content: start;
  column-gap: 12px;
}

.also .icon {
  grid-area: icon;
  margin-top: 2px;
  color: var(--primary);
}

.also dt {
  grid-area: title;
}

.also dd {
  grid-area: text;
}

.also dt {
  font-weight: 600;
}

.also dd {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 640px) {
  .also {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 32px;
  }
}

@media (min-width: 1024px) {
  .also {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Appel final : reprend la carte « Prochaine intervention » de l’application */
.closing-card {
  padding: 32px 24px;
  border-radius: 20px;
  background: var(--hero-bg);
  color: var(--hero-fg);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--hero-accent-bg);
  color: var(--hero-accent-fg);
  font-size: 0.86rem;
  font-weight: 650;
}

.closing-card h2 {
  margin-top: 18px;
  color: var(--hero-fg);
  font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.4rem);
}

.closing-card p {
  max-width: 34em;
  margin-top: 12px;
  color: var(--hero-fg-2);
  font-size: 1.06rem;
}

.closing-card .actions {
  margin-top: 28px;
}

@media (min-width: 720px) {
  .closing-card {
    padding: 56px;
  }
}

/* Pages d’information */
.page-head {
  max-width: 46rem;
  padding-block: 48px 8px;
}

.page-head h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem);
  letter-spacing: -0.03em;
}

.page-head .lead {
  max-width: none;
  margin-top: 14px;
}

.page-head .button {
  margin-top: 28px;
}

.prose {
  max-width: 46rem;
  padding-block: 8px var(--section);
}

.prose h2 {
  margin-top: 44px;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.prose p {
  margin-top: 12px;
  color: var(--text-2);
}

.prose :is(ol, ul) {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 1.4em;
  color: var(--text-2);
}

.prose :is(ol, ul) + .button {
  margin-top: 20px;
}

.prose .button {
  margin-top: 4px;
}

.prose .small {
  color: var(--muted);
  font-size: 0.9rem;
}

.facts {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.facts > div {
  display: grid;
  gap: 2px 24px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (min-width: 640px) {
  .facts > div {
    grid-template-columns: 14rem minmax(0, 1fr);
  }
}

.missing {
  color: var(--muted);
}

.updated {
  margin-top: 40px !important;
  color: var(--muted) !important;
  font-size: 0.9rem;
}

/* Pied de page */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: 40px 24px;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-grid p {
  max-width: 24rem;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-content: start;
}

.site-footer nav a {
  color: var(--text-2);
  text-decoration: none;
}

.site-footer nav a:hover,
.site-footer nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline;
}

.footer-note {
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-footer nav {
    justify-content: flex-end;
    max-width: 30rem;
  }
}

/* Apparition discrète, uniquement avec le script et sans préférence de mouvement réduit */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
