/* Custom styles to complement Tailwind CSS */

/* Aspect Ratio Utilities */
.aspect-w-16 {
    position: relative;
    padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%);
}

.aspect-w-16 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.aspect-h-12 {
    --tw-aspect-h: 12;
}

.aspect-w-16 {
    --tw-aspect-w: 16;
}


/* Alert Banner */
#alert-banner {
    overflow: hidden;
    max-height: 200px;
    transition: all 0.3s ease-in-out;
}

#alert-banner.hiding {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
}


/* Mobile Menu Transitions */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

#mobile-menu.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

#mobile-menu .fixed {
    transition: opacity 0.3s ease-in-out;
}

#mobile-menu > div:last-child {
    transition: transform 0.3s ease-in-out;
    transform-origin: top;
}

#mobile-menu.hidden > div:last-child {
    transform: translateY(-1rem);
}

#mobile-menu:not(.hidden) > div:last-child {
    transform: translateY(0);
}

/* Smooth icon transition */
#mobile-menu-button i {
    transition: transform 0.3s ease-in-out;
}

#mobile-menu-button[aria-expanded="true"] i.fa-bars {
    transform: rotate(180deg);
}


/* Slider range input styling */
input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
    transition: background 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #7c3aed;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #6d28d9;
    transform: scale(1.1);
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #7c3aed 50%, #e2e8f0 50%);
    transition: background 0.3s ease;
}

/* Testimonials Slider */
.testimonials-slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 2rem 0;
}

.testimonials-track {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    width: max-content;
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.5s ease;
}

.testimonials-track > div {
    flex: 0 0 300px;
    width: 300px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(234, 179, 8, 0.2);
    transition: all 0.3s ease-in-out;
    transform: scale(0.98);
    opacity: 0.8;
    cursor: grab;
}

.testimonials-track > div:hover {
    transform: translateY(-5px) scale(1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(234, 179, 8, 0.4);
    opacity: 1;
}

.testimonials-track > div.active {
    transform: scale(1);
    opacity: 1;
    border-color: rgba(234, 179, 8, 0.3);
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .testimonials-track {
        gap: 2rem;
    }
}

@keyframes testimonials-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-300px * 10 - 1.5rem * 10));
    }
}

.testimonials-track.scrolling {
    animation: testimonials-scroll 40s linear infinite;
}

.testimonials-track > div {
    flex: 0 0 300px;
    width: 300px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(234, 179, 8, 0.2);
    transition: all 0.3s ease-in-out;
}

.testimonials-track > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(234, 179, 8, 0.4);
}

.testimonials-track.scrolling:hover {
    animation-play-state: paused;
}

.testimonials-track > div {
    flex: 0 0 auto;
    transition: all 0.5s ease-in-out;
}

.testimonials-track > div:hover {
    transform: translateY(-5px) scale(0.98);
    border-color: rgba(234, 179, 8, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.testimonials-track > div.active {
    transform: scale(1);
    opacity: 1;
    border-color: rgba(234, 179, 8, 0.3);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.testimonials-track > div.active:hover {
    transform: scale(1.02);
    border-color: rgba(234, 179, 8, 0.4);
}

/* Navigation Buttons */
.slider-prev,
.slider-next {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
}

.slider-prev:hover,
.slider-next:hover {
    opacity: 1;
    transform: scale(1.1);
}

.slider-prev:active,
.slider-next:active {
    transform: scale(0.95);
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.slider-dots button {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: #d1d5db;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
}

.slider-dots button.active {
    background-color: #b45309;
    transform: scale(1.2);
}

.slider-dots button:hover {
    background-color: #92400e;
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 10;
    pointer-events: none;
}

.slider-nav button {
    position: absolute;
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #7c3aed;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slider-nav button:hover {
    background: #6d28d9;
    transform: scale(1.1);
}

.slider-prev {
    left: -20px;
}

.slider-next {
    right: -20px;
}

/* Button hover effects */
.btn-hover-effect {
    transition: all 0.3s ease;
}

.btn-hover-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 10vh auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Hero Section Background */
.hero-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .testimonials-track > div {
        width: calc(100% - 2rem);
    }
    
    .slider-nav button {
        width: 36px;
        height: 36px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
}

/* Loading states */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #7c3aed;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    z-index: 1;
}

/* Partners Slider */
@keyframes partners-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.partners-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    background: white;
}

.partners-slider::before,
.partners-slider::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.partners-slider::before {
    left: 0;
    background: linear-gradient(to right, white 0%, transparent 100%);
}

.partners-slider::after {
    right: 0;
    background: linear-gradient(to left, white 0%, transparent 100%);
}

.animate-scroll {
    animation: partners-scroll 40s linear infinite;
    display: flex;
    width: fit-content;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* FAQ Section Styles */
.faq-item {
    transition: all 0.3s ease;
    border: 1px solid #f59e0b !important;
    border-radius: 0.5rem !important;
    overflow: hidden;
    margin-bottom: 1rem;
}

.faq-question {
    transition: background-color 0.3s ease;
    background-color: white !important;
    padding: 1rem 1.5rem !important;
    font-weight: 600 !important;
    font-size: 1.125rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer;
    width: 100%;
}

.faq-question:hover {
    background-color: #fef3c7 !important;
}

.faq-answer {
    overflow: hidden;
    transition: all 0.4s ease;
    padding: 0 1.5rem;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    background-color: #fef3c7 !important;
}

.faq-answer.show {
    max-height: 500px;
    padding: 1rem 1.5rem;
    opacity: 1;
    transform: translateY(0);
}

.faq-icon {
    transition: transform 0.3s ease;
    color: #d97706 !important;
    font-size: 1.25rem !important;
    font-weight: bold;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.partners-slider img {
    transition: all 0.3s ease;
    filter: none !important;
}

.partners-slider img:hover {
    transform: scale(1.1);
    filter: none !important;
}

/* public/css/contact.css */
.contact-input {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-input:focus {
    border-color: #f59e42;
    outline: none;
    box-shadow: 0 0 0 2px #fde68a;
}

.contact-label {
    display: block;
    color: #78350f; /* Tailwind's amber-900 */
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.contact-card {
    background-color: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    padding: 2rem;
    border: 1px solid #fde68a;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-card:hover {
    border-color: #f59e42;
}

/* Animation pour le bouton */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.submit-btn {
    animation: pulse 2s infinite;
}

.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}