/* Sportify - Common Styles Library */
/* Basé sur events-feed comme référence - Consolidation complète */

/* === VARIABLES CSS NAVBAR === */
:root {
    --navbar-height: 80px;
    --beta-banner-height: 40px;
    --total-header-height: calc(var(--navbar-height) + var(--beta-banner-height));
    --content-padding-top: calc(var(--total-header-height) + 20px);
    --sidebar-sticky-top: var(--total-header-height);
}

/* === BASE STYLES OBLIGATOIRES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FFE5CC 0%, #FFD4A3 25%, #FFC078 50%, #FFB366 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* === LAYOUT CONTAINERS === */
.page-container {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--content-padding-top) 20px 20px;
    min-height: calc(100vh - var(--total-header-height));
}

.single-column-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--content-padding-top) 20px 20px;
    min-height: calc(100vh - var(--total-header-height));
}

.two-column-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--content-padding-top) 20px 20px;
    min-height: calc(100vh - var(--total-header-height));
}

/* === LAYOUT STRUCTURE === */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - var(--total-header-height));
    margin-top: var(--total-header-height);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* === BUTTON STYLES === */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    justify-content: center;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-warning {
    background: #FF9800;
    color: white;
}

.btn-warning:hover {
    background: #F57C00;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* === CARD STYLES === */
.card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-title {
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: #666;
    font-size: 1rem;
}

/* === FORM STYLES === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f7fafc;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* === SEARCHABLE SELECT === */
.searchable-select {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.dropdown-item {
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f7fafc;
}

/* === GRID LAYOUTS === */
.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
}

/* === FILTERS === */
.filters-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* === RESPONSIVE === */
@media (max-width: 1350px) {
    .page-container,
    .two-column-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        position: static;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .single-column-container,
    .page-container,
    .two-column-container {
        padding: var(--content-padding-top) 10px 20px;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* === SIDEBAR STYLES === */
.sidebar {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: var(--sidebar-sticky-top);
}

.sidebar-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F7FAFC;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 900;
    color: #1A365D;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    color: #FF8C00;
}

/* === WIDGET STYLES === */
.widget {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s;
    margin-bottom: 25px;
}

.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #1A365D;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: #FF8C00;
}

/* === CARD STYLES ÉTENDUS === */
.post-card, .event-card {
    background: #F7FAFC;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.post-card:hover, .event-card:hover {
    border-color: #FF8C00;
    transform: translateY(-2px);
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(135deg, #FF8C00, #E53E3E);
}

/* === PROFILE HERO === */
.profile-hero {
    background: linear-gradient(135deg, #FF8C00, #E53E3E, #38A169);
    border-radius: 25px;
    padding: 30px;
    color: white;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.profile-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 8s ease-in-out infinite;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.profile-avatar-hero {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 900;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.hero-info h1 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 6px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.hero-real-name {
    font-size: 15px;
    opacity: 0.8;
    margin-bottom: 8px;
    font-weight: 400;
    font-style: italic;
}

.hero-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.hero-stats {
    display: flex;
    gap: 24px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 3px;
}

.hero-stat-label {
    font-size: 11px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === FILTER STYLES === */
.filter-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.filter-label {
    font-weight: 700;
    color: #1A365D;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-select, .filter-input {
    padding: 12px 15px;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    transition: all 0.3s;
    width: 100%;
}

.filter-select:focus, .filter-input:focus {
    border-color: #FF8C00;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,140,0,0.1);
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.filter-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.filter-btn.primary {
    background: linear-gradient(135deg, #FF8C00, #E53E3E);
    color: white;
}

.filter-btn.secondary {
    background: #E2E8F0;
    color: #4A5568;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* === TEXT ELEMENT BASE CLASS === */
.textElement {
    white-space: normal;
    word-break: break-word;
}

/* === TEXT WRAPPING UTILITIES === */
.text-wrap {
    white-space: normal;
    word-break: break-word;
}

/* Specific text elements inherit from textElement */
.activity-title,
.team-name,
.event-title,
.info-value,
.achievement-name,
.post-author,
.post-content,
.member-name,
.match-opponent {
    white-space: normal;
    word-break: break-word;
}

/* === UTILITIES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

.cursor-pointer { cursor: pointer; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* === SPORTS CARDS STYLES === */
.sports-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.sport-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.sport-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #FF8C00;
}

.sport-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sport-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF8C00, #E53E3E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sport-remove-btn {
    background: #F56565;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.sport-remove-btn:hover {
    background: #E53E3E;
    transform: scale(1.1);
}

.sport-card-content {
    text-align: left;
}

.sport-name {
    font-size: 16px;
    font-weight: 700;
    color: #1A365D;
    margin-bottom: 5px;
    white-space: normal;
    word-break: break-word;
}

.sport-status {
    font-size: 14px;
    color: #38A169;
    font-weight: 600;
    margin: 0;
}

@media (max-width: 768px) {
    .sports-cards-container {
        grid-template-columns: 1fr;
    }
    
    .sport-card {
        padding: 15px;
    }
    
    .sport-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .sport-name {
        font-size: 14px;
    }
    
    .sport-status {
        font-size: 12px;
    }
}