* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #2b3d63;
    min-height: 100vh;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.widget {
    width: calc(100vw - 36px);
    max-width: none;
    height: min(760px, 100vh - 36px);
    background: #2b3d63;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #ffffff;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 18px 6px;
}

.logo {
    height: 32px;
    width: auto;
}


.widget-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 6px 18px 18px;
    flex: 1;
    overflow: hidden;
    width: 100%;
}

.hero {
    padding: 8px 0 6px;
    text-align: center;
}

.hero-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.8);
}

.chat-container {
    background: #ffffff;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(10, 20, 40, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.message {
    max-width: 85%;
    min-width: 120px;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    font-size: 0.95rem;
}

.message.bot {
    align-self: flex-start;
    background: #f1f4fb;
    color: #1f2a44;
    border-bottom-left-radius: 6px;
}

.message.user {
    align-self: flex-end;
    background: #2b3d63;
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

.action-buttons {
    padding: 14px 16px;
    display: flex;
    gap: 10px;
    justify-content: center;
    border-top: 1px solid #e7ecf5;
    background: #ffffff;
}

.action-button {
    padding: 10px 16px;
    background: #f1f4fb;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: #1f2a44;
}

.action-button:hover {
    background: #e6ebf5;
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input-container {
    padding: 14px 16px;
    border-top: 1px solid #e7ecf5;
    background: #ffffff;
}

.chat-form {
    display: flex;
    gap: 12px;
}

.message-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d5ddeb;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    background: #f7f9fd;
    color: #1f2a44;
}

.message-input:focus {
    border-color: #4c6fff;
}

.send-button {
    padding: 12px 18px;
    background: #2b3d63;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s;
}

.send-button:hover {
    background: #223252;
}

/* Rendez-vous modal */
.rdv-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.rdv-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
}

.rdv-modal__card {
    position: relative;
    background: #ffffff;
    color: #1f2a44;
    width: min(520px, 92vw);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 18px 40px rgba(10, 20, 40, 0.35);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rdv-modal__close {
    position: absolute;
    right: 16px;
    top: 12px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    color: #5f6c86;
    cursor: pointer;
}

.rdv-modal__subtitle {
    font-size: 0.9rem;
    color: #5f6c86;
}

.rdv-modal__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rdv-modal__field label {
    font-size: 0.85rem;
    font-weight: 600;
}

.rdv-modal__field input {
    padding: 10px 12px;
    border: 1px solid #d5ddeb;
    border-radius: 10px;
    font-size: 0.95rem;
}

.rdv-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.rdv-slot {
    padding: 8px 12px;
    border: 1px solid #d5ddeb;
    background: #f7f9fd;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.rdv-slot.is-selected {
    border-color: #2b3d63;
    background: #2b3d63;
    color: #ffffff;
}

.rdv-modal__actions {
    display: flex;
    justify-content: flex-end;
}

.rdv-submit {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #2b3d63;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.rdv-submit:disabled {
    background: #9aa5bd;
    cursor: not-allowed;
}

/* Email form styles */
.email-form-container {
    margin-top: 12px;
}

.email-form-container p {
    margin-bottom: 8px;
    color: #1f2a44;
}

.email-form {
    display: flex;
    gap: 8px;
}

.email-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d5ddeb;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    background: #f7f9fd;
    color: #1f2a44;
}

.email-input:focus {
    border-color: #4c6fff;
}

.email-submit-button {
    padding: 10px 18px;
    background: #2b3d63;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
}

.email-submit-button:hover:not(:disabled) {
    background: #223252;
}

.email-submit-button:disabled {
    background: #9aa5bd;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .widget {
        height: calc(100vh - 24px);
    }

    .message {
        max-width: 90%;
    }

    .chat-form {
        flex-direction: column;
    }

    .send-button {
        width: 100%;
    }
}
