:root {
  --bg: #0f1620;
  --bg-alt: #17202a;
  --surface: #1c2530;
  --surface-2: #22303f;
  --border: #2c3844;
  --text: #f4f5f6;
  --text-muted: #9aa5ad;
  --text-dim: #5a646c;
  --accent: #2fbf8f;
  --accent-dark: #0f2b21;
  --danger: #d85a30;
  --radius: 8px;
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  width: 100%;
}
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* --- En-tête --- */
.site-header {
  background: var(--surface);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 0.5px solid var(--border);
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
}

.site-header nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.site-header nav a { color: var(--text-muted); font-size: 14px; }
.site-header nav a.active { color: var(--accent); }
.site-header nav a.espace-client {
  border: 0.5px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  align-items: center;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 1px; }

/* --- Bloc ascenseur / menu principal --- */
.elevator-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 32px;
  position: relative;
}

.fullwidth-triggers {
  position: absolute;
  left: 50%;
  top: 24px; /* doit correspondre au padding-top de .elevator-hero */
  transform: translateX(-50%);
  width: 100vw;
  z-index: 6;
  /* hauteur synchronisée en JS sur la hauteur réelle du bâtiment affiché */
}

.building-stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 554 / 485;
}
.building-img { width: 100%; height: 100%; display: block; object-fit: contain; position: relative; z-index: 0; }

.building-overlay {
  position: absolute;
  object-fit: contain;
  display: none;
  pointer-events: none;
  z-index: 1;
}

.cabin-marker {
  position: absolute;
  left: 36.93%;
  width: 8.45%;
  aspect-ratio: 51 / 92;
  top: 18%;
  transform: translateY(-50%);
  transition: top 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 3;
}
.cabin-icon-img { width: 100%; height: 100%; display: block; }

.label-zone {
  width: 100%;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}
.label-zone #labelZoneText {
  font-size: clamp(22px, 4.2vw, 38px);
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  letter-spacing: 0.3px;
}
.label-zone #labelZoneText .glitch-letter {
  display: inline-block;
  opacity: 0;
}
.label-zone #labelZoneText .glitch-letter.run {
  animation: glitchIn 0.5s ease-out forwards;
}
@keyframes glitchIn {
  0% { opacity: 0; }
  20% { opacity: 1; transform: translate(0,0); text-shadow: 2px 0 #ff4d6d, -2px 0 #2fbf8f; }
  35% { transform: translate(-2px,1px); text-shadow: -2px 0 #ff4d6d, 2px 0 #2fbf8f; }
  50% { transform: translate(2px,-1px); text-shadow: 2px 0 #2fbf8f, -2px 0 #ff4d6d; }
  65% { transform: translate(0,0); text-shadow: none; }
  100% { opacity: 1; transform: translate(0,0); text-shadow: 0 0 3px #2fbf8f, 0 0 8px rgba(47,191,143,0.3); }
}

.floor-trigger {
  position: absolute;
  cursor: pointer;
  z-index: 5;
  /* zone invisible : sert uniquement à détecter le survol/clic sur la fenêtre */
}
.floor-trigger.ghost { cursor: default; }

.window-light {
  position: absolute;
  opacity: 0;
  transition: opacity 1.1s ease-in-out;
  pointer-events: none;
  z-index: 2;
  display: block;
}
.window-light.lit { opacity: 1; }
.window-photo { object-fit: fill; }

@media (max-width: 560px) {
  .building-stage { max-width: 284px; }
  .floor-label { font-size: 12px; }
}

@media (max-width: 640px) {
  .contact-boxes { flex-direction: column; align-items: center; }
  .contact-box { width: auto; max-width: none; flex: none; justify-content: center; }
  .contact-box span { width: 170px; text-align: left; flex-shrink: 0; }
}

/* --- Sections génériques --- */
section.block { padding: 28px 24px; }
h1, h2, h3 { font-weight: 600; color: var(--text); }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
p { color: var(--text-muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.card {
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 24px;
  background: var(--surface);
}
.card h3 { margin: 4px 0; font-size: 16px; line-height: 1.2; }
.card p { margin: 0 0 4px; line-height: 1.3; font-size: 12px; }
.card.empty { border-style: dashed; opacity: 0.5; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; opacity: 0.9; }
.btn.secondary { background: transparent; border: 0.5px solid var(--border); color: var(--text); }

/* --- Galerie --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.gallery-grid img { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; }
.gallery-grid figcaption { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* --- Formulaires --- */
form.stack { display: flex; flex-direction: column; gap: 14px; max-width: 380px; }
label { font-size: 13px; color: var(--text-muted); }
input, select, textarea {
  background: var(--surface-2);
  border: 0.5px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
}
.error-msg { color: var(--danger); font-size: 13px; }
.success-msg { color: var(--accent); font-size: 13px; }

/* --- Calendrier --- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) 0.4fr 0.4fr;
  gap: 3px;
  margin-top: 14px;
}
.calendar-day-name { font-size: 10px; color: var(--text-dim); text-align: center; padding: 2px; }
.calendar-cell {
  min-height: 46px;
  border: 0.5px solid var(--border);
  border-radius: 5px;
  padding: 4px;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
}
.calendar-cell.other-month { opacity: 0.3; cursor: default; }
.calendar-cell.weekend { background: rgba(255,255,255,0.02); opacity: 0.4; cursor: default; }
.calendar-cell .day-num { font-size: 11px; color: var(--text-muted); }
.appt-pill {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 2px;
  display: block;
  color: #fff;
}
.appt-pill.pending { border: 1px dashed currentColor; background: transparent; }

/* --- Footer / partenaires --- */
.site-footer { background: var(--bg-alt); padding: 10px 16px; text-align: center; margin-top: auto; }
.site-footer .eyebrow { font-size: 11px; color: var(--text-dim); letter-spacing: 1px; margin-bottom: 10px; }
.partners-row { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; align-items: center; }
.partners-row img { max-height: 40px; max-width: 100px; opacity: 0.85; }

.contact-boxes {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 900px;
  margin: 6px auto 0;
}
.contact-box {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  padding: 7px 16px;
  flex: 1 1 0;
  min-width: 240px;
  max-width: 280px;
  text-align: left;
}
.contact-box i { font-size: 26px; flex-shrink: 0; color: var(--accent); }
.contact-box span { font-size: 16px; color: var(--text); line-height: 1.3; }

/* --- Carrousel photo défilant --- */
.photo-marquee {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-top: 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.photo-marquee-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation-name: marquee-scroll;
  animation-duration: 45s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0,0,0);
}
@media (hover: hover) and (pointer: fine) {
  .photo-marquee:hover .photo-marquee-track { animation-play-state: paused; }
}
.photo-marquee-track a { display: block; line-height: 0; flex-shrink: 0; }
.photo-marquee-track img {
  height: 110px;
  width: auto;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  transition: transform 0.2s ease;
  backface-visibility: hidden;
}
.photo-marquee-track img:hover { transform: scale(1.04); }
@keyframes marquee-scroll {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(-50%,0,0); }
}

.photo-marquee.photo-marquee-lg .photo-marquee-track img { height: 198px; }
.photo-marquee.photo-marquee-md .photo-marquee-track img { height: 132px; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,14,20,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
  padding: 24px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 90vh; border-radius: 10px; }
@media (max-width: 640px) {
  .site-header { flex-direction: row; align-items: center; justify-content: space-between; }
  .nav-toggle { display: flex; }
  .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 0.5px solid var(--border);
  }
  .site-header nav.open { display: flex; }
  .site-header nav a { padding: 12px 24px; width: 100%; box-sizing: border-box; }
  .site-header nav a.espace-client { border: none; border-top: 0.5px solid var(--border); border-radius: 0; }
  .elevator-section { padding: 32px 16px; }
  .card-grid { grid-template-columns: 1fr; }
}
