/* Custom CSS for Référence Awards RDC */

/* Variables CSS */
:root {
    --primary-color: #0066cc;
    --secondary-color: #ffc107;
    --accent-color: #28a745;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --text-dark: #333;
    --text-light: #6c757d;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    scroll-behavior: smooth;
}

/* Typography */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(33, 37, 41, 0.95) !important;
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 102, 204, 0.8), rgba(255, 193, 7, 0.6));
    z-index: 1;
}

/* Countdown */
.countdown {
    margin: 2rem 0;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 100px;
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
}

.countdown-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Buttons */
.hero-buttons .btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 0.5rem;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 2rem;
}

/* Team Cards */
.team-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.team-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border-radius: 50%;
    border: 4px solid var(--secondary-color);
    position: relative;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-image:hover img {
    transform: scale(1.1);
}

/* Category Cards */
.category-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    height: 100%;
}

.category-card:hover {
    transform: translateX(10px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-left-color: var(--secondary-color);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--secondary-color), #e0a800);
    border: none;
    color: #333;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
    color: #333;
}

/* Registration Form Container */
.registration-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.registration-form-container form {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

/* Voting Container */
.voting-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Media Cards */
.media-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.media-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.media-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.media-card:hover .media-overlay {
    transform: translateY(0);
}

/* Video Container */
.video-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Event Info */
.info-item {
    text-align: center;
    padding: 2rem 1rem;
}

.info-item i {
    font-size: 3rem;
    display: block;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50, #34495e) !important;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color);
    color: var(--dark-color) !important;
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 10px;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 10px;
}

/* Contact Section Styles */
.contact-info {
    padding: 30px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-info:hover {
    background: rgba(255, 193, 7, 0.1);
    transform: translateY(-5px);
}

.contact-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.contact-info:hover .contact-icon {
    background: rgba(255, 193, 7, 0.2);
    transform: scale(1.1);
}

#contact {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .countdown {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .countdown-item {
        min-width: 80px;
        padding: 1rem 0.5rem;
    }
    
    .countdown-number {
        font-size: 2rem;
    }
    
    .feature-card,
    .team-card,
    .category-card {
        margin-bottom: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        margin: 0.5rem auto;
        width: 100%;
        max-width: 300px;
    }
    
    .video-container iframe {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .team-image {
        width: 120px;
        height: 120px;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    .countdown-label {
        font-size: 0.8rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    color: var(--dark-color);
    transform: translateY(-3px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* Placeholder Images */
.team-image img[src*="placeholder"],
.media-card img[src*="placeholder"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

/* Form Validation Styles */
.was-validated .form-control:valid {
    border-color: var(--accent-color);
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Progress Bar for Forms */
.form-progress {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

/* Badge Styles */
.badge-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* =============================================
   GALLERY STYLES
   ============================================= */

/* Gallery Navigation */
.gallery-nav {
    margin-bottom: 2rem;
}

.gallery-nav .btn {
    margin: 0.25rem;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.gallery-nav .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Gallery Cards */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.gallery-image {
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-image {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    transform: translateY(0);
}

/* Gallery Item Animation */
.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item[style*="display: none"] {
    opacity: 0;
    transform: scale(0.8);
}

/* Lightbox Styles */
#galleryLightbox .modal-content {
    background: rgba(0, 0, 0, 0.95);
    border: none;
    border-radius: 15px;
}

#galleryLightbox .modal-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

#galleryLightbox .modal-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

#lightboxImage {
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
}

/* Navigation Buttons */
#prevImage, #nextImage {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

#prevImage:hover, #nextImage:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-nav .btn {
        font-size: 0.875rem;
        padding: 0.4rem 1rem;
    }
    
    .gallery-card {
        margin-bottom: 1rem;
    }
    
    .gallery-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    }
    
    #lightboxImage {
        max-height: 60vh;
    }
}

/* Gallery Grid Animation */
.gallery-item[data-aos="fade-up"] {
    transition-delay: calc(var(--aos-delay, 0) * 1ms);
}
