/* ==============================================
   Royal Mickey Club Falissole - Styles CSS
   ============================================== */

/* Variables CSS */
:root {
    --primary-color: #003d7a;
    --secondary-color: #e63946;
    --accent-color: #f77f00;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --gray-light: #e9ecef;
    --gray: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ==============================================
   BANNIÈRE
   ============================================== */
.banner {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background-image: url('/assets/images/banner.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 61, 122, 0.7);
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo img {
    max-height: 120px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.user-actions {
    position: relative;
    z-index: 9999; /* Maximum */
}

.btn-login, .btn-profile {
    background: var(--white);
    color: var(--primary-color);
    padding: 10px 24px;
    border-radius: var(--border-radius);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 9999;
}

.btn-login:hover, .btn-profile:hover {
    background: var(--gray-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-icon {
    font-size: 24px;
}

.user-menu {
    position: relative;
    z-index: 9999;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    min-width: 200px;
    margin-top: 8px;
    z-index: 99999; /* Au-dessus de tout */
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-color);
    transition: background 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--gray-light);
}

.dropdown-menu hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--gray-light);
}

/* ==============================================
   NAVIGATION
   ============================================== */
.main-nav {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.main-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    list-style: none;
    display: flex;
    padding: 0;
}

.main-nav li {
    flex: 1;
}

.main-nav a {
    display: block;
    padding: 16px 20px;
    text-align: center;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--gray-light);
}

/* ==============================================
   CONTENEUR PRINCIPAL
   ============================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 600px);
}

/* ==============================================
   ZONE DE RECHERCHE
   ============================================== */
.search-zone {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 32px;
}

.search-form {
    display: flex;
    gap: 12px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-search {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 32px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-search:hover {
    background: var(--secondary-color);
}

/* ==============================================
   GRILLE D'ARTICLES
   ============================================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content {
    padding: 20px;
}

.article-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.article-card-excerpt {
    color: var(--gray);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--gray);
}

.article-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-public {
    background: var(--success);
    color: var(--white);
}

.badge-private {
    background: var(--warning);
    color: var(--text-color);
}

/* ==============================================
   SLIDER SPONSORS
   ============================================== */
.sponsors-section {
    background: var(--white);
    padding: 40px 20px;
    margin: 40px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.sponsors-section h2 {
    text-align: center;
    margin-bottom: 32px;
    color: var(--primary-color);
}

.sponsors-slider {
    overflow: hidden;
    position: relative;
}

.sponsors-track {
    display: flex;
    animation: slide 30s linear infinite;
}

.sponsor-logo {
    flex: 0 0 200px;
    padding: 0 20px;
}

.sponsor-logo img {
    width: 100%;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.sponsor-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ==============================================
   FOOTER
   ============================================== */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 32px;
}

.footer-section h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.footer-section address {
    font-style: normal;
    line-height: 1.8;
}

.footer-section a {
    color: var(--white);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.map-container iframe {
    border-radius: var(--border-radius);
}

.map-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--accent-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--border-radius);
    transition: background 0.3s ease;
}

.social-link:hover {
    background: rgba(255,255,255,0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* ==============================================
   FORMULAIRES
   ============================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: var(--white);
    cursor: pointer;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

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

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

.btn-secondary {
    background: var(--gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--text-color);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* ==============================================
   TABLES
   ============================================== */
.table-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--primary-color);
    color: var(--white);
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

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

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

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

.table-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.icon-btn:hover {
    transform: scale(1.2);
}

/* ==============================================
   ALERTES
   ============================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
    .banner {
        height: 150px;
    }
    
    .banner-content {
        flex-direction: column;
        justify-content: center;
        gap: 16px;
    }
    
    .logo img {
        max-height: 80px;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav a {
        padding: 12px 16px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 20px 16px;
    }
}
