/* Le Lounge — robe raffinée (Lot 05) : jetons, polices, base, ambiance, mise en page.
   Portée de l'ancien webapp/templates/index.html (:root l. 21-38, CSS l. 14-664),
   raffinée : grain, lumière tamisée, animations douces. Aucun inline, aucun CDN.
   Suite : composants.css (formulaires, cartes, dialogue…), espace.css (onglets, salon). */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-italique.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --velours-0: #130d0b;
  --velours: #1a1210;
  --velours-2: #211512;
  --alcove: #271b17;
  --alcove-2: #2e201b;
  --laiton: #c9a24b;
  --laiton-vif: #e7cb86;
  --laiton-sombre: #8f6a28;
  --creme: #efe7d8;
  --fumee: #a99e8c;
  --filet: rgba(201, 162, 75, .22);
  --bordeaux: rgba(122, 26, 58, .38);
  --ok: #7fcf9a;
  --attente: #e6c878;
  --alerte: #e89a8e;
  --danger: #ef8a7a;
  --placeholder: #968a78;
  --encre-bouton: #21160c;
  --rayon: 12px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --courbe: cubic-bezier(.2, .7, .2, 1);
  --barre: 4.25rem;
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
  --gauche: env(safe-area-inset-left, 0px);
  --droite: env(safe-area-inset-right, 0px);
}

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

html {
  font-size: 100%;
  font-synthesis: none; /* fin du faux italique : la vraie italique est chargée */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--velours-0);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% -10%, #2a1d18 0%, var(--velours) 55%, var(--velours-0) 100%);
  background-color: var(--velours);
  color: var(--creme);
  font: 1rem/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain du velours : tuile 128 px, très discrète, jamais cliquable. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("../img/grain.png");
  background-size: 128px 128px;
  opacity: .06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Lumière tamisée : halo de laiton en haut, vignettage sur les bords, respiration lente. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 42% at 50% -6%, rgba(231, 203, 134, .16), transparent 70%),
    radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, .55) 100%);
  pointer-events: none;
  animation: respiration 9s ease-in-out infinite alternate;
}
@keyframes respiration { from { opacity: .78; } to { opacity: 1; } }

.cadre {
  position: relative;
  z-index: 1;
  width: min(100%, 36rem);
  margin: 0 auto;
  padding: calc(.5rem + var(--haut)) calc(1rem + var(--droite)) calc(2rem + var(--bas)) calc(1rem + var(--gauche));
}

.page { display: grid; gap: 1rem; animation: entree-page 220ms var(--courbe) both; }
.page:focus { outline: none; }
@keyframes entree-page { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; color: var(--creme); }
h1 { margin: .25rem 0; font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.05; }
h2 { margin: 0 0 .75rem; font-size: 1.45rem; line-height: 1.15; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--laiton-vif); text-underline-offset: .18em; }
a:hover { color: var(--creme); }
strong { color: var(--creme); font-weight: 650; }
img { max-width: 100%; height: auto; }

/* Accessibilité : lien d'évitement, focus laiton, texte réservé aux lecteurs d'écran. */
.evitement {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 60;
  padding: .75rem 1rem;
  border-radius: 9px;
  background: var(--laiton);
  color: var(--encre-bouton);
  font-weight: 700;
  text-decoration: none;
}
.evitement:focus { top: calc(.5rem + var(--haut)); }
:focus-visible { outline: 2px solid var(--laiton); outline-offset: 2px; }
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
[hidden] { display: none !important; }

/* En-tête : la marque en Cormorant, l'état du membre à droite. */
.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 3.25rem;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--creme);
  text-decoration: none;
  letter-spacing: .02em;
}
.marque .losange { color: var(--laiton); font-size: 1rem; }
.entete-etat { display: flex; align-items: center; gap: .5rem; margin: 0; }

/* Préférences système. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .rideau { display: none !important; }
}
@media (prefers-contrast: more) {
  :root { --fumee: #d2c8b6; --filet: rgba(201, 162, 75, .5); }
  body::before { display: none; }
}
