/* ============================================
   GestionFoot — Thème ROUGE & VERT
   ============================================ */

:root {
    /* Palette principale */
    --red:           #DC2626;
    --red-light:     #EF4444;
    --red-dark:      #991B1B;
    --red-bg:        #FEF2F2;

    --green:         #16A34A;
    --green-light:   #22C55E;
    --green-dark:    #14532D;
    --green-bg:      #F0FDF4;

    /* Accents */
    --accent:        #F59E0B;
    --accent-bg:     #FFFBEB;

    /* Neutres */
    --dark:          #0F172A;
    --text:          #1F2937;
    --text-light:    #6B7280;
    --text-lighter:  #9CA3AF;
    --bg:            #FAFAF7;
    --card:          #FFFFFF;
    --border:        #E5E7EB;

    /* Aliases compat */
    --primary:       var(--red);
    --primary-light: var(--red-light);
    --primary-dark:  var(--red-dark);
    --primary-bg:    var(--red-bg);

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow:    0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --max-w: 1200px;
    --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

.brand-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--red) 0%, var(--red) 50%, var(--green) 50%, var(--green) 100%);
}

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav-brand {
    display: flex; align-items: center; gap: 0.6rem;
    font-weight: 800; font-size: 1.2rem; color: var(--red);
}
.nav-brand img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.nav-brand .dot { color: var(--green); }

.nav-links { display: flex; align-items: center; gap: 0.3rem; list-style: none; }
.nav-links a {
    padding: 0.5rem 1rem; border-radius: 8px;
    font-size: 0.92rem; font-weight: 500; color: var(--text);
    transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--red-bg); color: var(--red); }
.nav-links .btn-nav {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white !important;
    padding: 0.5rem 1.25rem; font-weight: 600;
    box-shadow: 0 2px 6px rgba(220,38,38,0.3);
}
.nav-links .btn-nav:hover { background: var(--red-dark); color: white !important; }
.nav-toggle {
    display: none; border: none; background: none;
    font-size: 1.5rem; cursor: pointer; color: var(--text); padding: 0.5rem;
}

/* Hero */
.hero {
    padding: calc(var(--header-h) + 4rem) 0 4rem;
    background:
        radial-gradient(circle at 15% 30%, rgba(220,38,38,0.08), transparent 60%),
        radial-gradient(circle at 85% 70%, rgba(22,163,74,0.10), transparent 60%),
        linear-gradient(180deg, #FFF 0%, var(--bg) 100%);
    text-align: center;
    position: relative; overflow: hidden;
}
.hero img.hero-logo {
    width: 96px; height: 96px;
    margin: 0 auto 1.2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}
.hero h1 { font-size: 3rem; font-weight: 800; color: var(--dark); margin-bottom: 1rem; line-height: 1.15; }
.hero h1 .red { color: var(--red); }
.hero h1 .green { color: var(--green); }
.hero p { font-size: 1.15rem; color: var(--text-light); max-width: 600px; margin: 0 auto 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem; border-radius: 10px;
    font-size: 1rem; font-weight: 600;
    border: none; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(220,38,38,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(220,38,38,0.4); color: white; }
.btn-success {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(22,163,74,0.3);
}
.btn-success:hover { color: white; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(22,163,74,0.4); }
.btn-outline { background: white; color: var(--red); border: 2px solid var(--red); }
.btn-outline:hover { background: var(--red-bg); color: var(--red-dark); }
.btn-outline-green { background: white; color: var(--green); border: 2px solid var(--green); }
.btn-outline-green:hover { background: var(--green-bg); color: var(--green-dark); }
.btn-danger { background: var(--red-light); color: white; }
.btn-danger:hover { background: var(--red-dark); color: white; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Section */
.section { padding: 4rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2rem; font-weight: 700; color: var(--dark); margin-bottom: 0.5rem; }
.section-title h2 .red { color: var(--red); }
.section-title h2 .green { color: var(--green); }
.section-title p { color: var(--text-light); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* Cards */
.card {
    background: var(--card); border-radius: var(--radius);
    padding: 1.5rem; border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p  { color: var(--text-light); font-size: 0.95rem; }

/* Feature grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--card); border-radius: var(--radius-lg);
    padding: 2rem; border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--red), var(--green));
    transform: scaleX(0); transition: transform 0.3s;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feature-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--dark); }
.feature-card p  { color: var(--text-light); margin-bottom: 0.75rem; }
.feature-card ul { padding-left: 1.2rem; color: var(--text); font-size: 0.9rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; margin-bottom: 0.4rem;
    font-size: 0.85rem; font-weight: 600; color: var(--text);
}
.form-input, .form-textarea, select.form-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus, select.form-input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.form-textarea { min-height: 110px; resize: vertical; }

/* Alerts */
.alert { padding: 0.85rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: var(--green-bg); color: var(--green-dark); border: 1px solid #BBF7D0; }
.alert-error   { background: var(--red-bg);   color: var(--red-dark);   border: 1px solid #FECACA; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* Auth */
.auth-container {
    max-width: 460px;
    margin: calc(var(--header-h) + 2rem) auto 3rem;
    padding: 0 1.5rem;
}
.auth-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--red);
    border-bottom: 4px solid var(--green);
}
.auth-card h2 { text-align: center; margin-bottom: 0.4rem; color: var(--dark); }
.auth-card .subtitle { text-align: center; color: var(--text-light); margin-bottom: 1.5rem; font-size: 0.95rem; }
.auth-tabs {
    display: flex; gap: 0.3rem; padding: 0.3rem;
    background: var(--bg); border-radius: 10px;
    margin-bottom: 1.5rem;
}
.auth-tab {
    flex: 1; padding: 0.6rem; text-align: center;
    border-radius: 8px; cursor: pointer;
    font-size: 0.9rem; font-weight: 600;
    color: var(--text-light); transition: all 0.2s;
}
.auth-tab.active { background: white; color: var(--red); box-shadow: var(--shadow-sm); }
.auth-panel { display: none; }
.auth-panel.active { display: block; }

.divider {
    text-align: center; color: var(--text-lighter);
    font-size: 0.8rem; margin: 1rem 0;
    position: relative;
}
.divider::before, .divider::after {
    content: ''; position: absolute; top: 50%;
    width: 40%; height: 1px; background: var(--border);
}
.divider::before { left: 0; }
.divider::after  { right: 0; }

.profile-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}
.profile-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.profile-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--green));
    color: white; font-weight: 700; font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center;
}

/* Download */
.download-hero { padding: calc(var(--header-h) + 3rem) 0 2rem; text-align: center; }
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 800px; margin: 2rem auto 0;
}
.download-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative; overflow: hidden;
}
.download-card.android { border-top: 4px solid var(--green); }
.download-card.windows { border-top: 4px solid var(--red); }
.download-card .platform-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem; font-weight: 700;
    margin-bottom: 1rem;
}
.android .platform-badge { background: var(--green-bg); color: var(--green-dark); }
.windows .platform-badge { background: var(--red-bg); color: var(--red-dark); }
.download-meta {
    background: var(--bg);
    border-radius: 10px;
    padding: 0.85rem 1rem; font-size: 0.85rem;
    margin: 1rem 0 1.25rem;
}
.download-meta div { display: flex; justify-content: space-between; padding: 0.25rem 0; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: white; border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden; border: 1px solid var(--border);
}
.faq-question {
    padding: 1rem 1.25rem;
    font-weight: 600; cursor: pointer; user-select: none;
    transition: background 0.2s;
}
.faq-question::before { content: '▸ '; color: var(--green); transition: transform 0.2s; display: inline-block; }
.faq-item.open .faq-question::before { transform: rotate(90deg); }
.faq-question:hover { background: var(--green-bg); }
.faq-answer {
    max-height: 0; overflow: hidden;
    padding: 0 1.25rem;
    transition: all 0.3s;
    color: var(--text-light); font-size: 0.95rem;
}
.faq-item.open .faq-answer { max-height: 500px; padding: 0 1.25rem 1.25rem; }

/* Ads */
.ad-slot {
    margin: 2rem auto; max-width: 728px;
    min-height: 90px; text-align: center;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-lighter); font-size: 0.8rem;
}
.ad-slot ins { display: block; }

/* Stats / Admin */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem; margin-bottom: 2rem;
}
.stat-card {
    background: white; border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--red);
}
.stat-card.green { border-left-color: var(--green); }
.stat-card.accent { border-left-color: var(--accent); }
.stat-card .label { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .value { font-size: 2rem; font-weight: 800; color: var(--dark); margin-top: 0.25rem; }

table.admin-table {
    width: 100%; border-collapse: collapse;
    background: white; border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    font-size: 0.88rem;
}
.admin-table th {
    background: var(--dark); color: white;
    padding: 0.75rem 1rem; text-align: left; font-weight: 600;
}
.admin-table td { padding: 0.7rem 1rem; border-top: 1px solid var(--border); }
.admin-table tr:hover td { background: var(--bg); }
.admin-table .badge-anon { background: var(--text-light); color: white; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }
.admin-table .badge-user { background: var(--green); color: white; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.7rem; }

/* Footer */
.footer {
    background: var(--dark);
    color: #CBD5E1;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 6px solid;
    border-image: linear-gradient(90deg, var(--red), var(--green)) 1;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem; margin-bottom: 2rem;
}
.footer-col h4 { color: white; font-size: 1rem; margin-bottom: 0.75rem; }
.footer-col p, .footer-col li { font-size: 0.88rem; color: #94A3B8; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col a { color: #CBD5E1; }
.footer-col a:hover { color: var(--green-light); }
.footer-bottom {
    border-top: 1px solid #1E293B;
    padding-top: 1rem; text-align: center;
    font-size: 0.8rem; color: #64748B;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px 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); } }

/* Animations */
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: fixed; top: var(--header-h); left: 0; right: 0;
        flex-direction: column; gap: 0;
        background: white; border-bottom: 1px solid var(--border);
        padding: 1rem; box-shadow: var(--shadow);
        transform: translateY(-150%); transition: transform 0.3s;
    }
    .nav-links.open { transform: translateY(0); }
    .nav-links li { width: 100%; }
    .nav-links a { width: 100%; }
    .hero h1 { font-size: 2rem; }
    .hero p  { font-size: 1rem; }
}
