/* =================================================================
   Bienvenue chez Dada — CSS critique (au-dessus de la ligne de flottaison)
   Tokens, reset, typographie, en-tête, hero, boutons, recherche.
   ================================================================= */

/* ----------------------------- Polices ----------------------------
   Auto-hébergées : aucune requête vers un tiers (§6.5 RGPD).
   ----------------------------------------------------------------- */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/instrument-serif-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: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/instrument-serif-italic-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: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/instrument-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: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/instrument-sans-italic-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;
}

/* ------------------------------ Tokens ---------------------------- */

:root {
  /* Base — noir et blanc. Le fond est un blanc franc ; seules les
     surfaces gardent une pointe de chaleur, pour que l'or s'y pose
     sans virer au jaune froid. */
  --c-encre: #0d0d0d;      /* texte principal — 19,4:1 sur blanc */
  --c-encre-2: #4a4a4a;    /* texte secondaire — 8,9:1 */
  --c-brume: #6a6a6a;      /* méta, légendes — 5,4:1, AA corps */
  --c-blanc: #ffffff;      /* fond principal */
  --c-sel: #f7f6f3;        /* surfaces surélevées */
  --c-galet: #eceae3;      /* surfaces secondaires */
  --c-trait: #e2e0da;      /* filets, bordures */

  /* Accent — or. L'or vrai (#d9b35a) ne tient pas sur du blanc : 2,4:1.
     D'où deux ors, et pas un seul : un or sombre, seul autorisé sur fond
     clair (5,3:1, donc utilisable en lien et en petite capitale), et l'or
     franc, réservé aux fonds noirs (9,5:1). Ne jamais les intervertir. */
  --c-or: #8a6508;         /* or sur fond clair */
  --c-or-fonce: #6f5410;   /* survol, aplat portant du blanc — 7,1:1 */
  --c-or-pale: #f7f2e6;    /* aplat discret */

  /* Blocs immersifs + or franc, réservé aux fonds sombres. */
  --c-nuit: #111111;
  --c-or-clair: #d9b35a;   /* 9,5:1 sur nuit — jamais sur fond clair */

  /* Filet de lumière du logo : aplat, jamais du texte. Plus clair que
     l'or de texte pour se lire comme une lumière ; or franc sur fond sombre. */
  --c-logo-or: #c9a14a;

  --c-succes: #256b45;
  --c-erreur: #a03a2b;

  /* Typographie */
  --f-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Le minimum du hero est dicté par le mot le plus long du titre
     (« appartements ») : au-delà, il déborde la largeur d'un mobile
     et fait défiler la page horizontalement. */
  --fs-hero: clamp(2.5rem, 11vw, 7rem);
  --fs-h1: clamp(2rem, 5.2vw, 4rem);
  --fs-h2: clamp(1.75rem, 3.6vw, 2.875rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.5rem);
  --fs-lead: clamp(1.125rem, 1.5vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;
  --lh-body: 1.65;
  --lh-tight: 1.08;

  /* Espacement, base 8 */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 48px);
  --measure: 68ch;
  --r: 2px;
  --section-y: clamp(64px, 9vw, 128px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --head-h: 76px;
}

/* ------------------------------ Reset ----------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 16px);
}

body {
  background: var(--c-blanc);
  color: var(--c-encre);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; background: var(--c-galet); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }

a { color: var(--c-or); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--c-or-fonce); }

:focus-visible {
  outline: 2px solid var(--c-or);
  outline-offset: 3px;
  border-radius: 1px;
}
.site-head--over :focus-visible,
.dark :focus-visible,
.section--dark :focus-visible,
.site-foot :focus-visible,
.menu :focus-visible { outline-color: var(--c-or-clair); }

::selection { background: var(--c-or); color: var(--c-blanc); }

/* ---------------------------- Typographie -------------------------- */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* L'italique du Serif est le geste typographique du site : il sert à
   la voix de Dada et à un mot mis en avant, jamais à de l'emphase molle. */
.it { font-style: italic; }

.eyebrow {
  font-family: var(--f-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-or);
  margin-bottom: var(--s4);
}
.dark .eyebrow,
.section--dark .eyebrow { color: var(--c-or-clair); }

.section-title { font-size: var(--fs-h2); max-width: 18ch; }
.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--c-encre-2);
  max-width: 46ch;
  text-wrap: pretty;
}

.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

.u-sr {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--s4); top: -100px; z-index: 200;
  background: var(--c-encre); color: var(--c-blanc);
  padding: var(--s3) var(--s5); border-radius: var(--r); text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: var(--s4); color: var(--c-blanc); }

/* ------------------------------ Layout ---------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.main { display: block; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--dark { background: var(--c-nuit); color: var(--c-blanc); }
.section--sel { background: var(--c-sel); }

.dark, .section--dark { color: var(--c-blanc); }
.dark .lead, .section--dark .lead { color: #b4b4b4; }
.dark a, .section--dark a { color: var(--c-or-clair); }

.rule { height: 1px; background: var(--c-trait); border: 0; }

/* ------------------------------ Boutons ---------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s6);
  border-radius: var(--r);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
/* Le plein est noir : sur ce site l'or est un accent, pas une surface de
   premier plan. Il n'apparaît qu'au survol, où il signe le geste. */
.btn--solid { background: var(--c-encre); color: var(--c-blanc); }
.btn--solid:hover { background: var(--c-or-fonce); color: var(--c-blanc); }

.btn--ghost {
  border: 1px solid var(--c-or);
  color: var(--c-or);
  background: transparent;
}
.btn--ghost:hover { background: var(--c-or); color: var(--c-blanc); }

.dark .btn--solid, .section--dark .btn--solid { background: var(--c-or-clair); color: var(--c-nuit); }
.dark .btn--solid:hover, .section--dark .btn--solid:hover { background: #eacf8a; color: var(--c-nuit); }
.dark .btn--ghost, .section--dark .btn--ghost { border-color: rgb(255 255 255 / 0.38); color: var(--c-blanc); }
.dark .btn--ghost:hover, .section--dark .btn--ghost:hover { background: var(--c-blanc); color: var(--c-nuit); border-color: var(--c-blanc); }

.btn--quiet {
  min-height: 0; padding: 0; text-transform: none; letter-spacing: 0;
  font-size: var(--fs-body); font-weight: 500;
  color: var(--c-or);
  border-bottom: 1px solid currentColor;
  border-radius: 0;
}

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--c-blanc);
  border-bottom: 1px solid var(--c-trait);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.site-head--over {
  position: fixed;
  inset-inline: 0;
  background: transparent;
  border-color: transparent;
  color: var(--c-blanc);
  --c-logo-or: var(--c-or-clair);
}
.site-head--over.is-stuck {
  background: var(--c-blanc);
  color: var(--c-encre);
  --c-logo-or: #c9a14a;
  border-color: var(--c-trait);
  box-shadow: 0 1px 24px rgb(0 0 0 / 0.08);
}

.site-head__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--head-h);
  display: flex;
  align-items: center;
  gap: var(--s6);
}

.brand,
.brand:hover {
  display: block;
  color: inherit;
  margin-right: auto;
  flex-shrink: 0;
}
.logo { display: block; width: auto; height: 40px; }
@media (min-width: 640px) { .logo { height: 44px; } }

.site-nav { display: none; }
.site-nav ul { display: flex; gap: var(--s6); }
.site-nav a {
  color: inherit;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  padding-block: var(--s2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current='page'] { border-bottom-color: currentColor; color: inherit; }

.site-head__aside { display: flex; align-items: center; gap: var(--s5); }

.lang { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; }
.lang a { color: inherit; text-decoration: none; opacity: 0.55; transition: opacity 0.2s var(--ease); }
.lang a:hover { opacity: 1; color: inherit; }
.lang a[aria-current='true'] { opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; }
.lang span { opacity: 0.3; }

.site-head__cta { display: none; }
.site-head--over .btn--solid { background: var(--c-blanc); color: var(--c-nuit); }
.site-head--over .btn--solid:hover { background: var(--c-or-clair); color: var(--c-nuit); }
.site-head--over.is-stuck .btn--solid { background: var(--c-encre); color: var(--c-blanc); }
.site-head--over.is-stuck .btn--solid:hover { background: var(--c-or-fonce); }

.burger {
  width: 48px; height: 48px; margin-right: -12px;
  display: grid; place-items: center; color: inherit;
}
.burger__bars { display: grid; gap: 6px; width: 24px; }
.burger__bars i { display: block; height: 1.5px; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.2s; }
.burger[aria-expanded='true'] .burger__bars i:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded='true'] .burger__bars i:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (min-width: 1024px) {
  .site-nav { display: block; }
  .site-head__cta { display: inline-flex; }
  .burger { display: none; }
}

/* ------------------------------- Hero ------------------------------ */

.hero {
  position: relative;
  /* Plein écran. 100svh sur mobile : la hauteur visible barre d'adresse
     affichée, pour que le bas du hero ne passe pas sous la barre. */
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  isolation: isolate;
  background: var(--c-nuit);
  padding-top: var(--head-h);
}
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
/* Voile du hero. Deux couches, parce que la photographie d'intérieur est
   claire : un simple dégradé du bas ne suffit pas à faire tenir du texte
   blanc sur un mur blanc.
   — couche 1, directionnelle : assombrit le côté du texte et laisse la
     photo respirer à droite ;
   — couche 2, verticale : assoit le titre et protège l'en-tête en haut. */
.hero__media::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgb(17 17 17 / 0.78) 0%, rgb(17 17 17 / 0.62) 32%, rgb(17 17 17 / 0.24) 62%, rgb(17 17 17 / 0.08) 100%),
    linear-gradient(to top, rgb(17 17 17 / 0.66) 0%, rgb(17 17 17 / 0.22) 45%, rgb(17 17 17 / 0.14) 70%, rgb(17 17 17 / 0.5) 100%);
}

.hero__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  width: 100%;
  padding-block: var(--s8) clamp(48px, 6vw, 80px);
  padding-inline: var(--gutter);
  color: var(--c-blanc);
}

.hero__title {
  font-size: var(--fs-hero);
  line-height: 0.94;
  letter-spacing: -0.025em;
  max-width: 14ch;
  margin-bottom: var(--s5);
}
.hero__title span { display: block; }
.hero__title span:last-child { font-style: italic; padding-left: 0.08em; }

.hero__lead {
  font-size: var(--fs-lead);
  max-width: 40ch;
  color: #d8d8d8;
  margin-bottom: var(--s6);
  text-wrap: pretty;
}
.hero__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5) var(--s7); }

/* Le hero est un fond sombre sans classe .dark : les variantes de bouton
   doivent y être redéfinies, sinon le contour laqué disparaît. */
.hero .btn--ghost { border-color: rgb(255 255 255 / 0.55); color: var(--c-blanc); }
.hero .btn--ghost:hover { background: var(--c-blanc); color: var(--c-nuit); border-color: var(--c-blanc); }

.hero__scroll {
  display: none;
  position: absolute;
  right: var(--gutter);
  bottom: clamp(48px, 6vw, 80px);
  writing-mode: vertical-rl;
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b4b4b4;
}
@media (min-width: 1024px) { .hero__scroll { display: block; } }

/* Note agrégée */
.rating { display: flex; align-items: baseline; gap: var(--s3); font-size: var(--fs-sm); }
/* Deux couches de cinq étoiles : la couche creuse donne le gabarit, la
   couche pleine est découpée à la largeur de la note. `--c-etoile-vide`
   change avec le fond, la géométrie ne bouge pas. */
.rating__stars {
  position: relative;
  display: inline-block;
  letter-spacing: 0.12em;
  font-size: 0.9375rem;
  white-space: nowrap;
  color: var(--c-etoile-vide, rgb(255 255 255 / 0.34));
}
.rating__stars::before { content: '★★★★★'; }
.rating__stars > span {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--c-or-clair);
}
.rating__stars > span::before { content: '★★★★★'; }
.rating__value { font-weight: 700; font-size: 1.0625rem; }
.rating__count { color: inherit; opacity: 0.72; }
.section--sel .rating__stars, .main .rating__stars { --c-etoile-vide: var(--c-trait); }
.section--sel .rating__stars > span, .main .rating__stars > span { color: var(--c-or); }
.hero .rating__stars, .section--dark .rating__stars { --c-etoile-vide: rgb(255 255 255 / 0.34); }
.hero .rating__stars > span, .section--dark .rating__stars > span { color: var(--c-or-clair); }

@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;
  }
}
