/* Flexi Solutions : feuille de styles commune des webapps (charte Flexi Keys du 16/10/2026), copie de Flexi Play. Ajouts propres à Flexi Média : media.css. */
:root { --bg: #f5f6f8; --card: #fff; --text: #1b1f24; --muted: #5d6673; --border: #dde1e6; --placeholder: #a3abb5;
        --open: #1f7a4d; --close: #1d4f91; --ok-bg: #e6f4ec; --ok: #1f6b45; --err-bg: #fbeaea; --err: #a32020;
        --warn-bg: #fdf3e1; --warn: #8a5a00; --accent: #1d4f91; --row: #f8f9fb; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #111418; --card: #1b2026; --text: #eef1f4; --muted: #9aa4b1; --border: #2c333b; --placeholder: #66707c;
          --open: #2f9e66; --close: #3a74c4; --ok-bg: #173325; --ok: #7fd3a6; --err-bg: #3a1b1b; --err: #f08a8a;
          --warn-bg: #3a2e14; --warn: #f0c46a; --accent: #6ea0e6; --row: #20262d; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 440px; margin: 0 auto; padding: 24px 16px 40px; }
main.wide { max-width: 1080px; font-size: 15.5px; }
main.legal-page { max-width: 760px; }
a { color: var(--accent); }
h1 { font-size: 1.35rem; margin: 0 0 4px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
.muted { color: var(--muted); font-size: .95rem; margin: 0; }
.note { margin-top: 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.card + .card { margin-top: 16px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.inline { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Messages et bandeaux */
.msg { border-radius: 10px; padding: 12px 14px; margin: 14px 0; font-size: .97rem; }
.msg.ok { background: var(--ok-bg); }
.msg.error { background: var(--err-bg); color: var(--err); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.billing-bar { text-align: center; padding: 9px 16px; font-size: .92rem; border-bottom: 1px solid var(--border); }
.billing-bar.soon { background: var(--warn-bg); color: var(--warn); }
.billing-bar.due { background: var(--err-bg); color: var(--err); font-weight: 600; }
.billing-bar a { color: inherit; font-weight: 600; margin-left: 6px; }
.demo-bar { background: #fff4d6; color: #5c4400; border-bottom: 1px solid #f0d890; text-align: center; padding: 8px 16px; font-size: .9rem; }
.demo-bar a { color: inherit; font-weight: 600; margin-left: 6px; }

/* Boutons */
.btn { display: inline-block; border: 1px solid var(--border); background: var(--card); color: var(--text);
       border-radius: 9px; padding: 8px 14px; font: inherit; font-size: .95rem; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--err); }
.btn.block { display: block; width: 100%; text-align: center; padding: 11px 14px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; cursor: pointer; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions { display: grid; gap: 14px; margin-top: 22px; }
.actions button { width: 100%; border: 0; border-radius: 12px; padding: 22px 16px; font: inherit;
                  font-size: 1.2rem; font-weight: 600; color: #fff; cursor: pointer; }
button.open { background: var(--open); }
button.close { background: var(--close); }
button:disabled { opacity: .55; cursor: wait; }

/* Badges, compteurs, tableaux, listes */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .82rem; white-space: nowrap;
         background: var(--row); color: var(--muted); border: 1px solid var(--border); }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
        padding: 10px 14px; font: inherit; color: var(--text); cursor: pointer; }
.stat span { display: block; color: var(--muted); font-size: .88rem; }
.stat strong { display: block; font-size: 1.6rem; line-height: 1.2; }
.stat.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
tbody tr:hover { background: var(--row); }
tr.row-link { cursor: pointer; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.tabs a.active { background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 600; }
.search { width: 100%; font: inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border);
          background: var(--card); color: var(--text); margin-bottom: 14px; }

/* Formulaires : valeur en gras foncé, suggestion en gris clair */
form.stack { display: grid; gap: 14px; }
label { display: grid; gap: 5px; font-size: .92rem; font-weight: 600; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=date],
input[type=search], input[type=number], input[type=tel], select, textarea {
  font: inherit; font-weight: 600; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); width: 100%; }
input::placeholder, textarea::placeholder { color: var(--placeholder); font-weight: 400; opacity: 1; }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; }
.recovery-codes { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(2, 1fr);
                  gap: 8px 16px; font-size: 1.15rem; }
.recovery-codes li { background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; text-align: center; }
@media print { .topbar, .billing-bar, .demo-bar, .row-actions, .legal-footer { display: none !important; } }
.copybox { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; word-break: break-all;
           background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; }
.suggest-chip { position: absolute; z-index: 50; max-width: min(420px, 90vw); padding: 5px 10px; border-radius: 8px;
                border: 1px solid var(--border); background: var(--card); color: var(--muted); font: inherit;
                font-size: .82rem; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.08); text-align: left;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-chip strong { color: var(--text); }
.suggest-chip:hover { border-color: var(--accent); }

/* Étapes (guide) */
.guide-steps { list-style: none; padding: 0; margin: 14px 0 0; counter-reset: step; }
.guide-steps > li { padding: 12px 0; border-top: 1px solid var(--border); }
.guide-steps > li p, .guide-steps > li ul { margin: 6px 0 0 34px; line-height: 1.5; }
.guide-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guide-check { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border);
               display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700;
               color: var(--muted); counter-increment: step; }
.guide-check::before { content: counter(step); }
.guide-steps > li.done .guide-check { background: var(--open); border-color: var(--open); color: #fff; }
.guide-steps > li.done .guide-check::before { content: "✓"; }
.guide-list { padding-left: 22px; margin: 10px 0 0; }
.guide-list li { margin: 8px 0; line-height: 1.5; }

/* En-tête, menu, cloche */
.topbar { background: var(--card); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap;
                align-items: center; gap: 6px 18px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; margin-right: auto;
         display: inline-flex; align-items: center; gap: 7px; }
.brand .picto { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand small { margin-left: -2px; font-weight: 400; color: var(--muted); }
.login-title { display: flex; align-items: center; gap: 10px; }
.login-title .picto { width: 46px; height: 46px; color: var(--accent); flex: none; }
nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: .95rem; }
nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
nav a.active { color: var(--text); font-weight: 600; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; color: var(--text);
               width: 46px; height: 42px; align-items: center; justify-content: center; cursor: pointer; }
.drawer-head, .nav-mobile, .nav-backdrop { display: none; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
        border-radius: 10px; color: var(--muted); text-decoration: none; }
.bell:hover, .bell.has-unread { color: var(--text); }
.bell-count { position: absolute; top: -5px; right: -7px; box-shadow: 0 0 0 2px var(--card); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
              background: var(--err); color: #fff; font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; }
.bell-count.inline { position: static; display: inline-block; margin-left: 6px; }
/* Démonstration : notification affichée à l'écran à son arrivée. */
.toast { position: fixed; z-index: 1000; top: 12px; right: 16px; width: min(360px, calc(100% - 32px)); display: flex;
         align-items: flex-start; background: var(--card); color: var(--text); border: 1px solid var(--border);
         border-left: 4px solid var(--accent); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
         animation: toast-in .35s ease-out; transition: opacity .4s, transform .4s; }
.toast.leaving { opacity: 0; transform: translateY(-12px); }
.toast-link { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 4px 12px 14px; color: inherit;
              text-decoration: none; min-width: 0; }
.toast-app { font-size: .75rem; color: var(--muted); }
.toast-title { font-weight: 700; }
.toast-body { font-size: .9rem; color: var(--muted); }
.toast-more { font-size: .8rem; color: var(--accent); margin-top: 2px; }
.toast-close { border: 0; background: none; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: 8px 12px;
               cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: none; } }
.topbar nav { order: 1; }
.topbar .bell { order: 2; }
.topbar .lang-menu { order: 2; margin-left: 10px; }
.topbar .menu-toggle { order: 3; }
/* Menu long (espace club) : la cloche reste sur la ligne du nom, le menu passe en entier sur la ligne suivante. */
@media (min-width: 721px) {
  .topbar.long-nav .bell { order: 0; }
  .topbar.long-nav nav { order: 1; flex-basis: 100%; }
}
@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .topbar-inner { flex-wrap: nowrap; gap: 6px; }
  .topbar .menu-toggle { order: 1; margin-left: 0; }
  .topbar .lang-menu { order: 2; margin-left: 0; }
  .topbar .bell { order: 3; }
  .topbar .brand { order: 4; margin: 0 0 0 auto; min-width: 0; flex: 0 1 auto; flex-direction: row-reverse; }
  .topbar .brand span { white-space: nowrap; }
  .topbar .brand small { display: none; }   /* pas de nom de client sur téléphone */
  .topbar nav { position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; width: min(82vw, 320px); order: 5;
                display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 0 0 24px;
                background: var(--card); box-shadow: 4px 0 24px rgba(0,0,0,.18); overflow-y: auto;
                transform: translateX(-105%); transition: transform .22s ease; visibility: hidden; }
  .topbar.open nav { transform: none; visibility: visible; }
  .topbar nav a { padding: 15px 20px; border-bottom: 1px solid var(--border); font-size: 1.05rem; color: var(--text); }
  .topbar nav a.active { color: var(--accent); background: var(--row); }
  .drawer-head { display: flex; align-items: center; gap: 8px; padding: 18px 20px; font-weight: 700;
                 border-bottom: 1px solid var(--border); padding-top: max(18px, env(safe-area-inset-top)); }
  .drawer-head .picto { width: 30px; height: 30px; color: var(--accent); flex: none; }
  .drawer-head small { font-weight: 400; color: var(--muted); }
  .nav-mobile { display: block; }
  .topbar.open .nav-backdrop:not([hidden]), .topbar.dragging .nav-backdrop:not([hidden]) {
    display: block; position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.35); }
}

/* Flexi Play : sport affiché (module padel, tennis…). Chaque sport a sa couleur, reprise par les boutons et les liens. */
/* Pictogramme de l'en-tête (_picto.html) : fond et petite épingle aux couleurs du sport, mêmes valeurs en mode sombre
   pour garder l'épingle blanche nette. Sans sport (club, plateforme) : bleu Flexi Play. */
.picto .logo-bg { fill: var(--logo-bg, #1d4f91); }
.picto .logo-tint { fill: var(--logo-tint, #6ea0e6); }
body.sport-tennis { --logo-bg: #b4532a; --logo-tint: #e8a07c; }
body.sport-pickleball { --logo-bg: #0d7377; --logo-tint: #5fc4c7; }
body.sport-padel { --sport: #1d4f91; }
body.sport-tennis { --sport: #b4532a; --accent: #b4532a; }
body.sport-pickleball { --sport: #0d7377; --accent: #0d7377; }
@media (prefers-color-scheme: dark) {
  body.sport-padel { --sport: #6ea0e6; }
  body.sport-tennis { --sport: #e48a5c; --accent: #e48a5c; }
  body.sport-pickleball { --sport: #4fc1c4; --accent: #4fc1c4; }
}
.topbar.has-sport { border-bottom: 3px solid var(--sport); }
.topbar.has-sport .brand { margin-right: 0; }
.sport-switch { position: relative; margin-right: auto; }
.sport-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
                        padding: 6px 10px; border-radius: 999px; background: var(--sport); color: #fff; font-weight: 600;
                        font-size: .92rem; user-select: none; }
.sport-switch summary::-webkit-details-marker { display: none; }
.sport-switch summary .chevron { transition: transform .15s; }
.sport-switch[open] summary .chevron { transform: rotate(180deg); }
.sport-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 120; min-width: 230px; padding: 8px;
              background: var(--card); border: 1px solid var(--border); border-radius: 12px;
              box-shadow: 0 10px 30px rgba(0,0,0,.16); display: grid; gap: 4px; }
.sport-menu-title { margin: 2px 8px 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sport-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 9px;
                background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sport-option:hover, .sport-option.current { background: var(--row); }
.sport-option .sport-icon { flex: none; width: 32px; height: 32px; padding: 6px; border-radius: 9px; color: #fff; }
.sport-option.sport-padel .sport-icon { background: #1d4f91; }
.sport-option.sport-tennis .sport-icon { background: #b4532a; }
.sport-option.sport-pickleball .sport-icon { background: #0d7377; }
.sport-option small { display: block; color: var(--muted); font-size: .82rem; }
.sport-check { margin-left: auto; color: var(--sport); font-weight: 700; }
@media (max-width: 720px) {
  .topbar .sport-switch { order: 2; margin-right: 0; }
  .sport-switch summary { padding: 6px 9px; }
}
.fee-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
/* Paiement en ligne : part du joueur, carte simulée de la démonstration. */
.pay-when { margin: 14px 0 6px; }
.pay-periods { margin: 14px 0 6px; padding-left: 20px; }
.pay-periods li { margin: 4px 0; }
.pay-line { margin-top: 8px !important; }
.card-sim { display: grid; gap: 8px; padding: 16px 18px; border-radius: 14px; color: #fff; max-width: 340px;
            background: linear-gradient(135deg, #1d4f91, #0f2747); }
.card-sim-chip { width: 34px; height: 24px; border-radius: 5px; background: #f0a020; }
.card-sim-number { font-family: ui-monospace, monospace; letter-spacing: .08em; font-size: 1.05rem; }
.card-sim-note { font-size: .82rem; opacity: .85; }
/* Espace club : menu déroulant des pages (accueil, planning, terrains, horaires). */
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-switch { position: relative; }
.page-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
                       padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
                       color: var(--text); font-weight: 600; user-select: none; }
.page-switch summary::-webkit-details-marker { display: none; }
.page-switch summary .chevron { transition: transform .15s; }
.page-switch[open] summary .chevron { transform: rotate(180deg); }
.page-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 120; min-width: 220px; padding: 6px;
             background: var(--card); border: 1px solid var(--border); border-radius: 12px;
             box-shadow: 0 10px 30px rgba(0,0,0,.16); display: grid; gap: 2px; }
.page-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; color: var(--text);
               text-decoration: none; }
.page-menu a:hover, .page-menu a.current { background: var(--row); }
.page-menu a.current { font-weight: 600; }
@media (max-width: 720px) { .page-menu { right: auto; left: 0; } }
.module-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* Flexi Play : espace club, terrains et horaires */
.court-list { list-style: none; margin: 0; padding: 0; }
.court-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.court-list li:first-child { border-top: 0; padding-top: 0; }
.hours-grid { display: grid; gap: 4px; }
.hours-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 0; border-top: 1px solid var(--border); }
.hours-row:first-child { border-top: 0; }
.hours-row > .check { min-width: 130px; }
.hours-times { display: inline-flex; align-items: center; gap: 8px; }
.hours-times select { width: auto; }
.price-table td, .price-table th { padding: 8px 10px 8px 0; text-align: left; }
.price-table td:first-child .check { white-space: nowrap; }
.money { display: inline-flex; align-items: center; gap: 6px; }
.money input { width: 6.5em; text-align: right; }

/* Flexi Play : réservation (créneaux libres, planning du club) */
.slots { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--row); }
.slots-title { margin: 0 0 8px; }
.slot-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.slot { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border);
        border-radius: 10px; background: var(--card); cursor: pointer; font-size: .92rem; line-height: 1.25; }
.slot small { display: block; color: var(--muted); font-size: .78rem; }
.slot:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.slot-none { margin-top: 10px; }
.slots-note { margin: 0 0 8px; }
.slots-more { margin-top: 10px; }
.slots-more summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
/* Options des clubs (location, balles, boissons) */
.options-pick { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 12px; margin: 12px 0 0; background: var(--row); }
.options-pick legend { font-weight: 600; padding: 0 4px; }
.options-cat { margin: 8px 0 4px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.options-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.options-list li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--border);
                   border-radius: 10px; background: var(--card); }
.options-name { flex: 1; min-width: 0; }
.options-price { white-space: nowrap; color: var(--muted); }
.options-list select { width: auto; min-width: 4.2em; }
.slots .options-pick { padding: 8px 10px 10px; background: transparent; }
.booking-box .options-pick { margin-top: 0; background: var(--card); }
@media (max-width: 640px) { .options-list li { padding: 5px 8px; gap: 8px; font-size: .94rem; } }
/* Options du club (club/options.html) : article et prix, catégorie, puis « Proposé » et les boutons. */
.court-list li > .options-edit { flex: 1 1 100%; }
.options-edit { display: grid; grid-template-columns: minmax(0, 1fr) 8rem; grid-template-areas: "name price" "cat cat" "foot foot";
  gap: 10px 12px; }
.options-edit .opt-name { grid-area: name; } .options-edit .opt-price { grid-area: price; } .options-edit .opt-cat { grid-area: cat; }
.options-edit .opt-foot { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.options-edit .opt-actions { display: inline-flex; align-items: center; gap: 16px; }
.booking-box { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--ok-bg); }
.booking-box p { margin: 0; }
.planning-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.planning-nav input[type=date] { width: auto; }
.planning-day { margin-left: auto; }
.planning-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
table.planning { border-collapse: separate; border-spacing: 0; min-width: 100%; table-layout: fixed; }
table.planning th, table.planning td { border-bottom: 1px solid var(--border); padding: 0; height: 26px; font-size: .82rem;
                                       text-transform: none; letter-spacing: 0; }
table.planning thead th { position: sticky; top: 0; background: var(--card); padding: 8px 6px; min-width: 110px; text-align: left; }
table.planning tbody th { width: 52px; padding: 0 6px; color: var(--muted); font-weight: 400; vertical-align: top; text-align: right; }
table.planning td { border-left: 1px solid var(--border); }
table.planning td.free a { display: block; height: 100%; min-height: 26px; }
table.planning td.free a:hover { background: var(--row); }
table.planning td.closed { background: repeating-linear-gradient(45deg, var(--row), var(--row) 6px, transparent 6px, transparent 12px); }
table.planning td.taken { vertical-align: top; padding: 2px; }
table.planning td.taken a { display: block; height: 100%; padding: 4px 6px; border-radius: 6px; text-decoration: none; color: #fff; }
table.planning td.taken small { display: block; opacity: .9; }
.taken.player a, .key.player { background: var(--accent); }
.taken.cours_collectif a, .key.cours_collectif { background: #6a4c93; }
.taken.cours_prive a, .key.cours_prive { background: #9b5de5; }
.taken.ailleurs a, .key.ailleurs { background: #5d6673; }
.taken.fermeture a, .key.fermeture { background: #a32020; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .85rem; color: var(--muted); margin-top: 10px; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

/* Flexi Play : réseaux privés */
.network-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 860px) { .network-grid { grid-template-columns: 1fr; } }
.copy-row { display: flex; gap: 8px; margin-top: 6px; }
.copy-row input { flex: 1; min-width: 0; }
.badge.network { background: var(--row); }

/* Notifications */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: 0; }
.notif p { margin: 4px 0; }
.notif .muted { font-size: .85rem; }
.notif.unread { background: var(--row); border-radius: 8px; padding-left: 10px; }
.notif .badge { flex: none; margin-top: 2px; }

/* Choix de la langue */
.lang-corner { max-width: 1080px; margin: 0 auto; padding: 10px 16px 0; display: flex; justify-content: flex-end; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer;
                     padding: 6px 8px; border-radius: 8px; color: var(--text); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: var(--row); }
.lang-menu .flag { width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px var(--border); flex: none; }
.lang-menu .chevron { width: 12px; height: 8px; transition: transform .15s; }
.lang-menu[open] .chevron { transform: rotate(180deg); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; list-style: none; margin: 0; padding: 6px;
                min-width: 180px; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
                box-shadow: 0 12px 30px rgba(15, 39, 71, .15); }
.lang-menu li + li { border-top: 1px solid var(--border); }
.lang-menu ul a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
                  color: var(--text); text-decoration: none; font-size: .95rem; }
.lang-menu ul a:hover { background: var(--row); }
.lang-menu ul a[aria-current] { font-weight: 600; }

/* Pages légales et pied de page */
.legal-footer { text-align: center; font-size: .82rem; color: var(--muted); padding: 18px 16px 26px; }
.legal-footer a { color: var(--muted); }
.legal h2 { font-size: 1.05rem; margin: 20px 0 6px; }
.legal p, .legal li { line-height: 1.5; }
.legal-section { padding: 14px 0; border-top: 1px solid var(--border); }
.legal-section:first-of-type { border-top: 0; padding-top: 4px; }
.legal-section h2 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.legal-section p { margin: 0; overflow-wrap: anywhere; }
.legal-section p + p, .legal-section ul + p { margin-top: 8px; }
.legal-section ul { margin: 8px 0 0; padding-left: 20px; }
.legal-section li + li { margin-top: 4px; }

/* Flexi Play : ajouts (pictogramme en image couleur, liens de connexion) */
.brand .picto, .drawer-head .picto { border-radius: 7px; }
.login-title .picto { border-radius: 11px; }
.login-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: .95rem; }
.qr svg { display: block; margin: 8px auto; max-width: 220px; height: auto; border-radius: 8px; }
.steps-inline { padding-left: 20px; margin: 8px 0 14px; line-height: 1.5; }
.badge-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nav-logout .linkbtn { font-size: .95rem; padding: 4px 0; }
@media (max-width: 720px) {
  .topbar nav .nav-logout { display: block; }
  .topbar nav .nav-logout .linkbtn { width: 100%; text-align: left; padding: 15px 20px; font-size: 1.05rem; color: var(--muted); }
}

/* Flexi Play : fiche joueur et niveaux */
.level-big { font-size: 1.5rem; font-weight: 700; color: var(--accent); margin: 4px 0 8px; }
fieldset.checks, fieldset.quiz { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
fieldset.checks legend, fieldset.quiz legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
fieldset.card.quiz { padding: 16px 20px; border: 1px solid var(--border); }
fieldset.card.quiz legend { float: left; width: 100%; font-size: 1rem; margin-bottom: 10px; }
fieldset.card.quiz legend + * { clear: both; }
.quiz-num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff;
            align-items: center; justify-content: center; font-size: .8rem; margin-right: 6px; }
.level-scale { list-style: none; padding: 0; margin: 0; }
.level-scale li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.level-scale li:first-child { border-top: 0; padding-top: 0; }
.level-scale p { margin: 4px 0 0; line-height: 1.45; }
.level-num { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff;
             display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }

.sport-block { padding: 14px 0; border-top: 1px solid var(--border); }
.sport-block:first-of-type { border-top: 0; padding-top: 4px; }
.sport-block h3 { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sport-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .78rem; font-weight: 600;
             background: var(--card); border: 1px solid var(--border); color: var(--muted); vertical-align: middle; }
.sport-tag.padel { color: #1d4f91; }
.sport-tag.tennis { color: #b4532a; }
.sport-tag.pickleball { color: #0d7377; }
@media (prefers-color-scheme: dark) { .sport-tag.padel { color: #6ea0e6; } .sport-tag.tennis { color: #e48a5c; }
  .sport-tag.pickleball { color: #4fc1c4; } }

/* Flexi Play : parties et conversation */
.grid3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.align-end { align-self: end; padding-bottom: 10px; }
.result-count { font-weight: 600; color: var(--muted); margin: 14px 0 10px; }
.game-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.game-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
             color: var(--text); text-decoration: none; }
.game-card:hover { border-color: var(--accent); box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.game-when { font-weight: 700; }
.game-when::first-letter { text-transform: uppercase; }
.game-place { color: var(--muted); margin: 2px 0 8px; }
.game-title { font-size: 1.25rem; }
.game-note { background: var(--row); border-radius: 9px; padding: 10px 12px; margin: 12px 0 0; white-space: pre-line; }
.player-list { list-style: none; padding: 0; margin: 0; }
.player-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--border); }
.player-list li:first-child { border-top: 0; }
.player-name { font-weight: 600; }
.push-right { margin-left: auto; }
.danger-summary { color: var(--err); cursor: pointer; }
.chat { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.chat-msg { background: var(--row); border: 1px solid var(--border); border-radius: 12px 12px 12px 4px; padding: 8px 12px; max-width: 85%; }
.chat-msg.mine { justify-self: end; background: var(--ok-bg); border-color: transparent; border-radius: 12px 12px 4px 12px; }
.chat-meta { font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.chat-body { white-space: pre-line; overflow-wrap: anywhere; }
.chat-system { text-align: center; font-size: .85rem; color: var(--muted); padding: 2px 8px; }
.chat-time { font-size: .75rem; opacity: .8; margin-left: 4px; }

/* Flexi Play : photos des joueurs */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--row); border: 1px solid var(--border); }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
                   color: #fff; background: var(--accent); border-color: transparent; }
.photo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.player-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.player-link:hover .player-name { text-decoration: underline; }
input[type=file] { font: inherit; font-weight: 400; }

/* Flexi Play : choix direct du niveau */
.level-option { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border);
                border-radius: 999px; font-weight: 600; cursor: pointer; background: var(--bg); }
.level-option:has(input:checked) { border-color: var(--accent); background: var(--card); box-shadow: inset 0 0 0 1px var(--accent); }
.level-option input { margin: 0; }
/* Démonstration : deux entrées, joueur et club */
.demo-choices { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 16px; }
.demo-choices .card + .card { margin-top: 0; }
.demo-choices .card { display: flex; flex-direction: column; }
.demo-choices .card button { margin-top: auto; }
/* Éclairage du club (club/lighting.html) */
.err-text { display: block; color: var(--err); }
.zone-edit { flex-basis: 100%; }
.zone-edit > summary { cursor: pointer; color: var(--muted); }
.zone-edit[open] > summary { margin-bottom: 10px; }

/* Interrupteur (games/home.html : vue planning) */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .95rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 40px; height: 22px; border-radius: 11px; background: var(--border); transition: background .15s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
                       background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-track::after { transition: none; } }

/* Vue planning de « Mes parties » : 7 colonnes (lundi à dimanche) ; sur téléphone, les jours occupés l'un sous l'autre. */
.agenda { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.agenda-day { min-height: 92px; border: 1px solid var(--border); border-radius: 10px; padding: 6px; background: var(--card);
              display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.agenda-day.past { opacity: .55; }
.agenda-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.agenda-date { font-size: .8rem; font-weight: 600; color: var(--muted); }
.agenda-day.today .agenda-date { color: var(--accent); }
.agenda-date .long { display: none; }
/* Couleur du sport ; mes parties : fond teinté ; réseaux : cadre ; à mon niveau : trait pointillé ; autres sports : plus clair. */
.agenda-item, .legend-sport { --sc: var(--muted); }
.agenda-item.padel, .legend-sport.padel { --sc: #1d4f91; }
.agenda-item.tennis, .legend-sport.tennis { --sc: #b4532a; }
.agenda-item.pickleball, .legend-sport.pickleball { --sc: #0d7377; }
@media (prefers-color-scheme: dark) {
  .agenda-item.padel, .legend-sport.padel { --sc: #6ea0e6; }
  .agenda-item.tennis, .legend-sport.tennis { --sc: #e48a5c; }
  .agenda-item.pickleball, .legend-sport.pickleball { --sc: #4fc1c4; }
}
.agenda-item { display: block; border-radius: 7px; padding: 4px 6px; font-size: .78rem; line-height: 1.3; text-decoration: none;
               color: var(--text); background: var(--card); border: 1px solid transparent; border-left: 3px solid var(--sc);
               overflow: hidden; }
.agenda-item:hover { filter: brightness(.97); }
.agenda-item.mine { background: color-mix(in srgb, var(--sc) 14%, var(--card)); }
.agenda-item.network { border-color: color-mix(in srgb, var(--sc) 45%, var(--card)); border-left-color: var(--sc); }
.agenda-item.open { background: var(--row); border-left-style: dashed; }
.agenda-item.other { opacity: .5; }
.agenda-item.other:hover { opacity: .85; }
.legend-sports { display: inline-flex; flex-wrap: wrap; gap: 10px; margin-left: auto; font-size: .82rem; }
.legend-sport { display: inline-flex; align-items: center; gap: 5px; color: var(--sc); font-weight: 600; }
.legend-sport::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--sc); }
.legend-sport.other { opacity: .5; }
.legend-sport.filter { cursor: pointer; }
.legend-sport.filter::before { display: none; }
.legend-sport.filter input { width: auto; margin: 0; accent-color: var(--sc); cursor: pointer; }
.kind-filters { display: inline-flex; flex-wrap: wrap; gap: 8px; }
button.kind-filter { font: inherit; cursor: pointer; }
button.kind-filter[aria-pressed=false] { opacity: .45; text-decoration: line-through; }
.agenda-item .sport-tag { padding: 0 4px; font-size: .7rem; }
.agenda-time { font-weight: 700; }
.agenda-place, .agenda-state { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-state { color: var(--muted); }
.planning-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.planning-legend .agenda-item { display: inline-block; }
@media (max-width: 720px) {
  .agenda { grid-template-columns: 1fr; }
  .agenda-day { min-height: 0; }
  .agenda-day.empty:not(.today), .agenda-day.past { display: none; }
  .agenda-date .short { display: none; }
  .agenda-date .long { display: inline; }
  .agenda-item { font-size: .9rem; padding: 7px 9px; }
}

/* Accès au club (app/doors.py) : codes de porte et boutons « Ouvrir ». */
.door-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.door-code { font-size: 1.35rem; letter-spacing: .18em; font-variant-numeric: tabular-nums; padding: 2px 10px;
             border-radius: 8px; background: var(--row); border: 1px solid var(--border); }
.court-list .door-code { font-size: 1.05rem; }

/* Compteur de la démo (page Plateforme) : un bâton par jour. */
.demo-days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 130px; margin: 6px 0 4px; }
.demo-day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.launch-bar { display: block; width: 100%; max-width: 26px; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.demo-day em { font-style: normal; font-size: .75rem; color: var(--muted); }
.demo-day small { font-size: .7rem; color: var(--muted); }

/* Scores et classement (app/results.py). */
.score-box { background: var(--row); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.score-box.win { background: var(--ok-bg); }
.score-line { font-size: 1.15rem; margin: 0 0 4px; }
.score-table { border-collapse: collapse; }
.score-table th, .score-table td { padding: 4px 6px; text-align: center; }
.score-table th:first-child { text-align: left; }
.score-table input { width: 4.2em; text-align: center; }
.chips-choice { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.up { color: var(--ok); font-weight: 600; }
.down { color: var(--err); font-weight: 600; }
.level-history { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .92rem; }
.rating-line { color: var(--muted); }
.ranking-table td.num, .ranking-table th.num { text-align: right; white-space: nowrap; }
.ranking-table tr.me td { background: var(--ok-bg); font-weight: 600; }
@media (max-width: 420px) { .ranking-table .opt { display: none; } .ranking-table th, .ranking-table td { padding-left: 4px; padding-right: 4px; } }

.stat-link { color: inherit; text-decoration: none; }
.stat-link:hover, .stat-link:focus-visible { border-color: var(--accent); }

/* Recherche en direct (games/search.html) : résultats estompés pendant la mise à jour. */
#results { transition: opacity .15s; }
#results.loading { opacity: .5; }

/* Planning du jour en haut de l'accueil du club (club/_day_planning.html). */
.day-planning-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 10px; }
.day-planning-head h2 { margin: 0; }
.day-planning-head .planning-nav { margin: 0; flex: 1; }
.planning-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.planning-filters .legend-sports { margin-left: 0; }
button.key-filter { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .85rem; padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: inherit; cursor: pointer; }
button.key-filter[aria-pressed=false] { opacity: .45; text-decoration: line-through; }
.day-planning.loading { opacity: .6; transition: opacity .15s; }
table.planning .sport-tag { font-size: .7rem; margin-left: 4px; }
table.hide-sp-padel .sp-padel, table.hide-sp-tennis .sp-tennis, table.hide-sp-pickleball .sp-pickleball { display: none; }
table.hide-kind-player td.taken.player a, table.hide-kind-cours_collectif td.taken.cours_collectif a,
table.hide-kind-cours_prive td.taken.cours_prive a, table.hide-kind-ailleurs td.taken.ailleurs a,
table.hide-kind-fermeture td.taken.fermeture a { visibility: hidden; }
.day-planning .planning-wrap { max-height: 70vh; overflow: auto; }
.options-intro { margin-bottom: 16px; }
.day-planning table.planning { width: max(100%, calc(60px + var(--cols, 4) * 104px)); min-width: 0; }
@media (max-width: 640px) {
  .day-planning-head { display: block; }
  .day-planning-head h2 { margin-bottom: 8px; }
  .day-planning-head .planning-day { flex-basis: 100%; margin-left: 0; }
  button.key-filter { font-size: .78rem; padding: 3px 8px; }
}
.day-planning table.planning thead th:first-child { min-width: 0; width: 56px; }

/* Plateforme → Joueurs : bouton « Supprimer » d'une ligne. */
.linkbtn.danger-link { color: var(--err); }
