/* TDSL — composants (brand/site-web.md, section « Composants »).
   Aucune couleur codée en dur : uniquement les variables de tokens.css. */

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding-inline: var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

/* Principal : un seul par écran */
.btn--primary {
  background: var(--teal);
  color: var(--on-teal);
}

.btn--primary:hover {
  background: color-mix(in srgb, var(--teal) 85%, var(--ink));
}

/* Secondaire : contour */
.btn--secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--ink-muted);
}

.section--deep .btn--secondary {
  border-color: var(--ink-muted);
  color: var(--ink-inverse);
}

.section--deep .btn--secondary:hover {
  border-color: var(--ink-inverse);
}

/* Secondaire fort : plein terracotta */
.btn--accent {
  background: var(--terracotta);
  color: var(--on-terracotta);
}

.btn--accent:hover {
  background: color-mix(in srgb, var(--terracotta) 85%, var(--ink));
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* Pleine largeur sur petit écran (cible tactile confortable) */
@media (max-width: 479px) {
  .btn-group .btn {
    flex: 1 1 100%;
  }
}

/* ---------- Étiquette (au-dessus des titres de section) ---------- */
.eyebrow {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-label-size);
  line-height: var(--text-label-lh);
  font-weight: 500;
  letter-spacing: var(--text-label-ls);
  text-transform: uppercase;
  color: var(--teal);
}

.section--deep .eyebrow {
  color: var(--terracotta);
}

/* En-tête de section : étiquette + titre + chapeau */
.section-head {
  max-width: var(--prose-max);
  margin-bottom: var(--space-10);
}

.section-head p {
  margin-top: var(--space-4);
  color: var(--ink-muted);
}

.section--deep .section-head p {
  color: var(--ink-inverse);
}

/* ---------- Carte ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.card p {
  color: var(--ink-muted);
}

/* Carte d'offre : numéro en Plex Mono, filet terracotta en haut */
.card--offer {
  border-top: 3px solid var(--terracotta);
}

.card__index {
  font-family: var(--font-mono);
  font-size: var(--text-label-size);
  line-height: var(--text-label-lh);
  font-weight: 500;
  letter-spacing: var(--text-label-ls);
  color: var(--teal);
}

.card .list-diamond {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-size: var(--text-small-size);
  line-height: var(--text-small-lh);
}

/* Pied de section (appel secondaire) */
.section-foot {
  margin-top: var(--space-10);
}

/* Grille de cartes : 1 colonne mobile, 3 colonnes à partir de 768px */
.grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Losange (rappel du logo) ---------- */
.diamond {
  display: inline-block;
  flex: none;
  width: 0.5em;
  height: 0.5em;
  background: var(--lilac);
  transform: rotate(45deg);
}

/* ---------- Chiffre clé ---------- */
.figure {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-figure-size);
  line-height: var(--text-figure-lh);
  font-weight: 500;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.section--deep .figure {
  color: var(--terracotta);
}

/* Le losange lilas ne précède que le chiffre à retenir */
.figure .diamond {
  width: 12px;
  height: 12px;
}

/* ---------- Liste à puces losange ---------- */
.list-diamond {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}

.list-diamond li {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}

.list-diamond li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--lilac);
  transform: translateY(-2px) rotate(45deg);
}

/* ---------- Séparateur décoratif : courbe qui monte ---------- */
.curve-divider {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-block: var(--space-6);
}

.curve-divider--center {
  margin-inline: auto;
}

.curve-divider .curve-line {
  fill: none;
  stroke: var(--terracotta);
  stroke-width: 2;
  stroke-linecap: round;
}

.curve-divider .curve-dot {
  fill: var(--teal);
}

.curve-divider .curve-diamond {
  fill: var(--lilac);
}

/* ---------- Étapes de la méthode ---------- */
.steps {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-6);
  border-top: 2px solid var(--line);
}

/* Point teal sur le filet, rappel des mesures du logo */
.step::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--surface);
}

/* Dernière étape : le losange lilas (le résultat) */
.step:last-child::before {
  border-radius: 0;
  width: 10px;
  height: 10px;
  top: -6px;
  background: var(--lilac);
  transform: rotate(45deg);
}

.step__number {
  font-family: var(--font-mono);
  font-size: var(--text-figure-size);
  line-height: var(--text-figure-lh);
  font-weight: 500;
  color: var(--teal);
}

.step p {
  color: var(--ink-muted);
}

@media (min-width: 600px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10) var(--space-6);
  }
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Référence ---------- */
.reference {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-6);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius-md);
}

.reference__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: var(--prose-max);
}

.reference__body p {
  color: var(--ink-muted);
}

@media (min-width: 900px) {
  .reference {
    grid-template-columns: 2fr 1fr;
    align-items: center;
    padding: var(--space-10);
  }
  .reference__points {
    padding-left: var(--space-6);
    border-left: 1px solid var(--line);
  }
}

/* ---------- Démonstrations (captures de tableaux de bord) ---------- */
.demo {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.demo__media {
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
}

.demo__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.demo__media--placeholder {
  display: grid;
  place-items: center;
  margin: var(--space-4);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-label-size);
  letter-spacing: var(--text-label-ls);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.demo__caption {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
}

.demo__caption p {
  color: var(--ink-muted);
}

/* ---------- Source (sous les graphiques) ---------- */
.source {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-label-size);
  line-height: var(--text-label-lh);
  color: var(--ink-muted);
}
