/* Booking request page and confirmation page.
   Loaded after style.css: reuses its variables (palette from the charte graphique).
   Text pairs used here: brun on creme 7.32, vert-de-gris on creme 6.18, brun on sauge 5.08,
   creme on brun 7.32, creme on vert-de-gris 6.18. Orange is never used for text. */

[hidden] { display: none !important; }

html { scroll-padding-top: 84px; scroll-padding-bottom: 24px; }

.nav a[aria-current="page"] { background: color-mix(in srgb, var(--vert-de-gris) 12%, transparent); }

/* ---------- Page header ---------- */

.res-head { max-width: var(--max); margin: 0 auto; padding: clamp(36px, 6vw, 72px) var(--gutter) 28px; }
.res-head h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); color: var(--brun); }
.res-head .intro { margin: 18px 0 0; }

.res-layout {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 72px;
  display: grid; gap: 32px; align-items: start;
  grid-template-columns: minmax(0, 1fr) 360px;
}
.res-form, .side { min-width: 0; }

/* ---------- Steps ---------- */

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.step {
  margin: 0 0 18px; padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, white 40%, var(--creme));
}
.step > legend {
  display: flex; align-items: center; gap: 12px; padding: 0 8px; margin-left: -8px;
  font-family: var(--police-titre); font-weight: 900; font-size: 1.6rem; line-height: 1.1;
  font-variation-settings: "opsz" 48; color: var(--brun);
}
.step-n {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 12px 12px 12px 4px;
  background: var(--vert-de-gris); color: var(--creme);
  font-family: var(--police-sous-titre); font-weight: 700; font-size: 1rem;
}
.step > legend + * { margin-top: 14px; }

.sub { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.question { margin: 18px 0 0; }
.question > legend { font-weight: 700; padding: 0; margin-bottom: 10px; color: var(--brun); }

.note { font-size: 1rem; color: var(--ink-soft); margin: 12px 0 0; }
.note a { color: var(--brun); }

/* ---------- Controls ---------- */

.field { display: grid; gap: 6px; margin: 0 0 14px; min-width: 0; }
.field label { font-weight: 700; font-size: 1rem; color: var(--brun); }
.field-row { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.field-short { max-width: 14rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="time"], input[type="number"], select, textarea {
  width: 100%; min-height: 46px; padding: 9px 12px;
  font: inherit; font-size: 1.05rem; color: var(--brun);
  background: color-mix(in srgb, white 70%, var(--creme));
  border: 2px solid var(--vert-de-gris); border-radius: 12px;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible,
a:focus-visible, summary:focus-visible, .space:focus-visible {
  outline: 3px solid var(--brun); outline-offset: 2px;
}
[aria-invalid="true"] { border-color: var(--brun) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 45%, transparent); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 16px;
  border: 2px solid var(--vert-de-gris); border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, white 55%, var(--creme)); color: var(--brun); font-weight: 700;
}
.choice:hover, .choice.is-hover { background: var(--sauge); }
.choice:has(input:checked) { background: var(--vert-de-gris); color: var(--creme); }
.choice:has(input:focus-visible) { outline: 3px solid var(--brun); outline-offset: 2px; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--brun); flex: none; }
.choice:has(input:checked) input { accent-color: var(--creme); }
.choice-inline { margin: 0 0 16px; }
.choice-meta { font-weight: 400; opacity: 0.9; }

.space-options {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.space-options .choice { display: flex; border-radius: 16px; width: 100%; }
.space-options .choice-meta { margin-left: auto; }

.date-row { margin-bottom: 8px; }
.date-control { display: flex; gap: 8px; align-items: center; }
.date-control input { max-width: 16rem; }
.btn-small {
  min-height: 44px; padding: 8px 16px; margin: 0 0 14px; cursor: pointer;
  font-family: var(--police-sous-titre); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em;
  color: var(--brun); background: transparent; border: 2px solid var(--brun); border-radius: 999px;
}
.btn-small:hover { background: var(--sauge); }

.btn-submit { cursor: pointer; font-size: 1rem; }
.btn-submit:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }

/* Honeypot: off-screen, not display:none, so bots still fill it. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.errors {
  margin: 0 0 18px; padding: 16px 20px; border-radius: var(--radius);
  border: 2px solid var(--brun); background: color-mix(in srgb, var(--orange) 14%, var(--creme)); color: var(--brun);
}
.errors p { margin: 0 0 8px; font-weight: 700; }
.errors ul { margin: 0; padding-left: 1.2em; }
.errors a { color: var(--brun); }

/* ---------- Le Pêle box ---------- */

.pele-box {
  margin-top: 18px; padding: 18px 20px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--orange) 14%, var(--creme)); border: 2px solid var(--orange); color: var(--brun);
}
.pele-box p { margin: 0 0 12px; font-weight: 700; }

/* ---------- Floor plan ---------- */

.plan-wrap { position: relative; margin-top: 16px; }
.plan-svg { width: 100%; height: auto; overflow: visible; }

.space { stroke: var(--brun); stroke-width: 2; stroke-linejoin: round; transition: fill 0.15s ease; }
.space-bookable { fill: color-mix(in srgb, var(--orange) 14%, var(--creme)); cursor: pointer; }
.space-bookable:hover, .space-bookable.is-hover { fill: var(--sauge); stroke-width: 3; }
.space-bookable.is-selected { fill: var(--vert-de-gris); stroke-width: 3; }
.space-bookable.is-selected:hover, .space-bookable.is-selected.is-hover { fill: color-mix(in srgb, var(--vert-de-gris) 80%, var(--brun)); }
.space-common {
  fill: color-mix(in srgb, var(--vert-de-gris) 9%, var(--creme));
  stroke: var(--vert-de-gris); stroke-width: 1.5; stroke-dasharray: 6 4; cursor: not-allowed;
}
.space-common:focus-visible, #communs:focus-visible .space { stroke: var(--brun); stroke-width: 3; }
#communs:focus-visible { outline: 3px solid var(--brun); outline-offset: 2px; }
.plan-wall { stroke: var(--brun); stroke-width: 4; stroke-linejoin: round; pointer-events: none; }
.plan-label {
  font-family: var(--police-sous-titre); font-weight: 700; font-size: 17px; fill: var(--brun);
  pointer-events: none; user-select: none;
}
#salle-de-reunion-label { font-size: 14px; }
#salle-visio-label { font-size: 11px; }
.plan-label.is-selected { fill: var(--creme); }
#salle-chill-label, #communs-label { fill: var(--vert-de-gris); }
/* Garden: sauge tint from the charte, dashed edge like the other common spaces. */
#jardin { fill: url(#jardin-fade); stroke: none; }
#jardin:focus-visible { stroke: var(--brun); stroke-width: 3; }
#jardin-label { fill: var(--brun); font-size: 26px; }

.plan-tip {
  position: absolute; z-index: 5; max-width: 16rem; padding: 6px 12px; border-radius: 12px;
  background: var(--brun); color: var(--creme); font-size: 0.95rem; line-height: 1.3; pointer-events: none;
}

@media (max-width: 640px) {
  /* The plan is too small to carry its labels: the list below and the tooltip name each room. */
  .plan-label { display: none; }
  /* The lawn is large enough to carry its label even on a small screen. */
  #jardin-label { display: block; font-size: 34px; }
}

/* ---------- Side column: rules and estimate ---------- */

.side { position: sticky; top: 88px; display: grid; gap: 16px; max-height: calc(100vh - 100px); overflow-y: auto; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rules li {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--vert-de-gris);
  color: var(--vert-de-gris); font-weight: 700; font-size: 0.95rem; line-height: 1.3;
}
.rules li:nth-child(even) { border-color: var(--orange); color: var(--brun); }

.estimate { background: var(--vert-de-gris); color: var(--creme); border-radius: var(--radius); }
.estimate summary { display: none; }
.estimate-body { padding: 22px; }
.estimate-h { font-size: 1.5rem; color: var(--creme); margin-bottom: 14px; }
.estimate-lines { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.estimate-lines li { display: flex; justify-content: space-between; gap: 16px; font-size: 1rem; line-height: 1.3; }
.estimate-lines li span:last-child { white-space: nowrap; font-weight: 700; }
.estimate-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0 0 12px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--creme) 35%, transparent);
  font-family: var(--police-titre); font-weight: 900; font-size: 1.9rem; line-height: 1;
}
.estimate-reason, .estimate-review, .estimate-prompt { margin: 0 0 10px; font-size: 1rem; line-height: 1.4; }
.estimate-review { font-weight: 700; }
.estimate-fixed { margin: 14px 0 0; font-size: 0.95rem; line-height: 1.4; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--creme) 35%, transparent); }
.estimate a { color: var(--creme); font-weight: 700; }
.estimate a:focus-visible { outline-color: var(--creme); }

/* ---------- Narrow screens: estimate stays at the bottom of the screen ---------- */

@media (max-width: 959px) {
  .res-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; overflow: visible; }
  html { scroll-padding-bottom: 110px; }
  .js .estimate {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px -12px color-mix(in srgb, var(--brun) 60%, transparent);
  }
  .js .estimate summary {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    min-height: 56px; padding: 8px var(--gutter); cursor: pointer; list-style: none;
    font-family: var(--police-sous-titre); font-weight: 700; font-size: 0.95rem;
  }
  .js .estimate summary::-webkit-details-marker { display: none; }
  .js .estimate summary:focus-visible { outline-color: var(--creme); outline-offset: -4px; }
  .js .estimate-sum-total { font-family: var(--police-titre); font-size: 1.25rem; text-align: right; }
  .js .estimate-body { padding: 4px var(--gutter) 18px; max-height: 50vh; overflow-y: auto; }
  .js .estimate-h { display: none; }
  .js .page-reserver .footer { padding-bottom: 110px; }
}

/* ---------- Confirmation page ---------- */

.done { max-width: 46rem; margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) 96px; }
.done h1 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--brun); margin-bottom: 20px; }
.done .intro { margin-bottom: 32px; }
.recap { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: color-mix(in srgb, white 40%, var(--creme)); margin-bottom: 28px; }
.recap h2 { font-size: 1.5rem; color: var(--brun); margin-bottom: 14px; }
.recap dl { margin: 0 0 18px; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.recap dt { font-weight: 700; color: var(--vert-de-gris); }
.recap dd { margin: 0; overflow-wrap: anywhere; }
.recap .estimate-lines li span:last-child { color: var(--brun); }
.recap .estimate-total { color: var(--brun); border-top-color: var(--line); }
.recap .estimate-reason, .recap .estimate-review { color: var(--ink-soft); }
.recap .estimate-fixed { border-top-color: var(--line); color: var(--ink-soft); }
@media (max-width: 480px) {
  .recap dl { grid-template-columns: 1fr; gap: 0; }
  .recap dd { margin-bottom: 8px; }
}

/* ---------- Legal notice page: one readable column ---------- */

.legal-page { max-width: 68ch; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) 96px; }
.legal-page h1 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--brun); margin-bottom: 28px; }
.legal-page h3 { color: var(--brun); margin: 32px 0 10px; }
.legal-page p, .legal-page li { color: var(--ink-soft); font-size: 1.05rem; }
.legal-page ul { margin: 0 0 1em; padding-left: 1.2em; }
.legal-page li { margin-bottom: 4px; }
.legal-page a { color: var(--brun); text-decoration-color: var(--orange); text-decoration-thickness: 2px; }

/* ---------- Adhérer (adherer.html) ---------- */

.adhesion { max-width: 56rem; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) 96px; }
.adhesion h1 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--brun); margin-bottom: 20px; }
.adhesion .intro { margin-bottom: 32px; }
.adhesion-widget {
  padding: clamp(8px, 2vw, 20px); border-radius: var(--radius); border: 1px solid var(--line);
  background: color-mix(in srgb, white 40%, var(--creme));
}
.adhesion-widget iframe { display: block; min-height: 750px; }
.adhesion-fallback, .adhesion-note { color: var(--ink-soft); font-size: 1rem; margin: 16px 0 0; }
.adhesion-fallback a, .adhesion-note a { color: var(--brun); text-decoration-color: var(--orange); text-decoration-thickness: 2px; }
