/* ========== DEBUT : tournoi.css – Variables et réinitialisation ========== */
:root {
    --primary: #4B0082;
    --primary-light: #7B2FBE;
    --primary-dark: #2E004F;
    --gold: #FFCC00;
    --gold-dark: #e6b800;
    --bg-light: #F0F8FF;
    --white: #ffffff;
    --dark: #1a1a1a;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 40px rgba(75,0,130,0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* ========== FIN : Variables et réinitialisation ========== */

/* ========== DEBUT : Spinner ========== */
.spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* ========== FIN : Spinner ========== */

/* ========== DEBUT : Navigation (identique à l'accueil) ========== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--light-gray);
}

.logo-nav {
    height: 50px;
    cursor: pointer;
    transition: var(--transition);
}
.logo-nav:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--gold);
}

.btn-auth {
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    transition: var(--transition);
}

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

.btn-auth.gold {
    background: var(--gold);
    color: black;
    border: none;
}

.btn-auth.gold:hover {
    background: var(--gold-dark);
}

.lang-picker {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--light-gray);
    padding: 8px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.lang-picker:hover {
    border-color: var(--gold);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}
/* ========== FIN : Navigation ========== */

/* ========== DEBUT : Contenu principal ========== */
.tournoi-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
}

.live-section {
    margin-bottom: 40px;
}

.live-section h2,
.tournois-section h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-section h2 i,
.tournois-section h2 i {
    color: var(--gold);
}

.live-container,
.tournoi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.live-card,
.tournoi-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
}

.live-card:hover,
.tournoi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.live-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.live-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.live-info {
    padding: 20px;
}

.live-title {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.no-live {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-size: 1.1rem;
}
/* ========== FIN : Contenu principal ========== */

/* ========== DEBUT : Filtres ========== */
.filters-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--white);
    padding: 15px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.filters-bar input,
.filters-bar select {
    padding: 12px 18px;
    border: 2px solid var(--light-gray);
    border-radius: 40px;
    font-size: 0.95rem;
    background: var(--white);
    transition: var(--transition);
    flex: 1;
    min-width: 200px;
    font-family: 'Poppins', sans-serif;
}

.filters-bar input:focus,
.filters-bar select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(75,0,130,0.1);
}
/* ========== FIN : Filtres ========== */

/* ========== DEBUT : Carte image / placeholder ========== */
.card-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.initials-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--gold);
    font-weight: 800;
    font-size: 2.5rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.video-thumb {
    position: relative;
    height: 100%;
}

.video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumb .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255,204,0,0.9);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    pointer-events: none;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.tournoi-type-badge {
    display: inline-block;
    background: var(--bg-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tournoi-desc {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 15px;
    max-height: 4.5em;
    overflow: hidden;
    line-height: 1.5;
}

.tournoi-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--gray);
}

.tournoi-meta i {
    color: var(--primary-light);
    margin-right: 5px;
}

.tournoi-code {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.code-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
    color: var(--dark);
}

.code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.code {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    letter-spacing: 1px;
}

.copy-btn,
.btn-inscrire {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.copy-btn i {
    color: var(--gold);
}

.copy-btn:hover {
    background: var(--primary-light);
}

.copy-btn:disabled,
.btn-inscrire:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-inscrire {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--dark);
    box-shadow: 0 4px 8px rgba(255,204,0,0.3);
}

.btn-inscrire:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255,204,0,0.4);
}

.places-info {
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.places-restantes {
    color: var(--success);
}

.places-complet {
    color: var(--danger);
}

.share-btn {
    background: none;
    border: 1px solid var(--light-gray);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    margin-left: 5px;
    transition: var(--transition);
    vertical-align: middle;
}

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

.tournoi-info {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    border-left: 6px solid var(--primary);
    margin-top: 40px;
}

.tournoi-info h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.tournoi-info p {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.8;
}
/* ========== FIN : Carte image / placeholder ========== */

/* ========== DEBUT : Modale inscription ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 30px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.modal-large {
    max-width: 800px;
}

.close-modal {
    float: right;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    line-height: 1;
}
.close-modal:hover {
    color: var(--danger);
}

.modal h3 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 15px;
}

.form-section {
    border: 2px solid var(--light-gray);
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 25px;
    background: #fafafa;
}

.form-section legend {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    margin-left: 10px;
    box-shadow: 0 4px 8px rgba(75,0,130,0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form-section legend i {
    color: var(--gold);
}

.fieldset-hint {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--light-gray);
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(75,0,130,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Tableau dispo */
.dispo-table {
    overflow-x: auto;
    margin-top: 10px;
}

.dispo-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.dispo-table th,
.dispo-table td {
    padding: 10px 6px;
    text-align: center;
    border: 1px solid var(--light-gray);
    font-size: 0.85rem;
}

.dispo-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.dispo-table td:first-child {
    background: #f1f3f5;
    font-weight: 600;
    color: var(--primary-dark);
}

.dispo-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    font-size: 1.1rem;
    margin-top: 15px;
    box-shadow: 0 8px 16px rgba(75,0,130,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit i {
    color: var(--gold);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(75,0,130,0.3);
}
/* ========== FIN : Modale inscription ========== */

/* ========== DEBUT : Modale média (galerie) avec onglets ========== */
.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.modal-tab-btn {
    background: none;
    border: none;
    padding: 8px 20px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-radius: 20px;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

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

.modal-tab-btn:hover {
    background: var(--primary-light);
    color: white;
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

.tournoi-desc-full {
    margin-top: 15px;
    line-height: 1.6;
}

.media-carousel-wrapper {
    position: relative;
}

.media-display {
    margin-bottom: 15px;
    position: relative;
}

.media-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

.slide img,
.slide video {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 15px;
}

.prev-slide,
.next-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.prev-slide { left: 10px; }
.next-slide { right: 10px; }
.prev-slide:hover,
.next-slide:hover {
    background: var(--primary);
}
/* ========== FIN : Modale média ========== */

/* ========== DEBUT : Toasts ========== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 6px solid;
    animation: slideIn 0.3s forwards;
    min-width: 280px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--primary); }
.toast.warning { border-left-color: var(--warning); }

.toast-content {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    font-size: 1.4rem;
    line-height: 1;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
/* ========== FIN : Toasts ========== */

/* ========== DEBUT : Pied de page ========== */
footer {
    background: #0a0a0a;
    color: var(--white);
    padding: 40px 5% 20px;
    text-align: center;
    margin-top: auto;
}

.compliance-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.badge-item {
    background: rgba(255,255,255,0.05);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.8rem;
    color: var(--gold);
    border: 1px solid rgba(255,204,0,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-box {
    margin-bottom: 20px;
}

.contact-item {
    color: var(--gold);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: var(--transition);
}

.contact-item:hover {
    color: white;
}

.legal p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin: 5px 0;
}
/* ========== FIN : Pied de page ========== */

/* ========== DEBUT : Responsive ========== */
@media (max-width: 1008px) {
    .menu-toggle {
        display: flex;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        right: 5%;
        background: var(--white);
        padding: 25px;
        border-radius: 15px;
        width: 90%;
        max-width: 300px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        border: 1px solid var(--light-gray);
        z-index: 999;
        gap: 15px;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        margin: 0;
        text-align: center;
        font-size: 1.1rem;
    }
    .btn-auth {
        text-align: center;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .filters-bar {
        flex-direction: column;
    }
    .filters-bar input,
    .filters-bar select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .tournoi-main {
        padding: 20px 15px;
    }
    .tournoi-grid {
        grid-template-columns: 1fr;
    }
    .card-image-container {
        height: 180px;
    }
    .modal-content {
        padding: 20px;
    }
    .form-section {
        padding: 15px;
    }
    .dispo-table {
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    nav {
        padding: 15px 4%;
    }
    .logo-nav {
        height: 40px;
    }
    .tournoi-main {
        padding: 20px 10px;
    }
    .live-section h2,
    .tournois-section h2 {
        font-size: 1.5rem;
    }
    .card-image-container {
        height: 150px;
    }
}

@media (max-width: 200px) {
    body { font-size: 0.8rem; }
    .nav-links { width: 100%; position: static; box-shadow: none; }
    .btn-auth { padding: 6px 10px; }
}
/* ========== FIN : Responsive ========== */
/* ========== FIN : tournoi.css ========== */