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

:root {
  --navy: #101a3d;
  --navy-2: #172554;
  --purple: var(--user-accent, #6d42ef);
  --purple-2: color-mix(in srgb, var(--purple) 76%, white);
  --blue: #eaf0ff;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #17203a;
  --muted: #74809d;
  --line: #e8eaf2;
  --green: #18a873;
  --red: #df4661;
  --orange: #f59e0b;
  --shadow: 0 12px 35px rgba(28, 35, 71, .08);
  --radius: 18px;
  --sidebar-from: #101a3d;
  --sidebar-via: #172858;
  --sidebar-to: #452999;
  --hero-from: #182653;
  --hero-to: #5734bb;
  --accent-soft: #f0ebff;
  --accent-ink: #5d3bc4;
  --page-glow: rgba(109, 66, 239, .10);
  --surface-glass: rgba(255,255,255,.86);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.app { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 245px;
  padding: 30px 18px 20px;
  color: #dfe6ff;
  background: linear-gradient(175deg, #111b3f 0%, #172858 58%, #452999 135%);
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; }
.brand > i, .install-logo, .big-logo {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #7857ff, #a36cff);
  box-shadow: 0 8px 18px rgba(109, 66, 239, .35);
  font-style: normal;
  font-weight: 800;
}
.brand > i { width: 42px; height: 42px; border-radius: 13px; }
.brand > b { color: white; font-size: 19px; line-height: 1.05; }
.brand small { display: block; margin-top: 7px; color: #9facd2; font-size: 9px; letter-spacing: .13em; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 45px;
  padding: 0 14px;
  border-radius: 12px;
  color: #b8c3e3;
  font-size: 14px;
  font-weight: 600;
  transition: .18s ease;
}
.sidebar nav a i { width: 20px; color: #8d9bc5; font-style: normal; text-align: center; }
.sidebar nav a:hover, .sidebar nav a.active { color: white; background: rgba(255,255,255,.11); }
.sidebar nav a.active { box-shadow: inset 3px 0 #9d7bff; }
.sidebar nav a.active i { color: #c8b6ff; }
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 15px 8px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.account > i, .header-user i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: white;
  background: #7550f1;
  font-style: normal;
  font-weight: 700;
}
.account span { min-width: 0; flex: 1; }
.account b, .account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account b { color: white; font-size: 12px; }
.account small { margin-top: 3px; color: #9ba8cf; font-size: 10px; }
.account > a { color: #aab5d8; font-size: 20px; }

.main { min-height: 100vh; margin-left: 245px; }
.main > header {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 92px;
  padding: 19px clamp(24px, 4vw, 62px);
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 { margin: 3px 0 0; font-size: 25px; }
header small, .page-title small, .welcome small { color: #7b64d8; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.header-user { display: flex; align-items: center; gap: 12px; }
.header-user i { width: 36px; height: 36px; }
.header-user a { color: var(--muted); font-size: 12px; font-weight: 700; }
.content { max-width: 1400px; margin: 0 auto; padding: 34px clamp(24px, 4vw, 62px) 60px; }

.welcome {
  min-height: 170px;
  padding: 36px 38px;
  border-radius: 24px;
  color: white;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.13), transparent 35%), linear-gradient(120deg, #182653, #5734bb);
  box-shadow: 0 18px 42px rgba(31, 34, 85, .17);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.welcome small { color: #cbbdff; }
.welcome h2 { margin: 10px 0 7px; font-size: clamp(25px, 3vw, 34px); }
.welcome p { margin: 0; color: #d5daf0; }
.welcome .btn { background: white; color: #3e2b84; box-shadow: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 21px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 9px 20px rgba(109, 66, 239, .23);
  cursor: pointer;
  font-weight: 700;
  transition: .18s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin: 23px 0 34px; }
.stats > div {
  min-height: 104px;
  padding: 21px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 17px;
}
.stats > div > i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: #7048e8;
  background: #f0ebff;
  font-style: normal;
  font-size: 22px;
}
.stats b { font-size: 25px; }
.stats small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }

.section-title, .page-title { margin-bottom: 20px; display: flex; align-items: end; justify-content: space-between; }
.section-title h2, .page-title h2 { margin: 0; font-size: 21px; }
.page-title h2 { font-size: 27px; }
.page-title p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.event-card {
  min-width: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: var(--shadow);
}
.event-cover {
  position: relative;
  min-height: 130px;
  padding: 22px;
  color: white;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.22), transparent 22%), linear-gradient(140deg, #596dc3, #40207e);
  display: flex;
  flex-direction: column;
  justify-content: end;
}
.event-cover::after { content: ""; position: absolute; inset: auto -25px -45px auto; width: 135px; height: 135px; border: 22px solid rgba(255,255,255,.08); border-radius: 50%; }
.event-cover > span { position: absolute; top: 17px; left: 18px; padding: 5px 9px; border-radius: 20px; background: rgba(17,24,60,.35); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.event-cover b { font-size: 39px; line-height: .9; }
.event-cover small { margin-top: 8px; color: #dfe3ff; font-size: 10px; letter-spacing: .12em; }
.event-body { padding: 20px; }
.event-body h3 { margin: 0 0 13px; font-size: 17px; }
.event-body p { margin: 7px 0; color: var(--muted); font-size: 12px; }
.event-body > a { display: block; margin-top: 17px; color: var(--purple); font-size: 12px; font-weight: 800; }
.progress-label { margin-top: 19px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.progress-label b { color: var(--text); }
.progress { height: 5px; margin-top: 7px; overflow: hidden; background: #eceef5; border-radius: 10px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #7650ee, #a082f4); border-radius: inherit; }

.panel {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel h3 { margin: 0 0 20px; font-size: 17px; }
.form, .add-panel { margin-bottom: 24px; }
.add-panel summary { color: var(--purple); cursor: pointer; font-weight: 800; }
.add-panel[open] summary { margin-bottom: 22px; }
label { display: grid; gap: 7px; color: #4c5672; font-size: 12px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: var(--text);
  background: #fbfbfd;
  border: 1px solid #dfe3ed;
  border-radius: 10px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #8a6aef; box-shadow: 0 0 0 3px rgba(109,66,239,.1); }
textarea { min-height: 95px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 17px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form > label, .add-panel form > label { margin-bottom: 15px; }
.event-select { max-width: 470px; margin-bottom: 22px; }
.admin-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.admin-grid .panel { margin: 0; }
.offline-settings { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 28px; background: radial-gradient(circle at 92% 15%, rgba(139,92,246,.1), transparent 35%), white; }
.offline-settings small { color: var(--purple); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.offline-settings h3 { margin: 7px 0 8px; }
.offline-settings p { max-width: 680px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.offline-settings span { display: block; margin-top: 10px; color: #52607f; font-size: 10px; font-weight: 700; }
.offline-actions { flex: 0 0 auto; display: grid; justify-items: center; gap: 11px; }
.offline-actions a { color: var(--purple); font-size: 10px; font-weight: 800; }
.connection-pill { position: fixed; z-index: 45; right: 18px; bottom: 18px; padding: 8px 12px; border: 1px solid; border-radius: 30px; box-shadow: 0 8px 25px rgba(23,32,58,.13); font-size: 9px; font-weight: 800; transition: .2s ease; }
.connection-pill.online { color: #087451; background: #e5faef; border-color: #b9efd8; }
.connection-pill.offline { color: #865a00; background: #fff5d9; border-color: #f4dfa5; }

.timeline { position: relative; display: grid; gap: 4px; }
.timeline::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: 95px; width: 2px; background: #ded7f7; }
.timeline article { position: relative; display: grid; grid-template-columns: 73px 18px 1fr; gap: 14px; align-items: start; }
.time { padding-top: 21px; text-align: right; }
.time b, .time small { display: block; }
.time b { font-size: 16px; }
.time small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.timeline article > i { z-index: 1; width: 14px; height: 14px; margin-top: 26px; border: 4px solid #f4f1ff; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 2px #9d84ee; }
.timeline-card { position: relative; margin-bottom: 13px; padding: 20px 23px; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 7px 24px rgba(30,37,73,.06); }
.timeline-card > span { display: inline-block; padding: 4px 8px; color: #6843d4; background: #f1edff; border-radius: 20px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.timeline-card h3 { margin: 10px 0 7px; font-size: 16px; }
.timeline-card p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.timeline-card > small { color: var(--muted); font-size: 10px; }
.music-chip { margin: 10px 0; padding: 10px 12px; color: #59448a; background: #f7f4ff; border-radius: 9px; font-size: 11px; }
.delete { position: absolute; top: 17px; right: 17px; border: 0; color: #b95a6a; background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }

.table { padding: 0; overflow: hidden; }
.table-head, .table-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px; align-items: center; padding: 15px 21px; }
.table-head { color: var(--muted); background: #f7f8fb; font-size: 10px; text-transform: uppercase; }
.table-row { border-top: 1px solid var(--line); font-size: 12px; }
.table-row span b, .table-row span small { display: block; }
.table-row small { margin-top: 4px; color: var(--muted); }
.table-row em { font-style: normal; }
.table-head.users-head, .table-row.users-row { grid-template-columns: 2fr .8fr .8fr .8fr; }
.mini-btn { min-height: 32px; padding: 0 11px; color: #6040c7; background: #f1ecff; border: 0; border-radius: 8px; cursor: pointer; font-size: 10px; font-weight: 800; }
.mini-btn:disabled { opacity: .4; cursor: not-allowed; }
.mini-btn.danger { color: #b23148; background: #fee9ed; }
.permission-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.permission-grid p { color: #5b6682; font-size: 12px; }
.checks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.checks label { padding: 12px; background: #f8f7fc; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: row; align-items: center; }
.checks input { width: 17px; min-height: 17px; accent-color: var(--purple); }
.access-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.access-card > div { display: flex; align-items: center; gap: 11px; }
.access-card > div > i { display: grid; place-items: center; width: 38px; height: 38px; color: white; background: var(--purple); border-radius: 11px; font-style: normal; font-weight: 800; }
.access-card span b, .access-card span small { display: block; }
.access-card span small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.access-card ul { padding: 12px 0; margin: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.access-card li { padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 800; }
.access-card li.yes { color: #087451; background: #ddf8ec; }
.access-card li.no { color: #a6aaba; background: #f0f1f5; text-decoration: line-through; }
.module { grid-template-columns: 1fr auto; align-items: center; margin: 15px 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.module b, .module small { display: block; }
.module small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.module input { width: 20px; min-height: 20px; accent-color: var(--purple); }

.music-list { padding: 0; overflow: hidden; }
.music-list article { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.music-list article:last-child { border: 0; }
.music-list article > i { display: grid; place-items: center; flex: 0 0 38px; height: 38px; color: #6b48da; background: #efeaff; border-radius: 11px; font-style: normal; }
.music-list article > span { min-width: 0; flex: 1; }
.music-list article b, .music-list article small { display: block; }
.music-list article small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.music-list em { padding: 5px 9px; border-radius: 20px; font-size: 9px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.music-list em.pending { color: #9a6500; background: #fff3cf; }
.music-list em.accepted { color: #087751; background: #dbf7eb; }
.music-list em.refused { color: #b12c44; background: #fee6ea; }
.music-list form { display: flex; gap: 5px; }
.music-list form button { width: 31px; height: 31px; border: 0; border-radius: 9px; color: #5a3bbf; background: #f0ebff; cursor: pointer; }

.notice { margin-bottom: 18px; padding: 13px 15px; border-radius: 11px; font-size: 12px; font-weight: 700; }
.notice.success { color: #087451; background: #ddf8ec; border: 1px solid #b8efd9; }
.notice.error { color: #ae2f45; background: #ffe9ed; border: 1px solid #facbd3; }
.notice--hidden { opacity: 0; transform: translateY(-5px); transition: .4s ease; }
.empty { grid-column: 1/-1; padding: 35px; color: var(--muted); background: white; border: 1px dashed #d9dce7; border-radius: var(--radius); text-align: center; font-size: 13px; }
.mobile-nav { display: none; }

/* Connexion */
.login { min-height: 100vh; display: grid; grid-template-columns: 48% 52%; background: white; }
.login-brand {
  position: relative;
  overflow: hidden;
  padding: clamp(45px,7vw,110px);
  color: white;
  background: radial-gradient(circle at 85% 18%, rgba(174,143,255,.27), transparent 28%), radial-gradient(circle at 8% 88%, rgba(60,97,210,.25), transparent 25%), linear-gradient(145deg, #111b3f 0%, #202b62 60%, #4f2aa3 130%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand::after { content: ""; position: absolute; right: -110px; bottom: -100px; width: 330px; height: 330px; border: 55px solid rgba(255,255,255,.04); border-radius: 50%; }
.big-logo { width: 54px; height: 54px; border-radius: 16px; }
.login-brand h1 { margin: 14px 0 55px; font-size: 22px; }
.login-brand h1 span { color: #a78bfa; }
.login-brand h2 { margin: 0; font-size: clamp(34px,4vw,57px); line-height: 1.05; }
.login-brand > p { max-width: 510px; margin: 22px 0 30px; color: #c8d0ed; font-size: 16px; line-height: 1.65; }
.login-brand > div { display: grid; gap: 13px; color: #d9def3; font-size: 12px; }
.login-side { padding: 45px; background: #fafafe; display: grid; place-items: center; }
.login-card { width: min(100%, 435px); padding: 42px; background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 25px 70px rgba(31,36,70,.12); }
.login-card > small { color: #7350de; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.login-card h2 { margin: 11px 0 8px; font-size: 27px; }
.login-card > p { margin: 0 0 27px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-card label { margin-bottom: 15px; }
.login-card input { min-height: 48px; }
.login-card .btn { width: 100%; min-height: 49px; }
.login-options { margin: 1px 0 22px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.login-options label { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.login-options input { width: 14px; min-height: 14px; accent-color: var(--purple); }
.login-options a { color: #7150dd; font-weight: 700; }
.help { margin-top: 23px; padding-top: 19px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; font-size: 10px; }
.help b { display: block; margin-top: 5px; color: var(--text); }

/* Installateur Plesk */
.installer { min-height: 100vh; padding: 45px 20px; background: radial-gradient(circle at 20% 5%, #ede7ff, transparent 27%), var(--bg); display: grid; place-items: center; }
.install-card { width: min(100%, 610px); padding: 38px; background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 25px 70px rgba(28,35,71,.13); }
.install-logo { width: 52px; height: 52px; border-radius: 15px; }
.install-card h1 { margin: 17px 0 7px; }
.install-card > p { margin: 0 0 25px; color: var(--muted); }
.install-card form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.credentials { margin-top: 22px; padding: 16px; color: #594487; background: #f3efff; border-radius: 12px; font-size: 12px; }
.credentials b, .credentials span { display: block; }
.credentials span { margin-top: 5px; }

/* Planning interactif */
.planner-page-title { align-items: center; }
.planner-help { max-width: 360px; padding: 12px 15px; color: #55447e; background: #f0ebff; border: 1px solid #ddd2ff; border-radius: 13px; display: flex; align-items: center; gap: 11px; }
.planner-help > i { display: grid; flex: 0 0 34px; height: 34px; place-items: center; color: white; background: var(--purple); border-radius: 10px; font-style: normal; font-size: 18px; }
.planner-help b,.planner-help small { display: block; }
.planner-help b { font-size: 10px; }
.planner-help small { margin-top: 3px; color: #79699c; font-size: 8px; }
.planner-event-select { margin-bottom: 14px; }
.planner-summary { margin-bottom: 16px; padding: 18px 22px; color: white; background: radial-gradient(circle at 88% 15%,rgba(255,255,255,.12),transparent 26%),linear-gradient(125deg,#172554,#6040c9); border-radius: 18px; box-shadow: 0 14px 35px rgba(31,34,85,.14); display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 17px; }
.planner-summary > div { width: 60px; height: 60px; color: #2d1f65; background: white; border-radius: 13px; display: grid; place-content: center; text-align: center; }
.planner-summary > div span { font-size: 24px; font-weight: 800; line-height: 1; }
.planner-summary > div small { margin-top: 4px; color: #716788; font-size: 8px; }
.planner-summary section > small { color: #c8b9ff; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.planner-summary h3 { margin: 5px 0 3px; font-size: 17px; }
.planner-summary p { margin: 0; color: #d5daf0; font-size: 10px; }
.planner-summary strong { min-width: 70px; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.16); text-align: center; }
.planner-summary strong b,.planner-summary strong small { display: block; }
.planner-summary strong b { font-size: 28px; }
.planner-summary strong small { color: #cdd4ef; font-size: 8px; }
.planner-add { margin-bottom: 16px; }
.day-planner { position: relative; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 19px; box-shadow: var(--shadow); }
.planner-toolbar { min-height: 54px; padding: 12px 19px; background: #fafafe; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.planner-toolbar span { font-size: 11px; font-weight: 800; }
.planner-toolbar span i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: #724ce0; border-radius: 50%; box-shadow: 0 0 0 4px #eee9ff; }
.planner-toolbar small { color: var(--muted); font-size: 8px; }
.planner-scroll { max-height: 72vh; overflow: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.planner-slot { min-height: 68px; border-bottom: 1px solid #eff0f5; display: grid; grid-template-columns: 72px 1fr; }
.planner-slot:last-child { border-bottom: 0; }
.planner-slot > time { padding: 13px 13px 0 0; color: #77819a; border-right: 1px solid #e9eaf1; text-align: right; font-size: 9px; }
.planner-slot.full-hour > time b { color: #27324e; font-size: 11px; }
.planner-slot.half-hour > time b { color: #b0b6c6; font-size: 8px; font-weight: 600; }
.planner-dropzone { min-height: 67px; padding: 6px 11px; background-image: linear-gradient(90deg,rgba(109,66,239,.025),transparent 35%); display: grid; gap: 7px; transition: .16s ease; }
.planner-dropzone.is-drag-over { background: #eeeaff; box-shadow: inset 0 0 0 2px #987bed; }
.planner-card { position: relative; min-width: 0; background: white; border: 1px solid #dedff0; border-left: 4px solid #7550df; border-radius: 13px; box-shadow: 0 7px 20px rgba(31,38,74,.08); transition: transform .18s ease,box-shadow .18s ease,opacity .18s ease; }
.planner-card[draggable="true"] { cursor: grab; }
.planner-card[draggable="true"]:active { cursor: grabbing; }
.planner-card.is-dragging { opacity: .42; transform: scale(.985); }
.planner-card.is-saving { opacity: .62; pointer-events: none; }
.planner-card.just-moved { border-color: #b6a2f3; box-shadow: 0 0 0 4px rgba(126,87,226,.12),0 14px 30px rgba(66,45,132,.16); }
.planner-card.type-musique { border-left-color: #ef69a0; }
.planner-card.type-repas { border-left-color: #f59e0b; }
.planner-card.type-ceremonie { border-left-color: #2e9dd0; }
.planner-card.type-animation { border-left-color: #18a873; }
.planner-card.type-discours { border-left-color: #df6b52; }
.planner-card-main { min-height: 67px; padding: 10px 13px 10px 9px; display: grid; grid-template-columns: 27px 70px 1fr; align-items: center; gap: 10px; }
.planner-drag-handle { width: 27px; height: 38px; padding: 0; color: #978aac; background: #f4f1fb; border: 0; border-radius: 8px; cursor: grab; font-size: 18px; }
.planner-card-time { padding-right: 10px; border-right: 1px solid var(--line); }
.planner-card-time b,.planner-card-time small { display: block; }
.planner-card-time b { color: #5e3fc3; font-size: 16px; }
.planner-card-time small { margin-top: 3px; color: var(--muted); font-size: 7px; white-space: nowrap; }
.planner-card-copy { min-width: 0; }
.planner-card-copy > span { color: #7550df; font-size: 7px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.planner-card-copy h3 { margin: 3px 0; font-size: 13px; }
.planner-card-copy p { margin: 4px 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.planner-card-copy > small { display: block; margin-top: 4px; color: #8992a7; font-size: 8px; }
.planner-card-copy .music-chip { margin-top: 5px; padding: 5px 8px; font-size: 8px; }
.planner-card-actions { padding: 8px 12px 10px 46px; background: #fbfbfe; border-top: 1px solid #eeeef4; border-radius: 0 0 12px 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quick-move-form { display: flex; flex-wrap: wrap; gap: 5px; }
.quick-move-form button,.planner-editor > summary { min-height: 29px; padding: 0 10px; color: #665c7c; background: white; border: 1px solid #dedeea; border-radius: 8px; cursor: pointer; font-size: 8px; font-weight: 800; }
.quick-move-form button:hover { color: #5c39c1; border-color: #b9a7ed; }
.quick-move-form .primary-shift { color: white; background: #6f49dc; border-color: #6f49dc; }
.planner-editor { position: relative; }
.planner-editor > summary { display: flex; align-items: center; list-style: none; }
.planner-editor > summary::-webkit-details-marker { display: none; }
.planner-editor[open] { width: 100%; }
.planner-editor[open] > summary { width: max-content; margin: 0 0 11px auto; }
.planner-editor[open] > form { padding: 15px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.planner-card-actions:has(.planner-editor[open]) { align-items: stretch; flex-direction: column; }
.planner-edit-buttons { display: flex; justify-content: flex-end; }
.planner-delete { margin-top: 7px !important; padding: 0 !important; background: transparent !important; border: 0 !important; text-align: right; }
.planner-delete button { padding: 0; color: var(--red); background: transparent; border: 0; cursor: pointer; font-size: 8px; font-weight: 800; }
.planner-empty { padding: 35px 20px; border-top: 1px solid var(--line); text-align: center; }
.planner-empty > i { display: grid; width: 48px; height: 48px; margin: 0 auto 10px; place-items: center; color: #7650df; background: #eeeaff; border-radius: 14px; font-style: normal; font-size: 22px; }
.planner-empty h3 { margin: 0 0 5px; }
.planner-empty p { margin: 0; color: var(--muted); font-size: 10px; }
.planner-toast { position: fixed; left: 50%; bottom: 26px; z-index: 1000; padding: 11px 17px; color: white; background: #172554; border-radius: 30px; box-shadow: 0 12px 35px rgba(23,37,84,.25); opacity: 0; transform: translate(-50%,18px); transition: .22s ease; font-size: 10px; font-weight: 800; pointer-events: none; }
.planner-toast.visible { opacity: 1; transform: translate(-50%,0); }
.sparkle-burst { position: fixed; z-index: 1200; width: 1px; height: 1px; pointer-events: none; }
.sparkle-burst i { position: absolute; width: 7px; height: 7px; border-radius: 2px; animation: sparkle-pop .9s cubic-bezier(.15,.65,.25,1) forwards; }
@keyframes sparkle-pop { 0% { opacity: 0; transform: translate(0,0) scale(.2) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x),var(--y)) scale(.75) rotate(var(--r)); } }

/* Comptes et rôles personnalisés */
.mini-link { color: var(--purple); font-size: 10px; font-weight: 800; }
.admin-user-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; margin-top: 17px; }
.admin-user-card { display: grid; gap: 11px; }
.admin-user-head { display: flex; align-items: center; gap: 11px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-user-head > i { display: grid; flex: 0 0 40px; height: 40px; place-items: center; color: white; background: linear-gradient(135deg,#6040ca,#9470ef); border-radius: 12px; font-style: normal; font-weight: 800; }
.admin-user-head > span { min-width: 0; flex: 1; }
.admin-user-head b,.admin-user-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-head b { font-size: 12px; }
.admin-user-head small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.user-status { padding: 5px 8px; border-radius: 20px; font-size: 7px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.user-status.active { color: #08764e; background: #def8ec; }
.user-status.disabled { color: #a3374c; background: #ffe4e9; }
.user-role-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.user-role-line > span { color: var(--muted); font-size: 9px; }
.user-role-line > b { font-size: 9px; }
.custom-role-badge { padding: 5px 9px; color: var(--role-color); background: color-mix(in srgb,var(--role-color) 11%,white); border: 1px solid color-mix(in srgb,var(--role-color) 24%,white); border-radius: 20px; }
.no-custom-role { color: #9aa1b2; font-weight: 600; }
.assign-role-form { padding: 11px; background: #f8f7fc; border: 1px solid #eceaf4; border-radius: 11px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.assign-role-form label { margin: 0; font-size: 8px; }
.assign-role-form select { min-height: 35px; padding: 0 8px; font-size: 9px; }
.assign-role-form .mini-btn { min-height: 35px; }
.user-status-form { display: flex; justify-content: flex-end; }

.roles-layout { display: grid; grid-template-columns: minmax(230px,.7fr) minmax(0,1.8fr); align-items: start; gap: 17px; }
.roles-list { display: grid; gap: 8px; }
.role-new-card,.role-card { min-height: 72px; padding: 13px 14px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 6px 18px rgba(28,35,71,.05); display: flex; align-items: center; gap: 11px; transition: .17s ease; }
.role-new-card:hover,.role-card:hover,.role-new-card.active,.role-card.active { border-color: #c7b7f3; box-shadow: 0 9px 24px rgba(84,58,158,.1); transform: translateY(-1px); }
.role-new-card > i { display: grid; flex: 0 0 34px; height: 34px; place-items: center; color: #6f49da; background: #eeeaff; border-radius: 10px; font-style: normal; font-size: 18px; }
.role-card > i { flex: 0 0 10px; height: 36px; background: var(--role-color); border-radius: 8px; }
.role-new-card span,.role-card span { min-width: 0; flex: 1; }
.role-new-card b,.role-new-card small,.role-card b,.role-card small { display: block; }
.role-new-card b,.role-card b { font-size: 11px; }
.role-new-card small,.role-card small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.role-card em { color: var(--muted); font-size: 7px; font-style: normal; white-space: nowrap; }
.role-list-empty { padding: 23px 14px; color: var(--muted); border: 1px dashed #d7d9e5; border-radius: 12px; text-align: center; font-size: 9px; }
.role-editor { display: grid; gap: 18px; }
.role-editor-title { display: flex; align-items: center; justify-content: space-between; }
.role-editor-title small { color: var(--purple); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.role-editor-title h3 { margin: 5px 0 0; font-size: 19px; }
.role-editor-title input[type="color"] { width: 46px; height: 42px; padding: 4px; background: white; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.permission-groups { display: grid; gap: 12px; }
.permission-groups fieldset { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.permission-groups legend { padding: 0 8px; color: #4f3f76; font-size: 9px; font-weight: 800; }
.role-permissions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.role-permissions > label { min-height: 58px; margin: 0; padding: 10px; background: #fafafe; border: 1px solid #eeeeF4; border-radius: 10px; display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.role-permissions input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--purple); }
.role-permissions span b,.role-permissions span small { display: block; }
.role-permissions span b { font-size: 9px; }
.role-permissions span small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.4; }
.role-editor-actions { display: flex; align-items: center; gap: 15px; }
.role-editor-actions a { color: var(--muted); font-size: 9px; font-weight: 800; }
.delete-role-zone { margin-top: 17px; border-color: #f3cbd2; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.delete-role-zone span b,.delete-role-zone span small { display: block; }
.delete-role-zone span b { color: #a62f46; font-size: 11px; }
.delete-role-zone span small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.delete-role-zone button { padding: 8px 12px; color: white; background: var(--red); border: 0; border-radius: 9px; cursor: pointer; font-size: 8px; font-weight: 800; }

/* Espace client simplifié */
.client-event-switch { max-width: 430px; margin: 0 0 16px auto; }
.client-hero { position: relative; min-height: 250px; overflow: hidden; padding: 38px 42px; color: white; background: radial-gradient(circle at 83% 18%,rgba(255,255,255,.16),transparent 30%),linear-gradient(125deg,#14234e,#6540ce); border-radius: 25px; box-shadow: 0 20px 45px rgba(31,34,85,.18); display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.client-hero::after { content: ""; position: absolute; right: -105px; bottom: -175px; width: 360px; height: 360px; border: 58px solid rgba(255,255,255,.045); border-radius: 50%; }
.client-hero-copy { position: relative; z-index: 1; }
.client-hero-copy > small { color: #cdbfff; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.client-hero-copy > h2 { margin: 10px 0 7px; font-size: clamp(28px,4vw,39px); }
.client-hero-copy > p { margin: 0; color: #d6dcf3; font-size: 13px; }
.client-event-name { margin-top: 25px; padding-left: 14px; border-left: 3px solid #a98aff; display: grid; gap: 4px; }
.client-event-name span { color: #c9d0ec; font-size: 10px; font-weight: 800; }
.client-event-name b { font-size: 18px; }
.client-event-name em { color: #d7dcf1; font-size: 11px; font-style: normal; }
.countdown { position: relative; z-index: 1; width: 160px; height: 160px; padding: 24px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.08); box-shadow: inset 0 0 40px rgba(255,255,255,.05); display: grid; place-content: center; text-align: center; backdrop-filter: blur(8px); }
.countdown b { font-size: 49px; line-height: 1; }
.countdown span { max-width: 100px; margin-top: 8px; color: #d7dcf1; font-size: 9px; line-height: 1.35; }
.client-progress { margin: 18px 0; padding: 19px 24px; display: grid; grid-template-columns: minmax(230px,1fr) 1.5fr; align-items: center; gap: 30px; }
.client-progress span { color: var(--purple); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.client-progress h3 { margin: 5px 0 3px; font-size: 18px; }
.client-progress p { margin: 0; color: var(--muted); font-size: 10px; }
.client-progress-bar { height: 9px; overflow: hidden; background: #ececf4; border-radius: 20px; }
.client-progress-bar i { display: block; height: 100%; background: linear-gradient(90deg,#6042d5,#9b79f4); border-radius: inherit; transition: width .4s ease; }
.client-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 21px; }
.client-actions > a { min-height: 108px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; transition: .18s ease; }
.client-actions > a:hover { border-color: #cbbcf7; transform: translateY(-2px); }
.client-actions > a > i { display: grid; place-items: center; width: 48px; height: 48px; color: #6945d6; background: #f0ebff; border-radius: 14px; font-style: normal; font-size: 22px; }
.client-actions span b,.client-actions span small { display: block; }
.client-actions span b { font-size: 14px; }
.client-actions span small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.client-actions > a > em { color: #6b47d4; font-size: 9px; font-style: normal; font-weight: 800; text-align: right; }
.client-columns { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.client-checklist .section-title,.client-next .section-title { margin-bottom: 12px; }
.client-checklist .section-title h2,.client-next .section-title h2 { font-size: 16px; }
.client-checklist > a { padding: 13px 4px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.client-checklist > a:last-child { border: 0; }
.client-checklist > a > i { display: grid; flex: 0 0 30px; height: 30px; place-items: center; color: #7e879d; background: #eef0f5; border-radius: 50%; font-size: 10px; font-style: normal; font-weight: 800; }
.client-checklist > a.done > i { color: white; background: var(--green); }
.client-checklist span b,.client-checklist span small { display: block; }
.client-checklist span b { font-size: 11px; }
.client-checklist span small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.client-next .section-title a { color: var(--purple); font-size: 9px; font-weight: 800; }
.client-next > div:not(.section-title) { padding: 13px 2px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 13px; }
.client-next time { flex: 0 0 47px; color: #6040c8; font-size: 14px; font-weight: 800; }
.client-next span b,.client-next span small { display: block; }
.client-next span b { font-size: 11px; }
.client-next span small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.client-no-data { padding: 20px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.client-empty { padding: 70px 25px; text-align: center; }
.client-empty-icon { display: grid; width: 72px; height: 72px; margin: 0 auto 18px; place-items: center; color: #6c47da; background: #eee9ff; border-radius: 22px; font-size: 31px; }
.client-empty h2 { margin: 0 0 9px; }
.client-empty p { max-width: 570px; margin: 0 auto 22px; color: var(--muted); line-height: 1.6; }
.client-event-list { display: grid; gap: 15px; }
.client-event-detail { display: grid; grid-template-columns: 105px 1fr auto; align-items: center; gap: 22px; }
.client-event-date { min-height: 92px; color: white; background: linear-gradient(140deg,#172858,#7148df); border-radius: 14px; display: grid; place-content: center; text-align: center; }
.client-event-date b { font-size: 31px; line-height: 1; }
.client-event-date span { margin-top: 5px; color: #d9dff5; font-size: 9px; }
.client-event-main > small { color: var(--purple); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.client-event-main h2 { margin: 6px 0; font-size: 20px; }
.client-event-main p { margin: 0; color: var(--muted); font-size: 11px; }
.client-event-links { display: grid; justify-items: center; gap: 9px; }
.client-event-links > a:not(.btn) { color: var(--purple); font-size: 9px; font-weight: 800; }
.client-help { margin-top: 18px; display: flex; align-items: center; gap: 14px; }
.client-help > i { display: grid; flex: 0 0 42px; height: 42px; place-items: center; color: white; background: var(--purple); border-radius: 13px; font-style: normal; font-weight: 800; }
.client-help > div { flex: 1; }
.client-help h3 { margin: 0 0 4px; font-size: 14px; }
.client-help p { margin: 0; color: var(--muted); font-size: 10px; }
.client-help > a { color: var(--purple); font-size: 10px; font-weight: 800; }

.preferences-title { margin-bottom: 14px; }
.preferences-intro { margin-bottom: 17px; padding: 15px 18px; color: #594782; background: #f1edff; border: 1px solid #ded4ff; border-radius: 13px; display: flex; align-items: center; gap: 11px; }
.preferences-intro i { font-style: normal; font-size: 19px; }
.preferences-intro p { margin: 0; font-size: 11px; line-height: 1.5; }
.preferences-form { display: grid; gap: 15px; }
.preference-section { padding: 25px 27px; }
.preference-heading { margin-bottom: 19px; display: flex; align-items: center; gap: 13px; }
.preference-heading > i { display: grid; flex: 0 0 40px; height: 40px; place-items: center; color: #6845d3; background: #f0ebff; border-radius: 12px; font-size: 11px; font-style: normal; font-weight: 800; }
.preference-heading h3 { margin: 0 0 4px; font-size: 15px; }
.preference-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.preference-section textarea { min-height: 115px; background: #fafafe; line-height: 1.55; }
.preference-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.preferences-save { position: sticky; bottom: 14px; z-index: 10; padding: 14px 16px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 12px 35px rgba(28,35,71,.13); display: flex; align-items: center; justify-content: space-between; gap: 18px; backdrop-filter: blur(12px); }
.preferences-save span { color: var(--muted); font-size: 9px; }

/* Consultation hors ligne */
.offline-page { min-height: 100vh; background: #f4f6fb; }
.offline-header { position: sticky; top: 0; z-index: 20; min-height: 76px; padding: 12px clamp(18px,5vw,70px); background: rgba(17,27,63,.97); box-shadow: 0 8px 30px rgba(17,27,63,.16); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.offline-brand { color: white; display: flex; align-items: center; gap: 12px; }
.offline-brand img { width: 45px; height: 45px; border-radius: 13px; }
.offline-brand b, .offline-brand small { display: block; }
.offline-brand b { font-size: 17px; }
.offline-brand small { margin-top: 4px; color: #aeb9dc; font-size: 8px; letter-spacing: .13em; }
.network-state { padding: 7px 11px; border-radius: 30px; font-size: 9px; font-weight: 800; }
.network-state.offline { color: #ffd777; background: rgba(245,158,11,.14); }
.network-state.online { color: #78efbd; background: rgba(24,168,115,.16); }
.offline-main { width: min(100%,1150px); margin: 0 auto; padding: 35px clamp(16px,4vw,45px) 90px; }
.offline-hero { min-height: 145px; margin-bottom: 22px; padding: 29px 32px; color: white; background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.13), transparent 30%), linear-gradient(120deg,#172554,#5830b4); border-radius: 22px; box-shadow: 0 18px 42px rgba(31,34,85,.15); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.offline-hero small { color: #cbbdff; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.offline-hero h1 { margin: 8px 0 7px; font-size: clamp(25px,4vw,36px); }
.offline-hero p { margin: 0; color: #d5daf0; font-size: 12px; }
.offline-hero .btn:disabled { opacity: .5; cursor: not-allowed; }
.offline-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.offline-meta > div { padding: 17px 19px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.offline-meta span, .offline-meta b { display: block; }
.offline-meta span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.offline-meta b { margin-top: 6px; font-size: 13px; }
.offline-selector { margin-bottom: 15px; padding: 17px 20px; }
.offline-event-info { margin-bottom: 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.offline-event-info small { color: var(--purple); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.offline-event-info h2 { margin: 7px 0 0; }
.offline-event-info p { margin: 5px 0; color: var(--muted); font-size: 11px; }
.offline-planning-title { margin-top: 10px; }
.offline-empty { padding: 38px; text-align: center; }
.offline-empty h2 { margin-top: 0; }
.offline-empty p { max-width: 680px; margin: 0 auto 20px; color: var(--muted); line-height: 1.65; }
.offline-footer { position: fixed; inset: auto 0 0; z-index: 25; min-height: 52px; padding: 10px clamp(16px,5vw,70px); color: #b6c0df; background: rgba(17,27,63,.97); display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 9px; }
.offline-footer button { color: #ffb6c3; background: transparent; border: 0; cursor: pointer; font-size: 9px; font-weight: 800; }
.logout-page { min-height: 100vh; padding: 20px; background: var(--bg); display: grid; place-items: center; }

/* =========================================================
   Identité visuelle et thèmes EventLink 1.4
   ========================================================= */
body[data-theme="velvet"] {
  --navy: #111b3f;
  --navy-2: #1b2a5a;
  --bg: #f5f5fa;
  --text: #17203a;
  --muted: #74809d;
  --line: #e7e8f1;
  --sidebar-from: #0e1736;
  --sidebar-via: #192858;
  --sidebar-to: #49279b;
  --hero-from: #15234f;
  --hero-to: #6038c4;
  --accent-soft: color-mix(in srgb, var(--purple) 11%, white);
  --accent-ink: color-mix(in srgb, var(--purple) 82%, #271b4e);
  --page-glow: color-mix(in srgb, var(--purple) 11%, transparent);
}

body[data-theme="champagne"] {
  --navy: #451b2d;
  --navy-2: #64263f;
  --bg: #fbf7f3;
  --text: #302126;
  --muted: #88767b;
  --line: #eee3df;
  --sidebar-from: #32131f;
  --sidebar-via: #552035;
  --sidebar-to: #8b542d;
  --hero-from: #4a1b30;
  --hero-to: #a15d38;
  --accent-soft: color-mix(in srgb, var(--purple) 10%, #fffaf4);
  --accent-ink: color-mix(in srgb, var(--purple) 78%, #4a2719);
  --page-glow: rgba(183,121,31,.12);
}

body[data-theme="ocean"] {
  --navy: #073b4c;
  --navy-2: #07576a;
  --bg: #f2f9f9;
  --text: #12333b;
  --muted: #69858a;
  --line: #dceced;
  --sidebar-from: #052f3d;
  --sidebar-via: #07556a;
  --sidebar-to: #087f7c;
  --hero-from: #06475b;
  --hero-to: #0d908b;
  --accent-soft: color-mix(in srgb, var(--purple) 10%, #f3fffd);
  --accent-ink: color-mix(in srgb, var(--purple) 80%, #073b4c);
  --page-glow: rgba(15,158,154,.12);
}

body[data-theme="graphite"] {
  --navy: #171b24;
  --navy-2: #252c3a;
  --bg: #f2f4f8;
  --text: #1b2230;
  --muted: #727d90;
  --line: #e1e5ed;
  --sidebar-from: #12151c;
  --sidebar-via: #232a38;
  --sidebar-to: #344168;
  --hero-from: #1c2330;
  --hero-to: #415386;
  --accent-soft: color-mix(in srgb, var(--purple) 10%, #f7f9ff);
  --accent-ink: color-mix(in srgb, var(--purple) 82%, #1b2230);
  --page-glow: rgba(77,107,254,.11);
}

body[data-theme] {
  background:
    radial-gradient(circle at 82% -8%, var(--page-glow), transparent 28rem),
    radial-gradient(circle at 25% 105%, color-mix(in srgb, var(--purple) 5%, transparent), transparent 34rem),
    var(--bg);
}
body[data-theme]:has(> .login) { padding-bottom: 0; }

body[data-theme] .sidebar {
  width: 258px;
  padding: 27px 17px 18px;
  background:
    radial-gradient(circle at 86% 4%, rgba(255,255,255,.13), transparent 20%),
    linear-gradient(165deg, var(--sidebar-from), var(--sidebar-via) 58%, var(--sidebar-to) 125%);
  box-shadow: 18px 0 50px rgba(17,24,53,.10);
}
body[data-theme] .sidebar::before {
  content: "";
  position: absolute;
  right: -90px;
  bottom: 5%;
  width: 210px;
  height: 210px;
  border: 34px solid rgba(255,255,255,.035);
  border-radius: 50%;
  pointer-events: none;
}
body[data-theme] .sidebar > * { position: relative; z-index: 1; }
body[data-theme] .brand { padding: 0 9px 26px; }
body[data-theme] .brand > i,
body[data-theme] .big-logo,
body[data-theme] .login-card-logo,
body[data-theme] .install-logo {
  background: linear-gradient(140deg, var(--purple), var(--purple-2));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--purple) 36%, transparent);
}
body[data-theme] .brand > b { font-size: 20px; letter-spacing: -.03em; }
body[data-theme] .brand small { color: rgba(224,230,255,.62); }
body[data-theme] .sidebar nav {
  min-height: 0;
  padding: 4px 2px 10px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}
body[data-theme] .sidebar nav a {
  min-height: 47px;
  padding: 0 14px;
  border: 1px solid transparent;
  color: rgba(224,230,251,.70);
  border-radius: 13px;
}
body[data-theme] .sidebar nav a i {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: rgba(222,227,248,.64);
  background: rgba(255,255,255,.055);
  border-radius: 8px;
}
body[data-theme] .sidebar nav a:hover {
  color: white;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.06);
  transform: translateX(2px);
}
body[data-theme] .sidebar nav a.active {
  color: white;
  background: linear-gradient(110deg, color-mix(in srgb, var(--purple) 74%, transparent), rgba(255,255,255,.08));
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 10px 25px rgba(3,8,28,.16);
}
body[data-theme] .sidebar nav a.active i { color: white; background: rgba(255,255,255,.14); }
body[data-theme] .account {
  margin-top: auto;
  padding: 16px 8px 2px;
  border-top-color: rgba(255,255,255,.10);
}
body[data-theme] .account > i,
body[data-theme] .header-user > i {
  background: linear-gradient(140deg, var(--purple), var(--purple-2));
  box-shadow: 0 7px 17px color-mix(in srgb, var(--purple) 23%, transparent);
}
body[data-theme] .main { margin-left: 258px; background: transparent; }
body[data-theme] .main > header {
  height: 86px;
  padding: 17px clamp(24px,4vw,60px);
  background: var(--surface-glass);
  border-bottom-color: color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow: 0 8px 30px rgba(28,35,71,.035);
}
body[data-theme] .main > header h1 { margin-top: 4px; font-size: 23px; letter-spacing: -.025em; }
body[data-theme] header small,
body[data-theme] .page-title small,
body[data-theme] .welcome small { color: var(--accent-ink); }
body[data-theme] .header-user > span { display: grid; justify-items: end; gap: 2px; }
body[data-theme] .header-user > span b { font-size: 11px; }
body[data-theme] .header-user > span small { color: var(--muted); font-size: 8px; letter-spacing: 0; text-transform: none; }
body[data-theme] .header-user > a { margin-left: 3px; }
body[data-theme] .content { max-width: 1440px; padding-top: 31px; }

body[data-theme] .panel,
body[data-theme] .event-card,
body[data-theme] .client-actions > a,
body[data-theme] .role-new-card,
body[data-theme] .role-card,
body[data-theme] .day-planner,
body[data-theme] .empty {
  background: rgba(255,255,255,.94);
  border-color: var(--line);
  box-shadow: 0 12px 34px rgba(26,32,62,.065), 0 2px 8px rgba(26,32,62,.025);
}
body[data-theme] .panel,
body[data-theme] .event-card,
body[data-theme] .client-actions > a,
body[data-theme] .role-new-card,
body[data-theme] .role-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
body[data-theme] .event-card:hover,
body[data-theme] .client-actions > a:hover,
body[data-theme] .role-new-card:hover,
body[data-theme] .role-card:hover {
  border-color: color-mix(in srgb, var(--purple) 25%, var(--line));
  box-shadow: 0 17px 42px rgba(26,32,62,.10);
  transform: translateY(-3px);
}
body[data-theme] .page-title h2,
body[data-theme] .section-title h2 { letter-spacing: -.035em; }
body[data-theme] .page-title h2 { font-size: 29px; }
body[data-theme] .page-title p { max-width: 670px; line-height: 1.55; }

body[data-theme] .welcome,
body[data-theme] .client-hero,
body[data-theme] .planner-summary {
  background:
    radial-gradient(circle at 82% 16%, rgba(255,255,255,.16), transparent 28%),
    radial-gradient(circle at 15% 120%, color-mix(in srgb, var(--purple) 38%, transparent), transparent 35%),
    linear-gradient(120deg, var(--hero-from), var(--hero-to));
  box-shadow: 0 22px 54px color-mix(in srgb, var(--hero-from) 23%, transparent);
}
body[data-theme] .welcome { position: relative; overflow: hidden; }
body[data-theme] .welcome::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: -105px;
  width: 220px;
  height: 220px;
  border: 34px solid rgba(255,255,255,.045);
  border-radius: 50%;
}
body[data-theme] .welcome > * { position: relative; z-index: 1; }
body[data-theme] .event-cover,
body[data-theme] .client-event-date {
  background: radial-gradient(circle at 72% 28%, rgba(255,255,255,.22), transparent 24%), linear-gradient(140deg, var(--hero-from), var(--hero-to));
}
body[data-theme] .btn {
  min-height: 46px;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--purple) 25%, transparent);
}
body[data-theme] .btn:hover { box-shadow: 0 13px 28px color-mix(in srgb, var(--purple) 32%, transparent); transform: translateY(-2px); }
body[data-theme] .mini-btn { color: var(--accent-ink); background: var(--accent-soft); }
body[data-theme] input,
body[data-theme] select,
body[data-theme] textarea {
  background: color-mix(in srgb, var(--bg) 52%, white);
  border-color: color-mix(in srgb, var(--line) 80%, #cad0dc);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body[data-theme] input:hover,
body[data-theme] select:hover,
body[data-theme] textarea:hover { border-color: color-mix(in srgb, var(--purple) 25%, var(--line)); }
body[data-theme] input:focus,
body[data-theme] select:focus,
body[data-theme] textarea:focus {
  background: white;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--purple) 12%, transparent);
}
body[data-theme] input[type="checkbox"],
body[data-theme] input[type="radio"] { accent-color: var(--purple); }
body[data-theme] .stats > div { border-color: var(--line); box-shadow: 0 10px 30px rgba(26,32,62,.055); }
body[data-theme] .stats > div > i,
body[data-theme] .client-actions > a > i,
body[data-theme] .preference-heading > i,
body[data-theme] .planner-empty > i,
body[data-theme] .role-new-card > i,
body[data-theme] .music-list article > i {
  color: var(--accent-ink);
  background: var(--accent-soft);
}
body[data-theme] .progress i,
body[data-theme] .client-progress-bar i { background: linear-gradient(90deg, var(--purple), var(--purple-2)); }
body[data-theme] .planner-help,
body[data-theme] .preferences-intro {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--purple) 20%, white);
}
body[data-theme] .planner-toolbar { background: color-mix(in srgb, var(--bg) 62%, white); }
body[data-theme] .planner-toolbar span i { background: var(--purple); box-shadow: 0 0 0 4px var(--accent-soft); }
body[data-theme] .planner-dropzone { background-image: linear-gradient(90deg,color-mix(in srgb,var(--purple) 3%,transparent),transparent 36%); }
body[data-theme] .planner-dropzone.is-drag-over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px color-mix(in srgb,var(--purple) 65%,white); }
body[data-theme] .planner-card { border-left-color: var(--purple); }
body[data-theme] .planner-card-time b,
body[data-theme] .planner-card-copy > span,
body[data-theme] .mini-link,
body[data-theme] .client-next time,
body[data-theme] .client-actions > a > em,
body[data-theme] .client-next .section-title a { color: var(--accent-ink); }
body[data-theme] .quick-move-form .primary-shift { background: var(--purple); border-color: var(--purple); }
body[data-theme] .planner-toast { background: var(--navy-2); }
body[data-theme] .mobile-nav { box-shadow: 0 -10px 32px rgba(26,32,62,.08); }

/* Nouvelle connexion */
body[data-theme] .login { grid-template-columns: minmax(440px,1.08fr) minmax(460px,.92fr); }
body[data-theme] .login-brand {
  min-height: 100vh;
  padding: clamp(38px,5.2vw,82px) clamp(42px,7vw,105px);
  background:
    radial-gradient(circle at 78% 17%, rgba(255,255,255,.15), transparent 23%),
    radial-gradient(circle at 7% 88%, color-mix(in srgb,var(--purple) 38%,transparent), transparent 28%),
    linear-gradient(145deg, var(--sidebar-from), var(--sidebar-via) 56%, var(--sidebar-to) 125%);
  justify-content: space-between;
}
body[data-theme] .login-brand::before {
  content: "";
  position: absolute;
  top: 11%;
  right: 8%;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  opacity: .5;
  box-shadow: 55px 65px 0 -2px rgba(255,255,255,.45), -65px 90px 0 -3px rgba(255,255,255,.4), 30px 160px 0 -3px rgba(255,255,255,.35);
}
body[data-theme] .login-brand-top { position: relative; z-index: 1; display: flex !important; align-items: center; gap: 14px; color: white; }
body[data-theme] .login-brand-top h1 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
body[data-theme] .login-brand-copy { position: relative; z-index: 1; display: block !important; color: white; }
body[data-theme] .login-brand-copy > small { color: rgba(235,239,255,.65); font-size: 9px; font-weight: 800; letter-spacing: .19em; }
body[data-theme] .login-brand-copy h2 { margin-top: 15px; font-size: clamp(40px,4.5vw,66px); letter-spacing: -.055em; }
body[data-theme] .login-brand-copy > p { max-width: 570px; margin: 22px 0 32px; color: rgba(232,237,255,.75); font-size: 15px; }
body[data-theme] .login-benefits { display: flex !important; flex-wrap: wrap; gap: 10px !important; }
body[data-theme] .login-benefits b { padding: 9px 13px 9px 9px; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.10); border-radius: 30px; font-size: 10px; font-weight: 600; backdrop-filter: blur(8px); }
body[data-theme] .login-benefits i { display: inline-grid; width: 20px; height: 20px; margin-right: 5px; place-items: center; color: var(--navy); background: white; border-radius: 50%; font-size: 9px; font-style: normal; }
body[data-theme] .login-signature { position: relative; z-index: 1; color: rgba(232,237,255,.52); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
body[data-theme] .login-side {
  padding: clamp(28px,5vw,70px);
  background: radial-gradient(circle at 100% 0,var(--page-glow),transparent 34%), color-mix(in srgb,var(--bg) 65%,white);
}
body[data-theme] .login-card {
  position: relative;
  width: min(100%,455px);
  padding: 45px 43px 38px;
  border-color: color-mix(in srgb,var(--line) 80%,white);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(26,32,62,.13), 0 4px 15px rgba(26,32,62,.05);
}
body[data-theme] .login-card-logo { display: grid; width: 45px; height: 45px; margin-bottom: 24px; place-items: center; color: white; border-radius: 14px; font-size: 13px; font-weight: 800; }
body[data-theme] .login-card > small { color: var(--accent-ink); }
body[data-theme] .login-card h2 { margin-top: 10px; font-size: 29px; letter-spacing: -.04em; }
body[data-theme] .login-card input { min-height: 51px; padding-inline: 15px; border-radius: 12px; }
body[data-theme] .login-submit { margin-top: 7px; padding-inline: 18px; justify-content: space-between; }
body[data-theme] .login-submit i { display: grid; width: 27px; height: 27px; place-items: center; background: rgba(255,255,255,.16); border-radius: 9px; font-style: normal; }

/* Studio d’apparence */
.site-page-title { align-items: center; }
.live-preview-badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; color: #0b7754; background: #e8faf2; border: 1px solid #c7efdd; border-radius: 30px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.live-preview-badge i { width: 7px; height: 7px; background: #16a875; border-radius: 50%; box-shadow: 0 0 0 4px rgba(22,168,117,.12); animation: preview-pulse 1.8s ease infinite; }
@keyframes preview-pulse { 50% { box-shadow: 0 0 0 7px rgba(22,168,117,0); } }
.site-settings-form { display: grid; gap: 20px; }
.appearance-studio { padding: 27px; }
.panel-heading { margin-bottom: 23px; display: flex; align-items: center; gap: 13px; }
.panel-heading.compact { margin-bottom: 21px; align-items: flex-start; }
.panel-heading-icon { display: grid; flex: 0 0 43px; height: 43px; place-items: center; color: white; background: linear-gradient(135deg,var(--purple),var(--purple-2)); border-radius: 13px; box-shadow: 0 8px 18px color-mix(in srgb,var(--purple) 20%,transparent); font-size: 14px; font-weight: 800; }
.panel-heading small { color: var(--accent-ink); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.panel-heading h3 { margin: 4px 0 3px; font-size: 18px; letter-spacing: -.025em; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.theme-picker { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.theme-choice { position: relative; min-width: 0; padding: 10px; background: color-mix(in srgb,var(--bg) 55%,white); border: 2px solid transparent; border-radius: 16px; cursor: pointer; transition: .2s ease; }
.theme-choice:hover { border-color: color-mix(in srgb,var(--purple) 20%,var(--line)); transform: translateY(-2px); }
.theme-choice:has(input:checked) { background: var(--accent-soft); border-color: var(--purple); box-shadow: 0 10px 28px color-mix(in srgb,var(--purple) 12%,transparent); }
.theme-choice > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.theme-preview { height: 102px; overflow: hidden; background: var(--preview-soft); border-radius: 11px; display: grid; grid-template-columns: 28% 72%; }
.theme-preview-sidebar { padding: 11px 7px; background: linear-gradient(160deg,var(--preview-dark),color-mix(in srgb,var(--preview-dark) 70%,var(--preview-accent))); display: grid; align-content: start; gap: 7px; }
.theme-preview-sidebar::before { content: ""; width: 15px; height: 15px; margin-bottom: 5px; background: var(--preview-accent); border-radius: 5px; }
.theme-preview-sidebar em { height: 4px; background: rgba(255,255,255,.24); border-radius: 5px; }
.theme-preview-sidebar em:nth-child(2) { background: rgba(255,255,255,.5); }
.theme-preview-content { padding: 12px 9px; display: grid; grid-template-columns: repeat(2,1fr); align-content: start; gap: 6px; }
.theme-preview-content::before { content: ""; grid-column: 1/-1; width: 47%; height: 5px; background: var(--preview-dark); border-radius: 6px; }
.theme-preview-content em { grid-column: 1/-1; height: 27px; margin-top: 3px; background: linear-gradient(120deg,var(--preview-dark),var(--preview-accent)); border-radius: 6px; }
.theme-preview-content b,.theme-preview-content span { height: 20px; background: white; border: 1px solid color-mix(in srgb,var(--preview-dark) 10%,transparent); border-radius: 5px; }
.theme-choice-copy { padding: 11px 3px 3px; display: block; }
.theme-choice-copy b,.theme-choice-copy small { display: block; }
.theme-choice-copy b { font-size: 11px; }
.theme-choice-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.theme-selected { position: absolute; top: 17px; right: 17px; display: grid; width: 22px; height: 22px; place-items: center; color: white; background: var(--purple); border: 3px solid white; border-radius: 50%; opacity: 0; transform: scale(.6); transition: .18s ease; font-size: 8px; font-style: normal; }
.theme-choice input:checked ~ .theme-selected { opacity: 1; transform: scale(1); }
.appearance-controls { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: .8fr 1.3fr .9fr; align-items: center; gap: 18px; }
.accent-control { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.accent-control > span:first-child b,.accent-control > span:first-child small { display: block; }
.accent-control > span:first-child b { font-size: 10px; }
.accent-control > span:first-child small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.color-input-wrap { display: flex; align-items: center; gap: 8px; }
.color-input-wrap input[type="color"] { width: 42px; height: 39px; min-height: 0; padding: 4px; background: white; border-radius: 10px; cursor: pointer; }
.color-input-wrap output { color: var(--muted); font-size: 8px; font-weight: 800; }
.density-control { margin: 0; padding: 0 18px; border: 0; border-inline: 1px solid var(--line); display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.density-control legend { margin-bottom: 7px; color: #4c5672; font-size: 9px; font-weight: 800; }
.density-control label { padding: 9px; background: color-mix(in srgb,var(--bg) 55%,white); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: row; align-items: center; gap: 7px; cursor: pointer; }
.density-control label:has(input:checked) { background: var(--accent-soft); border-color: color-mix(in srgb,var(--purple) 42%,white); }
.density-control input { flex: 0 0 auto; width: 14px; min-height: 14px; }
.density-control span b,.density-control span small { display: block; }
.density-control span b { font-size: 8px; }
.density-control span small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.site-settings-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.site-form-card { display: grid; gap: 15px; }
.site-form-card .panel-heading { margin-bottom: 3px; }
.site-modules-card .panel-heading { margin-bottom: 7px; }
.switch-row { position: relative; grid-template-columns: 1fr auto; align-items: center; cursor: pointer; }
.switch-row > input { position: absolute; right: 0; width: 42px; height: 24px; min-height: 0; opacity: 0; cursor: pointer; }
.switch-row > i:last-child { position: relative; flex: 0 0 42px; width: 42px; height: 24px; background: #dfe3eb; border-radius: 30px; transition: .2s ease; pointer-events: none; }
.switch-row > i:last-child::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: white; border-radius: 50%; box-shadow: 0 2px 6px rgba(23,32,58,.18); transition: .2s ease; }
.switch-row > input:checked + i:last-child { background: var(--purple); }
.switch-row > input:checked + i:last-child::after { transform: translateX(18px); }
.motion-control span b,.motion-control span small { display: block; }
.motion-control span b { font-size: 10px; }
.motion-control span small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.site-modules-card .module { margin: 0; padding: 15px 0; grid-template-columns: 42px 1fr auto; }
.site-modules-card .module:last-child { border-bottom: 0; }
.site-modules-card .module-icon { display: grid; width: 38px; height: 38px; place-items: center; color: var(--accent-ink); background: var(--accent-soft); border-radius: 11px; font-style: normal; font-size: 16px; }
.site-save-bar { position: sticky; bottom: 17px; z-index: 18; padding: 14px 15px 14px 20px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 18px 48px rgba(26,32,62,.15); display: flex; align-items: center; justify-content: space-between; gap: 20px; backdrop-filter: blur(16px); transition: border-color .2s ease,box-shadow .2s ease; }
.site-save-bar.is-dirty { border-color: color-mix(in srgb,var(--purple) 35%,var(--line)); box-shadow: 0 18px 48px color-mix(in srgb,var(--purple) 14%,transparent); }
.site-save-bar > span b,.site-save-bar > span small { display: block; }
.site-save-bar > span b { font-size: 11px; }
.site-save-bar > span small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.site-save-bar .btn { gap: 12px; }
.site-save-bar .btn i { font-style: normal; }
.site-save-bar .btn.is-saving { opacity: .75; pointer-events: none; }

/* Densité et mouvement */
body[data-density="compact"] .content { padding-top: 23px; padding-bottom: 42px; }
body[data-density="compact"] .panel { padding: 19px; }
body[data-density="compact"] .stats { margin: 17px 0 25px; }
body[data-density="compact"] .stats > div { min-height: 86px; padding: 15px 18px; }
body[data-density="compact"] .sidebar nav a { min-height: 40px; }
body[data-density="compact"] .event-body { padding: 16px; }
body[data-density="compact"] .client-actions > a { min-height: 91px; padding: 15px; }
body[data-density="compact"] .planner-slot { min-height: 60px; }
body[data-density="compact"] .planner-dropzone { min-height: 59px; }
body[data-density="compact"] .planner-card-main { min-height: 59px; }
body[data-motion="0"] *,
body[data-motion="0"] *::before,
body[data-motion="0"] *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media (max-width: 1100px) {
  .event-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid, .permission-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .login-brand { padding: 60px; }
}

@media (max-width: 780px) {
  body { padding-bottom: 68px; }
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .main > header { height: 75px; padding: 14px 18px; }
  header h1 { font-size: 20px; }
  .header-user a { display: none; }
  .content { padding: 22px 16px 32px; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 30; height: 69px; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-around; backdrop-filter: blur(14px); }
  .mobile-nav a { min-width: 55px; color: #8992aa; display: grid; justify-items: center; gap: 3px; font-size: 8px; font-weight: 700; }
  .mobile-nav a i { font-style: normal; font-size: 18px; }
  .mobile-nav a.active { color: var(--purple); }
  .welcome { min-height: 0; padding: 27px 23px; align-items: start; flex-direction: column; }
  .welcome h2 { font-size: 26px; }
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .stats > div { min-height: 78px; padding: 14px 17px; }
  .stats > div > i { width: 42px; height: 42px; }
  .event-grid, .admin-grid, .settings-grid, .permission-grid, .access-grid, .form-grid, .form-grid.two, .checks { grid-template-columns: 1fr; }
  .page-title h2 { font-size: 23px; }
  .panel { padding: 19px; }
  .timeline::before { left: 65px; }
  .timeline article { grid-template-columns: 50px 15px 1fr; gap: 10px; }
  .time b { font-size: 13px; }
  .timeline-card { padding: 18px; }
  .delete { position: static; padding: 8px 0 0; }
  .table-head { display: none; }
  .table-row { grid-template-columns: 1fr auto; }
  .table-row.users-row { grid-template-columns: 1fr auto; }
  .table-row em:last-child { display: none; }
  .music-list article { flex-wrap: wrap; }
  .music-list article > span { width: calc(100% - 55px); }
  .offline-settings, .offline-event-info, .offline-hero { align-items: stretch; flex-direction: column; }
  .offline-actions { justify-items: stretch; }
  .connection-pill { right: 10px; bottom: 78px; }
  .offline-page { padding-bottom: 0; }
  .offline-main { padding-top: 20px; }
  .offline-meta { grid-template-columns: 1fr; gap: 8px; }
  .offline-footer { align-items: flex-start; flex-direction: column; }
  .client-hero { min-height: 0; padding: 27px 23px; align-items: stretch; flex-direction: column; }
  .countdown { width: auto; height: auto; padding: 15px; border-radius: 15px; display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .countdown b { font-size: 30px; }
  .countdown span { max-width: none; margin: 0 0 0 12px; }
  .client-progress { grid-template-columns: 1fr; gap: 14px; }
  .client-actions,.client-columns,.preference-two { grid-template-columns: 1fr; }
  .client-actions > a { min-height: 92px; grid-template-columns: 44px 1fr; }
  .client-actions > a > i { width: 44px; height: 44px; }
  .client-actions > a > em { grid-column: 2; text-align: left; }
  .client-event-detail { grid-template-columns: 74px 1fr; gap: 14px; }
  .client-event-date { min-height: 76px; }
  .client-event-links { grid-column: 1/-1; justify-items: stretch; }
  .client-event-links .btn { width: 100%; }
  .client-help { align-items: flex-start; flex-wrap: wrap; }
  .client-help > a { width: 100%; margin-left: 56px; }
  .preference-section { padding: 20px 18px; }
  .preferences-save { bottom: 79px; align-items: stretch; flex-direction: column; }
  .planner-page-title { align-items: stretch; flex-direction: column; gap: 13px; }
  .planner-help { max-width: none; }
  .planner-summary { padding: 15px; grid-template-columns: 48px 1fr auto; gap: 11px; }
  .planner-summary > div { width: 48px; height: 48px; }
  .planner-summary > div span { font-size: 20px; }
  .planner-summary strong { min-width: 48px; padding-left: 10px; }
  .planner-summary strong b { font-size: 22px; }
  .planner-toolbar { align-items: flex-start; flex-direction: column; gap: 4px; }
  .planner-scroll { max-height: 68vh; }
  .planner-slot { grid-template-columns: 48px 1fr; }
  .planner-slot > time { padding-right: 7px; }
  .planner-dropzone { padding: 5px 6px; }
  .planner-card-main { padding: 9px 9px 9px 6px; grid-template-columns: 20px 53px 1fr; gap: 7px; }
  .planner-drag-handle { width: 20px; font-size: 14px; }
  .planner-card-time { padding-right: 6px; }
  .planner-card-time b { font-size: 13px; }
  .planner-card-copy h3 { font-size: 11px; }
  .planner-card-copy p { display: none; }
  .planner-card-actions { padding: 8px; align-items: stretch; flex-direction: column; }
  .quick-move-form { display: grid; grid-template-columns: repeat(2,1fr); }
  .quick-move-form button { padding: 0 5px; }
  .planner-editor > summary { justify-content: center; }
  .planner-editor[open] > summary { width: 100%; }
  .planner-toast { bottom: 84px; white-space: nowrap; }
  .admin-user-grid,.roles-layout,.role-permissions { grid-template-columns: 1fr; }
  .roles-list { grid-template-columns: 1fr; }
  .assign-role-form { grid-template-columns: 1fr; }
  .delete-role-zone { align-items: stretch; flex-direction: column; }
  .login { grid-template-columns: 1fr; }
  .login-brand { min-height: 330px; padding: 35px 28px; }
  .login-brand h1 { margin-bottom: 30px; }
  .login-brand h2 { font-size: 35px; }
  .login-brand > p { margin: 15px 0 20px; font-size: 13px; }
  .login-side { padding: 22px 15px; }
  .login-card { padding: 27px 22px; }
  .installer { padding: 20px 12px; }
  .install-card { padding: 25px 20px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .event-grid { grid-template-columns: 1fr; }
  .event-cover { min-height: 115px; }
  .login-brand > div { display: none; }
  .login-brand { min-height: 285px; }
}

@media (max-width: 1100px) {
  .theme-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .appearance-controls { grid-template-columns: 1fr 1.4fr; }
  .motion-control { grid-column: 1/-1; padding-top: 14px; border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  body[data-theme] .login { grid-template-columns: 1fr; }
  body[data-theme] .login-brand { min-height: 430px; padding: 36px clamp(28px,7vw,65px); }
  body[data-theme] .login-brand-copy h2 { font-size: clamp(36px,7vw,52px); }
  body[data-theme] .login-signature { display: none; }
  body[data-theme] .login-side { padding-block: 38px; }
}

@media (max-width: 780px) {
  body[data-theme] .main { margin-left: 0; }
  body[data-theme] .main > header { height: 75px; padding: 14px 18px; }
  body[data-theme] .content { padding: 22px 16px 32px; }
  body[data-theme] .header-user > span { display: none; }
  body[data-theme] .page-title h2 { font-size: 24px; }
  body[data-theme] .panel { padding: 19px; }
  .site-page-title { align-items: flex-start; flex-direction: column; gap: 12px; }
  .live-preview-badge { align-self: flex-start; }
  .appearance-studio { padding: 18px; }
  .appearance-controls,.site-settings-columns { grid-template-columns: 1fr; }
  .density-control { padding: 15px 0; border: 0; border-block: 1px solid var(--line); }
  .motion-control { grid-column: auto; padding-top: 0; border: 0; }
  .site-save-bar { bottom: 80px; align-items: stretch; flex-direction: column; }
  .site-save-bar .btn { width: 100%; }
  body[data-theme] .login-brand { min-height: 380px; padding: 30px 25px; }
  body[data-theme] .login-brand-top { display: flex !important; }
  body[data-theme] .login-brand-copy { display: block !important; }
  body[data-theme] .login-brand-copy > p { margin: 15px 0 21px; font-size: 13px; }
  body[data-theme] .login-brand-copy h2 { margin-bottom: 0; font-size: 37px; }
  body[data-theme] .login-benefits { gap: 7px !important; }
  body[data-theme] .login-benefits b { padding: 7px 10px 7px 7px; font-size: 9px; }
  body[data-theme] .login-side { padding: 24px 14px; }
  body[data-theme] .login-card { padding: 29px 23px; border-radius: 22px; }
}

@media (max-width: 480px) {
  .theme-picker { grid-template-columns: 1fr; }
  .theme-preview { height: 88px; }
  .density-control { grid-template-columns: 1fr; }
  .panel-heading { align-items: flex-start; }
  .panel-heading-icon { flex-basis: 38px; height: 38px; }
  .site-settings-form { gap: 14px; }
  body[data-theme] .login-brand { min-height: 350px; }
  body[data-theme] .login-brand-copy h2 { font-size: 32px; }
  body[data-theme] .login-brand-copy > small { font-size: 7px; }
  body[data-theme] .login-benefits b:last-child { display: none; }
}

/* =========================================================
   Mode jour / nuit EventLink 1.4.1
   ========================================================= */
.color-mode-toggle {
  min-height: 38px;
  padding: 5px 11px 5px 6px;
  color: var(--text);
  background: color-mix(in srgb,var(--card) 88%,transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 7px 20px rgba(26,32,62,.06);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform .18s ease,background .18s ease,border-color .18s ease;
}
.color-mode-toggle:hover { border-color: color-mix(in srgb,var(--purple) 30%,var(--line)); transform: translateY(-1px); }
.color-mode-toggle > i,
.header-user .color-mode-toggle > i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 8px;
  box-shadow: none;
  font-size: 14px;
  font-style: normal;
}
.color-mode-toggle > span { font-size: 9px; font-weight: 800; white-space: nowrap; }
.login-side { position: relative; }
.login-mode-toggle { position: absolute; top: 22px; right: 22px; z-index: 4; }

html[data-color-mode="dark"] body[data-theme] {
  --bg: #0d1118;
  --card: #181d28;
  --text: #f2f5fb;
  --muted: #9aa5ba;
  --line: #2b3241;
  --blue: #182236;
  --shadow: 0 14px 38px rgba(0,0,0,.22);
  --accent-soft: color-mix(in srgb,var(--purple) 18%,#171c27);
  --accent-ink: color-mix(in srgb,var(--purple) 55%,white);
  --page-glow: color-mix(in srgb,var(--purple) 12%,transparent);
  --surface-glass: rgba(16,20,28,.88);
  background:
    radial-gradient(circle at 82% -8%,var(--page-glow),transparent 30rem),
    radial-gradient(circle at 20% 110%,color-mix(in srgb,var(--purple) 7%,transparent),transparent 38rem),
    var(--bg);
}
html[data-color-mode="dark"] body[data-theme] .main > header {
  background: var(--surface-glass);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 35px rgba(0,0,0,.12);
}
html[data-color-mode="dark"] body[data-theme] .panel,
html[data-color-mode="dark"] body[data-theme] .event-card,
html[data-color-mode="dark"] body[data-theme] .client-actions > a,
html[data-color-mode="dark"] body[data-theme] .role-new-card,
html[data-color-mode="dark"] body[data-theme] .role-card,
html[data-color-mode="dark"] body[data-theme] .day-planner,
html[data-color-mode="dark"] body[data-theme] .empty,
html[data-color-mode="dark"] body[data-theme] .timeline-card,
html[data-color-mode="dark"] body[data-theme] .offline-meta > div {
  background: rgba(24,29,40,.96);
  border-color: var(--line);
  box-shadow: 0 14px 38px rgba(0,0,0,.18);
}
html[data-color-mode="dark"] body[data-theme] .stats > div { background: var(--card); border-color: var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.16); }
html[data-color-mode="dark"] body[data-theme] input,
html[data-color-mode="dark"] body[data-theme] select,
html[data-color-mode="dark"] body[data-theme] textarea {
  color: var(--text);
  background: #121722;
  border-color: #343c4e;
}
html[data-color-mode="dark"] body[data-theme] input::placeholder,
html[data-color-mode="dark"] body[data-theme] textarea::placeholder { color: #707b90; }
html[data-color-mode="dark"] body[data-theme] input:focus,
html[data-color-mode="dark"] body[data-theme] select:focus,
html[data-color-mode="dark"] body[data-theme] textarea:focus { background: #161c28; }
html[data-color-mode="dark"] body[data-theme] label { color: #c2cad9; }
html[data-color-mode="dark"] body[data-theme] .table-head,
html[data-color-mode="dark"] body[data-theme] .planner-toolbar,
html[data-color-mode="dark"] body[data-theme] .assign-role-form,
html[data-color-mode="dark"] body[data-theme] .checks label,
html[data-color-mode="dark"] body[data-theme] .role-permissions > label,
html[data-color-mode="dark"] body[data-theme] .theme-choice,
html[data-color-mode="dark"] body[data-theme] .density-control label {
  background: #141924;
  border-color: var(--line);
}
html[data-color-mode="dark"] body[data-theme] .theme-choice:has(input:checked),
html[data-color-mode="dark"] body[data-theme] .density-control label:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--purple);
}
html[data-color-mode="dark"] body[data-theme] .table-row,
html[data-color-mode="dark"] body[data-theme] .music-list article,
html[data-color-mode="dark"] body[data-theme] .client-checklist > a,
html[data-color-mode="dark"] body[data-theme] .client-next > div:not(.section-title),
html[data-color-mode="dark"] body[data-theme] .planner-slot { border-color: var(--line); }
html[data-color-mode="dark"] body[data-theme] .planner-slot > time { color: var(--muted); border-color: var(--line); }
html[data-color-mode="dark"] body[data-theme] .planner-slot.full-hour > time b { color: #d8deea; }
html[data-color-mode="dark"] body[data-theme] .planner-slot.half-hour > time b { color: #667187; }
html[data-color-mode="dark"] body[data-theme] .planner-dropzone { background-image: linear-gradient(90deg,color-mix(in srgb,var(--purple) 5%,transparent),transparent 38%); }
html[data-color-mode="dark"] body[data-theme] .planner-card { color: var(--text); background: #1b2130; border-color: #343c4e; border-left-color: var(--purple); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
html[data-color-mode="dark"] body[data-theme] .planner-card.type-musique { border-left-color: #ef69a0; }
html[data-color-mode="dark"] body[data-theme] .planner-card.type-repas { border-left-color: #f59e0b; }
html[data-color-mode="dark"] body[data-theme] .planner-card.type-ceremonie { border-left-color: #2e9dd0; }
html[data-color-mode="dark"] body[data-theme] .planner-card.type-animation { border-left-color: #18a873; }
html[data-color-mode="dark"] body[data-theme] .planner-card.type-discours { border-left-color: #df6b52; }
html[data-color-mode="dark"] body[data-theme] .planner-card-actions { background: #151a25; border-color: var(--line); }
html[data-color-mode="dark"] body[data-theme] .planner-drag-handle { color: #a9b2c5; background: #252c3b; }
html[data-color-mode="dark"] body[data-theme] .quick-move-form button,
html[data-color-mode="dark"] body[data-theme] .planner-editor > summary { color: #c5ccda; background: #1d2330; border-color: #394255; }
html[data-color-mode="dark"] body[data-theme] .planner-editor[open] > form { background: #171d28; border-color: var(--line); }
html[data-color-mode="dark"] body[data-theme] .music-chip { color: var(--accent-ink); background: var(--accent-soft); }
html[data-color-mode="dark"] body[data-theme] .preference-section textarea { background: #121722; }
html[data-color-mode="dark"] body[data-theme] .preferences-save,
html[data-color-mode="dark"] body[data-theme] .site-save-bar {
  background: rgba(23,28,39,.92);
  border-color: var(--line);
  box-shadow: 0 16px 45px rgba(0,0,0,.28);
}
html[data-color-mode="dark"] body[data-theme] .custom-role-badge { background: color-mix(in srgb,var(--role-color) 16%,#171c27); border-color: color-mix(in srgb,var(--role-color) 35%,#171c27); }
html[data-color-mode="dark"] body[data-theme] .permission-groups legend { color: #c9d0de; }
html[data-color-mode="dark"] body[data-theme] .role-editor-title input[type="color"],
html[data-color-mode="dark"] body[data-theme] .color-input-wrap input[type="color"] { background: #202735; border-color: var(--line); }
html[data-color-mode="dark"] body[data-theme] .switch-row > i:last-child { background: #3b4455; }
html[data-color-mode="dark"] body[data-theme] .switch-row > i:last-child::after { background: #eef1f7; }
html[data-color-mode="dark"] body[data-theme] .client-progress-bar,
html[data-color-mode="dark"] body[data-theme] .progress { background: #303747; }
html[data-color-mode="dark"] body[data-theme] .client-checklist > a > i { color: #a9b2c5; background: #2a3140; }
html[data-color-mode="dark"] body[data-theme] .planner-summary > div { color: var(--text); background: #1a202c; }
html[data-color-mode="dark"] body[data-theme] .planner-summary > div small { color: var(--muted); }
html[data-color-mode="dark"] body[data-theme] .login { background: var(--bg); }
html[data-color-mode="dark"] body[data-theme] .login-side { background: radial-gradient(circle at 100% 0,var(--page-glow),transparent 35%),#10151e; }
html[data-color-mode="dark"] body[data-theme] .login-card { background: #181e29; border-color: #303849; box-shadow: 0 28px 80px rgba(0,0,0,.35); }
html[data-color-mode="dark"] body[data-theme] .help { border-color: var(--line); }
html[data-color-mode="dark"] body[data-theme] .help b { color: var(--text); }
html[data-color-mode="dark"] body[data-theme] .mobile-nav { background: rgba(20,25,35,.96); border-color: var(--line); box-shadow: 0 -10px 32px rgba(0,0,0,.22); }
html[data-color-mode="dark"] body[data-theme] .mobile-nav a { color: #7f899d; }
html[data-color-mode="dark"] body[data-theme] .mobile-nav a.active { color: var(--accent-ink); }
html[data-color-mode="dark"] body[data-theme] .offline-page { background: var(--bg); }
html[data-color-mode="dark"] body[data-theme] .color-mode-toggle { color: var(--text); background: #202633; border-color: #343c4d; box-shadow: 0 8px 22px rgba(0,0,0,.2); }

@media (max-width: 780px) {
  .header-user .color-mode-toggle { width: 38px; padding: 5px; justify-content: center; }
  .header-user .color-mode-toggle > span { display: none; }
  .login-mode-toggle { top: 15px; right: 15px; }
}
