/* ================================================
   Custom Animations & Modern Styles
   ================================================ */

/* ============================================
   ANIMATIONS KEYFRAMES
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ============================================
   NAVBAR IMPROVEMENTS
   ============================================ */

.navbar-custom {
    animation: fadeIn 0.6s ease-in-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-toggler {
    border: 2px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background-color: rgba(26, 92, 255, 0.05);
    border-color: #1a5cff;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.1);
}

.navbar-toggler-icon svg {
    transition: transform 0.3s ease;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon svg {
    transform: rotate(90deg);
}

/* Navigation Links */
.nav-link {
    font-weight: 600;
    font-size: 15px;
    padding: 10px 16px !important;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link:hover {
    background-color: rgba(26, 92, 255, 0.06);
    color: #1a5cff !important;
}

.nav-link.active {
    color: #ffffff !important;
    background-color: #1a5cff !important;
    background-image: linear-gradient(135deg, #1a5cff 0%, #4d7fff 100%) !important;
}

/* Underline effect for nav links */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: #1a5cff;
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Mobile menu improvements */
@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
        animation: fadeInUp 0.3s ease;
    }
    
    .nav-link {
        margin: 4px 0;
        display: block;
    }
    
    .nav-link.active {
        color: #ffffff !important;
    }
    
    .nav-link::after {
        display: none;
    }
}

/* ============================================
   TRUST BADGES - Éléments de réassurance
   ============================================ */

.trust-badge {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-in-out;
    animation-fill-mode: both;
}

.trust-badge:nth-child(1) {
    animation-delay: 0.1s;
}

.trust-badge:nth-child(2) {
    animation-delay: 0.2s;
}

.trust-badge:nth-child(3) {
    animation-delay: 0.3s;
}

.trust-badge:hover {
    background: #ffffff;
    border-color: rgba(26, 92, 255, 0.2);
    box-shadow: 0 10px 30px rgba(26, 92, 255, 0.1);
    transform: translateY(-4px);
}

.trust-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 92, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.trust-badge:hover .trust-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(26, 92, 255, 0.12);
}

.trust-text strong {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.trust-text small {
    font-size: 13px;
    color: #64748b;
}

/* Responsive Trust Badges */
@media (max-width: 991px) {
    .trust-badge {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .gap-4 {
        gap: 0 !important;
    }
}

@media (max-width: 767px) {
    .trust-badge {
        padding: 0.875rem 1rem;
    }
    
    .trust-icon {
        width: 40px;
        height: 40px;
    }
    
    .trust-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .trust-text strong {
        font-size: 14px;
    }
    
    .trust-text small {
        font-size: 12px;
    }
}

/* ============================================
   HOME SECTION ANIMATIONS
   ============================================ */

.home-title {
    animation: fadeInUp 0.8s ease-in-out;
}

.home-contact p {
    animation: fadeInUp 1s ease-in-out;
}

.home-contact .btn {
    animation: fadeInUp 1.2s ease-in-out;
}

.hide-on-mobile img {
    animation: float 6s ease-in-out infinite;
}

/* ============================================
   FEATURES BOX ANIMATIONS
   ============================================ */

.features-box {
    animation: fadeInUp 0.6s ease-in-out;
    animation-fill-mode: both;
}

.features-box:nth-child(1) { animation-delay: 0.1s; }
.features-box:nth-child(2) { animation-delay: 0.2s; }
.features-box:nth-child(3) { animation-delay: 0.3s; }
.features-box:nth-child(4) { animation-delay: 0.4s; }
.features-box:nth-child(5) { animation-delay: 0.5s; }
.features-box:nth-child(6) { animation-delay: 0.6s; }
.features-box:nth-child(7) { animation-delay: 0.7s; }

/* ============================================
   BLOG CARDS ANIMATIONS
   ============================================ */

.blog-card {
    animation: fadeInUp 0.6s ease-in-out;
    animation-fill-mode: both;
}

.blog-card:nth-child(1) { animation-delay: 0.2s; }
.blog-card:nth-child(2) { animation-delay: 0.3s; }
.blog-card:nth-child(3) { animation-delay: 0.4s; }

/* ============================================
   BUTTON HOVER EFFECTS
   ============================================ */

.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PROGRESS BAR ANIMATIONS
   ============================================ */

.progress-bar {
    animation: progressAnimation 1.5s ease-in-out;
}

@keyframes progressAnimation {
    from {
        width: 0;
    }
}

/* ============================================
   BADGE PULSE ANIMATION
   ============================================ */

.badge {
    animation: pulse 2s ease-in-out infinite;
}

.badge.bg-success {
    animation-delay: 0.2s;
}

/* ============================================
   CARD STACK HOVER EFFECT
   ============================================ */

.card {
    position: relative;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 92, 255, 0) 0%, rgba(26, 92, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 16px;
}

.card:hover::after {
    opacity: 1;
}

/* ============================================
   LOADING SHIMMER EFFECT
   ============================================ */

.shimmer {
    background: linear-gradient(
        to right,
        #f8fafc 0%,
        #e2e8f0 20%,
        #f8fafc 40%,
        #f8fafc 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* ============================================
   SMOOTH SCROLL BEHAVIOR
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================
   PROFILE PHOTO - Page À Propos
   ============================================ */

.profile-photo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.8s ease-in-out;
}

.profile-photo {
    position: relative;
    display: inline-block;
    animation: float 6s ease-in-out infinite;
}

.profile-photo svg {
    filter: drop-shadow(0 10px 30px rgba(26, 92, 255, 0.3));
    transition: transform 0.3s ease;
}

.profile-photo:hover svg {
    transform: scale(1.05);
}

/* Ring animation autour de la photo */
.profile-photo::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(26, 92, 255, 0.2);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.profile-photo::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 2px solid rgba(0, 217, 180, 0.2);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* ============================================
   EXPERTISE CARDS - Page À Propos
   ============================================ */

.expertise-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-in-out;
    animation-fill-mode: both;
}

.expertise-card:nth-child(1) { animation-delay: 0.1s; }
.expertise-card:nth-child(2) { animation-delay: 0.2s; }
.expertise-card:nth-child(3) { animation-delay: 0.3s; }
.expertise-card:nth-child(4) { animation-delay: 0.4s; }

.expertise-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(26, 92, 255, 0.15);
    border-color: rgba(26, 92, 255, 0.3);
}

.expertise-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 92, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.expertise-card:hover .expertise-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(26, 92, 255, 0.12);
}

.expertise-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.expertise-card p {
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================
   FAQ ACCORDION - Page FAQ (Bootstrap 4 Compatible)
   ============================================ */

.faq-accordion {
    max-width: 100%;
}

/* Bootstrap 4 Accordion Fix */
.accordion-item {
    border: none !important;
}

.accordion-header {
    margin-bottom: 0;
}

.accordion-collapse {
    border: none !important;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-in-out;
    animation-fill-mode: both;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.15s; }
.faq-item:nth-child(3) { animation-delay: 0.2s; }
.faq-item:nth-child(4) { animation-delay: 0.25s; }
.faq-item:nth-child(5) { animation-delay: 0.3s; }
.faq-item:nth-child(6) { animation-delay: 0.35s; }
.faq-item:nth-child(7) { animation-delay: 0.4s; }
.faq-item:nth-child(8) { animation-delay: 0.45s; }
.faq-item:nth-child(9) { animation-delay: 0.5s; }
.faq-item:nth-child(10) { animation-delay: 0.55s; }

.faq-item:hover {
    border-color: rgba(26, 92, 255, 0.3);
    box-shadow: 0 10px 30px rgba(26, 92, 255, 0.1);
    transform: translateX(4px);
}

.faq-accordion .accordion-button {
    padding: 1.5rem 1.75rem;
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: rgba(26, 92, 255, 0.05);
    color: #1a5cff;
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
    border: none;
}

.faq-accordion .accordion-button::after {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin-left: auto;
    background-color: rgba(26, 92, 255, 0.1);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231a5cff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1.25rem;
    background-position: center;
    transition: all 0.3s ease;
}

.faq-accordion .accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg);
    background-color: #1a5cff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.faq-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a5cff 0%, #00d9b4 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    margin-right: 0.5rem;
}

.faq-accordion .accordion-body {
    padding: 0 1.75rem 1.75rem 1.75rem;
    font-size: 15px;
    line-height: 1.7;
    color: #64748b;
}

.faq-accordion .accordion-body p {
    margin-bottom: 1rem;
}

.faq-accordion .accordion-body ul,
.faq-accordion .accordion-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.faq-accordion .accordion-body li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.faq-accordion .accordion-body strong {
    color: #0f172a;
    font-weight: 600;
}

.faq-accordion .accordion-collapse {
    border: none;
}

/* Responsive FAQ */
@media (max-width: 767px) {
    .faq-accordion .accordion-button {
        padding: 1.25rem 1rem;
        font-size: 15px;
    }
    
    .faq-number {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .faq-accordion .accordion-body {
        padding: 0 1rem 1.25rem 1rem;
        font-size: 14px;
    }
    
    .faq-item:hover {
        transform: translateX(0);
    }
}

/* ============================================
   FEATURE LISTS - Section Features
   ============================================ */

.feature-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.feature-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.875rem;
    line-height: 1.6;
    color: #475569;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #1a5cff 0%, #4d7fff 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.feature-list li strong {
    color: #0f172a;
    font-weight: 600;
}

/* Section titles styling */
.section h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.section h3.h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a5cff;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.section p {
    font-size: 16px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 1.25rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-in-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-in-out;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 767px) {
    .gap-4 {
        gap: 1rem !important;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

*:focus-visible {
    outline: 3px solid rgba(26, 92, 255, 0.3);
    outline-offset: 2px;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

