/* ==========================================================================
   SNT CRÉATION V4 — ARCHITECTURE STYLESHEET (v4-app.css)
   Supporte Vitrine publique, Espace Client (13 vues) & SNT Management (12 vues)
   Testé de 320px à 1920px · Zéro débordement horizontal · Safe-areas iOS.
   ========================================================================== */

@import url('/assets/tokens.css?v=4.0');

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--color-alabaster);
  -webkit-font-smoothing: antialiased;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
body.is-dark-page {
  background: var(--color-obsidian);
  color: var(--text-on-dark);
}

img, video, svg { max-width: 100%; display: block; }
.num { font-variant-numeric: tabular-nums; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 9999;
  background: var(--color-gold);
  color: var(--color-obsidian);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 16px; }

:focus-visible {
  outline: 2px solid var(--color-gold-deep);
  outline-offset: 3px;
}
.surface-dark :focus-visible, body.is-dark-page :focus-visible {
  outline-color: var(--color-gold-bright);
}

/* ==========================================================================
   1. HEADER FLOTTANT TRANSPARENT INTÉGRÉ À L'ARRIÈRE-PLAN
   ========================================================================== */
.v4-header-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
  padding: calc(10px + var(--safe-top)) var(--gutter) 0;
  pointer-events: none;
}
.v4-header {
  pointer-events: auto;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(20, 20, 22, 0.1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.12);
  transition: background 220ms var(--ease-out), border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.v4-header--transparent {
  background: rgba(10, 10, 12, 0.34);
  color: var(--text-on-dark);
  border-color: rgba(236, 220, 186, 0.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 16px 40px -14px rgba(0, 0, 0, 0.5);
}
.v4-header--transparent.is-scrolled {
  background: rgba(10, 10, 12, 0.9);
  border-color: rgba(236, 220, 186, 0.28);
  box-shadow: 0 20px 46px -14px rgba(0, 0, 0, 0.82);
}
.v4-header:not(.v4-header--transparent).is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 42px -16px rgba(0, 0, 0, 0.18);
}

.v4-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.v4-brand img {
  height: 38px;
  width: auto;
}

.v4-nav {
  display: none;
  align-items: center;
  gap: 4px;
}
.v4-nav a {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  opacity: 0.84;
  transition: opacity 150ms var(--ease-out), background 150ms var(--ease-out);
}
.v4-nav a:hover { opacity: 1; background: rgba(200, 164, 100, 0.14); }
.v4-nav a[aria-current="page"] { opacity: 1; font-weight: 600; background: rgba(200, 164, 100, 0.2); }

.v4-header-cta {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 460px) {
  .v4-header-shell { padding: calc(8px + var(--safe-top)) 8px 0; }
  .v4-header { padding: 7px 8px 7px 12px; gap: 6px; }
  .v4-brand img { height: 30px; }
  .hide-xs { display: none !important; }
}
@media (max-width: 359px) {
  .v4-brand img { height: 26px; }
}
@media (min-width: 1024px) {
  .v4-nav { display: flex; }
  .v4-burger { display: none !important; }
}

/* ==========================================================================
   2. BOUTONS & CIBLES TACTILES CONFORTABLES (>= 48px)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap-min);
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background 160ms var(--ease-out);
}
.btn:hover:not([disabled]) { transform: translateY(-1px); }
.btn:active:not([disabled]) { transform: scale(0.97); transition-duration: 100ms; }

.btn-gold {
  background: linear-gradient(180deg, #DFBE82 0%, #C29955 100%);
  color: #09090B;
  border-color: #D6B373;
  box-shadow: 0 1px 0 rgba(255, 250, 235, 0.65) inset, 0 8px 20px -6px rgba(200, 164, 100, 0.45);
}
.btn-dark {
  background: var(--color-charcoal);
  color: var(--color-white);
  border-color: #2A2A30;
}
.btn-outline {
  background: var(--color-white);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.surface-dark .btn-outline,
.v4-header--transparent .btn-outline,
.v4-hero .btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-on-dark);
  border-color: rgba(244, 239, 230, 0.32);
}
.btn-danger {
  background: var(--status-err-bg);
  color: var(--status-err-fg);
  border-color: var(--status-err-border);
}
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; white-space: normal; text-align: center; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   3. HERO IMMERSIF AVEC FONDU PROGRESSIF PHOTOGRAPHIE -> SECTIONS
   ========================================================================== */
.v4-hero {
  position: relative;
  min-height: min(96vh, 900px);
  display: flex;
  align-items: center;
  padding: calc(116px + var(--safe-top)) 0 clamp(80px, 9vw, 132px);
  background: var(--color-obsidian);
  color: var(--text-on-dark);
  overflow: hidden;
  border-bottom: 1px solid var(--border-on-dark);
}
.v4-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.v4-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  opacity: 0.42;
  filter: contrast(1.06) saturate(0.88);
  transform: scale(1.03);
}
/* Double fondu progressif : haut vers l'en-tête flottant + bas vers la section suivante */
.v4-hero__gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.78) 0%, rgba(8, 8, 10, 0.38) 28%, rgba(8, 8, 10, 0.68) 72%, #08080A 100%),
    radial-gradient(65% 80% at 75% 38%, rgba(200, 164, 100, 0.2) 0%, transparent 70%),
    linear-gradient(90deg, rgba(8, 8, 10, 0.88) 0%, rgba(8, 8, 10, 0.52) 55%, rgba(8, 8, 10, 0.76) 100%);
}
.v4-hero__grid3d {
  position: absolute;
  inset: -15% -10% 0 -10%;
  background-image:
    linear-gradient(rgba(236, 220, 186, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 220, 186, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 55% 45%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 55% 45%, #000 10%, transparent 75%);
  transform: perspective(900px) rotateX(26deg);
}
.v4-hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Bannière d'en-tête des pages internes (intégrée sous le header flottant) */
.v4-page-hero {
  position: relative;
  overflow: hidden;
  padding: calc(108px + var(--safe-top)) 0 clamp(40px, 5vw, 64px);
  background:
    radial-gradient(55% 85% at 85% 15%, rgba(200, 164, 100, 0.15) 0%, transparent 68%),
    linear-gradient(180deg, #FFFFFF 0%, #F4F2EC 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.v4-page-hero--dark {
  background:
    radial-gradient(60% 90% at 80% 20%, rgba(200, 164, 100, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #0E0E11 0%, #08080A 100%);
  color: var(--text-on-dark);
  border-bottom-color: var(--border-on-dark);
}

/* Transition douce section sombre -> section claire */
.section-fade-dark-to-light {
  height: 56px;
  background: linear-gradient(180deg, #08080A 0%, var(--color-alabaster) 100%);
}

/* ==========================================================================
   4. TYPOGRAPHIE & MISE EN PAGE RESPONSIVE (320px -> 1920px)
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}
.sec { padding: clamp(56px, 7.5vw, 112px) 0; }
.sec--tight { padding: clamp(36px, 4.5vw, 68px) 0; }
.surface-white { background: var(--color-white); color: var(--text-primary); }
.surface-alabaster { background: var(--color-alabaster); color: var(--text-primary); }
.surface-stone { background: var(--color-stone); color: var(--text-primary); }
.surface-dark { background: var(--color-obsidian); color: var(--text-on-dark); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  margin: 0 0 12px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; flex-shrink: 0; }
.surface-dark .eyebrow, .v4-hero .eyebrow, .v4-page-hero--dark .eyebrow { color: var(--color-gold); }

.display-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.display-title em, .h-editorial em {
  font-style: normal;
  background: linear-gradient(120deg, #F5E6C4 0%, #C8A464 60%, #ECDCBA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.surface-light .h-editorial em, .v4-page-hero:not(.v4-page-hero--dark) .h-page em {
  background: none;
  color: var(--color-gold-deep);
  font-style: normal;
}

.h-page {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.8vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.h-editorial {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.h-card {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  margin: 0;
}
.lead {
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 0 24px;
}
.surface-dark .lead, .v4-hero .lead, .v4-page-hero--dark .lead { color: var(--text-on-dark-muted); }
.muted { color: var(--text-muted); font-size: 14px; line-height: 1.55; }

.grid-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 18px; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 1024px) {
  .grid-hero { grid-template-columns: 1.15fr 0.85fr; gap: 48px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* ==========================================================================
   5. COMPOSANTS RÉUTILISABLES (Cards, MembershipCard 3D, Gallery, Progress)
   ========================================================================== */
.card {
  background: var(--color-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(18px, 2.4vw, 28px);
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.card--stone { background: var(--color-stone); }
.card--hover { transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out); }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: rgba(182, 139, 64, 0.4); }

/* ServiceCard */
.svc-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--color-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.svc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); border-color: rgba(182, 139, 64, 0.45); }
.svc-card__price {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

/* GalleryCard (Photos authentiques SNT + fallback honnête non-inventé) */
.gal-card {
  background: var(--color-obsidian-elevated);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-on-dark);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.gal-card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.55); }
.gal-card__media {
  aspect-ratio: 4 / 4.6;
  background: radial-gradient(circle at 30% 25%, #231D13, #0B0B0D 75%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gal-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ease-out);
}
.gal-card:hover .gal-card__media img { transform: scale(1.03); }
.gal-card__fallback {
  padding: 20px;
  text-align: center;
  color: var(--text-on-dark-muted);
  font-size: 13px;
}
.gal-card { --gal-accent: var(--color-gold-deep); }   /* texte d'accent sur fond clair : 7,85:1 */
.surface-dark .gal-card { --gal-accent: var(--color-gold); }   /* sur fond sombre : l'or clair */
.gal-card__body {
  padding: 18px 20px;
  background: var(--color-white);
  color: var(--text-primary);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.surface-dark .gal-card__body {
  background: #121215;
  color: var(--text-on-dark);
}
.surface-dark .gal-card__body .muted { color: var(--text-on-dark-muted); }

/* MembershipCard 3D */
.scene-3d { perspective: 1200px; min-width: 0; }
.member-card-3d {
  --rx: 2deg;
  --ry: -3deg;
  --gx: 28%;
  --gy: 18%;
  position: relative;
  border-radius: 22px;
  padding: clamp(20px, 2.8vw, 28px);
  color: var(--text-on-dark);
  background:
    radial-gradient(circle at var(--gx) var(--gy), rgba(236, 220, 186, 0.24) 0%, transparent 52%),
    linear-gradient(135deg, #211C13 0%, #101013 50%, #070709 100%);
  border: 1px solid rgba(236, 220, 186, 0.34);
  box-shadow: var(--shadow-club-3d);
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 220ms var(--ease-out);
  overflow: hidden;
}
.member-card-3d__chip {
  width: 40px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #F1DFB6 0%, #B88F4A 52%, #E5CA93 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

/* PointsProgress */
.pts-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 10px 0 8px;
}
.pts-track--light { background: #E3DFD6; }
.pts-fill {
  height: 100%;
  background: linear-gradient(90deg, #C29955, #ECDCBA);
  border-radius: var(--radius-pill);
}
.pts-track--light .pts-fill { background: var(--color-gold-deep); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge--bronze { background: var(--tier-bronze-bg); color: var(--tier-bronze-fg); }
.badge--silver { background: var(--tier-silver-bg); color: var(--tier-silver-fg); }
.badge--gold   { background: var(--tier-gold-bg);   color: var(--tier-gold-fg); }
.badge--vip    { background: var(--tier-vip-bg);    color: var(--tier-vip-fg); border: 1px solid rgba(236, 220, 186, 0.35); }
.badge--ok     { background: var(--status-ok-bg);   color: var(--status-ok-fg);   border: 1px solid var(--status-ok-border); }
.badge--warn   { background: var(--status-warn-bg); color: var(--status-warn-fg); border: 1px solid var(--status-warn-border); }
.badge--err    { background: var(--status-err-bg);  color: var(--status-err-fg);  border: 1px solid var(--status-err-border); }
.badge--info   { background: var(--status-info-bg); color: var(--status-info-fg); border: 1px solid var(--status-info-border); }

/* ==========================================================================
   6. DATATABLE, MODAL, EMPTY/LOADING/ERROR STATES & SHELLS CLIENT/ADMIN
   ========================================================================== */
.app-shell {
  display: flex;
  flex-direction: column;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 22px var(--gutter) calc(116px + var(--safe-bottom));
  gap: 26px;
}
.app-sidebar { display: none; }
.app-main { flex: 1; min-width: 0; width: 100%; }

@media (min-width: 1024px) {
  .app-shell {
    flex-direction: row;
    align-items: flex-start;
    padding-top: 28px;
    padding-bottom: 64px;
  }
  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 88px;
    background: var(--color-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 12px;
    gap: 3px;
    box-shadow: var(--shadow-card);
  }
  .mobile-bottom-nav { display: none !important; }
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
}
.side-link:hover { background: var(--color-alabaster); color: var(--text-primary); }
.side-link[aria-current="page"] { background: var(--color-charcoal); color: var(--color-white); }

/* Sub-nav horizontale mobile pour accéder aux 13 vues Client & 12 vues Admin */
.mobile-pill-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.mobile-pill-nav::-webkit-scrollbar { display: none; }
.mobile-pill-nav a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.mobile-pill-nav a[aria-current="page"] {
  background: var(--color-charcoal);
  color: var(--color-white);
  border-color: var(--color-charcoal);
}
@media (min-width: 1024px) {
  .mobile-pill-nav { display: none; }
}

/* DataTable filtrable & responsive */
.dt-card {
  background: var(--color-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.dt-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.dt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1;
}
.dt-scroll {
  width: 100%;
  overflow-x: auto;
}
.dt-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
.dt-table th {
  padding: 12px 18px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--color-alabaster);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.dt-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.dt-footer {
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--color-alabaster);
}

/* Formulaires */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--color-white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.input--sm, .select--sm { min-height: 42px; padding: 8px 14px; font-size: 14px; width: auto; min-width: 295px; }
.select--sm { min-width: 190px; }
@media (max-width: 560px) {
  .input--sm, .select--sm { width: 100%; min-width: 0; }
}

/* State boxes (EmptyState, LoadingState, ErrorState) */
.state-box {
  padding: 28px 22px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background: var(--color-alabaster);
  text-align: center;
}
.state-banner {
  padding: 15px 18px;
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.state-banner--warn { background: var(--status-warn-bg); color: var(--status-warn-fg); border-color: var(--status-warn-border); }
.state-banner--err  { background: var(--status-err-bg);  color: var(--status-err-fg);  border-color: var(--status-err-border); }
.state-banner--info { background: var(--status-info-bg); color: var(--status-info-fg); border-color: var(--status-info-border); }
.state-banner--ok   { background: var(--status-ok-bg);   color: var(--status-ok-fg);   border-color: var(--status-ok-border); }

@keyframes skel-shimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.skeleton-line {
  height: 16px;
  border-radius: var(--radius-xs);
  background: var(--color-sand);
  animation: skel-shimmer 1.5s ease-in-out infinite;
}

/* Modal <dialog> accessible */
.v4-modal {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 520px;
  width: calc(100% - 24px);
  background: var(--color-white);
  color: var(--text-primary);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}
.v4-modal::backdrop {
  background: rgba(8, 8, 10, 0.62);
  backdrop-filter: blur(6px);
}
.v4-modal__head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.v4-modal__body { padding: 22px; }
.v4-modal__foot {
  padding: 14px 22px;
  background: var(--color-alabaster);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Tiroir mobile plein écran sans débordement inférieur & Barres basses Safe-Area iOS */
.v4-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 390;
  background: rgba(8, 8, 10, 0.98);
  backdrop-filter: blur(24px);
  color: var(--text-on-dark);
  padding: calc(84px + var(--safe-top)) 22px calc(28px + var(--safe-bottom));
  overflow-y: auto;
}
.v4-drawer.is-open { display: block; }
.v4-drawer nav { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.v4-drawer nav a {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text-on-dark);
  text-decoration: none;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-on-dark);
}
.v4-drawer nav a small {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
}

/* Barre d'onglets mobile en verre (variante « pill ») : un seul indicateur déplacé en transform par un ressort critique (voir v4-app.js). */
.mobile-bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + var(--safe-bottom));
  z-index: 350;
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(20, 20, 22, 0.1);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 32px -14px rgba(0, 0, 0, 0.3);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 5px;
  gap: 0;
  isolation: isolate;
}
.glass-tabs__indicator {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 4);
  border-radius: 17px;
  background: var(--color-charcoal);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5);
  transform: translate3d(var(--tab-x, 0px), 0, 0);
  will-change: transform;
  pointer-events: none;
}
.glass-tabs__indicator::after { /* filet or : la signature, sous l'onglet actif */
  content: '';
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  border-radius: 2px;
  background: var(--color-gold);
}
.mobile-bottom-nav a {
  position: relative;
  z-index: 1;
  min-height: 52px;
  border-radius: 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding-bottom: 3px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
  transition: color 160ms ease;
}
.glass-tabs__icon { display: block; transition: transform 120ms ease-out; }
.mobile-bottom-nav a:active .glass-tabs__icon { transform: scale(0.86); }
.mobile-bottom-nav a[aria-current="page"],
.mobile-bottom-nav a.is-selected { color: var(--color-white); }
.mobile-bottom-nav a:focus-visible { outline: 2px solid var(--color-gold-deep); outline-offset: -2px; }
/* Sans JavaScript : l'onglet actif garde son fond (l'indicateur n'est affiché que quand le script le positionne). */
.mobile-bottom-nav:not(.is-ready) .glass-tabs__indicator,
.mobile-bottom-nav.no-current .glass-tabs__indicator { display: none; }
.dt-scroll:focus-visible { outline: 2px solid var(--color-gold-deep); outline-offset: 2px; }
.mobile-bottom-nav:not(.is-ready) a[aria-current="page"] { background: var(--color-charcoal); }

@media (prefers-reduced-transparency: reduce) {
  .mobile-bottom-nav { background: var(--color-white); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .mobile-bottom-nav { background: var(--color-white); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--color-charcoal); }
  .mobile-bottom-nav a { color: var(--color-charcoal); }
  .mobile-bottom-nav a[aria-current="page"], .mobile-bottom-nav a.is-selected { color: var(--color-white); }
}

.public-bookbar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + var(--safe-bottom));
  z-index: 340;
  background: rgba(12, 12, 14, 0.94);
  color: var(--text-on-dark);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-pill);
  padding: 8px 10px 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.public-bookbar.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
@media (min-width: 768px) { .public-bookbar { display: none !important; } }

/* Footer */
.v4-footer {
  background: #070709;
  color: var(--text-on-dark-muted);
  border-top: 1px solid var(--border-on-dark);
  padding: 60px 0 calc(92px + var(--safe-bottom));
}
@media (min-width: 768px) { .v4-footer { padding-bottom: calc(44px + var(--safe-bottom)); } }
.v4-footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 820px) { .v4-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.v4-footer h4, .v4-footer__title {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 12px;
}
.v4-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.v4-footer a { color: var(--text-on-dark-muted); text-decoration: none; font-size: 14px; }
.v4-footer a:hover { color: var(--color-white); }
.v4-footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border-on-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qr-sunboost { background: #FFFFFF !important; color: #08080A !important; border: 2px solid #08080A !important; }
.qr-sunboost * { color: #08080A !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skeleton-line { animation: none; }
  *, *::before, *::after { transition-duration: 0.04s !important; }
}

/* Replis d'accessibilité des surfaces translucides (en-tête, tiroir, barre de réservation, voile des modales). */
@media (prefers-reduced-transparency: reduce) {
  .v4-header, .v4-drawer, .public-bookbar, .v4-modal::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .v4-header--transparent, .v4-header--transparent.is-scrolled { background: #0A0A0C; }
  .v4-header:not(.v4-header--transparent) { background: var(--color-white); }
  .v4-drawer { background: #08080A; }
  .public-bookbar { background: #0C0C0E; }
  .v4-modal::backdrop { background: rgba(8, 8, 10, 0.88); }
}
@media (prefers-contrast: more) {
  .v4-header:not(.v4-header--transparent) { border-color: var(--color-charcoal); }
  .btn-outline { border-color: currentColor; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover:not([disabled]), .btn:active:not([disabled]) { transform: none; }
  .glass-tabs__icon { transition: none; }
}
