/* =====================================================================
   RandrIA — Formulaire de contact : stepper, cartes, motion · 2026-11
   Surcouche de dynamic-form.css (chargée après). Ne touche qu'à #rsContactForm.
   ===================================================================== */
#rsContactForm {
  --rc-navy: var(--navy, #0b2b46);
  --rc-blue: var(--blue, #155f87);
  --rc-orange: var(--orange, #ff7a00);
  --rc-line: #e3e9ef;
  --rc-muted: #607586;
  --rc-ease: cubic-bezier(.22, 1, .36, 1);
  --rc-fast: 180ms;
  --rc-base: 320ms;
  --df-control-h: 50px;
  --df-icon-size: 1.3rem;
  --df-radius: 10px;
  --df-gap: 14px;
  position: relative;
  scroll-margin-top: 110px; /* cible du bouton d'en-tête /contact/#rsContactForm */
}

/* ---------- Stepper (libellé de chaque étape) ---------- */
.rc-stepper {
  list-style: none !important;
  margin: 18px 0 6px !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(var(--rc-n, 5), 1fr);
  gap: 0;
  position: relative;
  counter-reset: none;
}
.rc-stepper li { position: relative; min-width: 0; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.rc-stepper li::marker { content: none; }
.rc-stepper li::before, .rc-stepper li::after {
  content: ''; position: absolute; top: 17px; height: 3px; background: var(--rc-line);
  left: 0; right: 50%; z-index: 0; border-radius: 2px;
}
.rc-stepper li::after { left: 50%; right: 0; }
.rc-stepper li:first-child::before, .rc-stepper li:last-child::after { display: none; }
/* segments franchis : orange, dessinés de gauche à droite */
.rc-stepper li.is-done::before, .rc-stepper li.is-done::after, .rc-stepper li.is-current::before { background: var(--rc-orange); }
.rc-stepper li.is-current::before { transform-origin: left; animation: rcGrow var(--rc-base) var(--rc-ease) both; }
@keyframes rcGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.rc-step {
  position: relative; z-index: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0; padding: 0 2px !important; margin: 0 !important; min-height: 0 !important;
  cursor: default; font: inherit; line-height: 1.2; color: var(--rc-muted); -webkit-tap-highlight-color: transparent;
}
.rc-step[data-go] { cursor: pointer; }
.rc-dot {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 2px solid var(--rc-line); color: var(--rc-muted);
  font: 700 .875rem/1 Manrope, Inter, system-ui, sans-serif;
  transition: background var(--rc-fast) var(--rc-ease), border-color var(--rc-fast) var(--rc-ease), color var(--rc-fast) var(--rc-ease), transform var(--rc-fast) var(--rc-ease), box-shadow var(--rc-fast) var(--rc-ease);
}
.rc-dot svg { position: absolute; width: 18px; height: 18px; opacity: 0; transform: scale(.4); transition: opacity var(--rc-fast), transform var(--rc-base) var(--rc-ease); }
.rc-dot svg path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.rc-n { transition: opacity var(--rc-fast); }
.rc-lbl {
  font-size: .75rem; font-weight: 700; letter-spacing: .02em; line-height: 1.2; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  transition: color var(--rc-fast);
}
li.is-current .rc-dot {
  background: var(--rc-orange); border-color: var(--rc-orange); color: #fff;
  box-shadow: 0 0 0 6px rgba(255, 122, 0, .16), 0 8px 18px -8px rgba(255, 122, 0, .7);
  transform: scale(1.08);
}
li.is-current .rc-lbl { color: var(--rc-navy); }
li.is-done .rc-dot { background: var(--rc-navy); border-color: var(--rc-navy); color: #fff; }
li.is-done .rc-n { opacity: 0; }
li.is-done .rc-dot svg { opacity: 1; transform: scale(1); }
li.is-done .rc-dot svg path { animation: rcDraw .45s var(--rc-ease) .05s forwards; }
@keyframes rcDraw { to { stroke-dashoffset: 0; } }
li.is-done .rc-lbl { color: var(--rc-navy); }
li.is-done .rc-step:hover .rc-dot, li.is-done .rc-step:focus-visible .rc-dot { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(11, 43, 70, .12); }
.rc-step:focus-visible { outline: none; }
.rc-step:focus-visible .rc-dot { outline: 3px solid var(--rc-blue); outline-offset: 2px; }
/* halo discret sur l'étape en cours */
li.is-current .rc-dot::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--rc-orange);
  animation: rcPing 1.8s var(--rc-ease) infinite; opacity: 0;
}
@keyframes rcPing { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(1.55); opacity: 0; } }

.rc-meta {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 14px 0 4px !important; font-size: .875rem; color: var(--rc-muted);
}
.rc-meta strong { color: var(--rc-navy); font-weight: 700; }
.rc-meta .rc-count {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  background: rgba(255, 122, 0, .1); color: #a64b00; font-weight: 700; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase;
}

/* ---------- Cartes de choix : plus grandes, icônes lisibles ---------- */
#rsContactForm .rc-card-step .field > label { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; min-height: 0 !important; }
#rsContactForm .rc-card-step .df-cards { margin-top: 4px; }
#rsContactForm .rc-meta + .form-grid { margin-top: 4px; }
#rsContactForm .rc-card-step { margin-top: 0 !important; }
#rsContactForm .df-field[data-df-step] { margin-top: 6px !important; }
#rsContactForm .df-cards { gap: var(--df-gap); margin: 10px 0 4px; }
#rsContactForm .df-card {
  min-height: 118px; min-block-size: 118px; padding: 16px 12px 14px;
  border: 2px solid var(--rc-line); border-radius: 14px; background: #fff;
  gap: 10px; color: var(--rc-navy);
  box-shadow: 0 1px 2px rgba(11, 43, 70, .04);
  transition: transform var(--rc-fast) var(--rc-ease), border-color var(--rc-fast) var(--rc-ease), box-shadow var(--rc-base) var(--rc-ease), background-color var(--rc-fast) var(--rc-ease);
}
#rsContactForm .df-card > span:not(.df-card__icon) {
  font-size: .95rem; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.25; color: inherit;
}
#rsContactForm .df-card__icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem;
  background: rgba(21, 95, 135, .08); color: var(--rc-blue);
  transition: background var(--rc-fast) var(--rc-ease), color var(--rc-fast) var(--rc-ease), transform var(--rc-base) var(--rc-ease);
}
#rsContactForm .df-card__icon svg { width: 1em; height: 1em; inline-size: 1em; block-size: 1em; }
@media (hover: hover) and (pointer: fine) {
  #rsContactForm .df-card:hover { transform: translateY(-3px); border-color: rgba(255, 122, 0, .55); box-shadow: 0 12px 28px -14px rgba(11, 43, 70, .35); }
  #rsContactForm .df-card:hover .df-card__icon { transform: scale(1.08) rotate(-4deg); }
}
#rsContactForm .df-card:active { transform: scale(.985); }
#rsContactForm .df-card.df-card--selected {
  border-color: var(--rc-orange); background: linear-gradient(180deg, #fff7f0, #fff);
  box-shadow: 0 0 0 4px rgba(255, 122, 0, .14), 0 14px 30px -16px rgba(255, 122, 0, .55);
}
#rsContactForm .df-card.df-card--selected .df-card__icon { background: var(--rc-orange); color: #fff; }
#rsContactForm .df-card.df-card--selected::after {
  inset-block-start: 10px; inset-inline-end: 10px; inline-size: 22px; block-size: 22px; box-shadow: none;
  background: var(--rc-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat;
  animation: rcPop .38s var(--rc-ease) both;
}
#rsContactForm .df-card.is-pop { animation: rcCardPop .42s var(--rc-ease); }
@keyframes rcPop { 0% { transform: scale(0); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes rcCardPop { 0% { transform: scale(1); } 40% { transform: scale(1.035); } 100% { transform: scale(1); } }
/* le contour clavier ne s'affiche que lors d'une navigation au clavier (plus de double cadre après un clic) */
#rsContactForm .df-card:has(.df-card__input:focus-visible) { outline: none; }
html.rs-kb #rsContactForm .df-card:has(.df-card__input:focus-visible) { outline: 3px solid var(--rc-blue); outline-offset: 3px; }

/* ---------- Champs texte : icône plus grande, cadre plus doux ---------- */
#rsContactForm .df-field { padding: 6px 8px 8px; border-radius: 14px; }
#rsContactForm .df-field:focus-within { background: rgba(255, 122, 0, .05); box-shadow: 0 0 0 4px rgba(255, 122, 0, .14); border-color: var(--rc-orange); }
#rsContactForm .df-icon { background: var(--rc-navy); color: #fff; border-radius: var(--df-radius) 0 0 var(--df-radius); transition: background var(--rc-fast); }
#rsContactForm .df-field:focus-within .df-icon { background: var(--rc-orange); }
#rsContactForm .df-control > :not(.df-icon) { border: 1.5px solid var(--rc-line); border-left: 0; border-radius: 0 var(--df-radius) var(--df-radius) 0 !important; background: #fff; }
#rsContactForm .df-control > :not(.df-icon):focus { outline: none; border-color: var(--rc-orange); }

/* ---------- Navigation : compteur, boutons ---------- */
#rsContactForm .df-nav { margin-top: 22px; gap: 12px; }
#rsContactForm .df-progress { height: 6px; block-size: 6px; background: rgba(255, 122, 0, .14); }
#rsContactForm .df-progress__bar { background: linear-gradient(90deg, var(--rc-orange), #ff9a3d); box-shadow: 0 0 10px rgba(255, 122, 0, .55); }
#rsContactForm .df-btn { border-radius: 999px; min-height: 48px; padding: 0 22px; letter-spacing: .01em; transition: transform var(--rc-fast) var(--rc-ease), box-shadow var(--rc-base) var(--rc-ease), background var(--rc-fast), opacity var(--rc-fast); }
#rsContactForm .df-btn--next { background: var(--rc-orange); border-color: var(--rc-orange); color: #fff; box-shadow: 0 10px 22px -12px rgba(255, 122, 0, .9); }
#rsContactForm .df-btn--next:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(255, 122, 0, .95); }
#rsContactForm .df-btn--next .df-btn-icon { transition: transform var(--rc-fast) var(--rc-ease); }
#rsContactForm .df-btn--next:hover .df-btn-icon { transform: translateX(3px); }
#rsContactForm .df-btn--inactive { opacity: .45; box-shadow: none; transform: none !important; }
#rsContactForm .df-btn--back { border-color: var(--rc-line); color: var(--rc-navy); }
#rsContactForm .df-btn--back:hover { border-color: var(--rc-navy); background: rgba(11, 43, 70, .05); }
/* bouton d'envoi rapatrié dans la barre de navigation à la dernière étape */
#rsContactForm .df-nav > .button[type=submit] { margin: 0 !important; border-radius: 999px; min-height: 48px; }
@media (max-width: 30em) {
  #rsContactForm .df-nav > .button[type=submit] { flex: 1 1 auto; justify-content: center; white-space: nowrap; padding: 0 16px; font-size: .9375rem; }
  #rsContactForm .df-on-last-step .df-btn--back, #rsContactForm.df-on-last-step .df-btn--back { flex: 0 0 auto; padding: 0 16px; }
}
#rsContactForm .rc-hint { margin: 8px 0 0 !important; font-size: .8125rem; color: var(--rc-muted); display: flex; align-items: center; gap: 6px; }
#rsContactForm .rc-hint svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--rc-orange); }

/* ---------- Entrée des éléments à chaque étape ---------- */
#rsContactForm .rc-in { animation: rcIn var(--rc-base) var(--rc-ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rcIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
#rsContactForm .form-intro h2 { position: relative; }

/* ---------- Écran de confirmation ---------- */
#rsContactForm.rc-sent .form-grid, #rsContactForm.rc-sent .rc-stepper, #rsContactForm.rc-sent .rc-meta,
#rsContactForm.rc-sent .form-privacy, #rsContactForm.rc-sent .form-status, #rsContactForm.rc-sent > .button { display: none !important; }
.rc-sent-panel { display: none; text-align: center; padding: 26px 10px 10px; }
#rsContactForm.rc-sent .rc-sent-panel { display: block; animation: rcIn .5s var(--rc-ease) both; }
.rc-sent-panel .rc-stamp { width: 84px; height: 84px; margin: 0 auto 16px; color: var(--rc-orange); }
.rc-sent-panel .rc-stamp circle, .rc-sent-panel .rc-stamp path { stroke-dasharray: 220; stroke-dashoffset: 220; animation: rcDrawBig 1s var(--rc-ease) forwards; }
.rc-sent-panel .rc-stamp path { animation-delay: .35s; }
@keyframes rcDrawBig { to { stroke-dashoffset: 0; } }
.rc-sent-panel h3 { margin: 0 0 8px; font-size: 1.4rem; color: var(--rc-navy); }
.rc-sent-panel p { margin: 0 auto 18px; max-width: 46ch; color: var(--rc-muted); line-height: 1.55; }
.rc-sent-panel .rc-sent-again { background: none; border: 1.5px solid var(--rc-line); border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 700; color: var(--rc-navy); cursor: pointer; transition: border-color var(--rc-fast), background var(--rc-fast); }
.rc-sent-panel .rc-sent-again:hover { border-color: var(--rc-navy); background: rgba(11, 43, 70, .05); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  #rsContactForm .df-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #rsContactForm .df-card { min-height: 104px; min-block-size: 104px; padding: 14px 10px 12px; }
  #rsContactForm .df-card__icon { width: 46px; height: 46px; font-size: 1.3rem; }
  #rsContactForm .df-card > span:not(.df-card__icon) { font-size: .875rem; }
  .rc-stepper li::before, .rc-stepper li::after { top: 15px; }
  .rc-dot { width: 32px; height: 32px; font-size: .8125rem; }
  .rc-lbl { font-size: .6875rem; }
}
@media (max-width: 420px) {
  .rc-stepper li:not(.is-current) .rc-lbl { opacity: 0; height: 0; }
  .rc-lbl { transition: opacity var(--rc-fast); }
  #rsContactForm .df-nav .df-btn { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-stepper li::before, li.is-current .rc-dot::after, #rsContactForm .rc-in, #rsContactForm .df-card.is-pop,
  #rsContactForm .df-card.df-card--selected::after, .rc-sent-panel, .rc-sent-panel .rc-stamp circle, .rc-sent-panel .rc-stamp path, li.is-done .rc-dot svg path { animation: none !important; }
  .rc-sent-panel .rc-stamp circle, .rc-sent-panel .rc-stamp path, li.is-done .rc-dot svg path { stroke-dashoffset: 0; }
  #rsContactForm .df-card:hover, #rsContactForm .df-btn--next:hover { transform: none; }
}

/* ---------- Colonne « Nous joindre directement » ---------- */
.rs-coords.rc-coords { margin-top: 30px; }
.rs-coords.rc-coords h3 { margin-bottom: 12px; }
.rs-coords.rc-coords p { margin: 0 0 10px !important; }
.rs-coords.rc-coords p > a {
  display: flex !important; align-items: center; gap: 14px; min-height: 64px;
  padding: 10px 14px 10px 10px; border-radius: 14px; background: #fff; border: 1.5px solid var(--rc-line, #e3e9ef);
  color: var(--navy, #0b2b46) !important; text-decoration: none !important; box-shadow: 0 1px 2px rgba(11, 43, 70, .04);
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), border-color 180ms, box-shadow 320ms cubic-bezier(.22, 1, .36, 1), background 180ms;
}
.rs-coords.rc-coords p > a:hover, .rs-coords.rc-coords p > a:focus-visible {
  transform: translateY(-2px); border-color: rgba(255, 122, 0, .55); box-shadow: 0 14px 28px -16px rgba(11, 43, 70, .35); outline: none;
}
.rs-coords.rc-coords p > a:focus-visible { box-shadow: 0 0 0 4px rgba(255, 122, 0, .18); }
.rc-ci-ico {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(21, 95, 135, .08); color: var(--blue, #155f87);
  transition: background 180ms, color 180ms, transform 320ms cubic-bezier(.22, 1, .36, 1);
}
.rc-ci-ico svg { width: 20px; height: 20px; }
.rs-coords.rc-coords p > a:hover .rc-ci-ico { background: var(--orange, #ff7a00); color: #fff; transform: scale(1.06) rotate(-6deg); }
.rc-ci-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.rc-ci-lbl { font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7a8ea0; }
.rc-ci-val { font-weight: 600; font-size: .9375rem; line-height: 1.3; overflow-wrap: anywhere; }
.rc-ci-arr { flex: 0 0 auto; width: 18px; height: 18px; color: #9fb0bf; transition: transform 180ms cubic-bezier(.22, 1, .36, 1), color 180ms; }
.rs-coords.rc-coords p > a:hover .rc-ci-arr { transform: translateX(3px); color: var(--orange, #ff7a00); }
.rc-ci-ico.is-linkedin { background: rgba(10, 102, 194, .1); color: #0a66c2; }
.rc-ci-ico.is-cal { background: rgba(255, 122, 0, .1); color: #a64b00; }
.rc-ci-ico.is-youtube { background: rgba(255, 0, 0, .08); color: #c4302b; }
@media (max-width: 640px) {
  .rs-coords.rc-coords p > a { min-height: 58px; }
  .rc-ci-ico { width: 40px; height: 40px; }
}
