/* ============================================================
   TIBSE — Redesign stylesheet ("Direction 2 / Confiance")
   Single source for the web redesign: tokens + global chrome +
   page bodies. Ported from the design handoff (tokens.css,
   target-markup.md, target-markup-pages.md). Loaded after Bootstrap
   and the legacy style.css; the web-only custom.css /
   appointments-custom.css still provide some component structure.
   ============================================================ */

/* ============================================================
   0. DESIGN TOKENS
   ============================================================ */
:root {
  --brand-primary:        #3f4079;
  --brand-primary-deep:   #2c2d52;
  --brand-primary-mid:    #34355f;
  --brand-secondary:      #74d1c6;
  --brand-secondary-deep: #5cc4b8;
  --brand-accent:         #f5a623;

  --ink:        #23243f;
  --text:       #1f2937;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --on-cta:     #1b1c33;

  --bg-page:     #f6f7fb;
  --bg-card:     #ffffff;
  --bg-subtle:   #fbfbfd;
  --bg-tint:     #eef0fa;
  --bg-teal-tint:#ecfbf8;

  --line:        #eef0f4;
  --line-soft:   #f1f2f6;
  --line-field:  #d8dae6;
  --line-chip:   #e7e9f1;

  --success-fg: #1e7d34;  --success-bg: #e8f5e9;  --success-dot: #28a745;
  --warning-fg: #b9760a;  --warning-bg: #fff8e6;
  --danger-fg:  #c92a37;  --danger-bg:  #feeeee;  --danger-line: #f3c6cb;
  --info-fg:    #3760a8;  --info-bg:    #eaf1fb;   --info-dot: #4e7ec9;

  --r-field:   11px;
  --r-button:  11px;
  --r-card:    18px;
  --r-card-sm: 16px;
  --r-pill:    999px;
  --r-phone:   30px;

  --shadow-card:     0 4px 14px -8px rgba(35,36,63,.18);
  --shadow-elevated: 0 12px 30px -16px rgba(63,64,121,.20);
  --shadow-search:   0 24px 50px -20px rgba(35,36,63,.40);

  --grad-hero:   linear-gradient(150deg, #3f4079 0%, #34355f 55%, #2c2d52 100%);
  --grad-strip:  linear-gradient(90deg, #3f4079, #74d1c6);

  --font-sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================================
   1. BASE / TYPOGRAPHY
   ============================================================ */
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
main h1, main h2, main h3, main h4, main h5,
.main_title h2, .main_title_4 h3 { font-family: var(--font-sans); color: var(--ink); }
a { color: var(--brand-primary); }

/* ============================================================
   2. HEADER / TOP NAV
   ============================================================ */
/* Sticky positioning (no reflow jump). functions.js adds .sticky on scroll>1px;
   the legacy theme switched to position:fixed (which reflows the page = jump),
   so we force position:sticky for both states. */
header.header_sticky { position: sticky; top: 0; z-index: 999; background: #fff; border-bottom: 1px solid var(--line); box-shadow: none; transition: background .2s ease, box-shadow .2s ease; }
header.header_sticky.sticky { position: sticky; box-shadow: var(--shadow-card); }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: transparent; }
.site-header__brand, .brand-sm { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.brand-word { font-size: 21px; font-weight: 800; color: var(--brand-primary); letter-spacing: -.01em; }
.site-header__nav { display: flex; gap: 30px; font-size: 15px; font-weight: 500; }
.site-header__nav a { color: #4b5563; text-decoration: none; }
.site-header__nav a:hover { color: var(--brand-primary); }
.site-header__nav a.is-active { color: var(--brand-primary); font-weight: 600; }
.site-header__actions { display: flex; align-items: center; gap: 18px; }
.link-login { font-size: 15px; font-weight: 600; color: var(--brand-primary); text-decoration: none; }

.user-chip { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid #eceef3; border-radius: var(--r-pill); padding: 5px 12px 5px 5px; cursor: pointer; background: #fff; }
.user-chip__avatar { width: 30px; height: 30px; border-radius: 50%; background: #ececf5; color: var(--brand-primary); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.user-chip__name { font-size: 14px; font-weight: 600; color: var(--ink); }
.user-chip__caret { color: var(--text-faint); }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-elevated); list-style: none; margin: 0; padding: 6px; min-width: 180px; z-index: 1100; }
.user-menu[hidden] { display: none; }
.user-menu li a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--text); text-decoration: none; }
.user-menu li a:hover { background: #f4f5fa; }

/* Home header: transparent over the hero gradient, solid white once scrolled
   (.sticky from functions.js). Sticky positioning → no scroll jump. */
header.header_sticky.hero-header { background: transparent; border-bottom: none; box-shadow: none; }
header.header_sticky.hero-header.sticky { background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-card); }
.header_sticky.hero-header:not(.sticky) .brand-word { color: #fff; }
.header_sticky.hero-header:not(.sticky) .brand-mark { background: var(--brand-secondary); color: var(--ink); }
.header_sticky.hero-header:not(.sticky) .site-header__nav a { color: #d4d5e8; }
.header_sticky.hero-header:not(.sticky) .site-header__nav a.is-active,
.header_sticky.hero-header:not(.sticky) .site-header__nav a:hover { color: #fff; }
.header_sticky.hero-header:not(.sticky) .link-login { color: #fff; }
.header_sticky.hero-header:not(.sticky) .user-chip { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }
.header_sticky.hero-header:not(.sticky) .user-chip__name { color: #fff; }
.header_sticky.hero-header:not(.sticky) .user-chip__avatar { background: rgba(255,255,255,.25); color: #fff; }

/* Hero gradient slides up behind the transparent sticky header */
.hero-band--home { margin-top: calc(-1 * var(--header-h, 65px)); }
.hero-band--home .hero-band__inner { padding-top: calc(var(--header-h, 65px) + 26px); }
@media (min-width: 991px) {header.header_sticky {padding-top: 10px;}}
@media (max-width: 991px) {header.header_sticky {padding-top: 10px;} .site-header__nav { display: none; } .site-header {padding: 0 0 12px;} }
@media (max-width: 575px) {header.header_sticky {padding-top: 10px;}}

/* ============================================================
   3. BUTTONS
   ============================================================ */
/* Teal CTA = default patient action */
a.btn_1, .btn_1, .btn_search, .btn-cta, .btn-secondary-brand {
  display: inline-block; background: var(--brand-secondary); color: var(--on-cta);
  border: none; border-radius: var(--r-button); font-family: var(--font-sans);
  font-weight: 700; text-decoration: none; cursor: pointer; transition: background .2s ease, transform .15s ease;
}
a.btn_1:hover, .btn_1:hover, .btn_search:hover, .btn-cta:hover, .btn-secondary-brand:hover { background: var(--brand-secondary-deep); color: var(--on-cta); }
.btn-cta { padding: 11px 22px; line-height: 1.2; }

/* Indigo solid = system actions */
a.btn_1.btn-indigo, .btn_1.btn-indigo, .btn-brand, .btn-primary {
  background: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: #fff !important;
  border-radius: var(--r-button); font-weight: 700;
}
a.btn_1.btn-indigo:hover, .btn_1.btn-indigo:hover, .btn-brand:hover, .btn-primary:hover { background: #34356a !important; color: #fff !important; }

/* Outline = secondary */
a.btn_1.outline, .btn_1.outline, .btn-outline-brand {
  background: #fff !important; border: 1px solid var(--line-field) !important; color: var(--brand-primary) !important;
  border-radius: var(--r-button); font-weight: 600;
}
a.btn_1.outline:hover, .btn_1.outline:hover, .btn-outline-brand:hover { background: var(--bg-tint) !important; color: var(--brand-primary) !important; visibility: visible; }

/* Danger outline = Annuler */
.btn-cancel { background: #fff; border: 1px solid var(--danger-line); color: var(--danger-fg); border-radius: var(--r-button); font-weight: 600; padding: 9px 16px; text-decoration: none; }
.btn-cancel:hover { background: var(--danger-bg); }

/* List "Voir les détails" teal */
.btn-details { background: var(--brand-secondary); color: var(--on-cta); font-weight: 700; border-radius: 9px; text-decoration: none; padding: 10px 0; border: none; }
.btn-details:hover { background: var(--brand-secondary-deep); color: var(--on-cta); }

.btn-primary-link { display: inline-block; background: var(--brand-secondary); color: var(--on-cta); font-weight: 700; padding: 12px 22px; border-radius: var(--r-button); text-decoration: none; }

/* ============================================================
   4. FORM FIELDS
   ============================================================ */
.box_form input[type="text"], .box_form input[type="email"], .box_form input[type="password"],
.box_form input[type="tel"], .box_form input[type="date"], .box_form select, .box_form textarea,
.form-control {
  border: 1px solid var(--line-field); border-radius: var(--r-field); font-size: 15px; color: var(--ink); background: #fff;
}
.form-control:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(63,64,121,.12); }
::placeholder { color: var(--text-faint); }
.form-label, label.form-label { font-size: 13px; font-weight: 600; color: #374151; }
.ts-control { border: 1px solid var(--line-field) !important; border-radius: var(--r-field) !important; min-height: 46px; box-shadow: none !important; }
.ts-wrapper.focus .ts-control { border-color: var(--brand-primary) !important; box-shadow: 0 0 0 3px rgba(63,64,121,.12) !important; }
.ts-control input, .ts-control .item { color: var(--ink); }
.ts-control input::placeholder { color: var(--text-faint); }
/* Tom-select dropdown (options list) — themed everywhere */
.ts-dropdown {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-elevated) !important;
  margin-top: 6px !important;
  padding: 6px !important;
  background: #fff !important;
  z-index: 1200 !important;
  overflow: hidden;
}
.ts-dropdown .ts-dropdown-content { padding: 0; }
.ts-dropdown .option {
  border-radius: 9px;
  padding: 10px 12px !important;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}
.ts-dropdown .option:hover,
.ts-dropdown .option.active {
  background: var(--bg-tint) !important;
  color: var(--brand-primary) !important;
}
.ts-dropdown .optgroup-header {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint); padding: 8px 12px 4px;
}
.ts-dropdown .no-results, .ts-dropdown .create { padding: 10px 12px; font-size: 14px; color: var(--text-faint); }
.ts-dropdown .active.create { color: var(--brand-primary); }

/* ============================================================
   5. HOME HERO BAND + OVERLAPPING SEARCH CARD
   ============================================================ */
.hero-band { background: var(--grad-hero); padding-bottom: 90px; }
.hero-band__inner { text-align: center; max-width: 760px; margin: 0 auto; padding: 40px 24px 0; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(116,209,198,.16); color: #9fe6dc; font-size: 13px; font-weight: 600; padding: 7px 15px; border-radius: var(--r-pill); }
.hero-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-secondary); display: inline-block; }
.hero-band h1 { font-size: 52px; line-height: 1.08; font-weight: 800; letter-spacing: -.025em; color: #fff; margin: 22px 0 0; }
.hero-band p { font-size: 18px; line-height: 1.6; color: #c6c7df; margin: 18px 0 0; }
.hero-search { padding: 0 24px; margin-top: -58px; position: relative; z-index: 3; }
.hero-search__card { display: flex; align-items: center; gap: 12px; max-width: 880px; margin: 0 auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-search); padding: 16px; }
.hero-search__card .search-field { flex: 1; display: flex; flex-direction: column; gap: 2px; background: #f6f7fb; border-radius: 12px; padding: 8px 16px; }
.hero-search__card .search-field > span { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.hero-search__card .search-field .ts-control,
.hero-search__card .search-field input,
.hero-search__card .search-field select { border: none !important; background: transparent !important; padding: 0 !important; font-size: 15px; color: var(--ink); min-height: auto !important; box-shadow: none !important; }
/* City field holds a geolocation button next to the select — let the select fill the rest */
.hero-search__card .search-field > .d-flex { width: 100%; }
.hero-search__card .search-field .ts-wrapper { flex: 1 1 auto; min-width: 0; }
.hero-search__card #detect-location { flex: 0 0 auto; }
.search-sep { width: 1px; height: 34px; background: #eceef3; }
.hero-search__card .btn_search, .hero-search__card .btn-cta { padding: 16px 30px; white-space: nowrap; height: auto !important; }
@media (max-width: 575px) {
  .hero-band h1 { font-size: 34px; }
  .hero-search__card { flex-direction: column; align-items: stretch; }
  .search-sep { display: none; }
}

/* ============================================================
   6. HOME — section heads, pill panels, establishments grid
   ============================================================ */
.main_title h2, .main_title_4 h3 { font-weight: 800; color: var(--ink); }
.main_title_4 h3 i { color: var(--brand-primary); }
.bg_color_1 { background: var(--bg-card); }

.list_home { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; box-shadow: var(--shadow-card); }
.list_home .list_title h3 { font-weight: 700; color: #fff; }
.list_home .list_title i { color: var(--brand-secondary); }
.list_home ul li a { color: var(--text-muted); border-radius: 10px; transition: background .2s ease, color .2s ease; }
.list_home ul li a:hover { background: var(--bg-tint); color: var(--brand-primary); }
.list_home ul li a strong i { color: var(--brand-primary); }
.list_home--dark { background: var(--brand-primary-deep); border-color: transparent; }
.list_home--dark .list_title h3 { color: #fff; }
.list_home--dark .list_title i { color: var(--brand-secondary); }
.list_home--dark ul li a { color: #c9cae0; }
.list_home--dark ul li a:hover { background: rgba(255,255,255,.10); color: #fff; }
.list_home--dark ul li a strong i { color: var(--brand-secondary); }

.home-section { max-width: 1180px; margin: 0 auto; padding: 44px 24px 56px; }
.home-section .section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
.home-section .section-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.home-section .section-head p { font-size: 16px; color: var(--text-muted); margin: 8px 0 0; }
.home-section .section-link { font-size: 15px; font-weight: 700; color: var(--brand-primary); text-decoration: none; white-space: nowrap; }
.etab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.etab-card { display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); transition: .2s; }
.etab-card:hover { box-shadow: var(--shadow-elevated); transform: translateY(-2px); }
.etab-card__photo { height: 104px; background: var(--grad-strip); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.etab-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etab-card__body { padding: 20px; }
.etab-card__body h3 { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0; }
.etab-card__city { display: flex; align-items: center; gap: 7px; margin: 8px 0 14px; font-size: 14px; color: var(--text-muted); }
.etab-card__meta { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--text-muted); }
.etab-card__meta strong { color: var(--brand-primary); }
.etab-card__go { color: var(--brand-primary); font-weight: 700; }
@media (max-width: 991px) { .etab-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .etab-grid { grid-template-columns: 1fr; } .home-section .section-head h2 { font-size: 24px; } }

/* ============================================================
   7. ACCOUNT SHELL + SIDEBAR + MOBILE TAB BAR
   ============================================================ */
.account-shell { background: var(--bg-page); padding: 28px 0 44px; }
.account-layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.account-nav { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.account-nav__profile { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; border-bottom: 1px solid var(--line-soft); }
.account-nav__avatar { width: 44px; height: 44px; border-radius: 13px; background: var(--brand-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.account-nav__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.account-nav__role { font-size: 13px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; }
.account-nav__email { display: none; }
@media (max-width: 991px) { .account-nav__email { display: inline; } }
.account-nav__list { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.account-nav__item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px; font-size: 14px; font-weight: 500; color: #4b5563; text-decoration: none; }
.account-nav__item i { font-size: 18px; line-height: 1; }
.account-nav__item:hover { background: #f4f5fa; color: var(--ink); }
.account-nav__item.is-active { background: var(--bg-tint); color: var(--brand-primary); font-weight: 700; }
.account-nav__label--short { display: none; }
.account-nav__logout { color: var(--danger-fg) !important; border-top: 1px solid var(--line-soft); margin-top: 6px; }
.account-nav__logout:hover { background: var(--danger-bg) !important; color: var(--danger-fg) !important; }

.account-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow-card); margin-bottom: 20px; }
.account-card h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 18px; }

/* Reusable account empty state */
.account-empty { text-align: center; padding: 56px 24px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.account-empty__icon { font-size: 42px; margin-bottom: 12px; }
.account-empty h3 { font-size: 18px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.account-empty p { color: var(--text-muted); margin: 0 auto 16px; max-width: 460px; }
.account-empty .btn-cta { display: inline-block; padding: 11px 22px; }

/* Notification rows + toggle */
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.notif-row:first-of-type { border-top: none; }
.notif-row__title { font-size: 15px; font-weight: 600; color: var(--ink); }
.notif-row__desc { font-size: 13px; color: var(--text-faint); margin-top: 2px; }
.toggle { position: relative; display: inline-block; width: 44px; height: 25px; flex-shrink: 0; }
.toggle input { display: none; }
.toggle .track { position: absolute; inset: 0; background: #d1d5db; border-radius: var(--r-pill); transition: .2s; }
.toggle .knob { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: .2s; }
.toggle input:checked + .track { background: var(--brand-secondary); }
.toggle input:checked + .track + .knob { left: 22px; }

@media (max-width: 991px) {
  .account-layout { display: block; }
  /* Mobile account header = profile block (design FRAME 13) + horizontal sub-nav strip.
     No bottom tab bar on mobile web — navigation via the header + this strip. */
  .account-layout > aside { display: block; margin-bottom: 16px; }
  .account-nav { padding: 14px; border-radius: 16px; }
  .account-nav__profile { display: flex; padding: 0 4px 14px; }
  .account-nav__avatar { width: 46px; height: 46px; }
  .account-nav__name { font-size: 16px; }
  .account-nav__list { flex-direction: row; overflow-x: auto; gap: 6px; margin-top: 12px; padding-top: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .account-nav__list::-webkit-scrollbar { display: none; }
  .account-nav__item { flex: 0 0 auto; flex-direction: column; gap: 4px; white-space: nowrap; padding: 8px 14px; font-size: 12px; border-radius: 10px; }
  .account-nav__item i { font-size: 20px; }
  .account-nav__logout { border-top: none; margin-top: 0; }
}

/* ============================================================
   8. STATUS + SPECIALTY BADGES (shared)
   ============================================================ */
.status-badge { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: var(--r-pill); display: inline-block; text-transform: none; letter-spacing: 0; }
.status-confirmed { color: var(--success-fg); background: var(--success-bg); }
.status-created   { color: var(--warning-fg); background: var(--warning-bg); }
.status-canceled  { color: var(--danger-fg);  background: var(--danger-bg); }
.specialty-badge { font-size: 12px; font-weight: 600; color: var(--brand-primary); background: var(--bg-tint); padding: 4px 11px; border-radius: var(--r-pill); }

/* ============================================================
   9. AUDIT TIMELINE
   ============================================================ */
.access-audit-header h2 { font-size: 26px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.audit-count { font-size: 14px; font-weight: 700; color: var(--brand-primary); background: var(--bg-tint); padding: 3px 12px; border-radius: var(--r-pill); }
.access-audit-header p { font-size: 15px; color: var(--text-muted); margin: 7px 0 24px; }

/* Demandes d'accès */
.flash-messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--r-field); font-size: 14px; border: 1px solid; }
.alert-error, .alert-danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-fg); }
.alert-success { background: var(--success-bg); border-color: #c8e6c9; color: var(--success-fg); }
.box_form p { color: var(--text-muted); line-height: 1.6; }
.request-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.request-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-card-sm); padding: 20px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 14px; }
.request-card__head { display: flex; align-items: center; gap: 13px; }
.request-card__head img, .request-card__head .avatar-init { width: 48px; height: 48px; border-radius: 13px; object-fit: cover; flex-shrink: 0; }
.request-card__head strong { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.request-card__head p { font-size: 13px; color: var(--text-muted); margin: 2px 0 0; }
.request-card__reason .lbl { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: 4px; }
.request-card__reason p { font-size: 14px; color: var(--text); line-height: 1.5; margin: 0; }
.request-card__date { font-size: 13px; color: var(--text-muted); }
.request-card__foot { display: flex; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); margin-top: auto; }
.request-card__foot form { flex: 1; display: flex; }
.request-card__foot button { width: 100%; padding: 10px 0; text-align: center; cursor: pointer; }
@media (max-width: 991px) { .request-grid { grid-template-columns: 1fr; } }
.audit-timeline { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 40px; }
.audit-timeline::before { content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 2px; background: var(--line-chip); }
.audit-log-card { position: relative; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-card); }
.log-timeline-dot { position: absolute; left: -35px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--success-dot); }
.audit-log-card:has(.action-request) .log-timeline-dot { border-color: var(--info-dot); }
.log-timestamp { order: 3; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.log-time { display: block; font-size: 12px; color: var(--text-faint); }
.log-professional { display: flex; align-items: center; gap: 13px; }
.log-avatar { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: #ececf5; }
.log-professional-info strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.log-specialty { font-size: 13px; color: var(--text-muted); margin: 2px 0 0; }
.action-badge { font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: var(--r-pill); }
.action-approve { color: var(--success-fg); background: var(--success-bg); }
.action-request { color: var(--info-fg);    background: var(--info-bg); }

/* Avatar initials placeholders */
.log-avatar.placeholder, .professional-avatar.placeholder, .avatar-init {
  display: flex; align-items: center; justify-content: center; background: var(--bg-tint); color: var(--brand-primary); font-weight: 700;
}

/* ============================================================
   10. AUTH PAGES (login split, box_form forms)
   ============================================================ */
.bg_color_2 { background: var(--bg-page); padding-bottom: 40px; }
#login:not(.auth-split) { max-width: 460px; margin: 0 auto; }
#login h1, #register h1 { font-weight: 800; color: var(--ink); text-align: center; }
.box_form { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 28px; }
.box_form .forgot { color: var(--brand-primary); }
.link_bright { color: var(--text-muted); }
.link_bright a { color: var(--brand-primary); font-weight: 700; text-decoration: none; }
.link_bright a:hover { text-decoration: underline; }
.login-method-toggle { background: var(--bg-tint); border-radius: var(--r-field); }
.login-method-btn { color: var(--text-muted); border-radius: 8px; font-weight: 600; }
.login-method-btn.active { background: #fff; color: var(--brand-primary); box-shadow: var(--shadow-card); }
.login-method-btn i { margin-right: 8px; }

#login.auth-split, #register.auth-split { width: 100%; margin: 0 auto; }
.auth-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-elevated); background: #fff; }
.auth-split__main h1 { font-size: 24px; margin-bottom: 18px; }
.terms-check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); cursor: pointer; }
.terms-check input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--brand-primary); }
.terms-check strong { color: var(--brand-primary); }

/* Appointment confirmation card */
.confirm-card { max-width: 540px; margin: 24px auto; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 48px 40px; text-align: center; }
.confirm-card__icon { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; background: var(--success-bg); display: flex; align-items: center; justify-content: center; }
.confirm-card h2 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.confirm-card p { font-size: 15px; line-height: 1.6; color: var(--text-muted); margin: 0 0 24px; }
.confirm-card__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.confirm-card__actions a { padding: 12px 22px; text-decoration: none; }
@media (max-width: 575px) { .confirm-card { padding: 36px 22px; } .confirm-card__actions { flex-direction: column; } }
.auth-split__aside { background: var(--grad-hero); color: #fff; padding: 44px 38px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.auth-split__aside h2 { color: #fff; font-weight: 800; font-size: 28px; line-height: 1.15; }
.auth-split__aside ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-split__aside ul li { color: rgba(255,255,255,.9); display: flex; align-items: center; gap: 10px; }
.auth-split__aside ul li i { color: var(--brand-secondary); font-size: 20px; }
.auth-split__main { padding: 38px; }
.auth-split__main .box_form { border: none; box-shadow: none; padding: 0; }
@media (max-width: 767px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-split__aside { display: none; }
  .auth-split__main { padding: 24px; }
}

/* ============================================================
   11. FOOTER
   ============================================================ */
footer { background: #1b1c33; color: #c9cae0; }
footer h5 { color: #fff; }
footer a, footer .links a, footer .contacts a, footer .follow_us a { color: #c9cae0; }
footer a:hover { color: #fff; }
footer .follow_us ul li a i { color: #c9cae0; }
#copy, #additional_links a { color: #8a8caa; }

/* ============================================================
   12. SEARCH RESULTS
   ============================================================ */
.search-page { background: var(--bg-page); min-height: 100vh; }
.search-page .search-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; border-bottom: 1px solid var(--line); padding: 16px 36px; }
.search-page .search-bar__form { flex: 0 1 720px; min-width: 0; display: flex; align-items: center; gap: 10px; background: #f6f7fb; border: 1px solid #eceef3; border-radius: 12px; padding: 6px 6px 6px 14px; margin: 0; }
.search-page .sb-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; }
.search-page .sb-field > span { color: var(--brand-secondary); flex-shrink: 0; }
.search-page .sb-field .ts-wrapper { flex: 1; min-width: 0; }
.search-page .sb-field .ts-control, .search-page .sb-field input { width: 100%; border: none !important; background: transparent !important; font-size: 15px; font-weight: 600; color: var(--ink); min-height: auto !important; box-shadow: none !important; padding: 0 !important; }
.search-page .sb-sep { width: 1px; height: 24px; background: #e2e4ec; }
.search-page .search-bar__form .btn-cta { padding: 10px 22px; }

.search-page .search-body { display: grid; grid-template-columns: 248px 1fr; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 20px 20px 40px; }
.search-page .filters { align-self: start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.search-page .filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.search-page .filters__head h3 { font-size: 16px; font-weight: 800; color: var(--ink); margin: 0; }
.search-page .filters__head a { font-size: 13px; color: var(--brand-primary); font-weight: 600; text-decoration: none; }
.search-page .filters__group { border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: 18px; }
.search-page .filters__group:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.search-page .filters__group h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin: 0 0 12px; }
.search-page .check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #374151; margin-bottom: 11px; }
.search-page .pill-opt { display: block; width: 100%; text-align: left; font-size: 14px; color: #374151; border: 1px solid var(--line-chip); background: #fff; border-radius: 9px; padding: 8px 13px; margin-bottom: 9px; cursor: pointer; }
.search-page .pill-opt.is-active { font-weight: 600; color: var(--on-cta); background: var(--bg-teal-tint); border-color: #bfeae3; }
.search-page .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-page .chips span { font-size: 13px; color: #374151; background: #f4f5fa; padding: 6px 11px; border-radius: 999px; }

.search-page .results__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.search-page .results__head h2 { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0; }
.search-page .results__tools { display: flex; align-items: center; gap: 14px; }
.search-page .seg { display: flex; gap: 4px; background: #eef0f4; border-radius: 9px; padding: 4px; }
.search-page .seg button, .search-page .seg span { font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 6px 13px; border-radius: 7px; cursor: pointer; border: none; background: transparent; }
.search-page .seg .is-active { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 700; }
.search-page .sort { font-size: 14px; color: var(--text-muted); }
.search-page .sort strong { color: var(--ink); }

.search-page .result-card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-card); margin-bottom: 16px; text-decoration: none; color: inherit; }
.search-page .result-card:hover { box-shadow: var(--shadow-elevated); }
.search-page .result-card__info { display: flex; gap: 16px; }
.search-page .avatar-init { width: 64px; height: 64px; border-radius: 50%; font-size: 20px; flex-shrink: 0; object-fit: cover; }
.search-page .result-card__info h3 { font-size: 18px; font-weight: 800; color: var(--ink); margin: 0; }
.search-page .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 10px; }
.search-page .tags span { font-size: 12px; font-weight: 600; color: var(--brand-primary); background: var(--bg-tint); padding: 4px 10px; border-radius: 999px; }
.search-page .result-card__meta { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.search-page .result-card__price { font-size: 13px; color: var(--ink); font-weight: 700; margin-top: 8px; }
.search-page .result-card__avail { border-left: 1px solid var(--line-soft); padding-left: 22px; display: flex; flex-direction: column; }
.search-page .avail__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--ink); }
.search-page .avail__head .muted { font-weight: 400; color: var(--text-faint); }
.search-page .avail__chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px}
.search-page .slot { font-size: 13px; font-weight: 600; color: #15423d; background: var(--bg-teal-tint); border: 1px solid #bfeae3; padding: 8px 12px; border-radius: 8px; }
.search-page .slot--more { color: var(--brand-primary); background: #fff; border: 1px dashed #c7c9da; }
.search-page .avail__btn { margin-top: auto; text-align: center; padding: 11px; }
.search-page .result-card__locate { background: none; border: none; padding: 0; font-size: 13px; font-weight: 600; color: var(--brand-primary); cursor: pointer; }
.search-page .result-card__locate:hover { text-decoration: underline; }
/* Map view: shown in place of the list when "Carte" is active */
.search-page .search-results-map { display: none; height: 600px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); }
.search-page .search-results-map.is-shown { display: block; }
.search-page .search-results-map .leaflet-container, .search-page .search-results-map > div { height: 100% !important; width: 100% !important; }
/* Compact search summary + filters toggle are mobile-only */
.search-summary, .search-page .filters-toggle { display: none; }
@media (max-width: 991px) {
  .search-page .search-body { grid-template-columns: 1fr; }
  .search-page .result-card { grid-template-columns: 1fr; }
  .search-page .result-card__avail { border-left: none; border-top: 1px solid var(--line-soft); padding-left: 0; padding-top: 16px; margin-top: 4px; }
  .search-page .search-results-map { height: 70vh; }

  /* Search bar: compact summary; full form collapsed until expanded */
  .search-page .search-bar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  /* Keep account/login reachable, but compact (avatar / Connexion only) */
  .search-page .search-bar .site-header__actions { gap: 8px; flex-shrink: 0; }
  .search-page .search-bar .site-header__actions .btn-cta { display: none; }
  .search-page .search-bar .user-chip { padding: 4px; }
  .search-page .search-bar .user-chip__name, .search-page .search-bar .user-chip__caret { display: none; }
  .search-page .search-summary { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; background: #f6f7fb; border: 1px solid #eceef3; border-radius: 11px; padding: 11px 14px; font-size: 14px; color: var(--ink); cursor: pointer; }
  .search-page .search-summary__icon { color: var(--brand-secondary); flex-shrink: 0; }
  .search-page .search-summary__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .search-page .search-summary__chevron { color: var(--brand-primary); font-weight: 700; font-size: 13px; flex-shrink: 0; transition: transform .2s ease; }
  /* Form collapses/expands below the summary; the summary stays as the toggle */
  .search-page .search-bar__form { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 8px; background: transparent; border: none; padding: 0; }
  .search-page .search-bar.is-expanded .search-bar__form { display: flex; }
  .search-page .search-bar.is-expanded .search-summary__chevron { transform: rotate(180deg); }
  .search-page .sb-field { background: #f6f7fb; border: 1px solid #eceef3; border-radius: 10px; padding: 11px 13px; }
  .search-page .sb-sep { display: none; }
  .search-page .search-bar__form .btn-cta { width: 100%; padding: 13px; }

  /* Filters: collapsed; opened by the "Filtres" button */
  .search-page .filters-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); background: #fff; border: 1px solid var(--line-chip); border-radius: 9px; padding: 8px 14px; cursor: pointer; }
  .search-page .filters-toggle.is-active { color: var(--brand-primary); border-color: #d6daf2; background: var(--bg-tint); }
  .search-page .filters { display: none; margin-bottom: 16px; }
  .search-page .filters.is-open { display: block; }
  .search-page .results__head { flex-wrap: wrap; gap: 10px; }
  .search-page .results__tools { gap: 10px; }
}

/* ============================================================
   13. DOCTOR / FACILITY PROFILE
   ============================================================ */
.profile-page { background: var(--bg-page); }
.profile-page .prof-head { background: #fff; border-bottom: 1px solid var(--line); padding: 28px 0; }
/* Grid: avatar (col 1) spans the id / contact / map rows on the right (desktop) */
.profile-page .prof-head__inner { display: grid; grid-template-columns: auto 1fr; column-gap: 24px; align-items: start; max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.profile-page .prof-head__avatar { grid-column: 1; grid-row: 1 / span 3; width: 104px; height: 104px; border-radius: 20px; overflow: hidden; background: #eef0f6; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.profile-page .prof-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-page .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-page .tags span, .profile-page .tags small { font-size: 12px; font-weight: 600; color: var(--brand-primary); background: var(--bg-tint); padding: 4px 10px; border-radius: 999px; }
.profile-page .prof-head__id { grid-column: 2; grid-row: 1; }
.profile-page .prof-head__id .tags { margin-bottom: 8px; }
.profile-page .prof-head__id h1 { font-size: 28px; font-weight: 800; color: var(--ink); margin: 0; }
.profile-page .prof-head__contact { grid-column: 2; grid-row: 2; display: flex; gap: 26px; margin-top: 14px; font-size: 14px; color: var(--text-muted); }
.profile-page .prof-head__contact .lbl { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: 3px; }
.profile-page .map-link { grid-column: 2; grid-row: 3; justify-self: start; display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--brand-primary); text-decoration: none; }

.profile-page .prof-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; max-width: 1180px; margin: 0 auto; padding: 28px 40px 44px; }
.profile-page .prof-main { display: flex; flex-direction: column; gap: 20px; }
.profile-page .tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line-chip); }
.profile-page .tabs a { font-size: 15px; font-weight: 600; color: var(--text-faint); padding-bottom: 12px; cursor: pointer; text-decoration: none; }
.profile-page .tabs a.active, .profile-page .tabs a.is-active { color: var(--brand-primary); font-weight: 700; border-bottom: 2px solid var(--brand-primary); }
.profile-page .card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.profile-page .card h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 12px; }
.profile-page .card p { font-size: 15px; line-height: 1.65; color: var(--text-muted); margin: 0; }

.profile-page .booking { align-self: start; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-elevated); }
.profile-page .booking .step { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 4px; display: flex; align-items: center; }
.profile-page .booking .step b, .profile-page .booking .step .booking-step__num { color: var(--brand-secondary); margin-right: 8px; }
.profile-page .booking .step.mt { margin-top: 24px; }
.profile-page .muted { color: var(--text-muted); }
.profile-page .muted.sm { font-size: 13px; margin: 0 0 12px; color: var(--text-faint); }
/* Speciality radio rows (design "spec-opt") */
.profile-page .spec-list { display: flex; flex-direction: column; gap: 10px; }
.profile-page .spec-opt { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line-chip); border-radius: 11px; padding: 13px 15px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.profile-page .spec-opt .spec-name { flex: 1; }
.profile-page .spec-opt b { color: var(--brand-primary); font-weight: 800; }
.profile-page .spec-opt .spec-radio { display: none; }
.profile-page .spec-opt .radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #c7c9da; flex-shrink: 0; }
.profile-page .spec-opt:has(.spec-radio:checked) { border-color: var(--brand-primary); background: #f4f5fc; }
.profile-page .spec-opt:has(.spec-radio:checked) .radio { border-color: var(--brand-primary); background: radial-gradient(circle, var(--brand-primary) 0 5px, transparent 5px); }

/* Legend */
.profile-page .legend2 { display: flex; gap: 16px; margin: 10px 0 16px; font-size: 12px; color: var(--text-muted); }
.profile-page .legend2 span { display: flex; align-items: center; gap: 6px; }
.profile-page .legend2 i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.profile-page .legend2 i.ok { background: var(--brand-secondary); }
.profile-page .legend2 i.off { background: #e4e7eb; }

/* Day strip */
.profile-page .days { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.profile-page .day { flex: 1 0 calc(20% - 8px); min-width: 54px; text-align: center; padding: 9px 0; border: 1px solid #eceef3; border-radius: 11px; background: #fbfcfd; cursor: pointer; }
.profile-page .day span { font-size: 12px; color: var(--text-faint); font-weight: 600; display: block; }
.profile-page .day b { display: block; font-size: 16px; color: var(--ink); margin-top: 2px; }
.profile-page .day.is-active { border-color: var(--brand-primary); background: #f4f5fc; }
.profile-page .day.is-active b { color: var(--brand-primary); }

/* Slots grid */
.profile-page .slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.profile-page .slots .slot { text-align: center; font-size: 14px; font-weight: 600; padding: 10px 0; border-radius: 9px; cursor: pointer; border: 1px solid #bfeae3; background: var(--bg-teal-tint); color: #15423d; }
.profile-page .slots .slot.sel { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.profile-page .slots > p { grid-column: 1 / -1; margin: 0; }

/* Localisation map placeholder */
.profile-page .map-embed { height: 200px; border-radius: 14px; background: repeating-linear-gradient(45deg,#eef0f6,#eef0f6 11px,#e7eaf3 11px,#e7eaf3 22px); }

.profile-page .booking__cta { display: block; text-align: center; margin-top: 18px; padding: 14px; }
@media (max-width: 991px) {
  /* Keep the header content and the body cards on the same left edge (18px) */
  .profile-page .prof-body { grid-template-columns: 1fr; padding: 24px 18px 40px; }
  .profile-page .prof-head { padding: 22px 0; }
  /* Mobile (design FRAME 7): avatar + tags/name side by side, contact + map full-width below */
  .profile-page .prof-head__inner { grid-template-columns: 72px 1fr; column-gap: 14px; padding: 0 18px; }
  .profile-page .prof-head__avatar { grid-row: 1; width: 72px; height: 72px; border-radius: 18px; align-self: center; }
  .profile-page .prof-head__id { align-self: center; }
  .profile-page .prof-head__id h1 { font-size: 22px; }
  .profile-page .prof-head__contact { grid-column: 1 / -1; grid-row: 2; flex-direction: column; gap: 10px; }
  .profile-page .map-link { grid-column: 1 / -1; grid-row: 3; }
}

/* ============================================================
   14. MES RENDEZ-VOUS (list)
   ============================================================ */
.rdv-page .rdv-head h1 { font-size: 26px; font-weight: 800; color: var(--ink); margin: 0; display: flex; align-items: center; gap: 12px; }
.rdv-page .rdv-head .count { font-size: 14px; font-weight: 700; color: var(--brand-primary); background: var(--bg-tint); padding: 3px 12px; border-radius: 999px; }
.rdv-page .rdv-head p { font-size: 15px; color: var(--text-muted); margin: 7px 0 20px; }
.rdv-page .rdv-filters { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.rdv-page .rdv-search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line-chip); border-radius: 11px; padding: 11px 15px; color: var(--text-faint); }
.rdv-page .rdv-search input { flex: 1; border: none; font-size: 14px; }
.rdv-page .rdv-search input:focus { box-shadow: none; outline: none; }
.rdv-page .rdv-status { display: flex; align-items: center; background: #fff; border: 1px solid var(--line-chip); border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--ink); }
.rdv-page .rdv-status select { border: none; background: transparent; padding: 11px 15px; font-weight: 600; }
.rdv-page .rdv-when { display: flex; border: 1px solid var(--line-chip); border-radius: 11px; overflow: hidden; background: #fff; }
.rdv-page .rdv-when button { font-size: 14px; padding: 11px 18px; color: var(--text-muted); cursor: pointer; border: none; background: transparent; }
.rdv-page .rdv-when button.is-active, .rdv-page .rdv-when button.active { font-weight: 700; color: var(--on-cta); background: var(--bg-tint); }
.rdv-page .rdv-when button + button { border-left: 1px solid var(--line-chip); }
.rdv-page .rdv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rdv-page .rdv-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-card); }
.rdv-page .rdv-card__top { display: flex; align-items: center; gap: 13px; }
.rdv-page .avatar-init { width: 48px; height: 48px; border-radius: 50%; }
.rdv-page .avatar-img { object-fit: cover; }
.rdv-page .rdv-card__id { flex: 1; }
.rdv-page .rdv-card__id .nm { font-size: 16px; font-weight: 700; color: var(--ink); }
.rdv-page .rdv-card__id .ty { font-size: 13px; color: var(--text-muted); }
.rdv-page .rdv-card__meta { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; font-size: 14px; color: var(--text-muted); }
.rdv-page .rdv-card__foot { display: flex; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.rdv-page .rdv-card__foot .btn-cancel, .rdv-page .rdv-card__foot .btn-details { flex: 1; text-align: center; }
.rdv-page .rdv-empty { text-align: center; padding: 48px 20px; }
.rdv-page .rdv-empty h3 { font-size: 18px; font-weight: 800; color: var(--ink); }
.rdv-page .rdv-empty p { color: var(--text-muted); }
@media (max-width: 991px) { .rdv-page .rdv-grid { grid-template-columns: 1fr; } }
@media (max-width: 575px) { .rdv-page .rdv-filters { flex-direction: column; } .rdv-page .rdv-when { align-self: stretch; } .rdv-page .rdv-when button { flex: 1; text-align: center; } }

/* ============================================================
   15. DÉTAILS DU RENDEZ-VOUS
   ============================================================ */
.detail-page { background: var(--bg-page); padding: 28px 0 48px; min-height: 60vh; }
.detail-page__inner { max-width: 1180px; margin: 0 auto; padding: 0 36px; }
@media (max-width: 575px) { .detail-page__inner { padding: 0 16px; } }
.detail-page .detail-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.detail-page .detail-top a { font-size: 14px; font-weight: 600; color: var(--brand-primary); text-decoration: none; }
.detail-page .detail-top h1 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0; }
.detail-page .detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }
.detail-page .detail-main, .detail-page .detail-side { display: flex; flex-direction: column; gap: 20px; }
.detail-page .card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.detail-page .card h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 18px; }
.detail-page .prof-card { display: flex; gap: 16px; align-items: flex-start; }
.detail-page .avatar-init { width: 64px; height: 64px; border-radius: 50%; font-size: 20px; }
.detail-page .avatar-img.big { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.detail-page .prof-card h3 { margin: 0 0 6px; }
.detail-page .prof-card__badges { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.detail-page .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-page .lbl { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: 5px; }
.detail-page .info-grid b { font-size: 15px; font-weight: 600; color: var(--ink); }
.detail-page .info-grid b.big { font-size: 18px; font-weight: 700; }
.detail-page .muted { color: var(--text-muted); }
.detail-page .info-grid .muted.sm { display: block; font-size: 14px; margin-top: 2px; color: var(--text-faint); }
.detail-page .info-status { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.detail-page .empty { background: var(--bg-subtle); border: 1px dashed var(--line-field); border-radius: 12px; padding: 24px; text-align: center; color: var(--text-faint); font-size: 14px; }
.detail-page .detail-side h4 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.detail-page .act { display: block; text-align: center; padding: 12px; margin-bottom: 10px; text-decoration: none; width: 100%; border: none; cursor: pointer; }
.detail-page .info-card { display: flex; flex-direction: column; gap: 16px; }
.detail-page .info-card code { font-size: 13px; color: #374151; }
.detail-page .info-card .bt { padding-top: 14px; border-top: 1px solid var(--line-soft); }
.detail-page .info-card b { font-size: 14px; font-weight: 600; color: var(--ink); }
@media (max-width: 991px) { .detail-page .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 575px) { .detail-page .info-grid { grid-template-columns: 1fr; } .detail-page .prof-card { flex-direction: column; } }

/* ============================================================
   14. APP MODALS (appointment detail: reschedule + share access)
   Reschedule reuses the booking day-strip + slot-grid design.
   ============================================================ */
/* z-index sits above the Capacitor app chrome (header 99999 / bottom nav 99998) */
.app-modal { display: none; position: fixed; inset: 0; z-index: 100001; padding: 24px; justify-content: center; align-items: center; }
.app-modal.is-open { display: flex; }
/* Lock the page behind an open modal so scrolling stays inside the modal body */
body.app-modal-open { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.app-modal__overlay { position: absolute; inset: 0; background: rgba(35,36,63,.55); }
.app-modal__card { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 460px; max-height: 90vh; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-elevated); overflow: hidden; animation: appModalIn .25s ease-out; }
.app-modal__card--wide { max-width: 540px; }
.app-modal__head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.app-modal__head h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--ink); }
.app-modal__close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--text-faint); cursor: pointer; padding: 0 2px; }
.app-modal__close:hover { color: var(--ink); }
.app-modal__body { flex: 1 1 auto; min-height: 0; padding: 22px 24px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; color: var(--text); }
.app-modal__intro { color: var(--text-muted); font-size: 14px; margin: 0 0 20px; }
.app-modal__foot { flex-shrink: 0; padding: 16px 24px; border-top: 1px solid var(--line); }
.app-modal__foot, .app-modal__foot form { display: flex; gap: 12px; justify-content: flex-end; width: 100%; }
.app-modal .field-label { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.app-modal .field-label b { color: var(--brand-secondary); margin-right: 6px; }
.app-modal .field-label:not(:first-child) { margin-top: 22px; }

/* Booking-style legend + day strip + slots inside the modal */
.app-modal .legend2 { display: flex; gap: 16px; margin: 0 0 14px; font-size: 12px; color: var(--text-muted); }
.app-modal .legend2 span { display: flex; align-items: center; gap: 6px; }
.app-modal .legend2 i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.app-modal .legend2 i.ok { background: var(--brand-secondary); }
.app-modal .legend2 i.off { background: #e4e7eb; }
.app-modal .days { display: flex; gap: 8px; flex-wrap: wrap; }
.app-modal .day { flex: 1 0 calc(20% - 8px); min-width: 52px; text-align: center; padding: 9px 0; border: 1px solid #eceef3; border-radius: 11px; background: #fbfcfd; cursor: pointer; }
.app-modal .day span { font-size: 12px; color: var(--text-faint); font-weight: 600; display: block; }
.app-modal .day b { display: block; font-size: 16px; color: var(--ink); margin-top: 2px; }
.app-modal .day.is-active { border-color: var(--brand-primary); background: #f4f5fc; }
.app-modal .day.is-active b { color: var(--brand-primary); }
.app-modal .slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.app-modal .slots .slot { text-align: center; font-size: 14px; font-weight: 600; padding: 10px 0; border-radius: 9px; cursor: pointer; border: 1px solid #bfeae3; background: var(--bg-teal-tint); color: #15423d; }
.app-modal .slots .slot.sel { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.app-modal .slots > .muted { grid-column: 1 / -1; margin: 0; color: var(--text-muted); font-size: 14px; }

/* Modal buttons */
.app-modal .btn-secondary { padding: 11px 20px; border: 1px solid var(--line-field); background: #fff; color: var(--text); border-radius: var(--r-button); cursor: pointer; font-weight: 700; font-family: var(--font-sans); }
.app-modal .btn-secondary:hover { background: var(--bg-page); }
.app-modal .btn-primary { padding: 11px 22px; }
.app-modal .btn-primary[disabled] { opacity: .5; cursor: not-allowed; }

@keyframes appModalIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Mobile: dock as a bottom sheet */
@media (max-width: 575px) {
  .app-modal { padding: 0; align-items: flex-end; }
  .app-modal__card { max-width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0; animation: appSheetIn .28s ease-out; }
  .app-modal__foot { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .app-modal__foot .btn-secondary, .app-modal__foot .btn-primary { flex: 1; }
}
@keyframes appSheetIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
