/* ==========================================================================
   Parrainage.online — feuille de style
   Jetons de couleur en mode clair, redéfinis en mode sombre. La couleur
   d'accent (--accent) est celle de l'application affichée ; --accent-texte
   en est une variante éclaircie en mode sombre pour le texte et les bordures.
   ========================================================================== */
:root {
  --accent: #0f6e56;
  --accent-texte: var(--accent);
  --vert: #0f6e56;
  --vert-clair: #22c55e;
  --fond: #f4f4f2;
  --surface: #ffffff;
  --surface-2: #f2f1ed;
  --texte: #141414;
  --texte-2: #5f6368;
  --bordure: #e6e6e2;
  --inverse-fond: #111111;
  --inverse-texte: #ffffff;
  --inverse-texte-2: #c9c9c4;
  --ombre: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.06);
  --ombre-forte: 0 24px 50px rgba(15, 110, 86, 0.14);
  --halo-1: rgba(34, 197, 94, 0.22);
  --halo-2: rgba(15, 110, 86, 0.18);
  --rayon: 22px;
  --rayon-petit: 14px;
  color-scheme: light dark;
}
.carte { --accent-texte: var(--accent); }

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #202020;
    --surface: #2a2a29;
    --surface-2: #353533;
    --texte: #f1f0ec;
    --texte-2: #b3b2ab;
    --bordure: #3d3d3a;
    --inverse-fond: #f1f0ec;
    --inverse-texte: #141414;
    --inverse-texte-2: #4a4a46;
    --ombre: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    --ombre-forte: 0 24px 50px rgba(0, 0, 0, 0.45);
    --halo-1: rgba(34, 197, 94, 0.14);
    --halo-2: rgba(15, 110, 86, 0.16);
    --accent-texte: color-mix(in srgb, var(--accent) 60%, white);
  }
  .carte { --accent-texte: color-mix(in srgb, var(--accent) 60%, white); }
  /* Les couleurs de marque sombres se confondraient avec le fond : fin liseré sur les boutons colorés. */
  .bouton--accent { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--texte);
  background: var(--fond);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
}
a { color: var(--accent-texte); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; font-weight: 800; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 0 0 0.85rem; }
.conteneur { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
main.conteneur { flex: 1; padding-block: 0 4rem; }

/* --------------------------------------------------------------------------
   Composants communs
   -------------------------------------------------------------------------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.bouton:hover { filter: brightness(1.08); text-decoration: none; }
.bouton:active { transform: scale(0.98); }
.bouton--primaire { background: var(--inverse-fond); color: var(--inverse-texte); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15); }
.bouton--secondaire { background: var(--surface); color: var(--texte); border-color: var(--bordure); }
.bouton--accent { background: var(--accent); color: #fff; }
.bouton--douce { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent-texte); }
.bouton--pleine { width: 100%; }
.bouton--copie { background: #15803d !important; color: #fff !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--texte-2);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.badge b { width: 8px; height: 8px; border-radius: 50%; background: var(--vert-clair); flex-shrink: 0; }
.badge:hover { color: var(--texte); text-decoration: none; }

.pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texte-2);
  background: var(--fond);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
}
.etiquette {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texte-2);
  font-weight: 700;
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent-texte);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.logo svg { width: 32px; height: 32px; display: block; }
.logo__emoji { font-size: 1.7rem; line-height: 1; }
.logo--grand { width: 72px; height: 72px; border-radius: 22px; }
.logo--grand svg { width: 44px; height: 44px; }
.logo--grand .logo__emoji { font-size: 2.3rem; }

.bloc {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.5rem;
  margin-bottom: 1.1rem;
}
.bloc--discret { background: var(--surface-2); }
.bloc--conditions { border-style: dashed; }
.bloc__intro { margin: 0 0 1.1rem; color: var(--texte-2); }
.bloc ul, .bloc ol { margin: 0; padding-left: 1.3rem; }
.bloc li { margin-bottom: 0.5rem; }
.bloc li:last-child { margin-bottom: 0; }
.note { font-size: 0.9rem; color: var(--texte-2); margin: 1rem 0 0; }
.vide { color: var(--texte-2); }

.liste-coche { list-style: none; padding-left: 0 !important; }
.liste-coche li { padding-left: 2rem; position: relative; color: var(--texte-2); }
.liste-coche li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent-texte);
  font-weight: 800;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
}

/* --------------------------------------------------------------------------
   En-tête et pied de page
   -------------------------------------------------------------------------- */
.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--fond) 82%, transparent);
  border-bottom: 1px solid var(--bordure);
}
.entete__contenu { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.marque { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.1rem; color: var(--texte); text-decoration: none; }
.marque__icone { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--vert), var(--vert-clair)); flex-shrink: 0; }
.entete__nav { display: flex; gap: 1.6rem; }
.entete__nav a { color: var(--texte-2); text-decoration: none; font-weight: 600; }
.entete__nav a:hover { color: var(--texte); }

.pied { border-top: 1px solid var(--bordure); padding-block: 1.5rem 2.5rem; font-size: 0.85rem; color: var(--texte-2); }
.pied p { margin: 0; }
.pied__credits { margin-top: 0.5rem !important; font-size: 0.8rem; }

/* --------------------------------------------------------------------------
   Accueil
   -------------------------------------------------------------------------- */
.heros {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3.5rem;
}
.heros::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto;
  height: 130%;
  background:
    radial-gradient(60% 60% at 20% 30%, var(--halo-1), transparent 60%),
    radial-gradient(50% 50% at 85% 20%, var(--halo-2), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
.heros--simple { grid-template-columns: 1fr; padding-block: 4rem; }
.heros h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.035em; margin: 1.1rem 0 1rem; }
.heros h1 em { font-style: normal; background: linear-gradient(90deg, var(--vert), var(--vert-clair)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.heros__sous { font-size: 1.2rem; color: var(--texte-2); max-width: 34rem; margin: 0 0 1.75rem; }
.heros__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chiffres { display: flex; gap: 1.75rem; margin: 2.1rem 0 0; color: var(--texte-2); font-size: 0.9rem; }
.chiffres div { margin: 0; }
.chiffres dt { color: var(--texte); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.chiffres dd { margin: 0; }

.vedette {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 28px;
  box-shadow: var(--ombre-forte);
  padding: 1.6rem;
  transform: rotate(-2deg);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.vedette__code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0.2rem 0 0.4rem;
  word-break: break-all;
}
.vedette__note { color: var(--texte-2); font-size: 0.85rem; margin-top: 0.3rem; }

.section { padding: 1.5rem 0 4rem; }
.section__entete { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.section__entete h2, .autres h2 { font-size: 1.7rem; margin: 0; }
.filtres { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filtre {
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--bordure);
  color: var(--texte-2);
  cursor: pointer;
  white-space: nowrap;
}
.filtre:hover { color: var(--texte); }
.filtre--actif { background: var(--inverse-fond); color: var(--inverse-texte); border-color: var(--inverse-fond); }

.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.carte {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.carte::after {
  content: "";
  position: absolute;
  right: -30%;
  bottom: -50%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  pointer-events: none;
}
.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre); text-decoration: none; }
.carte__haut { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.carte__nom { margin-top: 0.85rem; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.carte__benef { color: var(--texte-2); }
.carte__bas { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px dashed var(--bordure); }
.carte__code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; letter-spacing: 0.08em; background: var(--fond); border-radius: 10px; padding: 0.35rem 0.6rem; font-size: 0.9rem; }
.carte__cta { font-weight: 700; color: var(--accent-texte); white-space: nowrap; }

.comment {
  background: var(--inverse-fond);
  color: var(--inverse-texte);
  border-radius: 32px;
  padding: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 1rem;
}
.comment h2 { grid-column: 1 / -1; margin: 0 0 0.4rem; font-size: 1.7rem; }
.comment__etape b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--vert-clair); color: #111; margin-bottom: 0.6rem; }
.comment__etape p { margin: 0; color: var(--inverse-texte-2); }
.comment__etape strong { display: block; color: var(--inverse-texte); margin-bottom: 0.25rem; }

/* --------------------------------------------------------------------------
   Page application
   -------------------------------------------------------------------------- */
.ariane { font-size: 0.9rem; color: var(--texte-2); padding-top: 2rem; margin-bottom: 1.2rem; }
.ariane a { color: inherit; }
.app-entete { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.25rem; align-items: start; margin-bottom: 1.5rem; }
.app-entete__ligne { display: flex; align-items: center; gap: 0.75rem; }
.app-entete h1 { margin: 0.9rem 0 0.35rem; }
.app-entete__accroche { font-size: 1.25rem; font-weight: 700; color: var(--accent-texte); margin: 0 0 0.6rem; }
.app-entete__desc { color: var(--texte-2); margin: 0 0 1.1rem; }

.codecard {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 28px;
  padding: 1.75rem;
  box-shadow: var(--ombre-forte);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.codecard__code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0.4rem 0 0.4rem;
  background: var(--fond);
  border-radius: 16px;
  padding: 0.75rem;
  text-align: center;
  user-select: all;
  word-break: break-all;
}
.codecard__explication { margin: 0.3rem 0 0.4rem; color: var(--texte-2); }
.codecard__note { color: var(--texte-2); font-size: 0.85rem; margin-top: 0.3rem; }

.colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.1rem; }
.colonnes .bloc { margin-bottom: 0; }

.etapes { counter-reset: etape; list-style: none; padding-left: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.85rem; }
.etapes li { counter-increment: etape; background: var(--fond); border-radius: 18px; padding: 1rem; font-size: 0.95rem; color: var(--texte-2); margin: 0; }
.etapes li::before {
  content: counter(etape);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--inverse-fond);
  color: var(--inverse-texte);
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.applis__grille { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.appli { display: flex; gap: 1rem; align-items: center; background: var(--fond); border-radius: 18px; padding: 1rem; }
.appli__qr { display: block; line-height: 0; background: #fff; border-radius: 12px; padding: 6px; flex-shrink: 0; }
.appli__qr .qr { display: block; width: 120px; height: 120px; }
.appli__texte { min-width: 0; }
.appli__plateforme { margin: 0 0 0.5rem; font-weight: 800; }
.appli .bouton { font-size: 0.9rem; padding: 0.6rem 1rem; }

.faq__item { border-top: 1px solid var(--bordure); padding: 0.7rem 0; }
.faq__item:first-of-type { border-top: none; padding-top: 0; }
.faq__item summary { cursor: pointer; font-weight: 700; padding: 0.2rem 0; }
.faq__item summary:hover { color: var(--accent-texte); }
.faq__item p { margin: 0.5rem 0 0.2rem; color: var(--texte-2); }

.autres { margin-top: 3rem; }
.autres h2 { margin-bottom: 1.3rem; }

/* --------------------------------------------------------------------------
   Tablette et téléphone
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .grille { grid-template-columns: repeat(2, 1fr); }
  .heros { grid-template-columns: 1fr; gap: 2rem; }
  .vedette { transform: none; }
  .app-entete { grid-template-columns: 1fr; gap: 1.5rem; }
  .comment { grid-template-columns: 1fr; padding: 2rem; border-radius: 24px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .conteneur { padding-inline: 16px; }
  .heros { padding: 2.25rem 0 2rem; }
  .heros__actions .bouton { width: 100%; }
  .chiffres { gap: 1.25rem; }
  .entete__nav-secondaire { display: none; }
  .grille, .colonnes, .applis__grille { grid-template-columns: 1fr; }
  .etapes { grid-template-columns: 1fr; }
  .section__entete { align-items: start; flex-direction: column; }
  .filtres { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.3rem; -webkit-overflow-scrolling: touch; }
  .bouton { min-height: 48px; }
  .bloc, .codecard { padding: 1.2rem 1rem; }
  .codecard__code { font-size: 1.9rem; letter-spacing: 0.12em; }
  .appli { flex-direction: column; text-align: center; }
  .appli__texte { width: 100%; }
  .appli .bouton { width: 100%; }
}
