/* ============================================================
   Créer mon adresse — /reexpedition/creer-adresse/
   Pixel-perfect clone of live https://www.colisbridge.fr/reexpedition/creer-adresse/
   Source SCSS: theme/sass/modules/address-page.scss (+ app.scss)
   Tokens: navy #243269, pink #e6007e, teal #39c4b6
   Scoped to this page; does NOT modify global forms.css.
   ============================================================ */

/* ---------- Intro section ---------- */
.create-address {
  padding-top: 80px;
}

.create-address-title {
  width: 100%;
  font-size: 45px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 46px;
  text-transform: uppercase;
  color: #243269;
  text-align: center;
}

/* underline-title — centered teal underline */
.create-address .underline-title {
  position: relative;
}

.create-address .underline-title::after {
  content: "";
  display: block;
  width: 159px;
  height: 0;
  border: 2px solid #39c4b6;
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
}

.create-address-desc {
  margin-top: 73px;
  margin-bottom: 90px;
  text-align: center;
  color: #243269;
  line-height: 1.6;
}

.create-address-desc p {
  margin: 0 0 1em;
}

.create-address-desc p:last-child {
  margin-bottom: 0;
}

.create-address-types-container {
  display: flex;
  justify-content: space-between;
}

.shipping-address,
.forwarding-address {
  max-width: 45%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Vertical separator between the two columns */
.shipping-address {
  position: relative;
}

.shipping-address::after {
  content: "";
  position: absolute;
  display: block;
  width: 0;
  height: 364px;
  border: 3px solid #eaecf1;
  top: 50%;
  transform: translateY(-50%);
  right: -70px;
}

.address-type-image-container {
  margin-bottom: 32px;
  font-size: 100px;
  line-height: 1;
  color: #e6007e;
}

.address-type-image-container .cb-icon {
  font-size: 100px;
  color: #e6007e;
}

.address-type-title {
  color: #243269;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.75px;
  line-height: 30px;
  text-align: center;
}

.address-type-desc {
  margin-top: 32px;
  text-align: center;
  color: #243269;
  line-height: 1.6;
}

.address-gps {
  display: block;
  color: #e6007e;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.31px;
  line-height: 22px;
  margin-top: 30px;
  text-align: center;
}

.address-destination {
  display: block;
  margin-top: 30px;
  text-align: center;
  font-weight: 600;
  color: #243269;
}

/* ---------- Form section ---------- */
.address-form-section {
  padding-top: 90px;
  padding-bottom: 90px;
}

/* White card (live .form) */
.address-form-section .form.form-address {
  background-color: #fff;
  box-shadow: 0 3px 25px rgba(0, 0, 0, 0.1);
  padding: 60px 104px;
  margin: 0 auto;
  width: 820px;
  max-width: 100%;
}

/* Section titles (live .form-title underline-title) */
.address-form .form-title {
  color: #243269;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.88px;
  line-height: 1.2;
  margin: 0;
  position: relative;
  padding-bottom: 41px;
}

.address-form .form-title.underline-title::after {
  content: "";
  position: static;
  display: block;
  width: 75px;
  height: 0;
  border: 2px solid #39c4b6;
  margin-top: 11px;
  transform: none;
}

/* Forwarding block spacing */
.address-form .address-form-forwarding {
  padding-top: 100px;
}

/* Two-up rows */
.address-form .contact-form-name-info {
  display: flex;
  justify-content: space-between;
  margin-top: 41px;
}

/* Labels wrap their input — pink label, navy field (live .input-label) */
.address-form .input-label {
  display: block;
  color: #e6007e;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.24px;
  line-height: 22px;
  font-family: var(--font-heading);
}

.address-form .form-input {
  display: block;
  width: 250px;
  height: 39px;
  margin-top: 10px;
  border: 1px solid #243269;
  border-radius: 4px;
  padding: 0 15px;
  color: #243269;
  background-color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: 0.24px;
  line-height: 22px;
}

.address-form .form-input::placeholder {
  color: #243269;
  opacity: 0.6;
}

.address-form .form-input:focus {
  outline: none;
  border-color: #e6007e;
  box-shadow: 0 0 0 3px rgba(230, 0, 126, 0.15);
}

.address-form .form-input.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Destination select */
.address-form .contact-form-select-container {
  flex-direction: column;
  align-items: flex-start;
}

.address-form .destination-select {
  display: block;
  width: 280px;
  height: 39px;
  margin-top: 10px;
  border-radius: 4px;
  border: 1px solid #243269;
  color: #243269;
  background-color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: 0.24px;
  line-height: 22px;
  padding-left: 15px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23243269' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 95% center;
  cursor: pointer;
}

.address-form .destination-select:focus {
  outline: none;
  border-color: #e6007e;
}

/* Fixed delivery address block */
.address-form .form-info-row {
  margin-top: 41px;
}

.address-form .delivery-address {
  display: block;
  color: #e6007e;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.24px;
  line-height: 22px;
}

.address-form .address-form-subtitle {
  color: #243269;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.31px;
  line-height: 22px;
  margin-top: 15px;
}

/* Submit button (live .main-button, centered .form-btn-box) */
.address-form .form-btn-box {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 70px;
}

.address-form .main-button,
.cb-modal .main-button {
  display: inline-block;
  border: none;
  border-radius: 5px;
  color: #fff;
  background-color: #e6007e;
  padding: 16px 25px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 22px;
  letter-spacing: 0.38px;
  cursor: pointer;
  transition: opacity 200ms ease;
}

.address-form .main-button:hover,
.cb-modal .main-button:hover {
  opacity: 0.7;
  color: #fff;
}

.address-form .main-button[disabled],
.address-form .main-button:disabled,
.cb-modal .main-button[disabled],
.cb-modal .main-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error text inside wrapping labels */
.address-form .form-error-text {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: #dc3545;
  margin-top: 4px;
  font-weight: 400;
}

/* Feedback message */
.address-form .form-message {
  display: none;
  margin-top: 16px;
  padding: 16px;
  border-radius: 5px;
  font-size: 16px;
  line-height: 1.4;
}

.address-form .form-message.is-success {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.address-form .form-message.is-error {
  display: block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .create-address-types-container {
    flex-direction: column;
    align-items: center;
    gap: 60px;
  }

  .shipping-address,
  .forwarding-address {
    max-width: 100%;
  }

  .shipping-address::after {
    display: none;
  }
}

@media (max-width: 860px) {
  .address-form-section .form.form-address {
    width: 100%;
    padding: 40px 24px;
  }

  .address-form .contact-form-name-info {
    flex-direction: column;
    gap: 24px;
  }

  .address-form .form-input,
  .address-form .destination-select {
    width: 100%;
  }
}

/* ============================================================
   Modales création d'adresse (« Mon adresse » + « Confirmation »)
   ============================================================ */
.cb-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cb-modal[hidden] { display: none; }

.cb-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(36, 50, 105, 0.55);
}

.cb-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-white);
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  padding: 48px 56px;
  text-align: center;
}

.cb-modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--color-navy);
  cursor: pointer;
}

.cb-modal__title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-navy);
  text-align: center;
  margin: 0 0 34px;
  padding-bottom: 24px;
}

.cb-modal__title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 90px;
  height: 4px;
  background: var(--color-teal);
}

.cb-modal__intro {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-gray-600);
  text-align: center;
  margin: 0 auto 16px;
  max-width: 460px;
}

.cb-modal__intro--strong {
  color: var(--color-navy);
  font-weight: var(--font-weight-bold);
  font-size: 17px;
}

.cb-modal__section-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
  text-align: left;
  margin: 32px 0 20px;
  padding-bottom: 10px;
}

.cb-modal__section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background: var(--color-teal);
}

.cb-modal__block {
  text-align: left;
}

.cb-modal__block p {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-navy);
}

.cb-modal__name {
  /* nom/prénom déjà mis en forme par le JS (nom CAPITALES, prénom Initiale) */
  font-weight: var(--font-weight-semibold);
}

.cb-modal__territory {
  margin-top: 12px !important;
  font-weight: var(--font-weight-bold);
  color: var(--color-pink) !important;
}

.cb-modal__actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}

.cb-modal__message {
  margin-top: 16px;
  font-size: 14px;
  min-height: 18px;
}

.cb-modal__message.is-error { color: var(--color-error); }

@media (max-width: 600px) {
  .cb-modal__dialog { padding: 40px 24px; }
  .cb-modal__title { font-size: 30px; }
}
