/* Reset et base */
:root {
    /* Palette de couleurs unifiée - Contraste WCAG AA amélioré */
    --primary-color: #4f46e5; /* Indigo-600 - ratio 4.6:1 sur blanc */
    --primary-dark: #4338ca; /* Indigo-700 */
    --secondary-color: #6d28d9; /* Violet-700 - ratio 6.1:1 sur blanc */
    --accent-color: #2563eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Couleurs neutres - contraste amélioré WCAG AA/AAA */
    --text-primary: #1f2937;
    --text-secondary: #374151; /* Passé de #4b5563 à #374151 pour ratio 6.5:1 */
    --text-light: #374151; /* WCAG AAA compliant */
    --border-color: #e5e7eb;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    /* Typographie unifiée avec font-display swap */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 16px;
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-md: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    
    /* Espacements */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Bordures */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Font-display swap pour éviter FOIT (Flash of Invisible Text) */
@font-face {
    font-family: 'Segoe UI';
    font-display: swap;
    src: local('Segoe UI');
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    /* Optimisation du rendu texte */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Suppression globale du soulignement sur les liens */
a {
    text-decoration: none;
}

a:hover,
a:focus,
a:active {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation - optimisé pour éviter CLS */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    min-height: 70px; /* Hauteur fixe pour éviter CLS */
    contain: layout style; /* Isolation du rendu */
}

/* Bandeau de signalement - hauteur fixe pour éviter CLS */
.report-banner {
    background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
    padding: 8px 20px;
    text-align: center;
    min-height: 38px; /* Hauteur fixe pour éviter CLS */
    contain: layout style; /* Optimisation du rendu */
    pointer-events: auto; /* S'assurer que le bandeau est cliquable */
    position: relative;
    z-index: 1; /* Plus bas que le hamburger */
}

.report-banner-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.report-banner-link:hover {
    transform: scale(1.02);
}

.report-icon {
    font-size: 1.1rem;
    /* Désactiver l'animation pour réduire CLS */
    /* animation: pulse-bug 2s ease-in-out infinite; */
}

.report-text {
    letter-spacing: 0.3px;
}

.report-arrow {
    font-size: 1rem;
    transition: transform 0.2s ease;
    will-change: transform;
}

.report-banner-link:hover .report-arrow {
    transform: translateX(5px);
}

/* Animation composite optimisée */
@keyframes pulse-bug {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@media (max-width: 768px) {
    .report-banner {
        padding: 6px 15px;
    }
    
    .report-banner-link {
        font-size: 0.8rem;
        gap: 6px;
    }
    
    .report-text {
        display: inline;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.logo-circle {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    color: white;
    letter-spacing: -1px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logo-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.logo-circle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    will-change: transform;
}

.logo-circle:hover::before {
    left: 100%;
}

.nav-logo h2,
.nav-brand {
    color: #2563eb;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none !important;
    color: #374151; /* WCAG AAA - ratio 7:1 sur blanc */
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: #2563eb;
    text-decoration: none !important;
}

/* Hero section */
.hero {
    margin-top: 110px;
    padding: 80px 0;
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.95);
}

/* Formulaire d'analyse */
.analysis-form {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.url-input {
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 300px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.analyze-btn {
    padding: 15px 30px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.analyze-btn:hover {
    background: #059669;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background: rgba(255,255,255,0.15);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    /* backdrop-filter supprimé - non supporté par tous les navigateurs */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Results */
.results-container {
    padding: 60px 0;
    background: white;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* Auth pages */
.auth-container {
    margin-top: 110px;
    padding: 80px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
}

.auth-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2563eb;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-btn:hover {
    background: #1d4ed8;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #2563eb;
    text-decoration: none;
}

/* Pricing page */
.pricing-container {
    margin-top: 110px;
    padding: 80px 0;
}

.pricing-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 60px;
    color: #4b5563;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.pricing-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    transition: transform 0.3s;
    will-change: transform;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.featured {
    border: 2px solid #2563eb;
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 30px;
}

.price span {
    font-size: 1rem;
    color: #4b5563;
}

.features-list {
    list-style: none;
    margin-bottom: 30px;
}

.features-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.pricing-btn {
    width: 100%;
    padding: 15px;
    border: 2px solid #2563eb;
    background: white;
    color: #2563eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pricing-btn.primary {
    background: #2563eb;
    color: white;
}

.pricing-btn.primary-outline {
    background: white;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.pricing-btn.primary-outline:hover {
    background: #2563eb;
    color: white;
}

.pricing-btn:hover {
    background: #2563eb;
    color: white;
}

/* Billing Toggle */
.billing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
}

.billing-option {
    font-size: 1.1rem;
    color: #4b5563;
    cursor: pointer;
    transition: color 0.3s;
}

.billing-option.active {
    color: #2563eb;
    font-weight: 600;
}

.save-badge {
    background: #10b981;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: transform 0.4s;
    border-radius: 50%;
    will-change: transform;
}

.toggle-switch input:checked + .slider {
    background-color: #2563eb;
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* Plan Description */
.plan-description {
    color: #4b5563;
    font-size: 0.9rem;
    margin-bottom: 20px;
    min-height: 40px;
}

/* Price Styling */
.price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: #2563eb;
}

.price .period {
    font-size: 1rem;
    color: #4b5563;
}

/* Pricing Grid 4 columns */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comparison-table table {
    min-width: 600px;
}

.comparison-table th {
    font-weight: 600;
    color: #333;
}

.comparison-table td {
    color: #4b5563;
}

/* FAQ Section */
.faq-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}


/* ===========================================
   MENU HAMBURGER MOBILE
   =========================================== */

/* Bouton hamburger - caché par défaut sur desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;  /* Zone de clic minimum recommandée (48x48px) */
    height: 48px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 10px;
    z-index: 1100; /* Plus élevé que tout le reste */
    position: relative;
    -webkit-tap-highlight-color: transparent; /* Enlever highlight sur mobile */
    touch-action: manipulation; /* Optimiser pour le touch */
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    margin: 2px 0;
    pointer-events: none; /* Les spans ne bloquent pas les clics */
}

/* Animation hamburger -> X */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Overlay pour fermer le menu */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998; /* Plus bas que le nav-toggle (1100) et nav-menu (1000) */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Ne bloque pas les clics quand inactif */
}

.nav-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto; /* Bloque les clics quand actif */
}

/* ===========================================
   RESPONSIVE - TABLETTES ET MOBILES
   =========================================== */

@media (max-width: 992px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 0;
        gap: 0;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    /* Header du menu mobile */
    .nav-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    }
    
    .nav-menu-logo {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        color: white;
        font-weight: 700;
        font-size: 1.1rem;
    }
    
    .logo-circle-small {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 0.9rem;
        color: white;
    }
    
    /* Bouton fermer X */
    .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        color: white;
        transition: background 0.2s ease;
    }
    
    .nav-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    .nav-menu .nav-link {
        display: block;
        padding: 16px 20px;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: left;
    }
    
    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Reset du style Premium sur mobile */
    .nav-menu .nav-link[href="/advanced-features"] {
        background: linear-gradient(45deg, #4f46e5, #6d28d9) !important;
        color: white !important;
        padding: 16px 20px !important;
        border-radius: 8px !important;
        text-align: center;
        margin: 15px 20px;
        width: calc(100% - 40px);
    }
}

/* Cacher le header du menu sur desktop */
.nav-menu-header {
    display: none;
}

.nav-close {
    display: none;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .analysis-form {
        flex-direction: column;
        align-items: center;
        padding: 0 15px;
    }
    
    .url-input {
        min-width: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .analyze-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo h2 {
        font-size: 1rem;
    }
    
    .logo-circle {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid-home {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .section-subtitle {
        padding: 0 15px;
        font-size: 1rem;
    }
    
    /* Footer responsive */
    footer .container > div {
        flex-direction: column;
        text-align: center;
    }
    
    footer ul {
        justify-content: center;
    }
}

/* Responsive - Petits mobiles */
@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Badges responsive */
    .hero img[alt*="RGPD"],
    .hero img[alt*="Note"] {
        max-width: 100%;
        height: auto;
    }
}

/* Section outils page d'accueil */
.tools-showcase {
    padding: 80px 0;
    background: #f8f9fa;
}

.tools-showcase h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #4b5563;
    margin-bottom: 60px;
}

.tools-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.tool-card-home {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
}

.tool-card-home:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #2563eb;
}

.tool-card-home .tool-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.tool-card-home h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.tool-card-home p {
    color: #4b5563;
    margin-bottom: 20px;
    line-height: 1.5;
}

.tool-features {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.tool-features span {
    background: #eef2ff;
    color: #2563eb;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tool-btn-home {
    padding: 12px 30px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.tool-btn-home:hover {
    background: #1d4ed8;
}

/* Section CTA */
.cta-section {
    text-align: center;
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.cta-section h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.cta-section p {
    color: #4b5563;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cta-btn.primary {
    background: #2563eb;
    color: white;
}

.cta-btn.primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.cta-btn.secondary {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.cta-btn.secondary:hover {
    background: #2563eb;
    color: white;
}

/* Section statistiques */
.stats-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Amélioration responsive */
@media (max-width: 768px) {
    .tools-grid-home {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Spinner de chargement */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Publicités discrètes */
.ad-container {
    margin: 30px 0;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.ad-container:hover {
    opacity: 1;
}

.ad-banner {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    position: relative;
}

.ad-banner::before {
    content: 'Publicité';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.7rem;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-banner h3 {
    font-size: 1.1rem;
    color: #495057;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.ad-banner p {
    font-size: 0.9rem;
    color: #4b5563;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.ad-cta {
    display: inline-block;
    background: linear-gradient(135deg, #4f46e5, #6d28d9);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.ad-sidebar {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

.ad-sidebar-label {
    display: block;
    font-size: 0.7rem;
    color: #4b5563; /* Amélioré pour contraste WCAG AA (ratio 7:1 sur blanc) */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-align: center;
}

.ad-sidebar-content {
    background: linear-gradient(135deg, #4f46e5, #6d28d9);
    padding: 16px;
    border-radius: 6px;
    color: white;
    text-align: center;
}

.ad-sidebar-content h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
}

.ad-sidebar-content p {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    opacity: 0.95;
}

.ad-free-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Masquer les pubs pour les utilisateurs premium */
.user-premium .ad-container,
.user-premium [data-ad-slot] {
    display: none !important;
}

/* Responsive ads */
@media (max-width: 768px) {
    .ad-banner {
        padding: 16px;
    }
    
    .ad-banner h3 {
        font-size: 1rem;
    }
    
    .ad-banner p {
        font-size: 0.85rem;
    }
    
    .ad-cta {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

/* ============================================
   CLASSES UTILITAIRES
   Pour remplacer les styles inline
   ============================================ */

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* Flexbox */
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.gap-xl { gap: 2rem; }

/* Text alignment */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* Font weight */
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Font sizes */
.fs-xs { font-size: 0.75rem !important; }
.fs-sm { font-size: 0.875rem !important; }
.fs-md { font-size: 1rem !important; }
.fs-lg { font-size: 1.125rem !important; }
.fs-xl { font-size: 1.25rem !important; }
.fs-2xl { font-size: 1.5rem !important; }
.fs-3xl { font-size: 2rem !important; }
.fs-4xl { font-size: 3rem !important; }

/* Colors */
.text-white { color: white !important; }
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-muted { color: var(--text-secondary) !important; }
.text-gray { color: #4b5563 !important; }

/* Backgrounds */
.bg-white { background: white !important; }
.bg-primary { background: var(--primary-color) !important; }
.bg-gradient-primary { background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%) !important; }
.bg-gradient-success { background: linear-gradient(135deg, #10b981, #059669) !important; }
.bg-dark { background: #111827 !important; }
.bg-light { background: #f8f9fa !important; }

/* Spacing - Margin */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: 0.5rem !important; }
.mb-md { margin-bottom: 1rem !important; }
.mb-lg { margin-bottom: 1.5rem !important; }
.mb-xl { margin-bottom: 2rem !important; }
.mb-2xl { margin-bottom: 2.5rem !important; }
.mb-3xl { margin-bottom: 3rem !important; }
.mt-md { margin-top: 1rem !important; }
.mt-lg { margin-top: 1.5rem !important; }
.mt-xl { margin-top: 2rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Spacing - Padding */
.p-0 { padding: 0 !important; }
.p-sm { padding: 0.5rem !important; }
.p-md { padding: 1rem !important; }
.p-lg { padding: 1.5rem !important; }
.p-xl { padding: 2rem !important; }
.p-2xl { padding: 2.5rem !important; }
.p-3xl { padding: 3rem 2.5rem !important; }
.py-md { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-lg { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-xl { padding-top: 2rem !important; padding-bottom: 2rem !important; }
.py-3xl { padding-top: 3.75rem !important; padding-bottom: 3.75rem !important; }
.px-md { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-lg { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }

/* Width */
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.max-w-container { max-width: 1200px !important; }
.max-w-sm { max-width: 300px !important; }
.max-w-md { max-width: 600px !important; }
.max-w-lg { max-width: 800px !important; }

/* Border radius */
.rounded { border-radius: var(--radius-md) !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: 50% !important; }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* Opacity */
.opacity-80 { opacity: 0.8 !important; }
.opacity-85 { opacity: 0.85 !important; }
.opacity-90 { opacity: 0.9 !important; }
.opacity-95 { opacity: 0.95 !important; }

/* List styles */
.list-none { list-style: none !important; }

/* SVG vertical align */
.icon-inline { 
    vertical-align: middle; 
    margin-right: 0.5rem; 
}

/* Grid layouts */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.875rem;
}

.grid-4-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    text-align: left;
}

/* Section styles */
.section-gradient {
    padding: 3.75rem 1.25rem;
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
}

/* Footer styles */
.footer-dark {
    background: #111827;
    color: white;
    text-align: center;
    padding: 2.5rem 0;
}

.footer-border-top {
    border-top: 1px solid #374151;
    padding-top: 1.875rem;
    margin-top: 1.875rem;
}

/* Stat value styling */
.stat-value-primary {
    font-weight: 700;
    color: #4f46e5;
}

.stat-value-large {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
}

.stat-value-gradient-gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-value-gradient-green {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-value-gradient-pink {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Button styles */
.btn-success-solid {
    background: #059669;
    color: white;
    padding: 0.75rem 1.875rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-success-solid:hover {
    background: #047857;
}

.btn-primary-solid {
    display: inline-block;
    padding: 0.75rem 1.875rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-light {
    display: inline-block;
    padding: 0.75rem 1.875rem;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.875rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.3s;
}

/* Image styles */
.img-logo-md {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.img-logo-sm {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: contain;
}

/* Link styles */
.link-flex {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.link-underline {
    color: #4f46e5;
    text-decoration: underline;
}

/* Premium nav link */
.nav-link-premium {
    background: linear-gradient(45deg, #4f46e5, #6d28d9);
    color: white !important;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
}

/* Security notice badge */
.security-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

/* Success animation container */
.success-icon-container {
    width: 100px;
    height: 100px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: scaleIn 0.5s ease-out;
}

/* Card styles */
.card-white {
    background: white;
    padding: 3.75rem 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Payment details box */
.payment-details-box {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 0.625rem;
    margin-bottom: 1.875rem;
}

/* Form input styles */
.form-input-lg {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 300px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Main content centered */
.main-centered {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   OPTIMISATIONS CLS (Cumulative Layout Shift)
   ============================================ */

/* Images - réserver l'espace pour éviter le décalage */
img {
    max-width: 100%;
    height: auto;
}

/* Images avec ratio préservé */
.tool-card-home img,
.tools-grid-home img {
    aspect-ratio: 340 / 200;
    object-fit: cover;
    background: #f3f4f6;
}

/* Réserver l'espace pour les publicités */
.ad-container {
    min-height: 90px;
    contain: layout style;
}

.ad-container[data-ad-type="banner"] {
    min-height: 120px;
}

/* Conteneurs de sections avec hauteur minimale */
.benefits-section {
    min-height: 300px;
}

.tools-showcase {
    min-height: 800px;
}

/* Tool cards - dimensions fixes pour éviter CLS */
.tool-card-home {
    min-height: 520px;
    contain: layout style;
}

/* Hero section - hauteur fixe */
.hero {
    min-height: 400px;
}

/* Stats section - hauteur fixe */
.stats-section {
    min-height: 150px;
}

/* ============================================
   ANIMATIONS COMPOSITES (GPU accélérées)
   ============================================ */

/* Réservation d'espace pour éviter CLS */
img {
    height: auto;
    max-width: 100%;
}

img[width][height] {
    aspect-ratio: attr(width) / attr(height);
}

/* Footer dimensions fixes pour éviter CLS */
footer {
    min-height: 200px;
    contain: layout style;
}

/* Animations optimisées - utiliser uniquement transform et opacity */
.tool-card-home {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.tool-card-home:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Boutons avec animations composites */
button,
.btn,
[class*="btn-"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
}

/* Réduire les reflows pour les icônes animées */
.icon {
    contain: layout;
}

/* Animation de scale composite */
@keyframes scaleIn {
    0% { 
        opacity: 0;
        transform: scale(0.8);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation fade composite */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Animation slide composite */
@keyframes slideIn {
    0% { 
        opacity: 0;
        transform: translateY(20px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Préférences utilisateur - réduire les animations si demandé */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}