/* Coco + Casting — feuille de style unique.
   Valeurs issues du handoff. Aucun arrondi, aucune ombre, aucun dégradé
   au-delà des filets et des masques documentés : ne rien ajouter. */

@font-face {
  font-family: "Tenor Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/tenor-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Tenor Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/tenor-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0A0A0A;
  --ivory: #F3E6D5;
  --ivory-62: rgba(243, 230, 213, 0.62);
  --ivory-45: rgba(243, 230, 213, 0.45);
  --ivory-40: rgba(243, 230, 213, 0.4);
  --ivory-28: rgba(243, 230, 213, 0.28);
  --ivory-18: rgba(243, 230, 213, 0.18);
  --hover: #FFFFFF;

  --logo-gap: clamp(52px, 7vw, 104px);
  --portrait-gap: 20px;
  --portrait-w: 190px;
  --portrait-h: 254px;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: "Tenor Sans", serif;
  font-weight: 400;
  color: var(--ivory);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
  padding: clamp(40px, 6vh, 80px) 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ivory);
}

/* ---------------------------------------------------------------- En-tête */

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
}

.header-logo {
  width: min(120px, 23vw);
  height: auto;
  display: block;
}

.baseline {
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ivory-45);
  /* Compense le letter-spacing de la dernière lettre : recentre optiquement. */
  text-indent: 0.42em;
}

/* --------------------------------------------------------------- Bandeaux */

.rows {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 7vh, 76px);
}

.mq-row {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mq-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(24px, 6vw, 72px);
}

.mq-label {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ivory-40);
  white-space: nowrap;
  text-indent: 0.4em;
}

.mq-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--ivory-18), rgba(243, 230, 213, 0));
}

/* Bandeau au défilement inverse : le filet précède le libellé, dégradé miroir. */
.mq-head > .mq-rule:first-child {
  background: linear-gradient(270deg, var(--ivory-18), rgba(243, 230, 213, 0));
}

.mq-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 var(--fade),
    #000 calc(100% - var(--fade)),
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 var(--fade),
    #000 calc(100% - var(--fade)),
    transparent
  );
}

.mq-track {
  display: flex;
  width: max-content;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  /* animation-name et animation-duration sont posés par le script. */
}

/* Le padding-right doit valoir le gap : il reconstitue l'espacement à la
   jonction de la boucle. Sans lui, un trou apparaît à chaque cycle. */
.mq-track--logo {
  align-items: center;
  gap: var(--logo-gap);
  padding-right: var(--logo-gap);
}

.mq-track--portrait {
  align-items: flex-end;
  gap: var(--portrait-gap);
  padding-right: var(--portrait-gap);
}

.mq-logo {
  display: block;
  width: auto;
  flex: none;
  opacity: 0.82;
  /* height posée par le script, par enregistrement. */
}

.mq-portrait {
  display: block;
  width: var(--portrait-w);
  height: var(--portrait-h);
  flex: none;
  object-fit: cover;
  /* Le rognage part du bas : un visage n'est jamais coupé. */
  object-position: center top;
  filter: grayscale(1) contrast(1.05);
}

:root.portraits-colour .mq-portrait {
  filter: none;
}

@keyframes marquee-ltr {
  from {
    transform: translate3d(-50%, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes marquee-rtl {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* ------------------------------------------------------------------ États */

.status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
}

.status-text {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ivory-45);
  text-indent: 0.28em;
  text-align: center;
}

.status-retry {
  appearance: none;
  background: none;
  border: 1px solid var(--ivory-28);
  border-radius: 0;
  padding: 10px 22px;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-indent: 0.28em;
  color: var(--ivory-62);
  cursor: pointer;
}

.status-retry:hover,
.status-retry:focus-visible {
  color: var(--hover);
  border-color: var(--ivory-45);
}

/* ------------------------------------------------------------- Pied de page */

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
  flex-wrap: wrap;
  padding: 0 24px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.footer a {
  color: var(--ivory-62);
  text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--hover);
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ivory-28);
}

/* ------------------------------------------------------------- Responsive */

@media (max-width: 639px) {
  :root {
    --logo-gap: 52px;
    --portrait-w: 150px;
    --portrait-h: 200px;
  }
}

/* --------------------------------------------------------- Accessibilité */

@media (prefers-reduced-motion: reduce) {
  .mq-track {
    animation: none !important;
  }
}
