/*
 * style.css
 * Emplacement : public/assets/css/style.css
 * 
 * Feuille de style principale du site GAB Tennis de Table Metz
 * Version améliorée avec design moderne et cohérent
 */

/* Variables CSS */
:root {
    --primary-color: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --secondary-color: #ff6f00;
    --secondary-dark: #e65100;
    --accent-color: #4caf50;
    --text-dark: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-light: #f8f9fa;
    --bg-lighter: #fafbfc;
    --white: #ffffff;
    --border-light: #e9ecef;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.15);
    --nav-height: 64px;
    --nav-bg: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    font-size: 16px;
}

/* Typography améliorée */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Header simplifié */
.header-container {
    position: relative;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    padding: 10px 0;
    box-shadow: var(--shadow-light);
    min-height: 60px;
}

/* Banner avec logo intégré - Design amélioré */
.banner-container {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.2), rgba(66, 165, 245, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo dans le bandeau */
.banner-logo {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.logo-gab-banner {
    height: calc(300px * 0.75);
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    transition: var(--transition);
    margin-top: calc(300px * 0.125);
    margin-bottom: calc(300px * 0.125);
}

.logo-gab-banner:hover {
    transform: scale(1.05);
}

.banner-content {
    text-align: center;
    color: white;
    z-index: 2;
}

.banner-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}

.banner-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}

/* NAVIGATION STICKY AMÉLIORÉE */
.navbar-fixed {
    position: fixed !important;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: var(--transition);
}

.navbar-fixed.scrolled .nav-wrapper {
    background: rgba(21, 101, 192, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-heavy);
}

.nav-wrapper {
    background: var(--nav-bg) !important;
    box-shadow: var(--shadow-medium);
    padding: 0 20px;
    height: var(--nav-height);
    transition: var(--transition);
}

/* Logo dans la navigation */
.brand-logo {
    display: flex !important;
    align-items: center;
    font-size: 1.4rem !important;
    font-weight: 600;
    color: white !important;
    text-decoration: none;
}

.logo-nav {
    height: 40px;
    width: auto;
    margin-right: 10px;
    max-width: 100%;
    display: inline-block;
    vertical-align: middle;
}

/* Liens de navigation modernes */
.nav-link-modern {
    position: relative;
    padding: 0 20px !important;
    font-weight: 500;
    transition: var(--transition);
    border-radius: var(--border-radius-small);
}

.nav-link-modern::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link-modern:hover::before {
    width: 80%;
}

.nav-link-modern:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
}

/* Dropdown menus améliorés - FORCER LES STYLES */
.dropdown-content {
    background: white !important;
    background-color: white !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-heavy) !important;
    border: 1px solid #e0e0e0 !important;
    overflow: hidden !important;
    margin-top: 5px !important;
    min-width: 250px !important;
}

.dropdown-content::before,
.dropdown-content::after {
    display: none !important;
}

.dropdown-content li {
    background: white !important;
    background-color: white !important;
}

.dropdown-content li > a,
.dropdown-content li > span {
    color: var(--text-dark) !important;
    padding: 14px 20px !important;
    font-weight: 500 !important;
    transition: var(--transition) !important;
    border-bottom: 1px solid #f5f5f5 !important;
    white-space: nowrap !important;
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    background: white !important;
    background-color: white !important;
    display: block !important;
}

.dropdown-content li:last-child > a,
.dropdown-content li:last-child > span {
    border-bottom: none !important;
}

.dropdown-content li > a:hover,
.dropdown-content li > span:hover {
    background: var(--primary-color) !important;
    background-color: var(--primary-color) !important;
    color: white !important;
    padding-left: 25px !important;
}

/* Forcer la suppression de tous les borders colorés sur les dropdowns */
.dropdown-content,
.dropdown-content li,
.dropdown-content li > a,
.dropdown-content li > span {
    border-color: #e0e0e0 !important;
}

.dropdown-content:not(:hover) {
    border-color: #e0e0e0 !important;
}

/* Main Content avec padding pour le menu sticky */
.main-content {
    padding-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
    height: auto; /* Permettre au contenu de dépasser la hauteur de l'écran */
}

/* Container amélioré */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cards modernes et cohérentes */
.card {
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-light) !important;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-content {
    padding: 24px !important;
}

.card-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    margin-bottom: 16px !important;
}

/* Sections avec espacement cohérent */
.section {
    padding: 60px 0;
}

.section-light {
    background-color: var(--bg-light);
}

.section-lighter {
    background-color: var(--bg-lighter);
}

.section-title {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 50px;
    position: relative;
    color: var(--text-dark);
}

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

/* Grilles modernes */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Boutons modernes */
.btn-modern {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-light);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Tables améliorées (sauf Coupe Cojep) */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.table-modern th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

.table-modern td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

.table-modern tr:hover {
    background: var(--bg-light);
}

.table-modern tr:last-child td {
    border-bottom: none;
}

/* Footer amélioré */
.footer-container {
    background: linear-gradient(135deg, #263238 0%, #37474f 100%);
    padding: 50px 0 30px;
    margin-top: 80px;
    position: relative;
}

.footer-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: var(--transition);
    opacity: 0.8;
}

.footer-logo:hover {
    transform: scale(1.1);
    opacity: 1;
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(175deg);
}

.footer-text {
    text-align: center;
    color: #b0bec5;
    font-size: 0.9rem;
    border-top: 1px solid #455a64;
    padding-top: 20px;
}

/* Responsive Design amélioré */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    /* Navigation mobile */
    .sidenav {
        background: var(--nav-bg) !important;
    }
    
    .sidenav li > a {
        color: white !important;
        padding: 16px 32px !important;
        font-weight: 500;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .sidenav li > a:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Banner responsive */
    .banner-title {
        font-size: 2.5rem;
    }
    
    .banner-subtitle {
        font-size: 1.2rem;
    }
    
    .logo-gab-banner {
        height: calc(300px * 0.6);
        margin-top: calc(300px * 0.2);
        margin-bottom: calc(300px * 0.2);
    }
    
    .banner-content {
        margin-left: 100px;
    }
    
    /* Typography responsive */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Footer responsive */
    .footer-logos {
        gap: 20px;
    }
    
    .footer-logo {
        height: 45px;
    }
    
    /* Grilles responsive */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .banner-content {
        margin-left: 80px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .section {
        padding: 30px 0;
    }
    
    .card-content {
        padding: 16px !important;
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.6s ease-in-out;
}

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

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.elevation-1 { box-shadow: var(--shadow-light) !important; }
.elevation-2 { box-shadow: var(--shadow-medium) !important; }
.elevation-3 { box-shadow: var(--shadow-heavy) !important; }

/* États de chargement */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible pour l'accessibilité */
*:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Sélection de texte */
::selection {
    background: var(--primary-light);
    color: white;
}

::-moz-selection {
    background: var(--primary-light);
    color: white;
}