/* =====================================================
   Maison Bleue — système de design v2
   Palette douce et vivante, typographie moderne, composants soignés
   ===================================================== */

:root {
  --color-bg-gradient: radial-gradient(circle at 10% 0%, #f6f0ff 0%, transparent 45%),
                        radial-gradient(circle at 90% 10%, #e8f7f2 0%, transparent 40%),
                        radial-gradient(circle at 50% 100%, #fff2f6 0%, transparent 45%),
                        #f7f6fb;
  --color-surface: #ffffff;
  --color-surface-alt: #faf9ff;

  --color-primary: #7c6df2;
  --color-primary-dark: #6153d6;
  --color-primary-light: #ede9ff;
  --color-secondary: #ff8fab;
  --color-accent: #35c2a0;
  --color-accent-light: #e1f7f0;

  --color-text: #322e4a;
  --color-text-muted: #85809c;
  --color-border: #ece9f7;

  --color-danger: #f0625c;
  --color-danger-dark: #d6473f;
  --color-success: #35c2a0;
  --color-warning: #ffb454;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-soft: 0 6px 20px -4px rgba(90, 70, 160, 0.10);
  --shadow-hover: 0 14px 34px -8px rgba(90, 70, 160, 0.22);
  --shadow-btn: 0 6px 16px -4px rgba(124, 109, 242, 0.45);

  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }

/* ---------- Barre supérieure ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px; }
.topbar nav a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  transition: background .15s ease, color .15s ease;
}
.topbar nav a:hover { background: var(--color-primary-light); text-decoration: none; }
.topbar nav a.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.nav-toggle {
  display: none;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--color-text);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

/* ---------- Cartes ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card.clickable { cursor: pointer; }
.card.clickable:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.activity-card { border-top: 5px solid var(--activity-color, var(--color-primary)); }
.activity-card .titre { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.activity-card .meta { font-size: 0.87rem; color: var(--color-text-muted); }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-light);
  color: #197a63;
}
.badge.pink { background: #ffe4ec; color: #a8305a; }
.badge.blue { background: var(--color-primary-light); color: var(--color-primary-dark); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 22px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { box-shadow: 0 8px 22px -4px rgba(124,109,242,0.55); }
.btn-secondary { background: var(--color-surface-alt); color: var(--color-text); border: 1.5px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-primary-light); border-color: var(--color-primary-light); }
.btn-danger { background: linear-gradient(135deg, var(--color-danger), var(--color-danger-dark)); color: #fff; box-shadow: 0 6px 16px -4px rgba(240,98,92,0.45); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* Grand bouton "action" du tableau de bord */
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 18px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.action-btn .icon { font-size: 1.9rem; }
.action-btn:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background: var(--color-primary-light);
}

/* ---------- Formulaires ---------- */
label { font-weight: 600; font-size: 0.85rem; color: var(--color-text); display: block; margin: 14px 0 6px; }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=date], input[type=time], input[type=number], textarea, select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.94rem;
  background: var(--color-surface-alt);
  color: var(--color-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}
textarea { resize: vertical; min-height: 90px; font-family: var(--font-body); }

/* Select façon menu déroulant moderne (flèche personnalisée) */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='%23857fa3' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
select[multiple] { background-image: none; padding-right: 14px; }

input[type=color] {
  width: 52px; height: 42px; padding: 3px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border); background: var(--color-surface-alt); cursor: pointer;
}

.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 1.05rem; cursor: pointer; padding: 6px;
  line-height: 1; color: var(--color-text-muted);
}

/* Checkbox custom */
input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--color-primary); cursor: pointer; vertical-align: middle;
}
.checkbox-line {
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem;
  background: var(--color-surface-alt); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); padding: 11px 14px; margin-top: 8px; cursor: pointer;
}

.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 180px; }
.form-hint { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 4px; }
fieldset { border: none; padding: 0; margin: 22px 0 0; }
legend { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; color: var(--color-primary-dark); padding: 0 0 10px; width: 100%; border-bottom: 2px solid var(--color-primary-light); margin-bottom: 4px; }

/* ---------- Modales ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(50, 40, 80, 0.38);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn .15s ease; }
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: var(--shadow-hover);
  position: relative;
  animation: popIn .18s ease;
}
.modal-close {
  position: absolute; top: 18px; right: 20px;
  background: var(--color-surface-alt); border: none; border-radius: 50%;
  width: 34px; height: 34px; font-size: 1.2rem; line-height: 1;
  cursor: pointer; color: var(--color-text-muted);
}
.modal-close:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Tableaux (admin) ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); }
th, td { text-align: left; padding: 13px 16px; font-size: 0.9rem; }
th { background: var(--color-surface-alt); font-family: var(--font-heading); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }
td { border-top: 1px solid var(--color-border); }
tbody tr:hover td { background: var(--color-surface-alt); }

/* ---------- Toasts / messages flash ---------- */
.flash { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 600; font-size: 0.9rem; }
.flash.success { background: var(--color-accent-light); color: #197a63; }
.flash.error { background: #fdecea; color: #b8352c; }

.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 13px 20px; border-radius: var(--radius-sm); color: #fff; font-weight: 600; font-size: 0.88rem; box-shadow: var(--shadow-hover); animation: slideIn .25s ease; }
.toast.success { background: var(--color-accent); }
.toast.error { background: var(--color-danger); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- Planning public ---------- */
.view-switch { display: flex; justify-content: center; gap: 6px; margin: 20px 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-pill); padding: 5px; width: fit-content; margin-left: auto; margin-right: auto; }
.view-switch button { border: none; background: transparent; padding: 9px 20px; border-radius: var(--radius-pill); font-weight: 700; font-size: 0.88rem; cursor: pointer; color: var(--color-text-muted); }
.view-switch button.active { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; box-shadow: var(--shadow-btn); }

.calendar-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 22px 0; }
.calendar-nav .month-label { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; min-width: 220px; text-align: center; text-transform: capitalize; }

.planning-grid-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); background: var(--color-surface); border: 1px solid var(--color-border); }
.planning-grid { width: 100%; border-collapse: collapse; min-width: 760px; border: none; border-radius: 0; }
.planning-grid th { background: var(--color-surface-alt); padding: 12px 6px; text-align: center; font-size: 0.78rem; text-transform: capitalize; border: none; }
.planning-grid td { border: 1px solid var(--color-border); vertical-align: top; padding: 4px; height: 54px; width: 14%; }
.planning-grid .hour-label { width: 56px; font-size: 0.76rem; color: var(--color-text-muted); text-align: right; padding-right: 8px; border: none; white-space: nowrap; }

/* Vue semaine : 7 colonnes empilant les événements du jour (pas de grille horaire) */
.week-columns { display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.week-day-head {
  font-family: var(--font-heading); font-weight: 700; font-size: 0.82rem; text-transform: capitalize;
  color: var(--color-text-muted); text-align: center; padding-bottom: 10px; border-bottom: 2px solid var(--color-border); margin-bottom: 10px;
}
.week-day-head span { display: block; font-size: 0.74rem; font-weight: 600; color: var(--color-text-muted); opacity: .8; }
.week-day-empty { text-align: center; color: var(--color-text-muted); font-size: 0.85rem; padding: 14px 0; opacity: .5; }

.vacation-badge {
  background: var(--color-warning); color: #7a4a00; font-weight: 700; font-size: 0.74rem;
  border-radius: var(--radius-pill); padding: 5px 10px; text-align: center; margin-bottom: 8px;
}
.month-cell.is-vacation { background: #fff8ec; border-color: #ffe2b0; }
.week-event-card {
  background: var(--color-surface); border-left: 5px solid var(--activity-color, var(--color-primary));
  border-radius: var(--radius-sm); box-shadow: var(--shadow-soft); padding: 10px 12px; margin-bottom: 10px;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.week-event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.week-event-card .heure { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; color: var(--color-primary-dark); line-height: 1; }
.week-event-card .titre { font-size: 0.86rem; font-weight: 600; color: var(--color-text); margin-top: 4px; }

@media (max-width: 800px) {
  .week-columns { grid-template-columns: repeat(7, minmax(110px, 1fr)); }
}
@media (max-width: 640px) {
  .week-columns { display: flex; flex-direction: column; }
}

.event-chip { background: var(--chip-color, var(--color-primary)); color: #fff; border-radius: 8px; padding: 4px 8px; font-size: 0.74rem; margin-bottom: 3px; cursor: pointer; line-height: 1.25; box-shadow: 0 2px 6px rgba(0,0,0,0.15); transition: filter .1s ease; }
.event-chip:hover { filter: brightness(0.92); }
.event-chip .t { font-weight: 700; display:block; }

.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.month-grid .month-day-head { text-align: center; font-weight: 700; font-size: 0.78rem; color: var(--color-text-muted); text-transform: capitalize; }
.month-grid .month-cell { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); min-height: 90px; padding: 7px; box-shadow: var(--shadow-soft); }
.month-grid .month-cell .day-num { font-weight: 700; font-size: 0.8rem; color: var(--color-text-muted); }
.month-grid .month-cell.out { opacity: 0.35; }

.day-group { margin-bottom: 28px; }
.day-group h3 { text-transform: capitalize; color: var(--color-primary-dark); border-bottom: 2px solid var(--color-border); padding-bottom: 6px; }

.empty-state { text-align: center; color: var(--color-text-muted); padding: 50px 20px; font-size: 0.95rem; }

/* ---------- Login ---------- */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-card .logo { font-size: 2.4rem; margin-bottom: 6px; }

/* ---------- Dashboard ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 34px; }
.stat-card { text-align: center; }
.stat-card .value { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--color-primary-dark); }
.stat-card .label { color: var(--color-text-muted); font-size: 0.82rem; margin-top: 2px; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; margin-top: 20px; }

/* ---------- Accordéon activités ---------- */
.accordion-item { margin-bottom: 14px; }
.accordion-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; cursor: pointer; }
.accordion-head .chevron { transition: transform .2s ease; color: var(--color-text-muted); font-size: 1.1rem; }
.accordion-item.open > .accordion-head .chevron { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.accordion-item.open > .accordion-body { max-height: 4000px; }
.accordion-body-inner { padding-top: 16px; }

@media (max-width: 640px) {
  .topbar { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .topbar nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    order: 3;
    margin-top: 10px;
  }
  .topbar nav.open { display: flex; }
  .topbar nav a { width: 100%; }
  .page { padding: 22px 16px 56px; }
}

/* =====================================================
   Prise de rendez-vous — composants spécifiques
   ===================================================== */
:root {
  --color-matin: #fff1d9;
  --color-matin-text: #95590a;
  --color-aprem: #ffe4ec;
  --color-aprem-text: #a8305a;
}

.brand-logo { font-size: 1.4rem; }
.brand-text { overflow: hidden; text-overflow: ellipsis; }
.topbar .brand { min-width: 0; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: var(--radius-pill); background: var(--color-secondary); color: #fff;
  font-size: 0.72rem; font-weight: 800;
}
.topbar nav a.active .nav-badge { background: #fff; color: var(--color-primary-dark); }
.topbar nav a.nav-logout { color: var(--color-text-muted); }

.muted { color: var(--color-text-muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 10px !important; } .mt-2 { margin-top: 20px !important; } .mt-3 { margin-top: 32px !important; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 20px; }
.stack > * + * { margin-top: 18px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form { display: inline; }
.btn-ghost { background: transparent; color: var(--color-primary-dark); padding: 8px 12px; }
.btn-ghost:hover { background: var(--color-primary-light); }
.btn-success { background: linear-gradient(135deg, #3fd0ad, #22a585); color: #fff; box-shadow: 0 6px 16px -4px rgba(53,194,160,.45); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.field-error { color: #b8352c; font-size: 0.8rem; font-weight: 600; margin-top: 4px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--color-danger); }
.req { color: var(--color-secondary); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.page-title { margin-bottom: 4px; }
.page-sub { color: var(--color-text-muted); margin: 0 0 24px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; margin-bottom: 16px; }

/* ---------- Pied de page public ---------- */
.site-footer {
  max-width: 1180px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; color: var(--color-text-muted); font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
}
.site-footer a { color: var(--color-text-muted); font-weight: 600; }

/* ---------- Accueil public ---------- */
.hero { text-align: center; padding: 48px 0 24px; }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); margin-bottom: 14px; }
.hero .intro { max-width: 620px; margin: 0 auto 38px; color: var(--color-text-muted); font-size: 1.08rem; }
.big-cta {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 34px 56px; border-radius: 32px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff; font-family: var(--font-heading); font-size: clamp(1.35rem, 3.5vw, 1.8rem); font-weight: 800;
  box-shadow: 0 18px 40px -12px rgba(97, 83, 214, 0.6);
  transition: transform .18s ease, box-shadow .18s ease;
}
.big-cta .icon { font-size: 2.6rem; line-height: 1; }
.big-cta small { font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; opacity: .85; }
.big-cta:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 24px 50px -12px rgba(97, 83, 214, 0.7); text-decoration: none; }
.big-cta:focus-visible, .halfday > summary:focus-visible, .slot-btn:focus-visible, .hd-tile:focus-visible {
  outline: 3px solid var(--color-secondary); outline-offset: 3px;
}
.hero-infos { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 42px; }
.hero-infos .info-pill {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-pill);
  padding: 10px 18px; font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow-soft);
}
.lieux-public { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 820px; margin: 40px auto 0; }
.lieux-public .card { padding: 18px 20px; }
.lieux-public .card strong { font-family: var(--font-heading); display: block; }

/* ---------- Choix de la demi-journée (public) ---------- */
.choix-wrap { max-width: 780px; margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 26px; }
.chip {
  padding: 9px 18px; border-radius: var(--radius-pill); background: var(--color-surface);
  border: 1.5px solid var(--color-border); color: var(--color-text); font-weight: 600; font-size: 0.88rem;
}
.chip:hover { border-color: var(--color-primary); text-decoration: none; }
.chip.active { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; border-color: transparent; box-shadow: var(--shadow-btn); }

.halfday-list { display: flex; flex-direction: column; gap: 14px; }
.halfday {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); overflow: hidden;
  transition: box-shadow .2s ease;
}
.halfday[open] { box-shadow: var(--shadow-hover); border-color: var(--color-primary-light); }
.halfday > summary {
  list-style: none; display: flex; align-items: center; gap: 18px; padding: 16px 22px 16px 16px; cursor: pointer;
}
.halfday > summary::-webkit-details-marker { display: none; }
.halfday > summary:hover { background: var(--color-surface-alt); }
.date-block {
  width: 78px; flex-shrink: 0; text-align: center; border-radius: var(--radius-md);
  padding: 8px 4px; background: var(--color-primary-light); color: var(--color-primary-dark);
}
.date-block .dow { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.date-block .num { font-family: var(--font-heading); font-size: 2.1rem; font-weight: 800; line-height: 1.05; }
.date-block .mon { font-size: 0.75rem; font-weight: 600; }
.halfday-info { flex: 1; min-width: 0; }
.halfday-info .jour { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; line-height: 1.2; }
.halfday-info .jour::first-letter { text-transform: uppercase; }
.halfday-info .sous { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.halfday-info .lieu { color: var(--color-text-muted); font-weight: 600; font-size: 0.92rem; }
.periode { display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 0.78rem; font-weight: 800; }
.periode.matin { background: var(--color-matin); color: var(--color-matin-text); }
.periode.apresmidi { background: var(--color-aprem); color: var(--color-aprem-text); }
.halfday-count { text-align: right; flex-shrink: 0; }
.halfday-count strong { display: block; font-family: var(--font-heading); font-size: 1.3rem; color: #197a63; line-height: 1; }
.halfday-count span { font-size: 0.75rem; color: var(--color-text-muted); font-weight: 600; }
.halfday .chev { color: var(--color-text-muted); transition: transform .2s ease; font-size: 1.1rem; }
.halfday[open] .chev { transform: rotate(180deg); }
.slots-wrap { padding: 4px 22px 22px; border-top: 1px dashed var(--color-border); }
.slots-wrap p { margin: 14px 0 12px; font-weight: 600; font-size: 0.9rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.slot-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-alt);
  color: var(--color-text); text-align: center; transition: all .15s ease;
}
.slot-btn .h { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; color: var(--color-primary-dark); line-height: 1.1; }
.slot-btn .f { font-size: 0.78rem; color: var(--color-text-muted); }
.slot-btn .m { font-size: 0.78rem; font-weight: 600; margin-top: 4px; }
.slot-btn:hover { border-color: var(--color-primary); background: var(--color-primary-light); transform: translateY(-2px); text-decoration: none; }

/* ---------- Formulaire de réservation ---------- */
.resa-layout { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; max-width: 960px; margin: 0 auto; }
.recap { position: sticky; top: 90px; }
.recap .big-date { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.recap .big-date::first-letter { text-transform: uppercase; }
.recap .big-heure { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--color-primary-dark); margin: 6px 0 12px; }
.recap ul { list-style: none; padding: 0; margin: 0; }
.recap li { padding: 8px 0; border-top: 1px solid var(--color-border); font-size: 0.92rem; }
.success-box { max-width: 620px; margin: 0 auto; text-align: center; }
.success-box .check {
  width: 82px; height: 82px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
  background: var(--color-accent-light); color: #197a63; font-size: 2.6rem;
}
.success-box .recap-inline { background: var(--color-surface-alt); border-radius: var(--radius-md); padding: 18px; margin: 20px 0; text-align: left; }
.success-box .recap-inline div { padding: 4px 0; }

/* ---------- Espace médiateurs : planning ---------- */
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-nav .label { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; margin: 0 6px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.toggle-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.88rem; cursor: pointer; }
.summary-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.summary-chips .info-pill { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-pill); padding: 8px 16px; font-size: 0.85rem; font-weight: 600; }
.summary-chips .info-pill b { font-family: var(--font-heading); color: var(--color-primary-dark); }

.board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.board-day { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.board-dayhead {
  text-align: center; padding: 8px 4px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.8rem;
  color: var(--color-text-muted); text-transform: capitalize;
}
.board-dayhead b { display: block; font-family: var(--font-heading); font-size: 1.35rem; color: var(--color-text); line-height: 1.1; }
.board-day.today .board-dayhead { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; box-shadow: var(--shadow-btn); }
.board-day.today .board-dayhead b { color: #fff; }
.board-day.past { opacity: .62; }
.hd-tile {
  display: flex; flex-direction: column; gap: 7px; width: 100%; min-height: 108px; padding: 10px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft); cursor: pointer; text-align: left; color: var(--color-text);
  font: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.hd-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--color-primary-light); text-decoration: none; }
.hd-tile.empty {
  background: transparent; box-shadow: none; border: 1.5px dashed var(--color-border);
  align-items: center; justify-content: center; color: var(--color-text-muted); font-size: 0.8rem; font-weight: 600;
}
.hd-tile.empty:hover { border-color: var(--color-primary); color: var(--color-primary-dark); background: var(--color-surface); }
.hd-tile.empty .plus { font-size: 1.3rem; line-height: 1; }
.hd-tile .hd-label { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.hd-tile .hd-label.matin { color: var(--color-matin-text); }
.hd-tile .hd-label.apresmidi { color: var(--color-aprem-text); }
.hd-lieu { display: block; font-size: 0.78rem; }
.hd-tile > span { display: block; }
.hd-lieu .n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.hd-lieu .c { display: block; color: var(--color-text-muted); font-size: 0.74rem; }
.gauge { display: block; height: 6px; border-radius: var(--radius-pill); background: var(--color-accent-light); overflow: hidden; margin-top: 4px; }
.gauge i { display: block; height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); }
.hd-tile > .dots, .dots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--c, var(--color-primary)); flex-shrink: 0; }

/* Liste des créneaux (modale + fiches) */
.slot-list { display: flex; flex-direction: column; gap: 8px; }
.slot-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-surface-alt); color: var(--color-text);
  border-left: 5px solid var(--c, var(--color-primary)); transition: background .15s ease, transform .15s ease;
}
.slot-row:hover { background: var(--color-primary-light); text-decoration: none; transform: translateX(2px); }
.slot-row .t { font-family: var(--font-heading); font-weight: 800; min-width: 104px; color: var(--color-primary-dark); }
.slot-row .who { flex: 1; min-width: 0; font-size: 0.88rem; }
.slot-row .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-row .who span { color: var(--color-text-muted); font-size: 0.8rem; }
.lieu-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; color: var(--color-text-muted); margin: 18px 0 8px; }
.lieu-title:first-child { margin-top: 0; }

.pill { display: inline-block; padding: 4px 11px; border-radius: var(--radius-pill); font-size: 0.74rem; font-weight: 800; white-space: nowrap; }
.st-libre   { background: var(--color-accent-light); color: #197a63; }
.st-reserve { background: var(--color-primary-light); color: var(--color-primary-dark); }
.st-bloque  { background: #efeef4; color: #6b6880; }
.st-venu    { background: #d3f5e9; color: #0f6b54; }
.st-absent  { background: #fdecea; color: #b8352c; }
.st-annule  { background: #efeef4; color: #6b6880; text-decoration: line-through; }

/* ---------- Fiche créneau ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.creneau-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.creneau-head .when { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.creneau-head .when::first-letter { text-transform: uppercase; }
.creneau-head .heure-big { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; color: var(--color-primary-dark); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; margin: 0; font-size: 0.92rem; }
.kv dt { color: var(--color-text-muted); font-weight: 600; }
.kv dd { margin: 0; word-break: break-word; }
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.section-title { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
details.more { margin-top: 14px; border-top: 1px solid var(--color-border); padding-top: 12px; }
details.more > summary { cursor: pointer; font-weight: 700; font-size: 0.9rem; color: var(--color-primary-dark); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '▸ '; }
details.more[open] > summary::before { content: '▾ '; }
.owner-note { background: #fff8ec; border: 1px solid #ffe2b0; color: #7a4a00; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 0.86rem; font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 0.86rem; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--color-primary); }
.timeline li::after { content: ''; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--color-border); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--color-text-muted); font-size: 0.78rem; }

/* ---------- Rendez-vous ---------- */
.view-switch a { padding: 9px 20px; border-radius: var(--radius-pill); font-weight: 700; font-size: 0.88rem; color: var(--color-text-muted); }
.view-switch a:hover { text-decoration: none; background: var(--color-surface-alt); }
.view-switch a.active { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; box-shadow: var(--shadow-btn); }
.view-switch.left { margin-left: 0; }
.search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.search-form input { max-width: 320px; }
.rdv-day { margin-bottom: 26px; }
.rdv-day h3 { font-size: 1rem; color: var(--color-primary-dark); margin-bottom: 10px; }
.rdv-day h3::first-letter { text-transform: uppercase; }
.a-pointer { border-left-color: var(--color-warning) !important; }

/* ---------- Notifications ---------- */
.notif-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--color-border); margin-bottom: 10px; }
.notif-item.unread { border-left: 5px solid var(--color-secondary); background: #fffafc; }
.notif-item .ico { font-size: 1.3rem; line-height: 1.2; }
.notif-item .txt { flex: 1; font-size: 0.92rem; }
.notif-item .when { font-size: 0.78rem; color: var(--color-text-muted); }

/* ---------- Ajout de créneaux ---------- */
.quick-fill { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.preview-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.preview-slots span { background: var(--color-primary-light); color: var(--color-primary-dark); border-radius: var(--radius-pill); padding: 5px 11px; font-size: 0.8rem; font-weight: 700; }
.preview-box { background: var(--color-surface-alt); border: 1.5px dashed var(--color-border); border-radius: var(--radius-md); padding: 16px; margin-top: 20px; }

/* ---------- Stats ---------- */
.bar-row { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 70px; gap: 12px; align-items: center; font-size: 0.86rem; padding: 6px 0; }
.bar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bar-row .val { text-align: right; font-weight: 700; }
.bar { height: 12px; border-radius: var(--radius-pill); background: var(--color-primary-light); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); }
.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.table-wrap { overflow-x: auto; }

.login-card h1 { font-size: 1.4rem; }
.login-card form { text-align: left; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .board { grid-template-columns: 1fr; gap: 12px; }
  .board-day { display: grid; grid-template-columns: 76px 1fr 1fr; gap: 8px; align-items: stretch; }
  .board-dayhead { display: flex; flex-direction: column; justify-content: center; background: var(--color-surface); border: 1px solid var(--color-border); }
  .hd-tile { min-height: 84px; }
}
@media (max-width: 860px) {
  .resa-layout, .detail-grid { grid-template-columns: 1fr; }
  .recap { position: static; }
}
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar .brand { flex: 1; font-size: 1.05rem; }
  .halfday > summary { gap: 12px; padding: 12px 14px 12px 12px; }
  .date-block { width: 64px; }
  .date-block .num { font-size: 1.7rem; }
  .halfday-info .jour { font-size: 1.1rem; }
  .halfday .chev { display: none; }
  .slots-wrap { padding: 4px 14px 16px; }
  .slots { grid-template-columns: repeat(2, 1fr); }
  .big-cta { padding: 28px 34px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .bar-row { grid-template-columns: 90px 1fr 50px; }
  .board-day { grid-template-columns: 58px 1fr 1fr; }
  .slot-row .t { min-width: 84px; font-size: 0.9rem; }
  .modal { padding: 24px 18px; }
}

/* =====================================================
   v2 — lieu en rouge, une case par lieu, rendez-vous par médiateur
   ===================================================== */
:root { --color-lieu: #e0435c; --color-lieu-light: #ffe8eb; --color-lieu-text: #c42c46; }

/* Public : le lieu en pastille rouge, la demi-journée en texte simple */
.lieu-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 13px; border-radius: var(--radius-pill);
  background: var(--color-lieu-light); color: var(--color-lieu-text); font-weight: 800; font-size: 0.86rem;
}
.periode-txt { color: var(--color-text-muted); font-weight: 700; font-size: 0.88rem; }

/* Planning : une case par lieu, bien séparées */
.hd-cell { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hd-periode { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--color-text-muted); padding-left: 4px; }
.hd-cell .hd-tile { min-height: 0; border-left: 4px solid var(--color-lieu); gap: 5px; }
.hd-cell .hd-tile.empty { min-height: 108px; border-left-width: 1.5px; }
.hd-lieu-nom { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 0.82rem; color: var(--color-lieu-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-med { display: flex !important; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; min-width: 0; flex-wrap: wrap; }
.hd-med em { font-style: normal; font-weight: 500; color: var(--color-text-muted); font-size: 0.72rem; }
.hd-add {
  display: flex; align-items: center; justify-content: center; height: 28px; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--color-border); color: var(--color-text-muted); font-weight: 700;
}
.hd-add:hover { border-color: var(--color-primary); color: var(--color-primary-dark); text-decoration: none; background: var(--color-surface); }

/* Modale */
.modal { max-width: 660px; }
.modal-lieu {
  display: inline-block; margin: -4px 0 16px; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--color-lieu-light); color: var(--color-lieu-text); font-family: var(--font-heading); font-weight: 700;
}
.groupe {
  border: 1px solid var(--color-border); border-left: 5px solid var(--c, var(--color-primary));
  border-radius: var(--radius-md); background: var(--color-surface); margin-bottom: 12px; overflow: hidden;
}
.groupe.open { box-shadow: var(--shadow-soft); }
.groupe-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.groupe-toggle {
  display: flex; align-items: center; gap: 10px; background: none; border: none; cursor: pointer; padding: 4px;
  font: inherit; color: var(--color-text); text-align: left; flex: 1; min-width: 180px;
}
.groupe-toggle .chev { color: var(--color-text-muted); transition: transform .2s ease; }
.groupe.open .groupe-toggle .chev { transform: rotate(90deg); }
.groupe-toggle .dot { width: 14px; height: 14px; }
.groupe-nom b { display: block; font-family: var(--font-heading); font-size: 1rem; }
.groupe-nom small { color: var(--color-text-muted); font-size: 0.8rem; font-weight: 600; }
.groupe-actions { display: flex; gap: 6px; align-items: center; }
.groupe-body { padding: 4px 12px 14px; border-top: 1px dashed var(--color-border); background: var(--color-surface-alt); }
.groupe-body .slot-list { margin-top: 10px; }
.slot-line { display: flex; gap: 6px; align-items: stretch; }
.slot-line .slot-row { flex: 1; min-width: 0; background: var(--color-surface); }
.slot-tools { display: flex; gap: 4px; align-items: center; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: var(--color-surface);
  cursor: pointer; font-size: 0.95rem; transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: var(--color-primary-light); border-color: var(--color-primary-light); }
.icon-btn.danger:hover { background: #fdecea; border-color: #f7c6c2; }
.groupe-edit { margin-top: 14px; padding: 14px; border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--color-border); }
.groupe-edit-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; color: var(--color-primary-dark); }
.groupe-edit label { margin-top: 10px; }

/* Création : une ligne par médiateur */
.ligne {
  border: 1px solid var(--color-border); border-left: 5px solid var(--color-primary); border-radius: var(--radius-md);
  padding: 14px 16px; margin-top: 14px; background: var(--color-surface-alt);
}
.ligne-head { display: flex; gap: 10px; align-items: center; }
.ligne-head select { font-weight: 700; }
.ligne .form-row > * { min-width: 120px; }
.ligne label { margin-top: 10px; }

@media (max-width: 640px) {
  .groupe-actions { width: 100%; justify-content: flex-end; }
  .slot-line { flex-wrap: wrap; }
  .slot-tools { width: 100%; justify-content: flex-end; }
}
.hd-cell .hd-tile.empty { border-left: 1.5px dashed var(--color-border); }
.hd-cell .hd-tile.empty:hover { border-color: var(--color-primary); }
.hd-lieu-nom { white-space: normal; overflow: visible; line-height: 1.25; }
.icon-btn.placeholder { visibility: hidden; }
#modal-title { padding-right: 40px; }
@media (max-width: 640px) {
  .slot-line { flex-wrap: nowrap; }
  .slot-tools { width: auto; flex-direction: column; justify-content: center; gap: 4px; }
  .slot-tools .icon-btn { width: 32px; height: 32px; font-size: 0.85rem; }
  .slot-tools .icon-btn.placeholder { display: none; }
  .groupe-body .slot-row { padding: 10px; gap: 8px; flex-wrap: wrap; }
  .groupe-body .slot-row .t { min-width: 0; }
  .groupe-body .slot-row .who { flex-basis: 100%; order: 3; }
  #modal-title { font-size: 1.15rem; }
}

/* =====================================================
   v3 — une couleur par lieu (variable --lc posée sur l'élément)
   ===================================================== */
.lieu-pill, .modal-lieu {
  background: var(--color-lieu-light);
  background: color-mix(in srgb, var(--lc, #e0435c) 14%, #fff);
  color: var(--color-lieu-text);
  color: color-mix(in srgb, var(--lc, #e0435c) 78%, #1d1830);
}
.hd-cell .hd-tile:not(.empty) {
  border-left-color: var(--lc, var(--color-lieu));
  background: color-mix(in srgb, var(--lc, #e0435c) 5%, #fff);
}
.hd-lieu-nom { color: var(--color-lieu-text); color: color-mix(in srgb, var(--lc, #e0435c) 80%, #1d1830); }
.hd-cell .hd-tile:not(.empty) .gauge i { background: var(--lc, var(--color-primary)); }
.halfday { border-left: 6px solid var(--lc, var(--color-border)); }
.chip-lieu { border-color: color-mix(in srgb, var(--lc, #e0435c) 35%, #fff); }
.chip-lieu.active { background: var(--lc, var(--color-primary)); border-color: transparent; box-shadow: 0 6px 16px -6px var(--lc, rgba(0,0,0,.3)); }
.lieu-card { border-top: 5px solid var(--lc, var(--color-border)); }
.passages { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.passages a {
  display: inline-block; padding: 5px 11px; border-radius: var(--radius-pill); font-size: 0.82rem; color: var(--color-text);
  background: color-mix(in srgb, var(--lc, #e0435c) 12%, #fff);
}
.passages a:hover { text-decoration: none; background: color-mix(in srgb, var(--lc, #e0435c) 22%, #fff); }
.etape-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--color-border); flex-wrap: wrap; }
.nouvelle-etape { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-md); border: 1.5px dashed var(--color-primary); background: var(--color-primary-light); }
.nouvelle-etape label { margin-top: 6px; }

/* v4 — visibilité en ligne des créneaux */
.st-cache { background: #fff3e0; color: #9a5800; }
.cache-why { color: #9a5800 !important; font-weight: 600; }
.info-pill.warn { background: #fff3e0 !important; border-color: #ffd8a8 !important; color: #7a4a00; }
.warn-txt { color: #c26a00; font-weight: 700; }
.visibility-note { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 0.86rem; font-weight: 600; margin-top: 10px; }
.visibility-note.ok { background: var(--color-accent-light); color: #197a63; }
.visibility-note.ko { background: #fff3e0; color: #7a4a00; border: 1px solid #ffd8a8; }

/* v5 — prénom de la personne inscrite mis en avant */
.hd-inscrits { display: block; font-size: 0.74rem; font-weight: 700; color: #197a63; padding-left: 16px; line-height: 1.3; }
.prenom-inscrit { color: #197a63; font-size: 1rem; }

/* v6 — logo TiMozaïk, bouton « Prendre rendez-vous » plus compact, connexion médiateurs */
.brand-img { height: 40px; width: auto; flex-shrink: 0; display: block; }
.hero { padding-top: 28px; }
.hero-logo { display: block; width: 150px; height: auto; margin: 0 auto 14px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.hero .intro { margin-bottom: 28px; }
.big-cta { padding: 22px 40px; border-radius: 26px; font-size: clamp(1.15rem, 3vw, 1.4rem); gap: 6px; }
.big-cta .icon { font-size: 2rem; }
.big-cta small { font-size: 0.82rem; }
.hero-infos { margin-top: 30px; }
.login-logo { display: block; width: 110px; height: auto; margin: 0 auto 8px; }
.btn-connexion { white-space: nowrap; }
/* Planning : les cases vides ne sont plus cliquables */
.hd-cell .hd-tile.empty { cursor: default; opacity: .7; }
.hd-cell .hd-tile.empty:hover { border-color: var(--color-border); color: var(--color-text-muted); background: transparent; transform: none; }
@media (max-width: 640px) {
  .brand-img { height: 34px; }
  .btn-connexion span { display: none; }
  .hero-logo { width: 120px; }
  .big-cta { padding: 20px 30px; }
}
.brand-img { height: 48px; margin: -4px 0; }
.hero-logo { width: 170px; }
@media (max-width: 640px) { .brand-img { height: 40px; } .hero-logo { width: 130px; } }
.span-all { grid-column: 1 / -1; }

/* v7 — carnet de contacts */
.contact-lettre { font-family: var(--font-heading); font-weight: 800; color: var(--color-primary-dark); font-size: .85rem; padding: 10px 10px 4px; border-bottom: 1px solid var(--color-border); }
.contact-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); color: var(--color-text); }
.contact-row:hover, .contact-row.active { background: var(--color-primary-light); text-decoration: none; }
.contact-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: #fff; font-weight: 800; font-family: var(--font-heading); }
.contact-nom { flex: 1; min-width: 0; font-size: .92rem; }
.contact-nom span { display: block; font-size: .8rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Menu : tient sur une ligne avec « Contacts » */
.topbar nav a { padding: 8px 12px; font-size: 0.86rem; }
@media (max-width: 1180px) and (min-width: 641px) { .topbar .brand-text { display: none; } }

/* v8 — créneaux un par un */
.mode-switch { display: inline-flex; gap: 4px; padding: 4px; margin-top: 12px; border-radius: var(--radius-pill); background: var(--color-surface); border: 1px solid var(--color-border); flex-wrap: wrap; }
.mode-switch label { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-pill); cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--color-text-muted); }
.mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mode-switch label:has(input:checked) { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; box-shadow: var(--shadow-btn); }
.mode-switch label:has(input:focus-visible) { outline: 3px solid var(--color-secondary); outline-offset: 2px; }
.libres { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.libre-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.libre-row input[type=time] { width: auto; min-width: 120px; }
.libre-row .libre-duree { min-width: 60px; }
.libre-row.has-error input { border-color: var(--color-danger); }

/* v9 : cartes des lieux de l'accueil — une par lieu fixe, une par ville du lieu itinérant, toutes de même hauteur */
.lieux-public { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; max-width: 1000px; }
.lieux-public .lieu-card { flex: 0 1 225px; display: flex; flex-direction: column; justify-content: center; margin: 0; min-height: 130px; }
.lieux-public .lieu-sur { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
@media (max-width: 520px) { .lieux-public .lieu-card { flex-basis: 100%; min-height: 0; } }

/* v10 : demi-journée complète, affichée grisée et non cliquable */
.halfday-complet { background: var(--color-surface-alt); box-shadow: none; }
.halfday-complet .halfday-head { display: flex; align-items: center; gap: 18px; padding: 16px 22px 16px 16px; }
.halfday-complet .date-block, .halfday-complet .halfday-info { opacity: .55; }
.halfday-complet .date-block { filter: grayscale(1); }
.complet-badge { display: inline-block; padding: 5px 12px; border-radius: var(--radius-pill); background: #ececf2; color: #5b5b70; font-weight: 800; font-size: 0.82rem; }
@media (max-width: 640px) { .halfday-complet .halfday-head { gap: 12px; padding: 12px 14px 12px 12px; } }

/* v11 : rendez-vous de groupe */
.groupe-box { margin: 14px 0 4px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--color-surface-alt); border: 1px dashed var(--color-border); }
.groupe-box.has-error { border-color: #e0435c; }
.badge-groupe { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); background: #fff3d6; color: #8a5a00; font-weight: 700; font-size: .78rem; white-space: nowrap; }
.slot-row .who .badge-groupe, .badge-groupe { color: #8a5a00; font-size: .74rem; vertical-align: 1px; }
.copie-note { margin: 6px 0 18px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--color-primary-light); color: var(--color-text); line-height: 1.55; }
.groupe-box:first-child { margin-top: 0; margin-bottom: 14px; }
[data-groupe-fields][hidden] { display: none !important; }
.participants { margin: 4px 0 10px; } .participants summary { cursor: pointer; font-weight: 700; color: var(--color-primary-dark); } .participants ol { margin: 6px 0 0; padding-left: 22px; columns: 2; column-gap: 24px; } .participants li { break-inside: avoid; padding: 1px 0; }
@media (max-width: 520px) { .participants ol { columns: 1; } }

/* v12 : saisie des participants */
.participants-saisie { margin-top: 12px; }
.part-entete, .part-ligne { display: grid; grid-template-columns: 1fr 1fr 1.4fr 38px; gap: 8px; align-items: center; }
.part-entete { margin: 2px 0 4px; padding: 0 2px; }
.part-ligne { margin-bottom: 8px; }
.part-ligne input { margin: 0; }
.participants li a { margin-left: 4px; }
.participants ol { columns: 1; }
@media (max-width: 640px) {
  .part-entete { display: none; }
  .part-ligne { grid-template-columns: 1fr 1fr 38px; padding-bottom: 8px; border-bottom: 1px dashed var(--color-border); }
  .part-ligne input[type="email"] { grid-column: 1 / 3; grid-row: 2; }
  .part-ligne .icon-btn { grid-row: 1 / 3; grid-column: 3; }
}
.badge-resolu { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); font-weight: 700; font-size: .72rem; white-space: nowrap; vertical-align: 1px; }
.badge-resolu.ok, .slot-row .who .badge-resolu.ok { background: #dcf5ec; color: #17694f; }
.badge-resolu.suivre, .slot-row .who .badge-resolu.suivre { background: #fff1d6; color: #8a5a00; }
.btn-warning { background: #f4b740; color: #3d2a00; border-color: #f4b740; }
