/* =====================================================================
   CRLA Services – Réservation nettoyage – styles du widget
   Toutes les règles sont préfixées par .crla-booking pour ne pas
   interférer avec le thème crla-theme-master.
   ===================================================================== */

.crla-booking {
  --crla-red: #ef4042;
  --crla-red-dark: #df1215;
  --crla-red-light: #f26667;
  --crla-blue: #0E9BD7;
  --crla-blue-dark: #0b7cac;
  --crla-grey: #757575;
  --crla-grey-mid: #8c93a3;
  --crla-light: #F5F5F8;
  --crla-lighter: #F4F5FF;
  --crla-black: #000;
  --crla-white: #fff;
  --crla-green: #1f9d55;
  --crla-shadow: 0 0 15px -6px rgba(0, 0, 0, .5);
  --crla-shadow-strong: 0 0 20px -6px rgba(0, 0, 0, .75);
  --crla-radius: 8px;
  --crla-font: 'Exo', sans-serif;

  font-family: var(--crla-font);
  color: var(--crla-black);
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
  text-align: left;
  container-type: inline-size;   /* la mise en page s'adapte à la largeur du widget (page entière ou onglet) */
}
.crla-booking *, .crla-booking *::before, .crla-booking *::after { box-sizing: inherit; }
.crla-booking button { font-family: inherit; }
.crla-booking .crla-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---- Layout ------------------------------------------------------- */
.crla-booking__layout { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
@container (min-width: 900px) {
  .crla-booking__layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
  .crla-booking__aside { position: sticky; top: 80px; }
}

/* ---- Stepper ------------------------------------------------------ */
.crla-booking .crla-steps { display: flex; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; }
.crla-booking .crla-steps li {
  flex: 1 1 0; display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 12px; border-radius: var(--crla-radius);
  background: var(--crla-light); color: var(--crla-grey); font-weight: 600; font-size: 14px;
  box-shadow: var(--crla-shadow);
}
.crla-booking .crla-steps__num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  background: var(--crla-white); color: var(--crla-grey);
}
.crla-booking .crla-steps__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crla-booking .crla-steps li.is-active { background: var(--crla-black); color: var(--crla-white); }
.crla-booking .crla-steps li.is-active .crla-steps__num { background: var(--crla-red); color: var(--crla-white); }
.crla-booking .crla-steps li.is-done { color: var(--crla-black); }
.crla-booking .crla-steps li.is-done .crla-steps__num { background: var(--crla-green); color: var(--crla-white); }
@container (max-width: 560px) {
  .crla-booking .crla-steps { gap: 4px; }
  .crla-booking .crla-steps li { padding: 8px; justify-content: center; }
  .crla-booking .crla-steps li:not(.is-active) .crla-steps__label { display: none; }
}

/* ---- Step panels -------------------------------------------------- */
.crla-booking .crla-step[hidden] { display: none !important; }
.crla-booking .crla-step__title { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.crla-booking .crla-step__intro { margin: 0 0 20px; color: var(--crla-grey); }
.crla-booking .crla-group { margin: 0 0 26px; }
.crla-booking .crla-group__title {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--crla-grey); margin: 0 0 10px;
}

/* ---- Cards (formules, véhicules) --------------------------------- */
.crla-booking .crla-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.crla-booking .crla-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--crla-light); border-radius: var(--crla-radius); box-shadow: var(--crla-shadow);
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.crla-booking .crla-card:hover { border-color: var(--crla-grey-mid); }
.crla-booking .crla-card.is-selected { background: var(--crla-black); color: var(--crla-white); border-color: var(--crla-black); }
.crla-booking .crla-card__main { display: block; padding: 16px 16px 10px; cursor: pointer; flex: 1 1 auto; }
.crla-booking .crla-card__main input { position: absolute; opacity: 0; width: 0; height: 0; }
.crla-booking .crla-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.crla-booking .crla-card__name { font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; }
.crla-booking .crla-card__emoji { font-size: 20px; margin-right: 6px; }
.crla-booking .crla-card__check {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--crla-grey-mid);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: transparent;
  background: var(--crla-white);
}
.crla-booking .crla-card.is-selected .crla-card__check { background: var(--crla-red); border-color: var(--crla-red); color: var(--crla-white); }
.crla-booking .crla-card__duration {
  display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px;
  background: var(--crla-white); color: var(--crla-grey); font-size: 13px; font-weight: 600;
}
.crla-booking .crla-card.is-selected .crla-card__duration { background: rgba(255,255,255,.14); color: var(--crla-white); }
.crla-booking .crla-card__prices { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.crla-booking .crla-card__price {
  flex: 1 1 0; text-align: center; padding: 6px 4px; border-radius: 6px;
  background: var(--crla-white); font-size: 13px; line-height: 1.2;
}
.crla-booking .crla-card__price b { display: block; font-size: 16px; color: var(--crla-red); }
.crla-booking .crla-card.is-selected .crla-card__price { background: rgba(255,255,255,.12); }
.crla-booking .crla-card.is-selected .crla-card__price b { color: var(--crla-white); }
.crla-booking .crla-card__price.is-current { outline: 2px solid var(--crla-red); }
.crla-booking .crla-card__desc { margin-top: 8px; font-size: 14px; color: var(--crla-grey); }
.crla-booking .crla-card.is-selected .crla-card__desc { color: rgba(255,255,255,.8); }
.crla-booking .crla-card__toggle {
  margin: 0 16px 12px; align-self: flex-start; background: none; border: 0; padding: 0;
  color: var(--crla-blue); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: underline;
}
.crla-booking .crla-card.is-selected .crla-card__toggle { color: #8ed1fc; }
.crla-booking .crla-card__items { margin: 0 16px 14px; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.crla-booking .crla-card__items[hidden] { display: none; }
.crla-booking .crla-card__items li { margin: 2px 0; }

/* focus clavier visible sur les cartes (les cases/radios sont invisibles) */
.crla-booking .crla-card:focus-within { outline: 3px solid var(--crla-red); outline-offset: 2px; }
.crla-booking .crla-card.is-selected:focus-within { outline-color: var(--crla-blue); }

/* véhicule */
.crla-booking .crla-card--vehicle .crla-card__main { padding-bottom: 16px; }
.crla-booking .crla-card__letter {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: var(--crla-radius); background: var(--crla-red); color: var(--crla-white);
  font-weight: 700; font-size: 20px; margin-bottom: 10px;
}
.crla-booking .crla-card.is-selected .crla-card__letter { background: var(--crla-white); color: var(--crla-black); }

/* supplément */
.crla-booking .crla-supp { display: flex; flex-direction: column; gap: 10px; }
.crla-booking .crla-supp label {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer;
  background: var(--crla-light); border-radius: var(--crla-radius); box-shadow: var(--crla-shadow);
  border: 2px solid transparent;
}
.crla-booking .crla-supp label.is-selected { border-color: var(--crla-black); }
.crla-booking .crla-supp input { width: 20px; height: 20px; accent-color: var(--crla-red); margin: 0; }
.crla-booking .crla-supp .crla-supp__price { margin-left: auto; font-weight: 700; color: var(--crla-red); white-space: nowrap; }

/* ---- Form fields -------------------------------------------------- */
.crla-booking .crla-fields { display: grid; gap: 18px; grid-template-columns: 1fr; }
@container (min-width: 560px) { .crla-fields--2 { grid-template-columns: 1fr 1fr; } }
.crla-booking .crla-field { display: flex; flex-direction: column; gap: 4px; }
.crla-booking .crla-field label { font-size: 14px; font-weight: 600; color: var(--crla-grey); }
.crla-booking .crla-field input, .crla-booking .crla-field textarea, .crla-booking .crla-field select {
  font-family: var(--crla-font); font-size: 18px; color: var(--crla-black);
  background: var(--crla-white); border: 0; border-bottom: 1px solid var(--crla-grey);
  border-radius: 0; padding: 12px 4px; height: 50px; width: 100%; outline: none;
}
.crla-booking .crla-field textarea { height: auto; min-height: 96px; resize: vertical; }
.crla-booking .crla-field input:focus, .crla-booking .crla-field textarea:focus { border-bottom: 2px solid var(--crla-red); }
.crla-booking .crla-field.is-invalid input, .crla-booking .crla-field.is-invalid textarea { border-bottom: 2px solid var(--crla-red); background: #fff5f5; }
.crla-booking .crla-field--full { grid-column: 1 / -1; }
/* neutralise les styles globaux du thème sur les champs (marges, ombres, largeur max) */
.crla-booking .crla-field input, .crla-booking .crla-field textarea, .crla-booking .crla-field select { margin: 0; max-width: none; box-shadow: none; transition: none; }
.crla-booking .crla-field input:hover, .crla-booking .crla-field input:focus, .crla-booking .crla-field textarea:hover, .crla-booking .crla-field textarea:focus { box-shadow: none; }
.crla-booking .crla-supp input:not(:disabled), .crla-booking .crla-consent input:not(:disabled) {
  appearance: auto; -webkit-appearance: checkbox; padding: 0; margin: 0; border: 0; max-width: none; box-shadow: none;
  background: transparent; width: 20px; height: 20px; accent-color: var(--crla-red);
}
.crla-booking .crla-consent { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; font-size: 15px; cursor: pointer; }
.crla-booking .crla-consent input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--crla-red); }
.crla-booking .crla-consent.is-invalid { color: var(--crla-red); }
.crla-booking .crla-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ---- Calendar ----------------------------------------------------- */
.crla-booking .crla-datetime { display: grid; gap: 24px; grid-template-columns: 1fr; }
@container (min-width: 700px) { .crla-datetime { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.crla-booking .crla-cal { background: var(--crla-light); border-radius: var(--crla-radius); box-shadow: var(--crla-shadow); padding: 14px; }
.crla-booking .crla-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.crla-booking .crla-cal__month { font-weight: 700; font-size: 17px; text-transform: capitalize; }
.crla-booking .crla-cal__nav {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--crla-white);
  box-shadow: var(--crla-shadow); cursor: pointer; font-size: 18px; line-height: 1; color: var(--crla-black);
}
.crla-booking .crla-cal__nav:disabled { opacity: .35; cursor: default; }
.crla-booking .crla-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.crla-booking .crla-cal__wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--crla-grey); text-transform: uppercase; padding: 4px 0; }
.crla-booking .crla-cal__day {
  aspect-ratio: 1 / 1; min-height: 38px; border-radius: 6px; border: 0; font-size: 15px; font-weight: 600;
  background: var(--crla-white); color: var(--crla-black); cursor: pointer; position: relative;
}
.crla-booking .crla-cal__day:hover:not(:disabled) { outline: 2px solid var(--crla-red); }
.crla-booking .crla-cal__day:disabled { background: transparent; color: #b9bcc6; cursor: default; font-weight: 400; }
.crla-booking .crla-cal__day.is-other { visibility: hidden; }
.crla-booking .crla-cal__day.is-full:disabled { color: #b9bcc6; text-decoration: line-through; }
.crla-booking .crla-cal__day.is-selected { background: var(--crla-black); color: var(--crla-white); }
.crla-booking .crla-cal__day.is-today::after {
  content: ''; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--crla-red);
}
.crla-booking .crla-cal__legend { margin-top: 10px; font-size: 13px; color: var(--crla-grey); }

.crla-booking .crla-slots__title { font-weight: 700; margin: 0 0 10px; }
.crla-booking .crla-slots__date { color: var(--crla-grey); font-size: 14px; margin: -6px 0 12px; text-transform: capitalize; }
.crla-booking .crla-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crla-booking .crla-slot {
  padding: 16px 10px; border-radius: var(--crla-radius); border: 2px solid transparent; cursor: pointer;
  background: var(--crla-light); box-shadow: var(--crla-shadow); font-weight: 700; font-size: 18px; color: var(--crla-black);
}
.crla-booking .crla-slot:hover:not(:disabled) { border-color: var(--crla-grey-mid); }
.crla-booking .crla-slot.is-selected { background: var(--crla-black); color: var(--crla-white); }
.crla-booking .crla-slot:disabled { background: transparent; box-shadow: none; border: 1px dashed #c8cbd4; color: #b9bcc6; cursor: default; }
.crla-booking .crla-slot small { display: block; font-size: 12px; font-weight: 600; color: var(--crla-grey); }
.crla-booking .crla-slot.is-selected small { color: rgba(255,255,255,.75); }
.crla-booking .crla-slots__hint { margin-top: 12px; font-size: 14px; color: var(--crla-grey); }

/* ---- Summary (aside) ---------------------------------------------- */
.crla-booking .crla-summary {
  background: var(--crla-light); border-radius: var(--crla-radius); box-shadow: var(--crla-shadow); padding: 20px;
}
.crla-booking .crla-summary__title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--crla-grey); margin: 0 0 12px; }
.crla-booking .crla-summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e3e5ee; font-size: 15px; }
.crla-booking .crla-summary__row:last-of-type { border-bottom: 0; }
.crla-booking .crla-summary__row dt { color: var(--crla-grey); margin: 0; flex: 0 0 auto; }
.crla-booking .crla-summary__row dd { margin: 0; text-align: right; font-weight: 600; }
.crla-booking .crla-summary__row dd.is-empty { color: #b9bcc6; font-weight: 400; }
.crla-booking .crla-summary__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--crla-black); }
.crla-booking .crla-summary__total span { font-weight: 700; }
.crla-booking .crla-summary__total strong { font-size: 28px; color: var(--crla-red); }
.crla-booking .crla-summary__note { margin: 12px 0 0; font-size: 13px; color: var(--crla-grey); }
.crla-booking .crla-summary dl { margin: 0; }

/* ---- Buttons & alerts --------------------------------------------- */
.crla-booking .crla-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.crla-booking .crla-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--crla-radius); border: 0; cursor: pointer;
  background: var(--crla-red); color: var(--crla-white); font-weight: 700; font-size: 17px;
  box-shadow: var(--crla-shadow-strong); text-decoration: none; transition: background .15s;
}
.crla-booking .crla-btn:hover { background: var(--crla-red-dark); }
.crla-booking .crla-btn:disabled { opacity: .55; cursor: wait; }
.crla-booking .crla-btn--secondary {
  background: var(--crla-light); color: var(--crla-grey); border: 2px solid var(--crla-white);
  font-size: 13px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 18px;
}
.crla-booking .crla-btn--secondary:hover { background: #e9eaf1; }
.crla-booking .crla-btn--link { background: none; box-shadow: none; color: var(--crla-blue); font-weight: 600; padding: 8px 4px; font-size: 15px; }
.crla-booking .crla-btn--link:hover { background: none; text-decoration: underline; }
.crla-booking .crla-alert {
  margin: 0 0 18px; padding: 12px 16px; border-radius: var(--crla-radius);
  background: #fdeaea; color: #a3171a; border-left: 4px solid var(--crla-red); font-size: 15px;
}
.crla-booking .crla-alert[hidden] { display: none; }
.crla-booking .crla-note { font-size: 14px; color: var(--crla-grey); font-style: italic; margin: 18px 0 0; }

/* ---- Confirmation ------------------------------------------------- */
.crla-booking .crla-done { text-align: center; padding: 10px 0 0; }
.crla-booking .crla-done__icon {
  width: 72px; height: 72px; border-radius: 50%; background: var(--crla-green); color: var(--crla-white);
  display: inline-flex; align-items: center; justify-content: center; font-size: 38px; margin-bottom: 16px;
}
.crla-booking .crla-done__title { font-size: 30px; font-weight: 700; margin: 0 0 6px; }
.crla-booking .crla-done__text { margin: 0 auto 22px; max-width: 560px; color: var(--crla-grey); }
.crla-booking .crla-done__box {
  text-align: left; max-width: 560px; margin: 0 auto 22px; background: var(--crla-light);
  border-radius: var(--crla-radius); box-shadow: var(--crla-shadow); padding: 18px 22px;
}
.crla-booking .crla-done__box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; }
.crla-booking .crla-done__box dt { color: var(--crla-grey); }
.crla-booking .crla-done__box dd { margin: 0; font-weight: 600; }
.crla-booking .crla-done__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---- Encart + liste repliée dans l'onglet "Nettoyage" (page d'accueil) ---- */
.crla-cta {
  display: flex; align-items: center; gap: 16px; margin: 18px 0 22px; padding: 16px 20px;
  background: #F5F5F8; border-left: 6px solid #ef4042; border-radius: 8px;
  box-shadow: 0 0 15px -6px rgba(0, 0, 0, .5); font-family: 'Exo', sans-serif; text-align: left;
}
.crla-cta__icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 8px; background: #ef4042; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.crla-cta strong { display: block; font-size: 18px; line-height: 1.3; color: #000; }
.crla-cta span { display: block; font-size: 14px; color: #757575; margin-top: 2px; }
.crla-static-toggle {
  margin: 30px 0 10px; background: none; border: 0; padding: 0; color: #0E9BD7; font-weight: 700;
  cursor: pointer; font-family: 'Exo', sans-serif; font-size: 15px; text-decoration: underline;
}
.crla-static-formules[hidden] { display: none !important; }

/* ---- Demo panel (prototype uniquement) ---------------------------- */
.crla-demo {
  margin-top: 36px; padding: 18px 20px; border-radius: var(--crla-radius);
  background: #fff8e1; border: 1px dashed #e0a800; text-align: left;
}
.crla-demo h3 { margin: 0 0 8px; font-size: 16px; }
.crla-demo p { margin: 0 0 10px; font-size: 14px; color: #6b5300; }
.crla-demo pre {
  margin: 0 0 14px; padding: 14px; background: var(--crla-white); border-radius: 6px;
  font: 13px/1.5 Consolas, 'Courier New', monospace; white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto;
}
