@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --g1: #ff7a9e;
  --g2: #ff4d6d;
  --g3: #1a0b0f;
  --text: #fff6f8;
  --muted: rgba(255, 246, 248, 0.6);
  --muted-2: rgba(255, 246, 248, 0.45);
  --accent: #ff4d6d;
  --accent-hover: #ff7a9e;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-2: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.12);
  --border-2: rgba(255, 255, 255, 0.22);
  --shadow-1: 0 14px 40px rgba(0, 0, 0, 0.28);
  --shadow-2: 0 30px 110px rgba(0, 0, 0, 0.55);
  --radius-md: 22px;
  --radius-sm: 14px;

  --free-text: #4ef2a3;
  --busy: rgba(140, 120, 180, 0.22);
  --busy-text: rgba(240, 232, 255, 0.88);
  --blocked: rgba(0, 0, 0, 0.55);

  --success: #4ef2a3;
  --error: #ff8a8a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html {
  background-color: #0d0710;
  min-height: 100%;
}

/* ----- LOADING BAR ----- */

.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow: hidden;
}
.loading-bar.active { opacity: 1; }
.loading-bar.active::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  border-radius: 2px;
  animation: loading-slide 1.4s ease-in-out infinite;
}
@keyframes loading-slide {
  0% { left: -30%; }
  100% { left: 100%; }
}

/* ----- AVATAR (member initial circles) ----- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  font-family: 'Poppins', sans-serif;
  font-feature-settings: "tnum";
}
.avatar-sm {
  width: 26px;
  height: 26px;
  font-size: 0.6rem;
}
.avatar-lg {
  width: 42px;
  height: 42px;
  font-size: 0.92rem;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #0d0710;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(255, 122, 158, 0.18), transparent 60%),
    radial-gradient(700px 500px at 85% 25%, rgba(255, 77, 109, 0.16), transparent 65%),
    linear-gradient(160deg, #1a0b0f 10%, #2a0d16 50%, #0b0b10 100%);
  pointer-events: none;
}

@media (min-width: 769px) {
  body::before {
    animation: bg-drift 28s ease-in-out infinite;
    will-change: transform;
  }
}

@keyframes bg-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-3%, 2%) scale(1.04); }
  66% { transform: translate(2%, -3%) scale(0.97); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

/* ----- TOPBAR ----- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
}

.topbar h1 {
  margin: 0;
  font-size: 0;
  line-height: 0;
  flex-shrink: 0;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar-brand .logo {
  height: 28px;
  width: auto;
  display: block;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-email {
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: 0.3rem;
}

@media (max-width: 768px) {
  .nav-email { display: none; }
}

@media (max-width: 600px) {
  .topbar { padding: 0.75rem 1rem; }
  .topbar-brand .logo { height: 24px; }
  .topbar-brand span { display: none; }
  .topbar nav .btn { padding: 0.45rem 0.85rem; font-size: 0.7rem; }
}

/* ----- LAYOUT ----- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.container-narrow { max-width: 460px; }

/* ----- BUTTONS ----- */

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border-2);
  background: var(--glass);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.74rem;
  font-family: inherit;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn:hover {
  background: var(--glass-2);
  border-color: var(--border-2);
  transform: translateY(-1px);
}
.btn:active { transform: scale(0.96) translateY(0); transition: transform 0.06s ease-out; }

.btn-primary {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border: 0;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 18px rgba(255, 77, 109, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 77, 109, 0.45);
  filter: brightness(1.06);
}
.btn-primary:active { transform: scale(0.96) translateY(0); transition: transform 0.06s ease-out; }
.btn-icon:active { transform: scale(0.92); transition: transform 0.06s ease-out; }
.btn-icon[disabled],
.btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-primary[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-2);
  background: var(--glass);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.18s ease;
}
.btn-icon:hover { background: var(--glass-2); transform: translateY(-1px); }

.btn-danger {
  background: rgba(255, 138, 138, 0.12);
  border-color: rgba(255, 138, 138, 0.35);
  color: #ff9b9b;
}
.btn-danger:hover { background: rgba(255, 138, 138, 0.2); border-color: rgba(255, 138, 138, 0.55); }

/* ----- PAGE TABS (Postes / Salle) ----- */

.page-tabs {
  display: flex;
  gap: 0.4rem;
  padding: 4px;
  margin: 0 0 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.page-tab {
  flex: 1 1 0;
  padding: 0.7rem 1.1rem;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 10px;
  transition: all 0.18s ease;
}
.page-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.page-tab.active {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.32);
}
.page-tab[hidden] { display: none; }

.page-tab-content[hidden] { display: none; }

.page-tab-content {
  animation: page-tab-fade 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes page-tab-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.meeting-calendar-intro {
  margin: 0 0 1rem;
  text-align: center;
}

/* ----- MEETING MOBILE (vertical timeline) ----- */

.meeting-day-picker {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.85rem;
  -webkit-overflow-scrolling: touch;
}

.meeting-day-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 0.55rem 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
}
.meeting-day-pill:hover { background: rgba(255, 255, 255, 0.06); }
.meeting-day-pill.is-today { border-color: rgba(255, 122, 158, 0.4); }
.meeting-day-pill.selected {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.3);
}
.meeting-day-pill-num { font-size: 1.1rem; font-weight: 700; line-height: 1; }
.meeting-day-pill-label {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em;
  margin-top: 3px; opacity: 0.8;
}

.meeting-mobile-timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meeting-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  min-height: 48px;
  font-size: 0.88rem;
  transition: filter 0.15s ease;
}
.meeting-row.clickable { cursor: pointer; }

.meeting-row-time {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  width: 40px;
  color: var(--muted);
}

.meeting-row-status {
  flex: 1;
}

.meeting-row.free {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12));
  color: rgba(255, 255, 255, 0.55);
}
.meeting-row.free.clickable:active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.22));
}

.meeting-row.busy {
  background: var(--busy);
  color: var(--busy-text);
}

.meeting-row.mine {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 500;
}
.meeting-row.mine .meeting-row-time { color: rgba(255, 255, 255, 0.75); }

.meeting-row.blocked {
  background: var(--blocked);
  color: rgba(255, 255, 255, 0.7);
}

.meeting-row.out-of-window {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.025) 6px,
    rgba(255, 255, 255, 0.06) 6px,
    rgba(255, 255, 255, 0.06) 12px
  );
  color: rgba(255, 255, 255, 0.3);
}

.meeting-row-block {
  min-height: calc(48px * var(--row-span, 1) + 4px * (var(--row-span, 1) - 1));
  align-items: stretch;
}
.meeting-row-block .meeting-row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.meeting-row-block .meeting-row-status {
  font-size: 1rem;
  font-weight: 600;
}
.meeting-row-block .meeting-row-range {
  font-size: 0.75rem;
  opacity: 0.85;
  letter-spacing: 0.04em;
}

/* ----- MEETING ROOM HOURLY GRID ----- */

.meeting-marker { margin-top: 4rem; }

.meeting-calendar-section {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  overflow-x: auto;
  box-shadow: var(--shadow-1);
}

.meeting-grid-css {
  display: grid;
  grid-template-columns: 64px repeat(5, minmax(110px, 1fr));
  grid-auto-rows: 42px;
  gap: 4px;
  min-width: 700px;
}

.hour-corner-cell {
  background: transparent;
}

.meeting-day-header-cell {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text);
  text-transform: capitalize;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
}
.meeting-day-header-cell.is-today {
  background: rgba(255, 77, 109, 0.12);
  color: var(--accent-hover);
}

.hour-label-cell {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meeting-cell {
  border-radius: 7px;
  font-size: 0.78rem;
  text-align: center;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0.25rem;
  transition: filter 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.meeting-cell-block {
  padding: 0.5rem 0.55rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.meeting-cell-block .mc-text {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meeting-cell-block .mc-range {
  font-size: 0.7rem;
  opacity: 0.85;
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-align: center;
}

.meeting-cell:not(.meeting-cell-block) .mc-text { display: none; }
.meeting-cell:not(.meeting-cell-block) .mc-range { display: none; }

/* Hover lift on bookings (desk + meeting) */
.meeting-cell.mine.clickable:hover,
.meeting-cell.busy.clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.calendar td.slot.mine.clickable:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 158, 0.5);
}

/* Press feedback (active scale) */
.meeting-cell.clickable:active,
.calendar td.slot.clickable:active,
.meeting-row.clickable:active {
  transform: scale(0.97);
  transition: transform 0.06s ease-out;
}

/* Cascade animation on meeting grid */
@keyframes meeting-slide-in-right {
  0% { opacity: 0; transform: translateX(40px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes meeting-slide-in-left {
  0% { opacity: 0; transform: translateX(-40px); }
  100% { opacity: 1; transform: translateX(0); }
}
#meeting-grid.slide-from-right .meeting-grid-css > *,
#meeting-grid.slide-from-left .meeting-grid-css > * {
  opacity: 0;
  will-change: transform, opacity;
}
#meeting-grid.slide-from-right .meeting-grid-css > * {
  animation: meeting-slide-in-right 0.42s cubic-bezier(0.34, 1.4, 0.5, 1) forwards;
}
#meeting-grid.slide-from-left .meeting-grid-css > * {
  animation: meeting-slide-in-left 0.42s cubic-bezier(0.34, 1.4, 0.5, 1) forwards;
}
/* Stagger by approximate column position */
#meeting-grid.slide-from-right .meeting-grid-css > *:nth-child(6n+2),
#meeting-grid.slide-from-left .meeting-grid-css > *:nth-child(6n+2) { animation-delay: 30ms; }
#meeting-grid.slide-from-right .meeting-grid-css > *:nth-child(6n+3),
#meeting-grid.slide-from-left .meeting-grid-css > *:nth-child(6n+3) { animation-delay: 60ms; }
#meeting-grid.slide-from-right .meeting-grid-css > *:nth-child(6n+4),
#meeting-grid.slide-from-left .meeting-grid-css > *:nth-child(6n+4) { animation-delay: 90ms; }
#meeting-grid.slide-from-right .meeting-grid-css > *:nth-child(6n+5),
#meeting-grid.slide-from-left .meeting-grid-css > *:nth-child(6n+5) { animation-delay: 120ms; }
#meeting-grid.slide-from-right .meeting-grid-css > *:nth-child(6n),
#meeting-grid.slide-from-left .meeting-grid-css > *:nth-child(6n) { animation-delay: 150ms; }

@media (prefers-reduced-motion: reduce) {
  #meeting-grid.slide-from-right .meeting-grid-css > *,
  #meeting-grid.slide-from-left .meeting-grid-css > * {
    animation: none;
    opacity: 1;
  }
}

.meeting-cell.clickable { cursor: pointer; }

.meeting-cell.free {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.13));
  color: rgba(255, 255, 255, 0.5);
}
.meeting-cell.free.clickable:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.26));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.meeting-cell.busy {
  background: var(--busy);
  color: var(--busy-text);
  font-size: 0.7rem;
  font-weight: 500;
}
.meeting-cell.busy.clickable:hover { background: rgba(140, 120, 180, 0.38); cursor: pointer; }

.meeting-cell.mine {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.meeting-cell.mine.clickable:hover { filter: brightness(1.1); }

.meeting-cell.blocked {
  background: var(--blocked);
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.meeting-cell.blocked.clickable:hover { background: rgba(0, 0, 0, 0.7); }

.meeting-cell.out-of-window {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.025) 6px,
    rgba(255, 255, 255, 0.06) 6px,
    rgba(255, 255, 255, 0.06) 12px
  );
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.2);
}

/* ----- HOURLY MODAL ----- */

.hourly-duration-section {
  margin: 1rem 0 0;
}

.hourly-duration-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.hourly-duration-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 0.45rem;
}

.hourly-dur-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.4rem;
  border: 1px solid var(--border-2);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.hourly-dur-btn:hover { background: rgba(255, 255, 255, 0.06); }
.hourly-dur-btn.active {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.32);
}

.dur-hours { font-size: 0.95rem; font-weight: 600; }
.dur-range { font-size: 0.65rem; opacity: 0.7; margin-top: 2px; letter-spacing: 0.04em; }

@media (max-width: 600px) {
  .meeting-grid-table { min-width: 560px; }
}

/* ----- LOGIN BANNER (public view) ----- */

.login-banner {
  background: linear-gradient(135deg, rgba(255, 122, 158, 0.12), rgba(255, 77, 109, 0.18));
  border: 1px solid rgba(255, 122, 158, 0.28);
  border-radius: 16px;
  padding: 0.95rem 1.3rem;
  margin-bottom: 1.4rem;
  position: relative;
  overflow: hidden;
}

.login-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.login-banner-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.login-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.login-banner-text strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.login-banner-text span {
  color: rgba(255, 246, 248, 0.75);
  font-size: 0.85rem;
}

.login-banner-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .login-banner { padding: 0.85rem 1rem; }
  .login-banner-content { flex-direction: column; align-items: stretch; }
  .login-banner-btn { width: 100%; text-align: center; }
}

.nav-login {
  padding: 0.55rem 1.1rem;
  font-size: 0.74rem;
}

/* ----- VIEW TOGGLE (semaine / mois) ----- */

.view-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}

.view-toggle-btn {
  padding: 0.4rem 0.95rem;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  transition: all 0.18s ease;
}

.view-toggle-btn.active {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.32);
}

.view-toggle-btn:hover:not(.active) {
  color: var(--text);
}


/* ----- MONTH VIEW ----- */

.month-view {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow-1);
}

.month-header {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.month-header-cell {
  text-align: center;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 500;
  padding: 0.4rem 0;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.month-cell {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.7rem 0.55rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 78px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.month-cell:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  background: rgba(255, 255, 255, 0.08);
}

.month-cell.other-month {
  opacity: 0.35;
}

.month-cell.is-today {
  border-color: rgba(255, 122, 158, 0.55);
  background: rgba(255, 77, 109, 0.08);
}

.month-cell.is-today .month-cell-day {
  color: var(--accent-hover);
  font-weight: 700;
}

.month-cell.has-mine::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 77, 109, 0.6);
}

.month-cell-day {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
}

.month-cell-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin: 0.5rem 0 0.3rem;
}

.month-cell-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(78, 242, 178, 0.5), rgba(255, 77, 109, 0.6));
  transition: width 0.4s ease-out;
}

.month-cell-stats {
  font-size: 0.66rem;
  color: var(--muted);
  text-align: right;
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .month-cell {
    min-height: 64px;
    padding: 0.45rem 0.5rem 0.4rem;
  }
  .month-cell-day { font-size: 0.95rem; }
  .month-cell-stats { font-size: 0.6rem; }
  .month-header-cell { font-size: 0.6rem; }
  .month-view { padding: 0.6rem; }
}

/* ----- FILTER BAR ----- */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.filter-bar select {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.filter-bar select:focus { outline: none; border-color: var(--accent); }

/* ----- MEMBERS SEARCH ----- */

.members-search-input {
  width: 100%;
  max-width: 360px;
  padding: 0.55rem 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}
.members-search-input:focus { outline: none; border-color: var(--accent); }
.members-search-input::placeholder { color: rgba(255, 255, 255, 0.32); }

/* ----- MOVE MODAL ----- */

.form-row-stacked {
  display: block;
  margin-bottom: 0.5rem;
}
.form-row-stacked label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.form-row-stacked input[type="date"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  text-align: left;
}
.form-row-stacked input[type="date"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* ----- WEEK NAV ----- */

.week-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.week-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.week-nav h2 {
  font-size: 1.6rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.15;
  text-transform: capitalize;
}

.week-nav-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.week-nav-bottom #today-btn {
  margin: 0 0.4rem;
}

@media (max-width: 600px) {
  .week-nav h2 { font-size: 1.25rem; }
  .week-nav-top { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .view-toggle { align-self: flex-start; }
}

/* ----- CALENDAR ----- */

.calendar {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-1);
  padding: 6px;
}

.calendar table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  min-width: 720px;
  table-layout: fixed;
}

.calendar th.corner,
.calendar td.resource-name {
  width: 160px;
}

.calendar th, .calendar td {
  border: 0;
  padding: 0.55rem 0.4rem;
  font-size: 0.78rem;
  text-align: center;
  vertical-align: middle;
  border-radius: 7px;
}

.calendar th {
  background: rgba(0, 0, 0, 0.25);
  font-weight: 500;
  text-transform: capitalize;
}
.calendar th.corner { background: transparent; border-top: 0; border-left: 0; }
.calendar th.day-header { font-weight: 600; color: var(--text); }
.calendar th.slot-header { font-weight: 400; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }

.calendar th.day-header.is-today {
  color: var(--accent-hover);
  position: relative;
  background: rgba(255, 77, 109, 0.12) !important;
}
.calendar th.day-header.is-today::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  border-radius: 2px;
}

.calendar td.resource-name {
  text-align: left;
  padding: 0.55rem 0.85rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  vertical-align: -2px;
  margin-right: 0.5rem;
  opacity: 0.7;
  display: inline-block;
}

.mobile-resource-name {
  display: flex;
  align-items: center;
  gap: 0;
}
.mobile-resource-name .resource-icon {
  margin-right: 0.45rem;
}

.calendar td.slot {
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar td.slot {
  height: 42px;
  cursor: default;
  transition: filter 0.15s ease, background 0.15s ease;
}
.calendar td.slot.clickable { cursor: pointer; }

.calendar td.slot.free {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.13));
  color: rgba(255, 255, 255, 0.5);
}
.calendar td.slot.free.clickable:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.26));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32),
              inset 0 0 14px rgba(255, 255, 255, 0.12);
}

.calendar td.slot.busy {
  background: var(--busy);
  color: var(--busy-text);
  font-size: 0.7rem;
  font-weight: 500;
}
.calendar td.slot.busy.clickable:hover {
  background: rgba(140, 120, 180, 0.38);
  cursor: pointer;
}

.calendar td.slot.mine {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.calendar td.slot.mine.clickable:hover { filter: brightness(1.1); }
.calendar td.slot.mine[draggable="true"] { cursor: grab; }
.calendar td.slot.mine[draggable="true"]:active { cursor: grabbing; }
.calendar td.slot.dragging { opacity: 0.4; }
.calendar td.slot.drag-over {
  background: linear-gradient(135deg, rgba(255, 122, 158, 0.32), rgba(255, 77, 109, 0.45)) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 122, 158, 0.7), inset 0 0 16px rgba(255, 77, 109, 0.3) !important;
}

.calendar td.slot.blocked {
  background: var(--blocked);
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.calendar td.slot.blocked.clickable:hover { background: rgba(0, 0, 0, 0.7); }

.calendar td.slot.out-of-window {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.025) 6px,
    rgba(255, 255, 255, 0.06) 6px,
    rgba(255, 255, 255, 0.06) 12px
  );
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.2);
}
.calendar td.slot.out-of-window.mine {
  background: rgba(255, 77, 109, 0.18);
  color: rgba(255, 255, 255, 0.45);
}

/* ----- LEGEND ----- */

.legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.2rem;
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 0.45rem; }

.dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
}
.dot-free { background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.35)); border: 1px solid rgba(255, 255, 255, 0.4); }
.dot-busy { background: rgba(140, 120, 180, 0.35); border: 1px solid rgba(140, 120, 180, 0.55); }
.dot-mine { background: linear-gradient(90deg, var(--g1), var(--g2)); }

/* ----- LOGIN ----- */

.login-main {
  min-height: calc(100vh - 64px - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

.login-card {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem 2.2rem 2.2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
  animation: login-card-in 0.55s cubic-bezier(0.34, 1.4, 0.5, 1) backwards;
}

@keyframes login-card-in {
  0% { opacity: 0; transform: translateY(24px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
}

.login-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.login-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--g1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.login-tagline {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 320px;
  margin-inline: auto;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.login-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

.login-form input[type="email"] {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.login-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.45);
}

.login-form input::placeholder { color: rgba(255, 255, 255, 0.32); }

.login-submit {
  margin-top: 0.9rem;
  padding: 0.95rem 1.4rem;
  font-size: 0.85rem;
  width: 100%;
}

.login-hint {
  margin: 1.4rem 0 0;
  text-align: center;
  line-height: 1.55;
  color: var(--muted-2);
}

#login-message {
  margin-top: 0.9rem;
  text-align: center;
}

/* Old .login-box kept for backwards compat (unused now) */
.login-box {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 2rem 1.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 3rem;
  box-shadow: var(--shadow-1);
}
.login-box h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}
.login-box form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.78rem; }

/* ----- INPUTS (dark theme unified) ----- */

.login-box input,
.inline-form input,
.inline-form select,
.form-row input,
.report-controls select,
#block-section input {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.login-box input:focus,
.inline-form input:focus,
.inline-form select:focus,
.form-row input:focus,
.report-controls select:focus,
#block-section input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.45);
}
.login-box input::placeholder,
.inline-form input::placeholder,
.form-row input::placeholder,
#block-section input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

/* ----- MESSAGES ----- */

.message {
  font-size: 0.85rem;
  min-height: 1.2rem;
  margin-top: 0.6rem;
  line-height: 1.4;
}
.message.success { color: var(--success); }
.message.error { color: var(--error); }

.loading {
  color: var(--muted);
  padding: 2rem;
  text-align: center;
}

/* ----- MODAL ----- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal[hidden] { display: none; }

.modal-content {
  background: linear-gradient(180deg, rgba(40, 18, 28, 0.94), rgba(20, 8, 14, 0.96));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 1.85rem 1.65rem;
  width: 100%;
  max-width: 460px;
  position: relative;
  box-shadow: var(--shadow-2);
  color: var(--text);
}

@keyframes modal-content-in {
  0% { opacity: 0; transform: scale(0.92) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-content-anim {
  animation: modal-content-in 0.28s cubic-bezier(0.34, 1.4, 0.5, 1);
}

@keyframes modal-bg-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
.modal:not([hidden]) {
  animation: modal-bg-in 0.18s ease-out;
}

/* Bottom sheet style on mobile */
@media (max-width: 600px) {
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  .modal-content {
    max-width: 100%;
    width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: 92vh;
    overflow-y: auto;
    padding: 1.6rem 1.25rem 2.2rem;
    margin: 0;
  }
  .modal-content::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 2px;
    pointer-events: none;
  }
  @keyframes modal-content-in {
    0% { opacity: 0; transform: translateY(100%); }
    100% { opacity: 1; transform: translateY(0); }
  }
  .modal-content-anim {
    animation: modal-content-in 0.32s cubic-bezier(0.2, 0.85, 0.3, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-content-anim,
  .modal:not([hidden]) { animation: none; }
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.modal-content > .muted {
  margin: 0;
  font-size: 0.88rem;
  white-space: pre-line;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}
.modal-actions .btn-primary,
.modal-actions .btn {
  flex: 1 1 140px;
  padding: 0.7rem 1rem;
  font-size: 0.74rem;
}

/* ----- MODAL PRICES ----- */

.modal-prices {
  margin: 0.9rem 0 0;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.85rem;
}
.price-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  padding: 0.3rem 0;
  align-items: baseline;
}
.price-line + .price-line {
  border-top: 1px solid var(--border);
  margin-top: 0.35rem;
  padding-top: 0.55rem;
}
.price-line .ttc {
  color: var(--muted);
  font-size: 0.78rem;
}

.price-strike {
  text-decoration: line-through;
  margin-right: 0.4rem;
  opacity: 0.5;
  font-weight: 400;
}

.booking-code-status {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  min-height: 1.2rem;
  color: var(--muted);
}
.booking-code-status.success { color: var(--success); }
.booking-code-status.error { color: var(--error); }

/* ----- RECURRENCE SECTION ----- */

.recurrence-section {
  margin: 0.9rem 0 0;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.88rem;
}

.recurrence-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
}

.recurrence-toggle input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.recurrence-options {
  margin-top: 0.7rem;
  padding-left: 1.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

#recurrence-weeks {
  width: 56px;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: center;
}

#recurrence-weeks:focus {
  outline: none;
  border-color: var(--accent);
}

/* ----- BLOCK SECTION ----- */

.block-divider {
  text-align: center;
  margin: 1.4rem 0 0.85rem;
  position: relative;
}
.block-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.block-divider span {
  position: relative;
  background: linear-gradient(180deg, rgba(40, 18, 28, 0.94), rgba(40, 18, 28, 0.94));
  padding: 0 0.8rem;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
#block-section input { width: 100%; margin-bottom: 0.7rem; }

/* ----- BLOCK DAY DATE PICKER (admin) ----- */

.block-day-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.block-day-form-bottom {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.block-day-form-bottom input {
  flex: 1 1 220px;
}
.block-day-form-bottom button {
  flex: 0 0 auto;
}

.block-day-picker {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  max-width: 420px;
}

.bdp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.bdp-month-label {
  font-size: 1rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: -0.01em;
}

.bdp-nav {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.15s ease;
  padding: 0;
}
.bdp-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-2);
}

.bdp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}
.bdp-weekend {
  color: var(--muted-2);
  opacity: 0.5;
}

.bdp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.bdp-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 8px;
  padding: 0;
  transition: all 0.15s ease;
}
.bdp-day:hover:not(:disabled):not(.bdp-empty) {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.bdp-day.bdp-empty {
  background: transparent;
  cursor: default;
}

.bdp-day.is-today {
  border-color: rgba(255, 122, 158, 0.5);
  color: var(--accent-hover);
  font-weight: 700;
}

.bdp-day.is-selected {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.35);
}

.bdp-day.is-disabled,
.bdp-day:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.bdp-day.is-weekend:not(.is-disabled) {
  opacity: 0.5;
}

.bdp-selected {
  margin: 1rem 0 0;
  padding: 0.7rem 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
}
.bdp-selected.muted {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 480px) {
  .block-day-picker { padding: 0.8rem 0.85rem; max-width: 100%; }
  .bdp-day { font-size: 0.78rem; }
}

/* ----- ADMIN TABS ----- */

.admin-tabs {
  display: flex;
  gap: 0.3rem;
  margin: 0 0 1.8rem;
  padding: 4px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-tab {
  flex: 1 1 0;
  min-width: max-content;
  padding: 0.65rem 1rem;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 10px;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.admin-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.admin-tab.active {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.3);
}

.admin-tab-content {
  animation: tab-fade-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.admin-tab-content[hidden] { display: none; }

@keyframes tab-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scrollable wrapper for tables on mobile */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

@media (max-width: 600px) {
  .admin-tab {
    padding: 0.55rem 0.85rem;
    font-size: 0.72rem;
    flex: 0 0 auto;
  }
  .admin-tabs { padding: 3px; }
  .table-wrap { margin: 0 -1.5rem; padding: 0 1.5rem; }
  .data-table { min-width: 560px; }
  .pricing-form { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .form-row input { text-align: left; }
  .inline-form input,
  .inline-form select { flex: 1 1 100%; }
  .inline-form button { flex: 1 1 100%; }
  .report-controls { flex-direction: column; align-items: stretch; }
  .report-controls select,
  .report-controls button { width: 100%; }
}

/* ----- ADMIN SECTIONS ----- */

.admin-section,
.my-section {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-1);
}
.admin-section h2 {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ----- DATA TABLE ----- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th, .data-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: middle;
}
.data-table th {
  background: transparent;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.data-table input[type="text"] {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  width: 100%;
}
.data-table input[type="text"]:hover,
.data-table input[type="text"]:focus {
  border-color: var(--border-2);
  background: rgba(0, 0, 0, 0.3);
  outline: none;
}
.data-table .total-row td {
  border-top: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.25);
}

/* ----- TAG / SWITCH ----- */

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tag-admin {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
}
.tag-member {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  border: 1px solid var(--border);
}

.code-tag {
  display: inline-block;
  background: rgba(255, 122, 158, 0.15);
  color: var(--accent-hover);
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 600;
  border: 1px solid rgba(255, 122, 158, 0.32);
  letter-spacing: 0.04em;
}

.code-input {
  text-transform: uppercase;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.code-percent-input {
  flex: 0 0 80px !important;
  text-align: center;
}

.role-toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: filter 0.15s ease;
}
.role-toggle:hover { filter: brightness(1.2); }

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  transition: 0.2s;
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .slider {
  background: linear-gradient(90deg, var(--g1), var(--g2));
}
.switch input:checked + .slider::before {
  transform: translateX(16px);
}

/* ----- FORMS ----- */

.inline-form {
  display: flex;
  gap: 0.55rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.inline-form input,
.inline-form select { flex: 1 1 200px; }

.pricing-form {
  display: grid;
  gap: 0.85rem;
  max-width: 480px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  align-items: center;
  gap: 1rem;
}
.form-row label {
  font-size: 0.88rem;
  color: var(--muted);
}
.form-row input { text-align: right; }

.report-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.report-controls label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ----- REPORT HERO CARD ----- */

.report-hero-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 122, 158, 0.1), rgba(255, 77, 109, 0.16));
  border: 1px solid rgba(255, 122, 158, 0.28);
  border-radius: 18px;
  padding: 1.8rem 2rem 1.6rem;
  margin: 1.5rem 0;
  overflow: hidden;
}

.report-hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
}

.report-hero-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-hover);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.report-hero-amount-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.report-hero-amount {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  background: linear-gradient(135deg, #fff 50%, var(--g1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.report-hero-amount-suffix {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.7;
}

.report-hero-detail {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.report-hero-detail strong {
  color: var(--text);
  font-weight: 600;
}

.report-hero-stats {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 122, 158, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
}

.report-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-hero-stat-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
.report-hero-stat-value .muted {
  font-size: 0.78rem;
  font-weight: 400;
}

.report-hero-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 600px) {
  .report-hero-card { padding: 1.4rem 1.3rem 1.3rem; border-radius: 14px; }
  .report-hero-amount { font-size: 2.2rem; }
  .report-hero-amount-suffix { font-size: 1.1rem; }
  .report-hero-stats { gap: 1.4rem; }
  .report-hero-stat-value { font-size: 1rem; }
}

/* ----- MES RÉSERVATIONS ----- */

.page-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
}
.my-section h3 {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.bookings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.booking-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem 0.85rem 0.85rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 14px;
  transition: border-color 0.18s ease;
}
.booking-item:hover {
  border-color: var(--border-2);
}

.booking-date-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 70px;
  background: linear-gradient(160deg, rgba(255, 122, 158, 0.14), rgba(255, 77, 109, 0.18));
  border: 1px solid rgba(255, 122, 158, 0.25);
  border-radius: 12px;
  padding: 0.35rem;
  flex-shrink: 0;
  user-select: none;
}

.booking-date-day {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}
.booking-date-month {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-hover);
  font-weight: 600;
  margin-top: 4px;
}
.booking-date-weekday {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 1px;
}

.booking-info {
  min-width: 0;
}
.booking-resource {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  margin-bottom: 3px;
}
.booking-meta {
  font-size: 0.83rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: baseline;
}
.booking-meta .booking-price {
  margin: 0;
  display: inline;
  color: var(--text);
  font-weight: 500;
}
.booking-meta .booking-price.free {
  color: var(--success);
  font-weight: 600;
}
.booking-footer-info {
  margin-top: 6px;
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.booking-locked {
  color: var(--muted-2);
}
.booking-series-link {
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.78rem;
  color: #ff9b9b;
  text-decoration: underline;
  cursor: pointer;
}
.booking-series-link:hover { color: #ffaaaa; }

.booking-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: center;
}

.booking-action-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  padding: 0;
  transition: all 0.18s ease;
}
.booking-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-2);
  transform: translateY(-1px);
}
.booking-action-btn:active {
  transform: scale(0.92);
}
.booking-action-btn svg {
  width: 16px;
  height: 16px;
}
.booking-action-btn.danger {
  color: rgba(255, 155, 155, 0.85);
}
.booking-action-btn.danger:hover {
  background: rgba(255, 138, 138, 0.18);
  border-color: rgba(255, 138, 138, 0.45);
  color: #ff9b9b;
}

@media (max-width: 600px) {
  .booking-item {
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "date info"
      "actions actions";
    gap: 0.75rem;
    padding: 0.75rem;
  }
  .booking-date-pill { width: 56px; height: 64px; grid-area: date; }
  .booking-info { grid-area: info; }
  .booking-actions { grid-area: actions; justify-content: flex-end; }
  .booking-date-day { font-size: 1.3rem; }
}

.booking-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-mini {
  padding: 0.4rem 0.85rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.btn-series {
  border-color: rgba(255, 138, 138, 0.5) !important;
  background: rgba(255, 138, 138, 0.18) !important;
  color: #ffaaaa !important;
}

.booking-note {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  padding: 0.4rem 0.7rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border-left: 2px solid var(--accent);
  display: inline-block;
}

.booking-price {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}
.booking-price s { opacity: 0.5; margin-right: 0.3rem; font-weight: 400; }
.booking-price.free {
  color: var(--success);
  font-weight: 600;
}

.btn-ics {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.btn-ics:hover { background: rgba(255, 255, 255, 0.12) !important; }

.ics-menu {
  position: relative;
  display: inline-block;
}

.ics-menu-content {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  background: linear-gradient(180deg, rgba(40, 18, 28, 0.96), rgba(20, 8, 14, 0.98));
  border: 1px solid var(--border-2);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  padding: 0.4rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: ics-menu-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ics-menu-content[hidden] { display: none; }

@keyframes ics-menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ics-menu-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
  line-height: 1.3;
  transition: background 0.15s;
}
.ics-menu-item:hover { background: rgba(255, 255, 255, 0.07); }

.ics-menu-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ics-menu-item strong { font-weight: 500; font-size: 0.85rem; }
.ics-menu-item .muted { display: block; margin-top: 1px; }

/* ----- MONTH SUMMARY (Mes réservations) ----- */

.month-summary {
  margin-bottom: 1.5rem;
}

.month-summary-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 122, 158, 0.12), rgba(255, 77, 109, 0.18));
  border: 1px solid rgba(255, 122, 158, 0.28);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  overflow: hidden;
}

.month-summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--g1), var(--g2));
}

.month-summary-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.month-summary-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

.month-summary-amount {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.05;
}

.month-summary-detail {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.month-summary-free {
  color: var(--success);
}

/* ----- BOOKING NOTES INPUT ----- */

.booking-notes-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  font-size: 0.85rem;
  font-family: inherit;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  margin: 0.9rem 0 0.5rem;
  transition: border-color 0.18s ease;
}
.booking-notes-input:focus {
  outline: none;
  border-color: var(--accent);
}
.booking-notes-input::placeholder { color: rgba(255, 255, 255, 0.32); }

/* ----- TOAST ----- */

#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  background: rgba(20, 8, 14, 0.96);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 0.85rem;
  box-shadow: var(--shadow-1);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 320px;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--error); }

@media (max-width: 600px) {
  #toast-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }
  .toast { max-width: none; }
}

/* ----- EMPTY STATE ----- */

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
}
.empty-state p {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ----- CALENDAR MOBILE VIEW ----- */

.mobile-day-view {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
}

@keyframes card-in-right {
  0% {
    opacity: 0;
    transform: translateX(60px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes card-in-left {
  0% {
    opacity: 0;
    transform: translateX(-60px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.mobile-day-view.slide-from-right .mobile-resource,
.mobile-day-view.slide-from-left .mobile-resource {
  opacity: 0;
  will-change: transform, opacity;
}

.mobile-day-view.slide-from-right .mobile-resource {
  animation: card-in-right 0.46s cubic-bezier(0.34, 1.5, 0.5, 1) forwards;
}

.mobile-day-view.slide-from-left .mobile-resource {
  animation: card-in-left 0.46s cubic-bezier(0.34, 1.5, 0.5, 1) forwards;
}

.mobile-day-view .mobile-resource:nth-child(1) { animation-delay: 0ms; }
.mobile-day-view .mobile-resource:nth-child(2) { animation-delay: 40ms; }
.mobile-day-view .mobile-resource:nth-child(3) { animation-delay: 80ms; }
.mobile-day-view .mobile-resource:nth-child(4) { animation-delay: 120ms; }
.mobile-day-view .mobile-resource:nth-child(5) { animation-delay: 160ms; }
.mobile-day-view .mobile-resource:nth-child(6) { animation-delay: 200ms; }
.mobile-day-view .mobile-resource:nth-child(7) { animation-delay: 240ms; }
.mobile-day-view .mobile-resource:nth-child(8) { animation-delay: 280ms; }

@keyframes label-pop {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes desk-row-in-right {
  0% { opacity: 0; transform: translateX(40px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes desk-row-in-left {
  0% { opacity: 0; transform: translateX(-40px); }
  100% { opacity: 1; transform: translateX(0); }
}

.calendar.slide-from-right tbody tr,
.calendar.slide-from-left tbody tr {
  opacity: 0;
  will-change: transform, opacity;
}

.calendar.slide-from-right tbody tr {
  animation: desk-row-in-right 0.42s cubic-bezier(0.34, 1.45, 0.5, 1) forwards;
}

.calendar.slide-from-left tbody tr {
  animation: desk-row-in-left 0.42s cubic-bezier(0.34, 1.45, 0.5, 1) forwards;
}

.calendar tbody tr:nth-child(1) { animation-delay: 0ms; }
.calendar tbody tr:nth-child(2) { animation-delay: 35ms; }
.calendar tbody tr:nth-child(3) { animation-delay: 70ms; }
.calendar tbody tr:nth-child(4) { animation-delay: 105ms; }
.calendar tbody tr:nth-child(5) { animation-delay: 140ms; }
.calendar tbody tr:nth-child(6) { animation-delay: 175ms; }
.calendar tbody tr:nth-child(7) { animation-delay: 210ms; }
.calendar tbody tr:nth-child(8) { animation-delay: 245ms; }

@keyframes thead-fade {
  0% { opacity: 0.3; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.calendar.slide-from-right thead,
.calendar.slide-from-left thead {
  animation: thead-fade 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .calendar.slide-from-right tbody tr,
  .calendar.slide-from-left tbody tr,
  .calendar.slide-from-right thead,
  .calendar.slide-from-left thead {
    animation: none;
    opacity: 1;
  }
}

#week-label.label-pop {
  animation: label-pop 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-day-view.slide-from-right .mobile-resource,
  .mobile-day-view.slide-from-left .mobile-resource {
    animation: none;
    opacity: 1;
  }
  #week-label.label-pop { animation: none; }
}

.mobile-resource {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.mobile-resource-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.92rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-slots {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.mobile-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  min-height: 52px;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
  transition: filter 0.15s ease;
}

.mobile-slot-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 3px;
}

.mobile-slot-status {
  font-size: 0.82rem;
  font-weight: 500;
}

.mobile-slot.clickable { cursor: pointer; }

.mobile-slot.free {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.13));
  color: rgba(255, 255, 255, 0.7);
}
.mobile-slot.free.clickable:active {
  filter: brightness(1.4);
}

.mobile-slot.busy {
  background: var(--busy);
  color: var(--busy-text);
}

.mobile-slot.mine {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 77, 109, 0.25);
}
.mobile-slot.mine .mobile-slot-label {
  color: rgba(255, 255, 255, 0.7);
}

.mobile-slot.blocked {
  background: var(--blocked);
  color: rgba(255, 255, 255, 0.7);
}
.mobile-slot.blocked .mobile-slot-status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-slot.out-of-window {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.025) 6px,
    rgba(255, 255, 255, 0.06) 6px,
    rgba(255, 255, 255, 0.06) 12px
  );
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
}

.is-today-mobile {
  color: var(--accent-hover);
  font-weight: 600;
}

@media (max-width: 768px) {
  .calendar { padding: 0; min-width: 0; }
  .calendar table { display: none; }
}

/* ----- SKELETON LOADERS ----- */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
  display: block;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-row {
  height: 42px;
  margin-bottom: 6px;
}

.skeleton-calendar {
  padding: 1rem;
}

/* ----- PROFILE CARD (Mes réservations) ----- */

.profile-card {
  display: grid;
  gap: 0.75rem;
}

.profile-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 1rem;
}

.profile-row label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#profile-name-input {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: inherit;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
}

#profile-name-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.45);
}

#profile-name-input::placeholder { color: rgba(255, 255, 255, 0.32); }

#profile-email {
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .profile-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

/* ----- FOCUS ----- */

:focus-visible {
  outline: 2px solid rgba(255, 122, 158, 0.5);
  outline-offset: 2px;
}
button:focus-visible,
a.btn:focus-visible,
a.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 0 5px rgba(255, 77, 109, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ----- FOOTER ----- */

.site-footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  font-size: 0.7rem;
  color: var(--muted-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer a:hover { color: var(--text); }

/* ----- OFFICE GALLERY ----- */

/* ----- EDITORIAL MARKERS ----- */

.editorial-marker {
  margin: 1rem 0 1.8rem;
  position: relative;
}

.section-num {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: var(--accent-hover);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.section-num::before {
  content: '';
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  display: inline-block;
}

.editorial-title {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 0.6rem;
  line-height: 1.05;
  background: linear-gradient(135deg, #fff 50%, var(--g1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.editorial-tagline {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
  font-weight: 400;
  max-width: 520px;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .editorial-title { font-size: 1.8rem; }
  .editorial-tagline { font-size: 0.88rem; }
}

.office-gallery {
  margin-top: 4.5rem;
  margin-bottom: 1rem;
}

/* ----- EDITORIAL GALLERY (asymetric) ----- */

.gallery-editorial {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.9rem;
  height: 540px;
}

.gallery-editorial .gallery-item {
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
}

.gallery-editorial .gallery-hero {
  grid-row: 1 / 3;
  aspect-ratio: auto;
}

.gallery-editorial .gallery-item:not(.gallery-hero) {
  aspect-ratio: auto;
}

@media (max-width: 800px) {
  .gallery-editorial {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    height: auto;
  }
  .gallery-editorial .gallery-hero { grid-row: auto; aspect-ratio: 16 / 10; }
  .gallery-editorial .gallery-item:not(.gallery-hero) { aspect-ratio: 16 / 9; }
}

.gallery-grid {
  display: grid;
  gap: 1rem;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--border-2);
}

.gallery-item.placeholder {
  background:
    radial-gradient(ellipse 200% 100% at 50% 100%, rgba(255, 122, 158, 0.04), transparent),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.025),
      rgba(255, 255, 255, 0.025) 10px,
      rgba(255, 255, 255, 0.05) 10px,
      rgba(255, 255, 255, 0.05) 20px
    );
}

.gallery-item.placeholder::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 158, 0.3), transparent);
}

.gallery-item.placeholder span {
  font-size: 0.78rem;
  color: var(--muted-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 800px) {
  .gallery-grid-3 {
    grid-template-columns: 1fr;
  }
  .gallery-item {
    aspect-ratio: 16 / 10;
  }
}
