/* ===================================================================
   YAOUNDÉ TABLE TENNIS CLUB - THEME UNIFIÉ
   Version: 1.0 | Basé sur le thème de la page Matches
   =================================================================== */

/* ===================================
   VARIABLES CSS UNIFIÉES - YTTC
   =================================== */
:root {
    /* POLICES DE CARACTÈRES */
    --font-family-body: 'Inter', sans-serif;
    --font-family-headings: 'Inter', sans-serif;
    
    /* COULEURS PRINCIPALES */
    --yttc-primary: #2d5016;
    --yttc-secondary: #4a7c24;
    --yttc-accent: #ff6b35;
    --yttc-yellow: #ffd23f;
    --yttc-light: #f8f9fa;
    --yttc-dark: #1a1a1a;
    
    /* COULEURS SUPPLÉMENTAIRES */
    --yttc-success: #28a745;
    --yttc-info: #17a2b8;
    --yttc-warning: #ffc107;
    --yttc-danger: #dc3545;
    
    /* VARIABLES D'UI */
    --yttc-border-radius: 12px;
    --yttc-box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --yttc-box-shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
    --yttc-transition: all 0.3s ease;
}

/* ===================================
   ÉLÉMENTS COMMUNS
   =================================== */

/* Base Typography */
html, body {
    font-family: var(--font-family-body);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-family-headings);
    font-weight: 600;
}

button, .btn, input, select, textarea, 
.dropdown-item, .nav-link, .navbar-brand,
.card-title, .card-header, .display-1, .display-2,
.display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-family-headings);
}

/* Navbar */
.navbar-yttc {
    background: linear-gradient(135deg, var(--yttc-primary) 0%, var(--yttc-secondary) 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-yttc .navbar-brand {
    color: white !important;
    font-weight: 600;
}

.navbar-yttc .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    transition: var(--yttc-transition);
}

.navbar-yttc .nav-link:hover,
.navbar-yttc .nav-link.active {
    color: var(--yttc-yellow) !important;
}

/* Page Headers */
.page-header {
    background: linear-gradient(135deg, var(--yttc-primary) 0%, var(--yttc-secondary) 100%);
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 100px 100px;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1,
.page-header .display-4 {
    color: white !important;
}

.page-header h1 i,
.page-header .display-4 i {
    color: white !important;
}

.page-header p,
.page-header .lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Cards */
.yttc-card {
    border: none;
    border-radius: var(--yttc-border-radius);
    box-shadow: var(--yttc-box-shadow);
    transition: var(--yttc-transition);
    margin-bottom: 1rem;
    overflow: hidden;
}

.yttc-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--yttc-box-shadow-hover);
}

/* Buttons */
.btn-yttc-primary {
    background-color: var(--yttc-primary);
    border-color: var(--yttc-primary);
    color: white;
    transition: var(--yttc-transition);
}

.btn-yttc-primary:hover {
    background-color: var(--yttc-secondary);
    border-color: var(--yttc-secondary);
    color: white;
}

.btn-yttc-accent {
    background-color: var(--yttc-accent);
    border-color: var(--yttc-accent);
    color: white;
    transition: var(--yttc-transition);
}

.btn-yttc-accent:hover {
    background-color: #e45a2a;
    border-color: #e45a2a;
    color: white;
}

/* Filter Containers */
.filters-container {
    background: white;
    border-radius: var(--yttc-border-radius);
    box-shadow: var(--yttc-box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.search-box {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--yttc-transition);
}

.search-box:focus {
    border-color: var(--yttc-primary);
    box-shadow: 0 0 0 0.2rem rgba(45, 80, 22, 0.25);
}

.filter-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--yttc-transition);
}

.filter-select:focus {
    border-color: var(--yttc-primary);
    box-shadow: 0 0 0 0.2rem rgba(45, 80, 22, 0.25);
}

/* Stats Summary */
.stats-summary {
    background: linear-gradient(135deg, var(--yttc-primary) 0%, var(--yttc-secondary) 100%);
    color: white;
    border-radius: var(--yttc-border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Badges */
.badge-yttc-primary {
    background-color: var(--yttc-primary);
    color: white;
}

.badge-yttc-accent {
    background-color: var(--yttc-accent);
    color: white;
}

.badge-yttc-yellow {
    background-color: var(--yttc-yellow);
    color: var(--yttc-dark);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--yttc-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 0 1.5rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* ===================================
   COMPOSANTS SPÉCIAUX
   =================================== */

/* Profile Photo */
.profile-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-radius: 50%;
}

/* Podium pour le classement */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.podium-place {
    text-align: center;
    position: relative;
}

.podium-second {
    margin-right: -15px;
    z-index: 1;
}

.podium-first {
    z-index: 2;
}

.podium-third {
    margin-left: -15px;
}

.podium-avatar {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    margin-bottom: 0.5rem;
}

.podium-avatar.first {
    width: 100px;
    height: 100px;
}

.podium-medal {
    position: absolute;
    width: 30px;
    height: 30px;
    bottom: 20px;
    right: 5px;
    background: var(--yttc-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Tables spécialisées */
.table-yttc {
    border-radius: var(--yttc-border-radius);
    overflow: hidden;
    box-shadow: var(--yttc-box-shadow);
}

.table-yttc thead {
    background: linear-gradient(135deg, var(--yttc-primary) 0%, var(--yttc-secondary) 100%);
    color: white;
}

.table-yttc thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
}

/* Media galleries */
.gallery-item {
    border-radius: var(--yttc-border-radius);
    overflow: hidden;
    box-shadow: var(--yttc-box-shadow);
    margin-bottom: 1.5rem;
    transition: var(--yttc-transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--yttc-box-shadow-hover);
}

/* Homepage Hero Section */
.hero-yttc {
    background: linear-gradient(135deg, var(--yttc-primary) 0%, var(--yttc-secondary) 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-yttc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 100px 100px;
}

.hero-yttc .hero-content {
    position: relative;
    z-index: 2;
}

.hero-yttc h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-yttc p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

/* Fond dégradé commun */
.bg-yttc-gradient {
    background: linear-gradient(135deg, var(--yttc-primary) 0%, var(--yttc-secondary) 100%);
}
