.aos-stg-notice,
.aos-stg-form,
.aos-form-message,
.aos-form-notice,
.aos-stg-calendar {
  box-sizing: border-box;
}

/*
 * Gutenberg puts the custom block class on the button wrapper, whereas the
 * AOS design system expects it on the link. Restore the established AOS
 * button appearance without invalidating the generated blocks.
 */
.aos-page .wp-block-button.aos-btn {
  display: inline-flex;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.aos-page .wp-block-button.aos-btn:hover {
  box-shadow: none;
  transform: none;
}

.aos-page .wp-block-button.aos-btn > .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 50px;
  padding: 0.85rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: #005284;
  color: #fff !important;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: transform 0.18s, box-shadow 0.18s, background-color 0.18s;
}

.aos-page .wp-block-button.aos-btn > .wp-block-button__link:hover {
  background: #063f62;
  box-shadow: 0 8px 22px rgba(11, 63, 98, 0.16);
  color: #fff !important;
  transform: translateY(-2px);
}

.aos-page .wp-block-button.aos-btn > .wp-block-button__link:focus-visible,
.aos-stg-form button.aos-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #063f62;
}

.aos-page .wp-block-buttons {
  flex-wrap: wrap;
  gap: 0.75rem;
}

.aos-section--stages-home {
  padding: 0.85rem clamp(1rem, 4vw, 2rem) !important;
  background: #fff8f0;
}

.aos-section--stages-home .aos-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.5fr) auto;
  gap: 0.55rem 1.25rem;
  align-items: center;
  margin: 0;
  padding: 1rem 1.25rem;
  border-left: 5px solid #ff8417;
}

.aos-section--stages-home h2,
.aos-section--stages-home p,
.aos-section--stages-home .wp-block-buttons {
  margin: 0;
}

.aos-section--stages-home .aos-banner-title {
  color: #17364a;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  grid-row: 1 / span 2;
}

.aos-section--stages-home .wp-block-buttons {
  align-self: center;
  grid-column: 3;
  grid-row: 1 / span 2;
}

.aos-stg-notice {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-left: 5px solid #ff8417;
  border-radius: 0.55rem;
  background: #fff8f0;
  color: #17364a;
}

.aos-stg-notice--info {
  border-left-color: #066295;
  background: #eff8fc;
}

.aos-stg-status,
.aos-form-message {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border-radius: 0.55rem;
  font-weight: 650;
}

.aos-stg-status--success,
.aos-form-success {
  border: 1px solid #28834f;
  background: #effaf3;
  color: #165c34;
}

.aos-stg-status--error,
.aos-form-error {
  border: 1px solid #b34242;
  background: #fff2f2;
  color: #812424;
}

.aos-stg-form {
  max-width: 840px;
  margin: 2rem auto;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid rgba(6, 98, 149, 0.18);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 14px 38px rgba(18, 53, 73, 0.08);
}

.aos-stg-form *,
.aos-stg-form *::before,
.aos-stg-form *::after {
  box-sizing: border-box;
}

.aos-stg-form fieldset {
  min-width: 0;
  margin: 0 0 1.6rem;
  padding: 0;
  border: 0;
}

.aos-stg-form legend {
  margin-bottom: 0.8rem;
  color: #17364a;
  font-size: 1.16rem;
  font-weight: 750;
}

.aos-stage-alerts .aos-alert-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.25rem 1rem;
}

.aos-stage-alerts .aos-alert-options .aos-check {
  margin: 0.35rem 0;
}

.aos-stg-fields,
.aos-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.15rem;
}

.aos-stg-field--wide {
  grid-column: 1 / -1;
}

.aos-form-grid > p {
  min-width: 0;
  margin: 0;
}

.aos-stg-form label {
  display: block;
  margin-bottom: 0.32rem;
  color: #17364a;
  font-weight: 680;
}

.aos-stg-form input[type="text"],
.aos-stg-form input[type="email"],
.aos-stg-form input[type="tel"],
.aos-stg-form select,
.aos-stg-form textarea {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.78rem;
  border: 1px solid #7891a1;
  border-radius: 0.42rem;
  background: #fff;
  color: #17364a;
  font: inherit;
}

.aos-stg-form textarea {
  min-height: 130px;
  resize: vertical;
}

.aos-stg-form input:focus,
.aos-stg-form select:focus,
.aos-stg-form textarea:focus {
  border-color: #066295;
  outline: 3px solid #066295;
  outline-offset: 2px;
}

.aos-stg-check,
.aos-stg-form .aos-check label {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.6rem;
  align-items: start;
  margin: 0.85rem 0;
}

.aos-stg-form .aos-check {
  margin: 0.65rem 0;
}

.aos-stg-form .aos-check label {
  min-height: 44px;
  margin: 0;
  padding: 0.25rem 0;
  line-height: 1.45;
}

.aos-stg-check input,
.aos-stg-form .aos-check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.18rem;
}

.aos-stg-check input:focus-visible,
.aos-stg-form .aos-check input:focus-visible {
  outline: 3px solid #066295;
  outline-offset: 2px;
}

.aos-stg-help,
.aos-form-notice {
  display: block;
  margin-top: 0.3rem;
  color: #4b6474;
  font-size: 0.9rem;
  line-height: 1.45;
}

.aos-stg-required {
  color: #a33333;
}

.aos-stg-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.aos-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.aos-stg-calendar {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
}

.aos-stg-calendar th,
.aos-stg-calendar td {
  padding: 0.78rem;
  border-bottom: 1px solid rgba(6, 98, 149, 0.16);
  text-align: left;
  vertical-align: top;
}

.aos-stg-calendar th {
  background: #eef7fb;
  color: #17364a;
}

.aos-stg-price-table td:not(:first-child),
.aos-stg-price-table th:not(:first-child) {
  text-align: center;
}

/* The pricing page is replaced during Apply and must remain usable on phones. */
.aos-page--tarifs .wp-block-table {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.aos-page--tarifs .wp-block-table:focus-visible {
  outline: 3px solid #066295;
  outline-offset: 2px;
}

.aos-page--tarifs .wp-block-table table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.aos-page--tarifs .wp-block-table td:not(:first-child),
.aos-page--tarifs .wp-block-table th:not(:first-child) {
  white-space: nowrap;
}

.aos-stg-form .aos-btn {
  min-height: 48px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .aos-section--stages-home .aos-card {
    grid-template-columns: 1fr;
  }

  .aos-section--stages-home .aos-banner-title,
  .aos-section--stages-home .wp-block-buttons {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .aos-stg-fields,
  .aos-form-grid {
    grid-template-columns: 1fr;
  }

  .aos-stage-alerts .aos-alert-options {
    grid-template-columns: 1fr;
  }

  .aos-stg-field--wide {
    grid-column: auto;
  }

  .aos-stg-calendar {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

}

@media (max-width: 480px) {
  .aos-page .wp-block-button,
  .aos-page .wp-block-button__link,
  .aos-stg-form .aos-btn {
    width: 100%;
    max-width: 100%;
  }

  .aos-stg-form {
    margin: 1.25rem auto;
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .aos-stg-form input,
  .aos-stg-form select,
  .aos-stg-form textarea {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aos-page .wp-block-button.aos-btn > .wp-block-button__link,
  .aos-stg-form *,
  .aos-stg-form *::before,
  .aos-stg-form *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .aos-page .wp-block-button.aos-btn > .wp-block-button__link:hover {
    transform: none;
  }
}
