/* ==========================================================================
   ROOMPLAY — Base : reset, typographie, bilinguisme, utilitaires
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

[hidden] {
  display: none !important;
}

/* Typographie ------------------------------------------------------------ */
h1,
h2,
h3,
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 em,
h2 em,
h3 em,
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-gold-soft);
}

h4 {
  font-size: var(--fs-base);
  font-weight: 600;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

::selection {
  background: var(--color-gold);
  color: var(--color-on-gold);
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Trilinguisme FR / EN / ES -----------------------------------------------
   Chaque texte existe en trois <span data-lang="fr|en|es">.
   La langue active est portée par <html lang="…"> (script en <head>). */
html:not([lang="fr"]) [data-lang="fr"],
html:not([lang="en"]) [data-lang="en"],
html:not([lang="es"]) [data-lang="es"] {
  display: none !important;
}

/* Mise en page ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(var(--container-narrow) + var(--gutter) * 2);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--line {
  border-top: 1px solid var(--color-line);
}

.section-head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: clamp(var(--space-6), 6vw, var(--space-8));
  max-width: 44rem;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section-title {
  font-size: var(--fs-2xl);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-gold);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.section-head--center .eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.lead {
  font-size: var(--fs-md);
  color: var(--color-text-soft);
  max-width: 38ch;
}

.section-head--center .lead {
  max-width: 46ch;
}

.muted {
  color: var(--color-text-muted);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

/* Accessibilité ---------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--color-gold);
  color: var(--color-on-gold);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--dur-base) var(--ease-out);
}

.skip-link:focus {
  transform: none;
}

/* Apparitions au défilement (actives seulement si JS) --------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Entrée du hero : animation CSS pure, visible dès le premier affichage */
.rise {
  animation: rise 0.6s var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Grain photographique, très léger --------------------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Mouvement réduit ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
