/* ==========================================================================
   SELACV – Événements & Réservations
   Feuille de style unique. Sommaire :
   1. Variables et base          6. Agenda
   2. Animation d'ouverture      7. Formulaire de demande
   3. En-tête et onglets         8. Listes de demandes (modification, mes demandes)
   4. Mise en page des vues      9. Analyse, administration, aide, versions
   5. Tableau de bord           10. Adaptations mobiles
   ========================================================================== */

/* 1. Variables et base ---------------------------------------------------- */
:root {
  --ink: #33242a;
  --muted: #78636c;
  --line: #efd8df;
  --accent: #a73763;
  --accent-2: #df7956;
  --soft: #fff0f5;
  --title: #662143;
  --heading: #712447;
  --label: #754053;
  --field-border: #e8cbd6;
  --card-bg: linear-gradient(135deg, #ffffffef, #fff9f6df);
  --card-shadow: 0 12px 30px rgba(119, 43, 75, .1);
  /* Couleurs des campus */
  --cathedrale: #e2b500;  --cathedrale-soft: #fffdf1;  --cathedrale-chip: #ffe37b;
  --citadelle: #d9484d;   --citadelle-soft: #fff7f7;
  --saint-charles: #4385d3; --saint-charles-soft: #f5f9ff;
  --saint-leu: #49a775;   --saint-leu-soft: #f4fcf7;
  --teinturerie: #7c3aed; --teinturerie-soft: #faf5ff;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff6f1;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 2%, #ffd0bd 0, transparent 23%),
    radial-gradient(circle at 94% 16%, #e5a1c2 0, transparent 24%),
    linear-gradient(145deg, #fff6ef, #fff0f6 55%, #fce9df);
}
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

.btn {
  border: 1px solid #ddbcc9;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fffafa;
  color: #7a294b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.btn:hover { background: #fff0f5; }
.btn.primary {
  border-color: var(--accent);
  background: linear-gradient(135deg, #a73763, #d97158);
  color: #fff;
  box-shadow: 0 7px 16px #a7376330;
}
.btn.primary:hover { background: linear-gradient(135deg, #85264e, #be5e4e); }
.btn:disabled { opacity: .6; cursor: wait; }

.badge {
  padding: 4px 7px;
  border: 0;
  border-radius: 999px;
  background: #f9dce6;
  color: #8a2a50;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
button.badge { cursor: pointer; }
.empty { padding: 25px; text-align: center; color: var(--muted); font-size: 13px; }

/* 2. Animation d'ouverture ------------------------------------------------ */
body.intro-active { overflow: hidden; }
body.intro-active > .app-header,
body.intro-active > main { visibility: hidden; }
.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, #ffb6a1 0, transparent 25%),
    radial-gradient(circle at 85% 82%, #ef9fc2 0, transparent 28%),
    linear-gradient(135deg, #3c0f2b 0%, #7e214d 44%, #db7659 100%);
  transition: opacity .5s ease, visibility .5s ease;
}
body:not(.intro-active) > .intro { opacity: 0; visibility: hidden; pointer-events: none; }
.intro::before, .intro::after {
  content: "";
  position: absolute;
  width: min(88vw, 900px);
  aspect-ratio: 1;
  border: 1px solid #fff4;
  border-radius: 50%;
  animation: introHalo 12s linear infinite;
}
.intro::before { transform: translate(-28%, -18%); }
.intro::after { right: -30%; bottom: -44%; animation-direction: reverse; animation-duration: 16s; }
.intro-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(410px, calc(100vw - 40px));
  padding: 34px 30px 28px;
  border: 1px solid #ffffff70;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff28, #ffffff12);
  box-shadow: 0 28px 85px #26061975, inset 0 1px 0 #fff8;
  backdrop-filter: blur(13px);
  text-align: center;
}
.intro-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #ffffff2e;
  border-radius: 23px;
  pointer-events: none;
}
.intro-orbit { position: relative; display: grid; width: 188px; height: 188px; place-items: center; }
.intro-orbit::before, .intro-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  animation: introOrbit 6s linear infinite;
}
.intro-orbit::before { inset: 0; border: 2px dashed #fff8; box-shadow: 0 0 25px #ffd1b580; }
.intro-orbit::after {
  inset: 21px;
  border: 1px solid #fff9;
  border-left-color: transparent;
  border-bottom-color: transparent;
  animation-duration: 3.3s;
  animation-direction: reverse;
}
.intro-orbit i {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px #ffd0bf42, 0 0 22px #fff;
  animation: introSatellite 3.3s linear infinite;
}
.intro-orbit i:nth-of-type(1) { top: 11px; left: 45%; background: #ffd26d; }
.intro-orbit i:nth-of-type(2) { right: 10px; bottom: 43%; width: 8px; height: 8px; background: #ffb6dd; animation-delay: -1.1s; }
.intro-orbit i:nth-of-type(3) { bottom: 17px; left: 25%; width: 7px; height: 7px; background: #bcecff; animation-delay: -2.2s; }
.intro-logo {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  padding: 9px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 0 0 9px #ffffff32, 0 18px 45px #18041266;
  animation: introPulse 2.2s ease-in-out infinite;
}
.intro-card strong { position: relative; color: #fff; font-size: 21px; letter-spacing: .035em; text-shadow: 0 2px 14px #4e0b30; }
.intro-card span { position: relative; color: #fff4; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.intro-dots { position: relative; display: flex; gap: 8px; margin-top: 2px; }
.intro-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 15px #fff;
  animation: introDot 1.25s ease-in-out infinite;
}
.intro-dots i:nth-child(2) { animation-delay: .16s; background: #ffd36c; }
.intro-dots i:nth-child(3) { animation-delay: .32s; background: #ffb5d9; }
@keyframes introOrbit { to { transform: rotate(360deg); } }
@keyframes introHalo { to { transform: rotate(360deg) scale(1.05); } }
@keyframes introSatellite { to { transform: rotate(360deg) translateX(2px); } }
@keyframes introPulse { 0%, 100% { transform: translateY(2px) scale(.96); } 50% { transform: translateY(-5px) scale(1.04); } }
@keyframes introDot { 0%, 65%, 100% { opacity: .32; transform: scale(.8); } 30% { opacity: 1; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) {
  .intro *, .intro::before, .intro::after { animation: none !important; }
}

/* 3. En-tête et onglets --------------------------------------------------- */
.app-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #3a0d2a, #84244e 53%, #d66f59);
  box-shadow: 0 9px 28px rgba(85, 22, 54, .25);
}
.app-header::after {
  content: "";
  position: absolute;
  right: -65px;
  top: -145px;
  width: 340px;
  height: 340px;
  border: 1px solid #ffffff42;
  border-radius: 50%;
  box-shadow: 0 0 0 32px #ffffff0b, 0 0 0 66px #ffffff09;
  pointer-events: none;
}
.top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 3vw, 42px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px #ffffff55, 0 8px 18px #2d08204a;
}
.brand h1 { margin: 0; color: #fff; font-size: 21px; letter-spacing: .04em; text-shadow: 0 2px 10px #3b0a2890; }
.version {
  display: inline-block;
  margin-left: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: #8a2851;
  font-size: 11px;
  vertical-align: middle;
  text-shadow: none;
  box-shadow: 0 3px 10px #35091f55;
}
.subtitle { margin-top: 3px; color: #fff9; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.top-actions { display: flex; align-items: center; gap: 13px; }
.fullscreen-btn {
  display: inline-block;
  border: 1px solid #ffffff80;
  border-radius: 999px;
  padding: 8px 11px;
  background: #ffffff1a;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .16s, background .16s;
}
.fullscreen-btn:hover { transform: translateY(-1px); background: #ffffff2d; }
.sync { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 12px; font-weight: 900; }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd26d;
  box-shadow: 0 0 12px #ffd26d;
  transition: background .2s, box-shadow .2s;
}
.sync.is-success .dot { background: #54e38b; box-shadow: 0 0 12px #54e38b; }
.sync.is-error .dot { background: #ff817d; box-shadow: 0 0 12px #ff817d; }
.tabs {
  position: relative;
  z-index: 1;
  display: flex;
  overflow-x: auto;
  padding: 0 clamp(8px, 2vw, 34px);
  border-top: 1px solid #ffffff28;
  background: #ffffff18;
}
.tabs button {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 13px 14px;
  background: transparent;
  color: #fff9;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.tabs button:hover { background: #ffffff18; }
.tabs button.active { border-bottom-color: #ffd36c; background: #ffffff20; color: #fff; }
.ico {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 4. Mise en page des vues ------------------------------------------------ */
main { width: 100%; margin: 24px 0 48px; padding: 0 clamp(16px, 2.5vw, 42px); }
.view { display: none; }
.view.active { display: block; animation: appear .16s ease-out; }
@keyframes appear { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.view-head h2 { margin: 0; color: var(--title); font-size: 27px; }
.view-head p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.panel, .kpi, .analysis-card {
  padding: 18px;
  border: 1px solid #ffffffa8;
  border-radius: 13px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}
.panel h3 { margin: 0 0 10px; color: var(--heading); font-size: 16px; }
.panel p { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* 5. Tableau de bord ------------------------------------------------------ */
.date-chip {
  padding: 9px 12px;
  border: 1px solid #ebc5d4;
  border-radius: 9px;
  background: #fff9;
  color: #7d3153;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 5px 16px #9c416319;
}
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { position: relative; overflow: hidden; }
.kpi::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -38px;
  width: 110px;
  height: 110px;
  border: 1px solid #c14e742e;
  border-radius: 50%;
  box-shadow: 0 0 0 14px #c14e740b;
}
.kpi span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.kpi b { display: block; margin-top: 8px; color: var(--accent); font-size: 30px; }
.kpi small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; margin-top: 14px; }
.request-list { display: grid; gap: 9px; }
.request-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px;
  border: 1px solid #f2dce3;
  border-radius: 10px;
  background: #fffafa;
  color: inherit;
  text-align: left;
}
button.request-row { cursor: pointer; }
button.request-row:hover { border-color: #cf7693; background: #fff1f5; }
.request-date {
  display: grid;
  place-items: center;
  min-width: 48px;
  padding: 6px;
  border-radius: 7px;
  background: var(--soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}
.request-copy { flex: 1; min-width: 0; }
.request-copy strong { display: block; font-size: 13px; }
.request-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

/* 6. Agenda --------------------------------------------------------------- */
.agenda-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px 18px; margin: -4px 0 15px; }
.agenda-site-filters { display: flex; flex-wrap: wrap; gap: 9px; }
.agenda-select { display: flex; align-items: center; gap: 8px; color: var(--label); font-size: 12px; font-weight: 800; }
.agenda-select select { padding: 8px 11px; border: 1px solid #dfc8d0; border-radius: 999px; background: #fffdfa; color: var(--ink); font-weight: 700; }
.agenda-site-filter {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #5f4b55;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.agenda-site-filter:hover { transform: translateY(-1px); }
.agenda-site-filter.active { box-shadow: 0 5px 13px #54203530; }
.agenda-site-filter.all { border-color: #d7c1ca; }
.agenda-site-filter.campus-cathedrale { background: var(--cathedrale-chip); color: #5d4800; }
.agenda-site-filter.campus-citadelle { background: var(--citadelle); color: #fff; }
.agenda-site-filter.campus-saint-charles { background: var(--saint-charles); color: #fff; }
.agenda-site-filter.campus-saint-leu { background: var(--saint-leu); color: #fff; }
.agenda-site-filter.campus-teinturerie { background: var(--teinturerie); color: #fff; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.calendar-toolbar h3 { margin: 0; }
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fffaf8;
}
.weekday {
  padding: 9px 5px;
  background: linear-gradient(135deg, #7b244b, #b53d65);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}
.day {
  min-width: 0;
  min-height: 142px;
  padding: 7px;
  border-top: 1px solid #f1dce2;
  border-left: 1px solid #f1dce2;
  background: #fffdfa;
}
.day.today { background: #fff1f5; box-shadow: inset 0 0 0 2px #d76a8a; }
.day-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.today .day-number { background: var(--accent); color: #fff; }
.calendar-item {
  --campus: #b66a85;
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 7px 8px 7px 10px;
  border: 1px solid #ead8df;
  border-left: 5px solid var(--campus);
  border-radius: 4px;
  background: #fffdfa;
  color: #523743;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  box-shadow: 0 1px 3px #6f24331a;
  cursor: pointer;
}
.calendar-item:hover, .calendar-item:focus-visible { background: #fff1f5; outline: 2px solid #ffd36c; outline-offset: 1px; }
.calendar-item.campus-cathedrale { --campus: var(--cathedrale); }
.calendar-item.campus-citadelle { --campus: var(--citadelle); }
.calendar-item.campus-saint-charles { --campus: var(--saint-charles); }
.calendar-item.campus-saint-leu { --campus: var(--saint-leu); }
.calendar-item.campus-teinturerie { --campus: var(--teinturerie); }
.agenda-line { display: block; padding: 2px 0; overflow-wrap: anywhere; }
.agenda-meta { color: #7b5361; }
.agenda-place { color: #80636e; }
.agenda-subject { overflow: hidden; color: #432e37; text-overflow: ellipsis; white-space: nowrap; }
.agenda-requester { color: #896f78; }
.agenda-cancelled-tag { color: #b91c1c; font-weight: 900; text-transform: uppercase; }
.calendar-item.is-cancelled { border-style: dashed; border-left-style: solid; filter: saturate(.72) brightness(.97); }
.calendar-item.is-cancelled .agenda-subject { text-decoration: line-through; }
.agenda-refused-tag { color: #6d28d9; font-weight: 900; text-transform: uppercase; }
.calendar-item.is-refused { outline: 2px dotted #8b5cf6; outline-offset: -3px; }

/* 7. Formulaire de demande ------------------------------------------------ */
.form-card { padding: 0; overflow: hidden; }
.form-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 43%);
  align-items: start;
  column-gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, #fff1f5, #ffe7dc);
}
.form-intro h3 { grid-column: 1; margin: 0; color: #7a274b; }
.form-intro p { grid-column: 1; margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.entry-trace-header {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 9px 12px;
  border: 1px solid #ead0d9;
  border-radius: 10px;
  background: rgba(255, 255, 255, .65);
  color: #704257;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}
.entry-trace-header b { color: #5c183d; }
.request-form { padding: 20px; }
.form-section { margin: 0 0 22px; padding: 0 0 20px; border-bottom: 1px solid #e8edf4; }
.form-section h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: #7d2b4b; font-size: 15px; }
.form-section h3::before { content: ""; width: 6px; height: 22px; border-radius: 999px; background: var(--accent-2); }
.form-section.entry-audit { margin-top: 14px; border-bottom: 0; }
.entry-audit h3 { margin-bottom: 8px; }
.entry-audit-log {
  max-height: 150px;
  overflow: auto;
  padding: 11px 13px;
  border: 1px solid #ead0d9;
  border-radius: 9px;
  background: #fff9fa;
  color: #704257;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.decision-grid { grid-template-columns: 1.1fr repeat(4, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; }
.field.span-2 { grid-column: span 2; }
.field.wide { grid-column: 1 / -1; }
.field label, .checkbox-title { color: var(--label); font-size: 12px; font-weight: 800; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: #fffdfd;
  color: var(--ink);
}
.attachment-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.attachment-summary { display: grid; gap: 4px; padding: 9px 10px; border: 1px dashed #d9b7c6; border-radius: 8px; background: #fffafb; color: var(--muted); font-size: 12px; }
.attachment-summary strong { color: var(--heading); }
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid #f7dce6; border-color: #bd5277; }
.single-check, .choice-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5ccd6;
  border-radius: 10px;
  background: #fffafa;
  color: #71304e;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.single-check { min-height: 42px; padding: 10px 12px; }
.single-check input, .choice-row input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.choice-row { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; padding: 4px 0; }
.choice-row label { min-height: 52px; padding: 11px 13px; transition: background .15s, border-color .15s, transform .15s; }
.choice-row label:hover { border-color: #c86486; background: #fff2f6; transform: translateY(-1px); }
.choice-row label:has(input:checked) { border-color: var(--accent); background: var(--soft); color: var(--accent); }
.ticket-row { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; align-items: start; }
.ticket-input { display: flex; align-items: center; gap: 7px; }
.ticket-input input { flex: 0 0 9ch; width: 9ch; min-width: 9ch; }
.ticket-input .btn { flex: none; white-space: nowrap; }
.refusal-field { grid-column: 1; }
.cancelled-check { grid-column: span 2; }
.cancelled-check label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.cancelled-check input { width: 19px; height: 19px; accent-color: #dc2626; }
.field:has(.suggestions) { position: relative; }
.room-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 5px 6px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: #fffdfd;
  cursor: text;
}
.room-picker:focus-within { outline: 3px solid #f7dce6; border-color: #bd5277; }
.room-chips { display: contents; }
.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.room-chip button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: #f3c9d8; color: var(--accent); font-weight: 900; line-height: 1; cursor: pointer; }
.room-chip button:hover { background: var(--accent); color: #fff; }
.room-picker #roomSearch { flex: 1 1 160px; min-width: 120px; padding: 6px; border: 0; outline: 0; background: transparent; }
.room-capacity { color: var(--muted); font-size: 11px; font-weight: 700; }
.room-capacity.warning { color: #b91c1c; }
.suggestions.rooms { max-height: 320px; overflow-y: auto; }
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  min-width: 260px;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(119, 43, 75, .2);
}
.suggestions-head { padding: 7px 12px; background: #fff3f7; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.suggestion { display: block; width: 100%; padding: 9px 12px; border: 0; border-top: 1px solid #f6e6ec; background: #fff; text-align: left; cursor: pointer; }
.suggestion strong { display: block; color: var(--ink); font-size: 13px; }
.suggestion span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.suggestion:hover, .suggestion.active { background: var(--soft); }
.actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

/* 8. Listes de demandes --------------------------------------------------- */
.edit-filters { display: flex; flex-wrap: wrap; gap: 11px; margin: 0 0 15px; }
.edit-filters label { display: grid; gap: 5px; color: var(--label); font-size: 12px; font-weight: 800; }
.edit-filters select, .edit-filters input {
  min-width: 185px;
  padding: 9px 11px;
  border: 1px solid #dfc8d0;
  border-radius: 8px;
  background: #fffdfa;
  color: var(--ink);
}
#editRequestList { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.request-row.campus-cathedrale { border-left: 6px solid var(--cathedrale); background: var(--cathedrale-soft); }
.request-row.campus-citadelle { border-left: 6px solid var(--citadelle); background: var(--citadelle-soft); }
.request-row.campus-saint-charles { border-left: 6px solid var(--saint-charles); background: var(--saint-charles-soft); }
.request-row.campus-saint-leu { border-left: 6px solid var(--saint-leu); background: var(--saint-leu-soft); }
.request-row.campus-teinturerie { border-left: 6px solid var(--teinturerie); background: var(--teinturerie-soft); }
.approval-status {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px #00000012;
}
.approval-status.green { background: #28a86b; }
.approval-status.orange { background: #ef9b30; }
.approval-status.red { background: #d9484d; }
.reservation-status {
  display: grid;
  flex: none;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #9f7aea;
  border-radius: 50%;
  background: #f3efff;
  color: #6540aa;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 0 0 2px #fff;
}
.cancelled-tag {
  border-radius: 999px;
  padding: 4px 7px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.request-row.is-cancelled { outline: 1px dashed #dc2626; outline-offset: -5px; }
.request-row.is-cancelled .request-copy strong { text-decoration: line-through; }
.my-requests-note {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid var(--field-border);
  border-radius: 9px;
  background: #fff7fa;
  color: var(--label);
  font-size: 13px;
  font-weight: 700;
}
.request-row .btn { flex: none; }

/* 9. Analyse, administration, aide, versions ------------------------------ */
.analysis-grid, .help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.help-grid { grid-template-columns: repeat(2, 1fr); }
.analysis-card { background: linear-gradient(145deg, #fff, #fff4f7); }
.analysis-card h3 { margin: 0; color: var(--heading); font-size: 14px; }
.analysis-card b { display: block; margin: 9px 0 4px; color: var(--accent); font-size: 28px; }
.analysis-card p { margin: 0; color: var(--muted); font-size: 12px; }
.type-panel { margin-top: 14px; }
.bar-list { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 28px; gap: 9px; align-items: center; font-size: 12px; }
.bar { height: 9px; overflow: hidden; border-radius: 999px; background: #f5dde5; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a73763, #e28a5f); }
.locations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.reference-table-wrap { overflow: auto; border: 1px solid #dfc8d0; border-radius: 11px; background: #f5eef0; }
.reference-table { width: 100%; min-width: 260px; border-collapse: collapse; }
.reference-table th {
  padding: 12px;
  background: #e8dfe2;
  color: #66374b;
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.reference-table td { padding: 10px 12px; border-top: 1px solid #e3d3d8; background: #fffafa; font-size: 13px; font-weight: 700; }
.reference-table tr:hover td { background: #fff0f5; }
.reference-table .empty-cell { padding: 24px; text-align: center; color: #666c73; font-weight: 400; }
#versionList { display: grid; gap: 14px; }
.version-entry { position: relative; width: 100%; padding-left: 28px; }
.version-entry::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(#d46c89, #f1c0ce);
}
.version-entry::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 22px;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #a73763, #df7956);
  box-shadow: 0 2px 7px #a7376340;
}
.version-entry h3 { margin: 0; color: var(--accent); }
.version-entry p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* 10. Adaptations mobiles ------------------------------------------------- */
@media (max-width: 1050px) {
  .decision-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .analysis-grid, .help-grid, .locations-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field.span-2 { grid-column: span 1; }
  .decision-grid .room-field { grid-column: span 2; }
  .choice-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day { min-height: 112px; }
  .calendar-item { padding: 4px 4px 4px 6px; font-size: 9px; }
}
@media (max-width: 760px) {
  #editRequestList { grid-template-columns: 1fr; }
  .ticket-row { grid-template-columns: 1fr; }
  .ticket-input input { flex: 1 1 auto; width: 100%; }
  .form-intro { display: block; }
  .entry-trace-header { margin: 10px 0 0; text-align: left; }
}
@media (max-width: 680px) {
  .decision-grid { grid-template-columns: 1fr; }
  .decision-grid .room-field { grid-column: auto; }
}
@media (max-width: 560px) {
  .top { padding: 11px; }
  .logo { width: 45px; height: 45px; }
  .sync { display: none; }
  .fullscreen-btn { padding: 7px 9px; font-size: 11px; }
  main { margin-top: 15px; padding: 0 10px; }
  .view-head { display: block; }
  .date-chip { display: inline-block; margin-top: 10px; }
  .grid, .choice-row { grid-template-columns: 1fr; }
  .field.span-2, .cancelled-check { grid-column: auto; }
  .day { min-height: 88px; padding: 4px; }
  .weekday { padding: 7px 2px; font-size: 8px; }
  .calendar-item { font-size: 8px; }
  .request-form { padding: 15px; }
}
