:root {
    --color-primary: #0E7A4F;
    --color-secondary: #F4C542;
    --color-tertiary: #064A2E;
    --color-gray-light: #EDEDED;
    --color-sombremode: #1A1A1A;
    --color-success: #2ECC71;
    --color-alert: #E67E22;
    --color-erreur: #E74C3C;
    --color-info: #3498DB;
    --color-background: #fffdfd;
    --color-text: #0E7A4F;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    padding: 0;
}

section {
    margin: 15px 0;
}

.button {
    background-color: var(--color-primary);
    color: var(--color-background);
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

hr {
    border: 1px solid var(--color-gray-light);
}

/*navbar*/
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-height: 60px;
    color: var(--color-text);
    background-color: var(--color-background);
    padding: 5px;
    position: relative;
}
/*
.navbar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-gray-light);
}
*/
.logo {
    max-height: 100px;
    min-height: 40px;
    object-fit: contain;
    cursor: pointer;
}

.navbar a {
    color: var(--color-text);
    text-decoration: none;
    margin-right: 20px;
}

.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--color-tertiary);
    border-top: 1px solid #1f3d1f;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
}

.mobile-nav .nav-item {
    flex: 1;
    text-align: center;
    color: white;
    font-size: 12px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-nav .nav-item img {
    width: 26px;
    height: 26px;
    margin-bottom: 4px;
    opacity: 0.9;
}

.mobile-nav .nav-item.active img,
.mobile-nav .nav-item.active span {
    color: #4cd964;
    opacity: 1;
}

body {
    padding-bottom: 80px; /* pour éviter que le contenu passe sous le menu */
}


/*hero*/
.hero {
    color: var(--color-text);
    background-color: var(--color-background);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

.hero-content::after {
    content: "";
    display: block;
    clear: both;
    background-color: var(--color-gray-light);
}

.hero-image {
    width: 150px;
    height:150px;
    object-fit: cover;
    float: right;
    border-radius: 50%;
    shape-outside: content-box;
}

/*caroussel*/
.caroussel {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
}

.card {
    text-align: center;
    border: 1px solid var(--color-gray-light);
    border-radius: 5px;
    /*background-color: var(--color-background);*/
    box-shadow: 0 0 4px var(--color-gray-light),
                0 3px 10px var(--color-tertiary);
    padding: 20px;
    margin-right: 1px;
    margin-bottom: 15px;
    min-width: 200px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden; /* empêche les débordements */
    z-index: 1;
}
.caroussel .card {
    cursor: pointer;
}

.caroussel .card:hover {
    transform: scale(1.02);
    transition: 0.2s;
}

.matchup {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-around;
    gap: 10px;
}

.matchup p {
    flex: 1;              /* prend toute la largeur disponible */
    white-space: nowrap;  /* empêche le texte de revenir à la ligne */
    text-align: center;   /* optionnel */
}

/*groupe*/
.groupe {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

/*classement*/
.classement, .classementPage {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.classementPage {
    flex-direction: column;
    align-items: flex-start;
}

/* Liste */
.classement ol, .classementPage ol {
    padding: 0;
    margin: 0;
    width: 100%;
    position: relative;
}

.classement li, .classementPage li {
    display: flex;
    padding: 9px 12px;
    font-size: 16px;
}

.classement-list li {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    align-items: center;
}

.position {
    width: 30px;
    font-weight: bold;
    color: var(--color-secondary);
}

/* Alternance */
.classement li:nth-child(odd), .classementPage li:nth-child(odd) {
    background: color-mix(in srgb, var(--color-tertiary) 3%, transparent);
}

.classement li:nth-child(even), .classementPage li:nth-child(even) {
    background: color-mix(in srgb, var(--color-tertiary) 20%, transparent);
}

/* Alignements */
.nom {
    flex: 0.4;
    text-align: left;
}

.points {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
}

/* Image à droite */
.classement .trophy {
    position: absolute;
    right: 10px;   /* ajuste selon ton design */
    top: 50%;
    transform: translateY(-50%);
    max-width: 150px;    /* adapte la taille */
    pointer-events: none; /* l'image ne gêne pas les clics */
}

/*footer*/
.symbole {
    display: flex;
    justify-content: space-around;
}

.symbole-item {
    width: 33vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.symbole-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.symbole-item p {
    margin-top: 0px;
    font-size: 12px;
    font-weight: 600;
}

/* Barre des onglets */
.tabs {
    display: flex;
    background: #1e1e1e;
}

.tab-button {
    flex: 1;
    padding: 15px;
    border: none;
    background: #1e1e1e;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.tab-button.active {
    background: #28a745;
}

/* Contenu */
.tab-content {
    display: none;
    padding: 20px;
}

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

.demi {
    width: 50%;
}

.team-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    pointer-events: none; /* IMPORTANT */
}

.bet-line {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.bet-buttons {
    position: relative;
    z-index: 10;
}

.odds,
.bet-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.odds span,
.bet-buttons button {
    width: 30%;
    text-align: center;
}

/* boutons */
.bet-buttons .button {
    background-color: var(--color-primary);
    color: var(--color-background);
    border: none;
    padding: 10px 0;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s ease;
}

/* hover */
.bet-buttons .button:hover, .card .button:hover {
    background-color: var(--color-tertiary);
}

/* bouton actif */
.button.active {
    background-color: var(--color-secondary);
    color: #000;
    font-weight: bold;
}

/*page login*/
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid var(--color-gray-light);
    border-radius: 5px;
    background-color: var(--color-background);
    box-shadow: 0 0 10px var(--color-gray-light);
}

.auth-container form {
    display: flex;
    flex-direction: column;
}

.auth-container label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    margin-bottom: 15px;
}

.auth-container input {
    padding: 10px;
    border: 1px solid var(--color-gray-light);
    border-radius: 4px;
    margin-top: 5px;
}

#bet-section form{
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bet-btn.selected {
    background-color: #2ecc71;
    color: white;
    border: 2px solid var(--color-gray-light);
}

/*page groupe*/
.groupe {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.groupe ul {
    list-style: none;
    padding: 0;
}

.groupe li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin:10px;
    padding: 10px;
    border: 1px solid var(--color-gray-light);
    border-radius: 5px;
    background-color: var(--color-background);
    box-shadow: 0 0 4px var(--color-gray-light),
                0 3px 10px var(--color-tertiary);
}

.groupe form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.groupe label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    margin-bottom: 15px;
}

.groupe input {
    padding: 10px;
    border: 1px solid var(--color-gray-light);
    border-radius: 4px;
    margin-top: 5px;
}

.groupe form .button {  
    width: 100px;
    align-self: center;
}

.group-list .button {
    text-decoration: none;
}

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

.groupe th, .groupe td {
    padding: 10px;
    border: 1px solid var(--color-gray-light);
    text-align: left;
}

.groupe th {
    background-color: var(--color-gray-light);
}

.groupe tr:nth-child(odd) {
    background-color: color-mix(in srgb, var(--color-tertiary) 3%, transparent);
}

.live {
    color: red;
    font-weight: bold;
}

.finished {
    color: green;
    font-weight: bold;
}

.footer {
    background: #0b3d2e;
    color: white;
    padding: 25px 15px;
    margin-top: 40px;
    text-align: center;
}

.footer-logo {
    width: 70px;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-bottom {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Style par défaut (visiteurs) */
.footer-links a {
    color: white;
    font-weight: 600;
    text-decoration: none;
}

/* Style spécial quand connecté */
.footer.connected .footer-links a {
    opacity: 0.6;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Accent léger au survol */
.footer.connected .footer-links a:hover {
    opacity: 1;
    color: #2ecc71;
}

/* Option : espacement plus compact */
.footer.connected .footer-links {
    gap: 10px;
}


.contact-form {
    max-width: 420px;
    margin: 0 auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    font-family: system-ui, sans-serif;
}

.contact-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1b5e20; /* Vert foncé */
}

.contact-form label {
    font-weight: 600;
    margin-top: 12px;
    display: block;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
}

.contact-form button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #2e7d32; /* Vert PSS */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.contact-form button:hover {
    background: #1b5e20;
}

.avec-pari {
    background-color: var(--color-secondary);
}
.selected {
    background-color: var(--color-tertiary) !important;
    color: var(--color-background) !important;
    font-weight: bold;
}
#historique form {
    margin: 0px;
    border: 1px solid var(--borderColor);
    border-radius: 8px;
    padding: 0px;
    box-shadow: 3px 3px 6px var(--shadowColor);
}
#historique legend {
    font-family: 'Ronde','PlumBAL';
    font-size: 2em;
    padding: 10px;
}
#historique fieldset {
    border-radius: 30px 5px;
    margin: 10px;
}
.card-historique fieldset input {
    margin: 15px;
}
#historique select, #historique input, #historique button {
    /*margin: 5px;/*pour éviter le décalage du hover*/
    margin: 5px;
    font-family: 'Avenir';
    font-size: 1em;
    color: var(--fontColor);
    border: 1px solid var(--color-gray-light);
    border-radius: 8px;
    background-color: var(--color-background);
    box-shadow: 0 0 4px var(--color-gray-light),
                0 3px 10px var(--color-tertiary);
}
#historique button {
    min-width: 48px;
    min-height: 48px;
    margin: 0px;
    color: var(--fontColor);
    border:none;
    background:none;
    cursor:pointer;
}


#historique button p {
    margin: 0px;
}
#historique p {
    margin: 0px;
    text-align: center;
}
#historique select {
    width: max-content;
}
#historique input[type=submit]:hover, #historique input[type=reset]:hover,  #historique button:hover {
    background-color: var(--color-primary);
    color: var(--color-gray-light);
    cursor: pointer;
}
#historique select:hover, #historique select:active, #historique select:focus {
    margin: 3px;/*pour éviter le décalage du hover*/
    outline: none; /* supprime css defaut du navigateur */
    border: 3px solid var(--color-background);
}

.calendar-navigation {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
#historique table {
    margin: 0 auto;
    width: 100%;
    border-radius: 8px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

#historique tbody { 
    background-color: color-mix(in srgb, var(--color-tertiary) 3%, transparent);
    border: 1px solid var(--color-gray-light);
    border-radius: 8px;
    box-shadow: 0 0 4px var(--color-gray-light),
                0 3px 10px var(--color-tertiary);
}

#historique thead th:first-child {
  border-top-left-radius: 8px;
}

thead th:last-child {
  border-top-right-radius: 8px;
}

#historique tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

#historique tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

#historique th, #historique td {
    padding: 1px;
    border: 1px solid var(--color-gray-light);
    text-align: center;
}

.card-historique {
    margin-top: 15px;
}

.error {
    border: var(--color-erreur) 3px solid !important;
    border-radius: 5px;
    box-shadow: 0 5px 5px var(--color-erreur);
    margin: 10px;;
}

.error-message {
    font-size: 30px;
    margin-top: 4px;
    text-align: center;
}

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

.score-table th, .score-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.score-row {
    cursor: pointer;
}

.score-row:hover {
    background-color: #f5f5f5;
}

.score-row.selected {
    background-color: #d0f0d0; /* vert léger */
}