:root {
  --blue: #3b00db;
  --blue-dark: #2d00a8;
  --blue-soft: #eeeaff;
  --orange: #f28c18;
  --orange-dark: #c86c00;
  --orange-soft: #fff3e4;
  --ink: #050505;
  --paper: #ffffff;
  --canvas: #f3f3f5;
  --muted: #66656d;
  --line: rgba(5, 5, 5, 0.14);
  --danger: #a71919;
  --shadow: 0 28px 70px rgba(5, 5, 5, 0.13);
  --shadow-soft: 0 14px 34px rgba(5, 5, 5, 0.08);
  --content-width: 1280px;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-synthesis: none;
}

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button { cursor: pointer; }
img { display: block; max-width: 100%; }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] { display: none !important; }
::selection { color: var(--paper); background: var(--blue); }
:focus-visible { outline: 3px solid rgba(59, 0, 219, 0.28); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-grid {
  position: fixed;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(59, 0, 219, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(59, 0, 219, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* Connexion */
.login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 36px 20px;
}

.login-shape {
  position: fixed;
  z-index: -1;
  top: -22%;
  right: -7%;
  width: min(42vw, 660px);
  height: 83%;
  background: var(--blue);
  transform: rotate(16deg);
  box-shadow: -30px 40px 80px rgba(59, 0, 219, 0.15);
}

.login-page::after {
  position: fixed;
  z-index: -1;
  right: 5vw;
  bottom: 2vh;
  width: 120px;
  height: 120px;
  border: 20px solid var(--ink);
  border-radius: 50%;
  content: "";
  opacity: 0.06;
}

.login-shell { width: min(100%, 460px); }

.brand-card,
.login-card {
  position: relative;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.brand-card {
  overflow: hidden;
  margin-bottom: 24px;
  padding: 22px 30px 24px;
  border-radius: 8px 8px 8px 36px;
  text-align: center;
}

.brand-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  content: "";
  background: var(--blue);
}

.brand-card img { width: min(100%, 340px); margin: 0 auto 14px; }
.brand-rule { width: 54px; height: 3px; margin: 0 auto 13px; background: var(--blue); }

.eyebrow,
.section-number {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-card h1,
.brand-card p,
.login-card h2,
.login-card p { margin: 0; }

.brand-card h1,
.form-heading h2,
.planner-hero h1,
.section-heading h2,
.dialog-heading h2 {
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-stretch: condensed;
  letter-spacing: -0.045em;
}

.brand-card h1 { font-size: clamp(2rem, 7vw, 2.65rem); font-weight: 900; line-height: 0.95; }
.brand-card > p:last-child { margin-top: 8px; color: var(--muted); }

.login-card {
  overflow: hidden;
  padding: 30px 28px 24px;
  border-radius: 8px 38px 8px 8px;
  box-shadow: var(--shadow);
}

.card-accent { position: absolute; top: 0; right: 0; width: 38%; height: 6px; background: var(--blue); }
.form-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }

.heading-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 7px 16px 7px 7px;
}

.heading-icon svg { width: 23px; height: 23px; }
.form-heading h2 { font-size: 1.75rem; font-weight: 900; line-height: 1; }
.form-heading p { margin-top: 5px; color: var(--muted); font-size: 0.95rem; }
.login-card label { display: block; margin: 0 0 7px; font-size: 0.92rem; font-weight: 700; }
.input-wrap { position: relative; margin-bottom: 20px; }

.input-wrap > svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 19px;
  height: 19px;
  color: #85858b;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 45px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(5, 5, 5, 0.22);
  border-radius: 7px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-wrap input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 0, 219, 0.12); }

.icon-button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: #77767d;
  background: transparent;
  border: 0;
  border-radius: 6px;
  transform: translateY(-50%);
}

.icon-button:hover { color: var(--blue); background: var(--blue-soft); }
.icon-button svg { width: 20px; height: 20px; }

.primary-button,
.primary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--paper);
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 7px;
  box-shadow: 0 12px 25px rgba(59, 0, 219, 0.24);
  font-weight: 750;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.primary-button { width: 100%; padding: 0 18px; }
.primary-button:hover,
.primary-action:hover { background: var(--blue-dark); box-shadow: 0 16px 32px rgba(59, 0, 219, 0.3); transform: translateY(-2px); }
.primary-button:disabled { cursor: wait; opacity: 0.65; transform: none; }
.primary-button svg { width: 20px; height: 20px; }
.security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px !important; color: var(--muted); font-size: 0.82rem; }
.security-note svg { width: 16px; height: 16px; color: var(--blue); }

.alert {
  margin: -8px 0 20px;
  padding: 11px 13px;
  color: #8d1717;
  background: #fff1f1;
  border: 1px solid #f3c6c6;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* En-tête */
.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(5, 5, 5, 0.06);
  backdrop-filter: blur(18px);
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--blue) 0 34%, transparent 34%);
}

.header-inner,
.footer-inner,
.planner-hero,
.planner-section { width: min(calc(100% - 40px), var(--content-width)); margin-inline: auto; }
.header-inner { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 24px; }
.header-brand { display: flex; align-items: center; gap: 15px; color: var(--ink); text-decoration: none; }
.header-brand img { width: 188px; }
.header-brand > span { width: 1px; height: 30px; background: var(--line); }
.header-brand strong { font-size: 1.1rem; font-weight: 850; }
.user-area { display: flex; align-items: center; gap: 18px; }
.user-copy { display: grid; padding-right: 18px; border-right: 1px solid var(--line); text-align: right; }
.user-copy span { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.user-copy strong { font-size: 0.93rem; }
.user-area form { margin: 0; }

.logout-button {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 700;
}

.logout-button:hover { color: var(--blue); border-color: rgba(59, 0, 219, 0.4); background: var(--blue-soft); }
.logout-button svg { width: 18px; height: 18px; }

/* Hero */
.planner-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  min-height: 480px;
  overflow: hidden;
  margin-top: 34px;
  padding-bottom: 100px;
  color: var(--paper);
  background: var(--blue);
  border-radius: 8px 58px 8px 8px;
  box-shadow: var(--shadow);
}

.planner-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to right, black, transparent 72%);
}

.planner-hero::after {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 auto;
  width: 50%;
  content: "";
  background: var(--ink);
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%);
}

.hero-pattern {
  position: absolute;
  z-index: 1;
  top: -115px;
  left: -92px;
  width: 270px;
  height: 270px;
  border: 44px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.hero-content { position: relative; z-index: 2; min-width: 0; align-self: center; padding: 52px 58px 48px; }
.hero-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 23px; color: rgba(255,255,255,.78); font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-kicker span { width: 35px; height: 3px; background: var(--paper); }
.planner-hero h1 { margin: 0; font-size: clamp(3.7rem, 6vw, 5.8rem); font-weight: 950; line-height: .79; }
.planner-hero h1 em { color: var(--paper); font-style: normal; text-shadow: 5px 5px 0 var(--ink); }
.hero-content > p:last-child { max-width: 510px; margin: 34px 0 0; color: rgba(255,255,255,.82); font-size: 1.03rem; line-height: 1.5; }

.hero-schedule {
  position: relative;
  z-index: 3;
  align-self: center;
  margin: 42px 42px 42px 8px;
  padding: 25px 24px 20px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 8px 38px 8px 8px;
  box-shadow: 0 25px 55px rgba(0,0,0,.3);
  transform: rotate(1deg);
}

.schedule-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.schedule-heading span { color: var(--blue); font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.schedule-heading strong { font-size: 1.05rem; }
.time-axis { display: grid; grid-template-columns: 92px 1fr; margin-bottom: 8px; color: var(--muted); }
.time-axis div { display: flex; justify-content: space-between; }
.time-axis i { font-size: .62rem; font-style: normal; }
.schedule-resource { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.schedule-resource > span { display: flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 780; }
.schedule-resource .resource-dot { flex: 0 0 8px; width: 8px; height: 8px; }
.schedule-track { display: grid; grid-template-columns: repeat(24, 1fr); height: 27px; overflow: hidden; color: var(--blue); background: #f0f0f2; border-radius: 4px 10px 4px 4px; }
.schedule-track.booth { color: var(--orange); }
.schedule-cell { min-width: 0; border-right: 1px solid rgba(5,5,5,.035); }
.schedule-cell:nth-child(8),
.schedule-cell:nth-child(16) { border-right-color: rgba(5,5,5,.16); }
.schedule-cell.occupied { background: currentColor; }
.hero-schedule > p { display: flex; align-items: center; gap: 8px; margin: 17px 0 0; color: var(--muted); font-size: .72rem; }
.hero-schedule > p span { width: 18px; height: 2px; background: var(--blue); }

.hero-stats {
  position: absolute;
  z-index: 4;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  color: var(--paper);
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.18);
}

.hero-stats div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; min-height: 100px; padding: 16px 28px; border-right: 1px solid rgba(255,255,255,.18); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats dt { color: rgba(255,255,255,.6); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-stats dd { margin: 0; color: var(--paper); font-size: 1.75rem; font-weight: 900; }
.hero-stats .date-stat { max-width: 155px; font-size: .9rem; text-align: right; }

/* Planning */
.planner-section { padding: 92px 0 120px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 42px; }
.section-number { margin-bottom: 14px; }
.section-heading h2 { margin: 0; padding-left: 20px; border-left: 7px solid var(--blue); font-size: clamp(3.2rem, 6vw, 5rem); font-weight: 950; line-height: .8; }
.resource-legend { display: flex; flex-wrap: wrap; justify-content: end; gap: 12px 22px; color: var(--muted); font-size: .9rem; }
.resource-legend span { display: flex; align-items: center; gap: 8px; }
.resource-dot { width: 11px; height: 11px; border-radius: 50%; }
.resource-dot.room { background: var(--blue); }
.resource-dot.booth { background: var(--orange); }

.planner-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px 26px 8px 8px;
  box-shadow: var(--shadow-soft);
}

.navigation-group,
.filter-group { display: flex; align-items: center; gap: 8px; }
.navigation-group strong { min-width: 160px; margin-left: 9px; font-size: 1.05rem; text-transform: capitalize; }
.square-button,
.text-button,
.view-switcher button {
  min-height: 42px;
  color: var(--ink);
  background: #f7f7f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
}
.square-button { display: grid; width: 42px; padding: 0; place-items: center; }
.square-button svg { width: 20px; height: 20px; }
.text-button { padding: 0 13px; }
.square-button:hover,
.text-button:hover { color: var(--blue); border-color: rgba(59,0,219,.35); background: var(--blue-soft); }

.select-field { position: relative; display: grid; }
.select-field span { position: absolute; z-index: 1; top: 6px; left: 11px; color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.select-field select { width: 160px; height: 46px; padding: 15px 28px 0 10px; color: var(--ink); background: #f7f7f8; border: 1px solid var(--line); border-radius: 6px; appearance: auto; font-size: .88rem; font-weight: 700; }
.month-field input { width: 145px; height: 46px; padding: 0 10px; background: #f7f7f8; border: 1px solid var(--line); border-radius: 6px; }
.select-field select:focus,
.month-field input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,0,219,.11); }
.view-switcher { display: flex; padding: 3px; background: #ededf0; border-radius: 7px; }
.view-switcher button { min-height: 38px; padding: 0 12px; border-color: transparent; background: transparent; font-size: .85rem; }
.view-switcher button[aria-pressed="true"] { color: var(--paper); background: var(--ink); box-shadow: 0 4px 12px rgba(5,5,5,.16); }
.primary-action { min-height: 46px; padding: 0 15px; }
.primary-action svg { width: 19px; height: 19px; }
.calendar-status { min-height: 35px; padding: 5px 3px 10px; color: var(--muted); font-size: .85rem; }

.calendar-shell {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px 34px 8px 8px;
  box-shadow: var(--shadow-soft);
}
.calendar-shell[aria-busy="true"] { opacity: .64; pointer-events: none; }
.month-view { min-width: 900px; }
.weekday-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); color: var(--paper); background: var(--ink); }
.weekday-row div { padding: 13px 14px; border-right: 1px solid rgba(255,255,255,.14); font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.weekday-row div:last-child { border-right: 0; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.day-cell { min-height: 145px; padding: 9px; background: var(--paper); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.day-cell:nth-child(7n) { border-right: 0; }
.day-cell:nth-last-child(-n + 7) { border-bottom: 0; }
.day-cell.outside-month { background: #f8f8fa; }
.day-cell.outside-month .day-number { color: #9b9aa0; }
.day-cell.today { background: linear-gradient(145deg, var(--blue-soft), var(--paper) 65%); box-shadow: inset 0 0 0 2px rgba(59,0,219,.22); }
.day-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.day-number { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; color: var(--ink); background: transparent; border: 0; border-radius: 50%; font-size: .85rem; font-weight: 800; }
.today .day-number { color: var(--paper); background: var(--blue); }
.day-add { display: grid; width: 27px; height: 27px; padding: 0; place-items: center; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 5px; font-size: 1.15rem; }
.day-cell:hover .day-add,
.week-day:hover .day-add { color: var(--blue); background: var(--blue-soft); border-color: rgba(59,0,219,.16); }
.day-events { display: grid; gap: 5px; }

.event-pill,
.week-event {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  border: 0;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.event-pill { display: grid; width: 100%; gap: 2px; padding: 7px 8px 7px 11px; border-radius: 4px 11px 4px 4px; }
.event-pill::before,
.week-event::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; }
.event-pill.room,
.week-event.room { background: var(--blue-soft); }
.event-pill.room::before,
.week-event.room::before { background: var(--blue); }
.event-pill.booth,
.week-event.booth { background: var(--orange-soft); }
.event-pill.booth::before,
.week-event.booth::before { background: var(--orange); }
.event-pill:hover,
.week-event:hover { z-index: 1; box-shadow: 0 7px 16px rgba(5,5,5,.12); transform: translateY(-1px); }
.event-time { color: var(--muted); font-size: .66rem; font-weight: 700; }
.event-title { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.more-events { padding: 3px 4px; color: var(--muted); font-size: .7rem; font-weight: 700; }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); min-width: 1030px; }
.week-day { min-height: 430px; border-right: 1px solid var(--line); }
.week-day:last-child { border-right: 0; }
.week-day.today { background: linear-gradient(180deg, var(--blue-soft), var(--paper) 28%); }
.week-day-header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.week-day-header div { display: grid; gap: 2px; }
.week-day-header span { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.week-day-header strong { font-size: 1.65rem; line-height: 1; }
.week-day.today .week-day-header strong { color: var(--blue); }
.week-events { display: grid; align-content: start; gap: 9px; padding: 10px; }
.week-event { display: grid; gap: 5px; width: 100%; padding: 12px 11px 12px 15px; border-radius: 5px 16px 5px 5px; }
.week-event .event-title { font-size: .88rem; white-space: normal; }
.event-resource { color: var(--blue); font-size: .7rem; font-weight: 800; }
.week-event.booth .event-resource { color: var(--orange-dark); }
.event-contact { overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.empty-day { width: 100%; min-height: 80px; color: #8b8a90; background: transparent; border: 1px dashed rgba(5,5,5,.16); border-radius: 5px 16px 5px 5px; font-size: .76rem; }
.empty-day:hover { color: var(--blue); background: var(--blue-soft); border-color: rgba(59,0,219,.32); }
.calendar-error { display: grid; min-height: 320px; place-content: center; padding: 30px; text-align: center; }
.calendar-error h3 { margin: 0 0 8px; font-size: 1.5rem; }
.calendar-error p { margin: 0; color: var(--muted); }

/* Fenêtre de réservation */
.reservation-dialog {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px 38px 8px 8px;
  box-shadow: 0 40px 100px rgba(5,5,5,.32);
}
.reservation-dialog::backdrop { background: rgba(5,5,5,.66); backdrop-filter: blur(5px); }
.reservation-form { padding: 30px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 27px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.dialog-heading .section-number { margin-bottom: 7px; }
.dialog-heading h2 { margin: 0; font-size: 2.2rem; font-weight: 950; line-height: 1; }
.icon-close { display: grid; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; place-items: center; color: var(--ink); background: #f2f2f4; border: 0; border-radius: 5px 14px 5px 5px; }
.icon-close:hover { color: var(--paper); background: var(--ink); }
.icon-close svg { width: 20px; height: 20px; }
.reservation-form .alert { margin: 0 0 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid label { display: grid; gap: 7px; color: var(--muted); font-size: .86rem; font-weight: 750; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid input,
.form-grid select,
.form-grid textarea { width: 100%; color: var(--ink); background: #fafafa; border: 1px solid rgba(5,5,5,.2); border-radius: 6px; }
.form-grid input,
.form-grid select { height: 47px; padding: 0 12px; }
.form-grid textarea { padding: 12px; resize: vertical; }
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,0,219,.11); }
.dialog-actions { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; margin-top: 27px; }
.primary-button.compact { width: auto; min-width: 130px; box-shadow: none; }
.secondary-button,
.danger-button { min-height: 46px; padding: 0 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; font-weight: 750; }
.secondary-button:hover { color: var(--blue); background: var(--blue-soft); border-color: rgba(59,0,219,.3); }
.danger-button { color: var(--danger); border-color: rgba(167,25,25,.25); }
.danger-button:hover { color: var(--paper); background: var(--danger); }

.toast {
  position: fixed;
  z-index: 30;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100% - 44px));
  padding: 14px 18px 14px 22px;
  color: var(--paper);
  background: var(--ink);
  border-left: 5px solid var(--blue);
  border-radius: 6px 18px 6px 6px;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.site-footer { position: relative; color: rgba(255,255,255,.72); background: var(--ink); }
.site-footer::before { position: absolute; inset: 0 0 auto; height: 4px; content: ""; background: linear-gradient(90deg, var(--blue) 0 32%, rgba(255,255,255,.18) 32%); }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; min-height: 140px; align-items: center; gap: 28px; }
.footer-inner img { width: 190px; padding: 8px; background: var(--paper); border-radius: 4px; }
.footer-inner p { margin: 0; }
.footer-inner p:last-child { font-size: .88rem; text-align: right; }

@media (max-width: 1120px) {
  .planner-toolbar { align-items: stretch; flex-direction: column; }
  .navigation-group,
  .filter-group { flex-wrap: wrap; }
  .filter-group { justify-content: flex-end; }
  .calendar-shell { overflow-x: auto; }
}

@media (max-width: 840px) {
  .planner-hero { grid-template-columns: 1fr; min-height: auto; }
  .planner-hero::after { width: 72%; clip-path: polygon(42% 0, 100% 0, 100% 100%, 0 100%); }
  .hero-content { padding: 54px 40px 34px; }
  .hero-schedule { width: min(calc(100% - 80px), 520px); margin: 0 40px 38px auto; transform: none; }
  .section-heading { align-items: start; flex-direction: column; }
  .resource-legend { justify-content: start; }
  .footer-inner { grid-template-columns: 1fr; gap: 15px; padding-block: 36px; text-align: center; }
  .footer-inner img { margin: 0 auto; }
  .footer-inner p:last-child { text-align: center; }
}

@media (max-width: 620px) {
  .login-page { padding: 18px 12px; }
  .login-shape { top: -8%; right: -35%; width: 80vw; height: 44%; }
  .brand-card { padding: 19px 22px 21px; border-radius: 8px 8px 8px 28px; }
  .login-card { padding: 26px 20px 20px; border-radius: 8px 29px 8px 8px; }
  .header-inner,
  .footer-inner,
  .planner-hero,
  .planner-section { width: min(calc(100% - 24px), var(--content-width)); }
  .header-inner { min-height: 68px; }
  .header-brand img { width: 130px; }
  .header-brand > span,
  .header-brand strong,
  .user-copy,
  .logout-button span { display: none; }
  .logout-button { width: 42px; justify-content: center; padding: 0; }
  .planner-hero { margin-top: 18px; padding-bottom: 0; border-radius: 7px 34px 7px 7px; }
  .planner-hero::after { width: 100%; clip-path: polygon(78% 0, 100% 0, 100% 100%, 48% 100%); }
  .hero-content { padding: 42px 22px 28px; }
  .planner-hero h1 { font-size: clamp(2.5rem, 10.6vw, 3.7rem); line-height: .82; }
  .hero-content > p:last-child { margin-top: 28px; }
  .hero-schedule { width: auto; margin: 0 13px 18px; padding: 20px 17px 16px; border-radius: 7px 28px 7px 7px; }
  .schedule-heading { margin-bottom: 19px; }
  .time-axis { grid-template-columns: 78px 1fr; }
  .schedule-resource { grid-template-columns: 78px 1fr; }
  .hero-stats { position: relative; grid-template-columns: repeat(3, 1fr); }
  .hero-stats div { grid-template-columns: 1fr; align-content: center; gap: 6px; min-height: 82px; padding: 10px 9px; text-align: center; }
  .hero-stats dd { font-size: 1.35rem; }
  .hero-stats .date-stat { max-width: none; font-size: .7rem; text-align: center; }
  .planner-section { padding: 72px 0 85px; }
  .section-heading { margin-bottom: 32px; }
  .section-heading h2 { font-size: 3.25rem; }
  .navigation-group strong { order: -1; width: 100%; margin: 0 0 5px; }
  .filter-group { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .select-field select,
  .month-field input { width: 100%; }
  .view-switcher { grid-column: 1 / -1; }
  .view-switcher button { flex: 1; }
  .primary-action { grid-column: 1 / -1; }
  .reservation-form { padding: 22px 18px; }
  .dialog-heading h2 { font-size: 1.8rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .dialog-actions { grid-template-columns: 1fr 1fr; }
  .dialog-actions > span { display: none; }
  .danger-button { grid-column: 1 / -1; order: 3; }
  .primary-button.compact { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
