/* Variables CSS */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff4d94;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fb;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-tournament {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-tournament::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 77, 148, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.tournament-status {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    min-height: 60vh;
}

/* Sidebar */
.sidebar {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    height: fit-content;
}

.sidebar h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    color: var(--dark-color);
}

.sidebar-menu a:hover {
    background-color: #f0f2f5;
    color: var(--primary-color);
}

.sidebar-menu a.active {
    background-color: #eef2ff;
    color: var(--primary-color);
    font-weight: 500;
}

.sidebar-info {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.1), rgba(37, 117, 252, 0.1));
    padding: 1rem;
    border-radius: var(--border-radius);
}

.sidebar-info h4 {
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-info ul li {
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

/* Content Area */
.content-area {
    width: 100%;
}

.content-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.page-header h2 {
    color: var(--primary-color);
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Registration Section */
.registration-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.1), rgba(37, 117, 252, 0.1));
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.info-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.info-card p {
    font-size: 1rem;
    color: var(--gray-color);
    font-weight: 500;
}

.registration-form-container {
    max-width: 700px;
    margin: 0 auto;
}

.registration-form h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: var(--gray-color);
    font-size: 0.85rem;
}

.poster-preview {
    margin-top: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid #ddd;
}

.poster-preview img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.form-actions {
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--box-shadow);
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(106, 17, 203, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.registration-closed {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(255, 193, 7, 0.1));
    border-radius: var(--border-radius);
}

.registration-closed i {
    font-size: 4rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.registration-closed h3 {
    color: var(--danger-color);
    margin-bottom: 1rem;
}

/* Submission Card */
.submission-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid #ddd;
}

.submission-poster {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.submission-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.submission-details h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.submission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.meta-item i {
    color: var(--primary-color);
}

.submission-description {
    margin: 1rem 0;
    line-height: 1.8;
    color: var(--gray-color);
}

.status-badge-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.status-approved {
    background: rgba(40, 167, 69, 0.2);
    color: #155724;
}

.status-rejected {
    background: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

/* Match Cards */
.matches-grid {
    display: grid;
    gap: 1.5rem;
}

.match-card {
    background: white;
    border: 2px solid #eee;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.match-card:hover {
    box-shadow: var(--box-shadow);
    transform: translateY(-2px);
}

.match-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    text-align: center;
}

.match-stage {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.status-live {
    background: var(--danger-color);
    animation: pulse 2s infinite;
}

.status-upcoming {
    background: var(--warning-color);
}

.status-finished {
    background: var(--gray-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.match-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    padding: 1.5rem;
    align-items: center;
}

.candidate {
    text-align: center;
}

.candidate-poster {
    width: 100px;
    height: 150px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin: 0 auto 0.8rem;
    border: 2px solid #ddd;
}

.candidate-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.candidate-country {
    font-size: 0.85rem;
    color: var(--gray-color);
}

.candidate-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.vs-divider {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-color);
}

.match-footer {
    padding: 1rem;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.btn-view-match {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-view-match:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.large-modal {
    max-width: 1000px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: white;
    border: 1px solid #ddd;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-color);
    transition: var(--transition);
    font-size: 1.2rem;
}

.modal-close:hover {
    background: #f0f2f5;
    color: var(--dark-color);
}

.modal-body {
    padding: 2rem;
}

/* Comments Section */
.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.comment-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.comment-input {
    width: 100%;
    min-height: 80px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
    border: 1px solid #ddd;
    padding: 0.6rem 1.2rem;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-time {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.comment-text {
    line-height: 1.6;
}

.comment-actions-item {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-delete-comment {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
}

.btn-delete-comment:hover {
    text-decoration: underline;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 3000;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.success {
    background: var(--success-color);
    color: white;
}

.notification.error {
    background: var(--danger-color);
    color: white;
}

.notification.info {
    background: var(--warning-color);
    color: #333;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--gray-color);
}

.loading i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    color: #ddd;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #444;
    color: #aaa;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--box-shadow);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-links a {
        color: var(--dark-color);
    }
}

@media (max-width: 768px) {
    .submission-card {
        grid-template-columns: 1fr;
    }
    
    .match-body {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .vs-divider {
        transform: rotate(90deg);
    } 
    
    .registration-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-tournament {
        padding: 2rem 0;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Styles pour le choix des candidats */
.candidate-choice input[type="radio"] {
    margin-right: 0.5rem;
}

.candidate-choice:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(106, 17, 203, 0.1);
}

.candidate-choice:hover {
    border-color: var(--secondary-color);
    background: rgba(37, 117, 252, 0.05);
}