/* ============================================================
   Thème EasyAppointments « bulle » — rdv.bulle.info
   Déployer dans : ~/rdv/assets/css/themes/bulle.css
   (à redéposer après chaque mise à jour d'EasyAppointments,
    puis vérifier le réglage theme=bulle — voir CLAUDE.md §8)
   EasyAppointments 1.6.0 · markup Bootstrap 5 · iframe ~1200px
   ============================================================ */
@import url('default.min.css');

/* Police du site (fichiers dans themes/fonts/ — à redéployer avec le thème) */
@font-face{font-family:'Archivo'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/archivo-v25-latin-regular.woff2') format('woff2');}
@font-face{font-family:'Archivo'; font-style:normal; font-weight:500; font-display:swap;
  src:url('fonts/archivo-v25-latin-500.woff2') format('woff2');}
@font-face{font-family:'Archivo'; font-style:normal; font-weight:600; font-display:swap;
  src:url('fonts/archivo-v25-latin-600.woff2') format('woff2');}
@font-face{font-family:'Archivo'; font-style:normal; font-weight:700; font-display:swap;
  src:url('fonts/archivo-v25-latin-700.woff2') format('woff2');}
@font-face{font-family:'Archivo'; font-style:normal; font-weight:800; font-display:swap;
  src:url('fonts/archivo-v25-latin-800.woff2') format('woff2');}

@font-face{font-family:'IBM Plex Mono'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/ibm-plex-mono-v20-latin-regular.woff2') format('woff2');}
@font-face{font-family:'IBM Plex Mono'; font-style:normal; font-weight:500; font-display:swap;
  src:url('fonts/ibm-plex-mono-v20-latin-500.woff2') format('woff2');}
@font-face{font-family:'IBM Plex Mono'; font-style:normal; font-weight:600; font-display:swap;
  src:url('fonts/ibm-plex-mono-v20-latin-600.woff2') format('woff2');}

/* ---------- Variables bulle.info ---------- */
:root,
[data-bs-theme=light]{
  /* palette */
  --bulle-ink:#0d1f12;
  --bulle-green:#16923F;
  --bulle-green-vivid:#4FD11E;
  --bulle-green-dark:#0B5D27;
  --bulle-muted:#3a4a3a;
  --bulle-line:#d7e0d3;
  --bulle-sans:'Archivo', system-ui, sans-serif;
  --bulle-mono:'IBM Plex Mono', ui-monospace, monospace;

  /* surcharge Bootstrap */
  --bs-primary:#16923F;
  --bs-primary-rgb:22, 146, 63;
  --bs-link-color:#16923F;
  --bs-link-color-rgb:22, 146, 63;
  --bs-link-hover-color:#0B5D27;
  --bs-link-hover-color-rgb:11, 93, 39;
  --bs-body-font-family:var(--bulle-sans);
  --bs-body-color:#0d1f12;
  /* angles francs partout */
  --bs-border-radius:0;
  --bs-border-radius-sm:0;
  --bs-border-radius-lg:0;
  --bs-border-radius-xl:0;
  --bs-border-radius-pill:0;
}

body{
  font-family:var(--bulle-sans);
  color:var(--bulle-ink);
  background:#fff;
}

/* Footer E!A (Powered By + langue/admin) : masqué */
#frame-footer{display:none !important;}

/* ==========================================================================
   1. CADRE — un seul cadre porteur (extérieur). Le corps interne reste à plat.
   ========================================================================== */
#main,
.frame-container{
  font-family:var(--bulle-sans);
  color:var(--bulle-ink);
}
/* CADRE UNIQUE : porté par #main (englobe en-tête + corps). Bordure nette,
   sans grosse ombre décalée → plus de carte interne « flottante ». */
#main{
  border:4px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:#fff !important;
  overflow:hidden;              /* la barre verte épouse les angles du cadre */
}
/* Carte de contenu interne : À PLAT (ni bordure, ni ombre, ni marge) */
.frame-container{
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:#fff !important;
  margin:0 !important;
}

/* Corps de l'assistant : À PLAT (aucune 2ᵉ bordure/ombre → fini le double cadre) */
.wizard-frame,
#wizard-frame{
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:#fff !important;
  margin:0 !important;
  padding:36px 40px !important;
}

/* ==========================================================================
   2. EN-TÊTE (barre verte : logo + prestation + étapes)
   ========================================================================== */
#header{
  background:var(--bulle-green-vivid) !important;
  border-bottom:5px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  color:var(--bulle-ink) !important;
  box-shadow:none !important;
  padding:20px 26px !important;
}
#header,
#header *{ text-shadow:none !important; }

/* Nom de société + slogan/prestation */
#header #company-name,
#header .company-name{
  font-family:var(--bulle-sans) !important;
  font-weight:800 !important;
  letter-spacing:-.01em !important;
  color:var(--bulle-ink) !important;
  text-transform:uppercase;
}
#header #company-slogan,
#header .company-slogan,
#header .service-provider{
  font-family:var(--bulle-mono) !important;
  font-size:12px !important;
  font-weight:500 !important;
  color:var(--bulle-green-dark) !important;
  text-transform:none !important;
}
/* Logo : on masque la vignette turquoise d'E!A et on dessine la tuile
   sombre + calendrier vert de la proposition, devant le nom de société. */
#header #logo img,
#header .logo img,
#header img{ display:none !important; }

#header #company-name,
#header .company-name{
  display:inline-flex !important;
  align-items:center;
}
#header #company-name::before,
#header .company-name::before{
  content:"";
  display:inline-block;
  flex:0 0 auto;
  width:42px; height:42px;
  margin-right:14px;
  background-color:var(--bulle-ink);
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234FD11E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18'/%3e%3cpath d='M16 2v4M8 2v4M3 10h18'/%3e%3cpath d='m9 16 2 2 4-4'/%3e%3c/svg%3e");
  background-repeat:no-repeat;
  background-position:center;
  background-size:24px;
}

/* Badges d'étape 1-2-3-4 : carrés à bordure noire */
.book-step{
  border-radius:0 !important;
  border:2px solid var(--bulle-ink) !important;
  background:#fff !important;
  color:var(--bulle-ink) !important;
  font-family:var(--bulle-mono) !important;
  font-weight:800 !important;
  box-shadow:none !important;
}
.book-step:hover{ background:#fff !important; }
.book-step strong,
.book-step .num{
  color:inherit !important;
  font-family:var(--bulle-mono) !important;
  font-weight:800 !important;
}
/* Étape active : fond sombre, chiffre vert vif */
.book-step.active,
.book-step.active *{
  background:var(--bulle-ink) !important;
  color:var(--bulle-green-vivid) !important;
  border-color:var(--bulle-ink) !important;
}
.book-step.active{ background:var(--bulle-ink) !important; }

/* ==========================================================================
   3. TITRES & LABELS
   ========================================================================== */
.wizard-frame h1,
.wizard-frame h2,
.wizard-frame .frame-title,
#wizard-frame h2{
  font-family:var(--bulle-sans) !important;
  font-weight:800 !important;
  letter-spacing:-.02em !important;
  color:var(--bulle-ink) !important;
  text-align:center;
}
label,
.form-label{
  font-family:var(--bulle-mono) !important;
  font-weight:700 !important;
  font-size:12px !important;
  letter-spacing:.06em !important;
  text-transform:uppercase !important;
  color:var(--bulle-ink) !important;
}

/* ==========================================================================
   4. CHAMPS / SELECTS (Bootstrap 5 : .form-control / .form-select)
   ========================================================================== */
.form-control,
.form-select,
select,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
textarea,
#select-service,
#select-provider{
  font-family:var(--bulle-sans) !important;
  font-size:15px !important;
  font-weight:600 !important;
  color:var(--bulle-ink) !important;
  background-color:#fff !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:13px 15px !important;
  outline:none !important;
  transition:box-shadow .12s ease, border-color .12s ease;
}
/* chevron du select en vert */
.form-select,
#select-service,
#select-provider{
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2316923F' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat:no-repeat !important;
  background-position:right 15px center !important;
  background-size:15px !important;
  padding-right:44px !important;
}
.form-control:focus,
.form-select:focus,
select:focus,
input:focus,
textarea:focus{
  border-color:var(--bulle-green) !important;
  box-shadow:3px 3px 0 var(--bulle-green-vivid) !important;
}

/* Description prestation / durée : filet vert à gauche */
#service-description,
.service-description,
.provider-description{
  font-family:var(--bulle-sans) !important;
  font-size:13.5px !important;
  line-height:1.5 !important;
  color:var(--bulle-muted) !important;
  border-left:4px solid var(--bulle-green-vivid) !important;
  padding:4px 0 4px 16px !important;
  background:none !important;
  border-radius:0 !important;
}

/* ==========================================================================
   5. BOUTONS
   ========================================================================== */
/* Primaire (Suivant / Confirmer) : vert vif + bordure & ombre dures */
.btn-primary,
#button-next,
#book-appointment-submit{
  font-family:var(--bulle-mono) !important;
  font-weight:800 !important;
  font-size:15px !important;
  color:var(--bulle-ink) !important;
  background-color:var(--bulle-green-vivid) !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:5px 5px 0 var(--bulle-ink) !important;
  padding:14px 30px !important;
  text-transform:none !important;
  transition:transform .12s ease, box-shadow .12s ease !important;
}
.btn-primary:hover,
#button-next:hover,
#book-appointment-submit:hover{
  color:var(--bulle-ink) !important;
  background-color:var(--bulle-green-vivid) !important;
  border-color:var(--bulle-ink) !important;
  /* meme rollover que Retour (soulevement) — coherent avec le site */
  transform:translate(-2px,-2px) !important;
  box-shadow:7px 7px 0 var(--bulle-ink) !important;
}
.btn-primary:active,
#button-next:active,
#book-appointment-submit:active{
  transform:translate(0,0) !important;
  box-shadow:none !important;
}

/* Secondaire (Retour) : blanc, bordure noire, ombre dure */
.btn-secondary,
.btn-outline-secondary,
#button-back{
  font-family:var(--bulle-mono) !important;
  font-weight:800 !important;
  font-size:15px !important;
  color:var(--bulle-ink) !important;
  background-color:#fff !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:5px 5px 0 var(--bulle-ink) !important;
  padding:14px 30px !important;
  text-transform:none !important;
  transition:transform .12s ease, box-shadow .12s ease !important;
}
.btn-secondary:hover,
.btn-outline-secondary:hover,
#button-back:hover{
  color:var(--bulle-ink) !important;
  background-color:#fff !important;
  border-color:var(--bulle-ink) !important;
  transform:translate(-2px,-2px) !important;
  box-shadow:7px 7px 0 var(--bulle-ink) !important;
}
.btn-secondary:active,
#button-back:active{ transform:translate(0,0) !important; box-shadow:none !important; }

/* Bouton contour primaire (le cas échéant) */
.btn-outline-primary{
  color:var(--bulle-ink) !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  background:#fff !important;
}
.btn-outline-primary:hover{
  background:var(--bulle-green-vivid) !important;
  color:var(--bulle-ink) !important;
  border-color:var(--bulle-ink) !important;
}

/* ==========================================================================
   6. CALENDRIER (flatpickr) + CRÉNEAUX (étape 2)
   ========================================================================== */
.flatpickr-calendar{
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:none !important;
  font-family:var(--bulle-mono) !important;
}
.flatpickr-calendar::before,
.flatpickr-calendar::after{ display:none !important; } /* flèche par défaut supprimée */
.flatpickr-months,
.flatpickr-weekdays{
  background:var(--bulle-green-vivid) !important;
  color:var(--bulle-ink) !important;
  border-bottom:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
}
.flatpickr-month,
.flatpickr-current-month,
.flatpickr-weekday{
  color:var(--bulle-ink) !important;
  font-family:var(--bulle-mono) !important;
  font-weight:700 !important;
}
.flatpickr-day{
  border-radius:0 !important;
  color:var(--bulle-ink) !important;
  font-family:var(--bulle-mono) !important;
}
.flatpickr-day:hover{
  background:var(--bulle-green-vivid) !important;
  border-color:var(--bulle-ink) !important;
  border-radius:0 !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover{
  background:var(--bulle-ink) !important;
  color:var(--bulle-green-vivid) !important;
  border-color:var(--bulle-ink) !important;
  border-radius:0 !important;
}
.flatpickr-day.today{ border-color:var(--bulle-green) !important; }
.flatpickr-day.flatpickr-disabled{ color:var(--bulle-line) !important; }

/* Créneaux horaires disponibles */
.available-hour{
  font-family:var(--bulle-mono) !important;
  font-weight:700 !important;
  border:2px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  background:#fff !important;
  color:var(--bulle-ink) !important;
  box-shadow:none !important;
  transition:transform .1s ease, box-shadow .1s ease;
}
.available-hour:hover{
  background:var(--bulle-green-vivid) !important;
  color:var(--bulle-ink) !important;
  transform:translate(-1px,-1px);
  box-shadow:2px 2px 0 var(--bulle-ink) !important;
}
.available-hour.selected-hour,
.available-hour.selected,
.available-hour.active,
.available-hour[aria-selected="true"],
.available-hour.btn-primary{
  background:var(--bulle-ink) !important;
  color:var(--bulle-green-vivid) !important;
  border-color:var(--bulle-ink) !important;
}

/* ---- 6.1 Étape 2 : créneaux en GRILLE, sans scroll interne (mémo 08/07) ----
   Le conteneur E!A porte max-height:250px en style inline + overflow-auto →
   double ascenseur. Le !important ci-dessous écrase le style inline.
   ~13 créneaux tiennent à côté du calendrier : plus AUCUN ascenseur. */
#available-hours{
  display:grid !important;
  grid-template-columns:repeat(3,1fr) !important;
  gap:10px !important;
  max-height:none !important;
  overflow:visible !important;
  padding-right:0 !important;
}
#available-hours .available-hour{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:44px !important; /* cible tactile */
  margin:0 !important;
  width:auto !important;
}
@media (max-width:991px){
  #available-hours{ grid-template-columns:repeat(2,1fr) !important; }
}

/* Jour sélectionné : remplit EXACTEMENT sa cellule (même taille que les autres),
   chiffre vert vif — l'emphase vient du contraste, pas de la taille (mémo 08/07). */
.flatpickr-day.selected,
.flatpickr-day.selected:hover{
  transform:none !important;
  box-shadow:none !important;
  margin:0 !important;
  padding:0 !important;
  max-width:39px !important;
  height:39px !important;
  line-height:39px !important;
  font-size:inherit !important;
  border-width:1px !important;
}

/* ==========================================================================
   7. ÉTAPE 4 — récapitulatif
   ========================================================================== */
#appointment-details,
#customer-details,
.confirm-details{
  font-family:var(--bulle-sans) !important;
  color:var(--bulle-ink) !important;
  border-radius:0 !important;
}
#appointment-details h3,
#customer-details h3,
.confirm-details h3{
  font-family:var(--bulle-sans) !important;
  font-weight:800 !important;
  letter-spacing:-.01em !important;
  color:var(--bulle-ink) !important;
}
#appointment-details td,
#customer-details td{ font-family:var(--bulle-sans) !important; }

/* ==========================================================================
   8. DIVERS — cases, alertes, liens
   ========================================================================== */
.form-check-input{
  border:2px solid var(--bulle-ink) !important;
  border-radius:0 !important;
}
.form-check-input:checked{
  background-color:var(--bulle-green) !important;
  border-color:var(--bulle-ink) !important;
}
input[type="checkbox"],
input[type="radio"]{ accent-color:var(--bulle-green) !important; }

.alert{
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:4px 4px 0 var(--bulle-green-vivid) !important;
  font-family:var(--bulle-sans) !important;
}
.alert-success{ background:#f3fbef !important; color:var(--bulle-ink) !important; }
.alert-danger{ background:#fff2ef !important; color:var(--bulle-ink) !important; }

#main a,
.frame-container a{ color:var(--bulle-green) !important; font-weight:700; }
#main a:hover,
.frame-container a:hover{ color:var(--bulle-green-dark) !important; }

/* ==========================================================================
   9. CORRECTIFS v3 — calendrier simplifié, boutons, page finale
   ========================================================================== */

/* ---- 9.1 Calendrier flatpickr : en-tête sur UNE ligne, mois/année à plat ----
   Le style générique des <select>/<input> boxait le mois et l'année ; on les
   remet en texte simple sur la barre verte, alignés sur une seule ligne. */
.flatpickr-months{
  display:flex !important;
  align-items:center !important;
  height:auto !important;
  padding:10px 12px !important;
  background:var(--bulle-green-vivid) !important;
  border-bottom:3px solid var(--bulle-ink) !important;
}
.flatpickr-month{
  height:auto !important;
  display:flex !important;
  align-items:center !important;
}
.flatpickr-current-month{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  height:auto !important;
  padding:0 !important;
  font-size:15px !important;
  line-height:1 !important;
  position:static !important;
  width:auto !important;
  left:auto !important;
}
/* Mois (select) + année (input) : à plat, texte mono foncé, pas de cadre */
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper,
.flatpickr-current-month input.cur-year{
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  padding:0 !important;
  margin:0 !important;
  height:auto !important;
  width:auto !important;
  font-family:var(--bulle-mono) !important;
  font-weight:700 !important;
  font-size:15px !important;
  color:var(--bulle-ink) !important;
  -webkit-appearance:none !important;
  appearance:none !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months{ background-image:none !important; padding-right:0 !important; }
.flatpickr-current-month .numInputWrapper span{ display:none !important; } /* flèches spin année */

/* Flèches mois précédent / suivant : carrées, foncées */
.flatpickr-prev-month,
.flatpickr-next-month{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:30px !important;
  height:30px !important;
  padding:0 !important;
  background:var(--bulle-ink) !important;
  border-radius:0 !important;
}
.flatpickr-prev-month svg,
.flatpickr-next-month svg{ fill:var(--bulle-green-vivid) !important; }
.flatpickr-prev-month:hover,
.flatpickr-next-month:hover{ background:var(--bulle-green-dark) !important; }

/* Jours de la semaine : barre blanche (allège la masse verte) */
.flatpickr-weekdays{
  background:#fff !important;
  border-bottom:2px solid var(--bulle-line) !important;
}
.flatpickr-weekday{ color:var(--bulle-muted) !important; font-weight:600 !important; }

/* ---- 9.2 Boutons Suivant / Confirmer : vert vif garanti (sélecteurs élargis) ----
   Suivant = action primaire (vert). Retour = secondaire (blanc). Styles distincts. */
#button-next,
a#button-next,
.button-next,
[id$="-next"],
button[id*="next"]:not(#button-back),
#book-appointment-submit,
.btn.btn-primary{
  color:var(--bulle-ink) !important;
  background-color:var(--bulle-green-vivid) !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:5px 5px 0 var(--bulle-ink) !important;
  font-family:var(--bulle-mono) !important;
  font-weight:800 !important;
}

/* ---- 9.3 PAGE FINALE (confirmation / succès) ---- */
/* Masquer « Powered by Easy!Appointments » partout (aussi sur la page succès) */
#frame-footer,
.powered-by,
#powered-by,
[class*="powered"]{ display:none !important; }

/* Pastille de succès : carrée, DA (au lieu du rond vert pâle) */
#success-frame .success-icon,
.success-icon,
#success-icon{
  border-radius:0 !important;
  background:var(--bulle-green-vivid) !important;
  border:3px solid var(--bulle-ink) !important;
  box-shadow:4px 4px 0 var(--bulle-ink) !important;
  color:var(--bulle-ink) !important;
}
#success-frame .success-icon svg,
.success-icon svg,
.success-icon i{ color:var(--bulle-ink) !important; fill:var(--bulle-ink) !important; }

/* Titre de succès en encre (pas en vert pâle) */
#success-frame h3,
#success-frame h2,
.success-title{
  font-family:var(--bulle-sans) !important;
  font-weight:800 !important;
  letter-spacing:-.02em !important;
  color:var(--bulle-ink) !important;
}

/* Boutons de la page succès : primaire vert, « Google Calendar » blanc */
#success-frame .btn-primary,
.btn-success,
a.btn-primary{
  color:var(--bulle-ink) !important;
  background-color:var(--bulle-green-vivid) !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:5px 5px 0 var(--bulle-ink) !important;
  font-family:var(--bulle-mono) !important;
  font-weight:800 !important;
}
#success-frame .btn-outline-primary,
#success-frame .btn-default,
#success-frame .btn-secondary{
  color:var(--bulle-ink) !important;
  background:#fff !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:5px 5px 0 var(--bulle-ink) !important;
  font-family:var(--bulle-mono) !important;
  font-weight:800 !important;
}

/* ==========================================================================
   10. CORRECTIFS v4 — en-tête vert vif garanti + mise en page barre
   E!A 1.6 peint le vert forêt (#35A768) sur/dans #header ; on force le vert vif
   sur tous les porteurs possibles et on neutralise un éventuel dégradé/enfant. */
#header,
header#header,
div#header,
#main #header,
.frame-container #header,
#header.bg-primary,
#booking #header{
  background:var(--bulle-green-vivid) !important;
  background-image:none !important;
  color:var(--bulle-ink) !important;
}
/* Si le vert forêt est peint par un conteneur interne, on le rend transparent
   (le vert vif de #header transparaît) — sauf la tuile logo et les badges. */
#header > .row,
#header > .container,
#header > .container-fluid,
#header .header-content,
#header #header-inner{
  background:transparent !important;
  background-image:none !important;
}

/* Barre d'étapes : tout sur une seule ligne, pas de retour à la ligne */
#steps,
#header #steps,
#header .steps{
  display:flex !important;
  flex-wrap:nowrap !important;
  gap:8px !important;
  align-items:center !important;
}
.book-step{
  flex:0 0 auto !important;
  width:34px !important;
  height:34px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  margin:0 !important;
}

/* Slogan / prestation dans l'en-tête : casse normale, taille contenue */
#header #company-slogan,
#header .company-slogan,
#header .service-provider,
#header small{
  text-transform:none !important;
  font-size:12px !important;
  line-height:1.35 !important;
  color:var(--bulle-green-dark) !important;
  font-family:var(--bulle-mono) !important;
}

/* ==========================================================================
   11. CORRECTIFS v5 — en-tête pleine largeur + calendrier (mois lisible)
   ========================================================================== */

/* En-tête : occupe toute la largeur du cadre, sans marge ni retrait */
#header,
#main #header,
#booking #header{
  width:100% !important;
  margin:0 !important;
  box-sizing:border-box !important;
}

/* Calendrier : le nom du mois était masqué sous la flèche « précédent ».
   On réserve la place des flèches (padding latéral) et on centre mois/année. */
.flatpickr-rContainer,
.flatpickr-innerContainer,
.flatpickr-days,
.dayContainer{ width:100% !important; max-width:none !important; }

.flatpickr-months{
  position:relative !important;
  padding:10px 46px !important;   /* réserve la place des flèches absolues */
  justify-content:center !important;
}
.flatpickr-prev-month{
  position:absolute !important;
  left:8px !important; top:50% !important;
  transform:translateY(-50%) !important;
  margin:0 !important;
}
.flatpickr-next-month{
  position:absolute !important;
  right:8px !important; top:50% !important;
  transform:translateY(-50%) !important;
  margin:0 !important;
}
.flatpickr-current-month{
  position:static !important;
  width:auto !important;
  left:auto !important;
  padding:0 !important;
  text-align:center !important;
  justify-content:center !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months{
  width:auto !important;
  min-width:0 !important;
  text-align:right !important;
}

/* ==========================================================================
   12. SÉLECTEURS RÉELS (retour Claude Code 07/07) — remplacent les suppositions
   E!A 1.6 : la page succès n'a ni #success-frame ni .success-icon.
   Ces règles alignent le fichier maître sur le correctif déjà en production.
   ========================================================================== */

/* Badge d'étape « 4 » passait à la ligne : #steps a un width:200px inline */
#steps{ width:auto !important; }

/* Page succès — pastille (rond vert pâle) → tuile carrée DA */
.rounded-circle.bg-success.bg-opacity-10{
  border-radius:0 !important;
  background:var(--bulle-green-vivid) !important;
  border:3px solid var(--bulle-ink) !important;
  box-shadow:4px 4px 0 var(--bulle-ink) !important;
  opacity:1 !important;
}
.fas.fa-calendar-check.text-success,
.rounded-circle .text-success{ color:var(--bulle-ink) !important; }

/* Titre « …enregistré avec succès » → encre, Archivo 800 */
.text-success.fw-semibold{
  color:var(--bulle-ink) !important;
  font-family:var(--bulle-sans) !important;
  font-weight:800 !important;
  letter-spacing:-.02em !important;
}

/* Bouton « Ajouter à Google Calendar » (contour) → blanc brutaliste */
#add-to-google-calendar.btn.btn-outline-primary{
  color:var(--bulle-ink) !important;
  background:#fff !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:5px 5px 0 var(--bulle-ink) !important;
  font-family:var(--bulle-mono) !important;
  font-weight:800 !important;
}

/* « Powered by » réel : span.footer-powered-by (déjà couvert par [class*="powered"]) */
span.footer-powered-by{ display:none !important; }

/* ==========================================================================
   13. CORRECTIF v7 — titres d'étape en serif → forcer Archivo (bug de fallback)
   ========================================================================== */
#main h1, #main h2, #main h3, #main h4,
.frame-container h1, .frame-container h2, .frame-container h3, .frame-container h4,
#wizard-frame h1, #wizard-frame h2, #wizard-frame h3,
.wizard-frame h1, .wizard-frame h2, .wizard-frame h3,
.frame-title, .book-step-content h1, .book-step-content h2{
  font-family:'Archivo', system-ui, sans-serif !important;
  font-weight:800 !important;
  letter-spacing:-.02em !important;
  color:var(--bulle-ink) !important;
}

/* ==========================================================================
   14. PRODUCTION (Claude Code, recette live 07/07) — corrections DOM réel.
   Placées APRÈS le master design : elles priment. À CONSERVER à chaque fusion.
   ========================================================================== */

/* -- 14.1 CADRE : la vraie carte est #book-appointment-wizard (pas #main).
   #main.container = conteneur plein écran d'E!A → à plat, pleine largeur. */
#main{
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  max-width:none !important;
  width:100% !important;
  padding-left:0 !important;
  padding-right:0 !important;
}
#main,
#main .wrapper{ min-height:0 !important; }
#main .wrapper{ margin-left:0 !important; margin-right:0 !important; }
#book-appointment-wizard{
  border:4px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:none !important;
  background:#fff !important;
  overflow:hidden;
  padding:0 !important;
  margin:24px auto !important;
  width:100% !important;
  max-width:1208px !important;   /* largeur contenu du site (1280 − 2×36) */
  flex:0 0 auto !important;
}

/* -- 14.2 E!A injecte APRÈS le thème des règles à 2 IDs en !important :
   on surpasse en spécificité (préfixe #book-appointment-wizard / #header). */
#book-appointment-wizard #available-hours .available-hour.selected-hour{
  background-color:var(--bulle-ink) !important;
  color:var(--bulle-green-vivid) !important;
  border-color:var(--bulle-ink) !important;
}
#book-appointment-wizard #header .book-step{
  background:#fff !important;
  color:var(--bulle-ink) !important;
  border:2px solid var(--bulle-ink) !important;
}
#book-appointment-wizard #header .book-step strong{ color:var(--bulle-ink) !important; }
#book-appointment-wizard #header .book-step.active-step,
#book-appointment-wizard #header .book-step.active-step strong{
  background:var(--bulle-ink) !important;
  color:var(--bulle-green-vivid) !important;
  border-color:var(--bulle-ink) !important;
}
/* E!A agrandit l'etape active a 45x45 (vs 35x35) : on la ramene a la taille
   des inactifs — emphase par la couleur, pas la taille (demande Richard 09/07). */
#book-appointment-wizard #header .book-step.active-step{
  width:35px !important;
  height:35px !important;
  padding:8px !important;
  margin:6px 12px 0 0 !important;
}

/* -- 14.3 La classe réelle du badge actif est .active-step (pas .active) */
.book-step.active-step,
.book-step.active-step *{
  background:var(--bulle-ink) !important;
  color:var(--bulle-green-vivid) !important;
  border-color:var(--bulle-ink) !important;
}

/* -- 14.4 Slogan : <span> sans classe DANS #company-name (héritait de l'uppercase) */
#header #company-name span{
  text-transform:none !important;
  font-family:var(--bulle-mono) !important;
  font-size:12px !important;
  font-weight:500 !important;
  letter-spacing:0 !important;
  color:var(--bulle-green-dark) !important;
  margin-left:14px !important;
}

/* -- 14.5 Le « teal » : background-image:linear-gradient posé par E!A sur les
   boutons PAR-DESSUS background-color. Et nos liens #main a{vert} délavaient
   le texte des boutons-liens (ID > classes). */
.btn, .btn-primary, .btn-secondary, .btn-dark, .button-next, .button-back,
.btn-outline-primary, .btn-outline-secondary,
#book-appointment-submit{ background-image:none !important; }
#main a.btn, #main a.btn:hover,
#main a.btn-primary, #main a.btn-outline-primary{ color:var(--bulle-ink) !important; }

/* -- 14.6 Boutons Suivant réels = .button-next.btn-dark (pas btn-primary) */
.button-next, .btn-dark.button-next{
  color:var(--bulle-ink) !important;
  background-color:var(--bulle-green-vivid) !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:5px 5px 0 var(--bulle-ink) !important;
  font-family:var(--bulle-mono) !important;
  font-weight:800 !important;
  transition:transform .12s ease, box-shadow .12s ease !important;
  /* Padding vertical OUBLIE ici a l'origine : .button-next retombait sur celui de
     Bootstrap (10px) alors que .button-back et #book-appointment-submit sont a
     14px -> 8px d'ecart de hauteur (49 vs 57). Invisible cote a cote en desktop,
     criant depuis que les boutons sont EMPILES en mobile.
     Seulement le vertical : toucher au padding horizontal (30px) changerait la
     largeur des boutons en desktop, ce que personne n'a demande. */
  padding-top:14px !important;
  padding-bottom:14px !important;
}
/* -- 14.6b Rollover AUTORITAIRE par CLASSE (les vrais boutons ont des id
   suffixés button-next-1/2/3, button-back-2/3/4 → les regles #button-next ne
   matchaient pas). Soulevement identique au site + Retour (memo 08/07). */
.button-next:hover, .btn-dark.button-next:hover,
#book-appointment-submit:hover,
.button-back:hover, .btn-outline-secondary.button-back:hover{
  transform:translate(-2px,-2px) !important;
  box-shadow:7px 7px 0 var(--bulle-ink) !important;
}
.button-next:active, .btn-dark.button-next:active,
#book-appointment-submit:active,
.button-back:active, .btn-outline-secondary.button-back:active{
  transform:translate(0,0) !important;
  box-shadow:none !important;
}
/* La section 9.2 stylait le repos via button[id*="next"]:not(#button-back)
   (specificite 1,1,1 a cause du :not(#id)) → il faut un :hover de specificite
   >= pour que l'ombre passe bien a 7px. */
button[id*="next"]:not(#button-back):hover{
  transform:translate(-2px,-2px) !important;
  box-shadow:7px 7px 0 var(--bulle-ink) !important;
}
button[id*="next"]:not(#button-back):active{
  transform:translate(0,0) !important;
  box-shadow:none !important;
}
/* Retour (secondaire) : fond blanc garanti aussi au survol */
.button-back, .btn-outline-secondary.button-back{
  background-color:#fff !important;
  color:var(--bulle-ink) !important;
  border:3px solid var(--bulle-ink) !important;
  border-radius:0 !important;
  box-shadow:5px 5px 0 var(--bulle-ink) !important;
  transition:transform .12s ease, box-shadow .12s ease !important;
}
.button-back:hover, .btn-outline-secondary.button-back:hover{
  background-color:#fff !important;
}

/* -- 14.7 Divers relevés live */
small:has(a[href*="easyappointments.org"]){ display:none !important; } /* Powered by (succès) */
#service-description:empty,
.service-description:empty,
.provider-description:empty{ display:none !important; } /* trace verte étape 1 */
#steps{ width:auto !important; min-width:232px; } /* E!A force 200px inline */

/* ==========================================================================
   15. DÉCISIONS VALIDÉES 4-5-6 (BRIEF 07/07) — sur-titres, fuseau, créneaux
   ========================================================================== */

/* -- 15.1 Titres d'étape : alignés à gauche (sur-titre « ÉTAPE X/4 » retiré
   le 07/07 à la demande de Richard : redondant avec les badges numérotés) */
.frame-title{ text-align:left !important; margin-bottom:24px !important; }

/* -- 15.2 Colonne créneaux : label « CRÉNEAUX DISPONIBLES » au-dessus (hors flux
   pour ne pas pousser la boîte vers le bas) + boîte alignée au haut du calendrier.
   (le fuseau est déplacé dans la colonne gauche par bulle-a11y.js) */
div:has(> #available-hours){ display:flex; flex-direction:column; position:relative; }
div:has(> #available-hours)::before{
  content:"Créneaux disponibles";
  position:absolute;
  top:4px;              /* juste au-dessus de la table (~8px), pas loin au-dessus */
  left:0;
  font-family:var(--bulle-mono);
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--bulle-ink);
}
/* aligne le haut de la boîte créneaux sur le haut du calendrier (my-4 gauche vs
   py-3 droite) — valeur ajustée par mesure live */
#available-hours{ order:2; margin-top:18px !important; }

/* Fuseau horaire (déplacé sous le calendrier par bulle-a11y.js, classe .bulle-tz-wrap) :
   le calendrier flatpickr inline a une largeur FIXE de 307.875px et se centre via
   margin:auto dans son conteneur. On applique la même largeur + centrage au bloc
   fuseau → bords alignés à TOUTE largeur, en CSS pur (pas de calcul JS). */
.flatpickr-wrapper > .bulle-tz-wrap,
.bulle-tz-wrap{
  max-width:307.875px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  margin-top:14px !important;
}
div:has(> #available-hours) > div:has(#select-timezone),
div:has(> #available-hours) > .mb-3{ order:3; margin-top:14px !important; margin-bottom:0 !important; }

/* Boîte scrollable encadrée ; les créneaux deviennent des lignes internes.
   margin-top:18px aligne son haut sur le haut du calendrier (my-4 vs py-3). */
#available-hours{
  border:3px solid var(--bulle-ink) !important;
  max-height:420px !important;
  overflow:auto !important;
  margin:10px 0 0 0 !important;
  padding:0 !important;
}
#available-hours .available-hour{
  border:0 !important;
  border-bottom:1px solid var(--bulle-line) !important;
  width:100% !important;
  margin:0 !important;
  box-shadow:none !important;
  transform:none !important;
  padding:12px 10px !important;
}
#available-hours .available-hour:last-child{ border-bottom:0 !important; }
#available-hours .available-hour:hover{
  background:var(--bulle-green-vivid) !important;
  color:var(--bulle-ink) !important;
  transform:none !important;
  box-shadow:none !important;
}

/* Fuseau horaire : discret, mono, bordure fine grise, largeur réduite */
div:has(> #available-hours) label[for="select-timezone"],
div:has(#select-timezone) label{
  font-size:10px !important;
  letter-spacing:.08em !important;
  color:var(--bulle-muted) !important;
  margin-bottom:4px !important;
}
#select-timezone{
  font-family:var(--bulle-mono) !important;
  font-size:12px !important;
  font-weight:500 !important;
  border:1px solid #b9c4b6 !important;
  box-shadow:none !important;
  padding:6px 30px 6px 10px !important;
  width:auto !important;
  min-width:230px !important;
  background-size:11px !important;
  background-position:right 10px center !important;
}
#select-timezone:focus{ border-color:var(--bulle-green) !important; box-shadow:none !important; }

/* ==========================================================================
   16. ACCESSIBILITÉ (audit axe 07/07) — contrastes de l'en-tête
   Le slogan/prestation en vert foncé sur vert vif était sous 4.5:1 → encre.
   ========================================================================== */
#header #company-name span,
#header #company-slogan,
#header .company-slogan,
#header .display-booking-selection,
.display-booking-selection{
  color:var(--bulle-ink) !important;
}

/* ==========================================================================
   17. PAGE SUCCÈS ÉPURÉE (décision Richard 07/07) — les 2 boutons masqués :
   « Aller à la page de rendez-vous » relance un nouveau wizard (sans objet
   après réservation) ; « Google Calendar » est redondant et non universel
   (l'invitation.ics jointe à l'e-mail couvre tous les agendas).
   ========================================================================== */
div:has(> #add-to-google-calendar) > a.btn-primary,
#add-to-google-calendar{ display:none !important; }

/* ==========================================================================
   18. FOCUS VISIBLE (constat clavier Richard 07/07) — le focus arrivait sur
   les champs mais restait invisible : E!A injecte des règles :focus
   (box-shadow:none) plus spécifiques. On sur-spécifie, comme pour les badges.
   ========================================================================== */
#book-appointment-wizard .form-select:focus,
#book-appointment-wizard .form-control:focus,
#book-appointment-wizard select:focus,
#book-appointment-wizard input:focus,
#book-appointment-wizard textarea:focus{
  border-color:var(--bulle-green) !important;
  box-shadow:3px 3px 0 var(--bulle-green-vivid) !important;
  outline:3px solid transparent !important; /* trace conservée en mode contraste forcé */
}
/* Boutons, créneaux, badges, liens : anneau vert net au clavier */
#book-appointment-wizard .btn:focus-visible,
#book-appointment-wizard button:focus-visible,
#book-appointment-wizard a:focus-visible,
#book-appointment-wizard .available-hour:focus-visible,
.flatpickr-day:focus,
.flatpickr-prev-month:focus-visible,
.flatpickr-next-month:focus-visible{
  outline:3px solid var(--bulle-green) !important;
  outline-offset:2px !important;
}

/* ==========================================================================
   16. ÉTAPE 1 — libellés (14/07)
   ========================================================================== */

/* Le label « Prestation » est redondant avec le titre de l'étape
   (« Quel type d'échange souhaitez-vous ? », chaîne service_and_provider).
   On le masque VISUELLEMENT mais on le laisse dans l'arbre d'accessibilité :
   c'est lui qui donne son nom accessible au <select> (un display:none le
   priverait de nom). Motif sr-only classique. */
#wizard-frame-1 label[for="select-service"]{
  position:absolute !important;
  width:1px !important; height:1px !important;
  padding:0 !important; margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0 0 0 0) !important;
  clip-path:inset(50%) !important;
  white-space:nowrap !important;
  border:0 !important;
}
/* Le label sortant du flux, on rétablit l'espace au-dessus du select. */
#wizard-frame-1 #select-service{ margin-top:4px !important; }

/* ==========================================================================
   17. MOBILE (14/07) — le module vit dans une iframe de 327px de large sur
   un telephone de 375px. Constats mesures avant correctif :
     - calendrier flatpickr rogne de 69px (colonne Dimanche + fleche « mois
       suivant » inaccessibles) : flatpickr impose 307,875px FIXES ;
     - en-tete comprime sur 3 lignes serrees.
   (Les creneaux sur 2 colonnes sont deja geres par le @media 991px, section 6.)
   ========================================================================== */
@media (max-width:575px){

  /* -- 17.1 Calendrier fluide : on neutralise les largeurs fixes de flatpickr.
     La grille se repartit alors en 7 colonnes egales (100/7 = 14,2857 %). */
  .flatpickr-calendar,
  .flatpickr-calendar.inline,
  .flatpickr-months,
  .flatpickr-weekdays,
  .flatpickr-innerContainer,
  .flatpickr-rContainer,
  .flatpickr-days,
  .dayContainer{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }
  .flatpickr-day{
    width:14.2857% !important;
    max-width:14.2857% !important;
    flex-basis:14.2857% !important;
    height:36px !important;
    line-height:36px !important;
  }
  /* La section 6 fige la cellule selectionnee a 39x39px : sans cette reprise,
     elle resterait figee alors que les autres deviennent fluides. */
  .flatpickr-day.selected,
  .flatpickr-day.selected:hover{
    width:14.2857% !important;
    max-width:14.2857% !important;
    height:36px !important;
    line-height:36px !important;
  }
  /* L'alignement du fuseau (section 15) repose sur les 307,875px fixes du
     calendrier — qui disparaissent ici. */
  .flatpickr-wrapper > .bulle-tz-wrap,
  .bulle-tz-wrap{ max-width:100% !important; }

  /* -- 17.2 En-tete : en colonne, centre (sinon « Cadrage d'audit — 45 min |
     Richard LOUSTAU » s'ecrase sur 3 lignes a cote du nom de societe). */
  #header{
    flex-direction:column !important;
    align-items:center !important;
    text-align:center !important;
    gap:8px !important;
    padding:16px 14px !important;
  }
  #header #company-slogan,
  #header .company-slogan,
  #header .service-provider{
    font-size:12px !important;
    line-height:1.35 !important;
  }
  /* #company-name est lui-meme un flex en NOWRAP : il alignait de force la
     tuile-icone (42px, ::before), « bulle.info » (72px) et le bloc prestation
     (149px) dans 291px -> le service s'ecrasait sur 3 lignes serrees a droite.
     On autorise le retour a la ligne et le bloc prestation passe SEUL dessous. */
  #header #company-name{
    flex-wrap:wrap !important;
    justify-content:center !important;
  }
  /* Le bloc « prestation | praticien » = le seul enfant <div> de #company-name
     (l'<img> d'origine est masque par le theme §2, le nom est un <span>). */
  #header #company-name > div{
    flex:1 0 100% !important;
    margin-top:8px !important;
    justify-content:center !important;
    text-align:center !important;
  }

  /* -- 17.3 Boutons Retour / Suivant : EMPILES (14/07).
     E!A pose `d-md-flex justify-content-md-between` : les boutons ne passent en
     LIGNE qu'a partir du palier md, et s'empilent en dessous. Mais notre
     bulle-a11y.js (armButtonOrder) force display:flex EN INLINE sur toutes les
     largeurs, pour placer Suivant avant Retour dans l'ordre de tabulation.
     Consequence : une ligne qui ne tient pas — a 327px, Retour (120) +
     Confirmation (182) = 302px dans un conteneur de 239 -> 29px hors ecran.
     On retablit la colonne ici. `!important` est indispensable : le display:flex
     du JS est un style INLINE, qu'une feuille de style ne bat qu'avec !important.
     L'`order:-1` pose par le JS sur Retour vaut aussi en colonne -> il reste
     AU-DESSUS. Les enfants sont les boutons eux-memes (pas de div intermediaire). */
  #book-appointment-wizard .command-buttons{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    /* 24px et non 14 : chaque bouton porte une ombre dure decalee de 5px vers le
       BAS. L'ombre du bouton du haut mange l'espace -> 14px de gap ne laissaient
       que 9px de vide REELLEMENT visible, et les boutons paraissaient colles.
       24 - 5 = 19px de respiration reelle, et une marge de securite contre le
       clic accidentel sur « Retour » (qui fait perdre l'etape) en visant
       « Suivant ». Dans un design a ombres portees, le gap doit integrer
       le decalage de l'ombre. */
    gap:24px !important;
  }
  #book-appointment-wizard .command-buttons .btn{
    width:100% !important;
    margin:0 !important;
  }
}

/* ==========================================================================
   18. DANS L'IFRAME — neutraliser min-vh-100 (14/07)
   E!A pose min-vh-100 (min-height:100vh) sur #main et .row.wrapper. Dans une
   iframe, 100vh = la hauteur de l'iframe. La hauteur du contenu dependrait
   donc de celle de l'iframe, qu'on calcule a partir du contenu : circulaire.
   Consequence : l'iframe ne peut jamais RETRECIR (page de confirmation courte,
   retour de l'etape 2 a l'etape 1). La classe est posee par bulle-a11y.js
   uniquement quand window.parent !== window.
   ========================================================================== */
html.bulle-in-iframe,
html.bulle-in-iframe body{ height:auto !important; }
html.bulle-in-iframe .min-vh-100{ min-height:0 !important; }
