.wpcf7 .upload-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    width: 100%;
    transition: all 0.3s ease;
    border: 1px solid #a63faa80 !important;
}

.wpcf7 .upload-area {
    border: 2px dashed #0061ff;
    border-radius: 12px;
    padding: 2rem 1.5rem 0 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: linear-gradient(45deg, rgba(0, 97, 255, 0.02), rgba(0, 97, 255, 0.05));
}

.wpcf7 .upload-area:hover {
    border-color: #0047d0;
    background: linear-gradient(45deg, rgba(0, 97, 255, 0.05), rgba(0, 97, 255, 0.08));
    transform: translateY(-2px);
}

.wpcf7 .upload-area.dragover {
    border-color: #0047d0;
    background: linear-gradient(45deg, rgba(0, 97, 255, 0.1), rgba(0, 97, 255, 0.15));
    transform: scale(1.02);
}

.wpcf7 .upload-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #0061ff, #0047d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wpcf7 .upload-area:hover .upload-icon {
    transform: scale(1.1);
}

.wpcf7 .upload-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.wpcf7 .upload-text {
    color: #1e1919;
    margin-bottom: 10px;
}

.wpcf7 .upload-text h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 0;
}

.wpcf7 .upload-text p {
    color: #637282;
    font-size: 16px;
    line-height: 1.4;
}

.wpcf7 .file-input {
    display: none;
}

.wpcf7 .progress-container {
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.wpcf7 .progress-container.show {
    opacity: 1;
    transform: translateY(0);
}

.wpcf7 .progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.wpcf7 .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0061ff, #0047d0);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wpcf7 .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.wpcf7 .progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #637282;
    font-size: 14px;
}

.wpcf7 .file-count {
    font-weight: 600;
    color: #0061ff;
}

.wpcf7 .file-list {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.wpcf7 .file-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.3s ease forwards;
}

.wpcf7 .file-item:last-child {
    border-bottom: none;
}

.wpcf7 .file-icon {
    width: 32px;
    height: 32px;
    background: #0061ff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
}

.wpcf7 .file-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.wpcf7 .file-info {
    flex: 1;
}

.wpcf7 .file-name {
    font-weight: 500;
    color: #1e1919;
    margin-bottom: 2px;
}

.wpcf7 .file-size {
    color: #637282;
    font-size: 12px;
}


/* Spinner de chargement */
.wpcf7 .file-loading-spinner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.wpcf7 .file-loading-spinner::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.wpcf7 .file-item:not(.done) .file-loading-spinner {
  display: flex !important;
}

.wpcf7 .file-item:not(.done) .file-icon svg {
  opacity: 0 !important;
}

.login-form input[type="submit"] {
    background-color: #9e2586 !important;
    color: white !important;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wpcf7 .auth-section {
    margin-bottom: 30px;
    text-align: center;
}

.wpcf7 .auth-btn {
    padding: 12px 24px;
    background: #0061ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 10px;
}

.wpcf7 .auth-btn:hover {
    background: #0047d0;
    transform: translateY(-1px);
}

.wpcf7 .auth-btn.connected {
    background: #00b341;
}

.wpcf7 .auth-status {
    margin: 15px 0;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
}

.wpcf7 .auth-status.connected {
    background: #e8f5e8;
    color: #00b341;
    border: 1px solid #00b341;
}

.wpcf7 .auth-status.disconnected {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #f57c00;
}

.wpcf7 .folder-input {
    margin: 15px 0;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    width: 100%;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.wpcf7 .folder-input:focus {
    outline: none;
    border-color: #0061ff;
}

.wpcf7 .upload-area.disabled {
    pointer-events: none;
}

.wpcf7 .upload-area.disabled > div{
    opacity: 0.5;
}

.wpcf7 .success-message {
    text-align: center;
    color: #00b341;
    font-weight: 600;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.wpcf7 .error-message {
    text-align: center;
    color: #d32f2f;
    font-weight: 600;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.wpcf7 .success-message.show,
.wpcf7 .error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.wpcf7 .file-item.uploading { opacity: .8; }

.wpcf7 span[data-name="lien_fichier_telechargement"], .wpcf7 span[data-name="nom_fichier"] {
    display: none;
}

.wpcf7-form-control:not(.wpcf7-checkbox):not(.wpcf7-radio) {
    height: auto !important;
    outline: none !important;
    background: white !important;
    border-radius: 16px !important;
    padding: 1.5rem 2rem !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
    border: 1px solid #a63faa80 !important;
    font-family: Roboto, "sans-serif" !important;
    font-size: 1.5rem !important;
    color: rgb(30, 25, 25) !important;
    font-weight: bold;
}

.wpcf7 .d-col-flex{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 2rem;
}

.wpcf7 label{
    width: 100% !important;
}

.wpcf7 .wpcf7-spinner{
    position: absolute;

    top: 50%;
    right: 0;

    transform: translateY(-87%);
}

.wpcf7 .bot-form{
    position: relative;
}

.wpcf7-form-control.wpcf7-submit:not(.wpcf7-checkbox):not(.wpcf7-radio) {
    background-color: #9e2586 !important;
    color: white !important;
}

@media screen and (min-width: 992px) {
	
    .wpcf7 .row-flex{
        display: flex;
    }

}

/* FORMULAIRE DE CONNEXION */ 

.login-form input {
    height: auto !important;
    outline: none !important;
    background: white !important;
    border-radius: 16px !important;
    padding: 1.5rem 2rem !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
    border: 1px solid #a63faa80 !important;
    font-family: Roboto, "sans-serif" !important;
    font-size: 1.5rem !important;
    color: rgb(30, 25, 25) !important;
}

/* Classes de désactivation avec tooltips */

/* État désactivé général */
.wpcf7 .upload-area.disabled {
    cursor: not-allowed;
    position: relative;
}

/* Bloquer les clics mais permettre le hover pour le tooltip */
.wpcf7 .upload-area.disabled * {
    pointer-events: none;
}

/* État désactivé - Dropbox non connecté */
.wpcf7 .upload-area.disabled-dropbox {
    cursor: not-allowed;
    border-color: #f44336 !important;
    background: linear-gradient(45deg, rgba(244, 67, 54, 0.02), rgba(244, 67, 54, 0.05)) !important;
}

.wpcf7 .upload-area.disabled-dropbox > div{
    opacity: 0.5;
}

.wpcf7 .upload-area.disabled-dropbox * {
    pointer-events: none;
}

/* État désactivé - Champs formulaire non remplis */
.wpcf7 .upload-area.disabled-form {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(45deg, rgba(255, 152, 0, 0.02), rgba(255, 152, 0, 0.05)) !important;
}

.wpcf7 .upload-area.disabled-form * {
    pointer-events: none;
}

/* Tooltip pour les zones désactivées */
.wpcf7 .upload-area.disabled[title]::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #333;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

.wpcf7 .upload-area.disabled[title]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 8px solid transparent;
    border-top-color: #333;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.wpcf7 .upload-container:hover .upload-area.disabled[title]::after,
.wpcf7 .upload-container:hover .upload-area.disabled[title]::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip spécifique pour erreur Dropbox (rouge) */
.wpcf7 .upload-area.disabled-dropbox[title]::after {
    background: #d32f2f;
}

.wpcf7 .upload-area.disabled-dropbox[title]::before {
    border-top-color: #d32f2f;
}

/* Ajustement responsive pour les tooltips */
@media screen and (max-width: 768px) {
    .wpcf7 .upload-area.disabled[title]::after {
        left: 10px;
        right: 10px;
        transform: translateX(0) translateY(10px);
        max-width: none;
        white-space: normal;
    }
    
    .wpcf7 .upload-area.disabled[title]::before {
        left: 50%;
        transform: translateX(-50%) translateY(10px);
    }
    
    .wpcf7 .upload-container:hover .upload-area.disabled[title]::after {
        transform: translateX(0) translateY(0);
    }
    
    .wpcf7 .upload-container:hover .upload-area.disabled[title]::before {
        transform: translateX(-50%) translateY(0);
    }
}

/* Animation pour l'icône dans l'état désactivé */
.wpcf7 .upload-area.disabled .upload-icon {
    background: linear-gradient(135deg, #9e9e9e, #757575);
}

.wpcf7 .upload-area.disabled-dropbox .upload-icon {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    animation: pulse-error 2s ease-in-out infinite;
}

@keyframes pulse-error {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Afficher le conteneur de progression dès qu'il y a des fichiers */
.wpcf7 .progress-container {
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: none;
}

.wpcf7 .progress-container.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Ajout au CSS existant pour le bouton de suppression */

.wpcf7 .file-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.3s ease forwards;
    position: relative;
}

.wpcf7 .file-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wpcf7 .file-details {
    flex: 1;
    max-width: 100%;
}

.wpcf7 .file-name {
    font-weight: 500;
    color: #1e1919;
    margin-bottom: 2px;
    max-width: 100%;
    text-overflow: "…";
    overflow: hidden;
    white-space: nowrap;
}

.wpcf7 .file-size {
    color: #637282;
    font-size: 12px;
}

.wpcf7 .file-delete {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eee;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wpcf7 .file-delete:hover {
    transform: scale(1.1);
}

.wpcf7 .file-delete svg {
    width: 12px;
    height: 12px;
    fill: red;
}