/* ── espace.css — espace personnel (chargé après common.css) ────────────── */

/* ── Surcharges ivoire spécifiques espace ────────────────────────────────── */
[data-skin="ivoire"] body { background: #E8E2D9; }
[data-skin="ivoire"] .esp-card,
[data-skin="ivoire"] .esp-auth-card,
[data-skin="ivoire"] .esp-appt-card,
[data-skin="ivoire"] .esp-dashboard-cal-wrap,
[data-skin="ivoire"] .cal-left,
[data-skin="ivoire"] .cal-sidebar { background: #fff; }
[data-skin="ivoire"] .esp-field input,
[data-skin="ivoire"] .esp-field textarea { background: #fff; }

/* ── Surcharges ardoise spécifiques espace ───────────────────────────────── */
[data-skin="ardoise"] .esp-card,
[data-skin="ardoise"] .esp-auth-card { background: #2a2520; border-color: var(--border); }
[data-skin="ardoise"] .esp-appt-card { background: #2a2520; border-color: var(--border); }
[data-skin="ardoise"] .esp-field input,
[data-skin="ardoise"] .esp-field textarea { background: #2a2520; color: var(--ink); border-color: var(--border); }
[data-skin="ardoise"] .esp-btn-secondary { background: #3a3530; color: var(--ink); }
[data-skin="ardoise"] .esp-btn-secondary:hover { background: #4a4540; }
[data-skin="ardoise"] .esp-alert-success { background: #1e3028; color: #7dba9a; border-color: #2d5040; }
[data-skin="ardoise"] .esp-alert-error   { background: var(--rose-l); color: var(--rose); border-color: #5a2535; }

html, body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* ── Nav spécifique espace ──────────────────────────────────────────────── */
nav .brand { font-size: 16px; font-weight: normal; }


/* ── Layout ──────────────────────────────────────────────────────────────── */
.esp-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}
.esp-main--wide { max-width: 1280px; }

/* ── Card ─────────────────────────────────────────────────────────────────── */
.esp-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: border-color .15s;
}
.esp-card:hover { border-color: var(--rose); }
.esp-card[id] { scroll-margin-top: 72px; }
.esp-card-title {
  font-size: 18px;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.esp-card-subtitle { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.esp-card > p { font-size: 15px; line-height: 1.5; }

/* ── Formulaires ──────────────────────────────────────────────────────────── */
.esp-field { margin-bottom: 16px; }
.esp-field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
}
.esp-field input, .esp-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 15px;
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
}
.esp-field input { height: 40px; }
.esp-field textarea { height: auto; }
.esp-field input:focus, .esp-field textarea:focus {
  outline: 2px solid var(--rose);
  border-color: transparent;
}
.esp-field input[readonly] {
  background: var(--light);
  color: var(--muted);
  cursor: not-allowed;
}
.esp-field-hint {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font);
  margin-top: 4px;
}
.esp-required { color: var(--rose); }

/* ── Boutons ──────────────────────────────────────────────────────────────── */
.esp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s;
}
.esp-btn-primary   { background: var(--rose);  color: #fff; }
.esp-btn-primary:hover   { background: var(--rose-h); }
.esp-btn-secondary { background: var(--light); color: var(--ink); }
.esp-btn-secondary:hover { background: var(--border); }
.esp-btn-outline   { background: var(--white); color: var(--rose); border: 1px solid var(--rose); }
.esp-btn-outline:hover   { background: var(--rose); color: #fff; }
.esp-btn-danger    { background: #f5e8ec; color: var(--rose); border: 1px solid #f5c6cb; }
.esp-btn-danger:hover    { background: #f5c6cb; }
.esp-btn-red       { background: #c0392b; color: #fff; border: none; }
.esp-btn-red:hover       { background: #a93226; }
.esp-btn-sm { padding: 8px 18px; font-size: 15px; }
.esp-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; align-items: center; }

/* ── Alertes ──────────────────────────────────────────────────────────────── */
.esp-alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 15px;
  font-family: var(--font);
}
.esp-alert-error   { background: #f5e8ec; color: var(--rose); border: 1px solid #f5c6cb; }
.esp-alert-success { background: #eaf5ef; color: #4a8c6a; border: 1px solid #b8ddc8; }
.esp-alert-info,
.esp-alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }

/* ── Liste RDV ────────────────────────────────────────────────────────────── */
.esp-rdv-list { display: flex; flex-direction: column; gap: 8px; }
.esp-rdv-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.esp-rdv-item.past { opacity: .7; }
.esp-rdv-date { font-size: 13px; font-family: var(--font); color: var(--ink); }
.esp-rdv-date strong { display: inline; }
.esp-rdv-date span { font-size: 13px; color: var(--ink); font-family: var(--font); }
.esp-rdv-meta { flex: 1; font-size: 13px; color: var(--ink); font-family: var(--font); }
.esp-rdv-status { font-size: 14px; font-family: var(--font); }
.esp-rdv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.esp-rdv-notes { font-size: 14px; color: var(--muted); margin-top: 6px; font-style: italic; font-family: var(--font); }
.esp-empty { color: var(--muted); font-size: 14px; padding: 12px 0; font-family: var(--font); }

/* ── Section titre ────────────────────────────────────────────────────────── */
.esp-section-title {
  font-size: 13px;
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ── Calendrier dashboard : sidebar en dessous ────────────────────────────── */
.cal-layout { grid-template-columns: 1fr; grid-template-rows: auto auto; }
.cal-left    { height: auto; max-width: 100%; background: var(--white); }
.cal-sidebar { height: auto; max-height: 400px; overflow-y: auto; background: var(--white); }
.esp-dashboard-cal-wrap { background: var(--white); }

/* Dashboard : la sidebar est inutile (cartes dans #appt-cards-grid) */
.esp-dashboard-cal-wrap ~ .cal-sidebar { display: none; }

/* Desktop : encart blanc autour du calendrier uniquement (1 colonne) */
@media (min-width: 841px) {
  .cal-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .esp-dashboard-cal-wrap {
    width: 384px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
  }
  .cal-sidebar { display: none; }
}

/* ── Grille de cartes RDV (sous le calendrier, desktop) ──────────────────── */
.esp-dashboard-btn-row {
  margin-bottom: 12px;
}
.esp-appt-cards-grid {
  margin-top: 20px;
}
@media (min-width: 841px) {
  .esp-appt-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .esp-appt-cards-grid .esp-appt-card { margin-bottom: 0; }
}

/* ── Slot picker (modification) ───────────────────────────────────────────── */
.esp-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.esp-slot {
  padding: 8px 4px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: background .1s, border-color .1s;
}
.esp-slot:hover  { background: var(--light); border-color: var(--rose); }
.esp-slot.picked { background: var(--rose); color: #fff; border-color: var(--rose); }

/* ── Page centrée (auth) ──────────────────────────────────────────────────── */
.esp-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 52px);
  padding: 40px 24px 24px;
}
.esp-auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}
.esp-auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.esp-auth-card .esp-subtitle {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font);
  margin-bottom: 28px;
}
.esp-auth-link {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font);
  margin-top: 16px;
  text-align: center;
}
.esp-auth-link a { color: var(--rose); }

/* ── Page inscription en attente ─────────────────────────────────────────── */
.esp-pending-wrap {
  max-width: 480px;
  margin: 60px auto;
  padding: 32px 24px;
  text-align: center;
}
.esp-pending-wrap h1 {
  font-size: 24px;
  margin-bottom: 16px;
}
.esp-pending-info {
  background: #eaf5ef;
  border: 1px solid #b8ddc8;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  color: #2d5a42;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}
.esp-pending-text {
  color: #666;
  font-size: 16px;
  margin-bottom: 24px;
}
.esp-pending-back {
  color: #999;
  font-size: 15px;
}
.esp-pending-back a {
  color: var(--rose);
  text-decoration: none;
}

/* ── Danger zone ──────────────────────────────────────────────────────────── */
.esp-danger-zone {
  border: 1px solid #f5c6cb;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 8px;
}
.esp-danger-zone summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #c0392b;
  font-family: var(--font);
  user-select: none;
}
.esp-danger-zone > div { margin-top: 16px; }

/* ── Config page — mini menu ancres ─────────────────────────────────────── */
.esp-cfg-nav {
  display: flex; gap: 8px 20px; flex-wrap: wrap;
  border-bottom: 1px solid var(--rose);
  padding: 10px 0 12px;
  margin-bottom: 24px;
}
.esp-cfg-nav a { color: var(--rose); font-size: 15px; text-decoration: none; font-family: var(--font); }
.esp-cfg-nav a:hover { text-decoration: underline; }

/* ── Calendrier espace — spécificités ─────────────────────────────────────── */
.cal-page-title { font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 20px; }
.cal-arrow { background: none; border: 1px solid var(--border); border-radius: var(--radius);
             color: var(--muted); font-size: 18px; cursor: pointer; padding: 7px 13px;
             font-family: var(--font); flex-shrink: 0;
             transition: background .15s, color .15s, border-color .15s; line-height: 1; }
.cal-arrow:hover { background: var(--rose-l); color: var(--rose); border-color: var(--rose); }
.cal-months-grid { display: flex; flex-direction: column; flex: 1; }
.cal-sidebar-time { font-size: 13px; color: var(--rose); font-family: var(--font); margin-bottom: 2px; }
.cal-sidebar-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.cal-sidebar-datetime { font-size: 13px; color: var(--ink); font-family: var(--font); }
.cal-sidebar-loc { font-size: 13px; color: var(--muted); font-family: var(--font); margin-bottom: 3px; }
.cal-sidebar-meet { font-size: 13px; font-family: var(--font); color: var(--rose); text-decoration: none; display: inline; }
.cal-sidebar-meet:hover { text-decoration: underline; }
.cal-sidebar-actions { display: flex; gap: 12px; margin-top: 6px; }
.cal-sidebar-action { font-size: 14px; font-family: var(--font); text-decoration: none;
                      color: var(--ink); }
.cal-sidebar-action:hover { text-decoration: underline; }
.cal-sidebar-action--cancel { color: #c0392b; }
@media (max-width: 640px) {
  .cal-nav-bar { gap: 6px; }
  .cal-arrow { padding: 6px 9px; font-size: 15px; }
  .cal-months-grid { grid-template-columns: 1fr; }
}

/* ── Modale Prendre rendez-vous ───────────────────────────────────────────── */
.esp-rdv-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 24px 16px;
}
.esp-rdv-modal-overlay[hidden] { display: none; }
.esp-rdv-modal-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 700px;
  height: min(90vh, 600px); display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  position: relative; overflow: hidden;
}
.esp-rdv-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.esp-rdv-modal-header span { font-size: 17px; font-weight: 600; }
.esp-rdv-modal-close {
  background: none; border: none; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 0 4px; font-family: var(--font);
}
.esp-rdv-modal-close:hover { color: var(--ink); }
.esp-rdv-modal-body { padding: 20px; flex: 1; overflow: hidden; min-height: 0; display: flex; flex-direction: column; }
/* Propagation flexbox jusqu'à la cal-row */
.esp-rdv-modal-body #plumerv-booking { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.esp-rdv-modal-body .plumerv-step.active { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.esp-rdv-modal-body #plumerv-cal-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* La cal-row prend tout l'espace restant après la toolbar, les colonnes ne débordent pas */
.esp-rdv-modal-body .plumerv-cal-row { flex: 1; min-height: 0; grid-template-rows: 1fr; }
.esp-rdv-modal-body .plumerv-cal-left,
.esp-rdv-modal-body .plumerv-cal-sidebar { overflow-y: auto; min-height: 0; }
/* Quand le formulaire liste d'attente est affiché : scroll + calendrier masqué */
.esp-rdv-modal-body:has(.plumerv-waitlist) { overflow-y: auto; }
.esp-rdv-modal-body:has(.plumerv-waitlist) .plumerv-cal-row { display: none; }

/* ── Modale petite (Annuler un RDV) ───────────────────────────────────────── */
.esp-modal-card-sm {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 560px;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.esp-modal-card-sm .esp-rdv-modal-body { overflow-y: auto; }

/* ── Modify widget — même taille que la modale Nouveau RDV ───────────────── */
#plumerv-modify {
  max-width: 700px;
  height: min(90vh, 600px);
  overflow-y: auto;
}

/* ── Modale Modifier : ascenseur sur le body ─────────────────────────────── */
#modify-modal-overlay .esp-rdv-modal-body { overflow-y: auto; }

/* ── Cartes RDV (sidebar liste) ──────────────────────────────────────────── */
.esp-appt-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  position: relative;
}
.esp-appt-card--pending { border-left: 3px solid #ffc107; }
.esp-appt-card--past    { opacity: .8; }
.esp-appt-card--highlight {
  border-color: var(--rose);
  box-shadow: 0 0 0 2px var(--rose-l), 0 2px 8px rgba(0,0,0,.10);
  transition: border-color .15s, box-shadow .15s;
}

.esp-appt-badge {
  position: absolute; top: 8px; right: 10px;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 3px;
  border: 1px solid transparent;
}
.esp-appt-badge--confirmed { background: #eaf5ef; color: #4a8c6a; border-color: #b6dfc8; }
.esp-appt-badge--pending   { background: #fff8e1; color: #856404; border-color: #ffe082; }
.esp-appt-badge--done      { background: #e8f4fd; color: #1565c0; border-color: #b3d7f5; }
.esp-appt-badge--cancelled { background: #f5f5f5; color: #888;    border-color: #ddd; }
.esp-appt-badge--forg      { background: #f5f5f5; color: #666;    border-color: #ddd; }

.esp-appt-card-header {
  font-size: 14px; font-weight: 700; color: var(--ink);
  padding-right: 88px; margin-bottom: 4px; line-height: 1.3;
}
.esp-appt-card-loc {
  font-size: 14px; color: var(--muted); margin-bottom: 0;
}
.esp-appt-card-loc a { color: var(--rose); }

@media (min-width: 841px) {
  .esp-appt-card-header { font-size: 16px; }
  .esp-appt-card-loc    { font-size: 15px; }
  .esp-appt-card-action { font-size: 14px; }
  .esp-appt-card-maps   { font-size: 14px; }
}

.esp-appt-card-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.esp-appt-card-action {
  font-size: 13px; font-weight: 500; font-family: var(--font); padding: 3px 12px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: #f0ece8; color: #555; text-decoration: none;
  transition: background .12s; cursor: pointer;
}
.esp-appt-card-action:hover { background: #e5e0da; }
.esp-appt-card-action--cancel { color: var(--rose); border-color: var(--rose-l); background: var(--rose-l); }
.esp-appt-card-action--cancel:hover { background: #f5dde3; }
.esp-appt-card-action--invoice,
.esp-appt-card-action--invoice-dl,
.esp-appt-card-action--receipt-dl { color: #4a6e8a; border-color: #c8dae8; background: #eef4f9; }
.esp-appt-card-action--invoice:hover,
.esp-appt-card-action--invoice-dl:hover,
.esp-appt-card-action--receipt-dl:hover { background: #d8eaf4; }
.esp-appt-card-action--receipt { color: #4a6e8a; border-color: #c8dae8; background: #eef4f9; }
.esp-appt-card-action--receipt:hover { background: #d8eaf4; }

/* ── Liens Maps sur les cartes RDV ───────────────────────────────────────── */
.esp-appt-card-maps {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 13px;
}
.esp-appt-card-loc + .esp-appt-card-actions { margin-top: 8px; }
.esp-appt-card-maps-sep { color: var(--muted); }
.esp-appt-card-maps-link {
  text-decoration: none;
  font-family: var(--font);
  color: var(--muted);
}
.esp-appt-card-maps-link--apple  {}
.esp-appt-card-maps-link--google {}
.esp-appt-card-maps-link:hover { text-decoration: underline; }

/* ── Titre dashboard hors card (mobile uniquement) ────────────────────────── */
.esp-dashboard-title { display: none; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .esp-main { padding: 24px 16px 40px; }
  .esp-card { padding: 20px 16px; }
  .esp-auth-card { padding: 28px 20px; }
  .esp-centered { padding: 24px 16px 24px; }
  .esp-rdv-item { flex-direction: column; align-items: flex-start; }

  /* Dashboard mobile : titre en haut, pas de cadre */
  .esp-dashboard-title {
    display: block;
    font-size: 18px;
    margin-bottom: 14px;
    padding-bottom: 0;
    border-bottom: none;
  }
}

/* ── Skin plume : orange → teal #4dabb5 ─────────────────────────────────── */
[data-skin="plume"] .esp-alert-warning { background: #e4f5f7; color: #225358; border-color: #9dd0d7; }
[data-skin="plume"] .esp-appt-card--pending { border-left-color: #4dabb5; }
[data-skin="plume"] .esp-appt-badge--pending { background: #e4f5f7; color: #225358; border-color: #9dd0d7; }

/* ── Bannière visio en cours ────────────────────────────────────────────── */
.esp-live-visio { display:flex; align-items:center; gap:12px; background:#1a6b3c; color:#fff; padding:12px 16px; border-radius:var(--radius); margin-bottom:16px; font-size:15px; flex-wrap:wrap; }
.esp-live-visio--today { background:#b45309; }
.esp-live-visio--later { background:#4b5563; }
.esp-live-visio--today .esp-live-visio__dot { background:#fcd34d; }
.esp-live-visio--later .esp-live-visio__dot { background:#9ca3af; animation:none; }
.esp-live-visio__dot { width:10px; height:10px; border-radius:50%; background:#5dfc9a; flex-shrink:0; animation:esp-live-pulse 1.4s ease-in-out infinite; }
.esp-live-visio__text { flex:1; min-width:0; }
.esp-live-visio__btn { background:#fff; color:#1a6b3c; font-weight:600; padding:6px 14px; border-radius:var(--radius); text-decoration:none; white-space:nowrap; font-size:14px; }
.esp-live-visio__btn:hover { background:#e6f9ef; }
.esp-live-visio--today .esp-live-visio__btn { color:#b45309; }
.esp-live-visio--today .esp-live-visio__btn:hover { background:#fef3c7; }
.esp-live-visio--later .esp-live-visio__btn { color:#4b5563; }
.esp-live-visio--later .esp-live-visio__btn:hover { background:#f3f4f6; }
@media (max-width: 768px) {
  .esp-live-visio { flex-direction:column; align-items:stretch; gap:10px; }
  .esp-live-visio__dot { display:none; }
  .esp-live-visio__text { font-size:14px; }
  .esp-live-visio__btn { text-align:center; padding:9px 14px; font-size:14px; }
}
@keyframes esp-live-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── Tutoriel onboarding ─────────────────────────────────────────────────── */
.onb-shade {
  position: fixed;
  background: rgba(0,0,0,.52);
  z-index: 9000;
  pointer-events: all;
}
#onb-ring {
  position: fixed;
  z-index: 9001;
  pointer-events: none;
  border: 2px solid rgba(192,64,96,.75);
  border-radius: 8px;
  animation: onb-pulse 2s ease-in-out infinite;
}
@keyframes onb-pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(192,64,96,.12); }
  50%     { box-shadow: 0 0 0 9px rgba(192,64,96,.05); }
}
#onb-popup {
  position: fixed;
  z-index: 9002;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  width: 320px;
  max-width: calc(100vw - 28px);
  padding: 20px 20px 14px;
  font-family: var(--font);
  animation: onb-in .18s ease;
}
@keyframes onb-in {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0);   }
}
.onb-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-right: 18px;
}
.onb-head strong { font-size: 19px; color: var(--ink); }
.onb-prog { font-size: 11px; color: var(--muted); white-space: nowrap; }
#onb-popup p { margin: 0 0 16px; font-size: 17px; color: var(--muted); line-height: 1.6; }
.onb-foot { display: flex; gap: 6px; }
.onb-btn {
  flex: 1;
  height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: 18px;
  line-height: 1.1;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--light);
  color: var(--ink);
  transition: background .15s;
  padding: 0;
}
.onb-btn:hover { background: var(--border); }
.onb-btn-primary { background: var(--rose); color: #fff; border-color: var(--rose); }
.onb-btn-primary:hover { background: var(--rose-h); border-color: var(--rose-h); }
.onb-btn-nav span { display: block; font-size: 11px; margin-top: 2px; }
.onb-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 4px;
  font-family: sans-serif;
}
.onb-close:hover { color: var(--ink); }
.onb-track {
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 14px;
  overflow: hidden;
}
.onb-bar {
  height: 100%;
  background: var(--rose);
  border-radius: 3px;
  width: 0%;
}

/* Historique des RDV de l'espace personnel : bouton de dépliage + grille repliée.
   L'attribut hidden ne suffit pas : au-dessus de 840px la grille porte
   display:grid, qui l'emporte sur le display:none du navigateur. */
.esp-appt-cards-grid[hidden] { display: none; }
#appt-cards-past { margin-top: 28px; }
#appt-cards-past > button { margin-bottom: 4px; }
