/* Accueil : les maisons en rideaux (une lame par maison, celle qu'on survole s'ouvre et lance son film),
   puis les familles. Sur téléphone, les lames deviennent des cartes qu'on fait glisser.
   --haut : position du haut des rideaux, posée par js/rideaux.js. */
.r-logo { display: block; height: 56px; width: auto; max-width: min(380px, 70vw); object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.r-logo.script { height: 84px; }
/* Logos en couleur (blasons, badges) : affichés tels quels */
.r-logo.brut { filter: none; height: 64px; }
.r-cta { display: inline-flex; align-items: center; gap: 12px; height: 46px; padding: 0 24px; background: #fff; color: var(--noir);
  font: 500 12px/1 var(--texte); letter-spacing: .14em; text-transform: uppercase; }
.r-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .4s var(--sortie); }
a:hover .r-cta svg { transform: translateX(4px); }
.r-credit { position: absolute; z-index: 3; right: 16px; bottom: 12px; font: 400 11px/1.3 var(--texte); color: rgba(255,255,255,.62); }

/* Les rideaux */
.rideaux { background: var(--noir); }
.r-lames { display: flex; height: max(560px, min(calc(100svh - var(--haut, 152px)), 900px)); }
.r-lame { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; color: #fff; background: #000;
  border-right: 1px solid rgba(255,255,255,.14); transition: flex-grow .9s var(--sortie); outline-offset: -4px; }
.r-lame:last-child { border-right: 0; }
.r-lame.actif { flex-grow: 7.5; }
.r-lame > :is(.fond, video) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.r-lame .fond { filter: grayscale(1) brightness(.5); transform: scale(1.08); transition: filter 1s var(--sortie), transform 1.4s var(--sortie); }
.r-lame:hover .fond { filter: grayscale(.4) brightness(.6); }
.r-lame.actif .fond { filter: none; transform: scale(1); }
.r-lame video { opacity: 0; transition: opacity .9s; }
.r-lame.actif video.joue { opacity: 1; }
.r-lame::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(0,0,0,.66), rgba(0,0,0,0) 55%); pointer-events: none; }
.r-nom { position: absolute; z-index: 2; left: 50%; bottom: 32px; writing-mode: vertical-rl; transform: translateX(-50%) rotate(180deg);
  font: 400 clamp(20px, 1.6vw, 26px)/1 "Cormorant Garamond", serif; letter-spacing: .02em; white-space: nowrap; transition: opacity .35s; }
.r-lame.actif .r-nom { opacity: 0; }
.r-txt { position: absolute; z-index: 2; left: clamp(28px, 3.4vw, 56px); bottom: clamp(36px, 6vh, 64px); width: 460px; display: grid; justify-items: start; gap: 18px;
  opacity: 0; transform: translateY(18px); transition: opacity .35s, transform .35s; pointer-events: none; }
.r-lame.actif .r-txt { opacity: 1; transform: none; transition: opacity .6s .35s, transform .9s .35s var(--sortie); pointer-events: auto; }
.r-txt p { font: 400 clamp(19px, 1.6vw, 24px)/1.3 "Cormorant Garamond", serif; max-width: 30ch; color: rgba(255,255,255,.92); }
.r-meta { font: 500 11px/1 var(--texte); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.66); }
.r-lame .r-credit { opacity: 0; transition: opacity .4s; }
.r-lame.actif .r-credit { opacity: 1; transition-delay: .6s; }
.r-index { display: none; }

/* Les familles, en bande sombre sous les rideaux */
.r-familles { background: var(--noir); color: #fff; padding: 56px 0 72px; border-top: 1px solid rgba(255,255,255,.12); }
.r-familles h2 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; letter-spacing: -.02em; margin-bottom: 28px; color: rgba(255,255,255,.9); }
.rf-liste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.18); }
.rf-liste a { display: grid; gap: 10px; align-content: start; padding: 24px 24px 8px 0; border-right: 1px solid rgba(255,255,255,.12); }
.rf-liste a + a { padding-left: 24px; }
.rf-liste a:last-child { border-right: 0; }
.rf-liste b { font: 400 clamp(22px, 2vw, 28px)/1.1 "Cormorant Garamond", serif; }
.rf-liste span { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.66); max-width: 34ch; }
.rf-liste em { font: 500 11px/1 var(--texte); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: 6px; }
.rf-liste a:hover b { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

@media (prefers-reduced-motion: reduce) {
  .r-lame, .r-lame .fond { transition: none; }
}

@media (max-width: 900px) {
  /* Cartes qu'on fait glisser ; la suivante dépasse à droite pour inviter au geste.
     Hauteur fixe : rien ne bouge dans la page quand la maison change. */
  .rideaux { padding: 12px 0 18px; }
  .r-lames { height: auto; gap: 8px; padding: 0 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
  .r-lames::-webkit-scrollbar { display: none; }
  .r-lame, .r-lame.actif { flex: 0 0 86%; height: max(440px, calc(100svh - var(--haut, 141px) - 92px)); border: 0; scroll-snap-align: start; transition: none; }
  .r-lame .fond { transform: none; }
  .r-nom { display: none; }
  .r-txt { width: auto; right: 20px; left: 20px; bottom: 44px; gap: 14px; }
  .r-lame.actif .r-txt { transition: opacity .45s .1s, transform .6s .1s var(--sortie); }
  .r-txt p { font-size: 20px; }
  .r-lame .r-credit { left: 20px; right: 20px; bottom: 14px; }
  /* Index des maisons sous les cartes : on voit où on en est, un appui y va directement */
  .r-index { display: flex; align-items: center; gap: 4px; margin-top: 12px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
  .r-index::-webkit-scrollbar { display: none; }
  .r-index button { flex: none; padding: 10px 8px; font: 400 17px/1 "Cormorant Garamond", serif; color: rgba(255,255,255,.45); border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
  .r-index button[aria-current="true"] { color: #fff; border-color: #fff; }
  .r-compte { flex: none; padding-right: 8px; font: 500 11px/1 var(--texte); letter-spacing: .12em; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }

  .rf-liste { grid-template-columns: 1fr 1fr; }
  .rf-liste a:nth-child(2) { border-right: 0; }
  .rf-liste a:nth-child(3) { padding-left: 0; }
  .rf-liste a:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.12); }
}
@media (max-width: 560px) {
  .rf-liste { grid-template-columns: 1fr; }
  .rf-liste a, .rf-liste a + a { padding: 18px 0 14px; border-right: 0; border-top: 1px solid rgba(255,255,255,.12); }
  .rf-liste a:first-child { border-top: 0; }
}
