/**
 * Estimateur de coûts — habillage
 * ===============================
 * Les couleurs sont celles du Centre culturel, les mêmes que celles du
 * calendrier d'admin du SaaS : le personnel et le public regardent la même
 * chose, il serait déroutant qu'elle change d'aspect entre les deux.
 *
 * Le mode sombre ne change QUE le fond de la page (--bg) et le texte qui
 * repose dessus (--site-ink-faint, pour le pied de page). L'Estimateur
 * lui-même — cartes, formulaires, tableau de prix — reste toujours en
 * thème clair : c'est un document que le client remplit, lit et imprime,
 * sa lisibilité ne doit jamais dépendre du thème système du visiteur.
 * D'où deux jeux de variables : --bg/--site-ink-faint suivent le thème,
 * tout le reste (--surface, --ink, --accent, etc.) reste figé au clair.
 */

:root {
  /* Fond de la page et texte du pied de page — les deux seules choses que
     le mode sombre change. */
  --bg: #ffffff;
  --site-ink-faint: #8ea0ae;

  /* Couleurs de l'Estimateur : toujours claires, quel que soit le thème
     du site. Les cartes se détachent par leur filet et leur ombre —
     méthode reprise de .salle-card dans ccv-theme — plutôt que par un
     contraste de fond avec la page. */
  --surface: #ffffff;
  --surface-2: #f0f7fc;
  --border: #e2e8ee;
  --ink: #132330;
  --ink-soft: #5a6d7d;
  --ink-faint: #8ea0ae;
  --accent: #125687;
  --accent-strong: #0d3d5e;
  --accent-soft: #d4e8f5;
  --ok: #1f8a5c;
  --ok-soft: #e2f5ec;
  --warn: #a8710a;
  --warn-soft: #fbf0dc;
  --danger: #c23b3b;
  --danger-soft: #fbe6e6;

  /* Rayons et police repris **tels quels** de ccv-theme
     (assets/css/main.css) : l'Estimateur s'affiche à l'intérieur du site,
     et deux systèmes de formes voisins mais différents se voient
     immédiatement. Ils sont recopiés plutôt qu'importés parce que la page
     doit aussi tenir debout hors du thème. */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;
  --font: 'Plus Jakarta Sans', 'Aptos', 'Calibri', -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 2px 8px rgba(18,86,135,.06);
  --shadow-lift: 0 16px 36px rgba(18,86,135,.18);
}

/* Suit le système, sauf si le bouton d'en-tête a forcé le mode clair. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1620;
    --site-ink-faint: #5f7788;
  }
}

/* Mode sombre forcé par le bouton d'en-tête, même si le système est clair. */
:root[data-theme="dark"] {
  --bg: #0a1620;
  --site-ink-faint: #5f7788;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Une colonne unique, bornée à une largeur de lecture confortable. La
   disposition à deux colonnes mettait le sommaire à droite du formulaire :
   sur téléphone il passait sous le pli de toute façon, et sur grand écran
   elle obligeait l'œil à faire des allers-retours entre la question posée
   et le chiffre qui bouge. Le total suit maintenant dans la barre
   collante, visible en permanence sans voler de largeur au formulaire. */
.wrap { max-width: 820px; margin: 0 auto; padding: 28px 20px 96px; }

/* ── En-tête ─────────────────────────────────────────────────────── */
header.top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.src-chip {
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--warn); background: var(--warn-soft);
  padding: 5px 10px; border-radius: 100px;
}

.theme-toggle {
  margin-left: auto; flex-shrink: 0; width: 36px; height: 36px; padding: 0;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-icon {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.theme-icon-moon { display: none; }
/* L'icône visible reflète le mode actuel : soleil en clair, lune en sombre. */
:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-icon-moon { display: block; }
}

.note {
  background: var(--warn-soft); color: var(--warn); border-radius: var(--radius);
  padding: 11px 14px; margin: 16px 0 0; font-size: 12.5px;
}

/* ── Grille ──────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; margin-top: 22px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
/* Le sommaire est la conclusion : sur fond blanc, il se distingue du
   formulaire par un filet plus affirmé, pas par une couleur de fond. */
.summary-card .card, .summary-card.card { border-color: var(--accent-soft); }
.section { padding: 26px 28px; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: none; }
.section.pt { padding-top: 14px; }

/* Le fil conducteur de la page : en colonne unique, c'est le seul repère
   qui dit au client où il en est. Il mérite plus qu'un murmure gris. */
.eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
  display: flex; align-items: center; gap: 9px;
}
.eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--border); }

label.flabel { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
label.flabel.bloc { margin-top: 18px; }

input[type="time"], input[type="date"], input[type="number"], input[type="text"], select, textarea {
  width: 100%; font-family: var(--font); font-size: 14.5px; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-variant-numeric: tabular-nums;
}
textarea { resize: vertical; min-height: 72px; line-height: 1.45; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Le texte d'aide d'une étape, réglé dans SaaS CCV → Options de
   l'Estimateur. Les sauts de ligne saisis là-bas sont gardés. */
.aide-etape { font-size: 12.5px; color: var(--ink-soft); margin: -6px 0 14px; white-space: pre-line; }

/* Les questions libres, à la fin de l'étape où le Centre les a placées. */
.questions-libres { display: grid; gap: 14px; margin-top: 18px; }
.question-aide { font-size: 11.5px; color: var(--ink-faint); margin: 5px 0 0; white-space: pre-line; }
.requis { color: var(--danger); }

.field-row { display: grid; gap: 12px; }
.field-row.deux { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .field-row.deux { grid-template-columns: 1fr; } }

/* ── Calendrier de disponibilité ─────────────────────────────────── */
.cal { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; background: var(--surface-2); }

.cal-barre { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-titre { font-size: 14px; font-weight: 700; text-transform: capitalize; }
.cal-nav {
  font-family: var(--font); font-size: 17px; line-height: 1; width: 30px; height: 30px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); cursor: pointer;
}
.cal-nav:hover { border-color: var(--accent); color: var(--accent); }
.cal-nav[disabled] { opacity: .35; cursor: not-allowed; }

.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-entete {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-faint); text-align: center; padding-bottom: 4px;
}

.cal-jour {
  position: relative; min-height: 64px; min-width: 0;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px;
  padding: 5px 4px; text-align: left;
  font-size: 12.5px; font-family: var(--font); color: var(--ink);
  background: var(--surface); border: 1.5px solid transparent;
  border-radius: var(--radius-sm); cursor: pointer;
}
.cal-jour:hover:not([disabled]) { border-color: var(--accent); }
.cal-jour[disabled] { color: var(--ink-faint); cursor: not-allowed; background: transparent; }
.cal-jour.vide { visibility: hidden; }
.cal-jour.choisi { background: var(--accent); color: #fff; font-weight: 700; }
.cal-jour.aujourdhui:not(.choisi) { box-shadow: inset 0 0 0 1.5px var(--accent-soft); }

/* Les créneaux déjà pris, comme dans le calendrier du SaaS : un liseré à
   la couleur de la salle, l'heure de début et la salle. En pointillé, ceux
   qui sont en attente. */
.cal-num { line-height: 1; }
.cal-resas { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.cal-resa {
  display: block; font-size: 9.5px; font-weight: 500; line-height: 1.35; text-align: left;
  color: var(--ink); background: var(--surface); border-left: 3px solid var(--salle);
  border-radius: 3px; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none;
}
.cal-resa b { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-resa.option { border-left-style: dashed; color: var(--ink-soft); }
.cal-resa.choisie { font-weight: 700; box-shadow: inset 0 0 0 1px var(--salle); }
.cal-resa-plus { font-size: 9.5px; font-weight: 700; color: var(--ink-soft); text-align: left; padding-left: 4px; }

/* Salle choisie : le jour entier prend l'état de cette salle. */
.cal-jour.libre-salle { background: var(--ok-soft); }
.cal-jour.option-salle { background: var(--warn-soft); }
.cal-jour.pris-salle { background: var(--danger-soft); color: var(--ink-soft); }
/* Seul le numéro est barré : un soulignement posé sur la case se
   propagerait aux créneaux, qu'aucune règle enfant ne peut défaire. */
.cal-jour.pris-salle:not(.choisi) .cal-num { text-decoration: line-through; }
.cal-jour.choisi .cal-resa-plus { color: #fff; }
.cal-jour.choisi.libre-salle,
.cal-jour.choisi.option-salle,
.cal-jour.choisi.pris-salle { background: var(--accent); color: #fff; }

.cal-etat { font-size: 12px; margin: 10px 0 0; color: var(--ink-soft); min-height: 1.4em; }
.cal-etat.err { color: var(--warn); }

.cal-legende { display: grid; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--ink-soft); }
.cal-leg-ligne { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cal-leg-titre { font-weight: 700; }
.cal-leg i.cal-leg-option { background: transparent; border-left: 3px dashed var(--ink-soft); border-radius: 0; width: 6px; }

/* Le détail de la date choisie, en toutes lettres. */
.cal-detail { margin-top: 12px; font-size: 12.5px; }
.cal-detail:empty { display: none; }
.cal-detail-titre { font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.cal-detail-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cal-detail-liste li { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.cal-detail-liste li.option { color: var(--ink-soft); font-style: italic; }
.cal-detail-liste i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* Le champ de date, au-dessus du calendrier qu'il complète. */
.champ-date { max-width: 200px; margin-bottom: 14px; }

/* Sur un téléphone, les cases n'ont plus la place d'écrire : chaque
   créneau devient un simple trait à la couleur de sa salle, et le détail
   se lit sous le calendrier. */
@media (max-width: 560px) {
  .cal-jour { min-height: 44px; padding: 4px 2px; align-items: center; }
  .cal-resa { font-size: 0; height: 4px; padding: 0; border-left: none; background: var(--salle); }
  .cal-resa.option { opacity: .45; }
  .cal-jour.choisi .cal-resa { box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); }
  .cal-resa b { display: none; }
  .cal-resa-plus { font-size: 8.5px; padding: 0; text-align: center; }
}
.cal-leg { display: flex; align-items: center; gap: 5px; }
.cal-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }

/* ── Salles ──────────────────────────────────────────────────────── */
/* Les cartes reprennent le vocabulaire de .salle-card (ccv-theme) : même
   soulèvement au survol, même ombre bleutée, même hiérarchie nom / méta.
   Le client passe de « Nos salles » à l'Estimateur ; il doit reconnaître
   les mêmes objets. Plus larges qu'avant : à 168 px le nom des salles
   longues (« Salle Marcel Beauchemin ») se coupait sur deux lignes et la
   carte n'avait plus de place pour respirer. */
.rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; }

.room-btn {
  position: relative; text-align: left; cursor: pointer; font-family: var(--font); color: var(--ink);
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 34px 18px 16px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.room-btn:hover { border-color: var(--accent-soft); transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.room-btn.active {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent); transform: none;
}
.room-btn .rname { font-weight: 800; font-size: 16px; display: block; margin-bottom: 10px; letter-spacing: -.01em; }
.room-btn .rmeta {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-soft);
  padding-top: 11px; border-top: 1px solid var(--border);
}
.room-btn.active .rmeta { border-top-color: rgba(18,86,135,.22); }
.room-btn .rate { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 14px; color: var(--accent-strong); }

/* Pastille de capacité — celle de .salle-capacity dans le thème. */
.cap-chip {
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 30px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-soft);
  letter-spacing: .02em; white-space: nowrap;
}
.room-teinte { position: absolute; top: 0; left: 0; right: 0; height: 5px; }
.suggest-badge {
  position: absolute; top: 13px; left: 14px; font-size: 10px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--accent);
  padding: 4px 9px; border-radius: 30px;
}
.room-dispo {
  position: absolute; top: 13px; right: 14px; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 30px;
}
.room-dispo.libre { color: var(--ok); background: var(--ok-soft); }
.room-dispo.option { color: var(--warn); background: var(--warn-soft); }
.room-dispo.pris { color: var(--danger); background: var(--danger-soft); }

.suggest-hint { font-size: 12px; color: var(--accent-strong); margin: 0 0 10px; font-weight: 600; }

/* ── Jauge de capacité ───────────────────────────────────────────── */
.gauge-wrap { margin-top: 14px; }
.gauge-track { height: 8px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 100px; transition: width .2s ease, background .2s ease; }
.gauge-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.gauge-msg { font-size: 12.5px; margin-top: 7px; padding: 8px 10px; border-radius: var(--radius-sm); display: none; }
.gauge-msg.show { display: block; }
.gauge-msg.warn { background: var(--warn-soft); color: var(--warn); }
.gauge-msg.danger { background: var(--danger-soft); color: var(--danger); }

/* ── Ligne de temps ──────────────────────────────────────────────── */
.duration-hint { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.duration-hint.err { color: var(--danger); font-weight: 600; }

.timeline { margin-top: 18px; }
.tl-track { position: relative; height: 34px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tl-block {
  position: absolute; top: 3px; bottom: 3px; background: var(--accent); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  min-width: 2px; cursor: grab; touch-action: none; user-select: none;
  transition: left .12s ease, width .12s ease;
}
.tl-block:active { cursor: grabbing; }
.timeline.dragging .tl-block { transition: none; }
.tl-block .tl-label { font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; padding: 0 6px; pointer-events: none; }
.tl-handle { position: absolute; top: 0; bottom: 0; width: 14px; cursor: ew-resize; touch-action: none; }
.tl-handle-left { left: -5px; }
.tl-handle-right { right: -5px; }
.tl-handle::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 4px; height: 16px; border-radius: 2px; background: rgba(255,255,255,.9);
}
.tl-buffer {
  position: absolute; top: 3px; bottom: 3px; border-radius: 5px; border: 1px dashed var(--accent);
  background: repeating-linear-gradient(45deg, var(--accent-soft), var(--accent-soft) 4px, transparent 4px, transparent 8px);
}
/* Créneaux déjà pris, en fond de la ligne de temps. */
.tl-occupe {
  position: absolute; top: 3px; bottom: 3px; border-radius: 4px;
  background: repeating-linear-gradient(45deg, var(--danger-soft), var(--danger-soft) 3px, transparent 3px, transparent 7px);
  border: 1px solid var(--danger); opacity: .85;
}
.tl-ticks { position: relative; height: 16px; margin-top: 2px; }
.tl-tick { position: absolute; top: 0; font-size: 9.5px; color: var(--ink-faint); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.tl-hint { font-size: 10.5px; color: var(--ink-faint); margin-top: 5px; }

.buffer-note, .dispo-creneau {
  font-size: 11.5px; margin-top: 9px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-soft);
}
.buffer-note:empty, .dispo-creneau:empty { display: none; }
.dispo-creneau.libre { background: var(--ok-soft); color: var(--ok); border-color: transparent; font-weight: 600; }
.dispo-creneau.pris { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 600; }
.dispo-creneau.option { background: var(--warn-soft); color: var(--warn); border-color: transparent; font-weight: 600; }

/* ── Options ─────────────────────────────────────────────────────── */
.toggle-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.toggle-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.toggle-row.disabled { opacity: .45; pointer-events: none; }
.montage-note { font-size: 12px; color: var(--ink-soft); margin: 8px 0 0 25px; }


.equip-grid {
  max-height: 360px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px 12px; background: var(--surface-2);
}
.equip-group { margin-top: 12px; }
.equip-group:first-child { margin-top: 8px; }
.equip-group-title {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-faint); margin: 0 0 4px;
}
.equip-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.equip-group .equip-row:last-child { border-bottom: none; }
.equip-row .eq-label { flex: 1; }
.equip-row .eq-pastille { width: 11px; height: 11px; border-radius: 3px; border: 1px solid var(--border); flex-shrink: 0; }
.equip-row .eq-price { font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; width: 66px; text-align: right; flex-shrink: 0; }
.equip-row .eq-qty {
  width: 54px; text-align: center; font-family: var(--font); font-size: 12.5px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 2px; flex-shrink: 0;
}
.equip-row .eq-qty.trop { border-color: var(--danger); color: var(--danger); }
.equip-note { font-size: 11px; color: var(--ink-faint); margin-top: 8px; }

/* ── Sommaire ────────────────────────────────────────────────────── */
/* Plus de collant : en colonne unique, le sommaire est la conclusion de
   la page, lue une fois les choix faits. C'est la barre de total qui
   assure la visibilité permanente du chiffre. */
.summary-card { position: static; }
.room-title { font-size: 16px; font-weight: 800; margin: 16px 22px 0; }
.room-sub { font-size: 12px; color: var(--ink-soft); margin: 2px 22px 0; }

table.price { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 4px; }
table.price td { padding: 6px 0; font-variant-numeric: tabular-nums; }
table.price td.lbl { color: var(--ink-soft); }
table.price td.val { text-align: right; font-weight: 600; }
/* La promotion est un cadeau du Centre : elle doit se lire comme tel, pas
   comme une ligne comptable de plus. Même vert que « date libre ». */
table.price tr.promo td { color: var(--ok); font-weight: 700; }
table.price tr.promo td.lbl { color: var(--ok); }

table.price tr.sub td { border-top: 1px solid var(--border); padding-top: 10px; }
table.price tr.total td { border-top: 2px solid var(--ink); padding-top: 12px; font-size: 20px; font-weight: 800; }
table.price tr.total td.lbl { font-size: 13px; font-weight: 700; color: var(--ink); }

.avis { font-size: 11px; color: var(--ink-faint); margin: 14px 0 0; }

.action-erreur {
  font-size: 12.5px; font-weight: 600; color: var(--danger); background: var(--danger-soft);
  border-radius: var(--radius-sm); padding: 10px 12px; margin: 14px 0 0;
}

.action-ok {
  font-size: 12.5px; font-weight: 600; color: var(--ok); background: var(--ok-soft);
  border-radius: var(--radius-sm); padding: 10px 12px; margin: 14px 0 0;
}

/* Les coordonnées du client : facultatives pour imprimer, obligatoires
   pour envoyer la demande. */
.coordonnees { border: none; margin: 16px 0 0; padding: 0; min-width: 0; }
.coordonnees legend.flabel { padding: 0; margin-bottom: 8px; }
.coordonnees .field-row { margin-bottom: 10px; }

/* Piège à robots : hors de l'écran plutôt que display:none, que certains
   robots reconnaissent et évitent. Un humain ne le voit ni ne l'atteint
   au clavier (tabindex -1). */
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lien-courriel { font-size: 12.5px; text-align: center; color: var(--accent); }

.equip-summary { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.equip-summary:empty { display: none; margin: 0; padding: 0; border: none; }
.equip-summary-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin: 0 0 8px; }
.equip-summary-list { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.equip-summary-list li { padding: 3px 0; }
.equip-summary-list li b { font-variant-numeric: tabular-nums; margin-right: 6px; color: var(--accent-strong); }

.cta-row { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.btn {
  font-family: var(--font); font-size: 13.5px; font-weight: 700; padding: 11px 14px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--accent); cursor: pointer;
  text-align: center; text-decoration: none; display: block; width: 100%;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }

/* Créneau déjà réservé (confirmé) : imprimer ou envoyer une demande n'a
   plus de sens tant que le client n'a pas changé d'horaire, de date ou
   de salle. */
.btn:disabled, .btn.disabled {
  opacity: .5; cursor: not-allowed; pointer-events: none;
  background: var(--surface-2); color: var(--ink-faint); border-color: var(--border);
}

/* ── Barre de total ──────────────────────────────────────────────── */
.barre-total {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px -12px rgba(19,35,48,.28);
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
}
.bt-inner {
  max-width: 820px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.bt-gauche { display: flex; flex-direction: column; min-width: 0; }
.bt-salle { font-size: 13.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-detail { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-droite { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.bt-etiq { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.bt-total { font-size: 22px; font-weight: 800; color: var(--accent-strong); font-variant-numeric: tabular-nums; line-height: 1.15; }

/* ── Pied de page ────────────────────────────────────────────────── */
.pied {
  margin-top: 22px; text-align: center;
  font-size: 11px; color: var(--site-ink-faint);
}

/* ── Impression ──────────────────────────────────────────────────────
   Le bouton « Imprimer / enregistrer en PDF » n'imprime pas cette page : il
   charge le gabarit officiel dans le cadre #gabarit (assets/gabarit.js) et
   imprime celui-ci. Les règles ci-dessous ne servent que si le visiteur
   imprime la page elle-même (Ctrl+P, menu du navigateur). */

.gabarit {
  position: fixed; right: 0; bottom: 0; width: 0; height: 0;
  border: 0; opacity: 0; pointer-events: none;
}

@media print {
  /* L'Estimateur vit inséré dans une page du site (shortcode WordPress) :
     sans isolement, l'impression sort aussi l'en-tête, le fil d'Ariane et
     le pied de page du site. Technique classique : tout masquer, puis ne
     rendre visible que .wrap (racine commune à la page autonome et au
     shortcode), sorti du flux pour ignorer sa position d'origine. */
  body * { visibility: hidden; }
  .wrap, .wrap * { visibility: visible; }
  .wrap {
    position: absolute; top: 0; left: 0; width: 100%;
    max-width: none; margin: 0; padding: 0;
  }

  .cta-row, .cal, .src-chip, .note, .tl-hint, .barre-total, .top, .gabarit { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
  .grid { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .section, .room-btn, .price, .equip-summary { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
