/* ==================================================
   Page /v2/ : variante de l'accueil, plus proche des pages produit Apple
   (hero qui s'assombrit, horloge à rouleaux, écran qui zoome).
   Les états animés ne s'appliquent que si le JS tourne (html.rh-js).
=================================================== */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../plugins/richa-homepage/assets/fonts/schibsted-grotesk.woff2") format("woff2");
}

.rh {
  --rh-ink: #0B1F3A;
  --rh-text: #3E4F63;
  --rh-muted: #6B7A8C;
  --rh-blue: #155EEF;
  --rh-night: #0E1B33;
  --rh-lamp: #FFC56B;
  --rh-paper: #FFFFFF;
  --rh-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  font-family: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--rh-ink);
  -webkit-font-smoothing: antialiased;
}

.rh *,
.rh *::before,
.rh *::after {
  box-sizing: border-box;
}

.rh-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- 1. HERO ---------- */

.rh-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(calc(100svh - 70px), 860px);
  padding: 96px 0 72px;
  background: var(--rh-paper);
}

.rh .rh-title {
  max-width: 15ch;
  margin: 0;
  color: var(--rh-ink);
  font-size: clamp(46px, 8vw, 112px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.rh .rh-subtitle {
  max-width: 36em;
  margin: 36px 0 0;
  color: var(--rh-text);
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.55;
}

.rh-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: 44px;
}

.rh .rh-button {
  display: inline-block;
  padding: 17px 28px;
  border-radius: 10px;
  background: var(--rh-blue);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s ease;
}

.rh .rh-button:hover,
.rh .rh-button:focus-visible {
  background: #0B4FD4;
  color: #fff;
}

.rh .rh-button:focus-visible,
.rh .rh-link:focus-visible {
  outline: 3px solid var(--rh-lamp);
  outline-offset: 3px;
}

.rh .rh-link {
  color: var(--rh-ink);
  font-size: 17px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.rh .rh-link:hover {
  color: var(--rh-blue);
}

.rh .rh-note {
  margin: 16px 0 0;
  color: var(--rh-muted);
  font-size: 15px;
}

.rh .rh-hint {
  margin: auto 0 0;
  padding-top: 64px;
  color: var(--rh-muted);
  font-size: 15px;
}

/* Une seule séquence d'ouverture : le titre, puis le reste.
   Le titre reste visible dès le premier affichage (LCP) : il glisse sans fondu, en CSS seul. */
.rh-hero .rh-title {
  animation: rh-title-in 0.45s var(--rh-ease) both;
}

@keyframes rh-title-in {
  from { transform: translateY(10px); }
}

.rh-js .rh-hero .rh-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--rh-ease), transform 0.9s var(--rh-ease);
  transition-delay: var(--d, 0s);
}

.rh-ready .rh-hero .rh-in {
  opacity: 1;
  transform: none;
}

/* ---------- 2. UNE NUIT TYPE (section épinglée) ---------- */

.rh-night {
  --sky: #EEF2F7;
  --fg: var(--rh-ink);
  --fg-soft: var(--rh-text);
  --rule: rgba(11, 31, 58, 0.14);
  position: relative;
  height: 520vh;
  background: var(--sky);
  color: var(--fg);
}

.rh-night.is-dark {
  --fg: #F3F5F9;
  --fg-soft: #A9B6C9;
  --rule: rgba(255, 255, 255, 0.14);
}

.rh-night-sticky {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 72px;
  height: 100vh;
  height: 100svh;
  padding: 72px 0 40px;
  overflow: hidden;
}

.rh-clock-col {
  align-self: center;
}

.rh .rh-clock {
  display: block;
  margin: 0;
  color: var(--fg);
  font-size: clamp(96px, 12.5vw, 184px);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color 0.6s ease;
}

/* Les deux-points tabulaires sont trop larges : on les resserre. */
.rh-colon {
  display: inline-block;
  margin: 0 -0.12em;
  transform: translateY(-0.06em);
}

.rh .rh-clock-caption {
  max-width: 24em;
  margin: 28px 0 0;
  color: var(--fg-soft);
  font-size: 17px;
  line-height: 1.5;
  transition: color 0.6s ease;
}

.rh-log-col {
  position: relative;
  align-self: center;
  min-height: 420px;
}

.rh-log,
.rh-morning {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.6s ease, transform 0.6s var(--rh-ease);
}

.rh .rh-log {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rh-log li {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  color: var(--fg);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.45;
  transition: opacity 0.5s ease, transform 0.5s var(--rh-ease), color 0.6s ease;
}

.rh-log time {
  color: var(--rh-lamp);
  font-weight: 700;
}

.rh-js .rh-log li {
  opacity: 0;
  transform: translateY(14px);
}

.rh-js .rh-log li.is-done {
  opacity: 1;
  transform: none;
}

.rh-morning {
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
}

.rh .rh-morning p {
  max-width: 14em;
  margin: 0;
  color: var(--rh-ink);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.rh-morning .rh-button {
  align-self: flex-start;
  margin-top: 36px;
}

.rh-night.is-morning .rh-log {
  opacity: 0;
  transform: translateY(-24px);
}

.rh-night.is-morning .rh-morning {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Frise de la nuit : de 22 h à 7 h 30 */
.rh-timeline {
  position: relative;
  grid-column: 1 / -1;
  height: 44px;
  border-top: 1px solid var(--rule);
}

.rh-timeline-fill {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  transform: scaleX(var(--night, 0));
  transform-origin: left;
  background: var(--rh-lamp);
}

.rh-timeline span {
  position: absolute;
  top: 12px;
  color: var(--fg-soft);
  font-size: 14px;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: color 0.6s ease;
}

.rh-timeline span:first-of-type {
  transform: none;
}

.rh-timeline span:last-of-type {
  transform: translateX(-100%);
}

/* Sans JS : la nuit se lit comme une simple liste. */
html:not(.rh-js) .rh-night {
  height: auto;
}

html:not(.rh-js) .rh-night-sticky {
  position: relative;
  height: auto;
  padding: 96px 0;
}

html:not(.rh-js) .rh-log,
html:not(.rh-js) .rh-morning {
  position: relative;
}

html:not(.rh-js) .rh-morning {
  margin-top: 48px;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

html:not(.rh-js) .rh-log-col {
  min-height: 0;
}

html:not(.rh-js) .rh-log time {
  color: var(--rh-blue);
}

html:not(.rh-js) .rh-timeline {
  display: none;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .rh-hero {
    min-height: 0;
    padding: 72px 0 56px;
  }

  .rh .rh-hint {
    display: none;
  }

  .rh-night-sticky {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    padding: 48px 0 28px;
  }

  .rh .rh-clock {
    font-size: clamp(76px, 25vw, 140px);
  }

  .rh .rh-clock-caption {
    margin-top: 14px;
    font-size: 15px;
  }

  .rh-log-col {
    align-self: stretch;
    min-height: 0;
    margin-top: 12px;
  }

  /* Sur mobile, seules les dernières entrées restent visibles. */
  .rh .rh-log {
    justify-content: flex-end;
  }

  .rh-js .rh-log li.is-old {
    display: none;
  }

  .rh-log li {
    grid-template-columns: 3.6em minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
  }

  .rh-morning {
    justify-content: center;
  }

  .rh-timeline span:not(:first-of-type):not(:last-of-type) {
    display: none;
  }
}

@media (max-width: 520px) {
  .rh-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- V2 : DÉFILEMENT FLUIDE VERS LES ANCRES ---------- */

html:has(.rh-hero-pin) {
  scroll-behavior: smooth;
}

/* ---------- V2 : HERO ÉPINGLÉ, LA LUMIÈRE BAISSE ---------- */

.rh-hero-pin {
  height: 175vh;
  background: #EEF2F7;
}

.rh-hero-pin .rh-hero {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}

.rh-hero-pin .rh-hero > .rh-wrap:first-child {
  transform-origin: 0 50%;
  will-change: transform, opacity;
}

/* ---------- V2 : HORLOGE À ROULEAUX ---------- */

.rh .rh-night .rh-clock {
  line-height: 1;
}

.rh-reel {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  vertical-align: top;
}

.rh-reel-track {
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rh-reel-track span {
  display: block;
  height: 1em;
}

/* ---------- V2 : LE MATIN, L'ÉCRAN QUI ZOOME ---------- */

.rh-am {
  --zoom: 1;
  position: relative;
  height: 280vh;
  background: #F3F6FB;
  color: #0B1F3A;
}

.rh-am-sticky {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  padding: 84px 20px 32px;
  overflow: hidden;
  text-align: center;
}

.rh .rh-am h2 {
  max-width: 16em;
  margin: 0;
  color: #0B1F3A;
  font-size: clamp(32px, 4.6vw, 60px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.rh .rh-am-lead {
  max-width: 34em;
  margin: 16px auto 0;
  color: #3E4F63;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
}

.rh-laptop {
  width: min(860px, 100%, calc((100svh - 400px) * 1.5));
  margin-top: 40px;
  transform: translateY(calc((1 - var(--zoom)) * 160px)) scale(var(--zoom));
  transform-origin: 50% 0;
  will-change: transform;
}

.rh-laptop-screen {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: clamp(8px, 1.3vw, 14px) solid #1D1D1F;
  border-bottom-width: clamp(12px, 1.8vw, 20px);
  border-radius: clamp(12px, 2vw, 22px) clamp(12px, 2vw, 22px) 0 0;
  background: #fff;
  text-align: left;
}

.rh-laptop-base {
  position: relative;
  width: 114%;
  height: clamp(10px, 1.4vw, 16px);
  margin-left: -7%;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(#E4E6EA, #B8BCC4);
}

.rh-laptop-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 16%;
  height: 40%;
  transform: translateX(-50%);
  border-radius: 0 0 8px 8px;
  background: #A9ADB5;
}

/* Interface de messagerie, volontairement simple */
.rh-mail {
  display: grid;
  grid-template-columns: 34% 1fr;
  height: 100%;
  color: #1D2939;
  font-size: clamp(10px, 1.25vw, 14px);
  line-height: 1.4;
}

.rh .rh-mail-list {
  margin: 0;
  padding: 0;
  border-right: 1px solid #E4E7EC;
  background: #F9FAFB;
  list-style: none;
}

.rh-mail-list li {
  padding: 0.9em 1.1em;
  border-bottom: 1px solid #EAECF0;
}

.rh-mail-list b,
.rh-mail-list span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rh-mail-list span {
  color: #667085;
}

.rh-mail-list .is-open {
  background: #155EEF;
}

.rh-mail-list .is-open b,
.rh-mail-list .is-open span {
  color: #fff;
}

.rh-mail-read {
  padding: 1.4em 1.8em;
  overflow: hidden;
}

.rh-mail-head {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  padding-bottom: 0.9em;
  border-bottom: 1px solid #EAECF0;
}

.rh-mail-head strong {
  display: block;
  font-size: 1.35em;
  letter-spacing: -0.01em;
}

.rh-mail-head span {
  color: #667085;
}

.rh .rh-mail-body {
  margin: 1em 0 0;
  padding: 0;
  list-style: none;
}

.rh-mail-body li {
  position: relative;
  padding: 0.35em 0 0.35em 1.6em;
}

.rh-mail-body li::before {
  content: "";
  position: absolute;
  top: 0.75em;
  left: 0.2em;
  width: 0.7em;
  height: 0.38em;
  transform: rotate(-45deg);
  border-bottom: 2px solid #12B76A;
  border-left: 2px solid #12B76A;
}

.rh-mail-decide {
  margin-top: 1em;
  padding: 0.9em 1.1em;
  border-radius: 8px;
  background: #FFF6E5;
}

.rh-mail-decide strong {
  display: block;
  margin-bottom: 0.3em;
}

.rh .rh-mail-decide p {
  margin: 0.2em 0 0;
}

.rh-js .rh-am .rh-step-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rh-js .rh-am .rh-step-in.is-on {
  opacity: 1;
  transform: none;
}

.rh .rh-am-note {
  margin: 22px 0 0;
  color: #6B7A8C;
  font-size: 14px;
}

/* Sans JS ou mouvement réduit : pas d'épinglage */
html:not(.rh-js) .rh-hero-pin,
html:not(.rh-js) .rh-am {
  height: auto;
}

html:not(.rh-js) .rh-hero-pin .rh-hero,
html:not(.rh-js) .rh-am-sticky {
  position: relative;
  height: auto;
}

html:not(.rh-js) .rh-am-sticky {
  padding: 110px 20px;
}

@media (max-width: 900px) {
  .rh-hero-pin {
    height: auto;
  }

  .rh-hero-pin .rh-hero {
    position: relative;
    height: auto;
  }

  .rh-laptop {
    width: min(100%, calc((100svh - 300px) * 1.5));
  }
}

@media (max-width: 600px) {
  .rh-am {
    height: 240vh;
  }

  .rh-laptop-screen {
    aspect-ratio: 10 / 12;
  }

  .rh-laptop {
    width: min(100%, calc((100svh - 330px) * 0.83));
  }

  .rh-mail {
    grid-template-columns: 1fr;
    font-size: 12px;
  }

  .rh .rh-mail-list {
    display: none;
  }

  .rh-mail-read {
    padding: 1.2em;
  }
}

