#chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #606C5A;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

#chat-toggle:hover {
    transform: scale(1.1);
}

#chat-toggle img {
    width: 70%;
    height: auto;
}

#chatbot-container {
    position: fixed;
    margin-top: 50px; /* Créer un espace en haut */
    bottom: auto;
    top: 50%; /* Centrer verticalement */
    right: 20px;
    width: 350px;
    height: 65vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transform: translateY(-50%) translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

#chatbot-container.active {
    transform: translateY(-50%) translateY(0);
    opacity: 1;
}

#chat-header {
    background: #606C5A;
    color: white;
    padding: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

#close-chat:hover {
    background: rgba(255,255,255,0.2);
}

#chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
}

/* Réduire l'espacement spécifiquement pour le message de bienvenue */
#chat-messages .message.bot:first-child {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

.message {
    padding: 0px Opx;
    border-radius: 18px;
    margin-bottom: 12px;
    max-width: 80%;
	white-space: pre-wrap; /* Conserve les sauts de ligne */
    word-wrap: break-word;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
	padding: 8px 8px;
    background: #606C5A;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
	white-space: pre-wrap; /* Conserve les sauts de ligne */
    word-wrap: break-word;
    line-height: 1.4;
}

.message.bot {
    padding: 8px 8px;
    background: #e5e7eb;
    color: #1f2937;
    margin-right: auto;
    border-bottom-left-radius: 4px;
	white-space: pre-wrap; /* Conserve les sauts de ligne */
    word-wrap: break-word;
    line-height: 1.4;
}

#captcha-section {
    padding: 10px 15px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

#chat-input-section {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    background: white;
}

#chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 10px 15px;
    resize: none;
    outline: none;
    max-height: 100px;
    font-family: inherit;
    font-size: 0.9rem;
}

#chat-input:focus {
    border-color: #606C5A;
}

#send-btn {
    background: #606C5A;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 20px;
    margin-left: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

#send-btn:hover {
    background: #1d4ed8;
}

#chat-footer {
    padding: 8px 15px;
    background: #f3f4f6;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}

#email-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-content h3 {
    margin-top: 0;
    color: #1f2937;
    font-size: 1.3rem;
}

#user-email {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 1rem;
    box-sizing: border-box;
}

#user-email:focus {
    border-color: #606C5A;
    outline: none;
}

#save-email-btn {
    background: #606C5A;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
}

#save-email-btn:hover {
    background: #1d4ed8;
}

/* Correction pour le conteneur hCaptcha */
#captcha-section .h-captcha {
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    margin: 10px auto;
    display: inline-block;
}

#hcaptcha-container {
    display: inline-block;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    margin: 10px auto;
}

#close-email-modal {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
}

#close-email-modal:hover {
    background: #5a6268;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

/* Correction pour le conteneur hCaptcha */
#hcaptcha-container {
    display: inline-block;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    margin: 10px auto;
}

/* Styles pour la page d'administration */
.wp-list-table .check-column {
    width: 2em;
    vertical-align: middle;
}

.wp-list-table th.check-column,
.wp-list-table td.check-column {
    padding: 8px 10px;
}

.wp-list-table th#cb {
    width: 2.2em;
}

.tablenav .actions {
    padding: 8px 0;
}
