
/* Floating Button */
.diag-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #1a2e4a;
    color: #fff;
    padding: 15px 25px;
    border-radius: 0;
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(26, 46, 74, 0.4);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    animation: pulseDiag 2s infinite;
}
/* Variante ancrée en bas à droite du hero (page d'accueil) */
.diag-float-btn.in-hero {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 20;
    animation: diagAttention 3s ease-in-out infinite;
}

.diag-float-btn:hover {
    transform: translateY(-5px);
    background-color: #85a28d;
    box-shadow: 0 8px 25px rgba(133, 162, 141, 0.5);
    color: #fff;
}
/* Au survol, on coupe l'animation d'indication pour laisser place à l'effet hover (lift + halo) */
.diag-float-btn.in-hero:hover {
    animation: none;
}
/* Sur mobile/tablette, bouton compact pour ne pas masquer l'image du hero */
@media (max-width: 768px) {
    .diag-float-btn.in-hero {
        bottom: 12px;
        right: 12px;
        padding: 10px 14px;
        font-size: 12.5px;
        gap: 7px;
        max-width: 60%;
        line-height: 1.25;
    }
    .diag-float-btn.in-hero svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
}
.diag-float-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
@keyframes pulseDiag {
    0% { box-shadow: 0 0 0 0 rgba(26, 46, 74, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(26, 46, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26, 46, 74, 0); }
}
/* Animation d'indication : rebond + halo périodiques pour attirer l'œil */
@keyframes diagAttention {
    0%, 55%, 100% {
        transform: translateY(0);
        box-shadow: 0 4px 20px rgba(26, 46, 74, 0.4);
    }
    65% {
        transform: translateY(-8px);
        box-shadow: 0 18px 30px rgba(133, 162, 141, 0.55);
    }
    75% {
        transform: translateY(0);
    }
    85% {
        transform: translateY(-4px);
    }
    92% {
        transform: translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .diag-float-btn,
    .diag-float-btn.in-hero {
        animation: none;
    }
}

/* Popup Overlay */
.diag-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.diag-popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Popup Box */
.diag-popup-box {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    position: relative;
    text-align: center;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.diag-popup-overlay.active .diag-popup-box {
    transform: translateY(0) scale(1);
}

.diag-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
.diag-popup-close:hover {
    color: #1a2e4a;
}

.diag-popup-icon {
    width: 60px;
    height: 60px;
    background: #e8f5ee;
    color: #1a5c38;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.diag-popup-icon svg {
    width: 30px;
    height: 30px;
}

.diag-popup-box h2 {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 28px;
    color: #1a2e4a;
    margin-bottom: 15px;
}
.diag-popup-box p {
    font-size: 15px;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.6;
}
.diag-popup-btn {
    display: inline-block;
    background: #1a2e4a;
    color: #fff;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
}
.diag-popup-btn:hover {
    background: #85a28d;
    color: #fff;
}
