/* Styles spécifiques pour la landing page */

/* Navigation personnalisée pour la landing page */
.landing-navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

[data-theme="dark"] .landing-navbar {
    background: rgba(26, 26, 26, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
}

.landing-navbar .navbar-logo {
    filter: brightness(1) contrast(1);
    transition: filter 0.3s ease;
}

[data-theme="dark"] .landing-navbar .navbar-logo {
    /* Améliorer la luminosité, le contraste et ajouter une ombre portée pour la visibilité */
    filter: brightness(2.5) contrast(1.8) saturate(1.2) invert(0.1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.landing-navbar .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.landing-navbar .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color) !important;
}

.btn-login {
    background: transparent !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.landing-navbar .btn-login:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

.btn-register {
    background: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    color: white !important;
}

.landing-navbar .btn-register:hover {
    background: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
    color: white !important;
}

.landing-navbar .theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-navbar .theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Ajustement pour compenser la navbar fixe */
body {
    padding-top: 80px;
}

/* Styles spécifiques pour la landing page */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: transparent;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.hero-section .container {
    background-color: transparent !important;
}

/* S'assurer que tous les éléments dans hero héritent les bonnes couleurs */
#hero .container {
    background-color: transparent !important;
}

/* Mode clair : gradient coloré */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 50%, var(--padel-green) 100%);
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

/* Mode sombre : fond normal et cacher le gradient */
[data-theme="dark"] .hero-section {
    background-color: var(--bg-primary);
}

[data-theme="dark"] .hero-background {
    display: none;
}

[data-theme="dark"] .hero-overlay {
    display: none;
}

/* Mode clair : textes en blanc (à cause du gradient) */
.hero-content {
    color: white;
    z-index: 1;
    padding: 0.5rem;
}

.hero-section h1,
.hero-section .hero-title,
.hero-section p,
.hero-section .hero-description {
    color: white;
}

/* Mode sombre : textes adaptés au thème */
[data-theme="dark"] .hero-content,
[data-theme="dark"] .hero-section h1,
[data-theme="dark"] .hero-section .hero-title,
[data-theme="dark"] .hero-section p,
[data-theme="dark"] .hero-section .hero-description {
    color: var(--text-primary);
}

/* Stat cards : blanc en mode clair, adaptées en mode sombre */
.hero-section .stat-card,
.hero-section .stat-card * {
    color: white;
}

[data-theme="dark"] .hero-section .stat-card,
[data-theme="dark"] .hero-section .stat-card * {
    color: var(--text-primary);
}

/* Hero badge */
.hero-section .hero-badge,
.hero-section .hero-badge * {
    color: white;
}

[data-theme="dark"] .hero-section .hero-badge,
[data-theme="dark"] .hero-section .hero-badge * {
    color: var(--text-primary);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .hero-badge {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.9;
}

.hero-actions .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
}

.hero-visual {
    position: relative;
}

.stats-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Stat cards en mode sombre : fond adapté */
[data-theme="dark"] .stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-content p {
    margin: 0;
    opacity: 0.8;
}

/* Section Features */
.features-section {
    background-color: var(--bg-primary);
}

.features-section .container {
    background-color: transparent;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Section Registration */
.register-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.register-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 20px 60px var(--shadow);
    border: 1px solid var(--border-color);
}

.register-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.register-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

.register-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Footer */
.footer-section {
    background: var(--bg-tertiary);
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-section .container {
    background-color: transparent;
}

.footer-brand h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 0.5rem;
}

.footer-divider {
    border-color: var(--border-color);
    margin: 2rem 0 1rem;
}

/* Section Annonces */
.announcements-section {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(0, 123, 255, 0.05) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .announcements-section {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08) 0%, rgba(0, 123, 255, 0.08) 100%);
}

.announcements-section .section-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(13, 110, 253, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid rgba(13, 110, 253, 0.2);
}

[data-theme="dark"] .announcements-section .section-badge {
    background: rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.3);
}

.announcement-feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
}

.announcement-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--shadow);
    border-color: var(--primary-color);
}

.announcement-feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), #0d6efd);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: white;
}

.announcement-feature-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.announcement-feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.announcements-preview-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow);
}

.preview-item {
    text-align: center;
    padding: 1rem;
}

.preview-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--padel-green), #4CAF50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.preview-item h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.preview-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    /* Réduire le padding-top du body sur mobile */
    body {
        padding-top: 70px;
    }
    
    .hero-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .hero-content {
        padding-top: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .stats-preview {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .register-card {
        padding: 2rem;
    }
    
    .register-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .announcements-preview-card {
        padding: 1.5rem;
    }
    
    .preview-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    /* Ajustements supplémentaires pour très petits écrans */
    body {
        padding-top: 60px;
    }
    
    .hero-section {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
        min-height: auto;
    }
    
    .hero-content {
        padding-top: 0.5rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.85rem;
        margin-bottom: 1rem !important;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem !important;
    }
    
    .hero-actions .btn {
        padding: 0.625rem 1.5rem;
        font-size: 1rem;
    }
    
    .register-card {
        padding: 1.5rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .announcement-feature-card {
        padding: 1.5rem;
    }
    
    .announcement-feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .announcements-preview-card {
        padding: 1.25rem;
    }
    
    .preview-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

/* Styles pour les modals */
.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 2rem;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 700;
}

.modal-body {
    padding: 2rem;
}

[data-theme="dark"] .modal-content {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-header {
    background: var(--bg-tertiary);
    border-bottom-color: var(--border-color);
}

/* Bouton de fermeture du modal */
.btn-close {
    filter: var(--bs-btn-close-white-filter, none);
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ====================================
   Ajustements Mobile Landing Page
   ==================================== */

/* Mobile : Réduire l'espace dans le menu de la landing page */
@media (max-width: 991px) {
    .landing-navbar .navbar-collapse {
        text-align: center;
    }
    
    .landing-navbar .navbar-nav {
        padding: 0.5rem 0;
        align-items: center;
    }
    
    .landing-navbar .navbar-nav.me-auto {
        margin-right: 0 !important;
    }
    
    .landing-navbar .nav-link {
        margin: 0.15rem 0;
        padding: 0.5rem 0.75rem;
    }
    
    .landing-navbar .nav-item {
        margin: 0.15rem 0;
    }
    
    /* Ajuster la hauteur min du row hero */
    .hero-section .row.min-vh-100 {
        min-height: auto;
        padding: 1rem 0;
    }
}

/* Mobile : Footer landing page */
@media (max-width: 576px) {
    .footer-section {
        padding: 2rem 0 1.5rem !important;
    }
    
    .footer-brand {
        margin-bottom: 1rem;
    }
    
    .footer-brand img {
        height: 40px !important;
        margin-bottom: 0.5rem !important;
        transition: filter 0.3s ease;
    }
    
    /* Améliorer la visibilité du logo footer en mode sombre */
    [data-theme="dark"] .footer-brand img {
        filter: brightness(2.5) contrast(1.8) saturate(1.2) invert(0.1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    }
    
    .footer-brand h5 {
        margin-bottom: 0.5rem !important;
        font-size: 1rem;
    }
}