/* =================================================================
   RESET & BASE - PREMIUM REDESIGN
   ================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ═══════════════════════════════════════════════════════════════
       CHÂSSIS APPLICATIF UNIFIÉ - Variables globales
       Ces variables définissent le cadre unique pour TOUTES les pages
       ═══════════════════════════════════════════════════════════════ */
    --app-max-width: 1140px;
    --app-padding-x: 24px;
    --app-padding-y: 40px;

    /* Couleurs premium (statiques) */
    --primary: #1a73e8;
    --primary-dark: #1558b0;
    --secondary: #4285f4;
    --tertiary: #6C757D;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --danger: #ef4444;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* ═══════════════════════════════════════════════════════════════
       SYSTÈME DE THÈME JOUR/NUIT - Variables dynamiques
       Ces variables changent selon le thème actif
       ═══════════════════════════════════════════════════════════════ */

    /* Valeurs par défaut (Mode Nuit) */
    --theme-bg-main: linear-gradient(180deg, #0a0f1a 0%, #0f172a 50%, #1e1b4b 100%);
    --theme-bg-nav: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    --theme-bg-header: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    /* Générateur harmonisé avec header (nuit: indigo foncé) */
    --theme-bg-generator: linear-gradient(180deg, #1e1b4b 0%, #0f172a 40%, #1e1b4b 100%);
    --theme-bg-card: #ffffff;
    --theme-bg-card-alt: #f8fafc;
    --theme-bg-input: #ffffff;
    --theme-bg-hover: rgba(255, 255, 255, 0.05);

    --theme-text-primary: #1f2937;
    --theme-text-secondary: #6b7280;
    --theme-text-muted: #9ca3af;
    --theme-text-on-dark: rgba(255, 255, 255, 0.95);
    --theme-text-on-dark-muted: rgba(255, 255, 255, 0.7);

    --theme-border: #e5e7eb;
    --theme-border-light: rgba(255, 255, 255, 0.1);
    --theme-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --theme-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --theme-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);

    /* Compatibilité avec anciennes variables */
    --text-primary: var(--theme-text-primary);
    --text-secondary: var(--theme-text-secondary);
    --text-dark: #212529;
    --text-muted: var(--theme-text-muted);
    --bg-primary: var(--theme-bg-card);
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border: var(--theme-border);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: var(--theme-shadow);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-hover: var(--theme-shadow-hover);
}

/* ═══════════════════════════════════════════════════════════════════════
   THÈME NUIT (20h → 7h) - Immersion, IA, calcul, premium
   ═══════════════════════════════════════════════════════════════════════ */
body.theme-night {
    --theme-bg-main: linear-gradient(180deg, #0a0f1a 0%, #0f172a 50%, #1e1b4b 100%);
    --theme-bg-nav: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    --theme-bg-header: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    /* Générateur harmonisé (nuit: indigo foncé continu) */
    --theme-bg-generator: linear-gradient(180deg, #1e1b4b 0%, #0f172a 40%, #1e1b4b 100%);
    --theme-bg-card: #ffffff;
    --theme-bg-card-alt: #f8fafc;
    --theme-bg-input: #ffffff;
    --theme-bg-hover: rgba(255, 255, 255, 0.05);

    --theme-text-primary: #1f2937;
    --theme-text-secondary: #6b7280;
    --theme-text-muted: #9ca3af;
    --theme-text-on-dark: rgba(255, 255, 255, 0.95);
    --theme-text-on-dark-muted: rgba(255, 255, 255, 0.7);

    --theme-border: #e5e7eb;
    --theme-border-light: rgba(255, 255, 255, 0.1);
    --theme-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    --theme-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.2);
    --theme-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);

    /* État badge */
    --theme-badge-bg: rgba(16, 185, 129, 0.15);
    --theme-badge-border: rgba(16, 185, 129, 0.4);
    --theme-badge-text: #10b981;
}

/* ═══════════════════════════════════════════════════════════════════════
   THÈME JOUR (7h → 20h) - Clarté, data, confiance, usage pro
   ═══════════════════════════════════════════════════════════════════════ */
body.theme-day {
    --theme-bg-main: linear-gradient(180deg, #f0f4f8 0%, #e2e8f0 50%, #cbd5e1 100%);
    --theme-bg-nav: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    --theme-bg-header: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    /* Générateur harmonisé (jour: slate continu depuis header)
       Header finit à #334155, générateur continue en slate foncé */
    --theme-bg-generator: linear-gradient(180deg, #334155 0%, #1e293b 40%, #334155 100%);
    --theme-bg-card: #ffffff;
    --theme-bg-card-alt: #f8fafc;
    --theme-bg-input: #ffffff;
    --theme-bg-hover: rgba(0, 0, 0, 0.02);

    --theme-text-primary: #0f172a;
    --theme-text-secondary: #475569;
    --theme-text-muted: #64748b;
    --theme-text-on-dark: rgba(255, 255, 255, 0.98);
    --theme-text-on-dark-muted: rgba(255, 255, 255, 0.8);

    --theme-border: #e2e8f0;
    --theme-border-light: rgba(255, 255, 255, 0.2);
    --theme-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --theme-shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.1);
    --theme-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

    /* État badge */
    --theme-badge-bg: rgba(16, 185, 129, 0.12);
    --theme-badge-border: rgba(16, 185, 129, 0.35);
    --theme-badge-text: #059669;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 16px;
}

/* =================================================================
   APP SHELL - CHÂSSIS APPLICATIF UNIFIÉ
   Fond dynamique selon le thème (Jour/Nuit)
   Toutes les pages (/index, /loto, /stats, /simulateur, /faq, /news)
   doivent utiliser cette structure pour une cohérence "web-app"
   ================================================================= */

/* Fond global - utilise la variable de thème */
body,
body.app-shell,
body.stats-page,
body.simulator-page,
body.theme-night,
body.theme-day {
    background: var(--theme-bg-main);
    background-attachment: fixed;
    transition: background 0.4s ease;
}

/* Container applicatif unique - même largeur pour TOUTES les pages */
.app-container,
.container,
.stats-container,
.simulator-container,
.index-container,
.loto-container {
    max-width: var(--app-max-width);
    width: 100%;
    margin: 0 auto;
    padding: var(--app-padding-y) var(--app-padding-x);
    box-sizing: border-box;
}

/* =================================================================
   LOTO PAGE - Transition fluide header → générateur
   Couleurs harmonisées entre header et générateur

   Mode JOUR : slate (#1e293b → #334155)
   Mode NUIT : indigo (#0f172a → #1e1b4b)
   ================================================================= */

/* Fond harmonisé qui suit le thème */
.loto-page {
    background: var(--theme-bg-generator);
}

/* Container sans padding-top */
.loto-page .loto-container {
    padding-top: 0;
}

/* Header avec padding-bottom réduit pour coller au générateur */
.loto-page .page-header {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Générateur collé au header (0 espace) et pleine largeur visuelle */
.loto-page .generator-hero {
    margin: 0 calc(-1 * var(--app-padding-x));
    padding-top: 0;
    border-radius: 0 0 32px 32px;
}

/* Responsive loto-page */
@media (max-width: 768px) {
    .loto-page .generator-hero {
        margin: 0 -20px;
        padding-top: 0;
        border-radius: 0 0 24px 24px;
    }
}

@media (max-width: 480px) {
    .loto-page .generator-hero {
        margin: 0 -16px;
        padding-top: 0;
        border-radius: 0 0 20px 20px;
    }
}

/* =================================================================
   ENGINE NAVIGATION BAR - Barre de changement de moteur
   ================================================================= */
.engine-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px var(--app-padding-x);
    background: var(--theme-bg-nav);
    margin: calc(-1 * var(--app-padding-y)) calc(-1 * var(--app-padding-x)) 0 calc(-1 * var(--app-padding-x));
    position: relative;
    z-index: 50;
    transition: background 0.4s ease;
}

/* Engine-nav hors container (FAQ, News) - pas de marges négatives */
body > .engine-nav {
    margin: 0;
    padding: 12px 24px;
}

/* Zone droite de la nav (badge + switch) */
.engine-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.engine-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--theme-border-light);
    border: 1px solid var(--theme-border-light);
    border-radius: 8px;
    color: var(--theme-text-on-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.engine-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(-4px);
}

.engine-nav-btn .nav-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.engine-nav-btn:hover .nav-arrow {
    transform: translateX(-3px);
}

.engine-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--theme-badge-bg);
    border: 1px solid var(--theme-badge-border);
    border-radius: 20px;
    color: var(--theme-badge-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.engine-badge::before {
    content: '●';
    font-size: 0.6rem;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* =================================================================
   ENGINE NAV SUBPAGE - Navigation pour sous-pages
   ================================================================= */
.engine-nav-subpage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--theme-bg-nav);
    position: relative;
    z-index: 100;
    transition: background 0.4s ease;
}

.engine-nav-subpage .engine-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =================================================================
   PAGE HEADER PREMIUM - Header unifié sous-pages
   ================================================================= */
.page-header {
    background: var(--theme-bg-header);
    color: var(--theme-text-on-dark);
    padding: 30px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 35%);
    pointer-events: none;
}

.page-header .header-content {
    position: relative;
    z-index: 2;
}

.page-header .header-content h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-header .header-content .subtitle {
    font-size: 16px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .page-header {
        padding: 24px 16px 50px;
    }

    .page-header .header-content h1 {
        font-size: 26px;
    }

    .page-header .header-content .subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .engine-nav-subpage {
        padding: 10px 15px;
    }

    .page-header .header-content h1 {
        font-size: 22px;
        gap: 8px;
    }
}

/* =================================================================
   WELCOME INTRO - Texte accueil sous header
   ================================================================= */
.welcome-intro {
    text-align: center;
    padding: 24px 20px;
    margin-bottom: 24px;
}

.welcome-intro p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 480px) {
    .welcome-intro {
        padding: 20px 16px;
    }

    .welcome-intro p {
        font-size: 14px;
    }
}

/* =================================================================
   MOTOR INFO SECTION - Encart info moteur (page Loto)
   Même structure que legend-section du simulateur
   ================================================================= */
.motor-info-section {
    padding: 16px 24px;
}

.motor-info {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.motor-info .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .motor-info {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .motor-info {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

/* =================================================================
   THEME SWITCH BUTTON - Bouton bascule Jour/Nuit
   ================================================================= */
.theme-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--theme-border-light);
    border: 1px solid var(--theme-border-light);
    border-radius: 50%;
    color: var(--theme-text-on-dark);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-switch:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.theme-switch:active {
    transform: scale(0.95);
}

/* Icône selon le thème actif */
.theme-switch .icon-day,
.theme-switch .icon-night {
    display: none;
}

/* En mode Nuit, afficher l'icône soleil (pour passer en Jour) */
body.theme-night .theme-switch .icon-day {
    display: block;
}

/* En mode Jour, afficher l'icône lune (pour passer en Nuit) */
body.theme-day .theme-switch .icon-night {
    display: block;
}

/* Animation de rotation lors du switch */
.theme-switch.switching {
    animation: themeSwitchSpin 0.5s ease;
}

@keyframes themeSwitchSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Version flottante du switch (pour index et pages sans engine-nav) */
.theme-switch-float {
    position: fixed;
    bottom: 90px;
    left: 20px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
    box-shadow: var(--theme-shadow-lg);
}

.theme-switch-float:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

@media (max-width: 480px) {
    .engine-nav {
        padding: 10px var(--app-padding-x);
        margin: calc(-1 * var(--app-padding-y)) calc(-1 * var(--app-padding-x)) 0 calc(-1 * var(--app-padding-x));
    }

    body > .engine-nav {
        margin: 0;
        padding: 10px 16px;
    }

    .engine-nav-right {
        gap: 8px;
    }

    .engine-nav-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .engine-nav-btn .nav-text {
        display: none;
    }

    .engine-nav-btn .nav-arrow {
        font-size: 1.3rem;
    }

    .engine-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .theme-switch {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

.card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* =================================================================
   HEADER PREMIUM
   ================================================================= */
.header {
    background: var(--theme-bg-header);
    color: var(--theme-text-on-dark);
    transition: background 0.4s ease;
    padding: 60px var(--app-padding-x) 40px var(--app-padding-x);
    text-align: center;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    margin: 0 calc(-1 * var(--app-padding-x));
    border-radius: 0;
}

/* =================================================================
   INDEX PAGE - Bandeau autonome full-width
   Classes dédiées sans dépendance au container
   ================================================================= */

/* Fond unifié index - continuité visuelle avec le bandeau */
body.page-index {
    background: var(--theme-bg-header);
    background-attachment: fixed;
}

/* Nav Index - classe autonome full-width, enfants directs */
.engine-nav-index {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--app-max-width);
    margin: 0 auto;
    padding: 12px var(--app-padding-x);
    background: var(--theme-bg-nav);
    position: relative;
    z-index: 50;
    transition: background 0.4s ease;
    box-sizing: border-box;
}

/* Header Index - classe autonome full-width */
.page-header-index {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 60px var(--app-padding-x) 40px;
    background: var(--theme-bg-header);
    color: var(--theme-text-on-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease;
}

.page-header-index::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 35%);
    pointer-events: none;
}

.page-header-index .header-content {
    max-width: var(--app-max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-header-index h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -1px;
    color: white;
}

.page-header-index .subtitle {
    font-size: 18px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive Index */
@media (max-width: 768px) {
    .engine-nav-index {
        padding: 10px var(--app-padding-x);
    }

    .page-header-index {
        padding: 40px var(--app-padding-x) 30px;
    }

    .page-header-index h1 {
        font-size: 32px;
    }

    .page-header-index .subtitle {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .engine-nav-index {
        padding: 10px 16px;
    }

    .page-header-index {
        padding: 30px 16px 25px;
    }

    .page-header-index h1 {
        font-size: 28px;
    }

    .page-header-index .subtitle {
        font-size: 14px;
    }
}

/* Châssis applicatif */
.app-shell {
    width: 100%;
}

.app-shell > .container {
    padding-top: 0;
}

.header::before {
    content: '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 6px;
    line-height: 2.2;
    color: rgba(255, 255, 255, 0.03);
    word-wrap: break-word;
    overflow: hidden;
    pointer-events: none;
}

/* Orbes lumineux dans le header */
.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 35%);
    pointer-events: none;
    animation: auraBreath 8s ease-in-out infinite;
}

.header h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    letter-spacing: -1px;
    color: white;
}

.header h1 .brand-suffix {
    font-size: 0.5em;
    font-weight: 400;
    opacity: 0.85;
    vertical-align: super;
}

.header .subtitle {
    font-size: 20px;
    opacity: 0.95;
    font-weight: 400;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* =================================================================
   DATE SECTION
   ================================================================= */
.date-section h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.date-input {
    padding: 14px 16px;
    font-size: 1.05rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* =================================================================
   ACTIONS SECTION
   ================================================================= */
.actions-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.btn:focus {
    outline: 3px solid rgba(74, 144, 226, 0.3);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #6A5ACD;
    transform: translateY(-2px);
}

.btn-tertiary {
    background: var(--tertiary);
    color: white;
}

.btn-tertiary:hover:not(:disabled) {
    background: #5A6268;
    transform: translateY(-2px);
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =================================================================
   SYSTEM SECTION - Mise à jour
   ================================================================= */
.system-section {
    background: linear-gradient(135deg, #FFF9F0 0%, #FFFFFF 100%);
    border-left: 4px solid #FF9800;
}

.system-section h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #E65100;
}

.system-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-system {
    background: #FF9800;
    color: white;
    width: 100%;
}

.btn-system:hover:not(:disabled) {
    background: #F57C00;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-system:focus {
    outline: 3px solid rgba(255, 152, 0, 0.3);
    outline-offset: 2px;
}

/* Update Status Message */
.update-status {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: fadeIn 0.4s ease-in;
}

.update-status.success {
    background: #E8F5E9;
    border-left: 4px solid var(--success);
    color: #1B5E20;
}

.update-status.error {
    background: #FFEBEE;
    border-left: 4px solid var(--error);
    color: #B71C1C;
}

.update-status.info {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
    color: #0D47A1;
}

/* =================================================================
   INSTALL SECTION - Installation BDD
   ================================================================= */
.install-section {
    background: linear-gradient(135deg, #F0F8FF 0%, #FFFFFF 100%);
    border-left: 4px solid #2196F3;
}

.install-section h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #1976D2;
}

.db-status {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid #2196F3;
}

.status-icon {
    font-size: 1.5rem;
}

.status-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.db-status.exists {
    background: #E8F5E9;
    border-left-color: var(--success);
}

.db-status.not-exists {
    background: #FFF3E0;
    border-left-color: #F57C00;
}

.install-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-install {
    background: #2196F3;
    color: white;
    width: 100%;
}

.btn-install:hover:not(:disabled) {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-install:focus {
    outline: 3px solid rgba(33, 150, 243, 0.3);
    outline-offset: 2px;
}

.btn-reset {
    background: #E53935;
    color: white;
    width: 100%;
}

.btn-reset:hover:not(:disabled) {
    background: #C62828;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-reset:focus {
    outline: 3px solid rgba(229, 57, 53, 0.3);
    outline-offset: 2px;
}

/* Install Status Message */
.install-status {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: fadeIn 0.4s ease-in;
}

.install-status.success {
    background: #E8F5E9;
    border-left: 4px solid var(--success);
    color: #1B5E20;
}

.install-status.error {
    background: #FFEBEE;
    border-left: 4px solid var(--error);
    color: #B71C1C;
}

.install-status.info {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
    color: #0D47A1;
}

/* =================================================================
   RESULTS SECTION
   ================================================================= */
.results-section {
    margin-top: 32px;
}

.result-card {
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-header h2 {
    font-size: 1.5rem;
    color: var(--primary);
}

.btn-copy {
    background: var(--bg-light);
    border: 2px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

/* Numbers Grid */
.numbers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
}

.number-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
    transition: transform 0.3s ease;
}

.number-ball:hover {
    transform: scale(1.15) rotate(5deg);
}

.number-ball.chance {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

/* Key Info */
.key-info {
    background: var(--bg-light);
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.key-info ul {
    list-style: none;
    padding-left: 0;
}

.key-info li {
    padding: 8px 0;
    font-size: 1rem;
    color: var(--text-dark);
}

.key-info li::before {
    content: "✓ ";
    color: var(--success);
    font-weight: bold;
    margin-right: 8px;
}

/* Accordion */
.accordion {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
    font-family: inherit;
}

.accordion-header:hover {
    color: var(--primary-dark);
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content.open {
    max-height: 1000px;
}

.accordion-content pre {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    margin-top: 12px;
    color: var(--text-dark);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Error Card */
.error-card {
    background: #FFF5F5;
    border-left: 4px solid var(--error);
}

.error-card h3 {
    color: var(--error);
    margin-bottom: 12px;
}

.error-card p {
    color: var(--text-dark);
    line-height: 1.8;
}

/* =================================================================
   FOOTER
   ================================================================= */
.footer {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.docs-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.docs-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Credits Section */
.credits {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.credits .dev-by {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.credits .dev-by strong {
    color: var(--primary);
    font-weight: 600;
}

.credits .credits-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* =================================================================
   RESPONSIVE - UNIFIED APP SHELL
   ================================================================= */
@media (max-width: 768px) {
    :root {
        --app-padding-x: 20px;
        --app-padding-y: 30px;
    }
}

@media (max-width: 600px) {
    :root {
        --app-padding-x: 16px;
        --app-padding-y: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .container {
        padding: var(--app-padding-y) var(--app-padding-x);
    }

    .card {
        padding: 20px;
    }

    .number-ball {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* =================================================================
   ADVANCED SECTION (DETAILS)
   ================================================================= */
details {
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

details summary {
    list-style: none;
    user-select: none;
    transition: all 0.3s ease;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: "▶ ";
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

details[open] summary::before {
    transform: rotate(90deg);
}

details summary:hover {
    color: var(--primary) !important;
}

/* =================================================================
   UTILITIES
   ================================================================= */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   STATS CARDS
   ================================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 28px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.stat-card:nth-child(2):hover {
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.4);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.stat-card:nth-child(3):hover {
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

.stat-icon {
    font-size: 42px;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin: 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 15px;
    opacity: 0.95;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-sublabel {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 8px;
    font-weight: 400;
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-card {
        padding: 24px 20px;
    }

    .stat-icon {
        font-size: 36px;
    }

    .stat-value {
        font-size: 28px;
    }
}

/* =================================================================
   VISUAL GRIDS - Affichage premium des grilles d'analyse
   ================================================================= */

/* Header de l'analyse */
.analysis-header {
    text-align: center;
    margin-bottom: 30px;
}

.analysis-header h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: capitalize;
}

.analysis-metadata {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 8px 14px;
    border-radius: 20px;
}

.meta-icon {
    font-size: 1rem;
}

/* Container des grilles */
.grids-visual-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

/* Card de grille */
.grid-visual-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: gridFadeInUp 0.6s ease-out;
    animation-fill-mode: both;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.grid-visual-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

@keyframes gridFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header de la card */
.grid-visual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-light);
}

.grid-number {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grid-number-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grid-number-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Score */
.grid-score {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.grid-score .score-value {
    font-size: 2rem;
    font-weight: 700;
}

.grid-score .score-max {
    font-size: 1rem;
    color: var(--text-muted);
}

.grid-score.score-high .score-value {
    color: #27ae60;
}

.grid-score.score-medium .score-value {
    color: #f39c12;
}

.grid-score.score-low .score-value {
    color: #e74c3c;
}

/* Numéros */
.grid-visual-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.visual-ball {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.visual-ball:hover {
    transform: scale(1.1);
}

.visual-ball.main {
    background: radial-gradient(circle at 30% 30%, #64B5F6, #1976D2);
    color: white;
}

.visual-ball.chance {
    background: radial-gradient(circle at 30% 30%, #FFD54F, #F57C00);
    color: white;
}

.visual-ball.separator {
    background: transparent;
    box-shadow: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    width: 30px;
}

/* Étoiles */
.grid-visual-stars {
    text-align: center;
    margin: 16px 0;
}

.grid-visual-stars .star {
    font-size: 1.5rem;
    margin: 0 2px;
}

.grid-visual-stars .star.filled {
    color: #FFD700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.grid-visual-stars .star.empty {
    color: #ddd;
}

/* Badges */
.grid-visual-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.visual-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.visual-badge:hover {
    transform: scale(1.05);
}

.visual-badge.badge-default {
    background: #ecf0f1;
    color: #2c3e50;
}

.visual-badge.badge-hot {
    background: #ffebee;
    color: #c62828;
}

.visual-badge.badge-spectrum {
    background: #e3f2fd;
    color: #1565c0;
}

.visual-badge.badge-balanced {
    background: #e8f5e9;
    color: #2e7d32;
}

.visual-badge.badge-hybrid {
    background: #f3e5f5;
    color: #7b1fa2;
}

.visual-badge.badge-gap {
    background: #fff3e0;
    color: #e65100;
}

/* Footer de l'analyse */
.analysis-footer {
    text-align: center;
    padding: 20px;
    background: #fff8e1;
    border-radius: 12px;
    margin-top: 24px;
    border-left: 4px solid #ffc107;
}

.analysis-footer p {
    margin: 0;
    color: #8d6e12;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .grids-visual-container {
        grid-template-columns: 1fr;
    }

    .analysis-metadata {
        flex-direction: column;
        align-items: center;
    }

    .grid-visual-numbers {
        gap: 6px;
    }

    .visual-ball {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .visual-ball.separator {
        width: 24px;
        font-size: 1.2rem;
    }
}

/* =================================================================
   BOUTON SCROLL TO TOP
   ================================================================= */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* =================================================================
   SECTION FAQ
   ================================================================= */

.faq-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    padding: 80px 20px;
    margin-top: 60px;
}

.faq-section .container {
    max-width: var(--app-max-width);
    margin: 0 auto;
}

.faq-title {
    text-align: center;
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}

.faq-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-category {
    margin-bottom: 32px;
}

.faq-category-title {
    font-size: 1.2rem;
    color: var(--theme-text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-item {
    background: var(--theme-bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    box-shadow: var(--theme-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--theme-border);
}

.faq-item:hover {
    box-shadow: var(--theme-shadow-hover);
}

.faq-question {
    width: 100%;
    background: var(--theme-bg-card);
    border: none;
    padding: 16px 20px;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.5;
}

.faq-question:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.faq-question span:first-child {
    flex: 1;
    padding-right: 15px;
}

.faq-icon {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-question {
    background: var(--bg-light);
    border-bottom: 1px solid var(--theme-border);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
    background: var(--bg-light);
}

.faq-item.active .faq-answer {
    max-height: 2000px;
    padding: 16px 20px;
}

.faq-answer p {
    margin: 0 0 12px 0;
    line-height: 1.6;
    color: var(--theme-text-secondary);
    font-size: 0.9rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    margin: 12px 0;
    padding-left: 20px;
    line-height: 1.7;
    color: var(--theme-text-secondary);
}

.faq-answer li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.faq-answer strong {
    color: var(--theme-text-primary);
    font-weight: 600;
}

.faq-answer code {
    background: rgba(26, 115, 232, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: var(--primary);
}

.faq-answer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.faq-answer a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.faq-answer em {
    color: var(--theme-text-muted);
    font-style: italic;
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq-section {
        padding: 50px 15px;
        margin-top: 40px;
    }

    .faq-title {
        font-size: 1.8rem;
    }

    .faq-intro {
        font-size: 1rem;
        margin-bottom: 35px;
    }

    .faq-category-title {
        font-size: 1.2rem;
    }

    .faq-question {
        font-size: 0.95rem;
        padding: 16px 20px;
    }

    .faq-answer {
        padding: 0 20px;
    }

    .faq-item.active .faq-answer {
        padding: 15px 20px;
    }

    .faq-icon {
        font-size: 1.3rem;
    }
}

/* =================================================================
   PREMIUM CARDS
   ================================================================= */

.premium-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* =================================================================
   TOOLS GRID (2 colonnes desktop)
   ================================================================= */

.quick-tools {
    margin-bottom: 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.tool-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.6;
}

/* =================================================================
   ANALYZE SECTION
   ================================================================= */

.analyze-section {
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 32px;
    text-align: center;
}

.section-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-header .icon {
    font-size: 36px;
}

.section-header .subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

/* =================================================================
   FORM GROUPS
   ================================================================= */

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 15px;
}

.premium-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: var(--transition);
    background: var(--bg-secondary);
    font-family: inherit;
}

.premium-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* =================================================================
   GRID COUNT SELECTOR
   ================================================================= */

.grid-count-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.count-btn {
    min-width: 60px;
    padding: 14px 20px;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-family: inherit;
}

.count-btn:hover {
    border-color: var(--primary);
    background: rgba(26, 115, 232, 0.05);
    transform: translateY(-2px);
}

.count-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.helper-text {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

/* =================================================================
   BUTTONS PREMIUM
   ================================================================= */

.btn-large {
    width: 100%;
    margin-top: 8px;
}

.btn-primary.btn-large {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 18px 36px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.btn-primary.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary.btn-large:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 20px;
}

/* =================================================================
   BOUTONS MODERNES - Refonte Complete
   ================================================================= */

/* Reset pour tous les boutons */
.btn,
button.btn-primary,
button.btn-secondary,
button.btn-tertiary,
a.btn-primary,
a.btn-secondary {
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bouton Primary - Call to Action principal */
.btn.btn-primary,
button.btn-primary,
a.btn-primary,
.tool-card .btn-secondary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white !important;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover,
.tool-card .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

.btn.btn-primary:active,
button.btn-primary:active,
a.btn-primary:active {
    transform: translateY(0);
}

/* Bouton Secondary - Actions secondaires */
.btn.btn-secondary,
button.btn-secondary,
a.btn-secondary {
    background: white;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
}

.btn.btn-secondary:hover,
button.btn-secondary:hover,
a.btn-secondary:hover {
    background: var(--primary);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

/* Bouton Tertiary - Actions mineures */
.btn.btn-tertiary,
button.btn-tertiary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 2px solid var(--border);
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
}

.btn.btn-tertiary:hover,
button.btn-tertiary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

/* =================================================================
   BOUTON RETOUR - Visible sur fond violet
   ================================================================= */

.back-link,
.return-link,
a.back-link {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-link:hover,
.return-link:hover,
a.back-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-4px);
    color: white !important;
}

.back-link::before,
.return-link::before {
    content: '←';
    font-size: 18px;
}

/* Version pour fond clair */
.back-link-dark,
a.back-link-dark {
    background: var(--bg-secondary);
    color: var(--primary) !important;
    border: 2px solid var(--primary);
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.back-link-dark:hover,
a.back-link-dark:hover {
    background: var(--primary);
    color: white !important;
    transform: translateX(-4px);
}

.back-link-dark::before {
    content: '←';
    font-size: 18px;
}

/* Lien docs simple (pour footer etc) */
.docs-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.docs-link:hover {
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary-dark);
}

/* =================================================================
   PARTNER CARD (pub non-intrusive)
   ================================================================= */

.partner-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 32px 0;
    border-left: 4px solid #f59e0b;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.partner-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.partner-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.partner-badge {
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.partner-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.partner-text {
    color: #78350f;
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

.partner-cta {
    color: #92400e;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
    white-space: nowrap;
}

.partner-cta:hover {
    color: #78350f;
    gap: 8px;
}

/* =================================================================
   RESULTS DISPLAY PREMIUM
   ================================================================= */

.results-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.results-header h2 {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.results-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-secondary);
}

.results-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 20px;
}

.results-footer {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--warning);
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.results-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.results-footer a:hover {
    text-decoration: underline;
}

/* =================================================================
   RESPONSIVE MOBILE PREMIUM
   Utilise les variables CSS pour le châssis unifié
   ================================================================= */

@media (max-width: 768px) {
    .header {
        padding: 40px var(--app-padding-x);
        margin: 0 calc(-1 * var(--app-padding-x)) 30px;
    }

    .header h1 {
        font-size: 32px;
    }

    .header .subtitle {
        font-size: 16px;
    }

    .container {
        padding: var(--app-padding-y) var(--app-padding-x);
    }

    .premium-card {
        padding: 24px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tool-card {
        padding: 24px;
    }

    .tool-icon {
        font-size: 48px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .grid-count-selector {
        gap: 8px;
    }

    .count-btn {
        min-width: 50px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-primary.btn-large {
        padding: 16px 24px;
        font-size: 16px;
    }

    .partner-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   STATS HERO SECTION - PREMIUM
   ═══════════════════════════════════════════════════════════════ */

.stats-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 50px 30px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.stats-hero-header {
    text-align: center;
    margin-bottom: 40px;
}

.stats-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.stats-hero-subtitle {
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

/* Grid des cards */
.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Card individuelle */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color-start), var(--card-color-end));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Couleurs des cards */
.stat-card-blue {
    --card-color-start: var(--primary);
    --card-color-end: var(--secondary);
    border-left-color: var(--primary);
}

.stat-card-green {
    --card-color-start: #10b981;
    --card-color-end: #059669;
    border-left-color: #10b981;
}

.stat-card-pink {
    --card-color-start: #ec4899;
    --card-color-end: #db2777;
    border-left-color: #ec4899;
}

.stat-card-purple {
    --card-color-start: #8b5cf6;
    --card-color-end: #7c3aed;
    border-left-color: #8b5cf6;
}

/* Icône */
.stat-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Chiffre principal */
.stat-number {
    font-size: 56px;
    font-weight: 900;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1;
    letter-spacing: -2px;
}

.stat-number-small {
    font-size: 28px;
    letter-spacing: -0.5px;
}

/* Label */
.stat-label {
    font-size: 13px;
    font-weight: 700;
    color: #4b5563;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Détail */
.stat-detail {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

/* Footer section */
.stats-hero-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.stats-footer-icon {
    font-size: 20px;
}

.stats-footer-text {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   STATS HERO - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .stats-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .stats-hero {
        padding: 30px 20px;
        margin: 20px 0;
    }

    .stats-hero-title {
        font-size: 24px;
    }

    .stats-hero-subtitle {
        font-size: 14px;
    }

    .stats-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 24px 16px;
    }

    .stat-icon {
        font-size: 36px;
    }

    .stat-number {
        font-size: 42px;
    }

    .stat-number-small {
        font-size: 24px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stats-hero-footer {
        flex-direction: column;
        gap: 5px;
    }

    .stats-footer-text {
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REFONTE UX TUNNEL - ZONE PRIMAIRE GENERATEUR
   ═══════════════════════════════════════════════════════════════════════════ */

/* =================================================================
   GENERATOR HERO - Zone primaire (centre de gravite)
   ================================================================= */

/* =================================================================
   GENERATOR HERO - Fond Data/Algorithme
   ================================================================= */

.generator-hero {
    position: relative;
    margin: 0 -20px 0 -20px;
    padding: 50px 20px 60px 20px;
    /* Utilise la variable thème pour harmoniser avec le header */
    background: var(--theme-bg-generator);
    overflow: hidden;
    border-radius: 0 0 32px 32px;
    transition: background 0.4s ease;
}

/* Couche 1 : Pattern de chiffres (1-49) */
.generator-hero::before {
    content: '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 8px;
    line-height: 2.5;
    color: rgba(255, 255, 255, 0.04);
    word-wrap: break-word;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Couche 2 : Grille de points lumineux */
.generator-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 2;
    animation: auraBreath 8s ease-in-out infinite;
}

@keyframes auraBreath {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Couche 3 : Ligne de scan horizontale (sur le fond hero) */
.generator-hero .scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.3) 20%,
        rgba(139, 92, 246, 0.6) 50%,
        rgba(59, 130, 246, 0.3) 80%,
        transparent 100%
    );
    animation: scanLineMove 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 4;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

@keyframes scanLineMove {
    0%, 100% {
        top: 10%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 90%;
        opacity: 0;
    }
}

/* Particules flottantes (points data) */
.generator-hero .data-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(59, 130, 246, 0.6);
    border-radius: 50%;
    animation: floatParticle 10s linear infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100%) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100%) translateX(20px);
        opacity: 0;
    }
}

/* Conteneur des particules */
.data-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.data-particles .particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 12s ease-in-out infinite;
}

/* Particules variees */
.particle.p1 {
    width: 6px;
    height: 6px;
    background: rgba(59, 130, 246, 0.7);
    left: 10%;
    animation-delay: 0s;
    animation-duration: 10s;
}

.particle.p2 {
    width: 4px;
    height: 4px;
    background: rgba(139, 92, 246, 0.6);
    left: 25%;
    animation-delay: 1.5s;
    animation-duration: 12s;
}

.particle.p3 {
    width: 8px;
    height: 8px;
    background: rgba(6, 182, 212, 0.5);
    left: 40%;
    animation-delay: 3s;
    animation-duration: 14s;
}

.particle.p4 {
    width: 3px;
    height: 3px;
    background: rgba(59, 130, 246, 0.8);
    left: 55%;
    animation-delay: 4.5s;
    animation-duration: 11s;
}

.particle.p5 {
    width: 5px;
    height: 5px;
    background: rgba(139, 92, 246, 0.7);
    left: 70%;
    animation-delay: 2s;
    animation-duration: 13s;
}

.particle.p6 {
    width: 4px;
    height: 4px;
    background: rgba(6, 182, 212, 0.6);
    left: 85%;
    animation-delay: 5s;
    animation-duration: 10s;
}

.particle.p7 {
    width: 6px;
    height: 6px;
    background: rgba(59, 130, 246, 0.5);
    left: 15%;
    animation-delay: 6s;
    animation-duration: 15s;
}

.particle.p8 {
    width: 3px;
    height: 3px;
    background: rgba(139, 92, 246, 0.8);
    left: 90%;
    animation-delay: 7s;
    animation-duration: 9s;
}

@keyframes particleFloat {
    0% {
        bottom: -10%;
        opacity: 0;
        transform: translateX(0);
    }
    5% {
        opacity: 0.8;
    }
    50% {
        transform: translateX(20px);
    }
    95% {
        opacity: 0.8;
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: translateX(-10px);
    }
}

/* Carte du generateur avec lueur */
.generator-card {
    position: relative;
    z-index: 10;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 80px rgba(59, 130, 246, 0.15),
        0 0 120px rgba(139, 92, 246, 0.1);
    overflow: hidden;
}

/* Barre de gradient animee en haut de la carte */
.generator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4, #3b82f6);
    background-size: 300% 100%;
    animation: gradientShift 4s ease infinite;
    z-index: 20;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Header du generateur */
.generator-header {
    text-align: center;
    margin-bottom: 36px;
}

.generator-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid rgba(26, 115, 232, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 20px;
}

.badge-icon {
    font-size: 18px;
}

.badge-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.generator-title {
    font-size: 36px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.generator-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.generator-subtitle strong {
    color: var(--primary);
    font-weight: 700;
}

/* Formulaire generateur */
.generator-form {
    max-width: 500px;
    margin: 0 auto;
}

.generator-form .form-group {
    margin-bottom: 24px;
}

.generator-form .form-group label {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    display: block;
}

/* =================================================================
   CTA PRINCIPAL - AMPLIFIE
   ================================================================= */

.btn-cta-main {
    width: 100%;
    padding: 22px 32px;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 24px rgba(16, 185, 129, 0.35),
        0 0 0 0 rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
    font-family: inherit;
    margin-top: 8px;
}

.btn-cta-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-cta-main:hover::before {
    left: 100%;
}

.btn-cta-main:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(16, 185, 129, 0.45),
        0 0 0 4px rgba(16, 185, 129, 0.15);
}

.btn-cta-main:active {
    transform: translateY(-1px);
}

.cta-icon {
    font-size: 24px;
}

.cta-text {
    flex: 1;
    text-align: center;
}

.cta-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.btn-cta-main:hover .cta-arrow {
    transform: translateX(4px);
}

/* Texte sous le CTA */
.cta-subtext {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 0;
}

/* =================================================================
   BANDEAU DE CONFIANCE (Trust Band)
   ================================================================= */

.trust-band {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    margin: 24px 0 40px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.trust-icon {
    font-size: 16px;
}

.trust-label {
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
}

.trust-separator {
    color: #d1d5db;
    font-size: 12px;
}

.hide-mobile {
    display: flex;
}

/* =================================================================
   ZONE SECONDAIRE - OUTILS COMPLEMENTAIRES
   ================================================================= */

.secondary-tools {
    margin: 48px 0;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.secondary-header {
    text-align: center;
    margin-bottom: 28px;
}

.secondary-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 8px;
}

.secondary-header p {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

/* Grid des outils compacts */
.tools-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Card outil mini */
.tool-card-mini {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: white;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-card-mini:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.12);
    transform: translateX(4px);
}

.tool-mini-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.tool-mini-content {
    flex: 1;
}

.tool-mini-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px 0;
}

.tool-mini-content p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.tool-mini-arrow {
    font-size: 20px;
    color: #d1d5db;
    transition: all 0.3s ease;
}

.tool-card-mini:hover .tool-mini-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* =================================================================
   RESPONSIVE - TUNNEL UX
   ================================================================= */

@media (max-width: 768px) {
    .header {
        padding: 40px 16px 30px 16px;
        margin: 0 -16px;
    }

    .generator-hero {
        margin: 0 -16px 0 -16px;
        padding: 30px 16px 40px 16px;
        border-radius: 0 0 24px 24px;
    }

    .generator-hero::before {
        font-size: 11px;
        letter-spacing: 4px;
        line-height: 2;
    }

    .generator-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .generator-title {
        font-size: 26px;
    }

    .generator-subtitle {
        font-size: 14px;
    }

    .btn-cta-main {
        padding: 18px 24px;
        font-size: 17px;
        border-radius: 14px;
    }

    .cta-icon {
        font-size: 20px;
    }

    .trust-band {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .trust-separator {
        display: none;
    }

    .hide-mobile {
        display: none;
    }

    .tools-grid-compact {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tool-card-mini {
        padding: 16px 20px;
    }

    .tool-mini-icon {
        font-size: 28px;
    }

    .tool-mini-content h4 {
        font-size: 15px;
    }

    .tool-mini-content p {
        font-size: 12px;
    }

    .secondary-tools {
        margin: 32px 0;
        padding-top: 32px;
    }

    .secondary-header h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .generator-card {
        padding: 24px 20px;
    }

    .generator-badge {
        padding: 6px 12px;
    }

    .badge-text {
        font-size: 10px;
    }

    .generator-title {
        font-size: 22px;
    }

    .btn-cta-main {
        padding: 16px 20px;
        font-size: 16px;
    }

    .cta-arrow {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MICRO-AJUSTEMENTS UX CONVERSION
   ═══════════════════════════════════════════════════════════════════════════ */

/* =================================================================
   1. TENSION TEMPORELLE - Urgence douce sous le CTA
   ================================================================= */

.cta-urgency {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 8px;
    animation: urgencyPulse 4s ease-in-out infinite;
}

@keyframes urgencyPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.1);
    }
}

.urgency-icon {
    font-size: 16px;
    animation: clockTick 1s ease-in-out infinite;
}

@keyframes clockTick {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.urgency-text {
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
}

.urgency-text strong {
    color: #b45309;
    font-weight: 700;
    font-size: 15px;
}

/* =================================================================
   2. CREDIBILITE DATA - Profondeur temporelle
   ================================================================= */

.data-depth {
    color: var(--primary);
    font-weight: 600;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    margin-left: 4px;
    white-space: nowrap;
}

/* =================================================================
   3. SUBORDINATION DES OUTILS - Contraste reduit
   ================================================================= */

/* Section header plus discrete */
.secondary-tools {
    margin: 48px 0;
    padding-top: 40px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.secondary-tools:hover {
    opacity: 1;
}

.secondary-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}

.secondary-header p {
    font-size: 13px;
    color: #9ca3af;
}

/* Cards outils - version subordonnee */
.tool-card-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-card-mini:hover {
    background: white;
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateX(2px);
}

.tool-mini-icon {
    font-size: 26px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tool-card-mini:hover .tool-mini-icon {
    opacity: 1;
}

.tool-mini-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: #4b5563;
    margin: 0 0 4px 0;
}

.tool-mini-content p {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.4;
}

.tool-mini-arrow {
    font-size: 16px;
    color: #d1d5db;
    transition: all 0.3s ease;
}

.tool-card-mini:hover .tool-mini-arrow {
    color: #9ca3af;
    transform: translateX(2px);
}

/* =================================================================
   RESPONSIVE - Micro-ajustements
   ================================================================= */

@media (max-width: 768px) {
    .cta-urgency {
        flex-direction: column;
        gap: 4px;
        padding: 10px 16px;
    }

    .urgency-text {
        font-size: 12px;
        text-align: center;
    }

    .data-depth {
        display: block;
        margin-top: 4px;
        margin-left: 0;
    }

    .secondary-tools {
        margin: 36px 0;
        padding-top: 28px;
    }

    .tool-card-mini {
        padding: 14px 16px;
    }

    .tool-mini-icon {
        font-size: 24px;
    }

    .tool-mini-content h4 {
        font-size: 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGES SECONDAIRES - FAQ & NEWS
   Utilise le même châssis visuel que le simulateur
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container pour sous-pages (remonte sous le header premium) */
.subpage-container {
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

/* =================================================================
   HEADER SUBPAGE (fallback si pas de page-header)
   ================================================================= */

.header-subpage {
    padding: 40px 20px;
    margin-bottom: 40px;
}

.header-subpage h1 {
    font-size: 36px;
    margin-bottom: 12px;
}

.header-subpage .subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* =================================================================
   FOOTER NAVIGATION
   ================================================================= */

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.footer-nav a:hover {
    color: var(--primary);
    background: rgba(26, 115, 232, 0.08);
}

.footer-nav a.active {
    color: var(--primary);
    font-weight: 600;
}

.footer-sep {
    color: var(--border);
    font-size: 10px;
}

.footer-brand {
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

/* =================================================================
   MINI-FAQ SECTION (Homepage)
   ================================================================= */

.mini-faq-section {
    margin: 48px 0;
    padding: 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
}

.mini-faq-header {
    text-align: center;
    margin-bottom: 28px;
}

.mini-faq-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.mini-faq-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.mini-faq-container {
    max-width: 700px;
    margin: 0 auto;
}

.mini-faq-container .faq-item {
    background: white;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mini-faq-container .faq-question {
    padding: 18px 24px;
    font-size: 15px;
}

.mini-faq-container .faq-answer {
    padding: 0 24px;
}

.mini-faq-container .faq-item.active .faq-answer {
    padding: 16px 24px;
}

.mini-faq-footer {
    text-align: center;
    margin-top: 28px;
}

.btn-see-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-see-more:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(4px);
}

.btn-see-more .arrow {
    transition: transform 0.3s ease;
}

.btn-see-more:hover .arrow {
    transform: translateX(4px);
}

/* =================================================================
   PAGE FAQ DEDIEE
   ================================================================= */

.faq-page {
    background: transparent;
    padding: 0;
    margin: 0;
}

.faq-page .faq-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Navigation rapide FAQ */
.faq-nav {
    background: var(--theme-bg-card);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--theme-shadow);
    border: 1px solid var(--theme-border);
}

.faq-nav h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.faq-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-nav ul li a {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-sm);
    color: var(--theme-text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.faq-nav ul li a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* =================================================================
   ACTION CARD - CTA neutralisé en carte applicative
   ================================================================= */
.action-card {
    margin-top: 32px;
    margin-bottom: 24px;
}

.action-card-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.action-card-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.action-card-text {
    flex: 1;
    min-width: 200px;
}

.action-card-text h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin-bottom: 4px;
}

.action-card-text p {
    font-size: 14px;
    color: var(--theme-text-secondary);
    margin: 0;
}

.action-card .btn {
    flex-shrink: 0;
}

.action-card .btn-arrow {
    margin-left: 6px;
}

@media (max-width: 600px) {
    .action-card-content {
        flex-direction: column;
        text-align: center;
    }

    .action-card .btn {
        width: 100%;
    }
}

/* =================================================================
   PAGE NEWS / ACTUALITES
   Style changelog/release notes applicatif
   ================================================================= */

.news-section {
    max-width: 800px;
    margin: 0 auto;
}

/* Post individuel - style card standard */
.news-post {
    background: var(--theme-bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--theme-shadow);
    border: 1px solid var(--theme-border);
    transition: box-shadow 0.2s ease;
}

.news-post:hover {
    box-shadow: var(--theme-shadow-hover);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.news-date {
    font-size: 12px;
    color: var(--theme-text-muted);
    font-weight: 500;
}

.news-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-tag-launch {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.news-tag-tech {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.news-tag-roadmap {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.news-tag-update {
    background: rgba(26, 115, 232, 0.15);
    color: var(--primary);
}

.news-tag-partner {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-content {
    color: var(--theme-text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.news-content p {
    margin-bottom: 10px;
}

.news-content p:last-child {
    margin-bottom: 0;
}

.news-content ul,
.news-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

.news-content li {
    margin-bottom: 6px;
}

.news-content strong {
    color: var(--theme-text-primary);
}

.news-content em {
    color: var(--theme-text-muted);
}

/* Message fin des news */
.news-end {
    text-align: center;
    padding: 24px 16px;
    color: var(--theme-text-muted);
    font-size: 13px;
}

.news-end p {
    margin: 4px 0;
}

/* =================================================================
   RESPONSIVE - Pages secondaires
   ================================================================= */

@media (max-width: 768px) {
    .subpage-container {
        margin-top: -20px;
    }

    .header-subpage {
        padding: 30px 16px;
    }

    .header-subpage h1 {
        font-size: 28px;
    }

    .footer-nav {
        gap: 8px;
    }

    .footer-nav a {
        font-size: 13px;
        padding: 4px 8px;
    }

    .footer-sep {
        display: none;
    }

    .mini-faq-section {
        padding: 28px 20px;
        margin: 36px 0;
    }

    .mini-faq-header h3 {
        font-size: 20px;
    }

    .mini-faq-container .faq-question {
        padding: 16px 20px;
        font-size: 14px;
    }

    .faq-nav {
        padding: 16px;
    }

    .faq-nav ul {
        gap: 6px;
    }

    .faq-nav ul li a {
        padding: 5px 10px;
        font-size: 12px;
    }

    .news-post {
        padding: 20px 16px;
    }

    .news-title {
        font-size: 16px;
    }

    .news-content {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .subpage-container {
        margin-top: -15px;
    }

    .faq-nav ul {
        flex-direction: column;
    }

    .faq-nav ul li a {
        display: block;
        text-align: center;
    }

    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

