/* =================================================================
   Infocom'94 — Séminaire des Maires : formulaire public
   Palette de marque : teal #26acbf · orange #ef7d2d · navy #00115f
   Tout est scopé sous .i94sem-wrap pour ne pas polluer le thème.
   ================================================================= */

.i94sem-wrap {
  --i94-teal: #26acbf;
  --i94-teal-d: #1b8a99;
  --i94-orange: #ef7d2d;
  --i94-orange-d: #ec6608;
  --i94-amber: #feb33e;
  --i94-navy: #00115f;
  --i94-navy-2: #36468f;
  --i94-ink: #1f2533;
  --i94-gray: #5a5a5a;
  --i94-line: #e2e6ee;
  --i94-bg: #ffffff;
  --i94-bg-soft: #f5f7fb;
  --i94-radius: 16px;
  --i94-radius-sm: 11px;
  --i94-shadow: 0 18px 50px -22px rgba(0, 17, 95, .35);
  --i94-shadow-sm: 0 6px 18px -10px rgba(0, 17, 95, .35);

  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  color: var(--i94-ink);
  font-family: "Calibri", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------------------------------------------------------------- *
   HERO
 * ---------------------------------------------------------------- */
.i94sem-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--i94-radius) var(--i94-radius) 0 0;
  background:
    radial-gradient(120% 140% at 88% -10%, rgba(38, 172, 191, .55) 0%, rgba(38, 172, 191, 0) 55%),
    radial-gradient(90% 120% at 0% 120%, rgba(239, 125, 45, .45) 0%, rgba(239, 125, 45, 0) 50%),
    linear-gradient(135deg, var(--i94-navy) 0%, var(--i94-navy-2) 100%);
  color: #fff;
  padding: 46px 40px 40px;
}
.i94sem-hero::after {
  /* fine ligne lumineuse en bas du hero */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--i94-teal), var(--i94-amber), var(--i94-orange));
}
.i94sem-hero__inner { position: relative; z-index: 1; }

.i94sem-kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #d8f4f8;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 6px 13px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.i94sem-title {
  margin: 16px 0 0;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #fff;
}
.i94sem-subtitle {
  margin: 12px 0 0;
  font-size: 17px;
  max-width: 56ch;
  color: rgba(255, 255, 255, .92);
}

.i94sem-facts {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}
.i94sem-facts li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.i94sem-facts li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: 15px;
}

/* ---------------------------------------------------------------- *
   INTRO
 * ---------------------------------------------------------------- */
.i94sem-intro {
  margin: 0;
  padding: 24px 40px 4px;
  font-size: 16.5px;
  color: var(--i94-gray);
  background: var(--i94-bg);
}

/* ---------------------------------------------------------------- *
   COMPTEUR
 * ---------------------------------------------------------------- */
.i94sem-counter {
  background: var(--i94-bg);
  padding: 22px 40px 6px;
}
.i94sem-counter__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.i94sem-counter__num {
  font-size: 21px;
  font-weight: 800;
  color: var(--i94-navy);
  font-variant-numeric: tabular-nums;
}
.i94sem-counter__num .js-active { color: var(--i94-teal-d); }
.i94sem-counter__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--i94-gray);
}
.i94sem-bar {
  position: relative;
  height: 11px;
  border-radius: 999px;
  background: #e9edf5;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 17, 95, .12);
}
.i94sem-bar__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--i94-teal) 0%, var(--i94-amber) 75%, var(--i94-orange) 100%);
  transition: width .9s cubic-bezier(.22, .61, .36, 1);
  position: relative;
}
.i94sem-bar__fill::after {
  /* reflet animé qui balaie la barre */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: i94shimmer 2.6s ease-in-out infinite;
}
@keyframes i94shimmer { to { transform: translateX(100%); } }

/* ---------------------------------------------------------------- *
   ALERTES / ÉTATS
 * ---------------------------------------------------------------- */
.i94sem-alert {
  margin: 18px 40px;
  padding: 15px 18px;
  border-radius: var(--i94-radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}
.i94sem-alert--full {
  color: #8a1f1f;
  background: #fdecec;
  border: 1px solid #f3c4c4;
}
.i94sem-alert--soft {
  color: var(--i94-orange-d);
  background: #fff3e7;
  border: 1px solid #ffd9b3;
}
.i94sem-alert--soft strong { color: var(--i94-orange-d); }

/* ---------------------------------------------------------------- *
   FORMULAIRE
 * ---------------------------------------------------------------- */
.i94sem-form {
  background: var(--i94-bg);
  padding: 16px 40px 40px;
  border-radius: 0 0 var(--i94-radius) var(--i94-radius);
  box-shadow: var(--i94-shadow);
}
/* Carte complète (hero + form) : ombre portée homogène */
.i94sem-hero + .i94sem-intro,
.i94sem-hero + .i94sem-counter { box-shadow: none; }

.i94sem-fs {
  border: none;
  margin: 0 0 8px;
  padding: 22px 0 6px;
}
.i94sem-fs + .i94sem-fs { border-top: 1px solid var(--i94-line); }
.i94sem-fs legend {
  padding: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--i94-navy);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.i94sem-fs legend small {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--i94-teal-d);
}

.i94sem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.i94sem-grid:has(.i94sem-field--civ) {
  grid-template-columns: 110px 1fr 1fr;
}

.i94sem-field { margin: 14px 0 0; }
.i94sem-grid .i94sem-field { margin-top: 0; }

.i94sem-field label,
.i94sem-toggle + label,
.i94sem-field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--i94-ink);
}
.i94sem-field label small {
  font-weight: 500;
  color: var(--i94-gray);
}
.req { color: var(--i94-orange-d); font-weight: 800; }

.i94sem-field input[type="text"],
.i94sem-field input[type="tel"],
.i94sem-field input[type="email"],
.i94sem-field select,
.i94sem-field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--i94-ink);
  background: var(--i94-bg-soft);
  border: 1.5px solid var(--i94-line);
  border-radius: var(--i94-radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.i94sem-field textarea { resize: vertical; min-height: 56px; }
.i94sem-field select { cursor: pointer; }

.i94sem-field input:focus,
.i94sem-field select:focus,
.i94sem-field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--i94-teal);
  box-shadow: 0 0 0 4px rgba(38, 172, 191, .16);
}
.i94sem-field input::placeholder,
.i94sem-field textarea::placeholder { color: #9aa3b2; }

/* champ en erreur (ajouté par le JS) */
.i94sem-field.is-error input,
.i94sem-field.is-error select,
.i94sem-field.is-error textarea {
  border-color: #e3554f;
  box-shadow: 0 0 0 4px rgba(227, 85, 79, .14);
}

/* Toggle élu / agent */
.i94sem-toggle {
  display: inline-flex;
  gap: 8px;
  background: var(--i94-bg-soft);
  border: 1.5px solid var(--i94-line);
  border-radius: var(--i94-radius-sm);
  padding: 5px;
}
.i94sem-radio { position: relative; margin: 0; }
.i94sem-radio input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.i94sem-radio span {
  display: block;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--i94-gray);
  transition: all .18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.i94sem-radio input:checked + span {
  background: var(--i94-navy);
  color: #fff;
  box-shadow: var(--i94-shadow-sm);
}
.i94sem-radio input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(38, 172, 191, .4);
}

/* ---------------------------------------------------------------- *
   ATELIERS — cartes sélectionnables
 * ---------------------------------------------------------------- */
.i94sem-ateliers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.i94sem-atelier {
  position: relative;
  margin: 0;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  animation: i94reveal .55s cubic-bezier(.22, .61, .36, 1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes i94reveal {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .i94sem-atelier { animation: none; opacity: 1; transform: none; }
  .i94sem-bar__fill::after { animation: none; }
}

.i94sem-atelier input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.i94sem-atelier__card {
  display: block;
  height: 100%;
  padding: 18px 18px 18px 50px;
  background: var(--i94-bg-soft);
  border: 1.5px solid var(--i94-line);
  border-radius: var(--i94-radius-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.i94sem-atelier__check {
  position: absolute;
  top: 18px; left: 16px;
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 2px solid #c5ccd9;
  background: #fff;
  transition: all .2s ease;
}
.i94sem-atelier__check::after {
  content: "";
  position: absolute;
  top: 3px; left: 7px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .18s ease;
}
.i94sem-atelier__title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--i94-navy);
  line-height: 1.25;
}
.i94sem-atelier__desc {
  display: block;
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--i94-gray);
  line-height: 1.4;
}

.i94sem-atelier:hover .i94sem-atelier__card {
  transform: translateY(-3px);
  border-color: var(--i94-teal);
  box-shadow: var(--i94-shadow-sm);
}
.i94sem-atelier input:focus-visible + .i94sem-atelier__card {
  border-color: var(--i94-teal);
  box-shadow: 0 0 0 4px rgba(38, 172, 191, .2);
}

/* état sélectionné (CSS natif + classe .is-checked posée par le JS) */
.i94sem-atelier input:checked + .i94sem-atelier__card,
.i94sem-atelier.is-checked .i94sem-atelier__card {
  background: #e6f7fa;
  border-color: var(--i94-teal);
  box-shadow: 0 0 0 1.5px var(--i94-teal) inset;
}
.i94sem-atelier input:checked + .i94sem-atelier__card .i94sem-atelier__check,
.i94sem-atelier.is-checked .i94sem-atelier__card .i94sem-atelier__check {
  background: var(--i94-teal);
  border-color: var(--i94-teal);
}
.i94sem-atelier input:checked + .i94sem-atelier__card .i94sem-atelier__check::after,
.i94sem-atelier.is-checked .i94sem-atelier__card .i94sem-atelier__check::after {
  transform: rotate(45deg) scale(1);
}

/* ---------------------------------------------------------------- *
   CONSENTEMENT RGPD
 * ---------------------------------------------------------------- */
.i94sem-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0 4px;
  padding: 15px 17px;
  background: var(--i94-bg-soft);
  border: 1.5px solid var(--i94-line);
  border-radius: var(--i94-radius-sm);
  font-size: 13.5px;
  color: var(--i94-gray);
  line-height: 1.5;
  cursor: pointer;
}
.i94sem-consent input {
  margin-top: 2px;
  width: 19px; height: 19px;
  accent-color: var(--i94-teal);
  flex: 0 0 auto;
  cursor: pointer;
}
.i94sem-consent a { color: var(--i94-teal-d); font-weight: 700; }
.i94sem-consent.is-error {
  border-color: #e3554f;
  background: #fdecec;
}

/* ---------------------------------------------------------------- *
   HONEYPOT (caché aux humains, visible aux bots)
 * ---------------------------------------------------------------- */
.i94sem-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------- *
   BOUTON
 * ---------------------------------------------------------------- */
.i94sem-actions {
  margin-top: 26px;
  display: flex;
  justify-content: center;
}
.i94sem-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 230px;
  padding: 16px 38px;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
  background: linear-gradient(135deg, var(--i94-orange) 0%, var(--i94-orange-d) 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 14px 28px -12px rgba(236, 102, 8, .75);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.i94sem-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(236, 102, 8, .8);
  filter: saturate(1.08);
}
.i94sem-btn:active { transform: translateY(0); }
.i94sem-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(254, 179, 62, .55), 0 14px 28px -12px rgba(236, 102, 8, .75);
}

.i94sem-btn__spin {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: i94spin .7s linear infinite;
}
@keyframes i94spin { to { transform: rotate(360deg); } }

/* état chargement (classe posée par le JS) */
.i94sem-btn.is-loading { pointer-events: none; opacity: .92; }
.i94sem-btn.is-loading .i94sem-btn__label { opacity: .65; }
.i94sem-btn.is-loading .i94sem-btn__spin { display: inline-block; }

/* ---------------------------------------------------------------- *
   FEEDBACK
 * ---------------------------------------------------------------- */
.i94sem-feedback {
  margin: 16px 0 0;
  min-height: 0;
  text-align: center;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
}
.i94sem-feedback.is-error { color: #c0392b; }
.i94sem-feedback.is-ok { color: var(--i94-teal-d); }

/* ---------------------------------------------------------------- *
   ÉCRAN DE SUCCÈS
 * ---------------------------------------------------------------- */
.i94sem-success {
  background: var(--i94-bg);
  border-radius: 0 0 var(--i94-radius) var(--i94-radius);
  box-shadow: var(--i94-shadow);
  padding: 54px 40px 56px;
  text-align: center;
  animation: i94pop .5s cubic-bezier(.22, .61, .36, 1);
}
@keyframes i94pop {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.i94sem-success__icon {
  width: 76px; height: 76px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--i94-teal) 0%, var(--i94-teal-d) 100%);
  box-shadow: 0 16px 32px -14px rgba(27, 138, 153, .85);
  animation: i94icon .6s cubic-bezier(.34, 1.56, .64, 1) .1s both;
}
@keyframes i94icon {
  from { transform: scale(.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.i94sem-success h3 {
  margin: 0 0 10px;
  font-size: 25px;
  font-weight: 800;
  color: var(--i94-navy);
}
.i94sem-success p {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 16px;
  color: var(--i94-gray);
}

/* ---------------------------------------------------------------- *
   RESPONSIVE
 * ---------------------------------------------------------------- */
@media (max-width: 640px) {
  .i94sem-hero { padding: 34px 22px 30px; }
  .i94sem-intro,
  .i94sem-counter,
  .i94sem-form,
  .i94sem-success { padding-left: 22px; padding-right: 22px; }
  .i94sem-alert { margin-left: 22px; margin-right: 22px; }
  .i94sem-grid,
  .i94sem-grid:has(.i94sem-field--civ),
  .i94sem-ateliers { grid-template-columns: 1fr; }
  .i94sem-btn { width: 100%; }
  .i94sem-title { font-size: 27px; }
}
