/* ==========================================================================
   SOS DATA — Prise de rendez-vous en ligne (/rendez-vous.html)
   --------------------------------------------------------------------------
   Feuille autonome : la page est appelée depuis la fiche Google Business et
   doit s'afficher vite, sans charger tout le design system du site. Les jetons
   ci-dessous sont repris à l'identique de css/style.css — si la charte change
   là-bas, reportez les couleurs ici.
   Écrite en mobile-first : les media queries n'ajoutent que l'écran large.
   ========================================================================== */

:root{
  --blue-deep:#0B3B7A;
  --blue-deeper:#071F42;
  --blue-mid:#123E7C;
  --blue-bg:#E8F0FB;
  --blue-bg-2:#F4F8FD;
  --white:#FFFFFF;
  --ink:#0C1B33;
  --ink-soft:#48577A;
  --ink-faint:#7C8AA8;
  --accent:#1B6DE0;
  --accent-hover:#1558B8;
  --guarantee:#F5820B;
  --success:#1C9B6B;
  --danger:#C0362C;
  --border:#D8E3F5;
  --border-soft:#EAF1FB;

  --font-body:'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm:10px;
  --radius-md:16px;
  --radius-lg:24px;
  --shadow-sm:0 2px 8px rgba(11,59,122,.08);
  --shadow-md:0 12px 32px rgba(11,59,122,.14);

  --bar-h:0px; /* hauteur de la barre récapitulative mobile, pilotée en JS */
}

*, *::before, *::after{ box-sizing:border-box; }

/* Un display: explicite (grid, flex…) l'emporterait sur le [hidden] de la
   feuille du navigateur : on le réaffirme une bonne fois pour toutes. */
[hidden]{ display:none !important; }

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  color:var(--ink);
  background:var(--blue-bg-2);
  -webkit-font-smoothing:antialiased;
}

img, svg{ max-width:100%; height:auto; }

a{ color:var(--accent); }

h1, h2, h3{ margin:0; line-height:1.2; letter-spacing:-.01em; }

.container{
  width:100%;
  max-width:1120px;
  margin-inline:auto;
  padding-inline:clamp(1rem, 4vw, 2rem);
}

.visually-hidden{
  position:absolute !important; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* --------------------------------- En-tête -------------------------------- */
.rdv-header{
  background:linear-gradient(160deg, var(--blue-deeper) 0%, var(--blue-deep) 100%);
  color:var(--white);
  padding-block:1.1rem;
}
.rdv-header-inner{
  display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap;
}
.rdv-brand{ display:inline-flex; align-items:center; }
.rdv-brand img{ height:38px; width:auto; display:block; }
.rdv-header-phone{
  display:inline-flex; align-items:center; gap:.5em;
  color:var(--white); text-decoration:none; font-weight:700; font-size:.95rem;
  border:1.5px solid rgba(255,255,255,.35); border-radius:999px; padding:.5em 1.1em;
}
.rdv-header-phone:hover{ background:rgba(255,255,255,.12); }
.rdv-header-phone svg{ width:17px; height:17px; flex:none; }

/* --------------------------------- Titraille ------------------------------ */
.rdv-intro{
  background:var(--blue-deep);
  padding-top:clamp(1.4rem, 4vw, 2.2rem);
  padding-bottom:clamp(3rem, 7vw, 4.5rem);
}
.rdv-intro-copy{ color:var(--white); }
.rdv-eyebrow{
  display:inline-flex; align-items:center; gap:.5em;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.22);
  border-radius:999px; padding:.32em .9em;
  font-size:.78rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
}
.rdv-intro h1{
  font-size:clamp(1.6rem, 5vw, 2.4rem); font-weight:800; margin-top:.8rem;
}
.rdv-intro p{
  margin:.7rem 0 0; color:#CFE0F7; font-size:clamp(.95rem, 2.6vw, 1.05rem); max-width:56ch;
}
.rdv-facts{
  list-style:none; display:flex; flex-wrap:wrap; gap:.5rem .9rem;
  margin:1.1rem 0 0; padding:0; font-size:.88rem; color:#CFE0F7;
}
.rdv-facts li{ display:inline-flex; align-items:center; gap:.45em; }
.rdv-facts svg{ width:16px; height:16px; flex:none; color:#6FE3B0; }

/* --------------------------------- Grille --------------------------------- */
.rdv-layout{
  display:grid; gap:1rem;
  margin-top:clamp(-3.5rem, -6vw, -2.2rem);
  padding-bottom:2.5rem;   /* la barre mobile est compensée par .rdv-footer */
}
@media (min-width:900px){
  .rdv-layout{ grid-template-columns:1.15fr .85fr; align-items:start; gap:1.4rem; padding-bottom:3.5rem; }
}

.panel{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  padding:clamp(1.1rem, 3.5vw, 1.8rem);
}
@media (min-width:900px){
  .panel-form{ position:sticky; top:1.4rem; }
}

.step{
  display:flex; align-items:center; gap:.65rem; margin-bottom:1rem;
}
.step-num{
  width:26px; height:26px; flex:none; border-radius:50%;
  background:var(--blue-bg); color:var(--blue-deep);
  display:grid; place-items:center; font-size:.85rem; font-weight:800;
}
.step h2{ font-size:1.02rem; font-weight:800; }
.step-hint{ margin:.15rem 0 0; font-size:.85rem; color:var(--ink-soft); line-height:1.4; }

/* -------------------------------- Calendrier ------------------------------ */
.cal-head{
  display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin-bottom:.6rem;
}
.cal-month{
  display:inline-block;
  font-weight:800; font-size:1rem; letter-spacing:-.01em;
}
.cal-month::first-letter{ text-transform:uppercase; }
.cal-nav{ display:flex; gap:.35rem; }
.cal-nav button{
  width:38px; height:38px; border-radius:12px; cursor:pointer;
  border:1.5px solid var(--border); background:var(--white); color:var(--blue-deep);
  display:grid; place-items:center; transition:background .15s, border-color .15s;
}
.cal-nav button:hover:not(:disabled){ background:var(--blue-bg); border-color:var(--accent); }
.cal-nav button:disabled{ opacity:.35; cursor:not-allowed; }
.cal-nav svg{ width:18px; height:18px; }

.cal-dow{
  display:grid; grid-template-columns:repeat(7, 1fr); gap:2px;
  font-size:.72rem; font-weight:700; color:var(--ink-faint);
  text-transform:uppercase; letter-spacing:.03em; text-align:center; margin-bottom:.3rem;
}
.cal-grid{ display:grid; grid-template-columns:repeat(7, 1fr); gap:4px; }
.cal-cell{ aspect-ratio:1 / 1; min-height:44px; }  /* 44px : cible tactile confortable */

.cal-day{
  width:100%; height:100%; min-height:44px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  border:1.5px solid transparent; border-radius:12px;
  background:var(--blue-bg-2); color:var(--ink);
  font-family:inherit; font-size:.95rem; font-weight:600; cursor:pointer;
  transition:background .15s, border-color .15s, color .15s, transform .12s;
}
.cal-day:hover:not(:disabled){ background:var(--blue-bg); border-color:var(--accent); }
.cal-day:focus-visible{ outline:3px solid rgba(27,109,224,.35); outline-offset:2px; }
.cal-day:disabled{
  background:transparent; color:var(--ink-faint); opacity:.4; cursor:not-allowed;
}
.cal-day.is-today{ border-color:var(--border); box-shadow:inset 0 0 0 1px var(--border); }
.cal-day.is-today .cal-dot{ background:var(--accent); }
.cal-day.is-selected{
  background:var(--accent); border-color:var(--accent); color:var(--white);
  box-shadow:0 6px 16px rgba(27,109,224,.35); transform:translateY(-1px);
}
.cal-day.is-selected .cal-dot{ background:var(--white); }
.cal-dot{ width:4px; height:4px; border-radius:50%; background:transparent; }

/* -------------------------------- Créneaux -------------------------------- */
.slots{ margin-top:1.6rem; }
.slots-empty, .slots-loading{
  margin:0; padding:1rem 1.1rem; border-radius:var(--radius-md);
  background:var(--blue-bg-2); color:var(--ink-soft); font-size:.92rem;
}
.slot-group + .slot-group{ margin-top:1.1rem; }
.slot-group h3{
  font-size:.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em;
  color:var(--ink-faint); margin-bottom:.55rem;
}
.slot-list{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(78px, 1fr)); gap:.45rem;
}
.slot{
  padding:.62em .3em; border-radius:11px; cursor:pointer;
  border:1.5px solid var(--border); background:var(--white); color:var(--blue-deep);
  font-family:inherit; font-size:.92rem; font-weight:700; font-variant-numeric:tabular-nums;
  transition:background .15s, border-color .15s, color .15s;
}
.slot:hover:not(:disabled){ background:var(--blue-bg); border-color:var(--accent); }
.slot:focus-visible{ outline:3px solid rgba(27,109,224,.35); outline-offset:2px; }
.slot:disabled{
  background:var(--blue-bg-2); color:var(--ink-faint);
  border-color:var(--border-soft); cursor:not-allowed; text-decoration:line-through;
}
.slot[aria-pressed="true"]{
  background:var(--accent); border-color:var(--accent); color:var(--white);
  box-shadow:0 6px 16px rgba(27,109,224,.3);
}
.slot-more{ margin-top:.45rem; }
.slot-toggle{
  width:100%; margin-top:.55rem; padding:.6em 1em; min-height:44px;
  display:inline-flex; align-items:center; justify-content:center; gap:.45em;
  border:1.5px dashed var(--border); border-radius:11px; cursor:pointer;
  background:transparent; color:var(--accent);
  font-family:inherit; font-size:.86rem; font-weight:700;
  transition:background .15s, border-color .15s;
}
.slot-toggle:hover{ background:var(--blue-bg-2); border-color:var(--accent); }
.slot-toggle:focus-visible{ outline:3px solid rgba(27,109,224,.35); outline-offset:2px; }
.slot-toggle svg{ width:15px; height:15px; transition:transform .18s; }
.slot-toggle.is-open svg{ transform:rotate(180deg); }

.slots-note{
  margin:1.2rem 0 0; padding:.85rem 1rem;
  background:var(--blue-bg-2); border-radius:var(--radius-md);
  font-size:.86rem; color:var(--ink-soft);
}

/* ------------------------------- Formulaire ------------------------------- */
.recap{
  display:flex; align-items:flex-start; gap:.75rem;
  background:var(--blue-bg); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:.85rem 1rem; margin-bottom:1.2rem;
}
.recap svg{ width:20px; height:20px; flex:none; color:var(--accent); margin-top:.15rem; }
.recap-date{ font-weight:800; font-size:.98rem; }
.recap-date::first-letter{ text-transform:uppercase; }
.recap-slot{ font-size:.88rem; color:var(--ink-soft); }
.recap.is-empty .recap-date{ color:var(--ink-soft); font-weight:600; }

.field{ margin-bottom:.9rem; }
.field-2{ display:grid; gap:.9rem; }
@media (min-width:520px){ .field-2{ grid-template-columns:1fr 1fr; } }

.field label{
  display:block; font-size:.86rem; font-weight:700; color:var(--ink); margin-bottom:.35rem;
}
.field .opt{ font-weight:500; color:var(--ink-faint); }
.field input, .field select, .field textarea{
  width:100%; padding:.78em .9em;
  border:1.5px solid var(--border); border-radius:var(--radius-sm);
  background:var(--white); color:var(--ink);
  font-family:inherit; font-size:1rem; /* 16px : évite le zoom auto sur iOS */
  transition:border-color .15s, box-shadow .15s;
}
.field textarea{ resize:vertical; min-height:4.5em; }
.field input:focus, .field select:focus, .field textarea:focus{
  outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(27,109,224,.15);
}
.field.has-error input, .field.has-error select{ border-color:var(--danger); }

.err{
  display:none; margin:.35rem 0 0; font-size:.83rem; font-weight:600; color:var(--danger);
}
.err.is-visible{ display:block; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5em;
  padding:.95em 1.5em; border-radius:999px; border:1.5px solid transparent;
  font-family:inherit; font-size:1rem; font-weight:700; cursor:pointer;
  text-decoration:none; transition:background .15s, transform .12s, opacity .15s;
}
.btn-primary{ background:var(--accent); color:var(--white); }
.btn-primary:hover:not(:disabled){ background:var(--accent-hover); }
.btn-primary:disabled{ opacity:.55; cursor:not-allowed; }
.btn-outline{ background:transparent; color:var(--blue-deep); border-color:var(--border); }
.btn-outline:hover{ background:var(--blue-bg); border-color:var(--accent); }
.btn-block{ width:100%; }
.btn:focus-visible{ outline:3px solid rgba(27,109,224,.35); outline-offset:2px; }

.consent{
  margin:.2rem 0 1rem; font-size:.82rem; color:var(--ink-soft); line-height:1.5;
}

/* ------------------------------- Confirmation ----------------------------- */
.done{ text-align:center; padding:.6rem 0 .2rem; }
.done-check{
  width:62px; height:62px; margin:0 auto 1.1rem; border-radius:50%;
  background:rgba(28,155,107,.12); color:var(--success);
  display:grid; place-items:center;
}
.done-check svg{ width:32px; height:32px; }
.done h2{ font-size:1.35rem; font-weight:800; }
.done p{ color:var(--ink-soft); margin:.6rem 0 0; }
.done-card{
  margin:1.4rem 0; padding:1.1rem 1.2rem; text-align:left;
  background:var(--blue-bg-2); border:1px solid var(--border); border-radius:var(--radius-md);
}
.done-card dl{ margin:0; display:grid; grid-template-columns:auto 1fr; gap:.45rem .9rem; font-size:.92rem; }
.done-card dt{ color:var(--ink-soft); }
.done-card dd{ margin:0; font-weight:700; }
.done-actions{ display:grid; gap:.6rem; }
@media (min-width:520px){ .done-actions{ grid-template-columns:1fr 1fr; } }

/* ---------------------- Barre récapitulative (mobile) --------------------- */
.mobile-bar{
  position:fixed; left:0; right:0; bottom:0; z-index:20;
  display:none; align-items:center; gap:.8rem;
  padding:.7rem clamp(1rem, 4vw, 2rem);
  padding-bottom:calc(.7rem + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.97); border-top:1px solid var(--border);
  box-shadow:0 -6px 24px rgba(7,31,66,.1);
  backdrop-filter:saturate(180%) blur(8px);
}
.mobile-bar.is-visible{ display:flex; }
.mobile-bar-text{ min-width:0; flex:1; }
.mobile-bar-date{
  font-size:.86rem; font-weight:800;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.mobile-bar-date::first-letter{ text-transform:uppercase; }
.mobile-bar-slot{ font-size:.8rem; color:var(--ink-soft); }
.mobile-bar .btn{ padding:.7em 1.2em; font-size:.92rem; flex:none; }
@media (min-width:900px){ .mobile-bar{ display:none !important; } }

/* ----------------------------------- Pied --------------------------------- */
.rdv-footer{
  background:var(--blue-deeper); color:#AFC6E6;
  padding-block:1.6rem; font-size:.86rem;
  margin-bottom:var(--bar-h);
}
.rdv-footer-inner{ display:flex; flex-wrap:wrap; gap:.5rem 1.4rem; align-items:center; justify-content:space-between; }
.rdv-footer a{ color:var(--white); text-decoration:none; }
.rdv-footer a:hover{ text-decoration:underline; }
.rdv-footer ul{ list-style:none; display:flex; flex-wrap:wrap; gap:.4rem 1.1rem; margin:0; padding:0; }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:.01ms !important; transition-duration:.01ms !important;
  }
}
