/* Oscar — styles partagés (site public, espace équipe, contrat) */

:root {
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --surface-2: #f1ebe1;
  --ink: #1f1a17;
  --muted: #6b6158;
  --line: #e3d9cb;
  /* Or du logo Oscar, assombri pour rester lisible (contraste ≥ 4.5:1) */
  --accent: #8a6a1f;
  --accent-hover: #735818;
  --accent-soft: #f5ecd6;
  --accent-ink: #6b5214; /* texte or sur fond --accent-soft */
  --on-accent: #ffffff;
  --focus: #2f5bd3;

  --free: #256b43;
  --free-soft: #e1f0e6;
  --taken: #7a7068;
  --taken-soft: #e9e3db;
  --option: #b03a0a;
  --option-soft: #fdebdd;
  --confirm: #256b43;
  --confirm-soft: #e1f0e6;
  --cancel: #7a7068;
  --cancel-soft: #ece8e3;
  --danger: #b42318;
  --danger-soft: #fdeceb;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(31, 26, 23, .05), 0 6px 20px rgba(31, 26, 23, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151210;
    --surface: #1e1a17;
    --surface-2: #28231f;
    --ink: #f2ece4;
    --muted: #b4a99d;
    --line: #3a332d;
    --accent: #c9a24e;
    --accent-hover: #d8b467;
    --accent-soft: #33291a;
    --accent-ink: #d8b467;
    --on-accent: #1a1408;
    --focus: #8fb0ff;
    --free: #7cc79a;
    --free-soft: #1f3327;
    --taken: #a59b91;
    --taken-soft: #2d2824;
    --option: #f59e5b;
    --option-soft: #3b2418;
    --confirm: #7cc79a;
    --confirm-soft: #1f3327;
    --cancel: #a59b91;
    --cancel-soft: #2d2824;
    --danger: #f2857a;
    --danger-soft: #3d1f1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}
html[dir="rtl"] body { font-family: var(--font-ar); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.icon { width: 18px; height: 18px; flex: none; }
html[dir="rtl"] .icon-flip { transform: scaleX(-1); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--line); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--line); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-icon { width: 44px; padding: 0; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-option { background: var(--option-soft); color: var(--option); }
.st-confirme { background: var(--confirm-soft); color: var(--confirm); }
.st-annule { background: var(--cancel-soft); color: var(--cancel); }
.pay-none { background: var(--danger-soft); color: var(--danger); }
.pay-deposit { background: var(--option-soft); color: var(--option); }
.pay-full { background: var(--confirm-soft); color: var(--confirm); }

/* ---------- Cartes ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card + .card { margin-top: 16px; }
.card h2 { font-size: 20px; margin-bottom: 4px; }
.card-sub { color: var(--muted); font-size: 15px; margin-bottom: 16px; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-weight: 600; font-size: 15px; }
.field .opt { font-weight: 400; color: var(--muted); font-size: 13px; }
.field .hint { color: var(--muted); font-size: 13px; }
.field .error { color: var(--danger); font-size: 14px; font-weight: 500; }
.field .error:empty { display: none; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 16px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.invalid input, .invalid select, .invalid textarea { border-color: var(--danger); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }
.form-section { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 12px; }
html[dir="rtl"] .form-section { letter-spacing: 0; }

.choice-list { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  cursor: pointer;
}
.choice input { width: 18px; height: 18px; accent-color: var(--accent); }
.choice .c-title { font-weight: 600; }
.choice .c-sub { color: var(--muted); font-size: 14px; margin-inline-start: auto; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice.disabled { opacity: .55; cursor: not-allowed; }
/* Formulaire de demande seul, centré */
.pub-single { max-width: 760px; padding-bottom: 0; }

/* Visites du samedi */
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 900px) { .visit-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.visit-days button { min-width: 92px; }
.visit-times-title { margin-top: 18px; margin-bottom: 10px; }
.visit-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-bottom: 10px; }
.visit-times.loading { opacity: .5; }
.vt { min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.vt:hover:not(:disabled) { border-color: var(--accent); }
.vt.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.vt:disabled { background: var(--surface-2); color: var(--muted); text-decoration: line-through; cursor: not-allowed; opacity: .7; }
#visitChosen.chosen { color: var(--accent-ink); font-weight: 700; }

/* Espace équipe : visites */
.visit-list { display: grid; gap: 6px; }
.visit-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.visit-row.free { background: transparent; border-style: dashed; color: var(--muted); }
.visit-row.cancelled { opacity: .6; }
.visit-row .vr-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.visit-row .vr-main { min-width: 0; }
.visit-row .vr-main b { display: block; }
.visit-row .vr-main small { color: var(--muted); }
@media (max-width: 520px) { .visit-row { grid-template-columns: 52px 1fr; } .visit-row > :last-child { grid-column: 2; justify-self: start; } }
.st-demande { background: #e3ecfa; color: #24518f; }
.mk.st-demande { background: transparent; border: 1.5px dashed #24518f; height: 6px; }
.legend .l-demande { border: 2px dashed #24518f; }
@media (prefers-color-scheme: dark) { .st-demande { background: #1d2a40; color: #9cbcf0; } .mk.st-demande { border-color: #9cbcf0; } .legend .l-demande { border-color: #9cbcf0; } }

/* Demande avec plusieurs créneaux */
.cart { margin-bottom: 18px; padding: 12px; border: 1px solid var(--accent); border-radius: var(--radius-sm); background: var(--accent-soft); }
.cart-title { font-weight: 700; margin-bottom: 8px; color: var(--accent-ink); }
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cart-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border-radius: var(--radius-sm); }
.cart-list .ci-text { flex: 1; min-width: 0; font-size: 15px; }
.cart-list .ci-text b { display: block; }
.cart-list .ci-text small { color: var(--muted); }
.cart-list li.ci-taken { outline: 2px solid var(--danger); }
.add-slot { align-self: flex-start; margin-top: 4px; }
.slot-pill.mine { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.done-list { list-style: none; padding: 0; margin: 0 auto 12px; max-width: 420px; display: grid; gap: 6px; text-align: start; }
.done-list li { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 15px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }

/* ---------- Contrôle segmenté ---------- */
.seg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: none; display: flex; flex-direction: column; align-items: flex-start;
  min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; text-align: start;
}
.seg button .s-title { font-weight: 600; font-size: 15px; }
.seg button .s-sub { color: var(--muted); font-size: 12px; }
.seg button[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.seg button[aria-selected="true"] .s-sub { color: var(--accent-ink); }
.seg.compact button { flex-direction: row; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; }

/* ---------- Calendrier ---------- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 10px; }
.cal-nav h3 { font-size: 18px; text-transform: capitalize; text-align: center; flex: 1; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 0; text-transform: capitalize; overflow: hidden; white-space: nowrap; }
html[dir="rtl"] .cal .dow { font-size: 11px; }
#legendSlots { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.day {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  min-height: 64px; padding: 5px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; text-align: start;
}
.day:hover { border-color: var(--muted); }
.day .num { font-size: 14px; font-weight: 600; }
.day.out { visibility: hidden; }
.day.past { background: transparent; cursor: default; }
.day.past .num { color: var(--muted); font-weight: 400; }
.day.today .num { color: var(--accent); }
.day.today::after { content: ""; position: absolute; top: 9px; inset-inline-end: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.day[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.slot-pill {
  display: block; border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.slot-pill.free { background: var(--free-soft); color: var(--free); }
.slot-pill.taken { background: var(--taken-soft); color: var(--taken); text-decoration: line-through; }
.day.past .slot-pill { opacity: .45; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend .l-free { background: var(--free-soft); border: 1px solid var(--free); }
.legend .l-taken { background: var(--taken-soft); border: 1px solid var(--taken); }
.legend .l-option { background: var(--option); }
.legend .l-mine { background: var(--accent); }
.legend .l-confirme { background: var(--confirm); }

.cal.loading .day { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.state-box { text-align: center; padding: 28px 12px; color: var(--muted); }
.state-box .btn { margin-top: 12px; }

/* Calendrier équipe : marqueurs */
.markers { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.mk { width: 100%; height: 6px; border-radius: 3px; }
.mk.st-option { background: var(--option); }
.mk.st-confirme { background: var(--confirm); }
.mk-count { font-size: 11px; color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 100;
  transform: translate(-50%, 140%);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-weight: 500; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .25s, opacity .25s, visibility .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Site public ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.1; }
.brand-mark { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--accent); letter-spacing: .01em; }
.brand-sub { font-size: 12px; color: var(--muted); }
.header-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 420px) { .header-actions .call-text { display: none; } }

.hero { padding: 32px 16px 24px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(28px, 6vw, 42px); font-weight: 700; max-width: 18ch; }
html[dir="rtl"] .hero h1 { font-family: var(--font-ar); }
.hero .lead { margin-top: 12px; max-width: 60ch; color: var(--muted); font-size: 17px; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.steps li::before {
  content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 14px;
}
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

.pub-grid { display: grid; gap: 16px; padding-bottom: 32px; align-items: start; }
@media (min-width: 960px) { .pub-grid { grid-template-columns: 1.25fr 1fr; } .pub-grid .form-card { position: sticky; top: 16px; } }
.done { text-align: center; padding: 12px 0; }
.done .done-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--confirm-soft); color: var(--confirm); }
.done .done-icon .icon { width: 28px; height: 28px; }
.done h2 { margin-bottom: 8px; }
.done p { margin-bottom: 10px; }
.form-alert { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-weight: 500; margin-bottom: 16px; }

.site-footer { padding: 24px 16px 40px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------- Site vitrine ---------- */
html { scroll-behavior: smooth; }
.site [id] { scroll-margin-top: 76px; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 60; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); }
.skip-link:focus { top: 12px; }
.site-header.sticky { position: sticky; top: 0; z-index: 40; transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 2px 12px rgba(31, 26, 23, .08); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.site-nav a:hover { background: var(--surface-2); }
.menu-btn { display: none; width: 44px; padding: 0; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 16px 16px;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(31, 26, 23, .08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav .nav-lang { align-self: flex-start; margin-top: 10px; }
}

/* Photos et emplacements vides */
.photo { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px dashed var(--line); background: var(--accent-soft); }
.ph-mark { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--accent); opacity: .55; }
.ph-text { font-size: 13px; color: var(--muted); }

/* Accueil */
.hero-v { padding: 40px 0 48px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 48px; } .hero-v { padding: 64px 0; } }
.hero-text h1 { font-family: var(--font-display); font-size: clamp(32px, 5.4vw, 52px); font-weight: 700; line-height: 1.1; }
html[dir="rtl"] .hero-text h1 { font-family: var(--font-ar); line-height: 1.35; }
.hero-text .lead { margin-top: 16px; color: var(--muted); font-size: 18px; max-width: 56ch; }
.hero-ctas { margin-top: 24px; }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.facts li { font-weight: 600; font-size: 15px; padding-inline-start: 14px; border-inline-start: 3px solid var(--accent); }
.hero-photo { aspect-ratio: 4 / 3; }
@media (min-width: 900px) { .hero-photo { aspect-ratio: 5 / 4; } }

/* Sections */
.block { padding: 56px 0; }
.block.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.block-head { margin-bottom: 24px; max-width: 64ch; }
.block-head h2, .contact-grid h2 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 34px); }
html[dir="rtl"] .block-head h2, html[dir="rtl"] .contact-grid h2 { font-family: var(--font-ar); }
.block-head p { margin-top: 8px; color: var(--muted); font-size: 17px; }
.card-title { font-size: 20px; margin-bottom: 4px; }
#reserver .steps { margin: 0 0 24px; }
#reserver .pub-grid { padding-bottom: 0; }

/* Salles */
.spaces { display: grid; gap: 16px; }
@media (min-width: 760px) { .spaces { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.space-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.space-card .photo { aspect-ratio: 4 / 3; border-radius: 0; }
.space-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.space-body p { color: var(--muted); flex: 1; }
.space-body .btn { align-self: flex-start; margin-top: 6px; }
.space-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.space-top h3 { font-size: 20px; }
.cap { font-weight: 600; color: var(--accent); font-size: 14px; white-space: nowrap; }

/* Événements */
.events { display: grid; gap: 28px; }
.event-row { display: grid; gap: 16px; align-items: center; }
.event-row .photo { aspect-ratio: 16 / 10; }
.event-text h3 { font-size: 22px; margin-bottom: 8px; }
.event-text p { color: var(--muted); font-size: 17px; max-width: 52ch; }
@media (min-width: 760px) {
  .event-row { grid-template-columns: 1fr 1fr; gap: 40px; }
  .event-row:nth-child(even) .photo { order: 2; }
}

.brand-img img { display: block; height: 52px; width: auto; }
.footer-logo { display: block; height: 64px; width: auto; margin-bottom: 8px; }
.equip { margin-top: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.equip { display: grid; gap: 18px; align-items: center; }
@media (min-width: 760px) { .equip { grid-template-columns: 1.2fr 1fr; } }
.equip-photo { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); }
.equip h3 { font-size: 17px; margin-bottom: 10px; }
.equip ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.equip li { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 15px; font-weight: 500; }
.events-more { margin-top: 28px; color: var(--muted); font-size: 17px; }
.event-row .photo img { object-position: center 35%; }

/* Galerie : une photo à la fois */
.slider { max-width: 980px; margin: 0 auto; }
.slider-stage {
  position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden;
  background: #16120e; /* fond sombre : les photos verticales restent entières */
}
@media (max-width: 600px) { .slider-stage { aspect-ratio: 4 / 3; } }
.slider-stage img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.slider-stage img.fade-in { animation: slideFade .45s ease; }
@keyframes slideFade { from { opacity: 0; } to { opacity: 1; } }
.sl-btn { position: absolute; background: rgba(255, 255, 255, .88); color: #1f1a17; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.sl-btn:hover { background: #fff; }
.sl-prev { inset-inline-start: 12px; top: 50%; transform: translateY(-50%); }
.sl-next { inset-inline-end: 12px; top: 50%; transform: translateY(-50%); }
.sl-full { top: 12px; inset-inline-end: 12px; width: 40px; min-height: 40px; }
.slider-bar { display: flex; align-items: center; gap: 12px; padding: 12px 2px 10px; }
.sl-caption { flex: 1; font-weight: 600; min-width: 0; }
.sl-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 480px) { #slPlay span { display: none; } #slPlay { width: 36px; padding: 0; } }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.thumb { flex: none; width: 92px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); cursor: pointer; opacity: .65; scroll-snap-align: center; transition: opacity .2s, border-color .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: .9; }
.thumb.active { opacity: 1; border-color: var(--accent); }
@media (max-width: 600px) { .thumb { width: 72px; } }
.gallery-empty { border: 1px dashed var(--line); border-radius: var(--radius); }
.gallery-empty p { margin-bottom: 4px; }

.lightbox { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; border-radius: 0; background: rgba(12, 9, 7, .94); display: none; align-items: center; justify-content: center; padding: 56px 12px; }
.lightbox[open] { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox .btn { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; }
.lightbox .btn:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 10px; inset-inline-end: 10px; }
.lb-prev { inset-inline-start: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 10px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; padding: 0 60px; }

/* Contact */
.contact-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 48px; } }
.contact-list { margin: 20px 0 24px; display: grid; gap: 14px; }
.contact-list div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 600; }
@media (max-width: 480px) { .contact-list div { grid-template-columns: 1fr; gap: 2px; } }
.contact-grid { align-items: start; }
.contact-avail { color: var(--muted); font-size: 17px; margin-bottom: 14px; max-width: 46ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-contact { background: var(--surface); border-color: var(--line); min-height: 48px; padding: 0 18px; }
.btn-contact:hover { border-color: var(--accent); background: var(--surface); }
.btn-contact .icon { width: 20px; height: 20px; color: var(--accent); }

.map-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.map-frame { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* La carte ne capte ni la molette ni le doigt tant qu'on ne l'a pas touchée : la page continue de défiler */
.map-frame iframe { pointer-events: none; }
.map-frame.map-active iframe { pointer-events: auto; }
.map-unlock { position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: flex-end; padding: 12px; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.map-unlock span { padding: 8px 14px; border-radius: 999px; background: rgb(13 11 16 / .82); color: #f6efe4; font-size: 14px; }
.map-load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--surface-2); color: var(--ink); font-weight: 600; cursor: pointer; }
.map-load .icon { width: 32px; height: 32px; color: var(--accent); }
.map-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.map-foot div { display: flex; flex-direction: column; }

/* Réseaux sociaux */
.follow { background: #1f1a17; color: #f5efe6; padding: 40px 0; }
.follow-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.follow h2 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 30px); color: #e2c27a; }
html[dir="rtl"] .follow h2 { font-family: var(--font-ar); }
.follow p { color: #cfc4b5; margin-top: 6px; max-width: 52ch; }
.follow-links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-social { background: transparent; color: #f5efe6; border-color: rgba(245, 239, 230, .35); min-height: 48px; padding: 0 20px; }
.btn-social:hover { background: rgba(245, 239, 230, .1); border-color: #e2c27a; }
.btn-social .icon { width: 20px; height: 20px; color: #e2c27a; }

/* Bouton WhatsApp flottant */
.wa-float {
  position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #1f8f4e; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.wa-float:hover { background: #187a42; }
.wa-float .icon { width: 28px; height: 28px; }
.site .toast { bottom: 86px; }

/* Lien WhatsApp vers un client (espace équipe) */
.wa-mini { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-inline-start: 6px; border-radius: 50%; background: #1f8f4e; color: #fff; vertical-align: middle; }
.wa-mini:hover { background: #187a42; }
.vr-main a[href^="tel:"], .i-value a[href^="tel:"] { white-space: nowrap; }
.wa-mini .icon { width: 18px; height: 18px; }

/* Visite confirmée : ajouter à l'agenda */
.done-actions { justify-content: center; margin: 4px 0 14px; }

/* Questions fréquentes */
.faq-wrap { max-width: 820px; }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; min-height: 44px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font-size: 22px; line-height: 1; color: var(--accent-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }
.site .site-footer-v { padding-bottom: 92px; } /* laisse la place au bouton WhatsApp */

.site-footer-v { background: var(--surface); border-top: 1px solid var(--line); padding: 28px 0 36px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: flex-start; }
.footer-row .brand-mark { display: block; margin-bottom: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--ink); }

/* ---------- Espace équipe ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; }
.login-card .brand { margin-bottom: 20px; }
.demo-users { display: grid; gap: 8px; margin-top: 12px; }
.demo-user { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; text-align: start; }
.demo-user:hover { border-color: var(--accent); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: 14px; }

.app-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.app-header .header-row { min-height: 56px; }
.app-header .brand-mark { font-size: 22px; }
.who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; font-size: 14px; }
.who small { color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .who { display: none; } }
.demo-banner { background: var(--option-soft); color: var(--option); font-size: 14px; }
.demo-banner .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; min-height: 44px; padding: 0 14px; border: 0; background: none; cursor: pointer;
  border-bottom: 3px solid transparent; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
}
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--option); color: #fff; font-size: 12px; display: inline-grid; place-items: center; }
.count:empty { display: none; }
.app-main { padding-top: 20px; padding-bottom: 48px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.panel-title { font-size: 22px; margin-bottom: 4px; }

.cal-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 960px) { .cal-layout { grid-template-columns: 1.4fr 1fr; } .cal-layout .day-panel { position: sticky; top: 120px; } }
.day-panel h3 { font-size: 18px; margin-bottom: 12px; }
.day-panel h3::first-letter { text-transform: uppercase; }
.space-block { border-top: 1px solid var(--line); padding: 12px 0; }
.space-block:first-of-type { border-top: 0; padding-top: 0; }
.space-block h4 { margin: 0 0 8px; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.space-block h4 small { color: var(--muted); font-weight: 400; }
.slot-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 6px; }
.slot-row .slot-name { width: 84px; flex: none; font-size: 14px; color: var(--muted); }
.slot-row .slot-free { color: var(--free); font-weight: 600; flex: 1; }
.slot-row .bk-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; justify-content: space-between; background: none; border: 0; padding: 0; cursor: pointer; text-align: start; }
.slot-row .bk-link .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list { display: grid; gap: 8px; }
.bk-item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; text-align: start;
}
.bk-item:hover { border-color: var(--muted); }
.bk-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink); line-height: 1.1; }
.bk-date b { font-size: 20px; }
.bk-date small { font-size: 12px; font-weight: 600; }
.bk-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bk-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-meta { color: var(--muted); font-size: 14px; }
.bk-side { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.bk-actions { display: flex; gap: 8px; padding: 0 12px 12px; margin-top: -4px; }
.req-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.req-card .bk-item { border: 0; }
@media (max-width: 520px) { .bk-item { grid-template-columns: 48px 1fr; } .bk-side { grid-column: 2; flex-direction: row; align-items: flex-start; flex-wrap: wrap; } .bk-date { height: 48px; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k-label { color: var(--muted); font-size: 14px; }
.kpi .k-value { font-size: 24px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .k-hint { color: var(--muted); font-size: 13px; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; }
table.data th { color: var(--muted); font-weight: 600; font-size: 13px; }
table.data td.num, table.data th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.mail { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px; }
.mail + .mail { margin-top: 8px; }
.mail .m-subject { font-weight: 600; }
.mail .m-meta { color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.mail pre { white-space: pre-wrap; font: inherit; font-size: 14px; margin: 0; color: var(--ink); }

/* ---------- Fenêtres ---------- */
dialog {
  width: min(640px, calc(100% - 24px)); max-height: calc(100% - 24px);
  padding: 0; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
dialog::backdrop { background: rgba(20, 15, 12, .5); }
.dlg-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
html[dir="rtl"] .dlg-head { padding: 14px 20px 14px 16px; }
.dlg-head h2 { font-size: 19px; }
.dlg-body { padding: 18px 20px; }
.dlg-foot { position: sticky; bottom: 0; display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  dialog { width: 100%; max-width: 100%; max-height: 92%; margin: auto 0 0; border-radius: 16px 16px 0 0; }
}
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 16px; }
.info-grid .i-label { color: var(--muted); font-size: 13px; }
.info-grid .i-value { font-weight: 500; overflow-wrap: anywhere; }
.info-grid .full { grid-column: 1 / -1; }
@media (max-width: 420px) { .info-grid { grid-template-columns: 1fr; } }
.section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.section h3 { font-size: 15px; margin-bottom: 10px; }
.money-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.money-row div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px; }
.money-row b { display: block; font-variant-numeric: tabular-nums; }
.money-row span { font-size: 13px; color: var(--muted); }
.badge-group { background: var(--accent-soft); color: var(--accent-ink); }
.badge-group::before { display: none; }
.group-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.group-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.group-list li.current { outline: 2px solid var(--accent); }
.group-list .linkish { text-align: start; color: var(--ink); text-decoration: none; font-size: 15px; }
.files { display: grid; gap: 6px; margin-bottom: 10px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.file-row a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.history li { display: flex; flex-direction: column; padding-inline-start: 14px; border-inline-start: 2px solid var(--line); }
.history small { color: var(--muted); }

/* ---------- Contrat ---------- */
.contract-bar { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.contract-note { margin: 16px auto 0; max-width: 820px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--option-soft); color: var(--option); font-size: 14px; }
.contract { max-width: 820px; margin: 16px auto 40px; background: #fff; color: #1a1a1a; padding: 48px 56px; border: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.contract h1 { font-family: var(--font-display); text-align: center; font-size: 24px; margin-bottom: 4px; }
.contract .c-sub { text-align: center; color: #555; margin-bottom: 24px; }
.contract h2 { font-size: 15px; margin: 18px 0 4px; }
.contract p { margin: 0 0 8px; }
.contract .blank { display: inline-block; min-width: 120px; border-bottom: 1px dotted #888; }
.contract .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.contract .sign div { min-height: 110px; border-top: 1px solid #999; padding-top: 6px; font-weight: 600; }
.contract[dir="rtl"] { font-family: var(--font-ar); }
.contract[dir="rtl"] h1 { font-family: var(--font-ar); }
@media (max-width: 640px) { .contract { padding: 24px 18px; margin: 12px 0 24px; } }
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .contract { border: 0; margin: 0 auto; padding: 0; max-width: none; }
  .contract + .contract { page-break-before: always; }
}
