/* LE PARRAINAGE (22/11/2026) : www.nscm.be/referral.
   Même univers que l'accueil et /challenge (site.css : crème, nuit, Fraunces, les trois ronds).
   L'idée : UNE RECOMMANDATION ENTRE DIRIGEANTS. Une carte, au dessin du joker du jeu « Le challenge »,
   s'écrit sous les yeux de celui qui recommande, reçoit son sceau, et arrive au nom de celui qui est recommandé.
   Pensé d'abord pour le téléphone (celui qui est recommandé ouvre le lien dans WhatsApp).
   CSP : aucun style en ligne, tout est ici. */

.page-referral { --orange-pale: #FDF1DE; --carte-l: min(100%, 440px); }
.page-referral .logo { text-decoration: none; }

/* ── La scène : la carte, puis le texte (téléphone) ; côte à côte (ordinateur) ── */
.rf-scene { display: grid; gap: 30px; padding-top: 22px; }
.rf-texte { outline: none; }
.rf-texte[hidden] { display: none; }

.rf-surtitre { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rf-pastille {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px;
  border-radius: 999px; background: var(--orange); color: var(--nuit);
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.rf-pastille-vert { background: var(--vert); }
.rf-rare { font-size: 0.875rem; font-weight: 600; color: var(--gris); }

.page-referral h1, .rf-h {
  margin-top: 14px; max-width: 11.5em;
  font-family: var(--titre); font-optical-sizing: none; font-weight: 580; font-variation-settings: "opsz" 84;
  font-size: clamp(2.2rem, 9.6vw, 3.75rem); line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance;
}
.rf-h { font-size: clamp(1.9rem, 8vw, 2.875rem); }
.rf-h-grand { font-size: clamp(2.2rem, 9.6vw, 3.5rem); }
.rf-sous { margin-top: 14px; max-width: 30em; font: 400 1.1875rem/1.34 var(--titre); letter-spacing: -0.004em; text-wrap: pretty; }
.rf-qui { margin-top: 12px; max-width: 32em; font-size: 0.9375rem; line-height: 1.45; color: var(--gris); text-wrap: pretty; }

/* ── Le formulaire : deux prénoms, un bouton ── */
.rf-form { margin-top: 22px; }
.rf-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.page-referral .champ label { display: block; margin-bottom: 5px; font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.page-referral .champ input, .page-referral .champ textarea {
  display: block; width: 100%; min-height: 52px; padding: 0 14px;
  border: 1px solid var(--bord-champ); border-radius: var(--r-petit);
  background: var(--blanc); color: var(--nuit);
  font: 500 1.0625rem/1.4 var(--texte);
  transition: border-color 160ms var(--sortie), box-shadow 160ms var(--sortie);
}
.page-referral .champ input::placeholder { color: var(--gris-clair); font-weight: 400; }
.page-referral .champ input:focus, .page-referral .champ textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 2px var(--bleu); }
.rf-case { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: 0.9375rem; line-height: 1.4; cursor: pointer; }
.rf-case input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--nuit); cursor: pointer; }
.rf-erreur { margin-top: 10px; font-size: 0.9375rem; font-weight: 500; color: var(--erreur); }
.rf-cta { width: 100%; margin-top: 14px; }

/* ── Envoyer : le message, le ton, les applications ── */
.rf-tons { display: inline-flex; gap: 4px; margin-top: 18px; padding: 4px; border-radius: 999px; background: var(--bord); }
.rf-tons button {
  min-width: 64px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--gris); font: 600 0.9375rem/1 var(--texte);
  transition: background-color 160ms var(--sortie), color 160ms var(--sortie);
}
.rf-tons button[aria-pressed="true"] { background: var(--blanc); color: var(--nuit); box-shadow: 0 1px 3px rgba(14, 26, 43, .15); }
.rf-message { margin-top: 10px; }
.page-referral .rf-message textarea { min-height: 150px; padding: 14px; font-weight: 400; font-size: 1rem; line-height: 1.5; resize: vertical; }
.rf-envois { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rf-envois .bouton { min-height: 52px; padding-inline: 14px; font-size: 0.9375rem; }
.rf-envois .bouton.seul { grid-column: 1 / -1; }
.rf-envois [hidden] { display: none; }
.rf-merci { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-moyen); background: var(--orange-pale); font-size: 0.9375rem; line-height: 1.45; }
.rf-merci[hidden] { display: none; }
.rf-autre { margin-top: 14px; }
.rf-autre button, .rf-lien {
  padding: 0; border: 0; background: none; cursor: pointer; color: var(--nuit);
  font: 600 0.9375rem/1.4 var(--texte); text-decoration: underline; text-decoration-color: var(--orange);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}

/* ── Recevoir ── */
.rf-etapes { display: grid; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; counter-reset: e; }
.rf-etapes li { position: relative; padding-left: 40px; font-size: 1rem; line-height: 1.45; counter-increment: e; }
.rf-etapes li::before {
  content: counter(e); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--bleu); color: var(--blanc); font: 700 0.8125rem/1 var(--texte);
}
.rf-etapes li:nth-child(2)::before { background: var(--orange); color: var(--nuit); }
.rf-etapes li:nth-child(3)::before { background: var(--vert); color: var(--nuit); }
.rf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }
.rf-actions .bouton { flex: 1 1 100%; }

/* ══ LA CARTE CADEAU ══════════════════════════════════════════════════════ */
.rf-carte-zone { position: relative; display: grid; place-items: center; padding-block: 8px 4px; }
.rf-rond { position: absolute; border-radius: 50%; z-index: 0; }
.rf-rond-orange { width: 34%; aspect-ratio: 1; right: -6%; top: -8%; background: var(--orange); opacity: .9; }
.rf-rond-vert { width: 15%; aspect-ratio: 1; left: 2%; bottom: -2%; background: var(--vert); }

.rf-carte {
  position: relative; z-index: 1; width: var(--carte-l); aspect-ratio: 1.5; margin: 0;
  border-radius: 22px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 0% 100%, #1D3350 0%, var(--nuit) 58%);
  color: var(--creme);
  box-shadow: 0 30px 60px -28px rgba(14, 26, 43, .7), 0 2px 0 rgba(255, 255, 255, .06) inset;
  transform: rotate(-2.5deg);
  transition: transform 700ms var(--sortie), box-shadow 700ms var(--sortie);
}
.rf-carte-dedans { position: absolute; inset: 0; display: grid; grid-template-rows: auto auto 1fr auto; padding: 6% 7% 6%; }
.rf-carte-haut { display: flex; align-items: center; gap: 8px; font: 700 clamp(0.5625rem, 2.2vw, 0.6875rem)/1 var(--texte); letter-spacing: .12em; text-transform: uppercase; color: #8E9AAD; }
.rf-points { display: inline-flex; gap: 3px; }
.rf-points i { width: 9px; height: 9px; border-radius: 2.5px; }
/* Le coin bleu à l'étoile : celui des jokers du jeu. */
.rf-coin { position: absolute; top: 0; right: 0; width: 23%; aspect-ratio: 1; border-bottom-left-radius: 100%; background: var(--bleu); }
.rf-coin svg { position: absolute; top: 22%; right: 20%; width: 34%; fill: var(--orange); }
.rf-carte-titre {
  margin-top: 6%; padding-right: 22%;
  font: 600 clamp(1.5rem, 7.4vw, 2.25rem)/1 var(--titre); font-variation-settings: "opsz" 84; letter-spacing: -0.01em; color: var(--orange);
}
.rf-carte-noms { display: grid; grid-template-columns: 1fr 1fr; gap: 6%; align-content: center; margin: 0; }
.rf-carte-noms div { min-width: 0; border-top: 1px solid rgba(251, 250, 247, .16); padding-top: 7px; }
.rf-carte-noms dt { font: 600 clamp(0.5625rem, 2.1vw, 0.6875rem)/1.2 var(--texte); letter-spacing: .1em; text-transform: uppercase; color: #8E9AAD; }
.rf-carte-noms dd {
  margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 clamp(1.0625rem, 4.8vw, 1.625rem)/1.15 var(--titre); font-variation-settings: "opsz" 60; color: var(--creme);
}
.rf-carte-noms dd.rf-ecrit { animation: rf-encre 420ms var(--sortie); }
.rf-vide { color: #55637A; font-style: italic; font-weight: 400; }
.rf-carte-bas { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.rf-carte-tete { width: clamp(28px, 8.4vw, 38px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--bleu); box-shadow: 0 0 0 2px rgba(251, 250, 247, .15); }
.rf-carte-tete img { width: 100%; height: 100%; object-fit: cover; }
.rf-carte-bas p { font-size: clamp(0.625rem, 2.6vw, 0.75rem); line-height: 1.3; color: #B7C1D0; }
.rf-carte-bas p b { display: block; color: var(--creme); font-weight: 600; }
.rf-carte-bas .rf-valeur { text-align: right; font: 600 clamp(1rem, 4.6vw, 1.375rem)/1 var(--titre); color: var(--creme); white-space: nowrap; }
.rf-valeur small { display: block; margin-bottom: 3px; font: 600 clamp(0.5rem, 2vw, 0.625rem)/1 var(--texte); letter-spacing: .1em; text-transform: uppercase; color: #8E9AAD; }

/* Le sceau : un rond vert coché, posé sur le coin de la carte quand la recommandation est prête
   (22/11 : « pas un cadeau de Noël » : l'emballage est retiré). */
.rf-sceau {
  position: absolute; z-index: 3; right: 5%; top: 6%; display: grid; place-items: center;
  width: 13%; aspect-ratio: 1; border-radius: 50%; background: var(--vert);
  box-shadow: 0 0 0 4px rgba(14, 26, 43, .9), 0 6px 14px rgba(0, 0, 0, .35);
  opacity: 0; transform: scale(.4) rotate(-20deg); pointer-events: none;
}
.rf-sceau svg { width: 56%; fill: none; stroke: var(--nuit); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rf-prete .rf-sceau { opacity: 1; transform: none; transition: transform 480ms var(--rebond, var(--sortie)), opacity 160ms linear; }
.rf-prete .rf-coin svg { opacity: 0; transition: opacity 160ms linear; }
.rf-prete .rf-carte { transform: rotate(-1deg) translateY(-4px); }
.rf-recue .rf-carte { transform: rotate(0deg) translateY(-6px); box-shadow: 0 40px 70px -30px rgba(14, 26, 43, .75); }

@keyframes rf-encre { from { opacity: .2; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ── Comment ça marche ── */
.rf-comment { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--bord); }
.rf-comment ol { display: grid; gap: 16px; margin: 14px 0 0; padding: 0; list-style: none; }
.rf-comment li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.rf-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--nuit); font: 700 0.875rem/1 var(--texte); }
.rf-num.c-bleu { color: var(--blanc); }
.rf-comment p { font-size: 1rem; line-height: 1.45; color: var(--gris); text-wrap: pretty; }
.rf-comment p b { display: block; color: var(--nuit); font: 600 1.125rem/1.3 var(--titre); }
[data-pour-offrir][hidden] { display: none; }
.rf-preuve { margin-top: 48px; padding-bottom: 24px; }

/* Arrivée : le texte monte doucement (seulement si site.js a posé « effets »). */
.effets .rf-scene > * { animation: rf-monte 700ms var(--sortie) both; }
.effets .rf-scene > .rf-texte { animation-delay: 120ms; }
@keyframes rf-monte { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .rf-carte, .rf-sceau { transition: none !important; }
  .rf-carte-noms dd.rf-ecrit { animation: none; }
}

/* ── Tablette ── */
@media (min-width: 620px) {
  .page-referral { --carte-l: 460px; }
  .rf-carte { aspect-ratio: 1.6; }
  .rf-scene { padding-top: 36px; }
  .rf-actions .bouton { flex: 0 0 auto; }
  .rf-cta { width: auto; }
  .rf-envois { grid-template-columns: repeat(4, auto); justify-content: start; }
  .rf-envois .bouton.seul { grid-column: auto; }
  .rf-comment ol { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .rf-comment li { grid-template-columns: 1fr; gap: 12px; align-content: start; }
}

/* ── Ordinateur : le texte à gauche, la carte à droite ── */
@media (min-width: 960px) {
  .page-referral { --carte-l: 100%; }
  .rf-scene {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "texte carte";
    align-items: center; gap: clamp(40px, 6vw, 96px);
    min-height: min(78vh, 720px); padding-top: 24px;
  }
  .rf-texte { grid-area: texte; }
  .rf-carte-zone { grid-area: carte; padding: 40px 0; }
  .rf-carte { max-width: 520px; }
  .rf-champs { max-width: 520px; }
  .rf-message, .rf-envois { max-width: 560px; }
  .rf-comment { margin-top: 24px; }
}
