@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --bg: #0b0a09;
  --panel: #080808;
  --text: #f2eee9;
  --muted: #d5cfc7;
  --accent: #d28b36; /* couleur du bouton Réserver */
  --accent-dark: #a8671f;
  --green: #7cff7a;
  --alert: #ff4d4f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background:
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.9)),
    url("assets/flem-studio.jpeg") center/cover fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  font-family: "Space Grotesk", "Orbitron", system-ui, sans-serif;
  color: var(--text);
  padding: 24px 18px 36px;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.page-fade {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.35) 78%, rgba(0,0,0,0.72) 90%, #000 100%);
  z-index: 1;
}

.welcome {
  color: var(--text);
  letter-spacing: 0.03em;
  font-size: 18px;
  text-align: center;
}

h1 {
    text-align: center;
}

.brand-bar {
  width: min(1180px, 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 6px 4px;
}

.brand-logo {
  height: 100px;
  object-fit: contain;
}

.display-wrap {
  width: min(1180px, 100%);
}

.display {
  width: 100%;
  background: var(--panel);
  border-radius: 22px;
  padding: 22px 34px;
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  align-items: center;
  column-gap: 28px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65);
  position: relative;
  overflow: hidden;
}

.display::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  background: linear-gradient(0deg, rgba(0,0,0,0.8), rgba(0,0,0,0));
  pointer-events: none;
  z-index: 1;
}

.weekdays {
  position: absolute;
  top: 10px;
  left: 24px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weekdays .row span {
  margin-right: 10px;
}

.weekdays .row span:last-child {
  margin-right: 0;
}

.weekdays .row span.active {
  color: var(--accent);
  font-weight: 600;
}

.left {
  display: flex;
  align-items: center;
  gap: 22px;
}

.number-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.big {
  font-size: 72px;
}

.green {
  color: var(--green);
}

.label {
  font-size: 14px;
  color: var(--accent);
  margin-top: 6px;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ampm {
  font-size: 12px;
  opacity: 0.8;
  align-self: flex-start;
  margin-left: 12px;
  color: var(--accent);
}

.time-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 120px;
  letter-spacing: 6px;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.colon {
  margin: 0 4px;
}

.colon-small {
  font-size: 54px;
  opacity: 0.8;
  margin: 0;
}

.seconds-small {
  font-size: 54px;
  letter-spacing: 2px;
  opacity: 0.85;
}

.alert {
  color: var(--alert) !important;
}

.blink {
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  50% { opacity: 0.25; }
}

.right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  color: var(--green);
  position: relative;
  z-index: 2;
}

.mini-icons {
  font-size: 12px;
  display: flex;
  gap: 12px;
  opacity: 0.8;
  color: var(--accent);
}

.temperature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 24px;
}

.deg {
  font-size: 18px;
}

.controls {
  margin-top: 18px;
  background: rgba(8, 8, 8, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  position: relative;
  z-index: 2;
}

.controls label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.controls input {
  width: 70px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0d0d0d;
  color: var(--text);
  font-family: inherit;
}

.controls button {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  font-family: inherit;
}

.controls button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(210, 139, 54, 0.5);
}

.controls button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  opacity: 0.96;
}

.controls button:active {
  transform: translateY(0);
}

.controls .status {
  margin-left: auto;
  opacity: 0.85;
  font-size: 13px;
  color: var(--accent);
}

.robot {
  position: fixed;
  left: 64%;
  transform: translateX(-50%);
  bottom: -5%;
  width: 400px;
  height: 400px;
  animation: float 6s ease-in-out infinite;
  z-index: 5;
  pointer-events: none;
  mix-blend-mode: screen;
}

.robot spline-viewer {
  width: 100%;
  height: 100%;
  border: 0;
}

.robot::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 200px;
  height: 90px;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), #000);
  filter: blur(0px);
  opacity: 0.95;
  z-index: 6;
}

.robot-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.45));
}

.robot.fallback .robot-fallback { display: block; }
.robot.fallback spline-viewer { display: none; }

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
  100% { transform: translateY(0); }
}

@media (max-width: 900px) {
  .robot {
    right: -12%;
    bottom: 6%;
    width: clamp(220px, 62vw, 320px);
    height: clamp(220px, 62vw, 320px);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .display {
    grid-template-columns: 1fr;
    row-gap: 14px;
    text-align: center;
  }
  .weekdays {
    position: static;
    margin-bottom: -6px;
    align-items: center;
  }
  .left, .right {
    justify-content: center;
    align-items: center;
  }
  .ampm {
    align-self: center;
    margin-left: 0;
  }
  .controls {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Masquer la signature "Built with Spline" du viewer */
spline-viewer::part(branding),
spline-viewer::part(logo),
spline-viewer::part(watermark) {
  display: none !important;
  opacity: 0 !important;
}
