/* ==================== STYLES GÉNÉRAUX ==================== */
html, body {
    font-family: Arial, sans-serif;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #001f3f !important;
}

body {
    overflow-x: hidden;
}

.container {
    flex: 1; 
    display: flex;
    flex-direction: column;
}
body {
    display: flex;
    flex-direction: column;
}

/* ==================== HEADER ==================== */
header {
    background-color: #001f3f;
    color: white;
    padding: 20px;
    text-align: center;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
}

/* ==================== NAVIGATION ==================== */
.navbar {
    background-color: #001f3f !important; 
    padding: 15px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    color: white !important;
    font-size: 1.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease-in-out;
}

.navbar-brand:hover {
    color: #ff9900 !important;
}

.navbar-nav .nav-link {
    color: white !important;
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px 15px;
    transition: all 0.3s ease-in-out;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: #ff9900 !important;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=UTF8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%28255, 255, 255, 1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .navbar-nav {
        text-align: center;
        background: rgba(0, 31, 63, 0.9); /* Fond semi-transparent */
        padding: 10px 0;
    }

    .navbar-nav .nav-item {
        margin-bottom: 10px;
    }
}


/* ==================== CONTENU PRINCIPAL ==================== */
main {
    flex: 1; 
}
/* ==================== SLIDER ==================== */

h1 {
    font-size: 4em !important; 
    font-weight: bold !important;
    color: white !important; 
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin: 20px 0 !important;
}
h2 {
    display: block;
    font-size: 1.5em;
    color: white ;
    margin-block-start: 0.83em;
    margin-block-end: 0.83em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

.listing {
    color: white !important;
}
label[for="recherche"] {
    font-size: 2em !important; 
    font-weight: bold !important;
    color: white !important;
    display: block; 
    margin-bottom: 10px;
}

.search-container {
    display: flex;
    align-items: center; 
    gap: 10px; 
    width: 100%;
    max-width: 600px; 
}

#recherche {
    flex-grow: 1; 
    height: 40px;
    font-size: 1em;
    padding: 5px 10px;
    border-radius: 5px;
    border: 2px solid #ff9900;
}

input[type="submit"] {
    width: 10px; 
    height: 40px; 
    font-size: 1em;
    font-weight: bold;
    background: linear-gradient(90deg, #ff9900, #e68a00);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}


input[type="submit"]:hover {
    background: linear-gradient(90deg, #e68a00, #cc7700);
    transform: scale(1.05);
}

input[type="submit"]:active {
    transform: scale(0.95);
}
.slider-container {
    position: relative;
    width: 80%;
    max-width: 800px;
    overflow: hidden;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider img {
    width: 100%;
    border-radius: 10px;
}

button.prev, button.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
}

button.prev {
    left: 10px;
}

button.next {
    right: 10px;
}

button.prev:hover, button.next:hover {
    background: rgba(255, 255, 255, 0.7);
    color: black;
}
#details-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: none;
}

#details-container button {
    margin-top: 10px;
    background: #ff9900;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
}

.hidden {
    display: none;
}

/* ==================== TOURNOI CARDS ==================== */

.tournament-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.tournament-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 15px;
    text-align: center;
    width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s;
}

.tournament-card:hover {
    transform: scale(1.05);
}

.tournament-card img {
    width: 100%;
    border-radius: 10px;
}

.tournament-card h3 {
    margin: 10px 0;
    font-size: 1.5em;
    color: #001f3f;
}

.tournament-card p {
    margin: 5px 0;
    font-size: 1.1em;
    color: #555;
}

.details-btn {
    background: #ff9900;
    color: white;
    border: none;
    padding: 10px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 1em;
    border-radius: 5px;
    transition: background 0.3s;
}

.details-btn:hover {
    background: #e68a00;
}


/* ==================== SECTION LISTENING ==================== */
.listening {
    display: flex;
    width: 100%;
    height: 100vh; 
}

/* ==================== TOURNOI CARDS ==================== */
.tournament-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.tournament-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 15px;
    text-align: center;
    width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s;
}

.tournament-card:hover {
    transform: scale(1.05);
}

.tournament-card img {
    width: 100%;
    border-radius: 10px;
}

.tournament-card h3 {
    margin: 10px 0;
    font-size: 1.5em;
    color: #001f3f;
}

.tournament-card p {
    margin: 5px 0;
    font-size: 1.1em;
    color: #555;
}

.form-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

h1 {
    margin-bottom: 20px;
    font-size: 2em;
    text-transform: uppercase;
}
h2 {
    color: white !important;
}
label {
    font-size: 1.2em;
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ff9900;
    font-size: 1em;
}

.error {
    display: block;
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    padding: 5px;
    margin-top: -10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

input[type="submit"] {
    width: 100%;
    padding: 10px;
    font-size: 1.2em;
    background: linear-gradient(90deg, #ff9900, #e68a00);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

input[type="submit"]:hover {
    background: linear-gradient(90deg, #e68a00, #cc7700);
    transform: scale(1.05);
}
/* Titres et textes */
h1 {
    color: #2c3e50;
    margin: 20px 0;
    font-size: 28px;
    text-transform: uppercase;
}

p {
    margin-bottom: 20px;
    color: #7f8c8d;
    font-style: italic;
}

/* Liens */
a {
    color: #2980b9;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Séparateurs */
hr {
    border: none;
    height: 1px;
    background-color: #e0e0e0;
    margin: 15px 0;
}

/* Bouton d'ajout */
a[href*="new_form"] {
    display: inline-block;
    background-color: #27ae60;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

a[href*="new_form"]:hover {
    background-color: #2ecc71;
    text-decoration: none;
}

/* Tableau principal */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
}

thead {
    background-color: #34495e;
    color: white;
}

thead td {
    font-weight: bold;
    text-transform: capitalize;
    padding: 12px 15px;
}

tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

tbody tr:hover {
    background-color: #e9f7fe;
    transition: background-color 0.3s ease;
}

td {
    padding: 10px 15px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

/* Images dans le tableau */
td img {
    max-width: 100px;
    max-height: 80px;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Liens d'action (supprimer/modifier) */
td a[href*="delete"] {
    color: #e74c3c;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: inline-block;
}

td a[href*="delete"]:hover {
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
}

td a[href*="update"] {
    color: #f39c12;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: inline-block;
}

td a[href*="update"]:hover {
    background-color: #f39c12;
    color: white;
    text-decoration: none;
}

/* Responsive */
@media screen and (max-width: 768px) {
    table {
        font-size: 14px;
    }
    
    td {
        padding: 8px 10px;
    }
    
    td img {
        max-width: 60px;
        max-height: 60px;
    }
}

/* Styles des messages et titres */
h1, h2 {
    color: #333;
}
p {
    color: white;
}

/* Style pour afficher l’image uploadée */
img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-top: 10px;
}

/* Boîte de message d'erreur */
p {
    color: red;
    font-weight: bold;
}
/* ==================== IMAGE ==================== */
td img {
    width: 100px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ==================== FOOTER ==================== */
footer {
    background-color: #001f3f;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: large;
    width: 100%;
    position: relative;
    bottom: 0;
    left: 0;
    font-weight: bold;
}

footer p {
    margin: 5px 0;
}

/* ==================== VERSION MOBILE (≤576px) ==================== */
@media (max-width: 576px) {
    .navbar-collapse {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        background: rgba(0, 31, 63, 0.9);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
    }

    .navbar-collapse.show {
        display: flex;
    }

    .navbar-toggler {
        display: block;
        background-color: transparent;
        border: none;
    }

    .navbar-toggler:focus {
        outline: none;
    }
}