/* ORIZON — landing pages de parrainage (classes .ref-*), sur la base de styles.css + blog.css. */

.ref-page {
  padding-top: 0.6rem;
}

.ref {
  max-width: 1120px;
  margin: 0 auto;
  line-height: 1.6;
}

.ref a:not(.btn) {
  color: var(--yellow);
  text-underline-offset: 3px;
}

.ref a:focus-visible,
.ref summary:focus-visible,
.ref-preview a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 6px;
}

.ref .btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* ---------- 1. Hero ---------- */

.ref-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(248, 238, 0, 0.18);
  padding: 1.6rem 1.15rem 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.ref-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 60%;
}

.ref-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.55) 0%, rgba(7, 8, 11, 0.78) 45%, rgba(7, 8, 11, 0.94) 100%);
}

.ref-hero-inner {
  max-width: 600px;
}

.ref-kicker {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 238, 0, 0.5);
  background: rgba(7, 8, 11, 0.5);
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ref-hero h1 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.55rem, 5.6vw, 2.7rem);
  line-height: 1.14;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.ref-benefit {
  margin: 0.85rem 0 0;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 6vw, 2.35rem);
  line-height: 1.12;
  color: var(--yellow);
  text-shadow: 0 0 28px rgba(248, 238, 0, 0.25);
}

.ref-models-line {
  margin: 0.3rem 0 0;
  font-weight: 600;
  color: #eceef5;
}

.ref-lead {
  margin: 0.8rem 0 0;
  font-size: 1.02rem;
  color: #e6e8ef;
}

.ref-cta {
  margin-top: 1.1rem;
  width: 100%;
  min-height: 54px;
  font-size: 1.08rem;
  font-weight: 700;
}

.ref-cta-note {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #c9cdd8;
}

.ref-nolink {
  margin: 1.1rem 0 0;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 8, 11, 0.6);
  font-weight: 600;
}

@media (max-width: 759px) {
  /* Mobile : la voiture en bandeau visible, le texte dessous. */
  .ref-hero {
    padding-top: 9.2rem;
    background: #0b0c10;
  }

  .ref-hero-bg {
    bottom: auto;
    height: 15.5rem;
    object-position: 62% 64%;
  }

  .ref-hero::after {
    background: linear-gradient(180deg, rgba(11, 12, 16, 0) 0%, rgba(11, 12, 16, 0.15) 6rem, rgba(11, 12, 16, 0.92) 12.5rem, #0b0c10 15.5rem);
  }

  .ref-cta {
    font-size: 1rem;
    padding-inline: 1rem;
    white-space: nowrap;
  }

  .ref-tag {
    font-size: 0.7rem !important;
  }
}

@media (max-width: 759px) and (max-height: 700px) {
  /* Petits smartphones (360 × 640, 375 × 667) : hero plus compact, bouton dans le premier écran. */
  .ref-hero {
    padding: 5.6rem 1rem 1.1rem;
  }

  .ref-hero-bg {
    height: 10.5rem;
  }

  .ref-hero::after {
    background: linear-gradient(180deg, rgba(11, 12, 16, 0) 0%, rgba(11, 12, 16, 0.2) 3.5rem, rgba(11, 12, 16, 0.92) 8rem, #0b0c10 10.5rem);
  }

  .ref-kicker {
    display: none;
  }

  .ref-hero h1 {
    font-size: 1.4rem;
  }

  .ref-benefit {
    margin-top: 0.6rem;
    font-size: 1.35rem;
  }

  .ref-lead {
    margin-top: 0.55rem;
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .ref-cta {
    margin-top: 0.8rem;
    min-height: 50px;
  }
}

@media (min-width: 760px) {
  .ref-hero {
    padding: 3.2rem 2.8rem;
    min-height: 470px;
    display: flex;
    align-items: center;
  }

  .ref-hero::after {
    background: linear-gradient(90deg, rgba(7, 8, 11, 0.95) 0%, rgba(7, 8, 11, 0.82) 42%, rgba(7, 8, 11, 0.25) 75%, rgba(7, 8, 11, 0.05) 100%);
  }

  .ref-hero-bg {
    object-position: 60% 60%;
  }

  .ref-cta {
    width: auto;
    padding-inline: 1.8rem;
  }
}

/* ---------- Sections ---------- */

.ref-section {
  max-width: 780px;
  margin: 3.4rem auto 0;
}

.ref-section.ref-wide {
  max-width: none;
}

.ref-section h2,
.ref-final h2 {
  margin: 0 0 0.6rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.3rem, 3.4vw, 1.75rem);
  line-height: 1.22;
}

.ref-section h3 {
  font-family: "Sora", sans-serif;
}

.ref-section p,
.ref-section li {
  font-size: 1rem;
}

.ref-section-intro {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.ref-small {
  margin: 0.9rem 0 0;
  font-size: 0.85rem !important;
  color: var(--muted);
}

/* ---------- 2. Modèles ---------- */

.ref-models {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ref-model {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex;
  flex-direction: column;
}

.ref-model img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ref-model-body {
  padding: 0.9rem 1rem 1.1rem;
}

.ref-model h3 {
  margin: 0;
  font-size: 1.15rem;
}

.ref-model p {
  margin: 0.4rem 0 0;
  color: #dfe2ea;
  font-size: 0.95rem;
}

.ref-model.is-featured {
  grid-column: span 2;
  border-color: rgba(248, 238, 0, 0.3);
}

.ref-model.is-secondary h3 {
  font-size: 1rem;
}

.ref-model.is-secondary .ref-model-body {
  padding: 0.7rem 0.8rem 0.9rem;
}

.ref-model-benefit {
  font-weight: 700;
  color: var(--yellow) !important;
}

.ref-model-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.88rem;
}

.ref-tag {
  display: inline-block;
  margin: 0.45rem 0 0 !important;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem !important;
  font-weight: 700;
  color: var(--muted) !important;
  background: rgba(255, 255, 255, 0.08);
}

.ref-tag-ok {
  color: #0c0d11 !important;
  background: var(--neon);
}

@media (min-width: 760px) {
  .ref-models {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ref-model.is-featured {
    grid-column: span 2;
  }

  .ref-model.is-secondary {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
  }

  .ref-model.is-secondary img {
    width: 46%;
    flex: none;
  }
}

/* ---------- 3. Étapes ---------- */

.ref-steps {
  counter-reset: ref-step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 760px) {
  .ref-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
  }
}

.ref-steps li {
  counter-increment: ref-step;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 0.8rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.ref-steps li::before {
  content: counter(ref-step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow);
  color: #0c0d11;
  font-weight: 800;
  font-family: "Sora", sans-serif;
}

.ref-steps h3 {
  margin: 0.1rem 0 0.15rem;
  font-size: 1.02rem;
}

.ref-steps p {
  margin: 0;
  color: #dfe2ea;
  font-size: 0.95rem;
}

.ref-tip {
  margin: 1rem 0 0;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  border-left: 3px solid var(--yellow);
  background: rgba(248, 238, 0, 0.05);
}

/* ---------- 4. Expérience ---------- */

.ref-story {
  display: grid;
  gap: 1.2rem;
  align-items: center;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(248, 238, 0, 0.05), rgba(17, 19, 24, 0.85) 50%);
}

@media (min-width: 900px) {
  .ref-story {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 2rem;
    padding: 2rem;
  }
}

.ref-story-text > p {
  margin: 0.7rem 0 0;
  color: #e6e8ef;
}

.ref-byline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.4rem 0 0;
}

.ref-byline img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(248, 238, 0, 0.45);
  flex: none;
}

.ref-byline .ref-byline-logo {
  object-fit: contain;
  background: #0d0f14;
  padding: 5px;
}

.ref-byline p {
  margin: 0;
}

.ref-highlights {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.ref-highlights li {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.ref-highlights strong {
  font-family: "Sora", sans-serif;
  color: var(--yellow);
  font-size: 1.05rem;
}

.ref-highlights span {
  color: #dfe2ea;
  font-size: 0.95rem;
}

.ref-story-more {
  margin-top: 0.9rem !important;
  font-weight: 600;
}

.ref-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(248, 238, 0, 0.25);
  background: #0d0f14;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.ref-video-poster,
.ref-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.ref-video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ref-video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--yellow);
  color: #0c0d11;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  transition: transform 160ms ease;
}

.ref-video-poster:hover .ref-video-play,
.ref-video-poster:focus-visible .ref-video-play {
  transform: translate(-50%, -50%) scale(1.08);
}

.ref-video-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.45rem 0 0;
}

/* ---------- 5. FAQ (accordéon accessible) ---------- */

.ref-faq-item {
  border-bottom: 1px solid var(--line);
}

.ref-faq-q {
  margin: 0;
  font-size: 1rem;
}

.ref-faq-btn {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.ref-faq-btn:hover {
  color: var(--yellow);
}

.ref-faq-btn:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Icône + / – dessinée (aria-hidden), pas de texte généré lu par les lecteurs d'écran. */
.ref-faq-icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}

.ref-faq-icon::before,
.ref-faq-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--yellow);
  transition: transform 160ms ease;
}

.ref-faq-icon::after {
  transform: rotate(90deg);
}

.ref-faq-btn[aria-expanded="true"] .ref-faq-icon::after {
  transform: rotate(0deg);
}

.ref-faq-a p {
  margin: 0 0 0.9rem;
  color: #dfe2ea;
  font-size: 0.97rem;
}

/* ---------- 6. Dernier appel ---------- */

.ref-final {
  max-width: 780px;
  margin: 3.4rem auto 0;
  padding: 1.8rem 1.3rem;
  text-align: center;
  border-radius: 24px;
  border: 1px solid rgba(248, 238, 0, 0.35);
  background: radial-gradient(500px 220px at 50% 0%, rgba(248, 238, 0, 0.14), rgba(17, 19, 24, 0.92));
}

.ref-final p {
  margin: 0.5rem 0 0;
}

.ref-benefit-sm {
  font-size: clamp(1.25rem, 4.5vw, 1.7rem);
}

.ref-final .ref-cta {
  width: auto;
  padding-inline: 1.8rem;
}

.ref-final .ref-cta-note,
.ref-final .ref-nolink {
  margin-inline: auto;
  max-width: 34rem;
}

.ref-contact {
  margin-top: 1rem !important;
  font-size: 0.9rem;
  color: var(--muted);
}

.ref-meta {
  max-width: 780px;
  margin: 2rem auto 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.ref-meta p {
  margin: 0.25rem 0;
}

/* ---------- Aperçu privé (jamais sur la page publiée) ---------- */

.ref-preview {
  position: fixed;
  left: 50%;
  bottom: 10px;
  z-index: 50;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 20px));
  padding: 0.45rem 0.8rem;
  border-radius: 12px;
  border: 1px dashed rgba(248, 238, 0, 0.6);
  background: rgba(12, 13, 17, 0.92);
  font-size: 0.75rem;
  line-height: 1.4;
  color: #eceef5;
}

@media (prefers-reduced-motion: reduce) {
  .ref-video-play,
  .ref .btn,
  .ref-faq-icon::before,
  .ref-faq-icon::after {
    transition: none;
  }
}
