/* =========================================================
   RESET / BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #1f2937;
    background:
        radial-gradient(circle at top, rgba(202, 167, 92, 0.15), transparent 30%),
        #f4f6f8;
}

/* =========================================================
   LAYOUT GLOBAL
   ========================================================= */

.container {
    max-width: 560px;
    margin: auto;
}

.card {
    margin-top: 10px;
    padding: 14px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.hidden {
    display: none !important;
}

.centered {
    text-align: center;
}

.logo-container {
    text-align: center;
    margin-bottom: 10px;
}

.login-header {
    margin: -14px -14px 24px -14px;
    padding: 28px 20px 20px;
    background: #14284b;
    border-radius: 18px 18px 0 0;
    text-align: center;
}

.logo-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 10px 18px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    margin-bottom: 14px;
}

.app-logo {
    /*     display: block;
    max-width: 170px;
    height: auto;
    margin: 0 auto 14px; */
    width: 60%;
    max-width: 220px;
    height: auto;
}

.login-header .badge {
    display: inline-block;
}

.login-badge {
    display: inline-block;
    padding: 8px 16px;
    background: #efe2bf;
    color: #14284b;
    font-size: 14px;
    font-weight: bold;
    border-radius: 999px;
}

.login-card .subtitle {
    margin-top: 0;
}

/* =========================================================
   TEXTES / LIBELLÉS
   ========================================================= */


.subtitle {
    margin-top: 40px;
}

.subtitle,
.muted {
    font-size: 14px;
    line-height: 1.4;
    color: #6b7280;
}

.entete-title {
    position: absolute;
    top: 10px;
    left: 50%;
    z-index: 2;
    width: calc(100% - 40px);
    margin: 0;
    color: white;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    transform: translateX(-50%);
}

.big-title {
    display: block;
    margin: -14px -14px 10px -14px;
    padding: 16px 10px 36px;
    background: #14284b;
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    border-radius: 14px 14px 0 0;
}

.small-title {
    display: block;
    margin: -14px -14px 10px -14px;
    /* padding: 16px 10px 16px; */
    padding: 8px 10px;
    background: #14284b;
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    border-radius: 14px 14px 0 0;
}

/* =========================================================
   BADGES / PILLS
   ========================================================= */

.badge {
    position: absolute;
    top: 52px;
    left: 50%;
    z-index: 2;
    display: inline-block;
    padding: 6px 12px;
    background: #efe2bf;
    color: #14284b;
    font-size: 13px;
    font-weight: bold;
    border-radius: 999px;
    transform: translateX(-50%);
}

.pill {
    display: inline-block;
    margin-right: 6px;
    padding: 3px 8px;
    background: #eef2f7;
    color: #14284b;
    font-size: 11px;
    font-weight: bold;
    border-radius: 999px;
}

/* =========================================================
   FORMULAIRES
   ========================================================= */

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
}

input[readonly],
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    background: #f3f4f6;
    color: #6b7280;
}

.field {
    margin-bottom: 6px;
}

.field label {
    /*     display: block;
    margin-bottom: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em; */
    font-weight: 700;
    margin-bottom: 1px;
    color: #14284b;
}

/* Version plus compacte pour les zones toolbar / grilles */
.toolbar .field,
.top-grid .field,
.editor-grid .field {
    margin-bottom: 2px;
}

/* =========================================================
   CHAMP MOT DE PASSE
   ========================================================= */

.password-field {
    position: relative;
}

.password-field input {
    padding: 14px 50px 14px 14px;
}

.toggle-eye {
    position: absolute;
    top: 50%;
    right: 12px;
    border: none;
    background: transparent;
    color: #1e40af;
    cursor: pointer;
    transform: translateY(-50%);
}

.material-icons {
    font-size: 22px;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* =========================================================
   BOUTONS
   ========================================================= */

.primary {
    width: 100%;
    padding: 14px;
    background: #14284b;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(20, 40, 75, 0.25);
}

.secondary {
    padding: 10px;
    background: #14284b;
    color: white;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.danger {
    padding: 12px;
    background: #FF4D00;
    color: white;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.small-btn {
    padding: 4px 10px !important;
    min-height: 36px !important;
    height: 36px !important;
    line-height: 1.1 !important;
    font-size: 13px !important;
}

/* =========================================================
   BLOCS DE MISE EN PAGE
   ========================================================= */

.buttons-1 {
    display: grid;
    margin-top: 10px;
}

.buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 4px;
}

.top-grid {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.toolbar {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.table-like {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.editor-grid {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

/* Ajustement des boutons dans certaines zones */
.toolbar .buttons,
.editor-grid .buttons,
.top-grid .buttons {
    margin-top: 2px;
}

/* =========================================================
   CARTES / BLOCS INTERFACES
   ========================================================= */

.box-card {
    overflow: hidden;
    padding: 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: none;
}

.menu-card {
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.menu-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 40, 75, 0.08);
}

.menu-title {
    margin: 0 0 8px;
    color: #14284b;
    font-size: 18px;
    font-weight: bold;
}

/* =========================================================
   CARTES SPÉCIALES : LOGIN / HOME
   ========================================================= */

.login-card {
    position: relative;
    overflow: hidden;
    padding-top: 0;
}

.login-card::before {
    display: none;
}

.eval-home-card {
    position: relative;
    overflow: hidden;
    padding-top: 70px;
}

.eval-home-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
    height: 100px;
    background: #14284b;
}

/* Remonte le contenu au-dessus du bandeau bleu */
.eval-home-card .centered,
.eval-home-card .top-grid,
.eval-home-card .buttons-1,
.eval-home-card .buttons,
.eval-home-card #homeStatutBox,
.eval-home-card #joueursStatutBox,
.eval-home-card .box-card,
.eval-home-card .summary-grid {
    position: relative;
    z-index: 1;
}

/* =========================================================
   RÉSUMÉ DASHBOARD
   ========================================================= */

.summary-item {
    padding: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.summary-label {
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-value {
    color: #14284b;
    font-size: 18px;
    font-weight: bold;
}

.summary-label.admin {
    color: #1e90ff;
    /* bleu */
    font-weight: 600;
}

.summary-label.coach {
    color: #2c3e50;
}

.summary-label.joueur {
    color: #7f8c8d;
}

/* =========================================================
   LISTES
   ========================================================= */

.list-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.list-row.secondary {
    margin-left: auto;
}

.list-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 3px;
}

.list-main.secondary {
    margin-left: auto;
}

.list-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.list-name {
    color: #14284b;
    font-size: 15px;
    font-weight: 600;
}

/* 🔵 Admin actif = bleu */
.list-name.admin-active {
    color: #1e90ff;
}

.list-name.inactive {
    color: #FF4D00;
}

.list-row.danger {
    margin-left: auto;
}

.player-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
    color: #6b7280;
    font-size: 13px;
}

.player-email {
    color: #666;
    font-size: 13px;
}

/* =========================================================
   MESSAGES DE STATUT
   ========================================================= */

.statut {
    display: none;
    margin-top: 12px;
    padding: 12px;
    font-size: 14px;
    border-radius: 12px;
}

.statut.show {
    display: block;
}

.statut.err {
    background: #fef2f2;
    color: #b91c1c;
}

.statut.ok {
    background: #ecfdf5;
    color: #166534;
}

.statut.info {
    background: #eff6ff;
    color: #1d4ed8;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 640px) {
    .container {
        padding: 0 10px 24px;
    }

    .summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .list-row {
        grid-template-columns: 1fr;
    }

    .buttons {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   POPUP
   ========================================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 640px;
    background: #f7f7f7;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   READONLY
   ========================================================= */
.readonly-list {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 10px 14px;
    background: #f3f4f6;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.readonly-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 12px;
    padding: 2px 0;
}

.readonly-name {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    color: #374151;
}

.readonly-role {
    text-align: left;
    color: #6b7280;
}

.readonly-name {
    text-align: left;
}

#playerSelect {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    color: #14284b;
}

/* =========================================================
   ETAPES/STEPS de l'EVALUATION
   ========================================================= */
#stepCard {
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    background: white;
    border-radius: 18px;
}

#stepCard::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 110px;
    background: #14284b;
}

#stepCard .step-title {
    position: absolute;
    top: 55px;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    text-align: center;
    margin: 0;
    z-index: 2;
    width: calc(100% - 40px);
    line-height: 1.2;
}

#stepCard .step-badge {
    position: relative;
    display: block;
    width: fit-content;
    margin: 0 auto 10px auto;
    z-index: 1;
}

#stepCard .muted {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
    z-index: 1;
}

.step-badge {
    display: inline-block;
    background: #efe2bf;
    color: #14284b;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 8px;
}

.team-badge {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.team-badge.brouillon {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: #efe2bf;
    color: #14284b;
}

.team-badge.soumis {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: #f59e0b;
    color: white;
}

.team-badge.valide {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: #16a34a;
    color: white;
}

@media (max-width: 600px) {
    .container {
        max-width: 100%;
    }

    .card {
        border-radius: 0;
        box-shadow: none;
        margin-top: 0;
    }

    .buttons,
    .buttons-3,
    .team-top-grid,
    .team-summary-grid {
        grid-template-columns: 1fr;
    }

    .chart-wrap {
        height: 260px;
    }

    .team-table,
    .team-row {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .team-table-head>div,
    .team-row>div {
        padding: 10px 8px;
        font-size: 13px;
    }

    #stepCard.step-title {
        width: calc(100% - 24px);
        font-size: 26px;
    }
}

.team-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.team-summary-card .summary-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.team-summary-card .summary-value {
    font-size: 22px;
    font-weight: bold;
    color: #14284b;
}

.score-text {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    margin: 0;
    text-align: left;
}

.score-side {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.criterion {
    margin-bottom: 1px;
}

.criterion-main {
    min-width: 0;
}

/* =========================
   ECRAN EVALUATION
   ========================= */

#stepCard {
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    background: white;
    border-radius: 18px;
}

#stepCard::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 110px;
    background: #14284b;
}

#stepCard .muted {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
    z-index: 1;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 2px;
}

.label {
    font-weight: 700;
    margin-bottom: 1px;
    color: #14284b;
    font-size: 18px;
}

.helper {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.15;
}

.score-text {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    margin: 0;
    text-align: left;
}


.range-wrap {
    position: relative;
    margin-top: 6px;
    margin-bottom: 0;
    padding-bottom: 16px;
}



.reference-marker {
    position: absolute;
    top: 24px;
    transform: translateX(-50%);
    pointer-events: none;
    text-align: center;
}

.reference-triangle {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #1b3155;
    margin: auto;
}

.reference-value {
    font-size: 11px;
    font-weight: 700;
    color: #1b3155;
    margin-top: 2px;
    line-height: 1;
}

input[type="range"]:disabled {
    opacity: 1;
}

/* =========================
   MANQUANTS DE stylesOld
   ========================= */

/* Hover plus sombre bouton principal */
.primary:hover {
    background: #0d1c34;
}

/* Bouton success (absent du nouveau) */
.success {
    background: #166534;
    color: white;
    border: none;
    border-radius: 14px;
    padding: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 3px;
}

/* Grid 3 boutons (absent) */
.buttons-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

/* Logo home (absent) */
.eval-home-card .home-logo {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    z-index: 2;
}

/* Valeur mise en avant (absent) */
.big-value {
    font-weight: 700;
    margin-bottom: 4px;
    color: #14284b;
}

/* Graph hauteur (absent) */
.chart-wrap {
    height: 320px;
}

/* Modal overlay version ancienne (différente) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 999;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}

.modal-title {
    margin: 0 0 8px;
    font-size: 22px;
    color: #14284b;
    text-align: center;
}

.modal-text {
    margin: 0 0 16px;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

/* Table équipe (absente du nouveau) */
.team-table-wrapper {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.team-table,
.team-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

.team-table-head {
    background: #eef2f7;
    color: #14284b;
    font-weight: bold;
    border-bottom: 1px solid #e5e7eb;
}

.team-table-head>div,
.team-row>div {
    padding: 12px 10px;
    font-size: 14px;
    word-break: break-word;
}

.team-row {
    border-bottom: 1px solid #edf1f7;
}

.team-row:last-child {
    border-bottom: none;
}

.team-row:nth-child(even) {
    background: #fafcff;
}

/* Status pills (absent) */
.status-pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.status-brouillon {
    background: #fef3c7;
    color: #92400e;
}

.status-soumis {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-valide {
    background: #dcfce7;
    color: #166534;
}

.status-none {
    background: #f3f4f6;
    color: #6b7280;
}

/* Team header (absent) */
.team-header-info {
    margin-top: 8px;
}

.team-top-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Version readonly coach (absent) */
.readonly-coach-list {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 10px 14px;
    background: #f3f4f6;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.readonly-coach-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 12px;
    padding: 2px 0;
}

.readonly-coach-role,
.readonly-coach-name {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    color: #374151;
}

.readonly-coach-role {
    text-align: left;
    color: #6b7280;
}

/* Boutons flottants (absent) */
.action-card {
    position: relative;
    padding-bottom: 140px;
}

.floatingButton {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 3px;
}

.floatingButton button {
    width: 100%;
}

/* Navigation étapes (absent) */
.step-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.step-nav .nav-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    font-weight: 700;
}

/* Danger hover (manquant) */
.danger:hover {
    background: #FF4D00;
}

.score-badge {
    background: #eef2f7;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 13px;
    color: #14284b;
    display: inline-block;
    position: static;
    transform: none;
}

.filters-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    align-items: start;
}

.filters-row .field {
    display: flex;
    flex-direction: column;
}

.filters-row .field label {
    margin-bottom: 6px;
}

.fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.fields-row .field {
    display: flex;
    flex-direction: column;
}

.field select,
.field input {
    width: 100%;
    box-sizing: border-box;
}

.ligne-joueur {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.joueur-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.joueur-checkbox {
    width: 18px;
    height: 18px;
}

#joueursScreen .field button {
    width: 100%;
    height: 54px;
    /* même hauteur que les inputs */

    .fields-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        width: 100%;
    }

    .fields-row .field {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .fields-row .field select,
    .fields-row .field input,
    .fields-row .field button {
        width: 100%;
        box-sizing: border-box;
    }

    .fields-row .field button {
        margin-bottom: 14px;
    }
}

.select-all-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding-left: 12px;
    width: auto;
}

.select-all-row label {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #14284b;
    cursor: pointer;
}

.joueur-checkbox {
    width: 22px;
    height: 22px;
    margin: 0;
    flex: 0 0 22px;
    accent-color: #14284b;
    cursor: pointer;
}