/* Espoir Club Auxerre — feuille de style */
:root {
  --nuit: #0b0d12; --navy: #14318f; --blue: #1d4ed8; --blue-2: #3b6ff0; --sky: #ebeffb; --sky-2: #d6dff8;
  --line: #dbe3ef; --ink: #131c33; --muted: #5a6883; --bg: #f4f7fc; --card: #fff;
  --green: #17753a; --green-bg: #e1f4e7; --red: #b42318; --red-bg: #fde4e1;
  --amber: #8a5a00; --amber-bg: #fff0d1; --grey: #4b5568; --grey-bg: #e9edf3;
  --radius: 14px; --shadow: 0 1px 2px rgba(11, 47, 122, .06), 0 6px 18px rgba(11, 47, 122, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.45; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; color: var(--navy); font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* barre du haut */
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .75rem; padding: .5rem .9rem; padding-top: calc(.5rem + env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--navy); min-width: 0; }
.brand img { width: 40px; height: 40px; flex: none; }
.brand b { display: block; font-size: .95rem; line-height: 1.1; white-space: nowrap; }
.brand-sub { font-size: .72rem; color: var(--muted); font-weight: 600; }
.stripe { height: 4px; background: linear-gradient(90deg, var(--navy) 0 34%, var(--blue) 34% 67%, var(--blue-2) 67%); }
.nav { display: flex; gap: .25rem; margin-left: auto; }
.nav a { position: relative; display: flex; align-items: center; gap: .4rem; padding: .5rem .75rem; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: .9rem; }
.nav a svg { width: 20px; height: 20px; fill: currentColor; }
.nav a.active { background: var(--sky); color: var(--navy); }
.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: .68rem; padding: 0 .4rem; min-width: 18px; text-align: center; line-height: 18px; }
@media (max-width: 760px) {
  .nav { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); margin: 0; padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom)); justify-content: space-around; z-index: 30; }
  .nav a { flex-direction: column; gap: .1rem; font-size: .7rem; padding: .35rem .6rem; flex: 1; }
  .nav a .badge { position: absolute; top: 2px; right: 18%; }
  .nav { padding-left: .15rem; padding-right: .15rem; gap: 0; }
  .nav a { min-width: 0; padding: .35rem .1rem; font-size: .64rem; letter-spacing: -.01em; }
  .nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .main { padding-bottom: 5.5rem !important; }
}
.main { max-width: 1040px; margin: 0 auto; padding: 1rem .9rem 2.5rem; }
.loading { padding: 3rem 0; text-align: center; color: var(--muted); }

/* éléments communs */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; margin-bottom: .9rem; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--sky); }
.btn:focus-visible, .tile:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; } .btn-primary:hover { background: var(--navy); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; } .btn-green:hover { background: #115c2d; }
.btn-danger { color: var(--red); border-color: #f2c4bf; } .btn-danger:hover { background: var(--red-bg); }
.btn-sm { min-height: 36px; padding: .3rem .7rem; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.icon-btn { border: 0; background: none; font-size: 1.2rem; cursor: pointer; padding: .4rem .6rem; border-radius: 8px; color: var(--muted); }
.field { margin-bottom: .8rem; }
.field label, .lbl { display: block; font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: .25rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c3cfe0; border-radius: 10px; padding: .6rem .7rem; min-height: 44px; }
textarea { min-height: 80px; resize: vertical; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; flex: none; accent-color: var(--blue); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.alert { border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; margin-bottom: .8rem; }
.alert.error { background: var(--red-bg); color: var(--red); } .alert.info { background: var(--sky); color: var(--navy); } .alert.warn { background: var(--amber-bg); color: var(--amber); } .alert.ok { background: var(--green-bg); color: var(--green); }
.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; background: var(--grey-bg); color: var(--grey); }
.pill.green { background: var(--green-bg); color: var(--green); } .pill.red { background: var(--red-bg); color: var(--red); } .pill.amber { background: var(--amber-bg); color: var(--amber); } .pill.blue { background: var(--sky); color: var(--navy); }
.cat { background: var(--navy); color: #fff; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; margin-bottom: .6rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.chip small { font-weight: 600; color: var(--muted); margin-left: .25rem; }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; } .chip.active small { color: #c9d8f6; }

/* connexion */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, var(--navy), var(--blue)); }
.login-card { width: 100%; max-width: 380px; padding: 1.5rem; }
.login-brand { text-align: center; margin-bottom: 1rem; } .login-brand img { width: 110px; height: 110px; }
.login-brand h1 { margin: .4rem 0 0; font-size: 1.25rem; }

/* séance */
.datebar { display: flex; align-items: center; gap: .4rem; margin-bottom: .7rem; }
.datebar .day { flex: 1; text-align: center; font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.datebar .day::first-letter { text-transform: uppercase; }
.datebar input[type=date] { width: auto; }
@media (max-width: 520px) { .datebar { flex-wrap: wrap; } .datebar input[type=date] { flex-basis: 100%; } }
.counter { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .7rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .55rem; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .7rem .3rem .55rem; min-height: 112px; border-radius: var(--radius); border: 2px solid var(--line); background: #fff; font: inherit; color: var(--ink); cursor: pointer; text-align: center; transition: transform .08s; }
.tile:active { transform: scale(.96); }
.tile .av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--sky); color: var(--navy); }
.tile b { font-size: .9rem; line-height: 1.15; overflow-wrap: anywhere; } .tile i { font-style: normal; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.tile .st { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tile.P { border-color: var(--green); background: var(--green-bg); } .tile.P .av { background: var(--green); color: #fff; } .tile.P .st { color: var(--green); }
.tile.A { border-color: #e7a59e; background: var(--red-bg); } .tile.A .av { background: var(--red); color: #fff; } .tile.A .st { color: var(--red); }
.tile.E { border-color: #e6c173; background: var(--amber-bg); } .tile.E .av { background: var(--amber); color: #fff; } .tile.E .st { color: var(--amber); }
.tile .due { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* listes */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: .7rem; padding: .65rem .2rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.item:last-child { border-bottom: 0; }
a.item:hover { background: var(--sky); }
.item .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--sky); color: var(--navy); flex: none; }
.item .t { font-weight: 700; } .item .s { font-size: .82rem; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: .9rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; }
.kpi .v { font-size: 1.45rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.15; } .kpi .l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi.red .v { color: var(--red); } .kpi.green .v { color: var(--green); }
.bar { height: 8px; border-radius: 99px; background: var(--grey-bg); overflow: hidden; } .bar > span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .9rem; margin: 0; } .dl dt { color: var(--muted); font-size: .85rem; } .dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.hist { display: flex; gap: .3rem; flex-wrap: wrap; }
.hist span { font-size: .72rem; font-weight: 700; padding: .15rem .45rem; border-radius: 6px; background: var(--grey-bg); }
.hist .P { background: var(--green-bg); color: var(--green); } .hist .A { background: var(--red-bg); color: var(--red); } .hist .E { background: var(--amber-bg); color: var(--amber); }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: .4rem .3rem; border-bottom: 1px solid var(--line); font-size: .9rem; } th { color: var(--muted); font-size: .78rem; }
td input { min-height: 38px; padding: .35rem .5rem; }

.payrow { flex-wrap: wrap; row-gap: .45rem; }
.payrow .grow { flex: 1 1 220px; }
@media (max-width: 520px) { .payrow .grow { flex-basis: 100%; } }

/* fenêtre */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(11, 24, 56, .5); display: grid; place-items: end center; }
.modal-box { background: #fff; width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; border-radius: 18px 18px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .modal { place-items: center; } .modal-box { border-radius: 18px; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; } .modal-head h2 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: .5rem; }
.toast { position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 12px; z-index: 80; font-weight: 600; font-size: .9rem; max-width: 92vw; }
.toast.error { background: var(--red); }
.netbar { background: var(--amber-bg); color: var(--amber); font-weight: 700; font-size: .85rem; text-align: center; padding: .4rem .8rem; }

/* pages publiques */
.public { max-width: 620px; margin: 0 auto; padding: 1rem .9rem 3rem; }
.hero { text-align: center; padding: 1.4rem 1rem 1.2rem; background: linear-gradient(160deg, var(--navy), var(--blue)); color: #fff; border-radius: 0 0 22px 22px; margin: 0 -.9rem 1rem; }
.hero img { width: 96px; height: 96px; } .hero h1 { color: #fff; margin: .5rem 0 .2rem; } .hero p { margin: 0; opacity: .9; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* five */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .45rem; }
.slot { min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; }
.slot:hover { background: var(--sky); } .slot:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
.slot.sel { background: var(--blue); border-color: var(--blue); color: #fff; }
.slot[disabled] { background: var(--grey-bg); color: #9aa5b8; text-decoration: line-through; cursor: default; }
.recap { background: var(--sky); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .8rem; } .recap b { color: var(--navy); }
.agenda { display: flex; flex-direction: column; gap: .4rem; }
.blk { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; padding: .6rem .7rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
button.blk { cursor: pointer; } button.blk:hover { background: var(--sky); }
.blk .h { font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 6.4rem; }
.blk.free { border-style: dashed; color: var(--muted); background: transparent; } .blk.free .h { color: var(--muted); font-weight: 600; }
.blk.resa { border-left: 5px solid var(--blue); } .blk.resa.paid { border-left-color: var(--green); } .blk.interne, .blk.bloc { border-left: 5px solid var(--grey); background: var(--grey-bg); }
.blk.off { opacity: .6; text-decoration: line-through; }
.demande { border: 2px solid var(--blue); border-radius: var(--radius); padding: .9rem; background: #fff; margin-bottom: .7rem; }
.demande .big { font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.stepper { display: flex; align-items: center; gap: .6rem; } .stepper output { font-size: 1.5rem; font-weight: 800; min-width: 2ch; text-align: center; color: var(--navy); }

/* téléphone avec indicatif */
.telrow { display: flex; gap: .4rem; } .telrow select { flex: none; width: 7.6rem; padding-left: .5rem; padding-right: .2rem; } .telrow input { flex: 1; min-width: 0; }

/* cartes de joueurs */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.pcard { --c1: #14318f; --c2: #1d4ed8; position: relative; display: block; aspect-ratio: 5 / 7; border-radius: 14px; overflow: hidden; text-decoration: none; color: #fff;
  background: linear-gradient(155deg, var(--c1), var(--c2)); box-shadow: 0 2px 4px rgba(11, 24, 56, .18), 0 10px 22px rgba(11, 24, 56, .16); transition: transform .12s; container-type: inline-size; }
a.pcard:hover { transform: translateY(-3px) rotate(-.6deg); } a.pcard:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 3px; }
.pc-photo { position: absolute; inset: 5% 5% 21% 21%; border-radius: 8px; background: linear-gradient(180deg, #dfe9fb, #b9cdf3) center / cover no-repeat; display: grid; place-items: center;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%); }
.pc-ini { font-weight: 900; font-size: 26cqw; color: rgba(11, 47, 122, .35); letter-spacing: -.02em; } .pc-photo.has .pc-ini { display: none; }
.pc-band { position: absolute; left: 0; top: 0; bottom: 20%; width: 19%; display: flex; align-items: center; justify-content: center; gap: 5cqw; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.pc-band b { font-size: 15cqw; font-weight: 900; line-height: 1; letter-spacing: .01em; } .pc-band i { font-style: normal; font-size: 5.2cqw; font-weight: 800; letter-spacing: .14em; opacity: .85; }
.pc-name { position: absolute; left: 6%; right: 24%; bottom: 4.5%; line-height: 1.08; }
.pc-name b { display: block; font-size: 9.6cqw; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-name i { display: block; font-style: normal; font-size: 7cqw; font-weight: 700; opacity: .9; text-transform: uppercase; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-logo { position: absolute; right: 5%; bottom: 4%; width: 21%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.pc-num { position: absolute; top: 7%; right: 8%; font-size: 6cqw; font-weight: 800; background: rgba(11, 24, 56, .62); padding: .1em .5em; border-radius: 99px; }
.pc-flag { position: absolute; top: 7%; left: 24%; font-size: 5.4cqw; font-weight: 800; background: #fff; color: var(--red); padding: .12em .5em; border-radius: 99px; }
.pc-flag.ok { color: var(--green); } .pc-flag.wait { color: var(--amber); }
.pc-big { max-width: 250px; margin: 0 auto .9rem; }
.cathead { display: flex; align-items: baseline; gap: .6rem; margin: 1rem 0 .6rem; } .cathead h2 { margin: 0; } .cathead span { color: var(--muted); font-size: .88rem; font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; flex: none; }
.seg button { border: 0; background: none; font: inherit; font-weight: 700; font-size: .85rem; color: var(--muted); padding: .5rem .8rem; min-height: 40px; cursor: pointer; } .seg button.active { background: var(--navy); color: #fff; }
.pc-due { position: absolute; top: 7.5%; left: 25%; width: 6cqw; height: 6cqw; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }

/* actualiser et mise à jour */
.refresh-btn { flex: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .4rem .7rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.refresh-btn:hover { background: var(--sky); } .refresh-btn:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
.refresh-btn svg { width: 20px; height: 20px; fill: currentColor; } .refresh-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .refresh-btn { margin-left: auto; } .refresh-btn span { position: absolute; left: -9999px; } }
.updatebar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(5.2rem + env(safe-area-inset-bottom)); z-index: 70; width: min(94vw, 460px); display: flex; align-items: center; gap: .8rem; background: var(--navy); color: #fff; border-radius: 14px; padding: .7rem .9rem; box-shadow: 0 8px 24px rgba(11, 24, 56, .35); }
.updatebar div { flex: 1; line-height: 1.25; } .updatebar b { display: block; } .updatebar span { font-size: .82rem; opacity: .85; } .updatebar .btn { flex: none; }
/* photo détourée : le joueur se détache sur le fond clair de la carte */
.pc-photo.has { background: var(--ph) center / cover no-repeat, linear-gradient(180deg, #dfe9fb, #b9cdf3); }
.photo-prev { width: min(60vw, 230px); aspect-ratio: 3 / 4; margin: 0 auto .8rem; border-radius: 12px; background: linear-gradient(180deg, #dfe9fb, #b9cdf3); overflow: hidden; }
.photo-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* réponses des parents sur les tuiles de séance */
.tile .rep { font-size: .62rem; font-weight: 800; padding: .08rem .4rem; border-radius: 99px; background: var(--green-bg); color: var(--green); white-space: nowrap; }
.tile .rep.absent { background: var(--amber-bg); color: var(--amber); }
.tile.r-present { border-color: #9fd3b0; border-style: dashed; } .tile.r-absent { border-color: #e6c173; border-style: dashed; opacity: .8; }
.rsvp { display: flex; gap: .4rem; flex: none; } .rsvp .btn.on-present { background: var(--green); border-color: var(--green); color: #fff; } .rsvp .btn.on-absent { background: var(--amber); border-color: var(--amber); color: #fff; }

/* boutons « retour » */
.back-btn { flex: none; display: inline-flex; align-items: center; gap: .1rem; min-height: 40px; padding: .3rem .7rem .3rem .3rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--navy); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; }
.back-btn:hover { background: var(--sky); } .back-btn:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; }
.back-btn svg { width: 22px; height: 22px; fill: currentColor; }
@media (max-width: 420px) { .topbar { gap: .45rem; } .back-btn span { position: absolute; left: -9999px; } .back-btn { padding: .3rem; } .brand b { font-size: .88rem; } }
.hero { position: relative; }
.backlink { position: absolute; left: .7rem; top: .7rem; display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; }
.backlink:hover { background: rgba(255, 255, 255, .28); } .backlink:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* reçu de paiement et impression */
.recu { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: #fff; }
.recu-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; } .recu-head img { width: 52px; height: 52px; }
.recu h3 { margin: .2rem 0 .6rem; } .recu dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; margin: 0; } .recu dt { color: var(--muted, #5b6781); } .recu dd { margin: 0; font-weight: 600; }
.recu-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: .8rem; padding-top: .6rem; border-top: 2px solid var(--line); } .recu-total b { font-size: 1.5rem; }
.recu-sign { margin-top: 1.1rem; height: 70px; border: 1px dashed #b9c4d8; border-radius: 8px; padding: .3rem .5rem; font-size: .75rem; color: #7a869d; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
@media print {
  .topbar, .stripe, .netbar, .no-print, .toast, .modal-head button { display: none !important; }
  body { background: #fff; } .main { padding: 0; } .card { box-shadow: none; break-inside: avoid; }
  body.print-recu #app { display: none; }
  body.print-recu .modal { position: static; background: none; display: block; padding: 0; } body.print-recu .modal-box { box-shadow: none; max-width: 420px; margin: 0 auto; max-height: none; }
}

/* photos interdites (droit à l'image refusé) : pastille rouge dans la photo de la carte */
.pc-nophoto { position: absolute; left: 4%; bottom: 4%; width: 24%; aspect-ratio: 1; border-radius: 50%; background: #d92d20; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.pc-nophoto svg { width: 66%; height: 66%; }
.pc-photo { overflow: visible; }
/* signature à l'inscription */
.sigpad { position: relative; border: 2px dashed #9fb0cf; border-radius: 12px; background: #fff; touch-action: none; }
.sigpad canvas { display: block; width: 100%; height: 170px; border-radius: 10px; cursor: crosshair; touch-action: none; }
.sigpad .hint { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa6bd; pointer-events: none; font-size: .95rem; }
.sigpad.done .hint { display: none; } .sigpad.done { border-style: solid; border-color: var(--blue, #1d4ed8); }
.choice { display: grid; gap: .5rem; } .choice label { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.choice input { margin-top: .2rem; width: 20px; height: 20px; flex: none; } .choice label:has(input:checked) { border-color: var(--blue, #1d4ed8); box-shadow: 0 0 0 2px rgba(18, 87, 214, .15); }

/* bouton de langue et affichage de droite à gauche (arabe) */
.lang-btn { position: absolute; top: calc(.7rem + env(safe-area-inset-top)); inset-inline-end: .8rem; z-index: 2; min-height: 36px; padding: .2rem .8rem; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.lang-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hero { position: relative; }
[dir=rtl] body { font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Geeza Pro", system-ui, sans-serif; }
[dir=rtl] .fv h1, [dir=rtl] .fv h2, [dir=rtl] .fv h3, [dir=rtl] .fv-go b, [dir=rtl] .fv-format b, [dir=rtl] .fv .demande .big { font-family: inherit; font-weight: 700; letter-spacing: 0; }
[dir=rtl] .pcard, [dir=rtl] .telrow, [dir=rtl] .fv-ticket-top .time, [dir=rtl] .slot b, [dir=rtl] .fv-bar b, [dir=rtl] canvas { direction: ltr; }
[dir=rtl] .fv-go em, [dir=rtl] .fv-back { transform: scaleX(-1); }
[dir=rtl] .fv-stamp { right: auto; left: .9rem; transform: rotate(-6deg); }
[dir=rtl] .fv-ticket-bot .price { text-align: left; }
[dir=rtl] .fv-format { text-align: right; } [dir=rtl] .fv-format[aria-pressed=true]::after { right: auto; left: .95rem; }
[dir=rtl] .fv-back { margin-left: 0; margin-right: -.4rem; }
[dir=rtl] .fv .demande { border-left: 0; border-right: 6px solid var(--turf); }
[dir=rtl] .fv-bar b { text-align: right; }

/* pointage : les tuiles sont les cartes de joueurs, avec l'état sous la carte */
.tiles:has(.tcard) { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .8rem; }
.tile.tcard { padding: 4px 4px .4rem; gap: .3rem; min-height: 0; border-width: 3px; border-radius: 18px; align-items: stretch; background: #fff; }
.tile.tcard .pcard { width: 100%; text-align: start; }
.tile.tcard .pc-name b { font-size: 9.6cqw; overflow-wrap: normal; } .tile.tcard .pc-name i { font-size: 7cqw; color: #fff; }
.tile.tcard .pc-band b { font-size: 15cqw; } .tile.tcard .pc-band i { font-size: 5.2cqw; color: #fff; text-transform: none; }
.tile.tcard .st { font-size: .74rem; padding: .1rem 0; }
.tile.tcard.P { border-color: var(--green); background: var(--green-bg); } .tile.tcard.A { border-color: var(--red); background: var(--red-bg); } .tile.tcard.E { border-color: var(--amber); background: var(--amber-bg); }
.tile.tcard.A .pcard, .tile.tcard.E .pcard { filter: grayscale(.75); opacity: .75; }
.tile.tcard.r-present .st { color: var(--green); } .tile.tcard.r-absent .st { color: var(--amber); }

/* fond du club derrière la photo du joueur : visible dès que la photo est détourée (fond transparent) */
.pc-photo.has { background: var(--ph) center bottom / auto 94% no-repeat, url("/assets/fond-joueur.jpg") center / 100% 100% no-repeat; }
.photo-prev { background: url("/assets/fond-joueur.jpg") center / cover no-repeat; }
.photo-prev img { object-fit: contain; object-position: center bottom; height: 94%; margin-top: 6%; }

/* occupation des terrains : grille du jour et taux de la semaine */
.oc-grid { display: grid; gap: 2px; align-items: stretch; }
.oc-t { text-align: center; font-weight: 800; color: var(--navy); padding: .2rem 0 .4rem; position: sticky; top: 0; background: #fff; }
.oc-h { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; transform: translateY(-.45rem); }
.oc-c { min-height: 26px; border: 0; border-radius: 5px; padding: 0 .3rem; font: inherit; font-size: .7rem; font-weight: 700; line-height: 26px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.oc-c.free { background: #e4f4ea; cursor: pointer; } .oc-c.free:hover { background: #c5e8d1; }
.oc-c.resa { background: var(--blue); cursor: pointer; } .oc-c.resa.paid { background: var(--green); }
.oc-c.bloc, .oc-c.interne { background: #8f9bb3; } button.oc-c.interne { cursor: pointer; }
.oc-c:focus-visible { outline: 3px solid var(--navy); outline-offset: 1px; }
.oc-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-left: .5rem; } .oc-key.resa { background: var(--blue); } .oc-key.resa.paid { background: var(--green); } .oc-key.bloc { background: #8f9bb3; } .oc-key.free { background: #c5e8d1; }
.oc-pct { display: inline-block; min-width: 3.4rem; padding: .1rem .4rem; border-radius: 6px; font-weight: 700; background: color-mix(in srgb, var(--blue) calc(var(--p) * .5%), #eef2f9); color: var(--ink); }

/* tableau de bord : barres horizontales */
.bd-row { display: grid; grid-template-columns: minmax(7.5rem, 30%) 1fr auto; gap: .6rem; align-items: center; padding: .28rem 0; }
.bd-l { font-weight: 600; } .bd-v { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 4.5rem; text-align: right; }
.bd-b { display: flex; height: 14px; border-radius: 7px; background: #e8edf6; overflow: hidden; }
.bd-b i { display: block; height: 100%; background: var(--blue); } .bd-b i.b2 { background: #12a36b; } .bd-b i.b3 { background: var(--amber); }

/* messagerie (chat.js) */
.chat { position: relative; display: flex; height: clamp(420px, 75dvh, 760px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-list, .chat-thread { min-width: 0; display: flex; flex-direction: column; }
.chat-list { flex: 1 1 100%; overflow-y: auto; }
.chat-thread { flex: 1 1 100%; }
.chat:not(.has-thread) .chat-thread, .chat.has-thread .chat-list { display: none; }
.chat-none, .chat-pane { display: none; }
.chat.has-thread .chat-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-empty { text-align: center; padding: 1.4rem 1rem; margin: 0; }
.chat-row { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .75rem .9rem; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: var(--ink); text-align: start; cursor: pointer; }
.chat-row:hover, .chat-row.on { background: var(--sky); }
/* conversations retirées de ma liste : visibles seulement avec le filtre « Retirées » (gestion) */
.chat-list:not(.show-retirees) .chat-row[data-retiree] { display: none; }
.chat-row:focus-visible, .chat-btn:focus-visible, .chat-back:focus-visible, .chat-doc:focus-visible { outline: 3px solid var(--navy); outline-offset: -2px; }
.chat-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-row-main b { color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row-last { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row.unread .chat-row-last { color: var(--ink); font-weight: 700; }
.chat-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; flex: none; }
.chat-row-time { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chat-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--blue); display: block; }
.chat-head { display: flex; align-items: center; gap: .4rem; padding: .5rem .7rem; border-bottom: 1px solid var(--line); background: #fff; }
.chat-title { color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-x { margin-inline-start: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .35rem; }
.chat-head-x:empty { display: none; }
.chat-back { border: 0; background: none; font-size: 1.8rem; line-height: 1; padding: 0 .5rem; color: var(--navy); cursor: pointer; min-width: 44px; min-height: 44px; }
[dir=rtl] .chat-back { transform: scaleX(-1); }
.chat-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: .7rem; background: var(--bg); display: flex; flex-direction: column; gap: .3rem; }
.chat-day { align-self: center; font-size: .75rem; color: var(--muted); background: var(--grey-bg); border-radius: 99px; padding: .1rem .7rem; margin: .5rem 0 .2rem; text-transform: capitalize; }
.chat-msg { display: flex; }
.chat-msg.mine { justify-content: flex-end; } .chat-msg.theirs { justify-content: flex-start; }
.chat-bubble { position: relative; max-width: min(82%, 34rem); padding: .4rem .65rem .3rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; -webkit-touch-callout: none; user-select: text; }
.chat-msg.mine .chat-bubble { background: var(--blue); border-color: var(--blue); color: #fff; border-end-end-radius: 4px; }
.chat-msg.theirs .chat-bubble { background: var(--sky); border-color: var(--sky-2); border-end-start-radius: 4px; }
.chat-msg.flash .chat-bubble { outline: 3px solid var(--blue-2); }
.chat-bubble.gone { font-style: italic; color: var(--muted); background: transparent; border-style: dashed; }
.chat-msg.mine .chat-bubble.gone { color: var(--muted); }
.chat-name { display: block; font-size: .75rem; color: var(--navy); }
.chat-msg.mine .chat-name { color: #cfe0ff; }
.chat-text { white-space: pre-wrap; }
.chat-time { display: flex; justify-content: flex-end; gap: .3rem; font-size: .68rem; opacity: .75; font-variant-numeric: tabular-nums; margin-top: .1rem; }
.chat-tick.seen { color: #7fe3ff; font-weight: 800; }
.chat-more { position: absolute; top: 2px; inset-inline-end: 4px; border: 0; background: none; color: inherit; opacity: 0; font-size: 1rem; line-height: 1; padding: .1rem .3rem; cursor: pointer; }
.chat-bubble:hover .chat-more, .chat-more:focus-visible { opacity: .8; }
.chat-quote { border-inline-start: 3px solid var(--blue-2); background: rgba(11, 47, 122, .08); border-radius: 6px; padding: .15rem .45rem; margin-bottom: .25rem; font-size: .82rem; cursor: pointer; max-height: 3.6em; overflow: hidden; white-space: pre-wrap; }
.chat-msg.mine .chat-quote { background: rgba(255, 255, 255, .18); border-color: #fff; }
.chat-img { display: block; max-width: 100%; width: 260px; min-height: 90px; border-radius: 8px; background: var(--grey-bg); cursor: zoom-in; }
.chat-audio { display: block; width: 240px; max-width: 100%; height: 40px; }
.chat-doc { display: block; font: inherit; font-weight: 700; color: inherit; background: rgba(11, 47, 122, .08); border: 0; border-radius: 8px; padding: .5rem .7rem; text-align: start; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pjerr { font-size: .85rem; opacity: .8; }
.chat-cite { display: flex; align-items: center; gap: .5rem; padding: .3rem .7rem; background: var(--sky); border-top: 1px solid var(--line); border-inline-start: 4px solid var(--blue); font-size: .85rem; }
.chat-cite-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-cite-x { border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--muted); min-width: 32px; min-height: 32px; }
.chat-err { color: var(--red); font-size: .85rem; padding: 0 .8rem; } .chat-err:not(:empty) { padding: .3rem .8rem; background: var(--red-bg); }
.chat-rec { display: flex; align-items: center; gap: .5rem; padding: .35rem .8rem; background: var(--red-bg); color: var(--red); font-weight: 700; font-size: .9rem; }
.chat-rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: chat-pulse 1s infinite; }
@keyframes chat-pulse { 50% { opacity: .25; } }
.chat-closed { padding: .8rem; text-align: center; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.chat-form { display: flex; align-items: flex-end; gap: .35rem; padding: .5rem; padding-bottom: calc(.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.chat-form.busy { opacity: .6; pointer-events: none; }
.chat-input { flex: 1; min-width: 0; resize: none; font: inherit; font-size: 1rem; border: 1px solid var(--line); border-radius: 18px; padding: .5rem .8rem; max-height: 140px; background: var(--bg); color: var(--ink); }
.chat-btn { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sky); color: var(--navy); font-size: 1.15rem; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.chat-btn.chat-send { background: var(--blue); color: #fff; } [dir=rtl] .chat-send { transform: scaleX(-1); }
.chat-btn.on { background: var(--red); color: #fff; }
.chat-menu { position: absolute; z-index: 5; min-width: 10rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.chat-menu button { display: block; width: 100%; text-align: start; font: inherit; padding: .7rem 1rem; border: 0; background: none; cursor: pointer; color: var(--ink); }
.chat-menu button:hover, .chat-menu button:focus-visible { background: var(--sky); outline: none; }
@media (min-width: 800px) {
  .chat-list { flex: 0 0 320px; border-inline-end: 1px solid var(--line); }
  .chat-thread { flex: 1; }
  .chat:not(.has-thread) .chat-thread, .chat.has-thread .chat-list { display: flex; }
  .chat:not(.has-thread) .chat-none { display: flex; flex: 1; align-items: center; justify-content: center; color: var(--muted); }
  .chat-back { display: none; }
}

/* modules coupés pour ce club (club.config.json → data-off sur <html>) : leurs entrées disparaissent */
[data-off~="five"] #nav a[data-r="five"], [data-off~="five"] a[href^="/five"], [data-off~="five"] a[href="#/five"], [data-off~="five"] .five-only,
[data-off~="messagerie"] #nav a[data-r="chat"], [data-off~="messagerie"] #chatSec, [data-off~="messagerie"] a[href^="#/chat"],
[data-off~="matchs"] a[href="#/matchs"], [data-off~="arabe"] .lang-btn,
[data-off~="cotisations"] #nav a[data-r="paiements"], [data-off~="cotisations"] a[href="#/paiements"], [data-off~="cotisations"] .cot-only, [data-off~="cotisations"][data-off~="five"] a[href="#/caisse"],
[data-off~="championnat"] #nav a[data-r="championnat"], [data-off~="championnat"] a[href^="/championnat"] { display: none !important; }

/* ---------- espace parents en onglets (Accueil, Actus, Messages, Mon enfant) ---------- */
body.ptabs .public { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
body.ptabs .hero { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; align-items: center; text-align: start; padding: .75rem 7rem .75rem 1rem; }
body.ptabs .hero img { width: 44px; height: 44px; grid-row: span 2; } body.ptabs .hero h1 { font-size: 1.1rem; margin: 0; align-self: end; } body.ptabs .hero p { font-size: .82rem; align-self: start; }
body.ptabs .hero .lang-btn { top: 50%; transform: translateY(-50%); }
body.ptabs .public > p.small { display: none; }
.pnav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; width: min(480px, calc(100% - 16px)); padding: .3rem; background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 8px 28px rgba(11, 47, 122, .18); backdrop-filter: blur(8px); }
.pnav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: .08rem; padding: .45rem .2rem .4rem; border-radius: 16px; color: var(--muted); text-decoration: none; font-weight: 800; font-size: .7rem; transition: background .2s, color .2s; }
.pnav a svg { width: 23px; height: 23px; fill: currentColor; }
.pnav a.on { color: #fff; background: linear-gradient(135deg, var(--navy), var(--blue)); box-shadow: 0 4px 12px rgba(18, 87, 214, .35); }
.pnav a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.pbadge { position: absolute; top: 3px; right: calc(50% - 24px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 900; display: grid; place-items: center; border: 2px solid #fff; }
.tabview { animation: tabIn .28s ease-out backwards; } .tabview.tab-messages { animation-name: tabFade; }
@keyframes tabIn { from { opacity: 0; transform: translateY(8px); } } @keyframes tabFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tabview { animation: none; } }
.tabhead { margin: .2rem 0 1rem; } .tabhead h1 { margin: 0; } .tabhead p { margin: .15rem 0 0; }
.tab-messages .chat { height: calc(100dvh - 19.5rem); min-height: 360px; }
.hsec { margin-top: 1.3rem; } .hsec-h { display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; } .hsec-h h2 { margin: 0; }
.hsec-more { margin-left: auto; background: none; border: 0; font: inherit; font-weight: 800; font-size: .88rem; color: var(--blue); cursor: pointer; padding: .3rem; min-height: 36px; }
.notice { display: flex; gap: .6rem; align-items: flex-start; background: var(--red-bg); color: var(--red); border-radius: var(--radius); padding: .7rem .85rem; margin-bottom: .8rem; } .notice b { color: var(--red); }
.nx-card { border-inline-start: 5px solid var(--blue); }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.todo li { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; }
.todo li > div { flex: 1; min-width: 0; } .todo b { display: block; color: var(--navy); } .todo small { color: var(--muted); }
.td-ic { font-size: 1.3rem; }
.allgood { display: flex; gap: .7rem; align-items: center; background: var(--green-bg); border-radius: var(--radius); padding: .8rem; } .allgood > span { font-size: 1.3rem; color: var(--green); font-weight: 900; }
.allgood b { display: block; color: var(--green); } .allgood small { color: var(--green); }
.empty-mini { color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: .9rem; text-align: center; }
.empty, .empty-news { text-align: center; padding: 2rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.empty img, .empty-news img { width: 72px; opacity: .9; margin-bottom: .5rem; } .empty b { display: block; font-size: 1.1rem; color: var(--navy); }
/* cartes d'actualité (espace parents et écran du responsable) */
.nlist { display: grid; gap: .8rem; }
.ncard2 { --cat: var(--blue); --catbg: var(--sky); position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.ncard2::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px; background: var(--cat); z-index: 1; }
.ncard2.c-event { --cat: #7a2f9e; --catbg: #f2e6f8; } .ncard2.c-match { --cat: var(--green); --catbg: var(--green-bg); } .ncard2.c-kit { --cat: #a86b00; --catbg: #fff4cf; }
.ncard2.c-rem { --cat: #0f7c8c; --catbg: #e0f4f6; } .ncard2.c-club { --cat: var(--navy); --catbg: var(--sky-2); } .ncard2.c-off { --cat: var(--red); --catbg: var(--red-bg); margin-bottom: .8rem; }
.n-img { display: block; width: 100%; background: var(--bg); } .n-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--grey-bg); }
.n-body { padding: .85rem 1rem 1rem 1.15rem; }
.n-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .35rem; }
.n-cat { font-size: .74rem; font-weight: 800; color: var(--cat); background: var(--catbg); border-radius: 999px; padding: .12rem .55rem; }
.n-pin { font-size: .74rem; font-weight: 700; color: var(--muted); }
.n-new { font-size: .68rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--red); border-radius: 999px; padding: .1rem .45rem; }
.n-date { margin-inline-start: auto; font-size: .78rem; font-weight: 700; color: var(--muted); }
.ncard2 h3 { margin: 0 0 .25rem; font-size: 1.1rem; color: var(--navy); }
.n-text { color: #33425c; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; } .n-text p { margin: 0 0 .5em; } .n-text p:last-child { margin: 0; }
.n-foot { margin-top: .6rem; display: flex; gap: .3rem; flex-wrap: wrap; }
.ncard2.compact { cursor: pointer; display: flex; } .ncard2.compact .n-img { width: 96px; flex: none; } .ncard2.compact .n-img img { height: 100%; aspect-ratio: auto; }
.ncard2.compact .n-body { flex: 1; min-width: 0; padding: .7rem .9rem .75rem 1.1rem; } .ncard2.compact h3 { font-size: 1rem; }
.ncard2.compact .n-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .88rem; }
.ncard2[role=button] { cursor: pointer; } .ncard2[role=button]:hover, .ncard2[role=link]:hover { border-color: var(--blue-2); }
.ncard2:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.n-pick { display: flex; gap: .8rem; align-items: center; } .n-prev { width: 150px; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--grey-bg); display: grid; place-items: center; overflow: hidden; flex: none; }
.n-prev img { width: 100%; height: 100%; object-fit: cover; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ------------------------------------------------------------------ championnat (classement, résultats, calendrier) */
.pnav.n5 { grid-template-columns: repeat(5, 1fr); } .pnav.n5 a { font-size: .64rem; }
.ch-scroll { overflow-x: auto; margin: 0 -.2rem; }
.ch-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.ch-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 800; padding: .4rem .3rem; text-align: center; border-bottom: 1px solid var(--line); }
.ch-table td { padding: .55rem .3rem; text-align: center; border-bottom: 1px solid var(--line); color: var(--muted); }
.ch-table .ch-team { text-align: left; color: var(--ink); font-weight: 600; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.ch-table .ch-pts { color: var(--ink); font-weight: 900; font-size: 1rem; }
.ch-table .ch-rang { color: var(--ink); font-weight: 800; white-space: nowrap; text-align: left; }
.ch-table tr.ch-nous td { background: var(--sky); } .ch-table tr.ch-nous .ch-team { color: var(--navy); font-weight: 900; }
.ch-up { color: var(--green); font-size: .65rem; margin-left: .2rem; } .ch-down { color: var(--red); font-size: .65rem; margin-left: .2rem; }
.ch-pen { font-size: .7rem; color: var(--red); font-weight: 800; }
.ch-forme { white-space: nowrap; }
.ch-f { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 5px; font-style: normal; font-size: .65rem; font-weight: 900; margin: 0 1px; color: #fff; flex: none; }
.ch-f-v { background: var(--green); } .ch-f-n { background: var(--grey-bg); color: var(--grey); } .ch-f-d { background: var(--red); }
.ch-list { display: grid; gap: .5rem; }
.ch-match { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .35rem .6rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .75rem .7rem; }
.ch-side { display: flex; align-items: center; gap: .4rem; } .ch-note { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; }
.ch-match.ch-mine { border-color: var(--blue-2); box-shadow: inset 3px 0 0 var(--blue); }
.ch-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; font-size: .75rem; color: var(--muted); } .ch-when span { font-weight: 900; color: var(--navy); font-size: .8rem; }
.ch-ff { color: var(--red); font-weight: 700; }
.ch-line { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; min-width: 0; }
.ch-mt { font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; } .ch-line .ch-mt:first-child { text-align: right; }
.ch-me { color: var(--navy); font-weight: 900; } .ch-win { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ch-score { font-size: 1.15rem; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; } .ch-vs { font-size: .8rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.ch-hero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.ch-hero > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem; text-align: center; }
.ch-hero b { display: block; font-size: 1.5rem; color: var(--navy); font-weight: 900; } .ch-hero small { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.ch-score-in { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.ch-score-in input { width: 4rem; text-align: center; font-size: 1.6rem; font-weight: 900; }
@media (max-width: 420px) { .ch-table th:nth-child(8), .ch-table td:nth-child(8) { display: none; } }

/* direct */
.ch-live { display: inline-flex; align-items: center; gap: .3rem; background: #c62828; color: #fff; font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; padding: .2rem .55rem; white-space: nowrap; }
.ch-live::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: #fff; animation: chpouls 2s ease-in-out infinite; }
@keyframes chpouls { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ch-live::before { animation: none; } }
.ch-score-live { color: #c62828; }
.ch-livecap { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); margin: 0 0 .5rem; }
.dl-score { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: center; text-align: center; }
.dl-score .nm { font-weight: 800; font-size: 1rem; }
.dl-score .sc { font-size: 2.6rem; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .8rem; }
.dl-but { min-height: 64px; font-size: 1.15rem; font-weight: 900; }
.dl-moins { min-height: 44px; }

/* logo de l'organisateur (page du championnat) : fond blanc, car le logo est sur fond blanc */
.hero .hero-org { display: inline-flex; background: #fff; border-radius: 14px; padding: .35rem .7rem; }
.hero .hero-org img { width: 180px; height: auto; }

/* ================================================================== habillage « club de foot »
   Polices hébergées avec l'appli (Inter, Barlow Condensed : licence SIL OFL, dans assets/fonts). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url("/assets/fonts/inter-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("/assets/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2"); }
/*
   Fonds sombres (couleur de nuit), titres en capitales condensées, accents de la couleur principale. */
:root { --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --disp: "Barlow Condensed", "Arial Narrow", sans-serif; --bg: #f2f4f8; --line: #e1e6ef; --radius: 16px;
  --shadow: 0 1px 2px rgba(10, 14, 25, .05), 0 8px 24px rgba(10, 14, 25, .06); }
h1, h2, h3 { font-family: var(--disp); text-transform: uppercase; letter-spacing: .01em; font-weight: 800; color: var(--nuit); line-height: 1.05; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.12rem; font-weight: 700; }
.card { border: 0; box-shadow: var(--shadow); padding: 1.15rem 1.2rem; }
.card > h2:first-child { display: flex; align-items: center; gap: .5rem; }
.card > h2:first-child::before { content: ""; width: 5px; height: 1em; border-radius: 3px; background: var(--blue); flex: none; }

/* barre du haut sombre */
.topbar { background: var(--nuit); border-bottom: 0; color: #fff; padding: .55rem 1.1rem; padding-top: calc(.55rem + env(safe-area-inset-top)); box-shadow: 0 2px 14px rgba(0, 0, 0, .25); }
.brand { color: #fff; } .brand b { font-family: var(--disp); text-transform: uppercase; font-size: 1.25rem; letter-spacing: .02em; font-weight: 800; }
.brand .brand-sub, .topbar .brand-sub { color: #9aa6bd; }
.brand img { background: #fff; border-radius: 50%; padding: 2px; }
.nav a { color: #b8c2d6; border-radius: 0; padding: .9rem .75rem; margin: -.55rem 0; font-weight: 600; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav a.active { background: transparent; color: #fff; box-shadow: inset 0 -3px 0 var(--blue-2); }
.back-btn, .refresh-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.back-btn:hover, .refresh-btn:hover { background: rgba(255, 255, 255, .16); }
.stripe { height: 3px; background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
@media (max-width: 760px) {
  .nav { background: var(--nuit); border-top: 0; box-shadow: 0 -4px 18px rgba(0, 0, 0, .2); }
  .nav a { margin: 0; padding: .45rem .1rem; border-radius: 10px; }
  .nav a.active { box-shadow: none; background: rgba(255, 255, 255, .1); color: #fff; }
}
.main { max-width: 1120px; padding-top: 1.6rem; }

/* boutons, onglets, champs */
.btn { border-radius: 12px; font-weight: 700; border-color: var(--line); }
.btn-primary { background: var(--blue); border-color: var(--blue); box-shadow: 0 4px 14px color-mix(in srgb, var(--blue) 35%, transparent); }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); }
.chip { border-color: var(--line); font-weight: 700; }
.chip.active { background: var(--nuit); border-color: var(--nuit); }
.seg button.active, .seg .active { background: var(--nuit); color: #fff; }
input, select, textarea { border-color: #d3dae6; border-radius: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
.pill { font-weight: 700; }

/* connexion et en-têtes publics : fond sombre avec une lueur de la couleur principale */
.login { background: radial-gradient(90% 70% at 100% 0, color-mix(in srgb, var(--blue) 55%, transparent) 0, transparent 60%), var(--nuit); }
.login-brand h1 { font-size: 1.8rem; }
.hero { background: radial-gradient(100% 90% at 100% 0, color-mix(in srgb, var(--blue) 60%, transparent) 0, transparent 60%), var(--nuit); }
.hero h1 { font-family: var(--disp); font-size: 2rem; }
.pnav { background: color-mix(in srgb, var(--nuit) 94%, transparent); border-color: rgba(255, 255, 255, .08); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.pnav a { color: #aeb8cc; }
.pnav a.on { background: var(--blue); box-shadow: 0 4px 14px color-mix(in srgb, var(--blue) 45%, transparent); }
.tabhead h1 { font-size: 2rem; }
.ch-score, .ch-hero b, .dl-score .sc { font-family: var(--disp); }
.ch-table th { font-family: var(--disp); font-size: .85rem; }

/* barre du haut : le nom du club ne déborde pas sur le menu */
.topbar .brand { flex: 0 1 auto; min-width: 0; } .topbar .brand > div { min-width: 0; }
.topbar .brand b { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; }
.nav { min-width: 0; } .nav a { padding-left: .6rem; padding-right: .6rem; }
@media (min-width: 761px) and (max-width: 1180px) { .topbar .brand-sub { display: none; } .nav a { font-size: .85rem; padding-left: .45rem; padding-right: .45rem; } .nav a svg { display: none; } }
/* carte joueur : catégorie en capitales condensées, sans chevaucher le nom */
.pc-band { overflow: hidden; } .pc-band b { font-family: var(--disp); font-size: 13cqw; letter-spacing: .03em; text-transform: uppercase; } .pc-band i { font-size: 4.4cqw; }

/* ================================================================== menu latéral (ordinateur et tablette)
   Sur grand écran, la barre du haut devient une colonne fixe à gauche ; sur téléphone, le menu reste en bas. */
@media (min-width: 761px) {
  :root { --side: 236px; }
  #app > .topbar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--side); flex-direction: column; align-items: stretch; gap: .35rem;
    padding: 1.1rem .8rem calc(1rem + env(safe-area-inset-bottom)); box-shadow: 4px 0 22px rgba(0, 0, 0, .18); overflow-y: auto; z-index: 25;
    background: linear-gradient(180deg, var(--nuit) 0%, var(--nuit) 70%, color-mix(in srgb, var(--nuit) 82%, var(--blue)) 100%); }
  #app > .topbar .brand { order: 0; flex-direction: column; align-items: flex-start; gap: .6rem; padding: .2rem .45rem 1rem; margin-bottom: .35rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  #app > .topbar .brand img { width: 54px; height: 54px; }
  #app > .topbar .brand b { font-size: 1.3rem; line-height: 1.05; white-space: normal; overflow: visible; }
  #app > .topbar .brand-sub { display: block !important; margin-top: .2rem; }
  #app > .topbar .back-btn { order: 1; align-self: flex-start; margin-bottom: .3rem; }
  #app > .topbar .nav { order: 2; flex-direction: column; gap: .15rem; margin: 0; flex: 1; }
  #app > .topbar .nav a { margin: 0; padding: .7rem .8rem; border-radius: 10px; font-size: .95rem; gap: .75rem; box-shadow: none; }
  #app > .topbar .nav a svg { display: block !important; width: 21px; height: 21px; opacity: .85; }
  #app > .topbar .nav a.active { background: var(--blue); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--blue) 45%, transparent); }
  #app > .topbar .nav a.active svg { opacity: 1; }
  #app > .topbar .nav a .badge { margin-left: auto; position: static; }
  #app > .topbar .refresh-btn { order: 3; justify-content: center; margin-top: .8rem; }
  #app > .stripe { display: none; }
  #app > .netbar, #app > .main { margin-left: var(--side); }
  #app > .main { max-width: none; padding: 2rem clamp(1.2rem, 3vw, 2.6rem) 3rem; }
  #app > .main > * { max-width: 1100px; }
}
@media print { #app > .netbar, #app > .main { margin-left: 0 !important; } }

/* téléphone : menu du bas en carrousel qu'on fait glisser du doigt */
@media (max-width: 760px) {
  #app .nav { justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; gap: .3rem; padding-left: .5rem; padding-right: .5rem;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%); }
  #app .nav::-webkit-scrollbar { display: none; }
  #app .nav a { flex: 0 0 auto; min-width: 82px; padding: .5rem .7rem; font-size: .72rem; scroll-snap-align: center; border-radius: 14px; }
  #app .nav a span { overflow: visible; max-width: none; }
  #app .nav a.active { background: var(--blue); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--blue) 50%, transparent); }
}

/* ================================================================== messagerie façon WhatsApp */
.chat-av { --h: 220; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--disp, inherit); font-weight: 800; font-size: 1rem; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 55% 42%), hsl(calc(var(--h) + 30) 60% 30%)); }
.chat-row { padding: .65rem .9rem; gap: .75rem; }
.chat-row-main b { font-size: .98rem; }
.chat-row.unread .chat-row-time { color: var(--blue); font-weight: 800; }
.chat-dot { width: auto; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 99px; }
.chat-head { gap: .6rem; padding: .55rem .8rem; background: var(--nuit); color: #fff; border-bottom: 0; }
.chat-head .chat-title { color: #fff; font-size: 1rem; display: block; }
.chat-head-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.chat-sub { color: #9aa6bd; font-size: .74rem; }
.chat-head .chat-back { color: #fff; }
.chat-head-av { width: 38px; height: 38px; font-size: .85rem; }
/* fond du fil : motif discret de ballons */
.chat-msgs { gap: .18rem; padding: .8rem clamp(.6rem, 3vw, 1.6rem);
  background-color: #e9edf5;
  background-image: radial-gradient(circle at 20px 20px, rgba(29, 78, 216, .07) 0 6px, transparent 7px), radial-gradient(circle at 70px 60px, rgba(11, 13, 18, .05) 0 4px, transparent 5px);
  background-size: 90px 90px; }
.chat-day { background: rgba(255, 255, 255, .9); color: #4a5568; font-weight: 700; text-transform: capitalize; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.chat-bubble { border: 0; border-radius: 12px; padding: .38rem .6rem .28rem; box-shadow: 0 1px 1.5px rgba(11, 13, 18, .14); max-width: min(78%, 32rem); }
.chat-msg.theirs .chat-bubble { background: #fff; color: var(--ink); border-start-start-radius: 3px; }
.chat-msg.mine .chat-bubble { background: color-mix(in srgb, var(--blue) 16%, #fff); color: #0b1b3f; border-start-end-radius: 3px; border-end-end-radius: 12px; }
.chat-msg.theirs + .chat-msg.theirs .chat-bubble, .chat-msg.mine + .chat-msg.mine .chat-bubble { border-radius: 12px; }
.chat-msg.mine .chat-name { color: var(--blue); }
.chat-name { color: var(--blue); font-weight: 800; }
.chat-text { line-height: 1.38; }
.chat-time { float: inline-end; margin: .35rem 0 -.1rem .7rem; opacity: 1; color: #6b7690; font-size: .68rem; align-items: center; }
.chat-tick { color: #8a94a8; letter-spacing: -.25em; margin-inline-end: .2em; }
.chat-tick.seen { color: #2196f3; }
.chat-msg.mine .chat-quote { background: rgba(29, 78, 216, .1); border-color: var(--blue); }
.chat-quote { background: rgba(11, 13, 18, .05); border-inline-start-width: 4px; border-radius: 8px; }
.chat-more { color: #6b7690; top: 1px; font-size: .9rem; background: inherit; border-radius: 50%; }
.chat-msg.big .chat-bubble { background: transparent !important; box-shadow: none; padding: 0 .2rem; }
.chat-msg.big .chat-text { font-size: 2.6rem; line-height: 1.15; }
/* réactions sous la bulle */
.chat-msg.has-reac { margin-bottom: .95rem; }
.chat-reacs { position: absolute; bottom: -.95rem; inset-inline-end: .5rem; display: flex; gap: .15rem; }
.chat-msg.theirs .chat-reacs { inset-inline-end: auto; inset-inline-start: .5rem; }
.chat-reac { display: inline-flex; align-items: center; gap: .15rem; border: 2px solid #e9edf5; background: #fff; border-radius: 99px; padding: .05rem .35rem; font-size: .9rem; line-height: 1.3; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.chat-reac small { font-size: .7rem; font-weight: 700; color: #6b7690; }
.chat-reac.mine { background: color-mix(in srgb, var(--blue) 14%, #fff); }
/* menu : barre de réactions rapides */
.chat-menu { border-radius: 14px; min-width: 15rem; }
.chat-quick { display: flex; gap: .1rem; padding: .35rem .4rem; border-bottom: 1px solid var(--line); }
.chat-menu .chat-quick button { width: auto; padding: .3rem; font-size: 1.45rem; line-height: 1; border-radius: 50%; transition: transform .12s; }
.chat-menu .chat-quick button:hover { transform: scale(1.25); background: none; }
.chat-menu .chat-quick button.on { background: color-mix(in srgb, var(--blue) 18%, #fff); }
.chat-menu .chat-quick [data-react-plus] { font-size: 1.1rem; color: var(--muted); background: var(--grey-bg, #eef1f6); width: 2.1rem; }
/* vocal */
.chat-voice { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .55rem; align-items: center; width: min(250px, 62vw); padding: .15rem 0 0; }
.chat-voice audio { display: none; }
.chat-play { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-msg.theirs .chat-play { background: var(--nuit); }
.chat-play svg { width: 22px; height: 22px; fill: currentColor; } .chat-play .pa { display: none; }
.chat-voice.playing .pl { display: none; } .chat-voice.playing .pa { display: inline; }
.chat-wave { display: flex; align-items: center; gap: 2px; height: 28px; cursor: pointer; }
.chat-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: #b6c0d4; transition: background .1s; }
.chat-wave i.on { background: var(--blue); }
.chat-vmeta { display: flex; justify-content: space-between; align-items: center; font-size: .7rem; color: #6b7690; }
.chat-vdur { font-weight: 600; font-variant-numeric: tabular-nums; }
.chat-speed { border: 0; background: rgba(11, 13, 18, .08); border-radius: 99px; font: inherit; font-weight: 800; font-size: .68rem; padding: .05rem .45rem; cursor: pointer; color: inherit; }
/* barre de saisie : pilule + bouton rond micro / envoyer */
.chat-form { background: #e9edf5; border-top: 0; gap: .45rem; padding: .45rem .55rem; padding-bottom: calc(.45rem + env(safe-area-inset-bottom)); align-items: flex-end; }
.chat-pill { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: #fff; border-radius: 24px; box-shadow: 0 1px 1.5px rgba(11, 13, 18, .12); padding: 0 .2rem; }
.chat-pill .chat-input { border: 0; background: transparent; border-radius: 0; padding: .7rem .2rem; min-height: 46px; }
.chat-pill .chat-input:focus { outline: none; box-shadow: none; }
.chat-pill:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 45%, transparent); }
.chat-ico { flex: none; width: 42px; height: 46px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: #6b7690; filter: grayscale(.35); }
.chat-ico:hover { filter: none; }
.chat-form .chat-btn { width: 48px; height: 48px; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px color-mix(in srgb, var(--blue) 40%, transparent); }
.chat-form .chat-btn svg { width: 23px; height: 23px; fill: currentColor; }
.chat-form .chat-send { display: none; } .chat-form.typing .chat-send { display: grid; } .chat-form.typing .chat-mic { display: none; }
.chat-form .chat-mic.on { background: var(--red); transform: scale(1.18); transition: transform .15s; }
.chat-rec { background: #fff; color: var(--ink); gap: .7rem; transition: transform .05s; }
.chat-rec b { color: var(--red); font-variant-numeric: tabular-nums; } .chat-rec span { color: var(--muted); font-weight: 600; font-size: .82rem; }
.chat-rec.annule { background: var(--red-bg); } .chat-rec.annule span { color: var(--red); }
/* palette d'emojis */
.chat-emojis { border-top: 1px solid var(--line); background: #fff; max-height: 260px; display: flex; flex-direction: column; }
.chat-emojis.hidden { display: none; }
.chat-emo-tabs { display: flex; gap: .2rem; padding: .3rem .5rem; border-bottom: 1px solid var(--line); }
.chat-emo-tabs button { border: 0; background: none; font-size: 1.25rem; padding: .25rem .6rem; border-radius: 10px; cursor: pointer; opacity: .55; }
.chat-emo-tabs button.on { opacity: 1; background: color-mix(in srgb, var(--blue) 12%, #fff); }
.chat-emo-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); padding: .35rem .4rem .6rem; }
.chat-emo-grid button { border: 0; background: none; font-size: 1.6rem; line-height: 1; padding: .3rem 0; border-radius: 10px; cursor: pointer; }
.chat-emo-grid button:hover { background: var(--sky); }
.chat-emojis.pour-reac::before { content: "Choisissez une réaction"; font-size: .78rem; font-weight: 700; color: var(--muted); padding: .35rem .7rem 0; }
@media (min-width: 800px) {
  .chat-list { flex-basis: 340px; background: #fff; }
}
.chat-msg.big .chat-time { float: none; display: flex; margin: 0; }
.chat-msg.big.has-reac { margin-bottom: 1.1rem; }

/* communiqués de la commission UFOLEP */
.ncard2.comm { border-inline-start: 5px solid var(--nuit); }
.ncard2.comm.c-annul { border-inline-start-color: #d93025; background: #fff6f5; }
.ncard2.comm.c-tournoi { border-inline-start-color: #e0a800; }
.ncard2.comm.c-event { border-inline-start-color: var(--blue); }
.ncard2.comm.passe { opacity: .62; }
.n-org { background: var(--nuit); color: #fff; font-weight: 800; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 6px; }
.n-when { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .35rem 0 .1rem; font-size: .86rem; font-weight: 600; color: var(--ink); }
.ncard2.comm.c-annul h3 { color: #b3261e; }
.ncard2.comm[data-m], .ncard2.comm[data-cm] { cursor: pointer; }

/* fiche joueur simplifiée : photo en tête */
.pf-photo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.pf-prev { flex: none; width: 84px; height: 112px; border-radius: 14px; overflow: hidden; background: var(--sky); display: grid; place-items: center; font-size: 1.8rem; border: 2px dashed color-mix(in srgb, var(--blue) 35%, transparent); }
.pf-prev img { width: 100%; height: 100%; object-fit: cover; }

/* club sans entraînements (matchs seulement) : l'onglet Séance laisse la place à l'onglet Matchs */
html[data-off~="seances"] #nav a[data-r="seance"] { display: none; }
html:not([data-off~="seances"]) #nav a.nav-matchs { display: none; }
.but-del { flex: none; width: 2.6rem; padding: 0; color: var(--red); font-weight: 800; }
/* fiche joueur : la carte garde une taille de carte, même sur grand écran */
.pc-big { max-width: 300px !important; width: 100%; margin-inline: auto; }
@media (min-width: 761px) { .pc-big { max-width: 280px !important; } }

/* pages publiques : Retour / Accueil en haut de page */
.public { padding-top: 0; }
.hero { padding-top: calc(.7rem + env(safe-area-inset-top)); }
.topnav { display: flex; gap: .5rem; margin: 0 0 .6rem; grid-column: 1 / -1; justify-content: flex-start; }
.topnav-btn { display: inline-flex; align-items: center; gap: .2rem; min-height: 40px; padding: .3rem .85rem .3rem .55rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; }
.topnav-btn svg { width: 20px; height: 20px; fill: currentColor; }
.topnav-btn:hover { background: rgba(255, 255, 255, .2); } .topnav-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
body.ptabs .topnav { margin-bottom: .4rem; }
/* champ date sur iPhone : ne dépasse plus du formulaire */
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; box-sizing: border-box; display: block; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: start; }

/* espace joueurs : invitation à activer les notifications */
.push-cta { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; margin-bottom: 1rem; border-radius: 16px; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; box-shadow: 0 6px 18px rgba(18, 87, 214, .25); }
.push-cta .pc-ic { font-size: 1.6rem; flex: none; } .push-cta div { flex: 1; min-width: 0; } .push-cta b { display: block; } .push-cta small { opacity: .85; font-size: .8rem; }
.push-cta .btn { flex: none; background: #fff; color: var(--navy); border-color: #fff; }

/* espace joueurs : droit à l'image modifiable */
.di-box { border: 1px solid var(--line); border-radius: 14px; padding: .8rem .9rem; margin: 0 0 1rem; background: #fff; }
.di-box .seg { display: grid; grid-template-columns: 1fr 1fr; }

/* écussons des clubs */
.ecu { width: 24px; height: 27px; flex: none; object-fit: contain; vertical-align: middle; }
img.ecu { height: 24px; border-radius: 50%; }
.ch-mt { display: flex; align-items: center; gap: .4rem; min-width: 0; } .ch-line .ch-mt:first-child { justify-content: flex-end; }
.ch-nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ch-table .ch-team .ecu { width: 20px; height: 22px; margin-right: .4rem; } .ch-table .ch-team img.ecu { height: 20px; }
/* page Matchs : onglets et cartes de match */
.mx-list { display: flex; flex-direction: column; gap: .55rem; }
.mx { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .6rem .8rem .7rem; cursor: pointer; }
.mx:hover { border-color: var(--blue-2); } .mx:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.mx-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .78rem; margin-bottom: .5rem; }
.mx-tag { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--navy); } .mx-tag.coupe { color: #a15c00; } .mx-tag.amical { color: var(--muted); }
.mx-date { color: var(--muted); font-weight: 600; text-align: right; }
.mx-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; }
.mx-t { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 0; text-align: center; font-weight: 700; font-size: .86rem; line-height: 1.2; }
.mx-t .ecu { width: 40px; height: 45px; } .mx-t img.ecu { height: 40px; }
.mx-t.me { color: var(--navy); }
.mx-sc { font-family: "Barlow Condensed", Inter, sans-serif; font-weight: 800; font-size: 1.7rem; white-space: nowrap; padding: .05rem .6rem; border-radius: 10px; }
.mx-sc.v { background: #e3f4e8; color: #17713a; } .mx-sc.d { background: #fde8e6; color: #b3261e; } .mx-sc.n { background: #fff3d6; color: #8a5a00; }
.mx-vs { font-weight: 800; color: var(--muted); font-size: 1.05rem; }
.mx-foot { margin-top: .55rem; padding-top: .5rem; border-top: 1px dashed var(--line); font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.mx-foot .cta { margin-left: auto; font-weight: 800; color: var(--blue); }

/* gestion : logo d'un club */
.logo-bloc { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; margin: 0 0 .8rem; border: 1px dashed var(--line); border-radius: 12px; flex-wrap: wrap; }
.logo-bloc > div { flex: 1; min-width: 9rem; } .lb-ecu .ecu { width: 44px; height: 48px; } .lb-ecu img.ecu { height: 44px; border-radius: 8px; }
.lb-btns { display: flex; gap: .4rem; }
img.ecu[data-ecu]:not([src="/assets/logo.png"]) { border-radius: 3px; }

.topnav-share { margin-left: auto; background: #fff; color: #0b0d12; border-color: #fff; } .topnav-share:hover { background: #e9ecf3; }

/* accueil : infos utiles de la saison */
.is-card { margin-bottom: 1rem; text-align: left; } .is-card h2 { margin: 0 0 .7rem; }
.is-list, .is-memo, .is-mails { list-style: none; margin: 0; padding: 0; }
.is-ev { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--line); } .is-list > .is-ev:first-child { border-top: 0; padding-top: 0; }
.is-d { flex: none; width: 3rem; text-align: center; border-radius: 10px; background: var(--sky, #eef2fb); color: var(--navy); font-size: .7rem; font-weight: 700; text-transform: uppercase; padding: .3rem 0 .35rem; line-height: 1.1; }
.is-d b { display: block; font-family: "Barlow Condensed", Inter, sans-serif; font-size: 1.35rem; line-height: 1; }
.is-ev.coupe .is-d { background: #fff3d6; color: #8a5a00; } .is-ev.tournoi .is-d, .is-ev.reunion .is-d { background: #e3f4e8; color: #17713a; }
.is-n { font-weight: 700; min-width: 0; } .is-n small, .is-memo small { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; }
.is-n small::first-letter { text-transform: uppercase; }
.is-more { margin-top: .4rem; border-top: 1px solid var(--line); padding-top: .6rem; } .is-more summary, .is-contacts summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.is-more[open] summary { margin-bottom: .6rem; }
.is-memo li { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem 0; } .is-memo li > span { font-size: 1.25rem; line-height: 1.3; flex: none; width: 1.6rem; text-align: center; }
.is-contacts summary { list-style: none; display: flex; justify-content: space-between; align-items: center; } .is-contacts summary::-webkit-details-marker { display: none; }
.is-contacts summary h2 { margin: 0; color: var(--ink); } .is-contacts summary::after { content: "＋"; font-size: 1.2rem; } .is-contacts[open] summary::after { content: "－"; } .is-contacts[open] summary { margin-bottom: .7rem; }
.is-mails li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .8rem; padding: .4rem 0; border-top: 1px solid var(--line); font-size: .9rem; } .is-mails li:first-child { border-top: 0; }
.is-mails a { font-weight: 600; overflow-wrap: anywhere; }

/* accueil UFOLEP : tuiles, espace club */
.uf-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.2rem; }
.uf-tile { display: flex; flex-direction: column; gap: .15rem; padding: .85rem .85rem .9rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.uf-tile svg { width: 40px; height: 40px; padding: 8px; border-radius: 11px; background: #e8edfb; fill: var(--blue); margin-bottom: .35rem; }
.uf-tile b { font-family: "Barlow Condensed", Inter, sans-serif; font-size: 1.3rem; line-height: 1.05; text-transform: uppercase; } .uf-tile i { font-style: normal; font-size: .8rem; color: var(--muted); }
.uf-tile:first-child { background: #0b0d12; border-color: #0b0d12; color: #fff; } .uf-tile:first-child i { color: #c9d6f2; } .uf-tile:first-child svg { background: rgba(255,255,255,.14); fill: #fff; }
.uf-tile:hover { border-color: var(--blue); } .uf-tile:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.uf-h { font-family: "Barlow Condensed", Inter, sans-serif; text-transform: uppercase; font-size: 1.35rem; margin: 1.3rem 0 .6rem; }
.uf-club-top { display: flex; align-items: center; gap: .8rem; } .uf-club-top img { border-radius: 50%; flex: none; }
.uf-club-top b { display: block; font-family: "Barlow Condensed", Inter, sans-serif; font-size: 1.5rem; text-transform: uppercase; line-height: 1.05; } .uf-club-top small { color: var(--muted); font-weight: 600; }
.uf-club-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .8rem; } .uf-club-btns .btn { text-align: center; justify-content: center; }
.uf-autres { text-align: center; margin: .6rem 0 0; }

.uf-resp { background: #b45309; border-color: #b45309; color: #fff; } .uf-resp:hover { background: #8f4107; border-color: #8f4107; }
@media (max-width: 520px) { .uf-club-btns { grid-template-columns: 1fr; } }
