/* ============================================
   Wisebled - Site de présentation
   Header, Footer, Nav mobile latérale
   ============================================ */

:root {
    /* Palette activation.html */
    --color-primary: #4f46e5;
    --color-primary-dark: #4338ca;
    --color-primary-light: #e0e7ff;
    --color-primary-focus: rgba(79, 70, 229, 0.15);
    --color-secondary: #10b981;
    --color-secondary-dark: #059669;
    --color-accent: #0ea5e9;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-bg: #f9fafb;
    --color-surface: #ffffff;
    --color-text: #111827;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --transition: 0.2s ease;
    --nav-width: 320px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* ========== HEADER ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 800;
    font-size: 1.25rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.logo-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-mobile .logo-img {
    width: 36px;
    height: 36px;
}

.logo-text {
    letter-spacing: -0.02em;
}

/* Nav desktop */
.nav-desktop ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav-desktop a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-desktop a:hover,
.nav-desktop a.active {
    color: var(--color-primary);
    background: var(--color-primary-focus);
}

/* Boutons header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-ghost {
    color: var(--color-text-muted);
    background: transparent;
}

.btn-ghost:hover {
    color: var(--color-primary);
    background: var(--color-primary-focus);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Menu hamburger - caché sur desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--color-border);
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: var(--transition);
}

.menu-toggle[aria-expanded="true"] .hamburger:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========== NAV MOBILE LATÉRALE ========== */
.nav-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

.nav-mobile.is-open {
    pointer-events: auto;
    visibility: visible;
}

.nav-mobile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-mobile.is-open .nav-mobile-overlay {
    opacity: 1;
}

.nav-mobile-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(var(--nav-width), 85vw);
    max-width: 320px;
    height: 100%;
    background: var(--color-surface);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.nav-mobile.is-open .nav-mobile-panel {
    transform: translateX(0);
}

.nav-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.nav-mobile-header .logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-text);
}

.nav-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text);
    transition: var(--transition);
}

.nav-close:hover {
    background: var(--color-border);
}

.nav-mobile-links {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.nav-mobile-links ul {
    list-style: none;
}

.nav-mobile-links li {
    margin-bottom: 0.25rem;
}

.nav-mobile-links a {
    display: block;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-mobile-links a:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.nav-mobile-links .nav-divider {
    height: 1px;
    background: var(--color-border);
    margin: 1rem 0;
}

.nav-mobile-links .nav-mobile-btn {
    text-align: center;
    margin-top: 0.5rem;
}

.nav-mobile-links .nav-mobile-btn.btn-primary {
    background: var(--color-primary);
    color: white !important;
}

.nav-mobile-links .nav-mobile-btn.btn-primary:hover {
    background: var(--color-primary-dark);
}

/* ========== MAIN ========== */
.site-main {
    flex: 1;
    padding-top: 72px; /* hauteur header */
    min-height: 100vh;
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--color-text);
    color: #94a3b8;
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 1rem;
}

.footer-brand .logo-img {
    width: 36px;
    height: 36px;
}

.footer-tagline {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--color-primary);
    color: white;
}

.footer-links h4 {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: #64748b;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .nav-desktop {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-social {
        justify-content: center;
    }
}

/* Empêcher scroll body quand menu ouvert */
body.nav-open {
    overflow: hidden;
}

/* ========== CONTENU PAGES (Hero, sections) ========== */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero {
    padding: 4rem 1.5rem 5rem;
    text-align: center;
    background: linear-gradient(180deg, var(--color-primary-light) 0%, transparent 100%);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

.features-preview {
    padding: 4rem 1.5rem;
}

.features-preview h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

/* ============================================
   WiseBled - Styles index (Header, Footer, Sections)
   ============================================ */

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Animations */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
.animate-blink { animation: blink 1s step-end infinite; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Nav mobile latéral */
.nav-panel { transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1); }
body.nav-open #nav-mobile { pointer-events: auto; }
body.nav-open .nav-panel { transform: translateX(0); }
body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; transition: opacity 0.3s ease; }
.nav-mobile-link { transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.nav-mobile-link:hover { transform: translateX(2px); }

/* Typography */
.container-narrow { max-width: 48rem; }
.section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #4f46e5;
    margin-bottom: 0.75rem;
    font-family: 'Outfit', sans-serif;
}
.font-display { font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif; }
.text-balance { text-wrap: balance; }

/* Buttons - override Bootstrap pour liens WiseBled */
a.btn-primary,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #4f46e5 100%);
    background-size: 200% auto;
    border-radius: 0.75rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px -2px rgba(79, 70, 229, 0.4);
}
.btn-primary:hover {
    background-position: 100% center;
    transform: translateY(-2px);
    box-shadow: 0 0 40px -10px rgba(79, 70, 229, 0.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #4f46e5;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    background: white;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-secondary:hover {
    background: #f9fafb;
    border-color: rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}
.btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #4f46e5;
}

/* Cards */
.card-modern {
    border-radius: 1.5rem;
    background: white;
    border: 1px solid rgba(243, 244, 246, 0.8);
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-modern:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(79, 70, 229, 0.15),
        0 0 30px -5px rgba(79, 70, 229, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Animation delays & stagger */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-slide-up { animation: slideUp 0.5s ease-out; }
.stagger-1 { opacity: 0; animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.stagger-2 { opacity: 0; animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards; }
.stagger-3 { opacity: 0; animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards; }
.stagger-4 { opacity: 0; animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards; }

/* Misc */
.gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.noise {
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-badge { background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%); }
.scroll-indicator { }
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.2), transparent);
}
.testimonial-stars { color: #fbbf24; }

/* Header sticky */
#site-header {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#site-header.scrolled {
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05), 0 4px 24px -4px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
}

/* Nav links */
.nav-link { position: relative; }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: linear-gradient(90deg, #4f46e5, #6366f1);
    border-radius: 1px;
}
.nav-link:hover:not(.active) { background: rgba(79, 70, 229, 0.06); }

/* Inscription - Design ultra-moderne 2025 */
.inscription-section {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #eef2ff 100%);
    min-height: 100vh;
}
.inscription-card {
    transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.inscription-card:hover {
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.08);
}
@keyframes pulse-slow { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
.animate-pulse-slow { animation: pulse-slow 4s ease-in-out infinite; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in-up { animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.animate-slide-down { animation: slideDown 0.3s ease-out; }
.field-group { position: relative; }
.field-group .field-valid,
.field-group .field-checking { transition: opacity 0.25s ease; }
.input-field { min-height: 48px; -webkit-tap-highlight-color: transparent; }
.input-field:focus { outline: none; }
.input-field.border-red-500 { border-color: #ef4444 !important; }
.input-field.border-red-500:focus { --tw-ring-color: rgba(239, 68, 68, 0.3); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
.input-field.border-emerald-500 { border-color: #10b981 !important; }
.input-field.border-emerald-500:focus { --tw-ring-color: rgba(16, 185, 129, 0.3); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); }
.ease-out-expo { transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }

@media (max-width: 640px) {
    .inscription-section .step-label { font-size: 10px; max-width: 3.5rem; }
    .inscription-card { border-radius: 1.25rem; }
}
@media (min-width: 1024px) {
    .inscription-section .inscription-card { box-shadow: 0 20px 40px -12px rgba(79, 70, 229, 0.06); }
}

/* Footer links */
.footer-link {
    position: relative;
    transition: color 0.2s, transform 0.2s;
}
.footer-link:hover {
    color: white;
}
footer nav .footer-link [data-lucide] {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
footer nav .footer-link:hover [data-lucide] {
    transform: translateX(3px);
}

/* Lucide — rendu global */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.06));
    color: #4f46e5;
}
.icon-box svg {
    stroke-width: 1.75;
}

/* Lottie — grandes illustrations */
[id^="lottie-"] {
    min-width: 1px;
    min-height: 1px;
}
[id^="lottie-"] svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Back to top */
.back-to-top-btn { opacity: 0.7; transition: opacity 0.3s; }
.back-to-top-btn:hover { opacity: 1; }
.back-to-top-btn:hover .material-symbols-outlined { transform: translateY(-2px); }
.back-to-top-btn .material-symbols-outlined { transition: transform 0.2s; }

/* ========== RESPONSIVE - Index & Sections ========== */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Prévention débordement horizontal */
section, .max-w-7xl {
    max-width: 100%;
}

@media (max-width: 991px) {
    .max-w-7xl { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 767px) {
    #hero h1 { font-size: clamp(1.75rem, 6vw, 2.5rem) !important; }
    section { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    /* Footer newsletter */
    footer form { min-width: 100% !important; }
}

@media (max-width: 575px) {
    .card-modern { border-radius: 1rem; }
    #stats .grid-cols-2 > div { padding: 1rem !important; }
    /* Footer grille mobile */
    footer .grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
    footer .col-span-2 { grid-column: 1 !important; }
    footer nav { text-align: center; }
}

/* Utilitaires responsive Bootstrap */
@media (max-width: 576px) {
    .container-fluid { padding-left: 1rem; padding-right: 1rem; }
}
