/* Masquer l'ancien chat Step3 */

#nsSupportChatWidget {

    display: none !important;

}



.ns-appt-assistant {

    position: fixed;

    right: 18px;

    bottom: 18px;

    z-index: 99999;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

}



.ns-appt-assistant-fab {

    position: relative;

    width: 58px;

    height: 58px;

    border-radius: 50%;

    border: none;

    padding: 0;

    overflow: hidden;

    background: #fff;

    box-shadow: 0 8px 24px rgba(107, 151, 0, 0.45);

    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease;

    outline: 3px solid #fff;

}



.ns-appt-assistant-fab-photo {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

}



.ns-appt-assistant-fab:hover {

    transform: translateY(-2px);

    box-shadow: 0 12px 28px rgba(107, 151, 0, 0.5);

}



.ns-appt-assistant-fab-icon {

    font-size: 22px;

    line-height: 1;

}



.ns-appt-assistant-fab-pulse {

    position: absolute;

    inset: -4px;

    border-radius: 50%;

    border: 2px solid rgba(131, 183, 0, 0.55);

    animation: nsApptPulse 2s ease-out infinite;

    pointer-events: none;

}



.ns-appt-assistant-fab.is-open .ns-appt-assistant-fab-pulse {

    display: none;

}



@keyframes nsApptPulse {

    0% { transform: scale(0.95); opacity: 0.9; }

    70% { transform: scale(1.2); opacity: 0; }

    100% { transform: scale(1.2); opacity: 0; }

}



.ns-appt-assistant-badge {

    position: absolute;

    top: -2px;

    right: -2px;

    min-width: 20px;

    height: 20px;

    padding: 0 5px;

    border-radius: 99px;

    background: #ef4444;

    color: #fff;

    font-size: 11px;

    font-weight: 700;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 2px solid #fff;

}



.ns-appt-assistant-panel {

    position: absolute;

    right: 0;

    bottom: 72px;

    width: 360px;

    max-width: calc(100vw - 24px);

    height: 480px;

    max-height: min(480px, calc(100vh - 100px));

    background: #fff;

    border-radius: 18px;

    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);

    display: flex;

    flex-direction: column;

    overflow: hidden;

    border: 1px solid #e8ecef;

    animation: nsApptSlideUp 0.28s ease;

}



@keyframes nsApptSlideUp {

    from { opacity: 0; transform: translateY(12px); }

    to { opacity: 1; transform: translateY(0); }

}



.ns-appt-assistant-header {

    flex-shrink: 0;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 14px 14px 12px;

    background: linear-gradient(135deg, #f4f9ec 0%, #eef5e3 100%);

    border-bottom: 1px solid #e2e8d8;

}



.ns-appt-assistant-avatar {

    width: 40px;

    height: 40px;

    border-radius: 50%;

    background: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    border: 2px solid #fff;

    box-shadow: 0 2px 6px rgba(0,0,0,0.08);

}



.ns-appt-assistant-avatar img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}



.ns-appt-assistant-header-text {

    flex: 1;

    min-width: 0;

}



.ns-appt-assistant-header-text strong {

    display: block;

    font-size: 14px;

    color: #1a1a1a;

}



.ns-appt-assistant-header-text span {

    font-size: 11px;

    color: #6b7280;

}



.ns-appt-assistant-header-actions {

    display: flex;

    gap: 4px;

}



.ns-appt-assistant-icon-btn {

    width: 30px;

    height: 30px;

    border: none;

    border-radius: 8px;

    background: rgba(255,255,255,0.7);

    color: #6b7280;

    cursor: pointer;

}



.ns-appt-assistant-icon-btn:hover {

    background: #fff;

    color: #1a1a1a;

}



/* Un seul scroll: zone messages */

.ns-appt-assistant-body {

    flex: 1;

    min-height: 0;

    display: flex;

    flex-direction: column;

    overflow: hidden;

    background: #fafbf8;

}



.ns-appt-assistant-messages {

    flex: 1;

    min-height: 0;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 14px;

    display: flex;

    flex-direction: column;

    gap: 10px;

    -webkit-overflow-scrolling: touch;

}



.ns-appt-msg {

    max-width: 88%;

    padding: 10px 13px;

    border-radius: 14px;

    font-size: 13px;

    line-height: 1.45;

    word-break: break-word;

}



.ns-appt-msg-bot {

    align-self: flex-start;

    background: #fff;

    color: #1f2937;

    border: 1px solid #e8ecef;

    border-bottom-left-radius: 4px;

}



.ns-appt-msg-user {

    align-self: flex-end;

    background: #83b700;

    color: #fff;

    border-bottom-right-radius: 4px;

}



.ns-appt-msg-recap {

    align-self: flex-start;

    background: #f0f7e6;

    border: 1px solid #dce8c8;

    color: #374151;

    max-width: 92%;

    white-space: pre-line;

}



.ns-appt-assistant-typing {

    flex-shrink: 0;

    display: flex;

    align-items: center;

    gap: 6px;

    padding: 0 16px 8px;

    font-size: 11px;

    color: #9ca3af;

}



.ns-appt-assistant-typing span {

    width: 6px;

    height: 6px;

    border-radius: 50%;

    background: #83b700;

    animation: nsApptTyping 1.2s infinite ease-in-out;

}



.ns-appt-assistant-typing span:nth-child(2) { animation-delay: 0.15s; }

.ns-appt-assistant-typing span:nth-child(3) { animation-delay: 0.3s; }



@keyframes nsApptTyping {

    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }

    40% { transform: scale(1); opacity: 1; }

}



.ns-appt-choice {

    align-self: stretch;

    text-align: left;

    border: 1.5px solid #dce8c8;

    background: #f8fbf3;

    border-radius: 12px;

    padding: 10px 12px;

    font-size: 12px;

    cursor: pointer;

    transition: all 0.15s ease;

    font-family: inherit;

    color: #374151;

    width: 100%;

    max-width: 100%;

}



.ns-appt-choice:hover {

    border-color: #83b700;

    background: #eef6e0;

}



.ns-appt-choice strong {

    display: block;

    color: #1a1a1a;

    font-size: 13px;

    margin-bottom: 2px;

}



.ns-appt-choice span {

    color: #6b7280;

}



.ns-appt-assistant-input-row {

    flex-shrink: 0;

    display: flex;

    align-items: flex-end;

    gap: 8px;

    padding: 10px 12px 12px;

    border-top: 1px solid #eef0f2;

    background: #fff;

}



.ns-appt-assistant-input {

    flex: 1;

    border: 1.5px solid #e5e7eb;

    border-radius: 10px;

    padding: 10px 12px;

    font-size: 13px;

    font-family: inherit;

    outline: none;

    resize: none;

    overflow-y: hidden;

    min-height: 42px;

    max-height: 120px;

    line-height: 1.35;

    box-sizing: border-box;

}



.ns-appt-assistant-input:focus {

    border-color: #83b700;

    box-shadow: 0 0 0 3px rgba(131, 183, 0, 0.12);

}



.ns-appt-assistant-send {

    width: 42px;

    height: 42px;

    border: none;

    border-radius: 10px;

    background: #83b700;

    color: #fff;

    cursor: pointer;

}



.ns-appt-assistant-send:hover {

    background: #6b9700;

}



@media (max-width: 480px) {

    .ns-appt-assistant {

        right: 12px;

        bottom: 12px;

    }



    .ns-appt-assistant-panel {

        width: calc(100vw - 24px);

        height: min(70vh, 420px);

        max-height: min(70vh, 420px);

        bottom: 68px;

    }

}


