/* Magelan RDV : styles scopés sous .mgrdv-wrap pour ne pas dépendre du thème. */

.mgrdv-wrap{
  --mg-blue:#1075ba; --mg-blue-l:#3a92cf; --mg-blue-d:#0a5587;
  --mg-red:#e30942; --mg-ink:#1b1d3d;
  --mg-bg:#fafaf7; --mg-bg2:#f1efe8;
  --mg-line:rgba(27,29,61,.10); --mg-line2:rgba(27,29,61,.18);
  --mg-ok:#2faa6a; --mg-line-dark:rgba(255,255,255,.12);
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  color:var(--mg-ink);
  -webkit-font-smoothing:antialiased;
  max-width:1180px; margin:0 auto;
}

/* Neutralise les héritages du thème (Avada) */
.mgrdv-wrap *,
.mgrdv-wrap *::before,
.mgrdv-wrap *::after{ box-sizing:border-box; }
.mgrdv-wrap h2,.mgrdv-wrap h3{ margin:0; padding:0; text-transform:none; letter-spacing:normal; }
.mgrdv-wrap p{ margin:0; }
.mgrdv-wrap ul,.mgrdv-wrap ol{ margin:0; padding:0; list-style:none; }
.mgrdv-wrap li{ margin:0; padding:0; list-style:none; }
.mgrdv-wrap a{ text-decoration:none; box-shadow:none; }
.mgrdv-wrap button{
  font-family:inherit; margin:0; text-transform:none; letter-spacing:normal;
  box-shadow:none; text-shadow:none; line-height:normal; width:auto; min-height:0;
}
.mgrdv-wrap input,.mgrdv-wrap textarea,.mgrdv-wrap select{
  font-family:inherit; margin:0; max-width:none; min-height:0; box-shadow:none; text-transform:none;
}
.mgrdv-wrap .is-hidden{ display:none !important; }

/* ---------- Structure ---------- */
.mgrdv-shell{
  display:grid; grid-template-columns:minmax(280px,360px) 1fr;
  border-radius:16px; overflow:hidden;
  border:1px solid var(--mg-line);
  box-shadow:0 24px 60px -32px rgba(27,29,61,.35);
  background:var(--mg-bg);
}
.mgrdv-pane{ padding:36px 34px; }
.mgrdv-pane-light{ display:flex; flex-direction:column; background:var(--mg-bg); }

/* ---------- Variante pleine largeur d'écran ---------- */
/* Déborde le conteneur du thème : le bloc va d'un bord à l'autre. */
.mgrdv-wrap--full{
  max-width:none;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  width:auto;
}
/* Évite la barre de défilement horizontale que provoquerait 100vw.
   `clip` et non `hidden` : `hidden` casserait les éléments collants du thème.
   La classe est aussi posée par le script, pour les navigateurs sans :has(). */
html:has(.mgrdv-wrap--full), body:has(.mgrdv-wrap--full),
html.mgrdv-has-full, body.mgrdv-has-full{ overflow-x:clip; }

.mgrdv-wrap--full .mgrdv-shell{
  border-radius:0; border-left:0; border-right:0;
  box-shadow:none;
  min-height:var(--mg-min-height, 78vh);
  grid-template-columns:minmax(320px,30%) 1fr;
}
.mgrdv-wrap--full .mgrdv-pane{ padding:54px clamp(28px, 4vw, 72px); }
/* Le contenu reste lisible même sur un très grand écran. */
.mgrdv-wrap--full .mgrdv-pane-dark > *{ max-width:420px; }
.mgrdv-wrap--full .mgrdv-stage{ max-width:760px; }
.mgrdv-wrap--full .mgrdv-solutions{ max-width:820px; }
.mgrdv-wrap--full h2.mgrdv-display{ font-size:clamp(28px,2.8vw,40px); }
.mgrdv-wrap--full h3.mgrdv-stage-title{ font-size:24px; }

/* ---------- Colonne sombre ---------- */
.mgrdv-pane-dark{
  background:radial-gradient(120% 80% at 0% 0%, rgba(58,146,207,.22), transparent 55%), var(--mg-ink);
  color:#fff; display:flex; flex-direction:column;
}
.mgrdv-logo{ height:32px; width:auto; display:block; border:0; filter:brightness(0) invert(1); opacity:.95; }
.mgrdv-pane-body{ margin-top:auto; padding:34px 0; }
.mgrdv-kicker{
  font-family:'JetBrains Mono',ui-monospace,monospace;
  font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--mg-red);
}
.mgrdv-wrap h2.mgrdv-display{
  font-family:'Inter Tight',sans-serif; font-weight:600;
  font-size:clamp(24px,2.4vw,32px); line-height:1.08; letter-spacing:-.03em;
  margin:12px 0 10px; color:#fff;
}
.mgrdv-lede{ color:rgba(255,255,255,.72); font-size:15px; line-height:1.6; }
.mgrdv-assurances{ display:grid; gap:11px; margin:26px 0 0; }
.mgrdv-assurances li{ display:flex; align-items:center; gap:10px; color:rgba(255,255,255,.82); font-size:14px; }
.mgrdv-tick{
  flex:0 0 auto; width:20px; height:20px; border-radius:50%;
  background:rgba(47,170,106,.16); color:var(--mg-ok);
  display:inline-flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:600; line-height:1; padding:0; margin:0; text-indent:0;
  box-sizing:border-box;
}
.mgrdv-phone{
  margin-top:30px; display:inline-flex; flex-direction:column; gap:2px; color:#fff !important;
  border:1px solid var(--mg-line-dark); border-radius:12px; padding:13px 17px; width:fit-content;
  transition:border-color .2s, background .2s;
}
.mgrdv-phone:hover{ border-color:var(--mg-blue-l); background:rgba(58,146,207,.08); }
.mgrdv-phone-label{ font-size:12px; color:rgba(255,255,255,.55); }
.mgrdv-phone-num{ font-family:'JetBrains Mono',ui-monospace,monospace; font-size:17px; letter-spacing:.02em; }
.mgrdv-pane-foot{ margin-top:auto; }
.mgrdv-mono-note{
  font-family:'JetBrains Mono',ui-monospace,monospace; font-size:10.5px;
  letter-spacing:.08em; color:rgba(255,255,255,.45); text-transform:uppercase;
}

/* ---------- Fil d'étapes ---------- */
.mgrdv-steps{
  display:flex; flex-wrap:wrap; gap:8px; margin:0 0 30px;
  font-family:'JetBrains Mono',ui-monospace,monospace;
  font-size:10.5px; letter-spacing:.06em; text-transform:uppercase;
}
.mgrdv-steps li{ display:flex; align-items:center; gap:8px; color:var(--mg-line2); padding:6px 0; }
.mgrdv-steps li:not(:last-child)::after{ content:''; width:22px; height:1px; background:var(--mg-line); margin-left:8px; }
.mgrdv-steps li span{
  width:22px; height:22px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--mg-line2); color:var(--mg-line2);
  font-size:11px; font-family:'JetBrains Mono',ui-monospace,monospace;
  line-height:1; padding:0; margin:0; text-indent:0; text-align:center;
  flex:0 0 auto; box-sizing:border-box; vertical-align:middle;
}
.mgrdv-steps li.on{ color:var(--mg-ink); }
.mgrdv-steps li.on span{ background:var(--mg-blue); border-color:var(--mg-blue); color:#fff; }
.mgrdv-steps li.done span{ background:var(--mg-ok); border-color:var(--mg-ok); color:#fff; }

/* ---------- Étapes ---------- */
.mgrdv-stage{ animation:mgrdv-fade .3s ease both; max-width:640px; }
.mgrdv-wrap h3.mgrdv-stage-title{
  font-family:'Inter Tight',sans-serif; font-weight:600; font-size:21px;
  letter-spacing:-.02em; margin:0 0 18px; color:var(--mg-ink);
}
.mgrdv-stage-sub{ color:var(--mg-blue); font-weight:500; }
.mgrdv-stage-lead{ margin:-10px 0 20px; color:#5a5c76; font-size:14px; }
.mgrdv-back{
  border:0; background:none; cursor:pointer; padding:0; margin:0 0 14px;
  color:var(--mg-blue); font-size:13.5px;
}
.mgrdv-back:hover{ text-decoration:underline; }

/* ---------- Solutions ---------- */
.mgrdv-solutions{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.mgrdv-solution{
  text-align:left; cursor:pointer; background:#fff;
  border:1px solid var(--mg-line); border-radius:14px; padding:15px 17px;
  display:grid; gap:5px; align-content:start; color:var(--mg-ink);
  transition:border-color .18s, transform .18s, box-shadow .18s;
}
.mgrdv-solution:hover{ border-color:var(--mg-blue); transform:translateY(-2px); box-shadow:0 14px 30px -16px rgba(16,117,186,.5); }
.mgrdv-solution-label{ font-family:'Inter Tight',sans-serif; font-size:15.5px; font-weight:600; }
.mgrdv-solution-blurb{ font-size:12.5px; line-height:1.45; color:#5a5c76; }
.mgrdv-solution-go{ font-size:12.5px; color:var(--mg-blue); }
.mgrdv-solution:hover .mgrdv-solution-go{ text-decoration:underline; }

/* ---------- Calendrier ---------- */
.mgrdv-cal{ max-width:370px; }
.mgrdv-cal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.mgrdv-cal-month{ font-family:'Inter Tight',sans-serif; font-size:16.5px; font-weight:600; text-transform:capitalize; }
.mgrdv-cal-nav{
  width:34px; height:34px; border-radius:9px; cursor:pointer;
  background:#fff; border:1px solid var(--mg-line2); color:var(--mg-ink);
  font-size:18px; display:inline-flex; align-items:center; justify-content:center;
  line-height:1; padding:0; box-sizing:border-box;
  transition:border-color .16s, color .16s;
}
.mgrdv-cal-nav:hover:not([disabled]){ border-color:var(--mg-blue); color:var(--mg-blue); }
.mgrdv-cal-nav[disabled]{ opacity:.35; cursor:default; }
.mgrdv-cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.mgrdv-cal-weekdays{ margin-bottom:6px; }
.mgrdv-cal-wd{
  text-align:center; font-family:'JetBrains Mono',ui-monospace,monospace; font-size:10px;
  letter-spacing:.08em; text-transform:uppercase; color:#8a8ca3; padding:2px 0;
}
.mgrdv-cal-cell{
  aspect-ratio:1; border-radius:9px;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:14px; font-variant-numeric:tabular-nums;
  line-height:1; padding:0; box-sizing:border-box;
}
.mgrdv-cal-blank{ background:transparent; }
.mgrdv-cal-off{ color:var(--mg-line2); }
/* Journée ouvrable mais complète : visible, barrée, non cliquable. */
.mgrdv-cal-full{
  color:var(--mg-line2); background:transparent;
  border:1px dashed var(--mg-line); text-decoration:line-through;
  cursor:not-allowed;
}
.mgrdv-cal-day{
  cursor:pointer; background:#fff; border:1px solid var(--mg-line); color:var(--mg-ink);
  transition:border-color .14s, background .14s, transform .14s, color .14s;
}
.mgrdv-cal-day:hover{ border-color:var(--mg-blue); background:rgba(16,117,186,.06); color:var(--mg-blue); transform:translateY(-1px); }

/* ---------- Créneaux ---------- */
.mgrdv-slots{ display:grid; grid-template-columns:repeat(auto-fill,minmax(94px,1fr)); gap:10px; }
.mgrdv-slot{
  cursor:pointer; background:#fff; border:1px solid var(--mg-line); border-radius:10px;
  padding:12px 0; text-align:center; color:var(--mg-ink);
  font-family:'JetBrains Mono',ui-monospace,monospace; font-size:14px; letter-spacing:.03em;
  font-variant-numeric:tabular-nums;
  transition:border-color .16s, color .16s, transform .16s;
}
.mgrdv-slot:hover{ border-color:var(--mg-blue); color:var(--mg-blue); transform:translateY(-1px); }
.mgrdv-empty{ color:#6a6c85; font-size:14px; padding:18px 0; }
.mgrdv-skeleton{ color:var(--mg-line2); font-family:'JetBrains Mono',ui-monospace,monospace; font-size:12px; letter-spacing:.08em; }

/* ---------- Formulaire ---------- */
.mgrdv-recap{
  font-family:'JetBrains Mono',ui-monospace,monospace; font-size:12px; letter-spacing:.04em;
  color:var(--mg-blue-d); background:rgba(16,117,186,.06);
  border:1px solid rgba(16,117,186,.16); border-radius:10px; padding:12px 14px; margin:0 0 20px !important;
}
.mgrdv-form{ display:grid; gap:15px; }
.mgrdv-row{ display:grid; grid-template-columns:1fr 1fr; gap:15px; }
.mgrdv-form label{
  display:flex; flex-direction:column; gap:6px;
  font-size:13.5px; color:#4a4c66; font-weight:400; text-transform:none;
}
.mgrdv-req{ color:var(--mg-red); }
.mgrdv-form input[type=text],
.mgrdv-form input[type=email],
.mgrdv-form input[type=tel],
.mgrdv-form textarea{
  font-size:15px; color:var(--mg-ink); background:#fff; width:100%;
  border:1px solid var(--mg-line2); border-radius:10px; padding:11px 13px;
  transition:border-color .16s, box-shadow .16s;
}
.mgrdv-form input[type=text]:focus,
.mgrdv-form input[type=email]:focus,
.mgrdv-form input[type=tel]:focus,
.mgrdv-form textarea:focus{
  outline:0; border-color:var(--mg-blue); box-shadow:0 0 0 3px rgba(16,117,186,.14);
}
.mgrdv-form textarea{ resize:vertical; }

.mgrdv-phone-group{ display:flex; align-items:stretch; border:1px solid var(--mg-line2); border-radius:10px; overflow:hidden; background:#fff; transition:border-color .16s, box-shadow .16s; }
.mgrdv-phone-group:focus-within{ border-color:var(--mg-blue); box-shadow:0 0 0 3px rgba(16,117,186,.14); }
.mgrdv-phone-prefix{
  display:flex; align-items:center; padding:0 12px; background:var(--mg-bg2);
  border-right:1px solid var(--mg-line); color:#4a4c66;
  font-family:'JetBrains Mono',ui-monospace,monospace; font-size:13px;
}
.mgrdv-phone-group input{ border:0 !important; border-radius:0 !important; box-shadow:none !important; flex:1; }

.mgrdv-field{ display:flex; flex-direction:column; gap:8px; }
.mgrdv-field-label{ font-size:13.5px; color:#4a4c66; }
.mgrdv-form label.mgrdv-radio,
.mgrdv-form label.mgrdv-consent{ flex-direction:row; align-items:flex-start; gap:10px; }
.mgrdv-form label.mgrdv-radio{ align-items:center; font-size:14.5px; color:var(--mg-ink); cursor:pointer; }
.mgrdv-radio input,
.mgrdv-consent input{ width:18px; height:18px; accent-color:var(--mg-blue); cursor:pointer; flex:0 0 auto; margin:0; }
.mgrdv-consent{ font-size:13.5px; line-height:1.5; color:#4a4c66; }
.mgrdv-consent input{ margin-top:1px; }
.mgrdv-consent a{ color:var(--mg-blue); text-decoration:underline; }

.mgrdv-office-note{
  font-size:14px; line-height:1.5; color:var(--mg-blue-d);
  background:rgba(16,117,186,.06); border:1px solid rgba(16,117,186,.16);
  border-radius:10px; padding:12px 14px;
}
.mgrdv-hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.mgrdv-error{ color:var(--mg-red); font-size:13.5px; min-height:0; }
.mgrdv-error:empty{ display:none; }

/* ---------- Boutons ---------- */
.mgrdv-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:14px 24px; border-radius:10px; border:0; cursor:pointer;
  font-family:'Inter Tight',sans-serif; font-weight:500; font-size:15px;
  transition:transform .18s, box-shadow .18s, background .18s;
}
.mgrdv-btn-primary{ background:var(--mg-blue); color:#fff; box-shadow:0 8px 24px -8px rgba(16,117,186,.55); }
.mgrdv-btn-primary:hover{ background:var(--mg-blue); transform:translateY(-2px); box-shadow:0 14px 30px -8px rgba(16,117,186,.65); }
.mgrdv-btn-primary[disabled]{ opacity:.6; cursor:progress; transform:none; }

/* ---------- Confirmation ---------- */
.mgrdv-done{ text-align:center; padding:20px 0; max-width:460px; }
.mgrdv-done-mark{
  width:56px; height:56px; border-radius:50%; margin:0 auto 18px;
  background:rgba(47,170,106,.14); color:var(--mg-ok);
  display:flex; align-items:center; justify-content:center;
  font-size:26px; font-weight:600; line-height:1; padding:0; text-indent:0;
  box-sizing:border-box;
  animation:mgrdv-pop .4s ease both;
}
.mgrdv-done-when{ font-size:17px; font-weight:500; margin:0 0 6px !important; }
.mgrdv-done-note{ color:#6a6c85; font-size:14.5px; }

@keyframes mgrdv-fade{ from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:none;} }
@keyframes mgrdv-pop{ 0%{ transform:scale(.6); opacity:0;} 60%{ transform:scale(1.08);} 100%{ transform:scale(1); opacity:1;} }

/* ---------- Adaptatif ---------- */
@media (max-width:900px){
  .mgrdv-shell{ grid-template-columns:1fr; }
  .mgrdv-pane{ padding:28px 22px; }
  .mgrdv-pane-body{ margin-top:0; padding:20px 0; }
  .mgrdv-assurances{ display:none; }
  .mgrdv-row{ grid-template-columns:1fr; }
  .mgrdv-solutions{ grid-template-columns:1fr; }

  /* En pleine largeur, on empile aussi et on libère la hauteur imposée. */
  .mgrdv-wrap--full .mgrdv-shell{ grid-template-columns:1fr; min-height:0; }
  .mgrdv-wrap--full .mgrdv-pane{ padding:30px 22px; }
  .mgrdv-wrap--full .mgrdv-pane-dark > *{ max-width:none; }
}
@media (prefers-reduced-motion:reduce){
  .mgrdv-wrap *{ animation:none !important; transition:none !important; }
}
