/* ============================================================
   AZURA — socle commun aux trois pages
   Variables, header, pied de page, composants partagés.
   Les valeurs viennent de la planche de style validée (TOKENS.md)
   et des maquettes 02 et 13.
   ============================================================ */

:root {
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Archivo', system-ui, sans-serif;

  --bg: #0B0C0E;          /* graphite chaud, jamais de noir pur */
  --bg2: #101114;
  --bg3: #14161A;
  --ink: #D8CFC0;         /* sable */
  --ink-hi: #EDE6DA;
  --ink2: #8E9094;        /* gris céramique */
  --line: rgba(142,144,148,.22);
  --glass: rgba(255,255,255,.07);
  --glass-bd: rgba(255,255,255,.10);
  --cu: #B87B4E;          /* cuivre brossé */
  --cu2: #D9A47A;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); min-height: 100%; }
body {
  color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background 800ms ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
::selection { background: rgba(184,123,78,.35); }

/* Le focus clavier est toujours visible. Il ne se supprime jamais. */
:focus-visible { outline: 1px solid var(--cu); outline-offset: 3px; }

/* Le grain de pellicule casse le dégradé numérique du fond */
body::after {
  content: ''; position: fixed; inset: -120px; z-index: 60; pointer-events: none;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23b)'/%3E%3C/svg%3E");
  animation: az-vibrer .9s steps(3) infinite;
}
@keyframes az-vibrer {
  0% { transform: translate(0,0) } 33% { transform: translate(-14px,9px) }
  66% { transform: translate(11px,-12px) } 100% { transform: translate(0,0) }
}

/* ---------- La montre ---------- */
.az-montre {
  position: relative; width: var(--az-taille, 520px); max-width: 64vh;
  aspect-ratio: 1; transform-style: preserve-3d; will-change: transform;
  transform: rotateX(var(--az-rx, -12deg)) rotateY(var(--az-ry, 0deg));
}
.az-calque {
  position: absolute; inset: 0; transform-style: preserve-3d;
  will-change: transform, opacity;
}
.az-calque svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Le reflet suit le curseur : c'est le déplacement de la lumière sur la
   matière qui fait lire le poli, pas un dégradé fixe */
.az-speculaire {
  position: absolute; left: 50%; top: 50%; width: 78%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  mix-blend-mode: overlay; pointer-events: none; will-change: background;
}

/* ============================================================
   Header
   Maquette 13 : barre à 8 % de marge, liens espacés de 32 px.
   Au défilement, elle se contracte en pilule de 800 px et le mot
   AZURA cède la place au monogramme seul.
   ============================================================ */
.az-hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 8%; transition: all 500ms cubic-bezier(.22,.61,.36,1);
}
.az-hdr.flottant {
  top: 14px; left: 50%; right: auto; transform: translateX(-50%);
  width: min(800px, 92vw); padding: 10px 20px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(18px);
  border: 1px solid var(--glass-bd);
}
.az-hdr.flottant .az-hdr-logo span,
.az-hdr.flottant .az-hdr-badge { display: none; }

.az-hdr-logo {
  display: flex; align-items: center; gap: 12px;
  font: 400 19px/1 var(--serif); letter-spacing: .16em; color: var(--ink-hi);
}
.az-hdr-nav { display: flex; gap: 32px; }
.az-hdr-nav a {
  color: var(--ink); font: 500 11px/1 var(--sans); letter-spacing: .20em;
  text-transform: uppercase; position: relative; padding-bottom: 6px;
}
.az-hdr-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--cu); transition: width 450ms cubic-bezier(.22,.61,.36,1);
}
.az-hdr-nav a:hover::after, .az-hdr-nav a.actif::after { width: 100%; }

.az-hdr-fin { display: flex; align-items: center; gap: 16px; }
.az-hdr-badge {
  font: 500 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); padding: 9px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid rgba(184,123,78,.55);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Un seul bouton plein par page. Tout le reste est un lien souligné. */
.az-btn {
  display: inline-block; font: 500 11px/1 var(--sans); letter-spacing: .18em;
  text-transform: uppercase; color: var(--bg); padding: 11px 20px; border-radius: 6px;
  background: linear-gradient(135deg, var(--cu), #C68D5E);
  transition: filter 400ms; border: 0; cursor: pointer;
}
.az-btn:hover { filter: brightness(1.08); }

/* Lien texte souligné : le trait se dessine de la gauche vers la droite */
.az-lien {
  display: inline-block; font: 500 11px/1 var(--sans); letter-spacing: .20em;
  text-transform: uppercase; color: var(--ink-hi); position: relative; padding-bottom: 7px;
}
.az-lien::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--cu); transform-origin: left; transform: scaleX(.28);
  transition: transform 450ms cubic-bezier(.22,.61,.36,1);
}
.az-lien:hover::after { transform: scaleX(1); }

/* Menu mobile : panneau plein écran, les liens entrent l'un après l'autre */
.az-burger {
  display: none; background: none; border: 0; cursor: pointer; padding: 10px 0;
  width: 26px; height: 26px; position: relative;
}
.az-burger span {
  position: absolute; left: 3px; width: 20px; height: 1px; background: var(--ink);
  transition: transform 400ms cubic-bezier(.22,.61,.36,1), opacity 200ms;
}
.az-burger span:nth-child(1) { top: 10px; }
.az-burger span:nth-child(2) { top: 16px; }
.az-menu[open] ~ .az-burger span:nth-child(1) { transform: translateY(3px) rotate(45deg); }

.az-menu {
  position: fixed; inset: 0; z-index: 55; display: none;
  background: rgba(11,12,14,.92); backdrop-filter: blur(20px);
  padding: 88px 8% 40px; flex-direction: column;
}
.az-menu.ouvert { display: flex; }
.az-menu a.lien-menu {
  font: 400 28px/1.2 var(--serif); color: var(--ink-hi);
  padding: 18px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(10px);
  animation: az-entrer 400ms cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes az-entrer { to { opacity: 1; transform: none } }
.az-menu-bas { margin-top: auto; display: grid; gap: 16px; justify-items: start; }
.az-menu-bas .az-btn { width: 100%; text-align: center; }
.az-fermer {
  position: absolute; top: 24px; right: 8%; width: 26px; height: 26px;
  background: none; border: 0; cursor: pointer;
}
.az-fermer::before, .az-fermer::after {
  content: ''; position: absolute; left: 3px; top: 12px; width: 20px; height: 1px;
  background: var(--ink);
}
.az-fermer::before { transform: rotate(45deg); }
.az-fermer::after { transform: rotate(-45deg); }

/* ============================================================
   Pied de page, commun à toutes les pages
   Maquette 13 : trois colonnes, puis une ligne légale sous un filet.
   ============================================================ */
.az-pied {
  border-top: 1px solid var(--line); padding: 72px 8% 40px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px;
}
.az-pied-marque { display: grid; gap: 18px; align-content: start; }
.az-pied-logo { display: grid; justify-items: start; gap: 6px; }
.az-pied-logo span {
  font: 400 19px/1 var(--serif); letter-spacing: .16em; color: var(--ink-hi);
}
.az-pied-sig { font: italic 400 15px/1.5 var(--serif); color: var(--ink2); max-width: 30ch; }

.az-pied-nav { display: grid; gap: 14px; align-content: start; }
.az-pied-nav a {
  font: 500 11px/1 var(--sans); letter-spacing: .20em;
  text-transform: uppercase; color: var(--ink);
}
.az-pied-nav a:hover { color: var(--ink-hi); }

.az-pied-contact { display: grid; gap: 20px; align-content: start; }
.az-pied-contact p { margin: 0; font: 400 13px/1.5 var(--sans); color: var(--ink2); }

.az-pied-legal {
  grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; gap: 20px; flex-wrap: wrap;
  font: 400 12px/1 var(--sans); color: var(--ink2);
}

/* ============================================================
   Champ e-mail : une ligne soulignée, jamais un cadre
   ============================================================ */
.az-champ { display: grid; gap: 8px; max-width: 420px; }
.az-champ label {
  font: 500 10px/1 var(--sans); letter-spacing: .24em;
  text-transform: uppercase; color: var(--ink2);
}
.az-champ input {
  appearance: none; background: none; border: 0;
  border-bottom: 1px solid var(--line); padding: 10px 0;
  font: 300 20px/1.3 var(--sans); color: var(--ink-hi);
  transition: border-color 400ms;
}
.az-champ input::placeholder { color: rgba(142,144,148,.5); }
.az-champ input:focus { outline: none; border-bottom-color: var(--cu); }
.az-champ.erreur input { border-bottom-color: var(--cu); }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 820px) {
  .az-hdr { padding: 16px 5%; }
  .az-hdr.flottant { width: calc(100% - 24px); padding: 10px 16px; }
  .az-hdr-nav, .az-hdr-badge { display: none; }
  /* Le bouton Réserver du header ferait doublon avec celui du menu
     plein écran, et sans lui masqué il déborde à côté du burger. */
  .az-hdr-fin > .az-btn { display: none; }
  .az-burger { display: block; }
  .az-pied { grid-template-columns: 1fr; gap: 36px; padding: 56px 5% 32px; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .az-menu a.lien-menu { animation: none; opacity: 1; transform: none; }
}

/* ============================================================
   Entrée des textes au défilement
   L'état final est l'état par défaut : sans JavaScript, tout reste
   lisible. La classe az-attente n'est posée que si l'observateur existe.
   ============================================================ */
/* Le :not(.vu) évite le conflit de spécificité : sans lui, la règle qui
   cache l'emporte sur celle qui révèle, et le texte ne réapparaît jamais.
   La classe az-attente n'est posée que si l'observateur existe : sans
   JavaScript, tout reste lisible. */
.az-attente [data-ligne]:not(.vu),
.az-attente[data-entree]:not(.vu):not(:has([data-ligne])) {
  opacity: 0; transform: translateY(16px);
}
[data-ligne], [data-entree] {
  transition: opacity 500ms cubic-bezier(.22,.61,.36,1),
              transform 500ms cubic-bezier(.22,.61,.36,1);
}
