@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Racing+Sans+One&display=swap');
/* ==========================================================================
   VARIABLES & RESET
   ========================================================================== */
:root {
    /* Fond Ultra Dark Casino */
    --color-bg: #0a0a12;
    --color-surface: #0a0a1a;
    --color-surface-alt: #12122b;
    --color-border: #1e1e45;

    /* Couleurs Flashy Gambling */
    --color-primary: #ff003c;
    --color-primary-hover: #ff2e5f;
    --color-primary-muted: rgba(255, 0, 60, 0.2);
    --color-success: #00ff88;
    --color-warning: #ffcc00;
    --color-danger: #ff4d4d;

    /* TYPO STYLE APPLE/GOOGLE : Outfit */
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --color-text: #ffffff;
    --color-text-muted: #8e8eb2;

    /* Structure & Arrondis (Style iOS) */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 24px;

    /* Transitions fluides */
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Racing Sans One', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
    line-height: 1.6;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
/* On augmente l'espace dans le header pour que le logo respire */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px; /* On passe de 15px à 35px pour descendre le titre */
    padding: 30px 0;
}

.logo {
    margin-top: 10px; /* Un petit rab d'espace juste pour le texte KeroIA */
    font-size: 2.8rem;
}

.logo span {
    color: var(--color-primary);
}

.auth-status {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

/* ==========================================================================
   AUTH CARD
   ========================================================================== */
/* IMPORTANT : On enlève le !important ici pour que le JS puisse le cacher */
.auth-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 2rem 0;
}

.auth-card {
    width: 100%;
    max-width: 720px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    display: flex;
    gap: 1rem;
}

.input-group input {
    flex: 1;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.error-message {
    color: var(--color-danger);
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    opacity: 0.8;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text);
}

.btn-secondary {
    background: var(--color-surface-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    padding: 0.6rem 1rem;
}

.btn-ghost:hover {
    color: var(--color-text);
}

.btn-outline-success {
    background: transparent;
    border: 1px solid var(--color-success);
    color: var(--color-success);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-outline-success:hover {
    background: var(--color-success);
    color: var(--color-bg);
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.7rem;
}

.btn-analyze {
    background: transparent;
    border: 1px solid #ff4d6d;
    color: #c1123a; /* texte foncé par défaut */
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.btn-analyze:hover {
    background: #ff4d6d;   /* rouge clair */
    color: #7a0b22;        /* texte encore plus foncé au hover */
}


/* ==========================================================================
   INPUTS
   ========================================================================== */
input {
    background: var(--color-surface-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    width: 100%;
}

input::placeholder {
    color: var(--color-text-muted);
}

input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
}

/* ==========================================================================
   INFO CARD (How it works)
   ========================================================================== */
.info-card {
    max-width: 800px;
    margin: 1.5rem auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
}

.info-title {
    text-align: center;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-title .icon {
    margin-right: 0.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.feature {
    background: var(--color-surface-alt);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.feature h4 {
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.feature p {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.disclaimer {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--color-primary-muted);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--color-danger);
    text-align: center;
    border: 1px solid rgba(214, 58, 82, 0.2);
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.credit-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-surface);
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    font-size: 1rem;
}

.dashboard-grid {
    display: flex;
    gap: 1.25rem;
    flex: 1;
    min-height: 0;
}

.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    overflow-y: auto;
}

.panel h3 {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.match-panel {
    flex: 0 0 340px;
    max-height: 65vh;
}

.result-panel {
    flex: 1;
    max-height: 65vh;
}

/* ==========================================================================
   MATCH LIST
   ========================================================================== */
.match-list {
    display: flex;
    flex-direction: column;
}

.match-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.match-item:last-child {
    border-bottom: none;
}

.match-item:hover {
    background: var(--color-primary-muted);
    margin: 0 -0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: var(--radius-sm);
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.match-teams {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
}

.match-date {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

/* ==========================================================================
   IA BOX (Results) - VERSION COMPACTE
   ========================================================================== */
.ia-box {
    background: var(--color-bg);
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    margin-bottom: 0.35rem;
}

.ia-box:last-child {
    margin-bottom: 0;
}

.ia-box h4 {
    margin: 0 0 0.4rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* 1. GAGNANT (Ville) : On réduit la taille pour que ça rentre mieux */
.ia-box .value {
    font-size: 2.2rem; /* <--- Taille réduite pour le texte (Ville) */
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

/* 2. TOTAL POINTS : On cible spécifiquement la 2ème boîte pour la grossir */
.ia-box:nth-of-type(2) .value {
    font-size: 2rem; /* <--- Taille plus grosse pour les points */
    font-weight: 800;  /* Plus gras */
}

.ia-box .confidence {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

#result-zone .ia-box {
    text-align: center;
}

.ia-box p {
    font-size: 1.5rem;
    margin: 0.2rem 0 0 0;
    line-height: 1.3;
}

.ia-box .label-small {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.confidence-bar-container {
    width: 80%;
    margin: 1rem auto 0;
}

.confidence-bar {
    height: 8px;
    background: var(--color-surface-alt);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-bar-fill {
    height: 100%;
    border-radius: 4px;
}

.confidence-bar-fill.high { background: var(--color-success); }
.confidence-bar-fill.medium { background: var(--color-warning); }
.confidence-bar-fill.low { background: var(--color-danger); }

.confidence-text {
    font-size: 1rem;
    margin-top: 0.5rem;
    color: var(--color-text-muted);
}

/* Résultats - prendre toute la hauteur disponible */
#result-zone.result-panel {
    display: flex;
    flex-direction: column;
}

#result-zone h3 {
    flex-shrink: 0;
    margin-bottom: 0.75rem;
}

#result-zone .ia-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ia-box .team-name {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}
/* ==========================================================================
   UTILITIES
   ========================================================================== */
.success { color: var(--color-success); font-weight: 600; }
.danger { color: var(--color-danger); font-weight: 600; }
.warning { color: var(--color-warning); font-weight: 600; }

.conf-high { color: var(--color-success) !important; }
.conf-mid { color: var(--color-warning) !important; }
.conf-low { color: var(--color-danger) !important; }

.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--color-surface);
    color: var(--color-text);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 10000;
    font-weight: 500;
    font-size: 0.9rem;
    max-width: 300px;
    display: none;
    border-left: 3px solid var(--color-danger);
}

.toast.success {
    border-left-color: var(--color-success);
}

.toast.show {
    display: block;
    animation: slideIn 0.25s ease;
}

.toast.fade-out {
    animation: slideOut 0.25s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ==========================================================================
   SCROLLBARS
   ========================================================================== */
.panel::-webkit-scrollbar {
    width: 4px;
}

.panel::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.panel::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

.panel::-webkit-scrollbar-track {
    background: transparent;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .input-group {
        flex-direction: column;
    }

    .auth-buttons {
        flex-direction: column;
    }

    .dashboard-grid {
    margin-top: 0 !important;
    }

    .match-panel,
    .result-panel {
        flex: none;
        max-height: none;
    }

    .credit-banner {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .info-card {
        padding: 1.25rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }

    .match-panel {
        flex: 0 0 auto;
    }
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav-links {
    margin-top: 0.75rem;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-text);
    background: var(--color-surface);
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--color-surface-alt);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.faq-item h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.faq-item p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ==========================================================================
   BANNIERE
   ========================================================================== */
.legal-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa; /* Fond clair pour trancher avec ton thème sombre */
    color: #1a1a2e;
    padding: 10px 0;
    font-size: 0.85rem;
    border-top: 3px solid #ffcc00; /* La barre jaune caractéristique */
    z-index: 1000;
    text-align: center;
}

.legal-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.age-limit {
    background: #000;
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
}

.legal-banner p {
    margin: 0;
    line-height: 1.4;
}

.legal-banner a {
    color: #d9534f;
    font-weight: bold;
    text-decoration: underline;
}

/* On ajoute une marge en bas du body pour que le footer ne cache pas le dashboard */
body {
    padding-bottom: 70px;
}

/* On force le centrage horizontal du bloc de connexion */
.auth-wrapper {
    display: flex !important; /* Force le mode Flex */
    justify-content: center;   /* Centre horizontalement */
    align-items: center;       /* Centre verticalement si besoin */
    width: 100%;               /* Prend toute la largeur */
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* On s'assure que la carte elle-même a une largeur max propre */
.auth-card {
    width: 100%;
    max-width: 500px; /* Ajuste selon tes préférences */
    margin: 0 auto;   /* Sécurité supplémentaire pour le centrage */
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 !important; /* On réduit le vide en haut (de 50px à 10px) */
    gap: 10px !important;       /* On réduit l'espace entre FAQ/Historique et KeroIA */
}

.top-nav {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05); /* Un léger fond transparent */
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.top-nav a {
    font-size: 0.8rem; /* Plus petit que le reste */
    color: #a0a0c0;    /* Couleur plus discrète */
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.top-nav a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.logo {
    margin: 0 !important;
    font-size: 2.2rem !important; /* On réduit légèrement la taille du titre */
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px; /* <--- Mets 50px ou 60px ici pour faire descendre KeroIA */
    padding: 30px 0;
}

.auth-wrapper, .dashboard {
    margin-top: 0.5rem !important; /* On colle le contenu plus près du logo */
}

/* Utilitaire pour forcer la disparition via JS */
.hidden {
    display: none !important;
}
/* Cette classe va forcer la disparition quoi qu'il arrive */
.hidden-force {
    display: none !important;
}
/* 1. On réduit l'espace réservé au bandeau légal en bas du corps de page */
body {
    padding-bottom: 45px !important; /* On passe de 70px/80px à 45px */
}

/* 2. On s'assure que le container ne force pas une hauteur trop grande */
.container {
    min-height: auto !important; /* On enlève le 100vh qui force parfois le scroll */
    padding-bottom: 0 !important;
}

/* 3. On rend le bandeau légal plus compact (moins haut) */
.legal-banner {
    padding: 4px 0 !important; /* On réduit la hauteur du bandeau lui-même */
    font-size: 0.7rem !important; /* On réduit un chouïa le texte légal */
}

/* 4. On réduit la marge sous le dashboard */
.dashboard {
    margin-bottom: 5px !important;
}

/* --- COMPRESSION ULTIME FAQ --- */

/* Fix FAQ - rapprocher du header */
#faq-page {
    margin-top: -1.6rem;
}

/* ==========================================================================
   SHOP / BOUTIQUE
   ========================================================================== */
#shop-page {
    margin-top: 3rem;
}

.packs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: end;
}

.pack-card {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 260px;
}

.pack-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.pack-card.featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(214, 58, 82, 0.2);
}

.pack-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.pack-card h4 {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
}

.pack-card.featured h4 {
    margin-top: 0.5rem;
}

.pack-credits {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.pack-price {
    font-size: 1.25rem;
    color: var(--color-success);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pack-detail {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.pack-card .btn {
    margin-top: auto;
}

.shop-secure {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .packs-grid {
        grid-template-columns: 1fr;
    }
}

.pack-detail {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}

/* ==========================================================================
   MOBILE RESULT (Analyse sous le match)
   ========================================================================== */
.mobile-result {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0.5rem 0;
    animation: slideDown 0.3s ease;
}

.mobile-result .ia-box {
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.8rem;
}

.mobile-result .ia-box:last-child {
    margin-bottom: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   DISCLAIMER BANNER (Haut de page)
   ========================================================================== */
.disclaimer-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #000;
    color: #fff;
    padding: 12px 20px;
    font-size: 0.8rem;
    z-index: 1000;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.disclaimer-banner p {
    margin: 0;
    line-height: 1.4;
}

/* Ajoute un padding en haut du body pour que le contenu ne soit pas caché */
body {
    padding-top: 50px !important;
    padding-bottom: 45px !important;
}

/* ==========================================================================
   TOP NAV REDESIGN
   ========================================================================== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1rem;
}

.nav-left {
    flex: 0 0 auto;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.nav-logo span {
    color: var(--color-primary);
}

.nav-center {
    display: flex;
    gap: 20px;
}

.nav-center a {
    font-size: 0.8rem;
    color: #a0a0c0;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.nav-center a:hover {
    color: #fff;
}

.nav-right {
    flex: 0 0 auto;
}

/* ==========================================================================
   HEADER REDESIGN
   ========================================================================== */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
}

/* On cache l'ancien logo h1 */
.header > .logo {
    display: none;
}

.header > .auth-status {
    display: none;
}

/* ==========================================================================
   RESPONSIVE TOP NAV
   ========================================================================== */
@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }

    .nav-left, .nav-right {
        width: 100%;
        text-align: center;
    }

    .nav-center {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-center a {
        font-size: 0.75rem;
    }

    .disclaimer-banner p {
        font-size: 0.6rem;
    }
}

/* ==========================================================================
   GUEST ACCESS
   ========================================================================== */
.guest-access {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.guest-access p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.header {
    padding-top: 0 !important;
    gap: 0 !important;
}

#auth-wrapper {
    margin-top: 2rem !important;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    border-radius: 6px;
}

.nav-left {
    display: flex;
    align-items: center;
}

/* BARRE DE CONFIANCE */
.confidence-bar {
    width: 100%;
    height: 5px;
    background: var(--color-surface-alt);
    border-radius: 3px;
    margin-top: 0.3rem;
    overflow: hidden;
}

.confidence-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.confidence-bar-fill.high { background: linear-gradient(90deg, #00ff88, #00cc6a); }
.confidence-bar-fill.medium { background: linear-gradient(90deg, #ffcc00, #ff9900); }
.confidence-bar-fill.low { background: linear-gradient(90deg, #ff4d4d, #cc0000); }

.confidence-with-bar {
    margin-top: 0.2rem;
}

.confidence-label {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    display: flex;
    justify-content: space-between;
}

.confidence-percent { font-weight: 600; }
.confidence-percent.high { color: var(--color-success); }
.confidence-percent.medium { color: var(--color-warning); }
.confidence-percent.low { color: var(--color-danger); }

/* ==========================================================================
   FORÇAGE FINAL (OVERRIDE) : SANS BORDURES COLORÉES
   ========================================================================== */

/* 1. Force le titre avec TA couleur */
#result-zone h3 {
    color: var(--color-primary) !important;
    text-shadow: 0 0 15px rgba(255, 0, 60, 0.4);
}

/* 2. AUCUNE BARRE COLORÉE (Ni gauche, ni droite) */
/* On remet juste la bordure grise fine partout pour que ce soit propre */
#result-zone .ia-box,
.mobile-result .ia-box {
    border: 1px solid var(--color-border) !important;
}

/* 3. Bouton Analyser */
.btn-analyze {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

.btn-analyze:hover {
    background: var(--color-primary) !important;
    color: #ffffff !important;
}

/* 4. Nav blanc */
.nav-center a, nav a {
    color: #ffffff !important;
}

/* ==========================================================================
   STYLE BOUTIQUE : LOOK IDENTIQUE ANALYSE
   ========================================================================== */

.pack-card {
    background: var(--color-bg) !important;        /* Même fond noir que l'analyse */
    border: 1px solid var(--color-border) !important; /* Même bordure grise fine */
    border-radius: var(--radius-sm) !important;    /* Mêmes arrondis */
    box-shadow: none !important;                   /* On vire les ombres */
    color: var(--color-text);
}

/* On garde juste une bordure ROUGE FLASHY pour le pack du milieu (Featured) */
.pack-card.featured {
    border-color: var(--color-primary) !important;
    background: var(--color-bg) !important; /* On force le fond noir même ici */
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.15) !important; /* Légère lueur rouge */
}

/* Nettoyage des titres */
.pack-card h4 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #ffffff; /* Titre en blanc pur */
}

/* ==========================================================================
   UNIFICATION DES BOUTONS (STYLE "ANALYSER" PARTOUT)
   ========================================================================== */

/* Cible le bouton "Acheter" (Shop) et les boutons "Connexion/Inscription" (.btn-primary) */
.pack-card .btn,
.btn-primary {
    background: transparent !important;              /* Fond transparent par défaut */
    border: 1px solid var(--color-primary) !important; /* Bordure couleur flashy */
    color: var(--color-primary) !important;          /* Texte couleur flashy */

    /* Copie du style exact du bouton Analyser */
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Au survol : Ils se remplissent (comme le bouton Analyser) */
.pack-card .btn:hover,
.btn-primary:hover {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.4); /* Petit effet néon en prime */
    transform: translateY(-2px); /* Petite remontée stylée */
}

/* ==========================================================================
   STYLE MON COMPTE (GAUCHE + ESPACÉ)
   ========================================================================== */

#account-page {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 450px; /* Un peu plus large pour que l'email rentre bien */
    margin: 3rem auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.page-header h3 {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: var(--color-text);
}

/* --- INFO BULLE (Alignée à Gauche) --- */
.account-info {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1.5rem; /* Plus d'espace interne */
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column; /* On empile les lignes */
    gap: 0.8rem; /* Espace entre ligne email et ligne solde */
    align-items: flex-start; /* Tout calé à gauche */
}

.info-row {
    width: 100%;
    display: flex;
    align-items: center; /* Aligne le texte verticalement */
    gap: 10px; /* Espace entre le label "Email:" et l'adresse */
}

.info-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    min-width: 60px; /* Pour aligner les valeurs proprement */
}

.info-value {
    font-size: 1.1rem;
    color: white;
    font-weight: 500;
}

.info-value-credits {
    font-size: 1.3rem;
    color: var(--color-primary); /* Rouge */
    font-weight: 700;
}

/* --- ACTIONS (Plus espacées) --- */
.account-actions {
    display: flex;
    flex-direction: column;
    gap: 1.2rem; /* <--- ESPACE AGRANDI ICI (C'était 0.6rem avant) */
}

.btn-full {
    width: 100%;
    justify-content: flex-start;
    padding: 1rem;
    background: var(--color-surface-alt);
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.btn-full:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-border);
}

.btn-logout {
    width: 100%;
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 0.5rem;
}

.btn-logout:hover {
    background: var(--color-primary);
    color: white;
}

.btn-back {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: 0.2s;
}

.btn-back:hover {
    color: white;
    text-decoration: underline;
}

/* ==========================================================================
   CORRECTION TAILLE FAQ
   ========================================================================== */

#faq-page {
    max-width: 500px !important; /* On passe de 800px à 500px */
    padding: 1.5rem !important;  /* On réduit un peu l'espacement interne */
    margin: 2rem auto !important; /* On s'assure qu'elle est bien centrée */
}

/* On réduit aussi l'espacement entre les questions pour gagner de la place */
.faq-list {
    gap: 0.8rem !important;
}

.faq-item {
    padding: 1rem !important; /* Questions plus compactes */
}

/* ==========================================================================
   FIX GRILLE "COMMENT ÇA MARCHE" (2x2)
   ========================================================================== */

.features-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Force 2 colonnes strictes */
    gap: 1.5rem !important; /* Espace aéré entre les blocs */
}

/* Sur mobile, on garde 1 seule colonne pour que ce soit lisible */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr !important;
    }
}

#faq-page {
    max-width: 650px !important; /* Un peu plus large pour la grille 2x2 */
    padding: 1.5rem !important;
    margin: 2rem auto !important;
}

/* On force la même grille que 'Comment ça marche' */
#faq-page .features-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
}

/* Sur mobile, on repasse en 1 colonne */
@media (max-width: 768px) {
    #faq-page .features-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   STYLE HISTORIQUE (DASHBOARD)
   ========================================================================== */

#historique-page {
    max-width: 600px !important;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-box {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    font-family: var(--font-display); /* Police Racing si dispo */
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    color: var(--color-text-muted);
}

.stat-sub {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* --- LE VERT (RÉUSSITE) --- */
.stat-success {
    border-color: var(--color-success);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

.stat-success .stat-value {
    color: var(--color-success);
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

/* --- LE VIOLET (SCORE EXACT / DIAMANT) --- */
.stat-purple {
    border-color: #bf00ff; /* Violet Néon */
    box-shadow: 0 0 20px rgba(191, 0, 255, 0.15);
}

.stat-purple .stat-value {
    color: #d845ff;
    text-shadow: 0 0 20px rgba(216, 69, 255, 0.6);
}

.stat-purple .stat-icon {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    }
}

/* ==========================================================================
   STYLE MATCHS (COMPACT & AÉRÉ)
   ========================================================================== */

/* 1. LE SÉPARATEUR DE DATE (Style "Capsule discrète") */
.date-separator {
    display: flex;
    align-items: center;
    justify-content: center; /* Centré pour bien séparer les blocs */
    margin: 2rem 0 1rem 0;   /* Espace avant/après */
    position: relative;
}

/* Une petite ligne grise derrière la date pour structurer (optionnel, très classe) */
.date-separator::before {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    height: 1px;
    background: var(--color-border);
    z-index: 0;
    opacity: 0.3;
}

.date-bubble {
    background: var(--color-bg); /* Fond noir pour passer par dessus la ligne */
    border: 1px solid var(--color-border);
    color: var(--color-text-muted); /* Gris clair, pas rouge */
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem; /* Petit texte */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 1; /* Par dessus la ligne */
    font-weight: 600;
}

/* 2. LA CARTE DU MATCH (Compacte + Marge à gauche) */
.match-card {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm); /* Rayon plus petit */
    padding: 1rem 1.2rem; /* Retour à un padding compact */
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;

    /* C'est ici qu'on gère l'aération demandée */
    margin-left: 1rem;
    margin-right: 1rem;
    /* Optionnel : petite bordure à gauche pour le style */
    border-left: 3px solid transparent;
}

.match-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--color-primary); /* Petite touche rouge juste au survol */
    transform: translateX(5px); /* Glisse légèrement vers la droite */
}

.match-teams {
    font-size: 0.95rem; /* Taille écriture normale */
    color: var(--color-text);
    font-weight: 500;
}

.match-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.analyze-icon {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* --- ZONE RÉSULTAT MOBILE (Accordion) --- */
/* Zone Résultat Mobile */
.mobile-result-zone {
    display: none; /* Caché par défaut */
    width: 100%;
    background: #222233; /* Fond sombre visible */
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Quand on l'active via JS, cette classe aide */
.mobile-result-zone.active {
    display: block !important;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ajustement des boîtes IA en mobile pour qu'elles soient côte à côte */
.mobile-ia-grid {
    display: flex;
    gap: 10px;
}

.mobile-ia-box {
    flex: 1;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

/* --- CORRECTION MOBILE GLOBALE --- */

/* 1. Sécurité : Empêche tout dépassement horizontal */
*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    overflow-x: hidden; /* Coupe ce qui dépasse à droite */
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 2. Ajustement du Conteneur Principal sur Mobile */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 10px; /* Seulement 10px de marge sur les côtés */
        margin: 0;
        max-width: 100vw;
    }

    .dashboard-grid {
        display: block; /* On enlève le Grid/Flex complexe */
        width: 100%;
        padding: 0;
    }

    /* Force les cartes à prendre toute la place */
    .match-card {
        width: 100%;
        margin: 0 0 10px 0; /* Marge seulement en bas */
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Corrige l'en-tête (Logo + Menu) */
    .top-nav {
        padding: 10px 0;
        flex-wrap: wrap; /* Permet aux éléments de passer à la ligne si besoin */
    }

    .nav-right {
        margin-left: auto; /* Pousse les boutons à droite */
    }
}

/* --- CORRECTIF MOBILE URGENCE --- */

/* 1. On empêche le site de dépasser sur la droite */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. On recadre le contenu principal */
@media (max-width: 768px) {
    .container {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 15px !important; /* Un peu d'espace sur les bords */
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* 3. On force les cartes match à prendre toute la largeur sans dépasser */
    .match-card {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* 4. On s'assure que la zone d'analyse est visible */
    .mobile-result-zone {
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 20px;
    }

    /* 5. Correction du header */
    .header {
        padding: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}


/* 2. On recadre le contenu principal et on le DESCEND */
@media (max-width: 768px) {
    .container {
        width: 100% !important;
        max-width: 100vw !important;

        /* C'EST ICI LE CHANGEMENT :
           40px en haut, 15px sur les côtés, 15px en bas */
        padding: 40px 15px 15px 15px !important;

        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* (Le reste du bloc ne change pas) */
    .match-card {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .mobile-result-zone {
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 20px;
    }

    .header {
        padding: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* CORRECTIF HAUTEUR SEULEMENT (Sans couleur) */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;

    /* C'est la SEULE ligne importante pour ton problème de hauteur */
    padding-top: 5px !important;
}
