/* ==========================================================================
   Audit UX du tunnel de commande — feuille de styles
   Sommaire :
   1. Polices
   2. Variables (couleurs, typographie, espacements)
   3. Base
   4. Utilitaires de mise en page
   5. Composants (boutons, cartes, badges…)
   6. Sections de la page
   7. Page « Mentions légales »
   8. Préférences utilisateur (mouvement réduit)
   ========================================================================== */

/* 1. Polices — auto-hébergées (aucun appel à Google Fonts, plus simple pour le RGPD)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
}

/* 2. Variables
   -------------------------------------------------------------------------- */
:root {
  /* Couleurs */
  --color-bg: #f6f5f1;
  --color-bg-muted: #eae8e1;
  --color-surface: #ffffff;
  --color-ink: #16181d;
  --color-text: #3a3f47;
  --color-text-muted: #4a4f57;
  --color-text-on-dark: #c9cbd0;
  --color-border: #e2e0d9;
  --color-divider: #d9d6ce;
  --color-track: #e7e5df;
  --color-primary: #0b5d57;
  --color-primary-hover: #083f3b;
  --color-primary-soft: #d6edea;
  --color-warning: #c2410c;
  --color-highlight: #f2b880;

  /* Typographie */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

  /* Espacements et formes */
  --container: 1200px;
  --container-narrow: 880px;
  --gutter: clamp(20px, 4vw, 32px);
  --section-space: clamp(64px, 9vw, 96px);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-card: 0 1px 2px rgb(22 24 29 / 6%), 0 12px 40px rgb(22 24 29 / 8%);
}

/* 3. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

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

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

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

/* Lien d'évitement pour la navigation au clavier */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Les ancres ne passent pas sous le bord de l'écran */
[id] {
  scroll-margin-top: 24px;
}

/* 4. Utilitaires de mise en page
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-space);
}

.section--dark {
  background: var(--color-ink);
  color: var(--color-bg);
}

.section--muted {
  background: var(--color-bg-muted);
}

.section--white {
  background: var(--color-surface);
}

.section--primary {
  background: var(--color-primary);
  color: #fff;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.section-title {
  font-size: clamp(30px, 4vw, 40px);
}

.eyebrow {
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 250px)), 1fr));
}

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

/* 5. Composants
   -------------------------------------------------------------------------- */

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--sm {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
}

.btn--dark {
  background: var(--color-ink);
  color: #fff;
}

.btn--dark:hover {
  background: #2c2f36;
  color: #fff;
}

.btn--outline {
  border-color: var(--color-ink);
  background: transparent;
  color: var(--color-ink);
}

.btn--outline:hover {
  background: var(--color-ink);
  color: #fff;
}

.btn--highlight {
  background: var(--color-highlight);
  color: var(--color-ink);
}

.btn--highlight:hover {
  background: #eaa260;
  color: var(--color-ink);
}

.btn--light {
  background: #fff;
  color: var(--color-primary);
}

.btn--light:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}

.btn--outline-light {
  border-color: #fff;
  background: transparent;
  color: #fff;
}

.btn--outline-light:hover {
  background: #fff;
  color: var(--color-primary);
}

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

/* Cartes */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.card__icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.card__title {
  font-size: 19px;
}

.card__text {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.55;
}

/* Puces (étiquettes) */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-bg);
  font-size: 14px;
}

/* 6. Sections de la page
   -------------------------------------------------------------------------- */

/* En-tête */
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--color-ink);
  text-decoration: none;
}

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

.brand__name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.brand__tagline {
  color: var(--color-text-muted);
  font-size: 14px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.site-nav a:not(.btn) {
  color: var(--color-ink);
  text-decoration: none;
}

.site-nav a:not(.btn):hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Sur petit écran, on garde seulement le bouton d'action */
@media (max-width: 640px) {
  .site-nav__link {
    display: none;
  }
}

/* Accroche */
.hero {
  display: grid;
  gap: 56px;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  padding-block: clamp(40px, 7vw, 72px) var(--section-space);
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__title {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero__lead {
  max-width: 560px;
  color: var(--color-text);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
}

.hero__platforms {
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Carte d'exemple de score (illustration) */
.score-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.score-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  font-weight: 600;
}

.score-card__total {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
}

.score-card__total small {
  color: var(--color-text-muted);
  font-size: 18px;
}

.score-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.score-row {
  display: grid;
  gap: 12px;
  align-items: center;
  grid-template-columns: 110px 1fr 44px;
}

.score-row__value {
  text-align: right;
}

.score-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--color-track);
}

.score-bar span {
  display: block;
  width: var(--score, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
}

.score-bar--low span {
  background: var(--color-warning);
}

.score-card__priority {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--color-track);
}

.score-card__priority-label {
  color: var(--color-warning);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-card__priority-text {
  font-size: 15px;
  line-height: 1.45;
}

.score-card figcaption {
  color: var(--color-text-muted);
  font-size: 12px;
}

/* Problème */
.problem {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.problem__title {
  font-size: clamp(28px, 3.4vw, 34px);
  line-height: 1.15;
}

.problem__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.problem__item h3 {
  color: #fff;
  font-size: 18px;
}

.problem__item p {
  color: var(--color-text-on-dark);
  line-height: 1.6;
}

/* Étapes */
.steps {
  --grid-min: 230px;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
}

.step h3 {
  font-size: 19px;
}

.step p {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.55;
}

/* Tarifs */
.pricing {
  --grid-min: 300px;
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.price-card--featured {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-bg);
}

.price-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-card__title {
  font-size: 22px;
}

.price-card--featured .price-card__title {
  color: #fff;
}

.price-card__badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-highlight);
  color: var(--color-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.price-card__desc {
  color: var(--color-text);
  font-size: 15px;
}

.price-card--featured .price-card__desc {
  color: var(--color-text-on-dark);
}

.price-card__price {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
}

.price-card--featured .price-card__price {
  color: #fff;
}

.price-card__price small {
  color: var(--color-text-muted);
  font-size: 16px;
  font-weight: 500;
}

.price-card--featured .price-card__price small {
  color: var(--color-text-on-dark);
}

.price-card ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.5;
}

.price-card .btn {
  min-height: 48px;
  margin-top: auto;
}

.price-card--featured .btn--outline {
  border-color: #fff;
  color: #fff;
}

/* À propos */
.about {
  display: grid;
  gap: 56px;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.about__photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  background: var(--color-bg-muted);
  object-fit: cover;
}

.about__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 15px;
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about__title {
  font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1.15;
}

.about__content p {
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.6;
}

/* FAQ */
.faq {
  border-bottom: 1px solid var(--color-divider);
}

.faq__item {
  border-top: 1px solid var(--color-divider);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: "+";
  flex-shrink: 0;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.faq__item[open] .faq__question::after {
  content: "–";
}

.faq__answer {
  padding-bottom: 24px;
  color: var(--color-text);
  line-height: 1.6;
}

/* Appel à l'action final */
.cta {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
}

.cta__title {
  font-size: clamp(30px, 4vw, 46px);
}

.cta__text {
  max-width: 620px;
  color: var(--color-primary-soft);
  font-size: 18px;
  line-height: 1.6;
}

.cta .btn-group {
  justify-content: center;
}

/* Pied de page */
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  padding-block: 32px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* 7. Page « Mentions légales »
   -------------------------------------------------------------------------- */
.legal {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-block: 48px var(--section-space);
}

.legal h1 {
  font-size: clamp(32px, 4vw, 44px);
}

.legal section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal h2 {
  font-size: 22px;
}

.legal p,
.legal li {
  color: var(--color-text);
  line-height: 1.6;
}

/* 8. Préférences utilisateur
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
