/* Design system « Atelier chaleureux » de l'application : l'encre et le vert-jaune du logo, un papier crème, des formes douces. */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/fonts/atkinson-hyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/fonts/atkinson-hyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --encre: #1e2622;
  --encre-douce: #3b443e;
  --papier: #f7f4ec;
  --surface: #fff;
  --trait: #ded8ca;
  --trait-fort: #8c8778;
  --creux: #efeadf;
  --marque: #23624a;
  --marque-survol: #1b4f3b;
  --marque-pale: #e6f0ea;
  --accent: #c9e265;
  --accent-pale: #f1f8d6;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --titre: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --ombre: 0 10px 30px rgb(30 38 34 / 0.1);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
}

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

a {
  color: var(--marque);
}

:focus-visible {
  outline: 3px solid var(--encre);
  outline-offset: 3px;
}

.download :focus-visible,
.band :focus-visible {
  outline-color: var(--accent);
}

.wrap {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--encre);
  color: #fff;
  border-radius: 8px;
}

.skip:focus {
  top: 1rem;
}

h1,
h2,
h3 {
  font-family: var(--titre);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0;
}

/* Barre du haut */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--trait);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--encre);
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
}

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

.topbar nav a:not(.button) {
  color: var(--encre-douce);
  text-decoration: none;
}

.topbar nav a:not(.button):hover {
  text-decoration: underline;
}

/* Boutons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  line-height: 1.25;
  text-align: center;
  padding: 0.7rem 1.3rem;
  border-radius: 12px;
  background: var(--marque);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(30 38 34 / 0.2);
  transition: background 150ms ease;
}

.button:hover {
  background: var(--marque-survol);
}

.button-small {
  padding: 0.5rem 1rem;
}

.button-large {
  padding: 0.95rem 1.7rem;
  font-size: 1.15rem;
}

.button-accent {
  background: var(--accent);
  color: var(--encre);
}

.button-accent:hover {
  background: #d6ec82;
}

/* Accueil */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid #d3e594;
  border-radius: 999px;
  background: var(--accent-pale);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero h1 {
  margin-top: 1.1rem;
}

.lead {
  margin-top: 1.2rem;
  max-width: 40rem;
  font-size: 1.15rem;
  color: var(--encre-douce);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.2rem;
  margin-top: 1.8rem;
}

.note {
  font-size: 0.95rem;
  color: var(--encre-douce);
}

.promises {
  display: grid;
  gap: 0.8rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.promises li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.dot {
  color: var(--marque);
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--marque-pale);
  font-size: 1rem;
}

/* Illustration animée (voir hero-illustration.css) : suit la largeur de sa colonne, sans jamais déborder. */
.hero-art {
  justify-self: center;
  width: min(460px, 100%);
  margin: 1rem auto 1.5rem;
}

/* Sections */
.section {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.section-lead {
  margin-top: 0.6rem;
  color: var(--encre-douce);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.steps figure {
  margin: 0 0 1rem;
}

.steps img {
  display: block;
  width: 100%;
  border: 1px solid var(--trait);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(30 38 34 / 0.06);
}

.steps p {
  margin-top: 0.5rem;
  color: var(--encre-douce);
}

.num {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--encre);
  color: var(--accent);
  font-size: 1rem;
}

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

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 3rem;
}

.two p {
  margin-top: 1rem;
  color: var(--encre-douce);
  font-size: 1.1rem;
}

.checks {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 2.2rem;
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--marque);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.card {
  padding: 1.6rem;
  border: 1px solid var(--trait);
  border-radius: 16px;
  background: var(--surface);
}

.card ul {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
}

/* Téléchargement */
.download {
  background: var(--encre);
  color: #fff;
}

.download-inner {
  text-align: center;
}

.download .lead {
  margin-inline: auto;
  color: #dcdfdb;
}

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

.meta {
  margin: 1.2rem auto 0;
  max-width: 42rem;
  color: #dcdfdb;
}

.smartscreen {
  max-width: 42rem;
  margin: 1.4rem auto 0;
  text-align: left;
}

.smartscreen summary {
  cursor: pointer;
  font-weight: 700;
  text-align: center;
}

.smartscreen p {
  margin-top: 0.7rem;
  color: #dcdfdb;
}

.download a {
  color: var(--accent);
}

.download .button-accent {
  color: var(--encre);
}

/* Pied de page */
.footer {
  padding-block: 2rem;
  font-size: 0.95rem;
  color: var(--encre-douce);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
}

@media (max-width: 880px) {
  .hero,
  .two {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .topbar nav a:not(.button) {
    display: none;
  }
}

/* Animations légères : seulement transform et opacité (rendues par la carte graphique), jamais de mise en page.
   Désactivées pour les personnes qui ont demandé moins de mouvement. */
@media (max-width: 480px) {
  .wrap {
    width: min(1120px, 100% - 2rem);
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .actions .note {
    text-align: center;
  }

  .button-large {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
  }

  .topbar-inner {
    gap: 0.6rem;
  }

  .brand {
    font-size: 1.15rem;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .button-small {
    padding: 0.45rem 0.8rem;
    font-size: 0.95rem;
  }

  .promises li {
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 1.9rem;
  }

  .button-large {
    font-size: 1rem;
    gap: 0.45rem;
  }

  .button-large svg {
    width: 18px;
    height: 18px;
  }

  .badge {
    border-radius: 16px;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
  }

  /* Entrée de l'accueil */
  .hero-text > * {
    animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-text > :nth-child(2) {
    animation-delay: 80ms;
  }

  .hero-text > :nth-child(3) {
    animation-delay: 160ms;
  }

  .hero-text > :nth-child(4) {
    animation-delay: 240ms;
  }

  .hero-text > :nth-child(5) {
    animation-delay: 320ms;
  }

  /* Apparition au défilement (voir reveal.js : sans JavaScript, tout reste visible) */
  .reveal-hidden {
    opacity: 0;
    transform: translateY(20px);
  }

  .reveal-visible {
    opacity: 1;
    transform: none;
    transition:
      opacity 600ms cubic-bezier(0.2, 0.7, 0.2, 1),
      transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
  }

  /* Survols */
  .button {
    transition:
      background 150ms ease,
      transform 150ms ease,
      box-shadow 150ms ease;
  }

  .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgb(30 38 34 / 0.22);
  }

  .button:active {
    transform: translateY(0);
  }

  .button svg {
    transition: transform 200ms ease;
  }

  .button:hover svg {
    transform: translateY(3px);
  }

  .steps img {
    transition:
      transform 250ms cubic-bezier(0.2, 0.7, 0.2, 1),
      box-shadow 250ms ease;
  }

  .steps li:hover img {
    transform: translateY(-5px);
    box-shadow: var(--ombre);
  }

  .chips li {
    transition:
      transform 150ms ease,
      border-color 150ms ease;
  }

  .chips li:hover {
    transform: translateY(-2px);
    border-color: var(--marque);
  }
}

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

  .button {
    transition: none;
  }
}

/* Décalage échelonné des apparitions : selon la place dans la liste, ou `.reveal-delay` (les styles en ligne sont
   interdits par la politique de sécurité de la page). */
[data-reveal]:nth-child(2) {
  --i: 1;
}
[data-reveal]:nth-child(3) {
  --i: 2;
}
[data-reveal]:nth-child(4) {
  --i: 3;
}
[data-reveal]:nth-child(5) {
  --i: 4;
}
[data-reveal]:nth-child(6) {
  --i: 5;
}
[data-reveal]:nth-child(7) {
  --i: 6;
}
[data-reveal]:nth-child(8) {
  --i: 7;
}
[data-reveal]:nth-child(9) {
  --i: 8;
}
[data-reveal].reveal-delay {
  --i: 1;
}
