:root {
  --navy: #053871;
  --navy-deep: #09284c;
  --cyan: #51bcec;
  --cyan-hover: #3aaddf;
  --input-bg: rgba(229, 244, 255, 0.55);
  --input-border: #c2d6df;
  --placeholder: #87979f;
  --shadow: #d1e5ec;
  --text: #053871;
  --white: #ffffff;
  --bg-top-end: #f6fafb;
  --bg-bottom-start: #e7f1f3;
  --title: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Avenir", "Avenir Next", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  max-width: none;
  color: var(--text);
  overflow-x: hidden;
  background: #ffffff;
  font-family: var(--body);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.landing {
  position: relative;
  isolation: isolate;
  min-height: 0;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 48px;
  font-family: var(--body);
  background-image: url(../images/background-top.jpg), linear-gradient(90deg, #ecf4f7 0%, #ffffff 100%);
  background-repeat: no-repeat;
  background-position: center top, center;
}

.brands {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 36px;
  width: min(700px, 100%);
  margin: 0 auto;
  padding: 28px 40px 22px;
  background: var(--white);
  border-radius: 0 0 28px 28px;
  box-shadow: 5px 5px 16px var(--shadow);
}

.brands__eurochem {
  width: 214px;
}

.brands__eoletec {
  width: 220px;
}

.batimat {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 390px minmax(140px, 170px) minmax(220px, 1fr);
  align-items: center;
  width: min(920px, 100%);
  margin: 80px auto 0;
  min-height: 240px;
}

.batimat__logo {
  width: 347px;
  justify-self: start;
}

.batimat__dates {
  margin: 0;
  color: var(--navy-deep);
  font-family: 'Avenir';
  font-weight: 900;
  font-size: 37px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.batimat__dates span:nth-child(4){
  font-weight:500;
}

.batimat__dates span {
  display: block;
}

.batimat__place {
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

main {
  position: relative;
  z-index: 1;
}

.card {
  width: min(1000px, 100%);
  margin: 205px auto 0;
  padding: 56px 78px 48px;
  background: var(--white);
  border-radius: 30px;
  box-shadow: 0 0 28px var(--shadow);
}

.card__intro {
  text-align: center;
  margin-bottom: 36px;
}

.card h1 {
  margin: 0;
  color: var(--navy);
  font-family: var(--title);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.card__stand {
  margin: 10px 0 0;
  color: var(--cyan);
  font-family: var(--title);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
}

.card__stand strong {
  font-weight: 700;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 25px;
  align-items: start;
}

.field input,
.slot select {
  width: 100%;
  height: 55px;
  padding: 0 16px;
  border: 1px solid var(--input-border);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--navy);
  font-family: var(--body);
  font-size: 18px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: var(--placeholder);
}

.field input:hover,
.slot select:hover {
  border-color: #a9c8d4;
}

.field input:focus,
.slot select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(81, 188, 236, 0.2);
}

.field input:user-invalid,
.field input.is-invalid,
.slot select:user-invalid,
.slot select.is-invalid {
  border-color: #c0392b;
}

.presence {
  margin: 28px 0 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}

.radio {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.4;
}

.radio input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: var(--white);
  display: grid;
  place-content: center;
}

.radio input::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--navy);
  transform: scale(0);
}

.radio input:checked::after {
  transform: scale(1);
}

.radio input:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.presence.is-invalid .radio input,
.radio input.is-invalid {
  border-color: #c0392b;
}

.rdv-slots[hidden],
.rdv-note[hidden] {
  display: none;
}

.rdv-note {
  margin: 36px 0 0;
}

.rdv-note__label {
  display: block;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.rdv-note textarea {
  display: block;
  width: 100%;
  min-height: 140px;
  padding: 16px;
  border: 1px solid var(--input-border);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--navy);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.45;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rdv-note textarea::placeholder {
  color: var(--placeholder);
}

.rdv-note textarea:hover {
  border-color: #a9c8d4;
}

.rdv-note textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(81, 188, 236, 0.2);
}

.slot-title {
  margin: 55px 0 25px;
  text-align: center;
  color: var(--navy);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
}

.slots {
  display: flex;
  justify-content: center;
  gap: 28px;
  max-width: 630px;
  margin:  0 auto;
  margin-bottom: 50px;
}

.slot {
  width: 320px;
}

.slot > span:not(.field-error) {
  display: block;
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 22px;
}

.slot select {
  background-color: var(--white);
  border-color: var(--cyan);
  color: var(--placeholder);
  font-size: 20px;
  font-weight: 500;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237599a9' d='M1 1.2 6 6.8 11 1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 48px;
  cursor: pointer;
}

.slot select:valid {
  color: var(--navy);
}

.form-error,
.field-error {
  margin: 6px 0 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.form-error {
  max-width: 450px;
  margin: 16px auto 0;
  text-align: center;
}

.field-error[hidden],
.form-error[hidden] {
  display: none;
}

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(450px, 100%);
  height: 78px;
  margin: 36px auto 8px;
  border: 2px solid var(--cyan);
  border-radius: 999px;
  background: var(--cyan);
  color: var(--white);
  font-family: 'Avenir Next';
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.submit:hover {
  background: var(--white);
  color: var(--cyan);
}

.submit:active {
  transform: translateY(1px);
}

.submit:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.submit:disabled,
.submit:disabled:hover {
  opacity: 1;
  cursor: wait;
  background: var(--cyan);
  color: var(--white);
  transform: none;
}

.submit__spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: submit-spin 0.7s linear infinite;
}

@keyframes submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.success {
  text-align: center;
  padding: 48px 16px 32px;
}

.success h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-family: var(--title);
  font-size: 36px;
  text-transform: uppercase;
}

.success p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

.rdv-promo {
  width: 100%;
  margin: 0;
  padding: 48px 24px 56px;
  background: var(--white);
}

.rdv-promo .promo-card {
  position: relative;
  display: block;
  width: min(650px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 650 / 400;
  text-decoration: none;
}

.rdv-promo .promo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rdv-promo .promo-card__btn {
  position: absolute;
  bottom: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  border: 1.5px solid transparent;
  border-radius: 300px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.rdv-promo .promo-card__btn--navy {
  left: 45px;
  width: 144px;
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.rdv-promo .promo-card:hover .promo-card__btn--navy,
.rdv-promo .promo-card:focus-visible .promo-card__btn--navy {
  background: var(--white);
  color: var(--navy);
}

@media (max-width: 1400px) {

  .slot-title{
    font-size: 20px;
  }

  .slot > span:not(.field-error){
    font-size: 18px;
  }

  .landing {
    background-image: none;
    background-color: #e3ecf1;
    padding: 0 16px 32px;
  }

.rdv-with-chrome main {
    margin-top: 60px;
}

  .landing::before {
    display: none;
  }

  .brands {
    gap: 20px;
    padding: 20px 24px 16px;
    border-radius: 0 0 20px 20px;
  }

  .brands__eurochem,
  .brands__eoletec {
    width: min(160px, 42%);
  }

  .batimat {
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 20px auto 0;
    text-align: center;
  }

.rdv-with-chrome .batimat {
    top: 30px !important;
}

  .batimat__logo {
    width: min(168px, 52vw);
    justify-self: center;
  }

  .batimat__dates {
    font-size: clamp(16px, 5vw, 22px);
    margin: 12px 0 0;
    text-align: center;
  }

  .batimat__place {
    font-size: 11px;
  }

  .card {
    margin-top: 28px;
    margin-bottom: 0;
    padding: 36px 28px 32px;
  }

  .rdv-promo {
    margin-top: 0;
    padding: 32px 16px 40px;
  }

  .rdv-promo .promo-card__btn {
    height: 40px;
    font-size: 16px;
  }

  .rdv-promo .promo-card__btn--navy {
    left: auto;
    right: 16px;
    width: 120px;
  }

  .fields,
  .slots {
    grid-template-columns: 1fr;
  }

  .slot {
    width: 100%;
  }

  .submit {
    height: 64px;
    font-size: 20px;
  }
}

.grecaptcha-badge {
  visibility: hidden !important;
}

.recaptcha-note {
  margin: 14px 0 0;
  color: #6a7a84;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.recaptcha-note a {
  color: inherit;
}

.rdv-with-chrome .brands {
  display: none;
}

.rdv-with-chrome .landing {
  padding-bottom: 40px;
  background-position-y: -160px;
}

.rdv-with-chrome .batimat {
  margin-top: 0;
  position: relative;
  top: 110px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .submit {
    transition: none;
  }

  .submit__spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.55;
  }

  .rdv-with-chrome main{
    
  }
}


@media (max-width: 480px) {
  .slots {
    display: grid;
  }

  .batimat__logo {
    width: min(140px, 48vw);
  }

  .card {
    margin-top: 24px;
    padding: 28px 18px 28px;
  }
}
