/* Custom Styles for JB Manager */

/* Header avec hauteur augmentée */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
}

header>div {
    min-height: 90px;
}

/* Ajuster le padding du header */
header .py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* Hero section occupe tout le reste de l'écran */
.hero-full-height {
    min-height: calc(100vh - 90px);
    height: calc(100vh - 90px);
    display: flex;
    align-items: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Max-width responsive: 1100px de contenu net sur écrans ≤1280px */
@media (max-width: 1280px) {

    .max-w-7xl:not(.w-full),
    section .max-w-7xl:not(.w-full),
    header .max-w-7xl,
    footer .max-w-7xl {
        /* 1100px de contenu + 48px de padding (24px × 2) = 1148px */
        max-width: 1148px !important;
    }
}

/* Sur écrans plus grands (>1280px), garder 1280px de contenu net */
@media (min-width: 1281px) {
    .max-w-7xl:not(.w-full) {
        /* 1280px de contenu + 48px de padding = 1328px */
        max-width: 1328px !important;
    }
}

/* La section des logos partenaires reste en pleine largeur */
.w-full {
    max-width: 100% !important;
    width: 100% !important;
}

/* Fix line-heights to match v0 version */
/* Titles should be tight (1.25) */
h1,
h2,
h3,
h4,
h5,
h6,
.text-4xl,
.text-5xl,
.text-3xl,
.text-2xl,
.text-xl.font-bold,
section h1,
section h2,
section h3,
header h1,
header h2,
header h3 {
    line-height: 1.25 !important;
    /* leading-tight */
}

/* Paragraphs should be relaxed (1.625) for better readability */
p,
.text-lg:not(.font-bold),
.text-xl:not(.font-bold),
.text-base,
section p,
div p,
.card p,
.testimonial p {
    line-height: 1.625 !important;
    /* leading-relaxed */
}

/* Ensure Tailwind classes work */
.leading-tight {
    line-height: 1.25 !important;
}

.leading-relaxed {
    line-height: 1.625 !important;
}

.leading-normal {
    line-height: 1.5 !important;
}

/* Text in cards and boxes */
.bg-white p,
.bg-gray-50 p,
[class*="rounded"] p {
    line-height: 1.625 !important;
}

/* Footer text can be slightly tighter */
footer p,
footer li,
footer a {
    line-height: 1.5 !important;
}

/* Small text */
.text-sm,
.text-xs {
    line-height: 1.5 !important;
}

/* Fix for desktop navigation display */
@media (min-width: 1024px) {
    nav.desktop-nav {
        display: flex !important;
        align-items: center !important;
        gap: 2rem !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Ensure navigation items are visible */
    nav.desktop-nav>* {
        display: block !important;
    }

    /* Ensure flex items within nav */
    nav.desktop-nav a,
    nav.desktop-nav .relative {
        display: flex !important;
        align-items: center !important;
    }
}

/* Hide menu on mobile */
@media (max-width: 1023px) {
    nav.desktop-nav {
        display: none !important;
    }
}

/* Fix for top bar links (WHATSAPP, SE CONNECTER) */
@media (min-width: 768px) {

    .top-bar,
    div.top-bar,
    header .top-bar {
        display: flex !important;
        justify-content: flex-end !important;
        gap: 2rem !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 767px) {
    .top-bar {
        display: none !important;
    }
}

/* Fix for search icon and ESSAI GRATUIT button */
@media (min-width: 768px) {

    .search-icon,
    button.search-icon,
    header .search-icon {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .trial-button,
    button.trial-button,
    header .trial-button {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 767px) {

    .search-icon,
    button.search-icon {
        display: none !important;
    }

    .trial-button,
    button.trial-button {
        display: none !important;
    }
}

/* Logo Scrolling Animation */
@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll-logos {
    animation: scroll-logos 30s linear infinite;
    will-change: transform;
}

/* ========================================
   Hero Slider Styles
   ======================================== */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 90px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* Boutons de navigation du slider */
.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-prev:hover,
.hero-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Indicateurs du slider */
.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 10px;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-indicator.active {
    background: white;
    width: 32px;
    border-radius: 6px;
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Content box des slides */
.slide-content-box {
    max-width: 100%;
}

/* Classes d'alignement vertical - priorité importante */
.justify-start {
    justify-content: flex-start !important;
}

.justify-center {
    justify-content: center !important;
}

.justify-end {
    justify-content: flex-end !important;
}

/* Padding du contenu */
.content-padding-small {
    padding: 1rem;
}

.content-padding-medium {
    padding: 2rem;
}

.content-padding-large {
    padding: 3rem;
}

/* Responsive: Sur mobile (vraiment petits écrans), la largeur est toujours 100% */
@media (max-width: 768px) {
    .slide-content-box {
        width: 100% !important;
        margin: 0 auto !important;
    }

    .content-padding-small,
    .content-padding-medium,
    .content-padding-large {
        padding: 1.5rem 0;
    }

    /* Sur mobile, forcer l'alignement centré vertical */
    .hero-slide>div {
        justify-content: center !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Styles des boutons du slider */
.btn-primary {
    background-color: #8BC34A;
    color: white;
    border: 2px solid transparent;
}

.btn-primary:hover {
    background-color: #7CB342;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 195, 74, 0.4);
}

.btn-secondary {
    background-color: white;
    color: #4A8FE7;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: #4A8FE7;
    transform: translateY(-2px);
}

/* Responsive pour le slider */
@media (max-width: 768px) {
    .hero-full-height {
        height: auto;
        min-height: 500px;
    }

    .hero-slide {
        min-height: 500px;
        height: auto;
    }

    .hero-prev,
    .hero-next {
        width: 40px;
        height: 40px;
    }

    .hero-prev {
        left: 10px;
    }

    .hero-next {
        right: 10px;
    }

    .hero-indicators {
        bottom: 20px;
    }
}

.animate-scroll-logos:hover {
    animation-play-state: paused;
}

/* Mobile Menu Slide Animation */
.mobile-menu-slide {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Smooth transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom button styles */
button {
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.98);
}

/* Grayscale filter for logos */
.grayscale {
    filter: grayscale(100%);
}

.grayscale:hover {
    filter: grayscale(0%);
}

/* Fill icons for Play and Star */
.fill-yellow-400 {
    fill: #facc15;
}

.fill-\[\#4A8FE7\] {
    fill: #4A8FE7;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-menu-slide {
        max-width: 100% !important;
    }
}

/* Ensure proper spacing for sections */
section {
    scroll-margin-top: 80px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Hidden class for mobile menu */
.hidden {
    display: none !important;
}

/* Blur effect for hero background */
.blur-3xl {
    filter: blur(100px);
}

/* Text balance for better typography */
.text-balance {
    text-wrap: balance;
}

/* Custom gradient backgrounds */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

/* Icon sizing consistency */
[data-lucide] {
    width: 1em;
    height: 1em;
    stroke-width: 2;
    vertical-align: middle;
}

.demo-block {
    background-image: url('../images/hero-image-bg.webp') !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

/* Hero Gradient Style (Shared across pages) */
.hero-gradient {
    background-color: #0f172a;
    background-image:
        radial-gradient(at 0% 0%, hsla(217, 91%, 60%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(142, 71%, 45%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(217, 91%, 60%, 1) 0, transparent 50%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.4) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(74, 222, 128, 0.4) 0%, transparent 25%);
    filter: blur(60px);
    animation: pulseGlow 8s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}