/* FRONT-OFFICE */
.monclubtt-div{
    margin: 0;
    width: 100%;
    text-align: center;
}

.monclubtt-div table{
    width: 100%;
}
.monclubtt-div th.classement{
    width:80px;
}
.monclubtt-div th.equipe{
    width:100%;
}
.monclubtt-div th.joues{
    width:80px;
}
.monclubtt-div th.points{
    width:80px;
}
.monclubtt-div .center{
    text-align:center;
}

.monclubtt-div .left{
    text-align:left;
}

.monclubtt-div .right{
    text-align:right;
}
.monclubtt-div .equipe_club{
    font-weight: bolder;
    color:blue;
}

.monclubtt-div .MonClubTT_rencontres_table{
    margin:20px auto;
    width:100%;
    text-align: center;
}

.monclubtt-div .equipes{
    width:40%;
    word-wrap: normal;
}

.monclubtt-div .score{
    width:8%;
}

.monclubtt-div .center.tiret{
    width:4%;
}

/* ===== Design commun à tous les tableaux MonClubTT ===== */
.monclubtt-div .monclubtt-table {
    border-collapse: collapse;
    border-spacing: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
    border: none;
    margin-bottom: 28px;
}

.monclubtt-div .monclubtt-table thead tr {
    background-color: #2c3e50;
}

.monclubtt-div .monclubtt-table th {
    background-color: #2c3e50;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    padding: 11px 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
}

.monclubtt-div .monclubtt-table td {
    padding: 9px 14px;
    font-size: 13px;
    border-right: none;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
}

.monclubtt-div .monclubtt-table caption {
    background-color: #34495e;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    text-align: center;
    letter-spacing: 0.04em;
    caption-side: top;
    border: none;
}

.monclubtt-div .monclubtt-table tr.odd {
    background-color: #ffffff;
}

.monclubtt-div .monclubtt-table tr.even {
    background-color: #f7f9fb;
}

.monclubtt-div .monclubtt-table tbody tr:hover {
    background-color: #eaf3fb !important;
    transition: background-color 0.15s ease;
}

/* ===== Tableaux équipes ===== */

/* Équipe du club mise en évidence */
.monclubtt-div .monclubtt-table tr.equipe_club td {
    font-weight: 700;
    color: #1a5276 !important;
    background-color: #d6eaf8 !important;
}

/* Colonne scores et tiret */
.monclubtt-div .monclubtt-score {
    font-weight: 600;
    min-width: 28px;
}

.monclubtt-div .monclubtt-tiret {
    color: #bbb;
}

/* Titres de section équipe */
.monclubtt-div .monclubtt-equipe-titre {
    margin: 20px 0 4px;
    font-size: 16px;
}

.monclubtt-div .monclubtt-equipe-sous-titre {
    font-weight: normal;
    font-size: 14px;
    color: #666;
}

.monclubtt-div .monclubtt-section-titre {
    margin: 20px 0 6px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
}

/* ===== Joueurs — spécificités ===== */

/* Couleurs par sexe */
.monclubtt-div .listeJoueurs tr.F td {
    color: #c0392b;
}

.monclubtt-div .listeJoueurs tr.M td {
    color: #2980b9;
}

/* Nom du joueur */
.monclubtt-div .listeJoueurs .monclubtt-nom {
    font-weight: 600;
    text-align: left;
}

/* ===== Badges de progression ===== */
.monclubtt-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.monclubtt-badge--up {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.monclubtt-badge--down {
    background-color: #fdecea;
    color: #c62828;
}

.monclubtt-badge--neutral {
    background-color: #f0f0f0;
    color: #999;
}

/* ===== Feuilles de match ===== */

/* Ligne rencontre cliquable */
.monclubtt-div .monclubtt-expandable {
    cursor: pointer;
}

.monclubtt-div .monclubtt-expandable:hover td {
    background-color: #ddeeff !important;
}

/* Icône d'expansion */
.monclubtt-div .monclubtt-expand-icon {
    display: inline-block;
    margin-right: 5px;
    font-size: 9px;
    color: #999;
    transition: transform 0.15s ease;
    user-select: none;
}

/* Ligne de détail (cachée par défaut) */
.monclubtt-div .monclubtt-feuille-row {
    display: none;
}

.monclubtt-div .monclubtt-feuille-row > td {
    padding: 0;
    border-top: none;
}

/* Contenu de la feuille de match */
.monclubtt-div .monclubtt-feuille {
    padding: 14px 16px;
    background: #f9fbfd;
    border-top: 2px solid #2c3e50;
}

/* Score global */
.monclubtt-div .monclubtt-feuille-resultat {
    text-align: center;
    font-size: 14px;
    margin-bottom: 14px;
    padding: 8px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.monclubtt-div .monclubtt-feuille-equipe {
    font-size: 13px;
    color: #444;
}

.monclubtt-div .monclubtt-feuille-score {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 10px;
}

/* Titre de section interne */
.monclubtt-div .monclubtt-feuille-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #888;
    margin: 10px 0 4px;
    font-weight: 600;
}

/* Tables internes (composition + parties) — héritent de monclubtt-table */
.monclubtt-div .monclubtt-feuille-compo,
.monclubtt-div .monclubtt-feuille-parties {
    font-size: 12px;
    margin-bottom: 10px;
}

.monclubtt-div .monclubtt-feuille-compo th,
.monclubtt-div .monclubtt-feuille-parties th {
    font-size: 10px;
    padding: 7px 10px;
}

.monclubtt-div .monclubtt-feuille-compo td,
.monclubtt-div .monclubtt-feuille-parties td {
    font-size: 12px;
    padding: 6px 10px;
}

/* Joueur / équipe gagnant·e */
.monclubtt-div .monclubtt-winner {
    font-weight: 700;
    color: #1a5276;
}

/* Détail des sets */
.monclubtt-div .monclubtt-sets {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}

/* Indicateurs de chargement / erreur */
.monclubtt-div .monclubtt-feuille-loading,
.monclubtt-div .monclubtt-feuille-error {
    margin: 8px 0;
    font-size: 12px;
    font-style: italic;
    color: #888;
    padding: 6px 12px;
}

.monclubtt-div .monclubtt-feuille-error {
    color: #c0392b;
}

/* ===== Horodatage ===== */
.monclubtt-updated-at {
    font-size: 12px;
    color: #aaa;
    text-align: right;
    margin-bottom: 8px;
    font-style: italic;
}

span.rouge {
    color: red;
}
span.vert {
    color: green;
}
/* table sorter */
th.header {
    background-image: url(tablesorter/img/bg.gif); 
    background: no-repeat center right lightgray;
    cursor: pointer; 
}
th.headerSortDown { 
    background-image: url(tablesorter/img/desc.gif); 
} 

th.headerSortUp { 
    background-image: url(tablesorter/img/asc.gif); 
} 

/* Rotation de l'icône sync pendant le chargement */
@keyframes monclubtt-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

.button.is-loading .monclubtt-sync-icon {
    animation: monclubtt-spin 0.8s linear infinite;
}

/* Icône dans les boutons admin — hors portée de .wp-core-ui .button .dashicons */
.monclubtt-icon {
    font-family: dashicons;
    display: inline-block;
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
    font-style: normal;
    speak: never;
    -webkit-font-smoothing: antialiased;
    flex-shrink: 0;
}

/* ===== Top Progression ===== */

.monclubtt-top-prog {
    --dtp-navy:      #2b3a4f;
    --dtp-navy2:     #34465e;
    --dtp-blue:      #2b7cb5;
    --dtp-blue-dk:   #1f5e8b;
    --dtp-red:       #d34328;
    --dtp-green:     #2e9e54;
    --dtp-green-bg:  #dcefe1;
    --dtp-gold:      #f0b429;
    --dtp-silver:    #aeb9c4;
    --dtp-bronze:    #c8794a;
    margin-bottom: 36px;
}

/* --- En-tête + toggle --- */
.monclubtt-top-prog .tp-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 0 8px;
}

.monclubtt-top-prog .tp-h1 {
    margin: 0 !important;
    font-size: 26px !important;
    font-weight: 900 !important;
    color: var(--dtp-navy) !important;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.monclubtt-top-prog .tp-sub {
    margin: 4px 0 0;
    font-size: 14px;
    color: #8794a1;
    font-weight: 600;
}

.monclubtt-top-prog .tp-toggle {
    display: inline-flex;
    background: #dde3e9;
    border-radius: 999px;
    padding: 4px;
    gap: 3px;
    flex-shrink: 0;
}

.monclubtt-top-prog .tp-toggle button {
    appearance: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 13.5px;
    padding: 8px 16px;
    border-radius: 999px;
    color: #6c7884;
    background: transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.monclubtt-top-prog .tp-toggle button.tp-on {
    background: var(--dtp-navy);
    color: #fff;
    box-shadow: 0 4px 12px rgba(43, 58, 79, 0.28);
}

/* --- Carte podium --- */
.monclubtt-top-prog .tp-podium-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 50px -28px rgba(43, 58, 79, 0.4), 0 2px 0 rgba(0, 0, 0, 0.02);
    overflow: hidden;
    border: 1px solid #eef1f4;
}

.monclubtt-top-prog .tp-pc-band {
    height: 7px;
    width: 100%;
    background: linear-gradient(90deg, var(--dtp-blue), var(--dtp-navy));
}

.monclubtt-top-prog .tp-pc-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px 0;
}

.monclubtt-top-prog .tp-icn {
    width: 22px;
    height: 22px;
    color: var(--dtp-blue);
    flex-shrink: 0;
}

.monclubtt-top-prog .tp-pc-title h3 {
    margin: 0 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    color: var(--dtp-navy) !important;
}

.monclubtt-top-prog .tp-tag {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dtp-blue);
    background: #e8f1f8;
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

/* --- Scène du podium --- */
.monclubtt-top-prog .tp-stage-host {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 10px 0;
}

/* Wrapper scalable : contient le stage SVG + les plaques de noms */
.monclubtt-top-prog .tp-scalable {
    width: 720px;
    flex: none;
    transform-origin: top center;
}

.monclubtt-top-prog .tp-stage {
    position: relative;
    width: 720px;
    height: 498px;
}

/* Rangée de plaques en flux normal sous le podium */
.monclubtt-top-prog .tp-nameplates {
    display: flex;
    width: 720px;
    padding: 8px 48px 36px;
    gap: 12px;
    box-sizing: border-box;
}

.monclubtt-top-prog .tp-podium {
    position: absolute;
    inset: 0;
    width: 720px;
    height: 498px;
}

.monclubtt-top-prog .tp-watermark {
    position: absolute;
    left: 50%;
    top: 150px;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    opacity: 0.05;
    pointer-events: none;
}

/* --- Avatars (injectés par JS) --- */
.monclubtt-top-prog .tp-figure {
    position: absolute;
    width: 128px;
    transform: translateX(-50%);
    opacity: 1;
}

.monclubtt-top-prog .tp-figure svg {
    display: block;
    width: 128px;
    height: auto;
    filter: drop-shadow(0 8px 10px rgba(43, 58, 79, 0.18));
}

.monclubtt-top-prog .tp-figure--anim {
    animation: dtpRise 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes dtpRise {
    from { opacity: 0; transform: translateX(-50%) translateY(18px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- Médaille (injectée par JS comme <svg class="tp-medal">) --- */
.monclubtt-top-prog .tp-medal {
    position: absolute;
    width: 46px;
    height: 46px;
}

/* --- Plaque nom/progression (flex child dans tp-nameplates) --- */
.monclubtt-top-prog .tp-plate {
    flex: 0 0 200px;
    width: 200px;
    text-align: center;
}

.monclubtt-top-prog .tp-name {
    font-weight: 800;
    font-size: 15px;
    color: var(--dtp-navy);
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.monclubtt-top-prog .tp-name--f { color: var(--dtp-red); }
.monclubtt-top-prog .tp-name--m { color: var(--dtp-blue-dk); }

.monclubtt-top-prog .tp-first {
    font-size: 12.5px;
    color: #909aa6;
    margin-top: 2px;
}

.monclubtt-top-prog .tp-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-weight: 800;
    font-size: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--dtp-green-bg);
    color: var(--dtp-green);
}

.monclubtt-top-prog .tp-pill svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* --- Mobile : réduction de l'en-tête --- */
@media (max-width: 600px) {
    .monclubtt-top-prog .tp-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .monclubtt-top-prog .tp-toggle button {
        font-size: 12px;
        padding: 7px 12px;
    }
}

/* ADMIN */
.MonClubTT_nonoff{
    font-size: 15px;
}

.monclubtt-version{
    font-size: 10px;
    color:grey;
}

.monclubtt-right-box{
    float:right;
    padding: 10px;
    margin:77px 20px;
    width:20%;
    background:#fff;
    border:1px solid grey;
    border-radius: 5px;
}

.monclubtt_settings_form{
    border:1px solid grey;
    border-radius: 5px;
    background: #fff;
    padding:20px;
    width:70%;
}

.monclubtt_page_monclubtt_joueurs tr.F td{
    color: #e74c3c;
}

.monclubtt_page_monclubtt_joueurs tr.M td{
    color: #3498db;
}

/* Synchronisation */
.monclubtt-sync-section {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    max-width: 600px;
}

.monclubtt-sync-section p {
    margin-bottom: 15px;
}

.monclubtt-sync-section .spinner {
    visibility: visible;
}

#monclubtt-sync-message .notice {
    margin: 10px 0 0 0;
    padding: 10px;
}
