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

:root {
    --orange: #FF6B00;
    --orange-dark: #E55A00;
    --orange-light: #FFE4D1;
    --green: #10B981;
    --red: #EF4444;
    --gray-bg: #F9FAFB;
    --gray-card: #FFFFFF;
    --gray-text: #1F2937;
    --gray-muted: #6B7280;
    --gray-border: #E5E7EB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-bg);
    color: var(--gray-text);
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 80px;
}

/* === HERO === */
.hero {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: white;
    padding: 40px 20px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.2);
}

.logo {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.tagline {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--orange);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--orange);
    border: 2px solid var(--orange);
}

.hero .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: white;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 12px;
}

.btn-small {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: var(--orange-light);
    color: var(--orange-dark);
    font-weight: 600;
}

.btn-warn { background: #FEF3C7; color: #92400E; }
.btn-ok { background: #D1FAE5; color: #065F46; }
.btn-danger { background: #FEE2E2; color: #991B1B; }

.btn-logout {
    background: var(--gray-border);
    color: var(--gray-text);
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

/* === SECTIONS === */
section {
    margin-bottom: 28px;
}

h1 { font-size: 28px; margin-bottom: 16px; }
h2 { font-size: 20px; margin-bottom: 14px; color: var(--gray-text); }
h3 { font-size: 17px; margin-bottom: 8px; }

/* === STATS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: white;
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--gray-border);
}

.stat-number {
    font-size: 26px;
    font-weight: 800;
    color: var(--orange);
    line-height: 1.1;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === LEAGUES === */
.leagues-list { display: flex; flex-direction: column; gap: 8px; }

.league-item {
    background: white;
    padding: 14px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--gray-border);
}

.league-name { font-weight: 600; }
.league-stats { color: var(--orange); font-weight: 700; font-size: 14px; }

/* === RECENT === */
.recent-list { display: flex; flex-direction: column; gap: 10px; }

.recent-item {
    background: white;
    padding: 14px;
    border-radius: 10px;
    border-left: 4px solid var(--gray-border);
}

.recent-item.won { border-left-color: var(--green); }
.recent-item.lost { border-left-color: var(--red); }

.recent-match { font-weight: 600; margin-bottom: 4px; }
.recent-verdict { color: var(--gray-muted); font-size: 14px; }
.recent-result { margin-top: 6px; font-weight: 600; font-size: 14px; }

/* === PRICING === */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.price-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--gray-border);
}

.price-card.featured {
    border-color: var(--orange);
    transform: scale(1.02);
    background: var(--orange-light);
}

.price {
    font-size: 22px;
    font-weight: 800;
    color: var(--orange);
    margin: 8px 0;
}

.price-card p {
    color: var(--gray-muted);
    margin-bottom: 12px;
    font-size: 13px;
}

/* === AUTH === */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: white;
    padding: 32px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
}

.logo-link {
    display: block;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--orange);
    text-decoration: none;
    margin-bottom: 20px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--gray-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--gray-muted);
}

.auth-link a {
    color: var(--orange);
    font-weight: 600;
    text-decoration: none;
}

/* === FORMS === */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: white;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--orange);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--gray-muted);
    font-size: 12px;
}

.error-msg {
    color: var(--red);
    background: #FEE2E2;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

.error-msg:empty { display: none; }

/* === DASHBOARD === */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 0;
}

.dashboard-header .logo {
    color: var(--orange);
    font-size: 22px;
    text-decoration: none;
}

.user-card {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: white;
    padding: 20px;
    border-radius: 14px;
}

.user-card h3 { margin-bottom: 8px; }
.user-card p { font-size: 14px; margin: 4px 0; opacity: 0.95; }
.user-card code {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
}
.referral-info {
    margin-top: 12px;
    font-size: 12px;
    opacity: 0.9;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

.badge.trial { background: #FEF3C7; color: #92400E; }
.badge.active { background: #D1FAE5; color: #065F46; }

/* === PREDICTION CARD === */
.prediction-box { display: flex; flex-direction: column; gap: 14px; }

.pred-card {
    background: white;
    padding: 18px;
    border-radius: 14px;
    border-left: 5px solid var(--orange);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.pred-card.pending { border-left-color: var(--orange); }
.pred-card.won { border-left-color: var(--green); background: #F0FDF4; }
.pred-card.lost { border-left-color: var(--red); background: #FEF2F2; }

.pred-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--gray-muted);
}

.pred-confidence {
    background: var(--orange);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 700;
}

.pred-match {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.pred-verdict {
    color: var(--orange-dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.pred-details {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid var(--gray-border);
    font-size: 14px;
}

.pred-explanation {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-border);
    color: var(--gray-text);
    font-size: 14px;
    font-style: italic;
}

/* === HISTORY === */
.history-list { display: flex; flex-direction: column; gap: 8px; }

.history-item {
    background: white;
    padding: 12px 14px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px;
    border-left: 4px solid var(--gray-border);
    font-size: 14px;
}

.history-item.won { border-left-color: var(--green); }
.history-item.lost { border-left-color: var(--red); }

.hist-date {
    color: var(--gray-muted);
    font-size: 12px;
    grid-column: 1 / -1;
}

.hist-match { font-weight: 600; }
.hist-verdict { color: var(--gray-muted); font-size: 13px; }
.hist-result { font-weight: 700; text-align: right; align-self: center; }

/* === ADMIN === */
.add-form {
    background: white;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--gray-border);
}

.search-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-border);
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 15px;
}

.subs-list { display: flex; flex-direction: column; gap: 10px; }

.sub-card {
    background: white;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--gray-border);
}

.sub-card.inactive { opacity: 0.6; }
.sub-card.expiring { border-left: 4px solid #F59E0B; }

.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sub-info {
    color: var(--gray-muted);
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.7;
}

.sub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* === LEARN === */
.lang-switch {
    display: flex;
    gap: 4px;
    background: white;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--gray-border);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.lang-btn.active {
    background: var(--orange);
    color: white;
}

.learn-article {
    background: white;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 14px;
    border: 1px solid var(--gray-border);
}

.learn-article h2 {
    font-size: 17px;
    color: var(--orange);
    margin-bottom: 10px;
}

.learn-article p { margin-bottom: 10px; color: var(--gray-text); }

.learn-article ul {
    padding-left: 20px;
    margin: 10px 0;
}

.learn-article li {
    margin-bottom: 6px;
}

/* === UTILS === */
.loading {
    text-align: center;
    color: var(--gray-muted);
    padding: 20px;
}

.empty {
    text-align: center;
    color: var(--gray-muted);
    padding: 30px;
    background: white;
    border-radius: 12px;
    border: 1px dashed var(--gray-border);
}

.footer {
    text-align: center;
    color: var(--gray-muted);
    padding: 24px 0;
    font-size: 12px;
}

.footer p { margin: 4px 0; }

/* === RESPONSIVE === */
@media (min-width: 600px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .hero-buttons { flex-direction: row; justify-content: center; }
}

/* === BOUTON FLOTTANT WHATSAPP === */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-float:active {
    transform: scale(0.95);
}

.whatsapp-float svg {
    width: 30px;
    height: 30px;
}

/* Animation pulsation pour attirer l'œil */
.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: #25D366;
    animation: pulse-whatsapp 2s infinite;
    z-index: -1;
}

@keyframes pulse-whatsapp {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.4); opacity: 0; }
}

.contact-info {
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: #FFE4D1;
    border-radius: 10px;
    color: #92400E;
    font-size: 13px;
    font-weight: 500;
}
