/*********** CANDIDATURE SPONTANÉE ***********/

#candidature-spontanee {
  display : none ;
  position: relative;
  padding-bottom: 2rem ;
  margin-bottom: 64px;
}

/* Image décorative qui chevauche le formulaire */
.cs-image-wrapper {
  position: absolute;
  top: 7%;
  left: 18%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.cs-image-deco {
  width: 800px;
  aspect-ratio: 1/1;
  display: block;
}

/* Conteneur principal */
.cs-conteneur {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: flex-start;
  background-color: var(--bleu-70);
  border-radius: 20px;
  box-shadow: 4px 6px 24px rgba(0, 0, 0, 0.1);
  padding: 60px;
}

.cs-col-desc,
.cs-col-desc h2,
.cs-col-desc h5,
.cs-col-desc p {
  color: white;
} 

/* Colonnes */
.cs-col-desc {
  flex: 1;
}

.cs-col-form {
  flex: 1;
}

/* Lignes du formulaire */
.cs-ligne {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.cs-champ {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cs-champ input, .cs-champ textarea {
  background-color: var(--bleu-70);
  color : white ;
}

.cs-champ input::placeholder, .cs-champ textarea::placeholder {
  color : rgba(255, 255, 255, 0.6) ;
}

.cs-champ-full {
  flex: 1 1 100%;
}

.cs-champ .legend {
  color: white;
  font-size: 10px ;
  margin: 0 ;
  margin-top: 4px;
}

.conteneur-lm {
  position: relative;
}

.conteneur-lm textarea {
  width: 100%;
  padding-bottom: 24px;
  resize: none;
  scrollbar-width: thin;
  scrollbar-color: white var(--bleu-70);
}

.conteneur-lm .compteur {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 14px;
  color : rgba(255, 255, 255, 0.6) ;
  margin: 0;
}

.conteneur-lm ::-webkit-scrollbar {
  width: 8px;
}

.conteneur-lm ::-webkit-scrollbar-track {
  background: var(--bleu-70);
  border-radius: 0 8px 8px 0;
}

.conteneur-lm ::-webkit-scrollbar-thumb {
  background: white;
  border-radius: 8px;
  cursor: default;
}

::-webkit-scrollbar-corner {
  background: transparent;
}


/* Inputs */
.cs-conteneur input[type="text"],
.cs-conteneur input[type="email"],
.cs-conteneur input[type="tel"],
.cs-conteneur textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.cs-conteneur input[type="text"]:focus,
.cs-conteneur input[type="email"]:focus,
.cs-conteneur input[type="tel"]:focus,
.cs-conteneur textarea:focus {
  border-color: #0a5adb;
}

.cs-conteneur textarea {
  min-height: 160px;
  resize: vertical;
}

/* Ligne RGPD */
.cs-ligne-rgpd {
  align-items: flex-start;
  gap: 12px;
}

.cs-ligne-rgpd input[type="checkbox"] {
  appearance: none;
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  background-color : var(--bleu-70);
  border: 1px solid white;  
  border-radius: 4px;
  display: grid;
  place-items: center;
}

.cs-ligne-rgpd input[type="checkbox"]:checked::after {
  content: "";
  position: absolute; 
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: translateY(-2px) rotate(45deg);
}

.cs-ligne-rgpd label {
  font-size: 14px;
  color: white;
  cursor: pointer;
}

.cs-ligne-rgpd label a {
  color :white;
}

/* Ligne actions */
.cs-ligne-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;  
  margin-bottom: 0;
}

.cs-ligne-actions > * {
  max-width: 60%;
}

/* Bouton importer CV */
.cs-bouton-cv {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #0a5adb;
  border: 1px solid white;
  color: white;
  border-radius: 75px;
  padding: 10px 20px;
  font-size: 15px;
  transition: background-color 0.2s;
  width: fit-content;
  height: fit-content;
  white-space: nowrap;
}

.cs-bouton-cv:hover {
  background-color: #0a2c7a;
}

/* Bouton envoyer */
.cs-bouton-envoyer {
  display: flex;
  cursor: pointer;
  background-color: white;
  color: #0a5adb;
  border: none;
  border-radius: 75px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}

.cs-bouton-envoyer:hover {
  background-color: #0a2c7a;
  color: white;
}

/* Mentions légales */
.cs-mentions-legales {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 16px;
  line-height: 1.5;
}

.cs-mentions-legales a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  font-size: 8px;
}

/* Messages succès / erreur */
.cs-message {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.cs-message-ok {
  background-color: #e6f4ea;
  color: #1a5c2a;
  border: 1px solid #52d59d;
}

.cs-message-erreur {
  background-color: #fdecea;
  color: #8b1a1a;
  border: 1px solid #f77129;
}

/*********** RESPONSIVE ***********/

@media (max-width: 900px) {

  .cs-image-wrapper {
    display: none;
  }

  .cs-conteneur {
    flex-direction: column;
    padding: 40px 30px;
    gap: 40px;
  }

  .cs-col-desc,
  .cs-col-form {
    flex: unset;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .cs-ligne {
    flex-direction: column;
    gap: 14px;
  }

  .cs-ligne-actions {
    flex-direction: column;
    align-items: stretch;
    align-items: center;
  }

  .cs-bouton-cv,
  .cs-bouton-envoyer {
    text-align: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  .cs-ligne-actions > * {
    max-width: none;
  }

  .cs-image-deco {
    max-width: 120px;
  }
}