/* Direction artistique inspirée des codes visuels de lequipe.fr :
   bleu nuit, blanc dominant, rouge accent, titres condensés italiques,
   tableaux à filets fins, navigation par pilule à chevrons. */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,600;0,700;0,800;1,700;1,800&family=Roboto:wght@400;500;700&display=swap');

:root {
  --nuit: #1a1a1a;        /* noir des titres */
  --bleu: #2757a5;        /* bleu discret (liens secondaires) */
  --rouge: #e3120b;       /* LE rouge, couleur dominante */
  --noir: #1a1a1a;
  --gris: #6b7280;
  --filet: #e5e7eb;
  --fond: #ffffff;
  --fond-doux: #f6f7f9;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Roboto', system-ui, sans-serif; background: var(--fond); color: var(--noir); }
main { max-width: 1080px; margin: 1.6rem auto; padding: 0 1rem; }

/* ---------- bandeau : ROUGE, titre et menu en blanc ---------- */
.topbar { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; align-items: center; justify-content: space-between; background: var(--rouge); padding: .8rem 1.4rem; }
.brand { font-family: 'Barlow Condensed', sans-serif; font-style: italic; font-weight: 800; font-size: 1.6rem; letter-spacing: .3px; color: #fff; text-transform: uppercase; }
.brand span { color: #fff !important; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: center; }
.topbar a { color: #fff; text-decoration: none; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .4px; }
.topbar a:hover { color: #ffd7d4; }
.admin-link { background: #fff; color: var(--rouge) !important; padding: .15rem .7rem; border-radius: 999px; }
button.linklike { background: none; color: #fff; padding: 0; margin: 0; text-decoration: underline; }
.flash { background: #eef7ee; border: 1px solid #bcdcbc; margin: 1rem auto; max-width: 1080px; padding: .6rem 1rem; border-radius: 4px; }

/* ---------- titres ---------- */
h1, h2, h3 { font-family: 'Barlow Condensed', sans-serif; font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
h1 { font-size: 1.9rem; border-bottom: 3px solid var(--rouge); padding-bottom: .3rem; }
h2 { font-size: 1.35rem; }
h2::before { content: ''; display: inline-block; width: .55rem; height: .55rem; background: var(--rouge); margin-right: .5rem; transform: skewX(-12deg); }
.year-heading { border-bottom: 3px solid var(--rouge); padding-bottom: .25rem; margin-top: 1.8rem; color: var(--noir); }

/* ---------- cartes ---------- */
.card { background: var(--fond); border: 1px solid var(--filet); border-radius: 6px; padding: 1.2rem; margin: 1rem 0; }
.narrow { max-width: 460px; margin: 2rem auto; }

/* ---------- formulaires ---------- */
label { display: block; margin: .7rem 0; font-size: .95rem; }
input, select { padding: .5rem; border: 1px solid #cfd4dc; border-radius: 4px; font-size: 1rem; max-width: 100%; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--bleu); outline-offset: 0; border-color: var(--bleu); }
input[type=number] { width: 4.2rem; text-align: center; }
textarea { width: 100%; border: 1px solid #cfd4dc; border-radius: 4px; padding: .6rem; font-size: .95rem; font-family: inherit; }
button { background: var(--rouge); color: #fff; border: 0; border-radius: 999px; padding: .5rem 1.3rem; font-size: 1rem; cursor: pointer; margin-top: .4rem; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
button:hover { filter: brightness(1.12); }
button:disabled { background: #d1d5db; color: #8a8f98; cursor: not-allowed; filter: none; }
button.danger { background: #fff; color: var(--rouge); border: 1px solid var(--rouge); padding: .2rem .6rem; font-size: .85rem; }
button.linklike { background: none; color: #fff; padding: 0; margin: 0; text-decoration: underline; }
.inline { display: inline; }
.error { color: var(--rouge); font-weight: 500; }
.muted { color: var(--gris); } .small { font-size: .85rem; }

/* ---------- avatars ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; vertical-align: middle; background: #dde2ea; }
.avatar.big { width: 84px; height: 84px; }
.avatar.tiny { width: 24px; height: 24px; }
.profile-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }

/* ---------- tableaux ---------- */
table { border-collapse: collapse; width: 100%; }
td, th { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--filet); vertical-align: middle; }
th { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; font-size: .95rem; letter-spacing: .4px; color: var(--noir); border-bottom: 2px solid var(--rouge); }

/* ---------- pilule de navigation entre journées (esprit lequipe.fr) ---------- */
.journee-nav { display: flex; gap: 0; align-items: center; margin: 1.2rem auto; justify-content: center; border: 1px solid #cfd4dc; border-radius: 999px; width: fit-content; padding: .15rem .4rem; background: #fff; }
.arrow { font-size: 1.5rem; text-decoration: none; color: var(--rouge); padding: 0 .8rem; font-weight: 700; }
.arrow.disabled { opacity: .3; pointer-events: none; }
.journee-nav select { border: 0; color: var(--rouge); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.15rem; text-transform: uppercase; appearance: auto; background: #fff; }
.journee-nav select:focus { outline: none; }

/* ---------- pronostics ---------- */
.matches .when { width: 30%; color: var(--gris); font-size: .92rem; }
.matches .team { font-weight: 700; }
.matches .team.followed { color: var(--nuit); }
.matches .inputs { white-space: nowrap; }
.matches tr.locked { background: var(--fond-doux); color: #555; }
.score { margin-left: .6rem; font-weight: 700; }
.cotes { margin-top: .3rem; font-size: .85rem; color: var(--gris); }
.cote { background: var(--fond-doux); border: 1px solid var(--filet); border-radius: 3px; padding: .05rem .4rem; margin-right: .3rem; white-space: nowrap; }
.cote b { color: var(--bleu); }

/* ---------- résultats ---------- */
.results .player { white-space: nowrap; }
.results .pred { white-space: nowrap; }
.badge { background: #eee; border-radius: 3px; padding: 0 .45rem; font-size: .8rem; font-weight: 700; }
.pts3 .badge { background: var(--rouge); color: #fff; } .pts2 .badge { background: var(--noir); color: #fff; } .pts1 .badge { background: #f4c20d; color: var(--noir); } .pts0 .badge { background: #e5e7eb; color: var(--gris); }
.totals td { font-size: 1.05rem; background: var(--fond-doux); border-top: 2px solid var(--rouge); }
.gc { background: var(--rouge); color: #fff; border-radius: 999px; padding: 0 .55rem; font-size: .8rem; white-space: nowrap; font-weight: 700; }

/* ---------- classement ---------- */
.standings .rank { font-family: 'Barlow Condensed', sans-serif; font-style: italic; font-weight: 800; font-size: 1.25rem; width: 2rem; color: var(--noir); }
.standings .pts { font-size: 1.15rem; color: var(--rouge); }
.standings tr.leader { background: #fdeeed; }
.standings tr.leader .rank { color: var(--rouge); }
.playercell { white-space: nowrap; }

/* ---------- palmarès ---------- */
.palmares .season { font-family: 'Barlow Condensed', sans-serif; font-style: italic; font-weight: 800; font-size: 1.1rem; width: 7rem; color: var(--rouge); }

/* ---------- règlement ---------- */
.reglement { white-space: pre-wrap; font-family: inherit; font-size: .95rem; line-height: 1.6; margin: 0; }

/* ---------- hall of fame ---------- */
.dropzone { border: 2px dashed #b7c2d4; border-radius: 6px; padding: 1.6rem; text-align: center; cursor: pointer; background: var(--fond-doux); transition: background .15s, border-color .15s; }
.dropzone.over { background: #e8eefb; border-color: var(--bleu); }
.dropzone input[type=file] { display: none; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery figure { margin: 0; padding: .6rem; }
.gallery img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; display: block; }
.gallery video { width: 100%; max-height: 240px; border-radius: 4px; display: block; background: #000; }
.video-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; background: var(--fond-doux); border-radius: 4px; text-align: center; color: var(--gris); }
.gallery figcaption { margin-top: .4rem; font-size: .9rem; color: #444; }
.gallery-admin { margin-top: .4rem; display: flex; gap: .4rem; flex-wrap: wrap; }

/* ---------- débats ---------- */
.debate-line { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.debate-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-style: italic; font-size: 1.2rem; text-transform: uppercase; color: var(--noir); text-decoration: none; }
.debate-title:hover { color: var(--rouge); }
.badge-open { background: #fff; border: 1px solid var(--rouge); color: var(--rouge); border-radius: 999px; padding: .1rem .7rem; font-size: .85rem; font-weight: 700; }
.badge-adopte { background: #16a34a; color: #fff; border-radius: 999px; padding: .1rem .7rem; font-weight: 700; }
.badge-rejete { background: var(--noir); color: #fff; border-radius: 999px; padding: .1rem .7rem; font-weight: 700; }
.debate-body { white-space: pre-wrap; line-height: 1.55; }
.avis-juriste { border-left: 4px solid var(--rouge); background: #fffafa; }
.comment { display: flex; gap: .6rem; align-items: flex-start; border-bottom: 1px solid var(--filet); padding: .5rem 0; }
.comment p { margin: .2rem 0 0; }

/* sondage façon WhatsApp */
.poll-question { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-style: italic; font-size: 1.25rem; margin: .2rem 0 .1rem; }
.poll-option-form { margin: .5rem 0 .15rem; }
.poll-option { position: relative; display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: var(--fond-doux); color: var(--noir); border: 1px solid var(--filet); border-radius: 10px; padding: .7rem .9rem; font-family: 'Roboto', sans-serif; text-transform: none; letter-spacing: 0; font-size: 1rem; overflow: hidden; margin-top: 0; }
.poll-option:hover { filter: none; border-color: var(--rouge); }
.poll-option.mine { border: 2px solid var(--rouge); font-weight: 700; }
.poll-option:disabled { cursor: default; color: var(--noir); background: var(--fond-doux); }
.poll-label, .poll-count { position: relative; z-index: 1; }
.poll-count { font-weight: 700; font-family: 'Barlow Condensed', sans-serif; font-size: 1.15rem; }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: #f8c9c6; z-index: 0; transition: width .3s; }
.poll-closed .poll-bar { background: #e8e8e8; }
.poll-closed .poll-option.mine .poll-bar, .poll-closed .poll-option .poll-bar { background: #f0d3d1; }
.poll-voters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 0 0 .4rem .4rem; }
.poll-voter { font-size: .85rem; color: var(--gris); }
.verdict { font-size: 1.15rem; }
.archives-heading { margin-top: 2.2rem; color: var(--gris); }
.debate-archived { opacity: .82; }

/* ---------- divers ---------- */
.scrapelog { background: var(--fond-doux); padding: .6rem; border-radius: 4px; max-height: 220px; overflow: auto; font-size: .82rem; }
footer { text-align: center; color: var(--gris); padding: 2rem 0 2.4rem; font-size: .85rem; border-top: 1px solid var(--filet); margin-top: 2rem; }
@media (max-width: 700px) { .results, .admin-matches { display: block; overflow-x: auto; } h1 { font-size: 1.5rem; } }
