﻿/* ============================================================
   Thème Arcadia — recréé depuis la maquette « Redesign Arcadia »
   (le design system original n'étant pas distribué avec le fichier)
   ============================================================ */

:root {
    /* marque & actions */
    --tp-info-500: #298b90;
    --tp-info-600: #1d6f7b;
    --red-arcadia: #e53118;
    --red-arcadia-bg: #ffeceb;
    --blue-arcadia: #3366ff;
    --blue-arcadia-bg: #eaf0ff;
    --orange-arcadia: #f9a507;
    --warning-600: #b76300;
    --warning-bg: #fff6e0;
    --success-500: #00b968;
    --success-600: #008f4e;
    --success-bg: #e6f9ef;
    /* gris (palette Eva) */
    --basic-100: #ffffff;
    --basic-200: #f7f9fc;
    --basic-300: #edf1f7;
    --basic-400: #e4e9f2;
    --basic-500: #c5cee0;
    --basic-600: #8f9bb3;
    --basic-700: #2e3a59;
    --basic-800: #222b45;
    --layout-bg: #ecebe7;
}

html, body {
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    background: var(--layout-bg);
    color: var(--basic-800);
    font-size: 16px;
}

a { color: var(--tp-info-500); text-decoration: none; }
a:hover { color: var(--tp-info-600); }
h1:focus { outline: none; }

.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.muted { color: var(--basic-600); }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }

/* ---------- Shell : toolbar ---------- */
.tp-toolbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid var(--basic-300);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.tp-tb-start { display: flex; align-items: center; gap: 0.625rem; min-width: 0; }
.sidebar-toggle {
    border: none; background: none; padding: 0.375rem 0.5rem; cursor: pointer;
    color: #666769; font-size: 1rem; border-radius: 5px;
}
.sidebar-toggle:hover { background: var(--basic-200); }
.tb-logo-text { font-weight: 800; font-size: 1.0625rem; color: var(--tp-info-500); white-space: nowrap; }
.module-tag {
    font-size: 0.6875rem; font-weight: 700; padding: 2px 8px; border-radius: 4px;
    background: var(--basic-200); border: 1px solid var(--basic-400); color: var(--basic-700);
}
.tp-tb-end { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.userHeader { display: flex; flex-direction: column; line-height: 1.25; text-align: right; }
.userHeader .name { font-size: 0.8125rem; font-weight: 700; color: var(--basic-800); }
.userHeader .welcome { font-size: 0.6875rem; color: var(--basic-600); }
.tb-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--tp-info-500);
    color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.75rem;
    flex: none;
}
.tb-icon-btn {
    border: none; background: none; cursor: pointer; color: var(--basic-600);
    width: 34px; height: 34px; border-radius: 5px; font-size: 0.9375rem;
}
.tb-icon-btn:hover { background: var(--basic-200); color: var(--red-arcadia); }

/* ---------- Shell : body + drawer ---------- */
.app-body { display: flex; min-height: calc(100vh - 56px); }
.tp-drawer {
    width: 232px; flex: none; background: #fff; border-right: 1px solid var(--basic-300);
    display: flex; flex-direction: column; padding: 0.625rem 0;
}
.tp-panelmenu { list-style: none; margin: 0; padding: 0 0.5rem; flex: 1; }
.pm-group-label {
    font-size: 0.6563rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
    color: var(--basic-600); padding: 0.875rem 0.75rem 0.375rem;
}
.pm-header {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.5625rem 0.75rem; margin: 1px 0; border-radius: 6px;
    font-size: 0.8125rem; font-weight: 600; color: var(--basic-700);
    border-left: 3px solid transparent; cursor: pointer;
}
.pm-header:hover { background: var(--basic-200); color: var(--basic-800); }
.pm-header.active {
    background: var(--red-arcadia-bg); color: var(--red-arcadia);
    border-left-color: var(--red-arcadia);
}
.pm-icon { width: 17px; text-align: center; font-size: 0.8125rem; }
.pm-badge {
    margin-left: auto; font-size: 0.625rem; font-weight: 700; padding: 1px 6px;
    border-radius: 8px; background: var(--basic-200); border: 1px solid var(--basic-400);
    color: var(--basic-700);
}
.tp-drawer-footer {
    padding: 0.75rem 1.25rem; border-top: 1px solid var(--basic-300);
    font-size: 0.6875rem; color: var(--basic-600);
}
.tp-drawer-footer .version { font-weight: 700; }
.app-main { flex: 1; min-width: 0; padding: 1rem 1.5rem 2.5rem; }

/* ---------- Titre de page ---------- */
.page-title-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; margin: 0.25rem 0 1rem; flex-wrap: wrap;
}
.page-title-row h1 { font-size: 1.375rem; font-weight: 800; margin: 0; color: var(--basic-800); }
.page-sub { font-size: 0.8125rem; color: var(--basic-600); margin-top: 2px; }

/* ---------- Cartes ---------- */
.page-card {
    background: #fff; border: 1px solid var(--basic-300); border-radius: 8px;
    box-shadow: 0 1px 3px rgba(25, 42, 70, 0.06); overflow: hidden; position: relative;
}
.page-card.warn-border { border-color: rgba(249, 165, 7, 0.45); }
.pc-header {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--basic-300);
}
.pc-title { font-size: 0.9375rem; font-weight: 700; color: var(--basic-800); }
.pc-sub { font-size: 0.75rem; color: var(--basic-600); }
.pc-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }

/* équipe : pastille lettre */
.team-square {
    width: 34px; height: 34px; border-radius: 6px; background: var(--tp-info-500); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 0.9375rem; flex: none;
}
.team-square.dames { background: var(--blue-arcadia); }

/* bandeau infos match */
.match-strip {
    display: flex; gap: 1rem; padding: 0.625rem 1.25rem; background: var(--basic-200);
    border-bottom: 1px solid var(--basic-300); font-size: 0.75rem; color: var(--basic-700);
    align-items: center;
}
.match-strip .ms-item { display: inline-flex; align-items: center; gap: 5px; }
.match-strip .ms-item i { color: var(--basic-600); }
.match-strip .ms-right { margin-left: auto; }

/* ligne joueur dans une carte */
.player-row {
    display: flex; align-items: center; gap: 0.625rem; padding: 0.4375rem 1.25rem;
    font-size: 0.8125rem;
}
.player-row .p-indice { color: var(--basic-600); width: 22px; text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; flex: none; }
.player-row .p-name { font-weight: 600; flex: 1; min-width: 0; }
.player-row.walkover { opacity: 0.75; }
.player-row.walkover .p-name { color: var(--basic-600); text-decoration: line-through; }

.card-footer-arc {
    padding: 0.625rem 1.25rem; border-top: 1px solid var(--basic-300);
    display: flex; justify-content: space-between; align-items: center;
}
.card-footer-arc a { font-size: 0.75rem; font-weight: 600; }
.progress-mini { width: 90px; height: 5px; border-radius: 3px; background: var(--basic-300); overflow: hidden; }
.progress-mini > div { height: 100%; background: var(--orange-arcadia); }
.progress-mini > div.done { background: var(--success-500); }

.section-label {
    font-size: 0.75rem; font-weight: 700; color: var(--basic-600);
    text-transform: uppercase; letter-spacing: 0.6px; margin: 0 0 0.625rem;
}
.cards-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem;
}

/* ---------- Chips ---------- */
.chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.6875rem; font-weight: 700; padding: 2px 8px; border-radius: 4px;
    background: var(--basic-200); border: 1px solid var(--basic-400); color: var(--basic-700);
    white-space: nowrap;
}
.chip i { font-size: 0.5625rem; }
.chip.success { background: var(--success-bg); border-color: rgba(0, 185, 104, 0.3); color: var(--success-600); }
.chip.warning { background: var(--warning-bg); border-color: rgba(249, 165, 7, 0.4); color: var(--warning-600); }
.chip.danger { background: var(--red-arcadia-bg); border-color: rgba(229, 49, 24, 0.35); color: var(--red-arcadia); }
.chip.info { background: #e7f4f5; border-color: rgba(41, 139, 144, 0.35); color: var(--tp-info-600); }
.chip.blue { background: var(--blue-arcadia-bg); border-color: rgba(51, 102, 255, 0.3); color: var(--blue-arcadia); }
.chip.neutral { }

/* ---------- Boutons ---------- */
.btn-arc {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: inherit; font-size: 0.8125rem; font-weight: 700;
    padding: 0.5rem 0.875rem; border-radius: 6px; cursor: pointer;
    background: #fff; border: 1px solid var(--basic-400); color: var(--basic-800);
}
.btn-arc:hover { background: var(--basic-200); }
.btn-arc:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-arc.primary { background: var(--tp-info-500); border-color: var(--tp-info-500); color: #fff; }
.btn-arc.primary:hover { background: var(--tp-info-600); border-color: var(--tp-info-600); }
.btn-arc.danger { background: var(--red-arcadia); border-color: var(--red-arcadia); color: #fff; }
.btn-arc.danger:hover { filter: brightness(0.9); }
.btn-arc.ghost-teal { color: var(--tp-info-600); }
.btn-arc.compact { font-size: 0.75rem; padding: 0.3125rem 0.625rem; }

/* Rencontre déplacée (arrangement entre clubs) : signal fort pour que personne ne se trompe d'horaire. */
.chip.deplace { background: var(--red-arcadia); border-color: var(--red-arcadia); color: #fff; font-weight: 800; animation: deplace-pulse 1.6s ease-in-out infinite; }
.chip.deplace i { color: #fff; }
@keyframes deplace-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(229, 49, 24, 0.45); } 50% { box-shadow: 0 0 0 5px rgba(229, 49, 24, 0); } }
.match-strip .ms-deplace { color: var(--red-arcadia); font-weight: 800; }
.match-strip .ms-deplace i { color: var(--red-arcadia); }

.action-btn {
    display: inline-grid; place-items: center; width: 28px; height: 28px;
    border: 1px solid var(--basic-400); border-radius: 5px; background: #fff;
    color: var(--basic-700); cursor: pointer; font-size: 0.75rem; font-family: inherit;
}
.action-btn:hover { background: var(--basic-200); }
.action-btn.danger { color: var(--red-arcadia); }
.action-btn.danger:hover { background: var(--red-arcadia-bg); border-color: rgba(229, 49, 24, 0.4); }
.action-btn.view { color: var(--tp-info-600); }
.action-btn.wo {
    font-size: 0.625rem; font-weight: 700;
    width: auto; min-width: 36px; padding: 0 7px; white-space: nowrap;
}
.action-btn.wo.on { background: var(--warning-bg); border-color: rgba(249, 165, 7, 0.5); color: var(--warning-600); }

.fab-add {
    position: absolute; top: 0.75rem; right: 1rem; z-index: 5;
    width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--tp-info-500); color: #fff; font-size: 0.9375rem;
    box-shadow: 0 2px 8px rgba(41, 139, 144, 0.4);
    display: grid; place-items: center;
}
.fab-add:hover { background: var(--tp-info-600); }

/* sélecteur de semaine (stepper) */
.week-stepper {
    display: flex; align-items: stretch; border: 1px solid var(--basic-400);
    border-radius: 6px; background: #fff; overflow: hidden;
}
.week-stepper button {
    border: none; background: #fff; cursor: pointer; padding: 0.375rem 0.625rem;
    color: var(--basic-700); font-size: 0.75rem;
}
.week-stepper button:hover:not(:disabled) { background: var(--basic-200); }
.week-stepper button:disabled { color: var(--basic-500); cursor: default; }
.week-stepper .ws-label {
    padding: 3px 0.875rem 4px; font-size: 0.8125rem; font-weight: 700;
    border-left: 1px solid var(--basic-300); border-right: 1px solid var(--basic-300);
    display: flex; flex-direction: column; line-height: 1.25; justify-content: center;
    min-width: 108px; text-align: center;
}
.week-stepper .ws-label .ws-sub { font-weight: 400; color: var(--basic-600); font-size: 0.6875rem; }
.week-stepper .ws-select {
    border: none; border-left: 1px solid var(--basic-300); border-right: 1px solid var(--basic-300);
    border-radius: 0; background: #fff; font-family: inherit; font-size: 0.8125rem; font-weight: 700;
    color: var(--basic-800); padding: 0.375rem 0.625rem; cursor: pointer; min-width: 165px;
}
.week-stepper .ws-select:focus { outline: none; background: var(--basic-200); }

/* ---------- Alertes ---------- */
.alert-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.alert-list li {
    display: flex; gap: 0.625rem; align-items: flex-start;
    padding: 0.625rem 0.875rem; border-radius: 6px; font-size: 0.8125rem;
    border: 1px solid var(--basic-400); background: #fff;
}
.alert-list li > i { margin-top: 2px; font-size: 0.8125rem; }
.alert-list .al-t { font-weight: 700; }
.alert-list .al-s { font-size: 0.75rem; color: var(--basic-600); margin-top: 1px; }
.alert-list .al-details { margin: 0.25rem 0 0; padding-left: 1.125rem; display: flex; flex-direction: column; gap: 0.125rem; }
.alert-list .al-details li { display: list-item; list-style: disc; padding: 0; border: none; background: none; font-size: 0.78125rem; }
.alert-list .alert-warning { background: var(--warning-bg); border-color: rgba(249, 165, 7, 0.4); }
.alert-list .alert-warning > i { color: var(--orange-arcadia); }
.alert-list .alert-danger { background: var(--red-arcadia-bg); border-color: rgba(229, 49, 24, 0.35); }
.alert-list .alert-danger > i { color: var(--red-arcadia); }
.alert-list .alert-success { background: var(--success-bg); border-color: rgba(0, 185, 104, 0.3); }
.alert-list .alert-success > i { color: var(--success-600); }
.alert-list .alert-info { background: #e7f4f5; border-color: rgba(41, 139, 144, 0.35); }
.alert-list .alert-info > i { color: var(--tp-info-600); }

/* ---------- Table dense ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.tbl th {
    text-align: left; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--basic-600); padding: 0.5625rem 0.75rem;
    border-bottom: 1px solid var(--basic-300); background: var(--basic-200);
    white-space: nowrap;
}
.tbl td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--basic-300); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--basic-200); }
.tbl .num { text-align: right; }
.tbl .td-actions { text-align: right; white-space: nowrap; }
.tbl .td-actions .action-btn { margin-left: 4px; }
.tbl .check-cell i { color: var(--success-500); }
.tbl .check-cell.off i { color: var(--basic-500); }
.tbl tr.row-todo { background: #fffdf2; }
.tbl tr.row-todo:hover { background: #fdf9e4; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 1rem; }
.tab {
    font-size: 0.8125rem; font-weight: 600; color: var(--basic-600);
    padding: 0.25rem 0; cursor: pointer; border-bottom: 2px solid transparent;
    background: none; border-top: none; border-left: none; border-right: none; font-family: inherit;
}
.tab:hover { color: var(--basic-800); }
.tab.active { color: var(--tp-info-600); border-bottom-color: var(--tp-info-500); font-weight: 700; }
.tab-count {
    font-size: 0.625rem; font-weight: 700; padding: 1px 6px; border-radius: 8px;
    background: var(--basic-200); border: 1px solid var(--basic-400); color: var(--basic-700);
}

/* ---------- Formulaires ---------- */
.form-field label {
    display: block; font-size: 0.75rem; font-weight: 700; color: var(--basic-700);
    margin-bottom: 4px;
}
.form-field label .req { color: var(--red-arcadia); }
.input-like, .form-field input, .form-field select {
    width: 100%; font-family: inherit; font-size: 0.8125rem; color: var(--basic-800);
    padding: 0.5rem 0.625rem; border: 1px solid var(--basic-400); border-radius: 6px;
    background: #fff; min-height: 36px; box-sizing: border-box;
}
.input-like:focus, .form-field input:focus, .form-field select:focus {
    outline: none; border-color: var(--tp-info-500); box-shadow: 0 0 0 2px rgba(41, 139, 144, 0.15);
}
/* Case à cocher compacte dans un formulaire (le libellé est le label). */
.check-inline { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.75rem; font-weight: 600; color: var(--basic-700); cursor: pointer; }
.check-inline input { width: auto; min-height: 0; height: auto; padding: 0; margin: 0; accent-color: var(--tp-info-500); }
.form-field > .check-inline:first-child { margin-top: 0; }
.input-like.compact { min-height: 30px; padding: 0.25rem 0.5rem; }
.input-like.dashed {
    border-style: dashed; border-color: var(--basic-500); background: var(--basic-200);
    cursor: pointer; font-weight: 600;
}
.field-error { display: block; font-size: 0.75rem; color: var(--red-arcadia); margin-top: 4px; }
.global-search {
    display: flex; align-items: center; gap: 8px; background: var(--basic-200);
    border: 1px solid var(--basic-400); border-radius: 6px; padding: 0 0.625rem; height: 34px;
}
.global-search i { color: var(--basic-600); font-size: 0.75rem; }
.global-search input {
    border: none; background: none; outline: none; font-family: inherit;
    font-size: 0.8125rem; flex: 1; min-width: 0; color: var(--basic-800);
}

/* ---------- Absences : segments ---------- */
.semaine-header {
    padding: 0.5rem 1.25rem; background: var(--basic-200);
    border-top: 1px solid var(--basic-300); border-bottom: 1px solid var(--basic-300);
    font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--basic-600);
}
.semaine-header:first-child { border-top: none; }
.absence-row {
    display: grid; grid-template-columns: 240px 1fr auto; gap: 1rem; align-items: center;
    padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--basic-300);
}
.absence-row:last-child { border-bottom: none; }
.ar-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.absence-row.locked { background: var(--basic-200); }
.absence-row.locked .seg-group { opacity: 0.55; }
.absence-row .ar-date { font-weight: 700; font-size: 0.875rem; }
.absence-row .ar-sub { font-size: 0.6875rem; color: var(--basic-600); }
.absence-row .ar-sub.warn { color: var(--warning-600); font-weight: 600; }
.seg-group { display: flex; gap: 0.5rem; }
.absence-row .ar-remarque {
    grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 0.5rem;
    color: var(--basic-600); font-size: 0.75rem;
}
.absence-row .ar-remarque i { margin-top: 0.5rem; }
.absence-row .ar-remarque textarea { flex: 1; resize: vertical; font-family: inherit; font-size: 0.75rem; line-height: 1.35; }
.remarque-joueur {
    margin-top: 0.375rem; display: flex; gap: 0.375rem; align-items: flex-start;
    font-size: 0.75rem; color: var(--basic-700); font-style: italic; white-space: pre-line;
}
.remarque-joueur i { margin-top: 2px; color: var(--basic-600); }
.seg {
    flex: 1; max-width: 170px; padding: 7px 4px; border-radius: 5px; text-align: center;
    border: 1px solid var(--basic-400); background: #fff; font-family: inherit;
    font-size: 0.75rem; font-weight: 600; color: var(--basic-800); cursor: pointer;
}
.seg:hover:not(:disabled) { background: var(--basic-200); }
.seg:disabled { cursor: not-allowed; }
.seg.absent {
    border-color: var(--red-arcadia); background: var(--red-arcadia-bg);
    color: var(--red-arcadia); font-weight: 700;
}
.seg.absent:hover:not(:disabled) { background: #ffdedb; }
.periodes-note {
    padding: 0.625rem 1.25rem; border-top: 1px dashed var(--basic-300);
    font-size: 0.75rem; color: var(--basic-600);
}

/* ---------- Service bar ---------- */
.sb-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border: 1px solid var(--basic-400); border-radius: 6px;
    background: #fff; font-size: 0.75rem; font-weight: 700;
}
.sb-pill .nm {
    background: var(--success-bg); color: var(--success-600);
    padding: 1px 8px; border-radius: 4px;
}
.sb-pill.me { background: #ffeeba; border-color: rgba(249, 165, 7, 0.6); }
.sb-pill.me .nm { background: transparent; color: var(--warning-600); }
.sb-free {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border: 1.5px dashed var(--basic-500); border-radius: 6px;
    background: var(--basic-200); font-family: inherit; font-size: 0.75rem; font-weight: 700;
    color: var(--tp-info-600); cursor: pointer;
}
.sb-free:hover { background: #e7f4f5; border-color: var(--tp-info-500); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--layout-bg); padding: 1rem; }
.login-card { width: 380px; max-width: 100%; }
.login-logo {
    width: 52px; height: 52px; border-radius: 12px; background: var(--tp-info-500); color: #fff;
    display: grid; place-items: center; font-size: 1.375rem; margin: 0 auto 0.875rem;
}

/* ---------- Feuille de match imprimable ---------- */
.fdm-page { max-width: 760px; margin: 1.5rem auto; padding: 0 1rem; font-size: 0.875rem; color: #111; }
.fdm-toolbar { display: flex; gap: 0.75rem; margin-bottom: 1rem; }

.fdm-sheet { border: 2px solid #111; background: #fff; }
.fdm-sheet + .fdm-sheet { margin-top: 1.5rem; }
.fdm-header {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 0.75rem 1rem; border-bottom: 2px solid #111;
}
.fdm-club { font-size: 1.0625rem; font-weight: 800; }
.fdm-club small { display: block; font-size: 0.75rem; font-weight: 400; color: #444; }
.fdm-numero { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1rem; font-weight: 700; text-align: right; }
.fdm-numero small { display: block; font-family: inherit; font-size: 0.6875rem; font-weight: 400; color: #444; }

.fdm-infos { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 2px solid #111; }
.fdm-infos > div { padding: 0.5rem 0.75rem; border-right: 1px solid #999; }
.fdm-infos > div:last-child { border-right: none; }
.fdm-lbl { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.5px; color: #555; }
.fdm-val { font-weight: 700; margin-top: 1px; }
.fdm-val.fdm-deplace { color: #c62828; text-decoration: underline; }
.fdm-deplace-note { display: flex; align-items: center; gap: 8px; padding: 0.375rem 0.75rem; border-bottom: 2px solid #111; background: #fdecea; color: #c62828; font-weight: 700; font-size: 0.8125rem; }

.fdm-vs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 2px solid #111; }
.fdm-vs > div { padding: 0.5rem 0.75rem; }
.fdm-vs > div:first-child { border-right: 1px solid #999; }

.fdm-table { width: 100%; border-collapse: collapse; }
.fdm-table th, .fdm-table td { border: 1px solid #999; padding: 0.4375rem 0.625rem; text-align: left; }
.fdm-table th { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.5px; background: #f0f0f0; }
.fdm-table td.center, .fdm-table th.center { text-align: center; }
.fdm-table .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.fdm-table td.blank { height: 2rem; }
.fdm-table tr.wo td { color: #777; }
.fdm-table tr.wo .fdm-nom { text-decoration: line-through; }

.fdm-note { margin-top: 0.75rem; font-size: 0.6875rem; color: #555; }

@page { size: A4 portrait; margin: 10mm; }

@media print {
    .no-print { display: none !important; }
    #blazor-error-ui { display: none !important; }

    /* Feuilles très compactes : 3-4 par page A4 portrait, jamais coupées en deux. */
    .fdm-page { margin: 0 auto; max-width: none; padding: 0; font-size: 0.6875rem; }
    .fdm-sheet { break-inside: avoid; border-width: 1px; }
    .fdm-sheet + .fdm-sheet { margin-top: 0.5rem; }
    .fdm-header { padding: 0.25rem 0.625rem; border-bottom-width: 1px; }
    .fdm-club { font-size: 0.8125rem; }
    .fdm-club small { font-size: 0.625rem; }
    .fdm-numero { font-size: 0.75rem; }
    .fdm-numero small { font-size: 0.5625rem; }
    .fdm-lbl { font-size: 0.5625rem; }
    .fdm-infos, .fdm-vs { border-bottom-width: 1px; }
    .fdm-infos > div, .fdm-vs > div { padding: 0.1875rem 0.5rem; }
    .fdm-table th { font-size: 0.5625rem; }
    .fdm-table th, .fdm-table td { padding: 0.125rem 0.5rem; }
    .fdm-table td.blank { height: 1.125rem; }
    .fdm-note { display: none; }
}

/* ---------- Bandeau d'erreur Blazor (masqué par défaut, affiché par blazor.web.js en cas d'erreur) ---------- */
#blazor-error-ui {
    display: none;
    position: fixed; bottom: 0; left: 0; width: 100%; z-index: 1000;
    background: lightyellow; padding: 0.6rem 1.25rem;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ---------- Tab bar mobile ---------- */
.mobile-tabbar { display: none; }

/* ---------- Drawer off-canvas (mobile) ---------- */
.drawer-checkbox { display: none; }

@media (max-width: 900px) {
    .app-main { padding: 0.875rem 1rem 5rem; }
    .tp-drawer {
        position: fixed; top: 56px; bottom: 0; left: 0; z-index: 200;
        transform: translateX(-100%); transition: transform 0.2s ease;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.12);
    }
    .drawer-checkbox:checked ~ .app-body .tp-drawer { transform: translateX(0); }
    .userHeader { display: none; }
    .module-tag { display: none; }
    .cards-grid { grid-template-columns: 1fr; }
    .page-title-row h1 { font-size: 1.125rem; }
    .absence-row { grid-template-columns: 1fr; gap: 0.625rem; padding: 0.875rem 1rem; }
    .absence-row .ar-actions { justify-self: end; }
    .seg { max-width: none; }
    .tbl { display: block; overflow-x: auto; }
    .mobile-tabbar {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
        background: #fff; border-top: 1px solid var(--basic-300); padding: 8px 0 6px;
    }
    .mobile-tabbar a {
        flex: 1; text-align: center; color: var(--basic-600);
        font-size: 0.625rem; font-weight: 600;
    }
    .mobile-tabbar a i { display: block; font-size: 1rem; margin-bottom: 3px; }
    .mobile-tabbar a.active { color: var(--tp-info-500); font-weight: 700; }
}
@media (min-width: 901px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
    .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Recherche de joueur (JoueurPicker, page Sélections) ===== */
.joueur-picker { position: relative; }
.joueur-picker .jp-input { width: 100%; }
.jp-liste {
    position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 40;
    max-height: 420px; overflow-y: auto;
    background: #fff; border: 1px solid var(--basic-400); border-radius: 8px;
    box-shadow: 0 6px 18px rgba(25, 42, 70, 0.18);
}
/* Le temps qu'une liste est ouverte, la carte laisse déborder (sinon son overflow:hidden
   rognerait la liste) et passe au-dessus des cartes voisines. */
.page-card:has(.jp-liste) { overflow: visible; z-index: 50; }
.jp-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem; cursor: pointer; font-size: 0.8125rem;
}
.jp-item:hover { background: var(--basic-200); }
.jp-item.off { cursor: not-allowed; opacity: 0.55; }
.jp-item.off:hover { background: none; }
.jp-nom { font-weight: 600; color: var(--basic-800); white-space: nowrap; }
.jp-raison { font-size: 0.6875rem; color: var(--basic-600); margin-left: auto; text-align: right; }
.jp-raison.warn { color: var(--warning-600); }
.jp-vide { padding: 0.5rem 0.625rem; font-size: 0.75rem; color: var(--basic-600); font-style: italic; }

/* ---------- Vie du club (actualites) ---------- */
.actu-form {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.75rem 1rem;
    padding: 0.875rem 1.25rem 1rem;
}
.actu-form .actu-titre { grid-column: 1; }
.actu-form .actu-texte { grid-column: 1 / -1; }
.actu-form textarea.input-like { resize: vertical; line-height: 1.4; }
.actu-form .actu-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; }
.actu-check {
    display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 600;
    color: var(--basic-700); cursor: pointer; white-space: nowrap;
}
.actu-check input { width: auto; min-height: 0; margin: 0; }
.actu-list { list-style: none; margin: 0; padding: 0.25rem 0; }
.actu-list li {
    display: flex; gap: 0.875rem; align-items: flex-start;
    padding: 0.625rem 1.25rem; border-bottom: 1px solid var(--basic-300);
}
.actu-list li:last-child { border-bottom: none; }
.actu-date {
    flex: 0 0 auto; width: 44px; text-align: center; border-radius: 6px;
    background: var(--basic-200); border: 1px solid var(--basic-400); padding: 3px 0 4px;
}
.actu-date .ad-j { display: block; font-size: 1.0625rem; font-weight: 800; line-height: 1.1; color: var(--basic-800); }
.actu-date .ad-m { display: block; font-size: 0.5625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--basic-600); }
.actu-date.sans-date { background: #fff; }
.actu-date.sans-date i { font-size: 0.875rem; color: var(--orange-arcadia); line-height: 32px; }
.actu-date.aujourdhui { background: var(--warning-bg); border-color: rgba(249, 165, 7, 0.5); }
.actu-date.aujourdhui .ad-j { color: var(--warning-600); }
.actu-body { min-width: 0; flex: 1; font-size: 0.8125rem; }
.actu-body .ab-t { font-weight: 700; }
.actu-body .ab-s { color: var(--basic-600); font-size: 0.75rem; margin-top: 2px; white-space: pre-line; }
.actu-body .ab-when { font-size: 0.6875rem; color: var(--basic-600); margin-top: 3px; }
@media (max-width: 760px) {
    .actu-form { grid-template-columns: 1fr 1fr; }
    .actu-form .actu-titre { grid-column: 1 / -1; }
}

/* ---------- Capture d'écran des sélections ---------- */
.capture-zone { padding: 0.75rem; border-radius: 8px; }
.capture-titre { display: none; }
.capture-zone.capture-mode { background: #fff; }
.capture-zone.capture-mode .capture-titre {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    margin: 0 0 1rem; padding-bottom: 0.625rem; border-bottom: 2px solid var(--orange-arcadia);
}
.capture-zone.capture-mode .capture-titre h2 { margin: 0; font-size: 1.125rem; font-weight: 800; }
.capture-zone.capture-mode .capture-titre span { font-size: 0.8125rem; color: var(--basic-600); font-weight: 600; }
.capture-zone.capture-mode [data-no-capture] { display: none !important; }
.capture-zone.capture-mode .page-card { break-inside: avoid; }

/* ---------- Résultats / classements AFTT ---------- */
.res-equipes { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.875rem 1.25rem; }
.res-equipe {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.625rem 0.25rem 0.25rem;
    background: #fff; border: 1px solid var(--basic-300); border-radius: 8px; cursor: pointer;
    font: inherit; font-size: 0.75rem; color: var(--basic-700);
}
.res-equipe:hover { background: var(--basic-200); }
.res-equipe.active { border-color: var(--tp-info-500); background: #e7f4f5; color: var(--tp-info-600); font-weight: 700; }
.res-equipe .team-square { width: 28px; height: 28px; font-size: 0.8125rem; border-radius: 5px; }
.res-equipe-div { white-space: nowrap; }
.res-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.tbl-scroll { overflow-x: auto; }
.res-classement th, .res-classement td { white-space: nowrap; }
.res-classement tr.res-nous td { background: #e7f4f5; }
.res-classement tr.res-nous:hover td { background: #d9eeef; }
.res-liste { list-style: none; margin: 0; padding: 0; }
.res-liste li { padding: 0.625rem 1.25rem; border-bottom: 1px solid var(--basic-300); display: flex; flex-direction: column; gap: 0.25rem; }
.res-liste li:last-child { border-bottom: none; }
.res-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.6875rem; color: var(--basic-600); flex-wrap: wrap; }
.res-salle { margin-left: auto; }
.res-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.625rem; font-size: 0.8125rem; }
.res-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-team.right { text-align: right; }
.res-team.nous { font-weight: 800; color: var(--basic-800); }
.res-score {
    font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: 0.8125rem;
    padding: 2px 8px; border-radius: 4px; background: var(--basic-200); border: 1px solid var(--basic-400); color: var(--basic-700);
}
.res-score.victoire { background: var(--success-bg); border-color: rgba(0, 185, 104, 0.3); color: var(--success-600); }
.res-score.defaite { background: var(--red-arcadia-bg); border-color: rgba(229, 49, 24, 0.35); color: var(--red-arcadia); }
.res-score.nul { background: var(--warning-bg); border-color: rgba(249, 165, 7, 0.4); color: var(--warning-600); }
.res-score.futur { color: var(--basic-500); }
.res-grid-bas { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1rem; }
.res-serie li { padding: 0.5rem 1.25rem; }
.res-semaine-nav select { min-width: 170px; }
.res-liste li.res-cliquable { cursor: pointer; }
.res-liste li.res-cliquable:hover { background: var(--basic-200); }
.res-serie li.res-serie-nous.res-cliquable:hover { background: #e7f4f5; }
.res-detail-hint { margin-left: auto; color: var(--tp-info-600); font-weight: 700; }
.res-detail-hint i { font-size: 0.625rem; }
.res-modal-backdrop {
    position: fixed; inset: 0; z-index: 400; background: rgba(25, 42, 70, 0.45);
    display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto;
}
.res-modal { width: 100%; max-width: 720px; max-height: 92vh; display: flex; flex-direction: column; }
.res-modal .pc-header { flex: none; }
.res-modal-score {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1.25rem; background: var(--basic-200); border-bottom: 1px solid var(--basic-300);
    font-size: 0.9375rem; font-weight: 700;
}
.res-modal-body { padding: 1rem 1.25rem; overflow-y: auto; }
.res-feuille { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.res-feuille-titre { font-size: 0.75rem; font-weight: 700; color: var(--basic-600); text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 0.375rem; }
.res-joueurs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8125rem; }
.res-joueurs li { display: flex; align-items: center; gap: 0.5rem; }
.res-joueurs .mono { width: 28px; flex: none; font-size: 0.75rem; }
.res-joueur-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-matchs td.res-gagnant { font-weight: 700; color: var(--basic-800); }
.res-matchs td.res-perdant { color: var(--basic-600); }
@media (max-width: 760px) {
    .res-feuille { grid-template-columns: 1fr; }
    .res-modal-backdrop { padding: 0; align-items: stretch; }
    .res-modal { max-width: none; max-height: none; border-radius: 0; }
}
.res-serie li.res-serie-nous { background: #f3fafa; }
@media (max-width: 1100px) {
    .res-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .res-grid-bas { grid-template-columns: 1fr; }
    .res-semaine-nav { margin-left: 0; flex-basis: 100%; }
    .res-semaine-nav select { flex: 1; }
    .page-card .pc-header:has(.res-semaine-nav) { flex-wrap: wrap; }
}
@media (max-width: 760px) {
    .res-col-large { display: none; }
    .res-salle { margin-left: 0; flex-basis: 100%; }
}
