form[name="contact"] {
  --color-placeholder-text: #6f6e8f;
  --margin-bottom-gap: 2.5em;
  --font-size: clamp(16px, 2.5vw, 1em);

  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  box-sizing: border-box;
  row-gap: var(--margin-bottom-gap);
  justify-content: center;
  margin-bottom: var(--margin-bottom-gap);

  input, 
  select {
    font-size: var(--font-size);
    color: var(--font-theme-sombre);
    border: solid var(--color-white) 3px;
    background: none;
    box-sizing: border-box;
    background-color: transparent;
    font-family: var(--font-title-bold);

    &:focus {
      outline: none;
      border: solid 3px var(--color-yellow);
      color: var(--font-theme-sombre);
    }

    &::placeholder {
      color: var(--color-placeholder-text);
    }
  }

  select {
    border: 3px solid var(--color-white);
    transition: 0.4s ease-in-out;
    appearance: base-select;
    width: 100%;

    &::picker-icon {
      color: var(--font-theme-sombre);
      transition: 0.4s rotate ease-in-out;
    }

    &:open::picker-icon {
      rotate: 180deg;
    }
  }

  ::picker(select) {
    appearance: base-select;
    border: none;
    background: none;
    border-radius: 1em;
    border: solid 3px var(--color-white);
    margin: 1em 0;
  }

  option {
    display: flex;
    justify-content: flex-start;
    background: #eee;
    padding: .5em 1em;
    transition: 0.4s ease-in-out;

    &:hover, 
    &:focus {
      color: var(--font-theme-sombre);
      background-color: var(--color-dark-blue);
    }

    &:checked {
      background-color: var(--color-dark-blue);
      color: var(--color-placeholder-text);
    }
  }

  input:not([type="checkbox"]), select {
    flex: 0 1 calc(50% - (2em / 2));
    padding: .5em 1em;
    border-radius: 5em;
    width: 100%;
  }

  input[type="checkbox"] {
    --cb-size: 40px;
    appearance: none;
    padding: .5em;
    border-radius: 6px;
    width: var(--cb-size);
    height: var(--cb-size);
    min-width: var(--cb-size);
    min-height: var(--cb-size);

    &:checked {
      background: url("../images/icones/check-mark-2c162a2c21b07fa5a8a2dca6608eba4b.svg") no-repeat center;
    }

    @media (width >= 768px) {
      --cb-size: 30px;
    }
  }

  .line {
    .vous-etes {
      position: relative;
      margin-bottom: var(--margin-bottom-gap);
      color: var(--color-yellow);
    }

    .vous-voulez {
      position: relative;
      color: var(--color-yellow);
    }

    legend {
      font-size: var(--font-size);
      font-family: var(--font-title-bold);
      margin-bottom: .5em;
    }
  }

  fieldset, 
  .fieldset {
    display: flex;
    flex-direction: column;
    position: relative;
    justify-content: space-between;
    flex: 1;
    box-sizing: border-box;
    border: none;
    padding: 0;
    background: none;
    color: var(--font-theme-sombre);
    column-gap: 2em;
    row-gap: var(--margin-bottom-gap);

    /* legend {
      font-family: var(--font-title-bold);
      font-size: var(--font-size);
      margin-bottom: var(--margin-bottom-gap);
    } */

    ul {
      position: absolute;
      top: 0;
      transform: translateY(-100%);
      
      li {
        margin-bottom: 1em;
        color: red;
      }
    }

    &.check-box, 
    &.message {
      flex: 1 0 100%;
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: center;
      gap: 1em;
      font-size: var(--font-size);
      line-height: 1.5;
      text-wrap: balance;
    }
  }

  textarea {
    flex: 1 1 100%;
    min-height: 300px;
    box-sizing: border-box;
    float: left;
    background: none;
    padding: .5em 1em;
    border: solid var(--color-white) 3px;
    border-radius: 1.5em;
    color: var(--font-theme-sombre);

    &::placeholder {
      color: var(--color-placeholder-text);
    }

    &:focus {
      outline: none;
      border: solid 3px var(--color-yellow);
    }
  }

  button[type="submit"] {
    min-width: 20vw;
    margin-top: 1em;
    align-self: center;
  }

  input:placeholder-shown, 
  textarea:placeholder-shown {
    width: -webkit-fill-available;
    font-family: var(--font-title-bold);
    color: var(--color-placeholder-text);
  }  /* Autofill fix (WebKit) */
  input:-webkit-autofill::first-line,
  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus,
  input:-webkit-autofill:active
  input:-internal-autofill-selected,
  input:-internal-autofill-previewed,
  input:autofill { 
    width: 100%;
    font-size: var(--font-size) !important;
    caret-color: var(--font-theme-sombre);
    background-color: transparent !important;
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: var(--font-theme-sombre) !important; /* text color override if needed */
    transition: background-color 9999s ease-in-out 0s; /* trick to delay autofill background */
  }

  input:focus-visible, textarea:focus-visible {
    scale: 1;
  }

  .error-wrapper {
    position: relative;
    flex: 1;
  }

  .error {
    color: var(--color-yellow);
    font-size: 80%;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translateY(calc(100% + 10px));

     &::before {
      content: "Erreur :";
      color: black;
      background-color: var(--color-yellow);
      padding: 2px 5px;
      border-radius: 4px;
      margin-right: 10px;
    }
  }

  .alert {
    text-align: center;
    font-size: var(--font-size);
    width: 100%;
    padding: 1em;    
    background: rgb(0 0 0);
    max-width: 50vw;
    border-radius: 100em;
    margin-bottom: 1em;
    align-self: center;
    margin-bottom: 4rem;

    &.alert-success {
      color: #89ad1f;
      border: #89ad1f solid 1px;
    }

    &.alert-error {
      color: var(--color-magenta);
      border: var(--color-magenta) solid 1px;
    }
  }

  .alert-success {
    font-size: var(--font-size);
    width: 100%;
    padding: 1em;
    color: #89ad1f;
    background: rgb(0 0 0);
    max-width: 50vw;
    border: #89ad1f solid 1px;
    border-radius: 100em;
    margin-bottom: 1em;
  }

  label > a {
    color: var(--color-white);
    text-decoration: underline;
    &:hover {
      color: var(--color-yellow);
    }
  }

  @media (min-width: 768px) {
    --margin-bottom-gap: 3em;

    .line {
      & > fieldset, & > .fieldset {
      flex-direction: row;
      }
      &.selects {
        display: flex;
        justify-content: space-between;
        gap: var(--margin-bottom-gap);
        align-items: flex-start;
      }
      .vous-etes, 
      .vous-voulez {
        margin-bottom: 0;
        width: 50%;
        display: block;
        margin-inline: 0;
      }
    }

    .error {
      font-size: 80%;
    }
  }
}

.contact {
  .main-title {
    text-align: center;
  }

  @media (min-width: 1024px) {
    padding-inline: 10vw;
  }
}

.map {
  display: flex;
  flex-direction: column;
  align-items: center;
  &.full-width {
    padding: 0;
  }

  .main-title {text-align: center;}

  .coordinates {
    width: 100%;
    margin: 2em 0;
    display: flex;
    flex-direction: column;
    gap: 4em;
    box-sizing: border-box;
    padding-inline: 1em;
    max-width: 1440px;

    .info {
      background: var(--color-dark-blue);
      border-radius: 1em;
      overflow: hidden;
      flex: 1;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;

      address {
        padding: 1.5em;
      }

      .details {
        padding: 1em;
        font-size: clamp(18px, 2.5vw, 1em);

        .phone {
          margin-bottom: 1em;
        }
      }

      a { 
        color: var(--color-white);
        display: block;
        &:hover {
          color: var(--color-yellow);
          text-decoration: underline;
          text-underline-offset: 3px;
        }
      }

      .fa, .label {
        zoom: 1.5;
        font-size: clamp(18px, 2.5vw, 1em);
      }

      .fa {
        margin-right: .5em;
      }

      .fa-external-link {
        font-size: 1rem;
        margin-inline: 1rem;
        zoom: 1;
      }

      .label {
        font-family: var(--font-title-bold);
      }
    } 
  }

  .iframe {
    width: 100%;
    border: none;
    height:250px;
  }

  @media (min-width: 768px) { 
    .coordinates { 
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      
      .info {
        flex-direction: row;
        flex: 0 0 600px;
      }
    }
  }
}