/* ============================================================
   VOLLEY TRESSANGE — Site public
   www.volleytressange.fr
   ============================================================ */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #2563eb;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
header {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-inner {
    flex-direction: column;
    padding: 0;
}

.header-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
}

.site-logo {
    font-size: 1.4rem;
    font-weight: bold;
    white-space: nowrap;
}
.site-logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo-img {
    height: 45px;
    vertical-align: middle;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 10px;
}

.header-nav {
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.2);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 10px;
}

nav ul li a {
    color: white;
    padding: 12px 14px;
    display: block;
    transition: background 0.2s;
    border-radius: 4px;
    font-size: 0.9rem;
}
nav ul li a:hover {
    background: rgba(255,255,255,0.15);
    text-decoration: none;
}
nav ul li a.active {
    background: rgba(255,255,255,0.2);
    font-weight: bold;
}

.nav-separator {
    border-left: 1px solid rgba(255,255,255,0.3);
    margin: 5px 8px;
}

/* ============================================================
   CONTENU PRINCIPAL
   ============================================================ */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
}

.page-title {
    font-size: 1.8rem;
    color: #1e3a5f;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2563eb;
}

.section-title {
    font-size: 1.3rem;
    color: #1e3a5f;
    margin-bottom: 15px;
}

/* ============================================================
   HERO (accueil)
   ============================================================ */
.hero {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: white;
    padding: 50px 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}
.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}
.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ============================================================
   CARTES
   ============================================================ */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.card-title {
    font-size: 1.3rem;
    color: #1e3a5f;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

/* ============================================================
   ARTICLES
   ============================================================ */
.articles-grid, .articles-list {
    display: grid;
    gap: 25px;
}

.article-card {
    display: flex;
    flex-direction: column;
}

.article-photo {
    text-align: center;
}

.article-photo img {
    max-width: 600px;
    max-height: 400px;
    object-fit: contain;
    border-radius: 6px;
    margin: 0 auto 15px;
    display: inline-block;
}

.article-title {
    font-size: 1.4rem;
    color: #1e3a5f;
    margin-bottom: 5px;
}

.article-date {
    font-size: 0.85rem;
    color: #6b7280;
    display: block;
    margin-bottom: 10px;
}

.article-content {
    line-height: 1.7;
}

.article-video {
    margin-top: 15px;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
}
.article-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================================
   GALERIE
   ============================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.2s;
}
.gallery-item img:hover {
    transform: scale(1.03);
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.album-card {
    text-align: center;
    padding: 30px 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: #1e3a5f;
}
.album-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    text-decoration: none;
}
.album-card h3 {
    margin-bottom: 5px;
}
.album-count {
    font-size: 0.85rem;
    color: #6b7280;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #6b7280;
}
.breadcrumb a {
    color: #2563eb;
}

/* ============================================================
   ÉVÉNEMENTS
   ============================================================ */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    background: #2563eb;
    color: white;
    border-radius: 6px;
    padding: 8px 12px;
}
.event-day {
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1;
}
.event-month {
    font-size: 0.75rem;
    text-transform: uppercase;
}

.event-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.event-type {
    font-size: 0.8rem;
    color: #6b7280;
}
.event-time, .event-lieu {
    font-size: 0.85rem;
    color: #6b7280;
}

.event-past {
    opacity: 0.6;
}

/* ============================================================
   TABLEAUX
   ============================================================ */
.table-container {
    overflow-x: auto;
    margin-bottom: 15px;
}

.table-bordered {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.table-bordered th,
.table-bordered td {
    border: 1px solid #e5e7eb;
    padding: 6px 8px;
    text-align: center;
}
.table-bordered th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e3a5f;
}

.table-simple {
    width: 100%;
    border-collapse: collapse;
}
.table-simple td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.row-tressange {
    background: #dbeafe !important;
    font-weight: 500;
}
.row-alt {
    background: #f8fafc;
}
.row-muted {
    opacity: 0.5;
}

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #374151;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkbox-inline input[type="checkbox"] {
    width: auto;
}

.form-contact {
    max-width: 600px;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}
.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: #2563eb;
    color: white;
}
.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}
.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-warning {
    background: #d97706;
    color: white;
}

.btn-danger {
    background: #dc2626;
    color: white;
}
.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ============================================================
   ALERTES
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success {
    background: #d1fae5;
    color: #065f46;
}
.badge-muted {
    background: #e5e7eb;
    color: #6b7280;
}

/* ============================================================
   INFOS PRATIQUES
   ============================================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.links-list {
    list-style: none;
    padding: 0;
}
.links-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}
.links-list li:last-child {
    border-bottom: none;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
}

/* ============================================================
   SÉLECTEUR DE SAISON
   ============================================================ */
.season-selector {
    margin-bottom: 20px;
}
.season-selector select {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: #1e3a5f;
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 0.85rem;
}
footer a, .footer-link {
    color: rgba(255,255,255,0.9);
}
footer a:hover {
    color: white;
}

.footer-content p {
    margin: 5px 0;
}

/* ============================================================
   UTILITAIRES
   ============================================================ */
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-nowrap { white-space: nowrap; }
.text-muted { color: #6b7280; }
.bold { font-weight: bold; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-25 { margin-top: 25px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.actions-cell { white-space: nowrap; }

/* ============================================================
   GENRE ICONS
   ============================================================ */
.genre-m { color: #2563eb; }
.genre-f { color: #ec4899; }
.genre-x { color: #8b5cf6; }

.title-link {
    font-size: 0.8rem;
    font-weight: normal;
    margin-left: 10px;
}

.section-separator {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 30px 0;
}

/* ============================================================
   LIGHTBOX (galerie photos)
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}
.lightbox-close:hover {
    color: #f87171;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: white;
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    padding: 15px 18px;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10;
}
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.25);
}
.lightbox-prev {
    left: 20px;
}
.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .header-nav {
        display: none;
    }
    .header-nav.open {
        display: block;
    }

    nav ul {
        flex-direction: column;
        padding: 10px;
    }
    nav ul li a {
        padding: 10px 15px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .event-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .form-row {
        flex-direction: column;
    }

    .table-bordered {
        font-size: 0.75rem;
    }
    .table-bordered th,
    .table-bordered td {
        padding: 4px 5px;
    }
}
