/* Margio — page de vente. Aucune police externe, aucune dépendance. */

:root {
  --encre:        #14181d;
  --encre-douce:  #545c66;
  --papier:       #ffffff;
  --papier-doux:  #f5f3ef;
  --trait:        #e2ded7;
  --accent:       #c2410c;
  --accent-fonce: #9a3412;
  --sain:         #15803d;
  --sain-fond:    #dcfce7;
  --danger:       #b91c1c;
  --danger-fond:  #fee2e2;
  --rayon:        10px;
  --large:        1080px;
  --ombre:        0 1px 2px rgba(20, 24, 29, .06), 0 8px 24px rgba(20, 24, 29, .07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }
s  { color: var(--encre-douce); font-weight: 400; }

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

section {
  max-width: var(--large);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.mention {
  font-size: .9rem;
  color: var(--encre-douce);
}

/* --- Boutons -------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: .7rem 1.4rem;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--papier);
  color: var(--encre);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--ombre); }

.btn--plein {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--plein:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); }

.btn--large { padding: .95rem 1.9rem; font-size: 1.05rem; }

.btn--inactif {
  background: var(--papier-doux);
  border-color: var(--trait);
  color: var(--encre-douce);
  cursor: not-allowed;
  pointer-events: none;
}

/* --- En-tête -------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--large);
  margin: 0 auto;
  padding: .9rem 1.5rem;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--trait);
}

.nav .btn { padding: .5rem 1rem; font-size: .95rem; }

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.03em;
}

/* --- Héros ---------------------------------------------------------------- */

.heros {
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 2.5rem;
}

.surtitre {
  display: inline-block;
  margin-bottom: 1.2rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: var(--papier-doux);
  color: var(--encre-douce);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.chapo {
  max-width: 40rem;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: var(--encre-douce);
}

.heros__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem;
  margin-bottom: 1rem;
}

/* --- Aperçu de l'app ------------------------------------------------------ */

.demo { padding-top: 1rem; }

.demo__cadre {
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  overflow: hidden;
}

.demo__barre {
  display: flex;
  gap: .45rem;
  padding: .7rem .9rem;
  background: var(--papier-doux);
  border-bottom: 1px solid var(--trait);
}

.demo__barre span {
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  background: var(--trait);
}

.demo__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  background: var(--papier);
}

.demo__table th,
.demo__table td {
  padding: .8rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--trait);
  white-space: nowrap;
}

.demo__table th:first-child,
.demo__table td:first-child { text-align: left; white-space: normal; }

.demo__table thead th {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--encre-douce);
  background: var(--papier-doux);
}

.demo__table tbody tr:last-child td { border-bottom: 0; }

.pastille {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
}

.pastille--sain   { background: var(--sain-fond);   color: var(--sain); }
.pastille--danger { background: var(--danger-fond); color: var(--danger); }

.legende {
  max-width: 42rem;
  margin: 1.2rem auto 0;
  text-align: center;
  font-size: .92rem;
  color: var(--encre-douce);
}

/* --- Le problème, chiffré ------------------------------------------------- */

.probleme {
  max-width: 46rem;
}

.probleme h2 { text-align: center; }

.calcul {
  margin: 2rem 0;
  padding: 1.6rem;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--papier-doux);
  text-align: center;
}

.calcul__etape strong {
  display: block;
  font-size: 1.7rem;
  letter-spacing: -.02em;
}

.calcul__etape--fort strong { color: var(--accent); }

.calcul__label {
  font-size: .9rem;
  color: var(--encre-douce);
}

.calcul__fleche {
  margin: .9rem 0;
  font-size: .9rem;
  color: var(--encre-douce);
}

/* --- Fonctions ------------------------------------------------------------ */

.fonctions { background: var(--papier-doux); max-width: none; }
.fonctions > * { max-width: var(--large); margin-inline: auto; }
.fonctions h2 { text-align: center; }

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.2rem;
}

.grille article {
  padding: 1.4rem;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--papier);
}

.grille p { margin: 0; font-size: .95rem; color: var(--encre-douce); }

/* --- Comparatif ----------------------------------------------------------- */

.comparatif h2 { text-align: center; }

.table-comparatif {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.table-comparatif th,
.table-comparatif td {
  padding: .8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--trait);
}

.table-comparatif thead th {
  font-size: .82rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--encre-douce);
}

.table-comparatif td:first-child { font-weight: 600; }

.colonne-nous {
  background: var(--papier-doux);
  color: var(--encre);
  font-weight: 600;
}

.table-comparatif thead .colonne-nous { color: var(--accent); }

/* --- Achat ---------------------------------------------------------------- */

.achat { max-width: 34rem; }

.prix {
  padding: 2.2rem 2rem;
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  text-align: center;
  box-shadow: var(--ombre);
}

.prix__badge {
  display: inline-block;
  margin: 0 0 .8rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.prix__montant {
  margin: 0;
  font-size: 1.4rem;
}

.prix__montant strong {
  font-size: 3.4rem;
  letter-spacing: -.03em;
}

.prix__mention {
  margin: .2rem 0 1.6rem;
  font-size: .92rem;
  color: var(--encre-douce);
}

.prix__liste {
  margin: 0 0 1.8rem;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: .97rem;
}

.prix__liste li {
  padding: .45rem 0 .45rem 1.7rem;
  border-bottom: 1px solid var(--trait);
  position: relative;
}

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

.prix__liste li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--sain);
  font-weight: 700;
}

.prix .btn { width: 100%; }
.prix .mention { margin: .8rem 0 0; }

/* --- FAQ ------------------------------------------------------------------ */

.faq { max-width: 46rem; }
.faq h2 { text-align: center; }

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

.faq summary {
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
}

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

.faq summary::after {
  content: '+';
  position: absolute;
  right: .3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--encre-douce);
}

.faq details[open] summary::after { content: '−'; }

.faq details p {
  margin: 0 0 1.1rem;
  color: var(--encre-douce);
}

/* --- Pied ----------------------------------------------------------------- */

.pied {
  padding: 2.5rem 1.5rem 3.5rem;
  border-top: 1px solid var(--trait);
  text-align: center;
  font-size: .93rem;
  color: var(--encre-douce);
}

.pied p { margin: 0 0 .5rem; }
.pied a { color: var(--encre-douce); }

/* --- Contenu légal -------------------------------------------------------- */

.texte { max-width: 42rem; }
.texte h2 { margin-top: 2.2rem; font-size: 1.25rem; }
.texte ul { padding-left: 1.2rem; }
.texte li { margin-bottom: .4rem; }

/* --- Petits écrans -------------------------------------------------------- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding: 3rem 1.1rem; }
  .nav { padding: .8rem 1.1rem; }
  .nav .btn { padding: .45rem .8rem; font-size: .88rem; }
  .heros__actions .btn { width: 100%; }
  .demo { padding-inline: 0; }
  .demo__cadre { border-radius: 0; border-inline: 0; }
  .demo__table { display: block; overflow-x: auto; }
  .table-comparatif { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
