/* ===========================
   TGSP - Fichier d'améliorations
   Performance, UX, Animations
   =========================== */

/* === ANIMATIONS AU SCROLL === */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-in"] {
    opacity: 0;
}

[data-aos="fade-in"].aos-animate {
    opacity: 1;
}

/* === SMOOTH SCROLL === */
html {
    scroll-behavior: smooth;
}

/* === MENU STICKY AMÉLIORÉ === */
header {
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* === BOUTONS CTA AMÉLIORÉS === */
.cta-button, .cta-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button::before, .cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before, .cta-btn:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover, .cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(10, 183, 127, 0.3);
}

/* === WHATSAPP BUTTON FLOTTANT === */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* === FORMULAIRE CONTACT FLOTTANT === */
.contact-widget {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0ab77f 0%, #77f9d0 100%);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(10, 183, 127, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
}

.contact-widget:hover {
    transform: scale(1.1) rotate(10deg);
}

.contact-widget.active {
    border-radius: 20px;
    width: 350px;
    height: auto;
    padding: 25px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.contact-widget-form {
    display: none;
}

.contact-widget.active .contact-widget-form {
    display: block;
}

.contact-widget.active .contact-widget-icon {
    display: none;
}

.contact-widget-form input,
.contact-widget-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.contact-widget-form input:focus,
.contact-widget-form textarea:focus {
    outline: none;
    border-color: #0ab77f;
}

.contact-widget-form button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0ab77f 0%, #77f9d0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.contact-widget-form button:hover {
    transform: translateY(-2px);
}

/* === TRUST BADGES === */
.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.trust-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.trust-badge-icon {
    font-size: 32px;
}

.trust-badge-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.trust-badge-number {
    font-size: 24px;
    font-weight: 700;
    color: #0ab77f;
    display: block;
}

/* === FAQ ACCORDÉON === */
.faq-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: #0ab77f;
}

.faq-question::after {
    content: '+';
    font-size: 28px;
    font-weight: 400;
    color: #0ab77f;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 25px 20px 25px;
    color: #666;
    line-height: 1.8;
}

/* === CALCULATEUR D'ÉCONOMIES === */
.calculator-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 50px;
    margin: 60px auto;
    max-width: 800px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.calculator-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
}

.calculator-input-group {
    margin-bottom: 30px;
}

.calculator-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.calculator-input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
}

.calculator-input:focus {
    outline: none;
    border-color: #0ab77f;
    box-shadow: 0 0 0 3px rgba(10, 183, 127, 0.1);
}

.calculator-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #0ab77f, #77f9d0);
    outline: none;
}

.calculator-result {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-top: 40px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.calculator-result-value {
    font-size: 64px;
    font-weight: 700;
    color: #0ab77f;
    margin: 20px 0;
}

.calculator-result-label {
    font-size: 20px;
    color: #666;
}

/* === TÉMOIGNAGES === */
.testimonials-container {
    padding: 80px 20px;
    background: #f9f9f9;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 50px auto 0;
}

.testimonial-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.testimonial-stars {
    color: #FFB800;
    font-size: 20px;
    margin-bottom: 15px;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ab77f 0%, #77f9d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
}

.testimonial-author-info {
    flex: 1;
}

.testimonial-author-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.testimonial-author-location {
    font-size: 14px;
    color: #999;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .whatsapp-float,
    .contact-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .contact-widget.active {
        width: calc(100vw - 40px);
        max-width: 350px;
    }
    
    .calculator-container {
        padding: 30px 20px;
    }
    
    .calculator-result-value {
        font-size: 48px;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-badges {
        gap: 15px;
    }
    
    .trust-badge {
        padding: 10px 15px;
    }
}

/* === LAZY LOADING === */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* === PERFORMANCE === */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

/* === PRINT === */
@media print {
    .whatsapp-float,
    .contact-widget,
    header {
        display: none !important;
    }
}
