/* style.css - fichier commun */
:root {
	--bg-1: #131020;
	--bg-2: #1a1530;
	--card-bg: #1b1628;
	--accent: #9d4dff;
	--muted: rgba(255,255,255,0.08);
	--glass: rgba(30,15,55,0.8);
	--white: #ffffff;
	--text: #fff;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Rajdhani', sans-serif;
    background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, #120d1f 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: rgba(0,0,0,0.2);
    margin: 12px auto;
    max-width: 1100px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.brand {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-search {
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    outline: none;
    width: 260px;
    font-size: 15px;
    background: rgba(255,255,255,0.03);
    color: var(--white);
}

.buttons .btn {
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: #444;
    color: var(--white);
    cursor: pointer;
    font-weight: 600;
}

.buttons .btn:hover {
    background: #666;
}

.main {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 16px 60px;
}

.total-panel {
    text-align: center;
    padding: 14px;
    background: #333;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    align-items: start;
}

/* CARD ANIMATIONS */
.card {
	position: relative;
	background: var(--card-bg);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 22px rgba(140,40,255,0.12);
	border: 2px solid rgba(109,0,255,0.15);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}


/* Zoom léger */
.card:hover {
	transform: scale(1.04);
	box-shadow: 0 14px 34px rgba(140,40,255,0.25);
	border-color: var(--accent);
}


/* Glow pour le top 3 */
.card.top-1 {
	box-shadow: 0 0 18px rgba(255,215,0,0.6);
	border-color: gold;
}
.card.top-2 {
	box-shadow: 0 0 18px rgba(192,192,192,0.5);
	border-color: silver;
}
.card.top-3 {
	box-shadow: 0 0 18px rgba(205,127,50,0.5);
	border-color: peru;
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.name {
    font-size: 18px;
    font-weight: 700;
    background: var(--muted);
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--white);
    text-align: left;
    flex: 1;
}

.num {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    margin-left: 12px;
    white-space: nowrap;
}

.medal {
    margin-right: 8px;
}

.nav-links {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #444;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.nav-icon {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-box {
    position: fixed;
    top: 18px;
    left: 18px;
    background: var(--glass);
    padding: 10px 14px;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(109,0,255,0.6);
    box-shadow: 0 6px 18px rgba(160,70,255,0.12);
    z-index: 999;
}

.profile-pic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.profile-name {
    font-weight: 700;
}

@media (max-width: 640px) {
    .input-search {
        width: 140px;
    }
    .card img {
        height: 200px;
    }
}
