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

body {
  font-family: Arial, sans-serif;
}

.main-container {
  position: relative;
  height: 150vh;
  background-color: rgb(81, 82, 82);
}

.card-body {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 15px;
  padding: 40px 40px;
  background-color: lightsalmon;
  background-color: #fafafa;
}

.notice-message {
  width: 520px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 1.2rem;
  line-height: 1.4;
  border: 1px solid blue;
  border-radius: 10px;
  background: bisque;
  text-align: center;
  margin: 10px 0 20px;
}

.linkAccueil {
  align-self: flex-start;
}

.card-body h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #be01fe;
  margin-bottom: 20px;
}

.card-body span {
  font-size: 1.2rem;
}

.course-info {
  text-align: center;
  width: 100%;
  padding: 20px;
  /* border-radius: 8px; */
  margin-bottom: 10px;
  /* background-color: #f8f8f8; */
}

.course-info h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.course-info p {
  font-size: 1.7rem;
}

.available-places-text {
  width: 100%;
  font-size: 1.3rem;
  text-align: center;
  padding: 6px 0;
  margin-bottom: 20px;
  background-color: #efd1fa;
}

.info-text {
  text-align: center;
}

.info-text span {
  font-size: 1rem;
  color: rgb(37, 123, 202);
}

.form {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px;
  margin-bottom: 20px;
}

.form input {
  width: 100%;
  height: 40px;
  border-radius: 5px;
  border: 1px solid #555;
  padding: 10px;
  margin-bottom: 15px;
  background-color: rgb(227, 244, 253);
}

.form input:focus {
  outline: none;
  background-color: rgb(212, 237, 253);
}

.form label {
  font-size: 1.2rem;
  margin-left: 5px;
  margin-bottom: 5px;
}

.g-recaptcha {
  margin: 0 auto;
}

.form button {
  position: relative;
  width: 200px;
  height: 50px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 25px;
  text-decoration: none;
  color: #fff;
  border-radius: 25px;
  font-size: 1.5rem;
  font-weight: 500;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
  opacity: 0.75;
  transition: 0.5s;
  background: #be01fe;
  margin-top: 50px;
  bottom: 10px;
}

.form button::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.5);
}

.form button:hover {
  opacity: 1;
}
      
.info-txt {
  color: rgb(10, 10, 10);
  text-align: center;
}

#message {
  color: red;
  font-weight: bold;
}

.error-message {
  position:absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 400px;
  height: 150px;
  border: 2px solid black;
  border-radius: 5px;
  background-color: white;
  font-size: 1.2rem;
  font-weight: 500;
}

/* =========================================================
   MODE MESSAGE PONCTUEL (activation manuelle)
   ========================================================= */
.flash-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 200px;
  background: rgba(0,0,0,0.25);
  z-index: 99999;
}

.flash-modal{
  width: 560px;
  max-width: 92vw;
  background: #fff;
  border-radius: 14px;
  padding: 22px 18px;
  border: 2px solid #be01fe;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.30);
}

.flash-modal h2{
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #be01fe;
}

.flash-modal p{
  font-size: 1.05rem;
  line-height: 1.4;
}



/* ********** Start MARK:MEDIA QUERIES ************ */



/* =========================
   LAPTOP (<= 1024px)
   ========================= */
@media (max-width: 1024px) {
  .main-container {
    height: auto;
    min-height: 100vh;
    padding: 30px 0 70px;
  }

  .card-body {
    top: 0;
    width: 560px;
    margin: 120px auto 0;
    padding: 34px 34px;
  }

  .notice-message {
    width: 100%;
    height: auto;
    min-height: 140px;
    padding: 18px 18px;
  }

  .course-info p {
    font-size: 1.55rem;
  }

  .available-places-text {
    font-size: 1.2rem;
  }

  .flash-modal {
    width: 520px;
  }

  .flash-overlay {
    padding-top: 200px;
  }
}


/* =========================
   TABLETTE + PETITS ÉCRANS (<= 768px)
   ========================= */
@media (max-width: 768px) {
  .main-container {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 110px 16px 60px;
  }

  .card-body {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: min(560px, 92vw);
    margin: 0 auto;
    padding: 28px 22px;
    margin: 0 auto;
    padding: 28px 22px;
  }

  .course-info p {
    font-size: 1.45rem;
  }

  .available-places-text {
    font-size: 1.15rem;
  }

  .form {
    padding: 16px 0;
  }

  .form label {
    font-size: 1.05rem;
  }

  .form input {
    height: 44px;
    font-size: 1rem;
  }

  .form button {
    width: 100%;
    max-width: 320px;
    margin-top: 28px;
    left: 50%;
    transform: translateX(-50%);
  }

  .flash-overlay {
    align-items: flex-start;
    padding-top: 175px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .flash-modal {
    width: 92vw;
    max-width: 520px;
  }

  .error-message {
    width: 92vw;
    max-width: 400px;
    height: auto;
    padding: 14px;
  }    

}


/* =========================
   MOBILE L (<= 425px)
   ========================= */
 
  @media (max-width: 426px) { 
    .main-container { 
      width: 100%; 
      max-width: 100%; 
      margin: 0;
      margin-top: -80px;
      padding: 110px 0 60px; 
      min-height: 100vh;
      grid-column: 1 / -1; 
      justify-self: stretch;
      align-self: stretch;
    } 
      
      .card-body { 
      width: 94vw; 
      margin: 0 auto; 
      padding: 22px 16px; 
      border-radius: 12px;
    } 
      .card-body h1 { 
        font-size: 1.7rem; 
      } 
    
    .flash-overlay { 
      padding-top: 145px;
    }
      
    } 

/* =========================
   MOBILE S (<= 320px)
   ========================= */
@media (max-width: 321px) {
  .main-container {
    padding: 85px 0 45px;
  }

  .card-body h1 {
    font-size: 1.5rem;
  }

  .course-info p {
    font-size: 1.15rem;
  }

  .flash-overlay {
    padding-top: 135px;
  }

  .flash-modal h2 {
    font-size: 1.1rem;
  }

  .flash-modal p {
    font-size: 0.95rem;
  }

  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: center;
  }
}
