.contact-card-header {
    padding-bottom: 1rem;
}

.contact-card-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--title);
    margin-bottom: 1rem;
}

.contact-card-description {
    font-size: 1rem;
    color: var(--arcys-blue);
}

.contact-card-content {
    padding: 1rem;
    color: var(--arcys-blue);
}

.contact-card {
  position: relative;
  z-index: 10;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  padding: 2rem;
  box-sizing: border-box;
  top: 150px;
  transition: top 1s ease-in-out;
  width: 90%;
  max-width: 590px;
  height: auto;
  margin: 0;

}

.contact-wrapper {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  margin-top: 3%;
}

.paper-front, .paper-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  backface-visibility: hidden;
}

.paper-front {
  background: var(--arcys-cyan);
  transform: rotateX(0deg);
  z-index: 2;
}

.paper-back {
  background: var(--arcys-cyan);
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope {
  position: relative;
  width: 750px;
  height: 480px;
  perspective: 1200px;

}

.envelope.active .content {
  padding: 15em 2em 2em;
}

.envelope.active .paper.front {
  animation: envelope-front 1.5s ease-in-out forwards;
  overflow: hidden;
}

.envelope.active .paper.back {
  animation: envelope-back 1.5s ease-in-out forwards;
}

.envelope.active .paper.back:before {
  animation: envelope-back-before 0.5s ease-in-out 1.25s forwards;
}

.envelope.active .bottom-wrapper,
.envelope.active .contact-card {
  transform: rotateX(180deg);
}

.envelope.active .customForm {
  visibility: hidden;
}

.envelope.active .contact-card {
  z-index: 5;
  height: 400px;
  top: 450px;
}

.envelope .bottom-wrapper,
.envelope .contact-card {
  transform-origin: top;
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
  margin-top: -1px;
}

.envelope .content {
  position: relative;
  z-index: 9;
  box-sizing: border-box;
  transition: all 0.5s ease-in-out;
  transition-delay: 1s;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.envelope .paper {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 0.5em;
  overflow: hidden;
}

.envelope .paper.back:before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 375px 180px 375px;
  border-color: transparent transparent #d3d3d3 transparent;
  transform-origin: bottom;
}

.envelope .paper.back:after {
  content: "";
  display: block;
  background-color: #d3d3d3;
  width: 750px;
  height: 290px;
}

.envelope .paper.front {
  top: 185px;
  z-index: 0;
  box-shadow: 0.1em 0.5em 0.5em rgba(0, 0, 0, 0.25);
  transition: overflow 0.1s linear 1.5s;
}

.envelope .paper.front:before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 200px 375px 0 375px;
  border-color: transparent var(--arcys-cyan) transparent var(--arcys-cyan);
}

.envelope .paper.front:after {
  content: "";
  display: block;
  width: 750px;
  height: 300px;
  background: var(--arcys-cyan);;
  margin-top: -1px;
}

@keyframes envelope-front {
  0% { top: 190px; z-index: 0;  }
  50% { top: 250px; z-index: 9; }
  100% { top: 190px; z-index: 9; }
}

@keyframes envelope-back {
  0% { top: 0; }
  50% { top: 50px; }
  100% { top: 0; }
}

@keyframes envelope-back-before {
  0 {
    border-color: transparent transparent #d3d3d3 transparent;
    transform: rotateX(0deg);
    z-index: 0;
  }
  100% {
    border-color: transparent transparent var(--arcys-cyan); transparent;
    transform: rotateX(180deg);
    z-index: 99;
    position: relative;
  }
}

@media screen and (min-width: 1920px) and (max-width: 2559px) {
    .contact-card {
        top: 170px;
    }
}

@media screen and (min-width: 1500px) and (max-width: 1920px) {
  .envelope {
    width: 600px;
    height: 380px;
  }

  .envelope .paper.back:after,
  .envelope .paper.front:after {
    width: 600px;
    height: 230px;
  }

  .envelope .paper.back:before {
    border-width: 0 300px 170px 300px;
  }

  .envelope .paper.front:before {
    border-width: 160px 300px 0 300px;
  }

  .contact-card {
    max-width: 480px;
    padding: 1.5rem;
    top: 220px;
  }

  .envelope.active .contact-card {
    top: 450px;
    height: 350px;
  }
  .flex-wrap {
    gap: 5rem;
  }

  .row iframe {
    width: 60% !important;
  }

  .row-map > .col {
    display: flex;
    justify-content: center;
  }
}


/* TABLETTE et TEL */
@media screen and (max-width: 1400px) {
  .col-info-map{
      margin-left: 5%;
  }

  /* --- Suppression de toutes les animations et positions forcées --- */
  .envelope,
  .envelope.active,
  .envelope.active .content,
  .envelope.active .contact-card,
  .envelope.active .bottom-wrapper,
  .envelope.active .paper,
  .envelope.active .paper.front,
  .envelope.active .paper.back {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    top: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* --- Masquer les parties décoratives --- */
  .envelope .paper,
  .envelope .paper.front,
  .envelope .paper.back {
    display: none !important;
  }

  /* --- Neutraliser le container --- */
  .envelope {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    perspective: none !important;
    background: none !important;
    box-shadow: none !important;
  }

  /* --- Afficher la carte seule, centrée et stable --- */
  .envelope .content {
    position: static !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: auto !important;
    padding: 0 !important;
  }

  .contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .contact-card {
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 480px !important; /* un peu plus large pour tablette */
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2rem !important;
    z-index: 1;
    animation: none !important;
    transition: none !important;
    transform: none !important;
    height: auto !important;
    margin: 0 auto;
  }

  .contact-card-content {
    padding: 0 !important;
  }

  .customForm {
    visibility: visible !important;
  }
}


/* TELEPHONE */
@media screen and (max-width: 480px){
  .contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: auto;
    margin: 0;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .contact-card {
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 420px !important;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1.5rem !important;
    z-index: 1;
    animation: none !important;
    transition: none !important;
    transform: none !important;
    height: auto !important;
    margin: 0 auto;
  }
}


/***** INFO CONTACT ******/

.single-cta {
  display: flex;
  align-items: flex-start;
}

.single-cta i {
  color: var(--arcys-cyan);
  font-size: 30px;
  float: left;
  flex-shrink: 0;
}

.cta-text {
  padding-left: 15px;
  display: inline-block;
  justify-content: space-between;
  height: 100%;
}

.cta-text h4 {
  color: var(--blue-grey);
  font-size: 20px;
  font-weight: 600;
  min-height: 1.5em;
}

.cta-text span a,
.cta-text span {
  color: white;
  font-size: 15px;
  min-height: 3em;
}

.cta-text span a{
    text-decoration: underline;
    color: var(--arcys-cyan);
    font-size: 15px;
    min-height: 3em;
}

.row-informations{
    display: flex;
}


.col-information {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/****  MAP ****/
.row iframe {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: 25px !important;
}

.row-map {
    height: auto;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}


/* Adjustments for smaller screens */
@media (max-width: 992px) {
    .col-5, .col.lex-wrap {
        max-width: 100%;
        flex-basis: 100%;
    }

    .row iframe {
        height: 250px;
    }

    .contact-card {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Very small devices */
@media (max-width: 576px) {
    .contact-card {
        padding: 1rem;
        margin: 1rem 0.5rem 2rem 0.5rem;
    }

    .row iframe {
        height: 200px;
    }

    .cta-text h4 {
        font-size: 18px;
    }

    .cta-text span,
    .cta-text span a {
        font-size: 14px;
    }

    .single-cta i {
        font-size: 24px;
    }
}

@media (min-height: 1000px) {
    .row iframe {
        width: 70%;
        height: 100%;
    }

    .row-map {
        height: 550px;
    }

    .row-map > .col {
        display: flex;
        justify-content: center;
    }
}

.field-error {
    color: #d00000;
    font-size: 0.9em;
    margin-top: -10px;
}