/* Nawétane Mbour — feuille de style unique (aucune étape de build, chargement rapide) */

:root {
    /* Palette « bleu nuit & or » : le bleu nuit reprend le tableau d'affichage, l'or l'accent, le vert ne sert que pour « qualifié ». */
    --brand: #1f4fbf;
    --brand-dark: #0b1b3f;
    --brand-soft: #e8eefb;
    --brand-mid: #16337a;   /* fin des dégradés (bandeaux) */
    --btn: #1f4fbf;         /* fond des boutons pleins (texte blanc) */
    --gold: #f2b705;
    --red: #d7263d;
    --ok: #17915a;
    --ok-soft: #e2f4ea;

    --bg: #f6f5f1;
    --surface: #ffffff;
    --text: #15182a;
    --muted: #5f6478;
    --border: #e2e1da;
    --shadow: 0 1px 2px rgba(16, 20, 40, .06), 0 4px 14px rgba(16, 20, 40, .05);
    --radius: 14px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --brand: #7ea2ff;
        --brand-dark: #0b1b3f;
        --brand-soft: #16223f;
        --btn: #2f5fd6;
        --ok: #35b779;
        --ok-soft: #10281d;
        --bg: #0c0f1a;
        --surface: #151a2b;
        --text: #eceff8;
        --muted: #a0a8c0;
        --border: #262d47;
        --shadow: none;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; padding-bottom: 3rem; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.site-header {
    background: var(--brand-dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 3px solid var(--gold);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-ball { font-size: 1.6rem; line-height: 1; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.1rem; letter-spacing: .02em; }
.brand-text small { font-size: .78rem; opacity: .8; text-transform: uppercase; letter-spacing: .12em; }
.nav a { color: #fff; opacity: .85; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.active { opacity: 1; background: rgba(255, 255, 255, .12); text-decoration: none; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); font-size: .88rem; }
.site-footer p { margin: 0; }

/* Accueil */
.hero {
    margin: 16px 0 0;
    padding: 26px 20px 20px;
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(circle at 92% -10%, rgba(242, 183, 5, .35), transparent 45%),
        linear-gradient(135deg, var(--brand-dark), var(--brand-mid));
    box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(1.6rem, 6vw, 2.5rem); letter-spacing: -.01em; }
.hero p { color: rgba(255, 255, 255, .85); margin: 8px 0 0; max-width: 46ch; }
.hero-stats { display: flex; gap: 10px; margin-top: 18px; }
.hero-stat { flex: 1 1 0; background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 10px 8px; text-align: center; }
.hero-stat strong { display: block; font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
@media (min-width: 700px) {
    .hero { padding: 34px 32px 28px; }
    .hero-stats { max-width: 460px; }
}

.section-title { font-size: 1.15rem; margin: 28px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}
.competition-card { color: inherit; transition: transform .15s ease, border-color .15s ease; }
.competition-card:hover { transform: translateY(-2px); border-color: var(--brand); text-decoration: none; }
.competition-card h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.competition-card p { margin: 2px 0; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
}
.tag-ongoing { background: var(--btn); color: #fff; }
.tag-finished { background: var(--border); color: var(--muted); }
.tag-live { background: var(--red); color: #fff; }
.tag-warn { background: var(--gold); color: #3a2a00; }

.two-cols { display: grid; gap: 0 28px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .two-cols { grid-template-columns: 1fr 1fr; } }

/* Page compétition / équipe */
.breadcrumb { margin: 16px 0 0; font-size: .88rem; color: var(--muted); }
.page-head { padding: 12px 0 4px; }
.page-head h1 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); margin: 10px 0 4px; }

.tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin: 18px -16px 0;
    padding: 0 16px 2px;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 12px;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }

/* Avec JavaScript : un seul onglet à la fois. Sans JS : tout s'affiche à la suite. */
.js .panel { display: none; }
.js .panel.active { display: block; }
html:not(.js) .tabs { display: none; }

/* Classement */
.poules { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .poules { grid-template-columns: 1fr 1fr; } }
.poules .card { padding: 14px 12px 8px; }
.poules h3 { font-size: 1rem; margin: 0 4px 8px; }

.table-scroll { overflow-x: auto; }
.standings { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92rem; }
.standings th, .standings td { padding: 8px 6px; text-align: center; white-space: nowrap; }
.standings thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--border); }
.standings tbody tr + tr td { border-top: 1px solid var(--border); }
.standings .team { text-align: left; width: 100%; white-space: normal; font-weight: 600; }
.standings .team a { color: inherit; }
.standings .team a:hover { color: var(--brand); }
.standings .rank { width: 28px; color: var(--muted); }
.standings .pts { font-weight: 800; }
.standings tr.is-qualified .rank { color: var(--ok); font-weight: 800; box-shadow: inset 3px 0 0 var(--ok); }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* Matchs */
.game {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px 8px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.game-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.game-meta a { color: inherit; font-weight: 600; }
.game-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px 0; }
.game .side { font-weight: 600; overflow-wrap: break-word; hyphens: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.game .side.home { justify-content: flex-end; text-align: right; }
.game .side a { color: inherit; }
.game .side a:hover { color: var(--brand); }
.game .side.is-winner, .game .side.is-winner a { font-weight: 800; }
.game .tbd { color: var(--muted); font-style: italic; font-weight: 500; }
.score {
    min-width: 76px;
    text-align: center;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    /* Tableau de stade : chiffres jaunes sur fond bleu nuit */
    background: #0b1b3f;
    color: var(--gold);
    text-shadow: 0 0 8px rgba(242, 183, 5, .4);
    border-radius: 10px;
    padding: 5px 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 -3px 6px rgba(0, 0, 0, .35);
}
.score .dash { margin: 0 4px; color: #fff; opacity: .5; text-shadow: none; }
.score .vs { font-size: 1rem; font-weight: 700; }
.game.is-upcoming .score {
    background: var(--bg); color: var(--muted); text-shadow: none; box-shadow: none;
    font-family: var(--font); letter-spacing: 0;
}
.game-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; font-size: .78rem; color: var(--muted); }

/* Logos des équipes */
.logo { flex: 0 0 auto; object-fit: contain; display: inline-block; vertical-align: middle; }
.logo-xs { width: 22px; height: 22px; }
.logo-sm { width: 34px; height: 34px; }
.logo-lg { width: 84px; height: 84px; }
.logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 800;
    letter-spacing: .02em;
}
.logo-xs.logo-fallback { font-size: .62rem; }
.logo-sm.logo-fallback { font-size: .8rem; }
.logo-lg.logo-fallback { font-size: 1.8rem; }
/* Les logos ont souvent un fond blanc : on les pose sur une pastille claire en thème sombre. */
@media (prefers-color-scheme: dark) {
    img.logo { background: #fff; border-radius: 6px; padding: 1px; }
}
.team-link { display: inline-flex; align-items: center; gap: 8px; }
.team-head { display: flex; align-items: center; gap: 16px; }

/* Tableau final : défile horizontalement sur mobile, en colonnes côte à côte sur grand écran */
.bracket-scroll { overflow-x: auto; margin: 0 -16px; padding: 4px 16px 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 82vw); gap: 16px; }
.bracket-col { scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-around; }
.bracket-col h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.swipe-hint { margin: 0 0 6px; }
@media (min-width: 900px) {
    .bracket-scroll { margin: 0; padding: 4px 0 12px; }
    .bracket { grid-auto-columns: minmax(0, 1fr); }
    .swipe-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .competition-card { transition: none; }
}

/* ---------- Administration ---------- */
[hidden] { display: none !important; }

.flash { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.flash-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav-form { margin: 0; }
.nav-btn { background: none; border: 0; color: #fff; opacity: .85; padding: 8px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
.nav-btn:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.footer-login { margin-left: 8px; color: var(--muted); text-decoration: underline; }
.edit-link { font-weight: 600; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
    font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2;
    min-height: 44px;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-primary { background: var(--btn); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-sm { padding: 6px 12px; min-height: 36px; font-size: .9rem; }
.btn-block { width: 100%; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.toolbar form { margin: 0; }
.admin-section { margin-top: 8px; }
.round-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; }

/* Saisie rapide du score */
.quick-result { margin: 0; }
.score-inputs { display: flex; align-items: center; gap: 6px; }
.score-inputs .dash { opacity: .6; font-weight: 800; }
.score-inputs input {
    width: 54px; height: 48px; text-align: center; font: inherit; font-size: 1.3rem; font-weight: 800;
    border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text);
    -moz-appearance: textfield; appearance: textfield;
}
.score-inputs input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.admin-foot { justify-content: space-between; align-items: center; padding-top: 4px; }
.admin-foot .actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Formulaires */
.auth-card { max-width: 420px; margin: 32px auto; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.form-card { margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, legend { font-size: .85rem; font-weight: 700; color: var(--muted); }
.field input, .field select {
    font: inherit; padding: 10px 12px; min-height: 44px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg); color: var(--text); width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--brand); border-color: transparent; }
.field-grid { display: grid; gap: 12px; grid-template-columns: 1fr; border: 0; padding: 0; margin: 0 0 14px; }
@media (min-width: 640px) { .field-grid { grid-template-columns: 1fr 1fr; } }
.score-fieldset { border-top: 1px solid var(--border); padding-top: 14px; }
.score-fieldset legend { padding: 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.error { color: var(--red); font-size: .85rem; margin: 2px 0 0; font-weight: 600; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.danger-zone { margin: 24px 0 0; }

/* ---------- Mobile (≤ 560 px) ---------- */
@media (max-width: 560px) {
    .header-inner { min-height: 54px; gap: 8px; }
    .brand-ball { font-size: 1.4rem; }
    .brand-text strong { font-size: 1rem; }
    .nav a, .nav-btn { padding: 8px 9px; font-size: .88rem; }
    .nav-home { display: none; }

    /* Carte de match : logo au-dessus, nom centré dessous — plus de mots coupés au milieu. */
    .game { padding: 10px 10px 8px; }
    .game-body { gap: 6px; align-items: start; }
    .game .side, .game .side.home { flex-direction: column; justify-content: flex-start; align-items: center; text-align: center; gap: 4px; font-size: .9rem; line-height: 1.2; }
    .game .side.home { flex-direction: column-reverse; justify-content: flex-end; }
    .game .logo-sm { width: 40px; height: 40px; }
    .game .logo-sm.logo-fallback { font-size: .9rem; }
    .game .score { align-self: center; min-width: 64px; font-size: 1.2rem; }
    .game-foot { font-size: .75rem; }

    .score-inputs input { width: 46px; height: 46px; font-size: 1.2rem; }
    .admin-foot { flex-direction: column; align-items: stretch; gap: 8px; }
    .admin-foot > span:first-child { text-align: center; }
    .admin-foot .actions { justify-content: center; }
    .toolbar .btn { flex: 1 1 100%; }
    .tabs { gap: 0; }
    .tabs a { padding: 10px 11px; font-size: .95rem; }
}

/* ---------- Règles du RG : mentions, partage, classement final ---------- */
.tag-provisional { background: transparent; color: var(--muted); border: 1px dashed var(--muted); }
.notice { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--text); border-left: 4px solid var(--gold); font-size: .9rem; }
.sub-title { font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; }
.page-actions { margin-top: 12px; }
.btn-whatsapp { background: #128c4a; color: #fff; } /* vert WhatsApp : couleur de la marque tierce */
.share-link { font-weight: 600; }
.standings tr.is-excluded td { color: var(--muted); }
.standings tr.is-excluded .team a { text-decoration: line-through; }
.standings .team .tag { margin-left: 6px; font-size: .68rem; vertical-align: middle; }
.standings-notes { margin-top: 10px; }
.standings-notes p { margin: 2px 0; }
.final-ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.final-ranking li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.final-ranking li + li { border-top: 1px solid var(--border); }
.rank-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; font-weight: 800;
    background: var(--brand-soft); color: var(--brand);
}
.rank-badge.rank-1 { background: var(--gold); color: #3a2a00; }
.rank-badge.rank-2 { background: #cfd6d2; color: #26302b; }
.rank-badge.rank-3 { background: #d9a577; color: #3a2210; }

/* Admin : équipes exclues, import, historique */
.audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.audit-item { padding: 12px 14px; }
.audit-item .when { font-size: .8rem; color: var(--muted); }
.audit-item ul { margin: 6px 0 0; padding-left: 18px; }
.exclusion-list { display: grid; gap: 6px; margin-top: 8px; }
.exclusion-list form { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.import-report { width: 100%; border-collapse: collapse; font-size: .9rem; }
.import-report th, .import-report td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.import-report .ok { color: var(--ok); font-weight: 700; }
.import-report .ko { color: var(--red); font-weight: 700; }
textarea.csv-text { width: 100%; min-height: 140px; font: inherit; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); }

/* Classements sur l'accueil */
.standings-lead { margin: 0 0 10px; }
.more-link { margin: 12px 0 0; font-weight: 600; }
.poule-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 4px 8px; }
.poule-head h3 { margin: 0; }

/* Partage en image (le bouton n'apparaît que si le navigateur sait dessiner l'image) */
.btn-share { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--brand); border-color: var(--border); cursor: pointer; }
.btn-share[hidden] { display: none; }
.btn-share svg { flex: 0 0 auto; }
.btn-share.is-busy { opacity: .6; pointer-events: none; }
.game-foot .share-image { min-height: 0; padding: 0 2px; border: 0; background: none; font-size: inherit; font-weight: 600; color: var(--brand); }
.game-foot .share-image svg { width: 13px; height: 13px; }

.share-modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(6, 18, 12, .78);
}
.share-modal[hidden] { display: none; }
.share-dialog {
    width: min(100%, 460px); max-height: 100%; overflow: auto;
    background: var(--surface); color: var(--text); border-radius: 16px; padding: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.share-dialog h2 { font-size: 1rem; margin: 0 0 10px; }
.share-preview { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-actions .btn { flex: 1 1 auto; justify-content: center; cursor: pointer; }
.share-hint { margin: 8px 0 0; font-size: .82rem; color: var(--muted); }

/* Édition du CNP */
.hero-edition { display: inline-block; background: var(--gold); color: #2a1f00; font-weight: 800; letter-spacing: .06em; font-size: .8rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.tag-edition { background: var(--gold); color: #2a1f00; }

/* ===== Filtre du programme (journée / poule) ===== */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 6px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; white-space: nowrap;
    padding: 7px 14px; min-height: 36px; border-radius: 999px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.chip:hover { border-color: var(--brand); }
.chip.active { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.filter-poule select, .filters select {
    font: inherit; padding: 7px 10px; min-height: 36px; border-radius: 10px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Documents (PV de la CQRP) ===== */
.doc-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.doc-item { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; }
.doc-list .doc-item { margin-top: 0; }
.doc-icon {
    flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
    background: var(--brand-dark); color: #f2b705; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
}
.doc-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.doc-info a { font-weight: 700; overflow-wrap: anywhere; }

/* ===== Formulaires d'administration (organisation, équipes, comptes, documents) ===== */
.form > label, .field-row > label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--muted); min-width: 0; }
.form > label.check, .field-row > label.check { flex-direction: row; font-weight: 500; color: var(--text); }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select, .form-inline input, .form-inline select, .list-filter, .entry-list input {
    font: inherit; padding: 9px 12px; min-height: 42px; border-radius: 10px; width: 100%;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.form input[type=file] { font: inherit; font-weight: 400; color: var(--text); }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr; }
.form-errors { margin: 0; padding-left: 18px; color: var(--red); font-size: .9rem; }
.form-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.form-inline input, .form-inline select { flex: 1 1 180px; width: auto; }
.filters.form-inline { padding: 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.row-actions form { margin: 0; }
.doc-item .row-actions { margin: 0; flex: none; }

.team-list { display: grid; gap: 8px; margin-top: 12px; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.team-row-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.setup-card { margin-top: 12px; padding: 14px 16px; }
.setup-card > summary { cursor: pointer; padding: 2px 0; }
.setup-card[open] > summary { margin-bottom: 8px; }
.setup-card .btn-danger { margin-top: 12px; }
.list-filter { margin-bottom: 8px; }
.check-list {
    display: grid; gap: 2px; max-height: 320px; overflow-y: auto; padding: 6px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.check-list .check { padding: 8px; border-radius: 8px; cursor: pointer; }
.check-list .check:hover { background: var(--surface); }
.check input { width: 18px; height: 18px; flex: none; accent-color: var(--brand); }

.entries { margin-top: 12px; padding: 12px 14px; }
.entry-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.entry-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.entry-list input { width: 64px; flex: none; text-align: center; padding: 6px; min-height: 38px; }
.entry-name { font-weight: 700; flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.generate-box { margin-top: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.generate-box h3 { margin: 0; }

@media (min-width: 640px) {
    .field-row { grid-template-columns: 1fr 1fr; }
}

/* Lien « Connexion » visible dans le menu pour les visiteurs (saisie des résultats) */
.nav-login { border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; }
