/*
 * Habillage moderne commun à toutes les pages (chargé en dernier).
 * Surcharge style.css / mobile.css sans les modifier.
 */
:root {
  --violet: #6253e1;
  --plum: #852d91;
  --coral: #f24645;
  --ink: #2b2838;
  --muted: #6b6680;
  --line: #e9e5f3;
  --surface: #fff;
  --page: #faf9fd;
  --tint: #f4f1fa;
  --gradient: linear-gradient(135deg, #6253e1, #852d91 55%, #f24645);
  --shadow-sm: 0 1px 2px rgba(45, 30, 80, 0.06);
  --shadow: 0 1px 2px rgba(45, 30, 80, 0.05), 0 10px 30px rgba(45, 30, 80, 0.07);
  --radius: 20px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

/* --- En-tête logo --------------------------------------------------------- */
.logo-top {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 16px 0;
  background: #000;
}
.logo-top .logo {
  width: 104px;
  margin: 0 auto;
}

/* --- Bouton retour --------------------------------------------------------- */
.back {
  margin: 18px 20px 0;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.back-btn:hover {
  color: var(--plum);
  border-color: rgba(133, 45, 145, 0.35);
  text-decoration: none;
  transform: translateX(-2px);
}

/* --- Titres ------------------------------------------------------------------ */
.page-title {
  margin: 20px 16px 4px;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.page-subtitle {
  margin: 0 16px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.section-title {
  margin: 36px 16px 14px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
h3.open-session {
  margin: 36px 0 18px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.form-hint.page-hint {
  padding: 0 16px;
  text-align: center;
}

/* --- Panneaux ---------------------------------------------------------------- */
.panel {
  max-width: 640px;
  margin: 24px auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

/* --- Boutons dégradés -------------------------------------------------------- */
.btn-hover,
.add {
  font-weight: 700;
  letter-spacing: 0.01em;
  background-image: linear-gradient(to right, #6253e1, #852d91, #a3a1ff, #f24645);
  box-shadow: 0 6px 18px rgba(98, 83, 225, 0.28);
  transition: background-position 0.4s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-hover:hover,
.add:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(98, 83, 225, 0.34);
}
.btn-hover:active,
.add:active {
  transform: translateY(0);
}
.btn-hover.cancel {
  box-shadow: 0 6px 18px rgba(236, 116, 149, 0.35);
}
.btn-hover.waitlist {
  box-shadow: 0 6px 18px rgba(45, 54, 65, 0.3);
}

/* --- Grille des sessions ----------------------------------------------------- */
.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.card.session-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  padding: 22px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card.session-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(45, 30, 80, 0.05), 0 16px 36px rgba(45, 30, 80, 0.1);
}
.session-card p {
  margin: 0;
}
.session-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: center;
  margin: -4px 0 10px;
  padding: 4px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(98, 83, 225, 0.12), rgba(242, 70, 69, 0.12));
  color: var(--plum);
  font-size: 12.5px;
  font-weight: 700;
}
.session-weekday {
  color: var(--plum);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.session-card .session-day {
  margin-top: 2px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.session-card .session-time {
  margin-top: 2px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #6253e1, #f24645);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.session-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14.5px;
}
.session-info li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.session-info svg {
  flex-shrink: 0;
  color: #a39fb6;
}
.session-card .session-spots {
  align-self: center;
  margin-top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
}
.session-spots.ok {
  background: #e8f7ee;
  color: #1d7a45;
}
.session-spots.low {
  background: #fff3e0;
  color: #b45309;
}
.session-spots.full {
  background: #fde8e8;
  color: #c0262d;
}
.session-card .waitlist-count {
  margin: 6px 0 0;
  font-size: 13px;
}
.session-action {
  margin-top: auto;
  padding-top: 18px;
}
.session-action input.btn-hover,
.session-action a.btn-hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 240px;
  height: 46px;
  margin: 0;
  padding: 0 20px;
  font-size: 16px;
}
.session-action p {
  margin: 0;
}
.session-action .offer {
  margin: 0;
}
.session-action .offer .btn-hover {
  width: auto;
  margin: 10px auto 2px;
}
.session-action .waitlist-status {
  margin: 0;
}
.session-banned {
  font-size: 14px;
  color: #c0262d;
}
.session-admin {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* --- Petits boutons ronds (actions admin) ------------------------------------ */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.icon-btn:hover {
  color: var(--violet);
  background: var(--tint);
  border-color: rgba(98, 83, 225, 0.3);
}
.icon-btn-danger:hover {
  color: #c0262d;
  background: #fdecec;
  border-color: rgba(192, 38, 45, 0.3);
}

/* --- Bouton flottant "+" ----------------------------------------------------- */
.add-button {
  margin: 40px 0;
}
.add.add-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
}

/* --- Pied de page ------------------------------------------------------------ */
footer {
  margin: 0;
  padding: 24px 16px 32px;
  text-align: center;
}
.legal-link {
  color: var(--muted);
}
.legal-link:hover {
  color: var(--plum);
}

/* --- Bandeau non-adhérent·e --------------------------------------------------- */
.message.warning {
  max-width: 900px;
  margin: 8px auto;
  border: 1px solid #fde2c4;
  border-radius: 16px;
  background: #fff8ef;
}
.warning .left-box:after {
  background: linear-gradient(to bottom, #fb923c, #f97316);
}

/* --- Formulaires (ajout / modification de session) ---------------------------- */
.form-add.panel {
  margin: 24px auto;
  text-align: left;
}
.session-form {
  max-width: 560px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field-wide {
  grid-column: 1 / -1;
}
.form-field label,
.session-type legend {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}
.input-form,
.small-input-form {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #ddd8ea;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-form:focus,
.small-input-form:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(98, 83, 225, 0.15);
}
.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.input-row select {
  flex: 1;
}
.session-form .form-hint {
  max-width: none;
  margin: 14px 0 0;
}
.session-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  border: none;
}
.session-type legend {
  width: 100%;
  padding: 0;
}
.session-type .input-form {
  flex: 1;
  min-width: 160px;
}
.check-pill {
  margin: 0;
  cursor: pointer;
}
.check-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.check-pill span {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #ddd8ea;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}
.check-pill input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(98, 83, 225, 0.15);
}
.check-pill input:checked + span {
  border-color: transparent;
  background: var(--gradient);
  color: #fff;
}
input.btn-hover.add-session {
  display: block;
  width: 100%;
  height: 48px;
  margin: 24px 0 0;
}
.generate-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 560px;
}
.generate-panel .form-hint {
  margin: 0;
  text-align: left;
}
input.btn-hover.generate-session {
  flex-shrink: 0;
  width: auto;
  height: 46px;
  margin: 0;
  padding: 0 22px;
}

/* --- Tableaux --------------------------------------------------------------- */
.tab {
  max-width: 960px;
  margin: 16px auto;
  padding: 0 16px;
}
table.data-table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.data-table th {
  padding: 12px 16px;
  background: #f7f5fc;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0 !important;
}
.data-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-radius: 0 !important;
  vertical-align: middle;
  font-size: 15px;
}
.data-table tr:nth-child(even) {
  background: none;
}
.data-table tr:hover td {
  background: #fbfaff;
}

/* --- Onglets admin ---------------------------------------------------------- */
.tabset {
  max-width: 960px;
  margin: 18px auto 0;
  padding: 0 16px;
  text-align: center;
}
.tabset > label {
  margin: 0 3px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.tabset > label::after {
  display: none;
}
.tabset > label:hover {
  color: var(--plum);
}
.tabset > input:checked + label {
  margin-bottom: 0;
  border-color: transparent;
  background: var(--gradient);
  color: #fff;
}
.tabset > input:focus-visible + label {
  box-shadow: 0 0 0 4px rgba(98, 83, 225, 0.2);
}
.tab-panel {
  padding: 8px 0 24px;
  border-top: none;
  text-align: left;
}
.tab-panel .tab {
  padding: 0;
}

/* --- Interrupteur oui/non --------------------------------------------------- */
.onoffswitch {
  width: 50px;
}
.onoffswitch-label {
  position: relative;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: #ddd8ea;
  transition: background 0.25s;
}
.onoffswitch-inner {
  display: none;
}
.onoffswitch-switch,
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch,
.proponoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
  top: 3px;
  bottom: auto;
  right: auto;
  left: 3px;
  width: 22px;
  height: 22px;
  margin: 0;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 0.25s;
}
.onoffswitch-checkbox:checked + .onoffswitch-label,
.proponoffswitch-checkbox:checked + .onoffswitch-label {
  background: var(--gradient);
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch,
.proponoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
  left: 25px;
}
.onoffswitch-checkbox:focus-visible + .onoffswitch-label,
.proponoffswitch-checkbox:focus-visible + .onoffswitch-label {
  box-shadow: 0 0 0 4px rgba(98, 83, 225, 0.2);
}

/* --- Jokers ------------------------------------------------------------------ */
/* Sous la jauge des sessions, volontairement plus discret qu'elle. */
.jokers {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: -12px auto 22px;
  padding: 5px 7px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
/* Même « i » que la jauge des sessions, en plus petit. */
.quota-info.joker-info {
  width: 17px;
  height: 17px;
  margin-left: 2px;
  font-size: 10.5px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.joker-cards {
  display: inline-flex;
  gap: 3px;
}
.joker-card {
  width: 13px;
  height: 17px;
}
.joker-card rect {
  fill: var(--violet);
  stroke: var(--violet);
  stroke-width: 1.2;
}
.joker-card path {
  fill: #fff;
}
.joker-card.used rect {
  fill: none;
  stroke: #cfc9df;
  stroke-dasharray: 2 1.6;
}
.jokers.last .joker-card:not(.used) rect {
  fill: #e8833a;
  stroke: #e8833a;
}
.jokers.last {
  color: #b45309;
}
.jokers.empty {
  color: #c0262d;
}

/* Admin : solde et boutons −1 / +1 */
.joker-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.joker-admin form {
  margin: 0;
}
.joker-count {
  min-width: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.joker-count.empty {
  color: #c0262d;
}
.joker-btn {
  min-width: 38px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.joker-btn:hover:not(:disabled) {
  border-color: rgba(98, 83, 225, 0.4);
  background: var(--tint);
  color: var(--violet);
}
.joker-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.blocked-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fdecec;
  color: #c0262d;
  font-size: 12px;
  font-weight: 700;
  vertical-align: 1px;
}

/* --- Stats ------------------------------------------------------------------- */
.card-stats {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.season-select {
  border: 1px solid #ddd8ea;
  border-radius: 12px;
}

/* --- Modales ------------------------------------------------------------------ */
.jquery-modal.blocker {
  background: rgba(20, 16, 32, 0.55);
  backdrop-filter: blur(4px);
}
.jquery-modal .modal {
  padding: 28px 26px;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(20, 16, 32, 0.3);
}
.jquery-modal .modal h4 {
  font-weight: 800;
  color: var(--ink);
}

/* --- Mon compte ----------------------------------------------------------------- */
.site-page {
  min-height: 100vh;
  background: var(--page);
}
.account {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 20px auto 40px;
  padding: 0 16px;
  align-items: start;
}
.account .panel {
  margin: 0;
}
.account-profile {
  grid-row: span 2; /* Notifications se place juste sous Informations */
  text-align: center;
}
.account-avatar {
  width: 112px;
  height: 112px;
  padding: 4px;
  border-radius: 50%;
  background: var(--gradient);
}
.account-profile h2 {
  margin: 14px 0 8px;
  font-size: 20px;
  font-weight: 800;
}
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.status-pill.member {
  background: #e8f7ee;
  color: #1d7a45;
}
.status-pill.trial {
  background: #fff3e0;
  color: #b45309;
}
.account-profile form {
  margin-top: 20px;
}
input.btn-hover.logout {
  width: 100%;
  height: 44px;
  margin: 0;
  font-size: 15px;
}
.account-info dl {
  margin: 12px 0 0;
}
.account-info dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.account-info dt {
  color: var(--muted);
  font-weight: 600;
}
.account-info dd {
  margin: 0;
  text-align: right;
  word-break: break-word;
}
.account-hint {
  color: var(--muted);
  font-size: 13.5px;
}
.account-blocked {
  color: #c0262d;
  font-weight: 600;
}
/* Bloc Notifications : sous les informations, dans la même colonne. */
.account-notifications {
  grid-column: 2;
}
.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.pref-row:first-of-type {
  margin-top: 12px;
}
.pref-title {
  display: block;
  font-weight: 600;
}
.pref-desc {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.4;
}
.pref-note {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 13.5px;
  text-align: right;
}
/* Interrupteur : case à cocher redessinée. */
.pref-switch {
  flex-shrink: 0;
  position: relative;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: #d5d0e3;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.2s;
}
.pref-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.pref-switch:checked {
  background: var(--violet);
}
.pref-switch:checked::after {
  transform: translateX(18px);
}
.pref-switch:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}
.pref-switch:disabled {
  opacity: 0.6;
  cursor: default;
}
.username-form {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.username-form + .username-form {
  margin-top: 12px;
}
.username-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 600;
}
.username-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.username-display .username-label {
  margin-bottom: 2px;
}
.username-value {
  font-weight: 600;
  word-break: break-word;
}
.username-edit {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--violet);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.username-edit:hover {
  border-color: rgba(98, 83, 225, 0.4);
  background: var(--tint);
}
/* Lien "Annuler" (components.css n'est pas chargé sur les pages de compte). */
.username-cancel {
  margin-top: 8px;
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  text-decoration: underline;
  cursor: pointer;
}
.username-cancel:hover {
  color: var(--ink);
}
.name-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.name-fields input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
}
.name-fields input:focus {
  outline: 2px solid var(--violet);
  outline-offset: -1px;
}
.name-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.name-actions button.btn-hover {
  width: auto;
  height: 42px;
  margin: 0;
  padding: 0 18px;
  font-size: 14px;
}
.name-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}
.name-actions .username-cancel {
  margin-top: 0;
}
@media (max-width: 420px) {
  .name-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
.username-msg {
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 600;
}
.username-msg.error {
  color: var(--coral);
}
.username-msg.pending {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}
.username-msg.pending strong {
  color: var(--ink);
  word-break: break-all;
}
.email-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}
.username-msg.ok {
  color: #1d7a45;
}

/* --- Connexion / inscription ------------------------------------------------- */
/* Le cadre s'adapte à son contenu (l'ancien avait une hauteur fixe de 545px) et reste centré. */
.index-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 16px;
}
.index-body .center-div {
  position: relative;
  inset: auto;
  width: min(640px, 100%);
  height: auto;
  margin: 0;
  padding: 24px 20px 32px;
}
.index-body .login-block {
  margin-top: 24px;
}
.index-body .center {
  display: none;
}
.center-div {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(16, 12, 26, 0.62);
  box-shadow: 0 30px 80px rgba(20, 10, 40, 0.45);
  opacity: 1;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.us-link {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}
.us-link:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
}
.input-login {
  padding: 2px;
}
.input-login input {
  height: 44px;
  width: 260px;
  padding: 0 18px;
  font-size: 16px;
  color: var(--ink);
}
input.btn-hover.login,
input.btn-hover.register,
input.btn-hover.create-account {
  height: 44px;
  width: 264px;
  font-size: 16px;
}
.strike > span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}
.strike > span:before,
.strike > span:after {
  background: rgba(255, 255, 255, 0.2);
}

/* --- Téléphone ---------------------------------------------------------------- */
@media screen and (max-width: 640px) {
  .logo-top {
    padding: 12px 0;
  }
  .logo-top .logo {
    width: 80px;
  }
  .back {
    margin: 14px 16px 0;
  }
  .page-title {
    font-size: 24px;
  }
  .session-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 16px;
  }
  .card.session-card {
    padding: 20px 16px 16px;
  }
  .panel {
    margin: 16px;
    padding: 20px 18px;
  }
  .form-add.panel {
    margin: 16px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .generate-panel {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .generate-panel .form-hint {
    text-align: center;
  }
  input.btn-hover.generate-session {
    width: 100%;
  }
  .tab {
    padding: 0 12px;
  }
  .data-table th,
  .data-table td {
    padding: 10px 10px;
    font-size: 14px;
  }
  .data-table th {
    font-size: 11.5px;
  }
  .tabset > label {
    padding: 8px 14px;
    font-size: 14px;
  }
  .onoffswitch {
    width: 50px;
  }
  .account {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .account-profile {
    grid-row: auto;
  }
  .account-notifications {
    grid-column: auto;
  }
  .account-info dl > div {
    flex-direction: column;
    gap: 2px;
  }
  .account-info dd {
    text-align: left;
  }
  .input-login input {
    width: min(260px, 70vw);
  }
  input.btn-hover.login,
  input.btn-hover.register,
  input.btn-hover.create-account {
    width: min(264px, 72vw);
  }
}

/* --- Message d'erreur de connexion ------------------------------------------- */
.login-error {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(242, 70, 69, 0.18);
  color: #ffd2d2;
  font-size: 14px;
  font-weight: 600;
}

/* --- Mot de passe oublié ---------------------------------------------------- */
.auth-title {
  margin: 0 0 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.auth-text {
  max-width: 320px;
  margin: 0 auto 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px;
  line-height: 1.5;
}
.auth-link {
  display: inline-block;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13.5px;
  font-weight: 600;
}
.auth-link:hover {
  color: #fff;
}
.login-success {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(52, 194, 71, 0.2);
  color: #d6ffdc;
  font-size: 14px;
  font-weight: 600;
}
.field-error {
  margin: -6px 0 10px;
  color: #ffb4a8;
  font-size: 12.5px;
}

/* Messages de la connexion : sur leur propre ligne, centrés (pas à côté du logo). */
.login-error,
.login-success {
  display: table;
  margin: 0 auto 14px;
}

.calendar-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.calendar-link:hover {
  color: var(--violet);
}
/* .session-card p remet les marges à 0 : il faut le même niveau de sélecteur pour centrer. */
.session-card .waitlist-locked {
  max-width: 240px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

/* Liste des adhérentes sur téléphone : 4 colonnes compactes, défilement horizontal en dernier recours. */
@media (max-width: 640px) {
  .tab-panel .tab {
    overflow-x: auto;
  }
  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }
  .data-table th {
    font-size: 11px;
    letter-spacing: 0.03em;
  }
  .data-table td {
    font-size: 14px;
  }
  .joker-admin {
    gap: 4px;
  }
  .joker-count {
    min-width: 26px;
  }
  .joker-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    font-size: 12.5px;
  }
}

/* Textes des fenêtres d'explication (jauge, jokers) : style.css les passait à 30px sur mobile. */
.jquery-modal .modal .gauge-text {
  font-size: 15px;
  line-height: 1.5;
}
.jquery-modal .modal h3.gauge-text {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}
.jquery-modal .modal p.gauge-text + h3.gauge-text {
  margin-top: 18px;
}

/* File d'attente sans jeton */
.waitlist-skip {
  display: block;
  margin-top: 2px;
  color: #b45309;
  font-size: 12.5px;
  font-weight: 600;
}

/* --- Barre d'onglets de l'appli (installée, sur téléphone) ---------------------- */
/* Cachée partout ailleurs. html[data-app-preview] : aperçu en développement (?app). */
.app-tab-bar {
  display: none;
}
@media (max-width: 820px) {
  html[data-app-preview] .app-tab-bar {
    display: flex;
  }
}
@media (display-mode: standalone) and (max-width: 820px) {
  .app-tab-bar {
    display: flex;
  }
}
.app-tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  justify-content: space-around;
  padding: 6px 8px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.app-tab {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: 120px;
  padding: 6px 4px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.app-tab:hover {
  color: var(--ink);
  text-decoration: none;
}
.app-tab.active {
  color: var(--violet);
}
.app-tab.active svg {
  stroke-width: 2.4;
}
/* Place pour la barre en bas de page, pas de doublon avec le menu du haut,
   et pas de bouton « Retour » : on navigue avec la barre. */
@media (max-width: 820px) {
  html[data-app-preview] body:has(.app-tab-bar) {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  html[data-app-preview] .topbar-btn[href='/nous'],
  html[data-app-preview] .topbar-btn[href='/admin'],
  html[data-app-preview] body:has(.app-tab-bar) .back {
    display: none;
  }
}
@media (display-mode: standalone) and (max-width: 820px) {
  body:has(.app-tab-bar) {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  .topbar-btn[href='/nous'],
  .topbar-btn[href='/admin'],
  body:has(.app-tab-bar) .back {
    display: none;
  }
}

/* --- Page L'association (/nous) -------------------------------------------------- */
.asso {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 48px;
  color: var(--ink);
}
.asso h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.asso h3 {
  margin: 0 0 4px;
  text-align: left;
  font-size: 16.5px;
  font-weight: 700;
}
.asso p {
  line-height: 1.65;
}
.asso a:not(.asso-btn):not(.asso-chip) {
  color: var(--violet);
  font-weight: 600;
}

/* En-tête */
.asso-hero {
  position: relative;
  overflow: hidden;
  margin: 8px 0 28px;
  padding: 40px 28px 34px;
  border-radius: 28px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(242, 70, 69, 0.55), transparent 55%),
    radial-gradient(120% 140% at 0% 100%, rgba(98, 83, 225, 0.65), transparent 60%), #1a1427;
  color: #fff;
  text-align: center;
}
.asso-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.asso-hero h1 {
  margin: 0 auto 12px;
  max-width: 640px;
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.asso-lead {
  max-width: 560px;
  margin: 0 auto 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
}
.asso-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.asso-tags li {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13.5px;
  font-weight: 600;
}
.asso-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.asso-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.asso-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}
.asso-btn.primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(133, 45, 145, 0.45);
}
.asso-btn.ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}
.asso-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Sections */
.asso-section {
  margin: 0 0 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.asso-section-lead {
  margin: -4px 0 18px;
  color: var(--muted);
}
.asso-intro {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  align-items: center;
}
.asso-intro img {
  width: 100%;
}
.asso-intro p:last-child {
  margin-bottom: 0;
}

/* Créneaux */
.asso-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.asso-slot {
  padding: 18px;
  border-radius: 16px;
  background: var(--tint);
}
.asso-slot p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px;
  line-height: 1.45;
}
.asso-slot svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--violet);
}
.asso-slot-day {
  font-size: 17px;
  font-weight: 800;
}
.asso-slot-time {
  font-weight: 600;
}
.asso-slot-place {
  color: var(--muted);
}
.asso-slot-place strong {
  color: var(--ink);
}
.asso-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 14px;
}

/* Étapes */
.asso-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.asso-steps li {
  display: flex;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.asso-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}
.asso-step-num {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
}

/* Valeurs */
.asso-principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.asso-principle {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--tint);
}
.asso-principle p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
}
.asso-principle-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--plum);
  box-shadow: var(--shadow-sm);
}
.asso-rules {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 24px;
  align-items: start;
}
.asso-rules img {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
}
.asso-rules > div {
  grid-column: 1;
  grid-row: 1;
}
.asso-rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.asso-rules li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}
.asso-rules li::before {
  content: '✓';
  position: absolute;
  left: 4px;
  top: 8px;
  color: var(--violet);
  font-weight: 800;
}

/* Frise des évènements */
.asso-timeline {
  margin: 0;
  padding: 0 0 0 22px;
  list-style: none;
  border-left: 2px solid var(--line);
}
.asso-timeline li {
  position: relative;
  padding: 0 0 20px 16px;
}
.asso-timeline li:last-child {
  padding-bottom: 0;
}
.asso-timeline li::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 4px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 0 1px var(--line);
}
.asso-year {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--plum);
  font-size: 13px;
  font-weight: 800;
}
.asso-timeline p {
  margin: 0;
  color: var(--muted);
}

/* Contact */
.asso-contact {
  text-align: center;
}
.asso-contact img {
  width: 90px;
  margin-bottom: 8px;
}
.asso-contact p {
  margin: 0 0 16px;
  color: var(--muted);
}
.asso-contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.asso-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.asso-chip:hover {
  border-color: rgba(98, 83, 225, 0.4);
  color: var(--violet);
  text-decoration: none;
}

@media (max-width: 720px) {
  .asso-hero {
    padding: 32px 20px 26px;
    border-radius: 22px;
  }
  .asso-section {
    padding: 22px 18px;
  }
  .asso h2 {
    font-size: 22px;
  }
  .asso-intro {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .asso-intro img {
    width: 90px;
    margin: 0 auto;
  }
  .asso-slots,
  .asso-steps,
  .asso-principles {
    grid-template-columns: 1fr;
  }
  .asso-rules {
    grid-template-columns: 1fr;
  }
  .asso-rules img {
    display: none;
  }
  .asso-btn {
    width: 100%;
  }
}

/* --- Tirer pour actualiser (appli) ------------------------------------------------- */
/* --ptr : décalage de la page (px), --ptr-progress : 0 → 1 jusqu'au seuil. */
html {
  --ptr: 0px;
  --ptr-progress: 0;
}
/* Toute la page descend (sauf la barre d'onglets et la zone du ballon, fixes). */
html[data-ptr] body > :not(.app-tab-bar):not(.ptr) {
  transform: translateY(var(--ptr));
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.25, 1.15);
}
html[data-ptr-drag] body > :not(.app-tab-bar):not(.ptr) {
  transition: none;
}
html[data-ptr] body {
  overflow: hidden;
}

/* Zone découverte en haut : fond noir, comme le bandeau du logo. */
.ptr {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  /* +1px : recouvre l'arrondi au pixel près, pas de liseré clair sous la zone. */
  height: calc(var(--ptr) + env(safe-area-inset-top) + 1px);
  padding-bottom: 18px;
  overflow: hidden;
  background: #000;
  pointer-events: none;
  visibility: hidden;
  transition: height 0.42s cubic-bezier(0.2, 0.9, 0.25, 1.15);
}
html[data-ptr] .ptr {
  visibility: visible;
}
html[data-ptr-drag] .ptr {
  transition: none;
}

.ptr-stage {
  position: relative;
  display: grid;
  justify-items: center;
  height: 46px;
}
/* Le ballon grandit et apparaît pendant qu'on tire. */
.ptr-ball {
  font-size: 30px;
  line-height: 1;
  opacity: var(--ptr-progress);
  transform: scale(calc(0.5 + 0.5 * var(--ptr-progress)));
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}
.ptr-shadow {
  position: absolute;
  bottom: 0;
  width: 26px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  opacity: calc(var(--ptr-progress) * 0.9);
  transform: scaleX(calc(0.4 + 0.6 * var(--ptr-progress)));
}

/* Seuil atteint : petit saut du ballon. */
.ptr-ready .ptr-ball {
  animation: ptr-hop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes ptr-hop {
  50% {
    translate: 0 -8px;
  }
}

/* Actualisation : le ballon rebondit, son ombre s'écrase au contact du sol. */
.ptr-refreshing .ptr-ball {
  opacity: 1;
  transform: none;
  animation: ptr-bounce 0.55s cubic-bezier(0.5, 0.05, 0.5, 1) infinite alternate;
}
.ptr-refreshing .ptr-shadow {
  opacity: 0.9;
  animation: ptr-shadow 0.55s cubic-bezier(0.5, 0.05, 0.5, 1) infinite alternate;
}
@keyframes ptr-bounce {
  from {
    translate: 0 -16px;
  }
  to {
    translate: 0 0;
  }
}
@keyframes ptr-shadow {
  from {
    transform: scaleX(0.55);
    opacity: 0.45;
  }
  to {
    transform: scaleX(1.1);
    opacity: 0.95;
  }
}

/* Fin : le ballon se pose, puis la page remonte. */
.ptr-closing .ptr-ball {
  opacity: 1;
  transform: none;
  animation: ptr-land 0.3s ease-out;
}
@keyframes ptr-land {
  from {
    translate: 0 -10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ptr-refreshing .ptr-ball,
  .ptr-refreshing .ptr-shadow,
  .ptr-ready .ptr-ball {
    animation: none;
  }
}
