/* Floating Button Container */
.floating-button-container {
   position: fixed;
   top: 50%;
   right: 30px;
   transform: translateY(-50%);
   z-index: 1000;
   display: flex;
   align-items: center;
   gap: 15px;
}

/* CTA Text Styles */
.cta-text {
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: white;
   padding: 12px 18px;
   border-radius: 25px;
   box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
   animation: slideInRight 0.8s ease-out, bounce-cta 3s infinite 2s;
   position: relative;
   overflow: hidden;
}

.cta-text::before {
   content: '';
   position: absolute;
   top: 0;
   left: -100%;
   width: 100%;
   height: 100%;
   background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
   animation: shimmer 2s infinite;
}

.cta-message {
   display: block;
   font-weight: 600;
   font-size: 14px;
   margin-bottom: 2px;
}

.cta-subtitle {
   display: block;
   font-size: 11px;
   opacity: 0.9;
   font-weight: 400;
}

/* Floating WhatsApp Button Styles */
.btn-floating-whatsapp {
   position: relative;
   width: 70px;
   height: 70px;
   border-radius: 50%;
   background: linear-gradient(135deg, #25D366, #128C7E) !important;
   border: none;
   box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
   z-index: 1001;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 32px;
   color: white;
   transition: all 0.3s ease;
   animation: pulse-whatsapp 2s infinite, bounce-button 4s infinite;
   overflow: hidden;
}

.btn-floating-whatsapp:hover {
   transform: scale(1.15) rotate(5deg);
   box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
   color: white;
}

.btn-floating-whatsapp:focus {
   box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
   color: white;
}

/* Ripple Effect */
.ripple-effect {
   position: absolute;
   top: 50%;
   left: 50%;
   width: 0;
   height: 0;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.3);
   transform: translate(-50%, -50%);
   animation: ripple 2s infinite;
}

.ripple-effect:nth-child(2) {
   animation-delay: 0.5s;
}

.ripple-effect:nth-child(3) {
   animation-delay: 1s;
}

.notification-badge {
   position: absolute;
   top: -8px;
   right: -8px;
   width: 24px;
   height: 24px;
   background: linear-gradient(135deg, #e74c3c, #c0392b);
   border-radius: 50%;
   border: 3px solid white;
   animation: pulse-notification 1.5s infinite, shake-badge 2s infinite 3s;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 10px;
   font-weight: bold;
   color: white;
   box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.notification-badge::before {
   content: '!';
}

@keyframes pulse-whatsapp {
   0% { 
      box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
   }
   50% { 
      box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6), 0 0 0 15px rgba(37, 211, 102, 0.1);
   }
   100% { 
      box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
   }
}

@keyframes pulse-notification {
   0% { transform: scale(1); }
   50% { transform: scale(1.3); }
   100% { transform: scale(1); }
}

@keyframes bounce-button {
   0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
   40% { transform: translateY(-10px); }
   60% { transform: translateY(-5px); }
}

@keyframes bounce-cta {
   0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
   40% { transform: translateX(-5px); }
   60% { transform: translateX(-2px); }
}

@keyframes slideInRight {
   0% { 
      opacity: 0;
      transform: translateX(100px);
   }
   100% { 
      opacity: 1;
      transform: translateX(0);
   }
}

@keyframes shimmer {
   0% { left: -100%; }
   100% { left: 100%; }
}

@keyframes ripple {
   0% {
      width: 0;
      height: 0;
      opacity: 1;
   }
   100% {
      width: 100px;
      height: 100px;
      opacity: 0;
   }
}

@keyframes shake-badge {
   0%, 100% { transform: translateX(0); }
   10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
   20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* Modal Chat Styles */
.modal-dialog-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 639px;
    height: 100vh;
    margin: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.modal.show .modal-dialog-right {
    transform: translateX(0);
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.3);
}

.chat-container-modal {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.chat-messages-modal {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #e5ddd5;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    max-height: calc(100vh - 200px);
}

.message-modal {
    margin-bottom: 15px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-modal.bot {
    display: flex;
    align-items: flex-start;
}

.message-modal.user {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.message-avatar-modal {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.bot .message-avatar-modal {
    background: linear-gradient(135deg, #3498db, #e74c3c);
}

.user .message-avatar-modal {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    margin-right: 0;
    margin-left: 10px;
}

.message-content-modal {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.bot .message-content-modal {
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border-radius: 18px 18px 18px 4px;
    position: relative;
}

.bot .message-content-modal::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent white transparent transparent;
    z-index: 1;
}

.bot .message-content-modal::after {
    content: '';
    position: absolute;
    left: -9px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #e9ecef transparent transparent;
    z-index: 0;
}

.user .message-content-modal {
    background: #dcf8c6;
    color: #303030;
    border-radius: 18px 18px 4px 18px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.user .message-content-modal::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #dcf8c6;
    z-index: 1;
}

.user .message-content-modal::after {
    content: '';
    position: absolute;
    right: -9px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #dcf8c6;
    z-index: 0;
}

.message-content-modal p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
    font-weight: 400;
}

.bot .message-content-modal p {
    color: #303030;
}

.user .message-content-modal p {
    color: #303030;
}

.welcome-message-modal {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 18px 18px 18px 4px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.welcome-message-modal::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent white transparent transparent;
    z-index: 1;
}

.welcome-message-modal::after {
    content: '';
    position: absolute;
    left: -9px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #e9ecef transparent transparent;
    z-index: 0;
}

.welcome-message-modal h6 {
    color: #303030;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 1rem;
}

.welcome-message-modal p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.service-options-modal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.service-option-modal {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 400;
    color: #303030;
    font-size: 0.85rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.service-option-modal:hover {
    border-color: #25D366;
    background: #f0f8f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.service-option-modal .icon {
    font-size: 1.2rem;
    margin-bottom: 6px;
    display: block;
}

.typing-indicator-modal {
    display: none;
    align-items: center;
    margin-bottom: 15px;
}

.typing-dots-modal {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.typing-dots-modal::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent white transparent transparent;
    z-index: 1;
}

.typing-dots-modal::after {
    content: '';
    position: absolute;
    left: -9px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #e9ecef transparent transparent;
    z-index: 0;
}

.typing-dots-modal span {
    height: 8px;
    width: 8px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots-modal span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots-modal span:nth-child(2) { animation-delay: -0.16s; }

.chat-input-container-modal {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.form-control {
    border-radius: 20px;
    border: 2px solid #e9ecef;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-send-modal {
    background: linear-gradient(135deg, #3498db, #5dade2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-send-modal:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
   .floating-button-container {
       top: 50%;
       right: 20px;
       transform: translateY(-50%);
       flex-direction: column;
       gap: 10px;
   }
   
   .cta-text {
       padding: 8px 14px;
       font-size: 12px;
   }
   
   .cta-message {
       font-size: 12px;
   }
   
   .cta-subtitle {
       font-size: 10px;
   }
   
   .btn-floating-whatsapp {
       width: 60px;
       height: 60px;
       font-size: 26px;
   }
   
   .notification-badge {
       width: 20px;
       height: 20px;
       font-size: 9px;
   }

    .modal-dialog-right {
        width: 100vw;
        height: 100vh;
    }

    .chat-container-modal {
        height: calc(100vh - 100px);
    }

    .chat-messages-modal {
        max-height: calc(100vh - 180px);
        padding: 15px;
    }

    .service-options-modal {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .service-option-modal {
        padding: 8px;
        font-size: 0.75rem;
    }

    .message-content-modal {
        max-width: 80%;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

/* Nav link highlight (TOUT DE SUITE) */
.nav-link-highlight {
    position: relative;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #0d6efd !important;
    isolation: isolate;
}

.nav-link-highlight::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 6px;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.nav-link-highlight:hover::after,
.nav-link-highlight:focus::after {
    transform: scaleX(1);
}

.nav-badge-new {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    font-size: 10px;
    line-height: 1;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7675, #d63031);
    color: white;
    text-transform: uppercase;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(214, 48, 49, 0.35);
    animation: badge-pulse 8s infinite;
}

@keyframes badge-pulse {
    0%, 70% { transform: scale(1); filter: brightness(1); }
    72% { transform: scale(1.08); filter: brightness(1.1); }
    74% { transform: scale(1); }
    76% { transform: scale(1.08); }
    78%, 100% { transform: scale(1); }
}

.nav-link-highlight {
    animation: link-attention 8s infinite;
}

@keyframes link-attention {
    0%, 70% { text-shadow: none; }
    72% { text-shadow: 0 0 0 rgba(13, 110, 253, 0); }
    74% { text-shadow: 0 0 12px rgba(13,110,253,0.4); }
    76% { text-shadow: 0 0 0 rgba(13, 110, 253, 0); }
    78% { text-shadow: 0 0 12px rgba(13,110,253,0.4); }
    80%, 100% { text-shadow: none; }
}