/* =========================================================
   Paryaj Lakay — main stylesheet
   ========================================================= */

*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f6f9;
    color: #1f2937;
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 16px; }

:root {
    --green: #1fa73f;
    --green-dark: #178f33;
    --green-light: #e8f7eb;
    --blue: #2d4768;
    --blue-dark: #243a57;
    --blue-light: #3a5a82;
    --orange: #ff6b35;
    --red: #d92121;
    --yellow: #ffc107;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
}

/* ===================== HEADER ===================== */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; gap: 16px; }
.logo { height: 56px; }
.auth-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.country-prefix {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f1f3f6; border: 1px solid var(--line); border-radius: 6px;
    padding: 8px 10px; font-size: 13px; color: var(--text); font-weight: 600;
}
.field {
    display: flex; align-items: center; gap: 8px;
    background: #f1f3f6; border: 1px solid var(--line); border-radius: 6px;
    padding: 8px 12px; min-width: 200px;
}
.field input {
    border: 0; background: transparent; outline: none; flex: 1;
    font-size: 13px; color: var(--text);
}
.field .icon { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }

/* Drapeau d'Haïti — SVG vector */
.flag-ht {
    width: 22px; height: 15px; border-radius: 2px; flex-shrink: 0;
    background: linear-gradient(to bottom, #00209f 0%, #00209f 50%, #d21034 50%, #d21034 100%);
    border: 1px solid rgba(0,0,0,0.1);
    display: inline-block; position: relative;
}
.flag-ht::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 7px; height: 7px; background: #fff; border-radius: 1px;
    box-shadow: inset 0 0 0 1px #aa1f00;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 0; cursor: pointer; padding: 9px 18px; border-radius: 6px;
    font-weight: 700; font-size: 13px;
    transition: filter 0.15s, transform 0.15s;
    text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-green { background: var(--green); color: #fff; }
.btn-blue  { background: var(--blue);  color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.forgot {
    font-size: 11px; color: var(--text); margin-left: 8px;
    align-self: center; opacity: 0.7;
}

/* ===================== NAVIGATION ===================== */
.navbar { background: var(--green); color: #fff; }
.navbar-inner { display: flex; align-items: center; gap: 0; padding: 0; }
.nav-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 22px; font-weight: 700; font-size: 14px; letter-spacing: 0.3px;
    text-transform: uppercase; color: #fff; position: relative;
    border-right: 1px solid rgba(255,255,255,0.12);
    transition: background 0.15s;
}
.nav-link:hover { background: var(--green-dark); }
.nav-link .ic {
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.nav-link .ic svg { width: 13px; height: 13px; fill: #fff; }
.nav-badge {
    position: absolute; top: 6px; right: 8px;
    background: var(--red); color: #fff; font-size: 9px;
    padding: 1px 5px; border-radius: 3px; font-weight: 700;
    line-height: 1.3;
}
.nav-badge.new { background: #c0392b; }
.lang-switch {
    margin-left: auto; padding: 0 20px; display: inline-flex; align-items: center;
    gap: 8px; font-weight: 700;
}

/* ===================== MAIN LAYOUT ===================== */
.main { padding: 16px 0 32px; }
.layout { display: grid; grid-template-columns: 100px 1fr; gap: 12px; }

/* SIDEBAR */
.sidebar { background: transparent; display: flex; flex-direction: column; gap: 1px; }
.side-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 6px; background: #fff; color: var(--text);
    font-size: 11px; text-align: center; font-weight: 600;
    transition: background 0.15s, color 0.15s; position: relative;
    border-radius: 4px;
}
.side-item:hover { background: var(--green-light); color: var(--green-dark); }
.side-item.active { background: var(--blue); color: #fff; }
.side-item .ic-svg { width: 22px; height: 22px; flex-shrink: 0; }
.side-item .ic-svg svg { width: 100%; height: 100%; }
.side-item.active .ic-svg svg { fill: #fff; }
.side-badge {
    position: absolute; top: 4px; right: 4px;
    background: var(--red); color: #fff; font-size: 8px; padding: 1px 4px;
    border-radius: 3px; font-weight: 700;
}

/* CONTENT */
.content { background: #fff; border-radius: 6px; padding: 16px; min-height: 600px; }

/* ===================== HERO CAROUSEL ===================== */
.hero-fade-slider {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1100 / 127;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
}
.hero-fade-slider .slide {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0;
    animation: heroFade 18s infinite;
}
.hero-fade-slider .slide img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-fade-slider .slide:nth-child(1) { animation-delay: 0s; }
.hero-fade-slider .slide:nth-child(2) { animation-delay: 6s; }
.hero-fade-slider .slide:nth-child(3) { animation-delay: 12s; }
@keyframes heroFade {
    0%, 28%   { opacity: 1; }
    33%, 95%  { opacity: 0; }
    100%      { opacity: 1; }
}
.hero-dots {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 5px; z-index: 2;
}
.hero-dots span {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
}

/* ===================== SEARCH ===================== */
.search { display: flex; gap: 8px; margin: 16px 0; }
.search input {
    flex: 1; border: 1px solid var(--line); padding: 12px 16px; border-radius: 6px;
    font-size: 14px; outline: none;
}
.search input:focus { border-color: var(--green); }
.search button {
    background: var(--green); border: 0; color: #fff; padding: 0 22px;
    border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center;
    justify-content: center;
}
.search button svg { fill: #fff; }

/* ===================== SECTIONS ===================== */
.section-title {
    display: flex; align-items: center; justify-content: space-between;
    margin: 24px 0 12px;
}
.section-title h2 {
    margin: 0; font-size: 18px; font-weight: 800;
    display: inline-flex; align-items: center; gap: 8px;
}
.section-title h2 .ic-svg { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.section-title h2 .ic-svg svg { width: 100%; height: 100%; }
.section-title .count {
    font-size: 12px; color: var(--muted); font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px;
}
.section-title .count::after { content: "›"; font-size: 16px; }

/* GAME GRID */
.game-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.game-row-live { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.game-card {
    aspect-ratio: 305 / 195;
    border-radius: 8px; overflow: hidden;
    position: relative; cursor: pointer;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    background: #111;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: block;
}
.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.game-card img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.35s ease-out;
}
.game-card:hover img { transform: scale(1.06); }

/* TOP 10 */
.top10 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.top10 .top-card {
    position: relative;
    display: flex; align-items: stretch;
    border-radius: 8px; overflow: hidden;
    cursor: pointer;
    background: transparent;
    transition: transform 0.2s ease-out;
}
.top10 .top-card:hover { transform: translateY(-3px); }
.top10 .rank {
    flex: 0 0 36%;
    display: flex; align-items: center; justify-content: center;
    color: var(--blue-dark);
    font-weight: 900; font-size: 78px; line-height: 1;
    font-family: "Arial Black", Impact, sans-serif;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}
.top10 .top-card .game-card { flex: 1; aspect-ratio: auto; }
.top10 .top-card .game-card img { aspect-ratio: 305/195; }

/* ===================== CONTENT TEXT ===================== */
.content-text {
    margin: 32px 0 0; padding: 24px;
    background: #fafbfc; border-radius: 8px; border: 1px solid var(--line);
}
.content-text h1 { font-size: 22px; margin: 0 0 12px; color: var(--blue-dark); }
.content-text h2 { font-size: 16px; margin: 18px 0 8px; color: var(--blue-dark); }
.content-text p  { margin: 0 0 12px; color: #374151; line-height: 1.65; }
.content-text ul { margin: 0 0 12px; padding-left: 22px; }
.content-text ul li { margin-bottom: 4px; color: #374151; }
.content-text strong { color: var(--blue-dark); }

/* ===================== FOOTER ===================== */
.footer { background: var(--blue); color: #fff; padding: 40px 0 0; margin-top: 32px; }
.footer-cols {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.1fr; gap: 32px;
    padding-bottom: 32px;
}
.footer-col h6 {
    color: var(--green); font-size: 13px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.4px; margin: 0 0 16px;
}
.footer-col a, .footer-col .row-item {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,0.85); padding: 6px 0; font-size: 14px;
    transition: color 0.15s;
}
.footer-col a:hover { color: #fff; }
.footer-col .row-item svg, .footer-col a svg {
    width: 18px; height: 18px; flex-shrink: 0; fill: var(--green);
}
.partners-block { border-top: 1px solid rgba(255,255,255,0.15); padding: 24px 0; }
.partners-block h6 {
    text-align: center; color: #fff; font-size: 14px; font-weight: 700;
    margin: 0 0 18px; letter-spacing: 0.5px;
}
.partners-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}
.partner-logo {
    width: 72px; height: 72px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.partner-logo img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.copy {
    text-align: center; color: rgba(255,255,255,0.75); font-size: 12px;
    padding: 18px 0; border-top: 1px solid rgba(255,255,255,0.15);
}

/* ===================== BOTTOM STICKY CTA ===================== */
.bottom-cta {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    padding: 10px 16px;
    display: flex; gap: 10px;
    z-index: 100;
}
.bottom-cta .btn { flex: 1; padding: 14px; font-size: 14px; font-weight: 800; }
body.has-cta { padding-bottom: 72px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .game-row, .game-row-live { grid-template-columns: repeat(4, 1fr); }
    .top10 { grid-template-columns: repeat(3, 1fr); }
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
    .nav-link { padding: 14px 14px; font-size: 12px; }
    .layout { grid-template-columns: 84px 1fr; }
}
@media (max-width: 720px) {
    .topbar-inner { flex-direction: column; align-items: stretch; gap: 10px; }
    .auth-form { justify-content: stretch; }
    .field { flex: 1; min-width: 0; }
    .navbar-inner { overflow-x: auto; flex-wrap: nowrap; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { flex-direction: row; overflow-x: auto; }
    .side-item { flex-shrink: 0; width: 90px; }
    .game-row, .game-row-live { grid-template-columns: repeat(2, 1fr); }
    .top10 { grid-template-columns: repeat(2, 1fr); }
    .footer-cols { grid-template-columns: 1fr; }
    .hero-fade-slider { aspect-ratio: 800 / 240; }
}
