.card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ddd;
    background-color: #fff;
}

.score-page .card-body {
    padding: 20px;
    background-color: #f7f7f7;
}

.other-person-prediction-page.score-page .card-body{
    background-color: #1D2127;
    color: white;
}

.card-body p{
    margin-bottom: 5px;
    font-size: 14px;
}

.card-body .flag-icon {
    font-size: 2rem;
}

.round-box{
    position: sticky;
    top: 57px;
    z-index: 1000;
    background-color: #ffffff;
    padding: 10px;
}

#roundTabsContent{
    margin: 0px 2px;
}

.card-body div.team-container{
    width: 96px;
}
.card-body div.team-container p{
    font-size: 12px;
    font-weight: bold;
}

input[type="number"] {
    width: 60px;
    padding: 5px;
    font-size: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#statsTabs {
    border: none;
    background: #e9ecef;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

#statsTabs .nav-item {
    flex: 1;
}

#statsTabs .nav-link {
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 8px;
    border: none;
    border-radius: 9px;
    color: #495057;
    background: transparent;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    text-align: center;
    white-space: nowrap;
}

#statsTabs .nav-link:hover:not(.active) {
    background: rgba(255,255,255,0.6);
    color: #1a3a6b;
}

#statsTabs .nav-link.active {
    background: #1a3a6b;
    color: #fff;
    border: none;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(26,58,107,0.18);
}

p.top-box {
    font-size: 11px;
}

.carousel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#currentRound {
    width: 200px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
    background-color: #1a3a6b;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(26,58,107,0.18);
}

.square-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 67px;
    height: 61px;
    border: none;
    background-color: #e9ecef;
    color: #1a3a6b;
    font-size: 1.5rem;
    padding: 0;
    border-radius: 10px;
}

.square-btn:hover:not(:disabled),
.square-btn:focus:hover:not(:disabled) {
    background-color: rgb(89, 89, 89) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.square-btn:focus,
.square-btn:active,
.square-btn:focus:active,
.btn-primary.square-btn:active,
.btn-primary.square-btn:not(:disabled):active {
    background-color: #e9ecef !important;
    color: #1a3a6b !important;
    box-shadow: none !important;
    outline: none;
    border-color: transparent !important;
}

.square-btn:disabled {
    background-color: #e9ecef;
    border-color: transparent;
    color: #bbb;
    cursor: not-allowed;
}

.square-btn i {
    margin: 0;
}

.btn-outline-secondary {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.score-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 300px;
    overflow-y: auto;
}

.score-item {
    padding: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    width: 100%;
}

.score-item:hover {
    background-color: #f0f0f0;
}

.score-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 17px;
    margin: 0 3px;
    cursor: pointer;
    border: 2px solid black;
    font-size: 9px;
    font-weight: bold;
    margin-top: 5px;
}

.score-total {
    width: 60px;
    height: 27px;
    background-color: red;
    color: white;
    text-align: center;
    line-height: 26px;
    margin: 2px 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
}
.score-details {
    border-radius: 5px;
    transition: max-height 0.3s ease-out;
    cursor: default;
    padding: 0px 10px 10px 10px;
}

.pronostic-success{
    border-color: #3dbb0f;
    color: white;
    background-color: #3dbb0f;
}

.pronostic-fail{
    border-color: red;
    color: white;
    background-color: red;
}

.result-box{
    background-color: #cecece;;
    padding: 3px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

.other-person-prediction-page.score-page .result-box{
    background-color: #464F5E;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding-right: 10px;
    outline: none;
    position: absolute;
    right: 10px; /* Align to the right */
}

.toggle-btn:focus {
    outline: none; /* Remove focus outline */
}

.score-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.score-details-table td {
    padding: 2px 0;
}

.score-details-table td .score-circle{
    margin: 0;
}
.score-value {
    font-size: 13px;
    text-align: center;
    font-weight: bold;
}

.card-match {
    user-select: none;
}

.card,
.card-match {
    background: var(--clr-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform .2s, box-shadow .2s;
}

.card:hover,
.card-match:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover) !important;
}

.prediction-box {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    background-color: #f9f9f9;
}

.prediction-header {
    font-size: 14px;
    margin-bottom: 5px;
}

.prediction-body {
    display: flex;
    align-items: center;
}

.prediction-body .flag-icon {
    margin-right: 5px;
}

.prediction-body .score-total {
    margin-left: auto;
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 12px;
}

p.text-center:has(.view-predictions-link){
    margin-top: 7px;
}

div.team-container:not(:has(span.flag-icon)){
    margin-top: 15px;
}

.card-other-person-prediction{
    padding: 7px;
    cursor: pointer;
}

.card-other-person-prediction p.name-other-person-prediction{
    font-weight: bold;
}

.card-other-person-prediction p.score-other-person-prediction{
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-other-person-prediction p.score-other-person-prediction span{
    margin-left: 10px;
    margin-right: 10px;
}

.card-other-person-prediction .score-total {
    margin: 2px 13px 2px 20px;
}

.current-user-prediction .name-other-person-prediction {
    color: #2980b9;
}

.user-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 57, 72, 0.8);
    color: white;
    text-align: center;
    padding: 12px;
    font-size: 18px;
    z-index: 9999;
}

.user-banner button {
    margin-top: 5px;
    padding: 10px 20px;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.user-banner button:hover {
    background-color: #0056b3;
}

.user-banner-space{
    height: 130px;
}

@media (max-width: 992px) {
    .user-banner {
        padding: 7px;
    }

    .user-banner p{
        margin-bottom: 8px;
    }

    .user-banner button {
        margin-top: 0px;
    }

    .user-banner-space{
        height: 90px;
    }
}

.leaderboard-table table{
    border: 1px solid #dee2e6;
}

.leaderboard-table table tbody tr{
    font-size: 14px;
}

.leaderboard-table table .text-ranking-user-connected{
    color: white;
    font-weight: bold;
    background-color: #004a99;
}
.leaderboard-mini-table .text-ranking-user-connected{
    color: white;
    font-weight: bold;
    background-color: #004a99;
}

.leaderboard-table table th{
    padding-bottom: 5px;
    padding-top: 5px;
}

.leaderboard-table .new-in-ranking{
    background-color: #007bff;
    color: white;
    padding: 3px 5px 4px 5px;
    border-radius: 5px;
    font-size: 10.5px;
}
.trend-circle {
    display: inline-block;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background-color: #ddd;
    text-align: center;
    line-height: 17px;
    font-size: 11px;
    margin-right: -2px;
}

.score-total-0 {
    background-color: red;
    color: white;
}

.score-total-1 {
    background-color: #ff9900;
    color: white;
}

.score-total-2 {
    background-color: #ad00ec;
    color: white;
}

.score-total-3 {
    background-color: #007bff;
    color: white;
}

.score-total-5 {
    background-color: #2fca2f;
    color: white;
}

#accordionBonusTeams .card{
    margin-bottom: 10px;
}
.medal {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 17px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 5px;
    border: 1px solid #717171;
}
.medal.gold {
    background-color: #ffd700; /* Or */
}
.medal.silver {
    background-color: #c0c0c0; /* Argent */
}
.medal.bronze {
    background-color: #cd7f32; /* Bronze */
}

.ranking-table .medal{
    margin-left: -5px;
    color: #000;
    border: none;
    line-height: 19px;
}

/* Pour centrer les drapeaux et les médailles */
.medal-element {
    margin: 0 3px;
    border-radius: 7px;
    padding: 5px 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.medal-element-bronze {
    background-color: #cd7f32;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.medal-element-gold{
    margin-left: 0px;
    background: #ffd700;
}

.medal-element-silver{
    background: #c0c0c0;
}

/* Empêche les drapeaux de se mettre sous forme de colonne sur petit écran */
.flag-group {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap; /* Garde les drapeaux sur une ligne */
}

.flag-icon {
    margin-left: 5px;
    margin-right: 5px;
}

.flag-group span:nth-child(1) {
    margin-left: 5px;
}
.flag-group span:nth-child(3) {
    margin-right: 5px;
}

.team-bonus-page .card .card-header {
    padding: 5px !important;
}

.team-bonus-page .bonus-pts{
    background-color: #2fca2f;
    padding: 5px 8px 5px 4px;
    border-radius: 5px;
    color: white;
}
.team-bonus-page .bonus-pts.no-pts{
    background-color: #6c6c6c;
}

@media (max-width: 992px) {
    .team-bonus-page .user-line > div {
        padding: 0;
    }
    .team-bonus-page .user-line > div:nth-child(1) {
        padding-left: 5px;
    }
    .team-bonus-page .user-line > div:nth-child(3) {
        padding-right: 5px;
    }
}
@media (max-width: 550px) {
    .medal-element{
        margin: 0 1px;
    }
}
div.container:has(#accordionBonusTeams){
    max-width: 700px;
}
.team-bonus-page .team-box {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 18px;
}
.team-bonus-page .team-box .flag-icon {
    max-width: 28px;
}
.team-bonus-page .team-btn {
    width: 97%;
    font-size: 18px;
}

.team-bonus-page .team-box.gold {
    background-color: #ffd700;
}
.team-bonus-page .team-box.silver {
    background-color: #c0c0c0;
}
.team-bonus-page .team-box.bronze {
    background-color: #cd7f32;
}

.team-bonus-page .team-box .medal {
    margin-right: 10px;
    width: 27px;
    height: 27px;
    line-height: 23px;
    font-size: 15px;
    margin-bottom: 0;
}

.team-bonus-page .team-details-table {
    margin-top: 10px;
    width: 100%;
    font-size: 14px;
    border-collapse: collapse;
}

.team-bonus-page .team-details-table th, .team-details-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.team-bonus-page .team-details-table th, .team-details-table td {
    background-color: #f2f2f2;
}

.team-bonus-page .team-details-table .no-points {
    font-size: 18px;
    color: #a0a0a0;
}

.team-bonus-page .team-details-table .no-points.cross {
    color: #cc0000;
}

.team-bonus-page .team-details-table .points-circle {
    display: inline-block;
    width: 25px;
    height: 25px;
    border-radius: 20%;
    background-color: #2fca2f; /* Vert */
    color: white;
    text-align: center;
    line-height: 24px;
    font-size: 14px;
    font-weight: bold;
}
@media (max-width: 550px) {
    .team-bonus-page .card-body{
        padding: 10px;
    }
    .team-bonus-page .card-body .team-box{
        margin-bottom: 7px;
        padding: 5px 10px 10px 10px;
    }
    .team-bonus-page .card-body .team-details-table{
        margin-top: 5px;
    }
    .team-bonus-page .team-details-table th, .team-details-table td{
        padding: 1px 8px;
    }
}

.team-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 300px;
    overflow-y: auto;
}

.team-item {
    padding: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    width: 100%;
}

.team-item:hover {
    background-color: #f0f0f0;
}

.scores-global-page .score-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 6px;
    -webkit-overflow-scrolling: touch; /* 👈 pour iOS */
}
.scores-global-page .score-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: max-content; /* 👈 ESSENTIEL pour que ça scroll sur iPhone 15 */
}
.scores-global-page .score-table th,
.scores-global-page .score-table td { font-size:0.74rem; padding:2px 4px; white-space:normal; border: 1px solid #dee2e6; }
.scores-global-page .sticky-col   { position:sticky; z-index:3; background:#fff; white-space:nowrap; }
.scores-global-page .match-col { left:0; min-width: 130px; max-width: 130px; }
.scores-global-page .score-col { left:130px; min-width: 55px; max-width: 65px; }
.scores-global-page .team-display { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.scores-global-page .team-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100px; }
.scores-global-page .points-text { font-size:0.65rem; color: white; display: block; }
.scores-global-page .table-header th { background: #004080 !important; color: white; height: 40px}
.scores-global-page .flag-icon { font-size: 14px; }

.scores-global-page .sticky-col {
    position: sticky;
    background: #fff;
    white-space: nowrap;
}

/* Match column : 1ère à gauche */
.scores-global-page .match-col {
    left: 0;
    z-index: 4;
    min-width: 150px;
}

/* Score column : 2e à gauche */
.scores-global-page .score-col {
    left: 150px; /* doit correspondre à la largeur de match-col */
    z-index: 3;
    min-width: 65px;
}
@media(max-width: 768px) {
    .scores-global-page .score-table th,
    .scores-global-page .score-table td { font-size: 0.65rem; padding: 1px 2px; }
    .scores-global-page .container-fluid { padding-left: 0.2rem; padding-right: 0.2rem; }
    .scores-global-page .team-cell { width: 80px; }
    .scores-global-page .match-col { min-width: 110px; max-width: 110px; }
    .scores-global-page .score-col { left: 110px; min-width: 35px; max-width: 55px; }
}
@media (min-width: 1000px) {
    .scores-global-page .match-col {
        min-width: 200px;
    }
    .scores-global-page .score-col {
        left: 200px; /* doit correspondre à la largeur de match-col */
        z-index: 3;
        min-width: 65px;
    }
}

.button-home a{
    height: 80px;
    font-size: 22px;
}
@media(max-width: 768px) {
    .button-home a{
        height: 50px;
        font-size: 18px;
    }
}

.button-home a i{
    margin-right: 10px;
}

.home-match-table td, .home-match-table th{
    padding:2px 4px;
    font-size:0.8rem;
    white-space:nowrap;
}
.home-match-table .score-total{
    display:inline-block;
    min-width:22px;
    border-radius:4px;
    font-size:0.75rem;
    line-height:1.2;
    padding:2px 4px;
}
.home-match-table .match-date{
    font-size:0.7rem;
    text-align:center;
}
.card-home-next-match .home-match-table .match-date{
    font-size:11px;
    margin-top: 5px;
}
.home-match-table .match-teams{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:2px;
}
.home-match-table .match-teams .flag-icon{
    font-size:1rem;
    margin:0 2px;
}
.home-match-table .team-name{
    font-size:0.75rem;
}
.card-home-next-match .home-match-table .team-name{
    font-size:15px;
    margin-bottom: 2px;
}
.card-home-previous-match .home-match-table .score-total{
    margin:5px 0;
    height: 36px;
    width: 50px;
}
.leaderboard-mini-table .flag-icon{
    font-size:1rem;
}
.leaderboard-mini-table td{
    padding:2px 4px;
    font-size:0.8rem;}

#progressChart, #groupProgressChart {
    height:400px;
}

@media (max-width: 576px){
    #progressChart, #groupProgressChart {height:300px;}
}

.chart-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #e9ecef;
    color: #1a3a6b;
    border: none;
    border-radius: 9px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.chart-ctrl-btn:hover:not(:disabled) {
    background-color: rgba(26,58,107,0.15);
}
.chart-ctrl-btn:disabled {
    color: #bbb;
    cursor: not-allowed;
}
.chart-ctrl-active {
    background-color: #1a3a6b;
    color: #fff;
}
.chart-ctrl-active:hover:not(:disabled) {
    background-color: #142d55 !important;
    color: #fff;
}

.profile-table td{
    font-size:0.9rem;
}

@media (max-width: 576px){
    .profile-table td{font-size:0.75rem;}
}

/* Custom group select */
.group-select-wrapper {
    max-width: 500px;
    width: 100%;
}
.group-select-wrapper .custom-select-container {
    position: relative;
    width: 100%;
}
.group-select-wrapper .custom-select-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ced4da;
    transition: border-color 0.2s;
}
.group-select-wrapper .custom-select-trigger:hover {
    border-color: #aaa;
}
.group-select-wrapper .custom-select-trigger .flag-icon {
    font-size: 1.2em;
    margin-right: 0;
}
.group-select-wrapper .custom-select-trigger .selected-text {
    flex: 1;
    color: #333;
}
.group-select-wrapper .custom-select-trigger i.fa-chevron-down {
    color: #666;
    transition: transform 0.2s;
}
.group-select-wrapper .custom-select-container.open .custom-select-trigger i.fa-chevron-down {
    transform: rotate(180deg);
}
.group-select-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.group-select-overlay.open {
    display: flex;
}
.group-select-overlay .custom-options {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.group-select-overlay .custom-options-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.group-select-overlay .custom-options-header span {
    color: #333;
    font-weight: 600;
    font-size: 1.1em;
}
.group-select-overlay .custom-options-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.group-select-overlay .custom-options-close:hover {
    color: #333;
}
.group-select-overlay .custom-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #333;
    border-bottom: 1px solid #eee;
}
.group-select-overlay .custom-option:last-child {
    border-bottom: none;
}
.group-select-overlay .custom-option:hover,
.group-select-overlay .custom-option:active {
    background-color: #f5f5f5;
}
.group-select-overlay .custom-option.selected {
    background-color: #e8f4fc;
}
.group-select-overlay .custom-option .flag-icon {
    font-size: 1.4em;
    margin-right: 0;
}
.group-select-overlay .custom-option span:last-child {
    font-size: 1.05em;
}

