/* Equipes Biathlon FFB -- style volontairement simple et lisible :
   public majoritairement 60 ans et plus (cf. instructions du projet).
   Gros textes, gros boutons, peu de couleurs, pas d'icones seules. */

:root {
    --bleu: #065da8;
    --bleu-fonce: #044373;
    --vert: #1a7a3c;
    --rouge: #a20610;
    --orange: #a86400;
    --fond: #f7f9fb;
    --texte: #1a1a1a;
    --bordure: #c8d2db;
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--fond);
    color: var(--texte);
    line-height: 1.5;
}

header.entete {
    background: var(--bleu-fonce);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

header.entete a {
    color: #fff;
    text-decoration: none;
}

header.entete .titre-site {
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

header.entete .titre-site .logo-site {
    height: 36px;
    width: auto;
    border-radius: 4px;
    vertical-align: middle;
}

nav.nav-principale {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

nav.nav-principale a, nav.nav-principale span {
    font-size: 1.05rem;
}

nav.nav-principale a.bouton-nav {
    background: var(--bleu);
    padding: 10px 18px;
    border-radius: 6px;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.5rem; }

.carte {
    background: #fff;
    border: 1px solid var(--bordure);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.bouton, button, input[type="submit"] {
    display: inline-block;
    font-size: 1.1rem;
    padding: 14px 24px;
    border-radius: 8px;
    border: none;
    background: var(--bleu);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.bouton:hover, button:hover, input[type="submit"]:hover { background: var(--bleu-fonce); }

.bouton.secondaire { background: #6b7684; }
.bouton.secondaire:hover { background: #55606c; }

.bouton.danger { background: var(--rouge); }
.bouton.danger:hover { background: #7a040c; }

.bouton.valider { background: var(--vert); }
.bouton.valider:hover { background: #145c2e; }

label {
    display: block;
    font-weight: 600;
    margin: 18px 0 6px;
    font-size: 1.05rem;
}

input[type="text"], input[type="email"], input[type="search"], input[type="password"], select, textarea {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px 14px;
    border: 2px solid var(--bordure);
    border-radius: 8px;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus { outline: 3px solid var(--bleu); border-color: var(--bleu); }

.champ { margin-bottom: 14px; }

.message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.message.erreur { background: #fde8e8; border: 2px solid var(--rouge); color: var(--rouge); }
.message.succes { background: #e7f5ec; border: 2px solid var(--vert); color: var(--vert); }
.message.info { background: #e8f1fb; border: 2px solid var(--bleu); color: var(--bleu-fonce); }
.message.avertissement { background: #fdf1de; border: 2px solid var(--orange); color: var(--orange); }

.carte-club { border-left: 6px solid var(--bleu); }
.carte-ligue { border-left: 6px solid var(--vert); }

.ligue-label { color: #556; font-size: 0.95rem; margin: 2px 0; }

table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--bordure); white-space: nowrap; }
th { background: #eef2f6; }

.badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
}

.badge.brouillon { background: #eef0f2; color: #555; }
.badge.attente_validation { background: #fdf1de; color: var(--orange); }
.badge.validee { background: #e7f5ec; color: var(--vert); }
.badge.refusee { background: #fde8e8; color: var(--rouge); }

.liste-equipes .ligne-equipe {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid var(--bordure);
}

.liste-equipes .ligne-equipe:last-child { border-bottom: none; }

.liste-equipes a { font-size: 1.15rem; font-weight: 600; color: var(--bleu-fonce); text-decoration: none; }
.liste-equipes a:hover { text-decoration: underline; }

.autocomplete-boite { position: relative; }

.autocomplete-resultats {
    position: absolute;
    z-index: 10;
    background: #fff;
    border: 2px solid var(--bleu);
    border-top: none;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
}

.autocomplete-resultats div {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 1.05rem;
    border-bottom: 1px solid #eee;
}

.autocomplete-resultats div:hover, .autocomplete-resultats div.actif { background: #e8f1fb; }

.joueur-ligne {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--bordure);
    gap: 10px;
    flex-wrap: wrap;
}

.joueur-info { font-size: 1.1rem; }
.joueur-info .externe-tag { color: var(--orange); font-weight: 600; }
.joueur-info .capitaine-tag { color: var(--bleu); font-weight: 600; }

.actions-ligne { display: flex; gap: 8px; flex-wrap: wrap; }

footer.pied {
    text-align: center;
    padding: 20px;
    color: #667;
    font-size: 0.95rem;
}

.aide {
    color: #445;
    font-size: 1rem;
    margin-top: 4px;
}

@media (max-width: 480px) {
    html { font-size: 17px; }
    header.entete { padding: 14px 16px; }
    main { padding: 18px 14px 50px; }
}

/* ============================================================================
   ESPACE ADMIN -- entete visuellement distincte du site public/club/ligue,
   pour eviter toute confusion sur l'espace dans lequel on se trouve.
   ============================================================================ */

header.entete-admin {
    background: #2b2f36;
}

.main-admin {
    max-width: 1200px;
}

.liste-admin {
    list-style: none;
    padding: 0;
    margin: 0;
}

.liste-admin li {
    margin: 14px 0;
}

.liste-admin a {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--bleu-fonce);
    text-decoration: none;
}

.liste-admin a:hover {
    text-decoration: underline;
}

.badge-notif {
    display: inline-block;
    background: var(--rouge);
    color: #fff;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.badge-notif.zero {
    background: var(--vert);
}

.liste-mails a.ligne-mail {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--bordure);
    color: var(--texte);
    text-decoration: none;
}

.liste-mails a.ligne-mail:last-child { border-bottom: none; }
.liste-mails a.ligne-mail:hover { background: #f4f7fa; }

.liste-mails .mail-de { flex: 0 0 220px; font-weight: 600; }
.liste-mails .mail-sujet { flex: 1 1 300px; }
.liste-mails .mail-date { flex: 0 0 140px; color: #667; text-align: right; }

.liste-mails a.non-lu { font-weight: 700; }
.liste-mails a.non-lu .mail-sujet::before { content: "● "; color: var(--rouge); }

.corps-mail {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #f4f7fa;
    border: 1px solid var(--bordure);
    border-radius: 8px;
    padding: 16px;
    font-family: inherit;
    font-size: 1.05rem;
    margin: 16px 0;
}

@media (max-width: 480px) {
    .liste-mails .mail-de, .liste-mails .mail-date { flex-basis: 100%; }
}
