/* home.min.css - Optimisé pour Light/Dark Mode */

/* ===== VARIABLES CSS ===== */
:root {
    /* Couleurs primaires */
    --color-primary: #0ea5e9;
    --color-primary-dark: #0284c7;
    --color-success: #10b981;
    --color-success-dark: #0da271;
    --color-warning: #f59e0b;
    --color-warning-dark: #d97706;
    --color-danger: #ef4444;
    --color-danger-dark: #dc2626;
    --color-whatsapp: #25D366;
    --color-whatsapp-dark: #1da851;
    
    /* Couleurs de texte - Mode Clair (défaut) */
    --color-text: #111827;
    --color-text-secondary: #374151;
    --color-text-inverse: #f9fafb;
    --color-text-muted: #6b7280;
    
    /* Backgrounds - Mode Clair */
    --color-bg: #ffffff;
    --color-bg-secondary: #f9fafb;
    --color-bg-dark: #0f172a;
    --color-bg-card: #ffffff;
    
    /* Bordures - Mode Clair */
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    
    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08);
    --shadow-dark: 0 4px 6px -1px rgba(0,0,0,0.2);
}

/* ===== MODE SOMBRE ===== */
@media (prefers-color-scheme: dark) {
    :root {
        /* Couleurs de texte - Mode Sombre */
        --color-text: #f9fafb;
        --color-text-secondary: #e5e7eb;
        --color-text-inverse: #111827;
        --color-text-muted: #9ca3af;
        
        /* Backgrounds - Mode Sombre */
        --color-bg: #0f172a;
        --color-bg-secondary: #1e293b;
        --color-bg-dark: #0a0f1c;
        --color-bg-card: #1e293b;
        
        /* Bordures - Mode Sombre */
        --color-border: #374151;
        --color-border-light: #2d3748;
        
        /* Ombres */
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
        --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3);
    }
    
    /* Classes manuelles pour dark mode */
    body.dark-mode {
        --color-text: #f9fafb;
        --color-text-secondary: #e5e7eb;
        --color-text-inverse: #111827;
        --color-bg: #0f172a;
        --color-bg-secondary: #1e293b;
        --color-bg-card: #1e293b;
        --color-border: #374151;
    }
}

/* ===== RESET & BASE STYLES ===== */
.home-page * {
    box-sizing: border-box;
}

.home-page body {
    color: var(--color-text);
    background: var(--color-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== TEXT UTILITIES ===== */
.text-high-contrast {
    color: var(--color-text) !important;
    font-weight: 700;
}

.text-contrast-light {
    color: var(--color-text-secondary) !important;
}

.text-contrast-inverse {
    color: var(--color-text-inverse) !important;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.opacity-90 { opacity: 0.9 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-50 { opacity: 0.5 !important; }

/* ===== SECTIONS ===== */
.section {
    padding: clamp(3rem, 5vw, 5rem) 0;
    background: var(--color-bg);
}

.section-dark {
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, #1e293b 100%);
    color: var(--color-text-inverse) !important;
}

.section-dark .text-high-contrast {
    color: var(--color-text-inverse) !important;
}

.section-dark .text-contrast-light {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

@media (prefers-color-scheme: dark) {
    .hero-section {
        background: linear-gradient(135deg, var(--color-bg-dark) 0%, #1e293b 100%);
    }
}

.hero-title {
    color: var(--color-text);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Hero Counter */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    color: var(--color-primary) !important;
    transition: color 0.3s ease;
}

/* ===== CARDS ===== */
.feature-card,
.bg-contrast-card {
    background: var(--color-bg-card) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 0.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary) !important;
}

/* ===== FOUNDER OFFER ===== */
.founder-offer {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 3px solid var(--color-warning);
    border-radius: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (prefers-color-scheme: dark) {
    .founder-offer {
        background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
    }
}

.founder-offer .progress {
    height: 8px;
    background: var(--color-border-light);
    border-radius: 4px;
    overflow: hidden;
}

.founder-offer .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-danger) 0%, var(--color-danger-dark) 100%);
    transition: width 1s ease;
    border-radius: 4px;
}

/* Urgency Mode */
.founder-offer.urgency-mode {
    animation: urgencyPulse 2s infinite;
    border-color: var(--color-danger) !important;
}

@keyframes urgencyPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7),
                    0 4px 6px -1px rgba(239, 68, 68, 0.1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0),
                    0 4px 6px -1px rgba(239, 68, 68, 0.2);
    }
}

/* ===== WHATSAPP SECTION ===== */
#inscription-whatsapp .whatsapp-feature {
    background: rgba(37, 211, 102, 0.08) !important;
    border: 1px solid rgba(37, 211, 102, 0.15) !important;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

@media (prefers-color-scheme: dark) {
    #inscription-whatsapp .whatsapp-feature {
        background: rgba(37, 211, 102, 0.12) !important;
        border: 1px solid rgba(37, 211, 102, 0.25) !important;
    }
}

#inscription-whatsapp .whatsapp-feature:hover {
    background: rgba(37, 211, 102, 0.12) !important;
    border-color: rgba(37, 211, 102, 0.3) !important;
    transform: translateY(-4px);
}

.whatsapp-card {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.05) 0%, rgba(37, 211, 102, 0.02) 100%);
    border: 2px solid rgba(37, 211, 102, 0.2);
    border-radius: 0.75rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

@media (prefers-color-scheme: dark) {
    .whatsapp-card {
        background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, rgba(37, 211, 102, 0.04) 100%);
        border-color: rgba(37, 211, 102, 0.3);
    }
}

/* WhatsApp Icon */
.whatsapp-icon-wrapper {
    width: 5rem;
    height: 5rem;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(37, 211, 102, 0.3);
    margin: 0 auto;
}

@media (prefers-color-scheme: dark) {
    .whatsapp-icon-wrapper {
        background: rgba(37, 211, 102, 0.15);
        border-color: rgba(37, 211, 102, 0.4);
    }
}

/* ===== STATISTIQUES WHATSAPP ===== */
#inscription-whatsapp .stat-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.75rem;
    padding: 1rem !important;
    transition: transform 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    #inscription-whatsapp .stat-card {
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
}

#inscription-whatsapp .stat-card:hover {
    transform: translateY(-5px);
}

#inscription-whatsapp .stat-card .h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    color: inherit !important;
}

/* Couleurs fixes pour les stats */
#inscription-whatsapp .stat-card:nth-child(1) .h2 {
    color: #25D366 !important;
    -webkit-text-fill-color: #25D366 !important;
}

#inscription-whatsapp .stat-card:nth-child(2) .h2 {
    color: #0ea5e9 !important;
    -webkit-text-fill-color: #0ea5e9 !important;
}

#inscription-whatsapp .stat-card:nth-child(3) .h2 {
    color: #fbbf24 !important;
    -webkit-text-fill-color: #fbbf24 !important;
}

#inscription-whatsapp .stat-card:nth-child(4) .h2 {
    color: #22c55e !important;
    -webkit-text-fill-color: #22c55e !important;
}

#inscription-whatsapp .stat-card .small {
    color: var(--color-text-secondary) !important;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ===== DASHBOARD PREVIEW ===== */
.dashboard-preview {
    background: #f1f5f9;
    border-radius: 0.75rem;
}

@media (prefers-color-scheme: dark) {
    .dashboard-preview {
        background: #1e293b;
    }
}

.chart-bar {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 4px 4px 0 0;
    transition: height 0.6s ease;
}

.chart-bar[data-height] {
    height: 0;
}

/* ===== ACCORDÉON FAQ ===== */
.accordion-item {
    background: var(--color-bg-card) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 0.5rem !important;
    margin-bottom: 0.75rem;
}

.accordion-button {
    background: var(--color-bg-card) !important;
    color: var(--color-text) !important;
    font-weight: 600;
    border: none !important;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    color: var(--color-primary) !important;
    background: rgba(14, 165, 233, 0.05) !important;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230ea5e9'%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");
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230ea5e9'%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");
}

.accordion-body {
    background: var(--color-bg-card) !important;
    color: var(--color-text-secondary) !important;
    border-top: 1px solid var(--color-border);
}

/* ===== BADGES ===== */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
}

.badge-primary {
    background-color: var(--color-primary) !important;
    color: white !important;
}

.badge-success {
    background-color: var(--color-success) !important;
    color: white !important;
}

.badge-warning {
    background-color: var(--color-warning) !important;
    color: #000 !important;
}

.badge-danger {
    background-color: var(--color-danger) !important;
    color: white !important;
}

.badge-whatsapp {
    background-color: var(--color-whatsapp) !important;
    color: white !important;
    border: 1px solid #1da851;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
}

.btn-success {
    background-color: var(--color-success) !important;
    border-color: var(--color-success) !important;
    color: white !important;
}

.btn-outline-primary {
    color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--color-primary) !important;
    color: white !important;
}

.btn-outline-light {
    color: var(--color-text-inverse) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fade-in { animation: fadeInUp 0.6s ease-out; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s infinite; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== FINAL CTA ===== */
#final-cta .bg-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

@media (prefers-color-scheme: dark) {
    #final-cta .bg-gradient {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
}

#final-cta .bg-gradient .text-dark {
    color: var(--color-text) !important;
}

/* ===== ALERTS ===== */
.alert-dark {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text-inverse);
}

@media (prefers-color-scheme: dark) {
    .alert-dark {
        background-color: rgba(0, 0, 0, 0.2);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-section { 
        min-height: auto; 
        padding: 1.5rem 0;
    }
    
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1.1rem; }
    
    .whatsapp-card { padding: 1.5rem; }
    .whatsapp-feature { padding: 1.25rem; }
    
    #inscription-whatsapp .stat-card .h2 {
        font-size: 2rem !important;
    }
    
    .founder-offer { 
        margin: 0 1rem; 
        padding: 1.5rem !important; 
    }
    
    .section {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    #inscription-whatsapp .stat-card .h2 {
        font-size: 1.75rem !important;
    }
}

/* ===== ACCESSIBILITY ===== */
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .feature-card,
    .chart-bar,
    .whatsapp-feature,
    #inscription-whatsapp .stat-card,
    .animate-float,
    .animate-pulse {
        animation: none;
        transition: none;
    }
    
    .feature-card:hover,
    .whatsapp-feature:hover,
    #inscription-whatsapp .stat-card:hover {
        transform: none;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .text-high-contrast {
        font-weight: 900;
    }
    
    #inscription-whatsapp .stat-card .h2 {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .feature-card {
        border-width: 2px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .hero-section { 
        background: white !important; 
        min-height: auto; 
    }
    
    .feature-card { 
        break-inside: avoid; 
        border: 1px solid #ddd !important; 
        box-shadow: none !important;
    }
    
    .btn, .badge {
        border: 1px solid #000 !important;
        background: white !important;
        color: #000 !important;
    }
    
    .whatsapp-card {
        border: 1px solid #ddd !important;
        background: white !important;
    }
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .process-step {
    padding-left: 0;
    padding-right: 2rem;
}

[dir="rtl"] .step-number {
    left: auto;
    right: -3.5rem;
}

[dir="rtl"] .accordion-button {
    text-align: right;
}

[dir="rtl"] .accordion-button::after {
    margin-left: 0;
    margin-right: auto;
    transform: rotate(180deg);
}

[dir="rtl"] .accordion-button:not(.collapsed)::after {
    transform: rotate(-90deg);
}

/* ===== CLEANUP & OPTIMIZATION ===== */
.home-page img {
    max-width: 100%;
    height: auto;
}

.home-page a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.home-page ul, .home-page ol {
    padding-left: 1.5rem;
}

/* Force dark text on light backgrounds in dark mode */
@media (prefers-color-scheme: dark) {
    .text-dark-mode-safe {
        color: #111827 !important;
    }
    
    .bg-light-in-dark {
        background: #f9fafb !important;
        color: #111827 !important;
    }
}