/* Styles personnalisés pour Contact Form 7 */

/* Style pour l'input file (drag & drop) */
.wpcf7-form .wpcf7-file-upload-container {
    position: relative;
    width: 100%;
}

.wpcf7-form .file-upload-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
    border: 2px dashed #1F4A7C;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #F5F9FF;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.wpcf7-form .file-upload-wrapper:hover,
.wpcf7-form .file-upload-wrapper.drag-over {
    background-color: #E6EFF9;
    border-color: #3771b4;
}

.wpcf7-form .file-upload-message {
    text-align: center;
    padding: 15px;
    color: #666;
}

.wpcf7-form .file-upload-text {
    font-size: 16px;
}

.wpcf7-form .file-upload-info {
    font-size: 12px;
    color: #888;
}

.wpcf7-form .wpcf7-file {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.wpcf7-form .file-preview {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wpcf7-form .file-name {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.wpcf7-form .file-name:before {
    content: "📄";
    margin-right: 8px;
}

/* Style pour les cases à cocher standard */
.wpcf7-form input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid #1F4A7C;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

.wpcf7-form input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1F4A7C;
    font-size: 14px;
    font-weight: bold;
}

/* Supprimer les sauts de ligne dans les labels de checkbox */
.wpcf7-form input[type="checkbox"] + br {
    display: none;
}

/* Style pour le champ select */
.wpcf7-form select {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    background-color: transparent;
    outline: none;
    color: #333;
    font-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' fill='none'%3E%3Cpath stroke='%231F4A7C' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 5 4 5-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
}

/* Focus state pour le select */
.wpcf7-form select:focus {
    border-bottom-color: #1F4A7C;
}

/* Style pour le placeholder du select */
.wpcf7-form select option[disabled][selected][hidden] {
    color: #999;
}

/* Style pour les options du select */
.wpcf7-form select option {
    color: #333;
    background-color: #fff;
    padding: 8px;
}

/* Style pour le conteneur du select Poste */
.wpcf7-form p:first-child {
    position: relative;
    margin-bottom: 25px;
}

/* Masquer complètement le texte du label mais conserver l'astérisque */
.wpcf7-form p:first-child > label {
    position: relative;
    color: transparent; /* Rend le texte invisible */
    font-size: 0; /* Réduit la taille du texte à zéro */
    line-height: 0;
    display: block;
    height: 20px; /* Hauteur minimale pour l'astérisque */
    overflow: hidden;
}

/* Afficher uniquement l'astérisque */
.wpcf7-form p:first-child > label::after {
    content: "*"; /* Ajoute l'astérisque */
    color: red; /* Couleur de l'astérisque */
    font-size: 16px; /* Taille de l'astérisque */
    position: absolute;
    top: 0;
    right: 0;
}

/* Supprimer les sauts de ligne dans le label */
.wpcf7-form p:first-child > label br {
    display: none;
}

/* Ajouter un pseudo-élément pour afficher un label personnalisé */
.wpcf7-form p:first-child::before {
    content: "Sélectionnez votre poste"; /* Texte du label personnalisé */
    display: block;
    font-size: 14px;
    color: #1F4A7C;
    margin-bottom: 5px;
}

/* Style pour le select */
.wpcf7-form span[data-name="Poste"] select {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    background-color: transparent;
    outline: none;
    color: #333;
    font-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' fill='none'%3E%3Cpath stroke='%231F4A7C' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 5 4 5-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
}

/* Focus state pour le select */
.wpcf7-form span[data-name="Poste"] select:focus {
    border-bottom-color: #1F4A7C;
}

/* Style pour le placeholder du select */
.wpcf7-form span[data-name="Poste"] select option[disabled][selected][hidden] {
    color: #999;
}

/* Style pour les options du select */
.wpcf7-form span[data-name="Poste"] select option {
    color: #333;
    background-color: #fff;
    padding: 8px;
}

/* Style pour le bouton d'envoi */
.wpcf7-form .wpcf7-submit {

    border-radius: 40px !important;
}
