/* _DIR__ /src/css/style.css */

@charset "UTF-8";

/* ==========================================================================
   1. REGLES GLOBALES ET LAYOUT DU BODY
   ========================================================================== */
html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  margin: 0;
  background-image: url("/fontaine/images/facade_479.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}

/* ==========================================================================
   2. CONTENEURS ET STRUCTURES DU FORMULAIRE (FLEXBOX)
   ========================================================================== */
.conteneur-formulaire {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

.FormulaireConnexion {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.ctn-fl {
  display: flex;
  flex-flow: row;
  box-sizing: border-box;
  justify-content: space-evenly;
  font-family: Verdana, Tahoma, sans-serif;
  height: 200px;
  margin-top: 10rem;
  width: 100%;
}

.el-fl {
  flex-basis: 5%;
  flex-grow: 1;
  box-sizing: border-box;
  margin: 10px;
  padding-top: 20px;
  text-align: center;
}

.el-fl-gd {
  flex-grow: 1;
  flex-shrink: 1;
}

.el-fl-ct {
  position: absolute;
  flex-basis: 250px;
  flex-grow: 0;
  flex-shrink: 0;
  background-color: rgb(133, 200, 139);
  border: 2px solid greenyellow;
  font-size: 16px;
  line-height: 1.2;
  margin-top: -15vh;
  left: 50%;
  text-align: center;
  transform: translateX(-50%);
}

form {
  flex-direction: column;
  border-color: greenyellow;
}

/* ==========================================================================
   3. CHAMPS ET BOUTONS DU FORMULAIRE
   ========================================================================== */
.el-fl-ct form input[type="email"],
.el-fl-ct form input[type="text"] {
  text-align: center;
  display: block;
  margin: 0 auto 15px auto;
  width: 90%;
  max-width: 300px;
  box-sizing: border-box;
}

.el-fl-ct form input[type="submit"] {
  display: block;
  margin: 35px auto 0 auto;
  text-align: center;
}

input[type="submit"] {
  background-color: rgb(105, 147, 197);
  border-radius: 0.2784em;
  box-shadow: 0.1392em 0.1392em 0em black;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-top: 25px;
  height: auto;
  width: auto;
  padding: 8px 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

input[type="submit"]:hover {
  background-color: rgb(85, 127, 177);
  box-shadow: 0.2000em 0.2000em 0em black;
}

input[type="submit"]:active {
  transform: translate(2px, 2px);
  box-shadow: 0.0500em 0.0500em 0em black;
}

input[type="submit"]:disabled {
  background-color: #a0a0a0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.ValiderErreur {
  color: #d9534f;
  background-color: #f2dede;
  border: 1px solid #ebccd1;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.form-loader-spacer {
  display: inline-block;
  width: 15px;
}

/* ==========================================================================
   4. CHARGEMENT & SPINNER (ANCRAGE PROPRE SANS !IMPORTANT)
   ========================================================================== */
/* Ancrage relatif des blocs parents pour le positionnement absolu du spinner */
#formCourriel, 
#formCode, 
#blocCourriel, 
#blocCode {
  position: relative;
}

/* Conteneur du loader centré proprement */
.form-loader-container {
  display: none; /* Activer via JS (display: flex) lors du chargement */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  width: auto;
  height: auto;
  padding: 15px;
  background: transparent;
  box-shadow: none;
  
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99;
}

.form-loader-container span {
  color: #ff6b00;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9);
  margin-top: 5px;
}

.mon-spinner-visuel {
  display: inline-block;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  background-color: #ffffff; 
  border: 4px solid rgba(255, 102, 0, 0.15); 
  border-top: 4px solid #ff6600; 
  border-radius: 50%;
  animation: spinRapide 0.8s linear infinite;
}

@keyframes spinRapide {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   5. CLOUDFLARE TURNSTILE & ETAT DESACTIVE
   ========================================================================== */
.turnstile-externe-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  width: 100%;
  clear: both;
}

.turnstile-externe-wrapper .cf-turnstile {
  display: inline-block;
  margin: 0 auto;
}

.form-block.form-desactive,
.form-block.form-desactive * {
  pointer-events: none;
}

.form-block.form-desactive .turnstile-externe-wrapper,
.form-block.form-desactive .cf-turnstile,
.form-block.form-desactive .cf-turnstile * {
  pointer-events: auto;
}