:root {
  --bg: #14121a; --bg-soft: #1d1a26; --card: #242031; --card-hover: #2c2740;
  --line: #37324a; --text: #f0edf7; --muted: #9b94b3;
  --accent: #f5a623; --accent-soft: rgba(245,166,35,.14);
  --teal: #3ecfb2; --teal-soft: rgba(62,207,178,.14);
  --rose: #f56784; --rose-soft: rgba(245,103,132,.14);
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: "Segoe UI", system-ui, sans-serif; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }

header { position: sticky; top: 0; z-index: 50; background: rgba(20,18,26,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1080px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; }
.logo img { height: 34px; }
nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: 8px; }
nav a { color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 99px; }
nav a:hover { color: var(--text); background: var(--bg-soft); }
nav a.active { color: #14121a; background: var(--accent); }
.spacer { margin-left: auto; }
/* Bloc navigation + auth : en ligne sur desktop, replié en hamburger sur mobile */
.nav-wrap { display: flex; flex: 1; align-items: center; gap: 8px; }
.nav-auth { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-email { color: var(--muted); font-size: 13px; }
.nav-toggle { position: absolute; left: -9999px; }
.hamburger { display: none; }
.btn { display: inline-block; background: var(--accent); color: #3a2800; border: none; font-weight: 800; font-size: 14px; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.btn.ghost { background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); }
.btn.rose { background: var(--rose); color: #fff; }

main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
.hero { text-align: center; padding: 30px 0 22px; }
.hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); margin-top: 10px; font-size: 15px; max-width: 580px; margin-inline: auto; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 20px 0 24px; }
.chip { background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); padding: 8px 16px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; transition: all .15s; animation: card-in .35s ease both; }
.card:hover { background: var(--card-hover); transform: translateY(-3px); border-color: var(--muted); box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.grid .card:nth-child(2) { animation-delay: .05s; }
.grid .card:nth-child(3) { animation-delay: .1s; }
.grid .card:nth-child(4) { animation-delay: .15s; }
.grid .card:nth-child(5) { animation-delay: .2s; }
.grid .card:nth-child(n+6) { animation-delay: .25s; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* Navigation au clavier : contour visible sur tous les éléments interactifs. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .card:hover { transform: none; }
}
.cover { height: 120px; display: flex; align-items: center; justify-content: center; font-size: 44px; position: relative; }
.cover.has-photo { background-size: cover; background-position: center; }
.cover .when { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.cover .price { position: absolute; top: 10px; right: 10px; background: var(--teal); color: #0d2b24; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.cover .price.paid { background: var(--accent); color: #3a2800; }
.card-body { padding: 14px 16px 16px; }
.card-body h3 { font-size: 17px; font-weight: 700; }
.card-body .venue { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card-body .venue b { color: var(--text); font-weight: 600; }
.tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.tag.t2 { background: var(--teal-soft); color: var(--teal); }
.going { margin-top: 10px; font-size: 12.5px; color: var(--teal); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }

.g1 { background: linear-gradient(135deg, #4a2c6d, #b0356a); }
.g2 { background: linear-gradient(135deg, #14486d, #3ecfb2); }
.g3 { background: linear-gradient(135deg, #7d3b12, #f5a623); }
.g4 { background: linear-gradient(135deg, #2c3e6d, #6d7ff5); }
.g5 { background: linear-gradient(135deg, #6d1229, #f56784); }
.g6 { background: linear-gradient(135deg, #1e5c3a, #7dd85e); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.panel h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 12px; font-weight: 800; }
.panel p { font-size: 14px; line-height: 1.55; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 600; }

.messages { max-width: 1080px; margin: 12px auto 0; padding: 0 20px; }
.msg { background: var(--teal-soft); border: 1px solid var(--teal); color: var(--teal); padding: 10px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 8px; }

footer { border-top: 1px solid var(--line); padding: 24px 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* --- Écran Programmer (dashboard lieu) --- */
.section-title { font-size: 22px; font-weight: 800; margin: 6px 0; letter-spacing: -.5px; }
.section-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.dispo-hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }

.quota-bar { height: 8px; background: var(--line); border-radius: 99px; margin: 10px 0 6px; overflow: hidden; }
.quota-bar i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }

.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.role-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 10px; text-align: center; cursor: pointer; transition: all .15s; margin: 0; display: block; }
.role-card:hover { border-color: var(--muted); }
.role-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-card .ic { font-size: 30px; }
.role-card h5 { font-size: 14px; margin-top: 8px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.field label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 5px; }
.field.full { grid-column: 1 / -1; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea { width: 100%; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; font-size: 13px; font-family: inherit; }
.field input[type="file"] { width: 100%; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; font-size: 13px; font-family: inherit; cursor: pointer; }
.field input[type="file"]::file-selector-button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 7px 13px; margin-right: 12px; font-weight: 700; cursor: pointer; }
.field input[type="checkbox"], .field input[type="radio"] { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: middle; margin: 0 6px; }
.field textarea { min-height: 80px; resize: vertical; }

.demande { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; flex-wrap: wrap; }
.demande .av { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.demande .info { flex: 1; min-width: 180px; }
.demande .info b { font-size: 15px; }
.demande .info .muted { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.demande .actions { display: flex; gap: 8px; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.teal { background: var(--teal); color: #0d2b24; }
.btn.danger { background: var(--rose-soft); color: var(--rose); border: 1px solid var(--rose); }
.status-pill { font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 99px; }
.status-pill.ok { background: var(--teal-soft); color: var(--teal); }
.status-pill.wait { background: var(--accent-soft); color: var(--accent); }
.htmx-request.htmx-indicator, .htmx-request .htmx-indicator { opacity: 1; }
.htmx-indicator { opacity: 0; transition: opacity .2s; }

/* --- Tableau de bord groupe --- */
.dash-menu { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-menu a { color: var(--muted); font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 10px; }
.dash-menu a:hover { color: var(--text); background: var(--bg-soft); }
.dash-menu a.on { color: var(--accent); background: var(--accent-soft); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .n { font-size: 24px; font-weight: 800; color: var(--accent); }
.stat.teal .n { color: var(--teal); }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.rose { border-color: var(--rose); }
.stat.rose .n { color: var(--rose); }

/* Mini graphique du pilote */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.chart-bar { width: 70%; min-height: 2px; background: linear-gradient(180deg, var(--accent), var(--rose)); border-radius: 3px 3px 0 0; transition: height .2s; }
.chart-x { font-size: 9px; color: var(--muted); margin-top: 4px; white-space: nowrap; }

.cal-head { text-align: center; font-weight: 700; font-size: 15px; margin-bottom: 10px; text-transform: capitalize; }
table.cal { width: 100%; border-collapse: collapse; max-width: 420px; margin: 0 auto; }
table.cal th { font-size: 10px; color: var(--muted); font-weight: 700; padding-bottom: 6px; }
table.cal td { text-align: center; padding: 2px; }
.cal .d { width: 38px; height: 38px; border-radius: 8px; font-size: 13px; color: var(--muted); cursor: pointer; background: none; border: 1px solid transparent; font-family: inherit; transition: all .12s; }
.cal .d:hover:not([disabled]) { border-color: var(--muted); }
.cal .d[disabled] { opacity: .25; cursor: default; }
.cal .d.available { background: var(--teal-soft); color: var(--teal); font-weight: 700; }
.cal .d.busy { background: var(--rose-soft); color: var(--rose); text-decoration: line-through; }
.legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: 1px; }

/* --- Messagerie --- */
.chat { display: flex; flex-direction: column; height: 460px; max-width: 620px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.chat-head .av { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.chat-head b { font-size: 14px; }
.chat-head .muted { font-size: 12px; color: var(--muted); display: block; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.bubble.them { background: var(--bg-soft); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { background: var(--accent-soft); border: 1px solid var(--accent); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble .h { font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); border-radius: 99px; padding: 10px 16px; font-size: 13px; font-family: inherit; }

/* --- Formulaires & erreurs --- */
.form-error { color: var(--rose); font-size: 12.5px; margin-top: 4px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 12px; cursor: pointer; }
.check-row input { width: auto; }
.msg.error, .msg.warning { background: var(--rose-soft); border-color: var(--rose); color: var(--rose); }
.onboard-row { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-box { max-width: 460px; margin: 0 auto; }
.auth-box .field { margin-bottom: 12px; }

/* Boutons connexion sociale */
.btn-social { display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px; border-radius: 10px; font-weight: 700; font-size: 14px; margin-bottom: 8px;
  border: 1px solid var(--line); cursor: pointer; }
.btn-social:hover { filter: brightness(1.08); }
.btn-google { background: #fff; color: #1f1f1f; }
.btn-facebook { background: #1877F2; color: #fff; border-color: #1877F2; }
.fb-ic { width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #1877F2;
  font-weight: 900; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Barre de sélection de ville (agenda) */
.city-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: center; margin: -8px 0 20px; }
.city-bar input[type="text"], .city-bar select { background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-family: inherit; }
.city-bar input[type="text"] { min-width: 160px; }
.city-bar input[type="text"]::placeholder { color: var(--muted); }

/* Partage d'un événement */
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-label { font-size: 13px; color: var(--muted); font-weight: 700; margin-right: 2px; }
.report-link { margin-top: 14px; font-size: 12px; color: var(--muted); }
.report-link a { color: var(--muted); text-decoration: underline; }
.report-link a:hover { color: var(--rose); }

/* Avatar éditable en un clic (fiche musicien) */
.av-wrap { position: relative; flex-shrink: 0; }
.av-form { margin: 0; }
.av-btn { position: absolute; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  cursor: pointer; border: 2px solid var(--bg); line-height: 1; padding: 0; }
.av-add { right: -6px; bottom: -4px; background: var(--accent); color: #fff; }
.av-del { right: -6px; top: -4px; background: var(--rose-soft); color: var(--rose); }
.av-btn:hover { filter: brightness(1.15); }

/* Morceaux (MP3) */
.track { margin-top: 12px; }
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.track audio { width: 100%; height: 38px; }

/* Grille d'amis */
.friends-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.friend { display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 86px; text-align: center; font-size: 13px; }
.friend .av { width: 56px; height: 56px; display: flex; align-items: center;
  justify-content: center; font-size: 24px; border-radius: 50%; }
.friend b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 86px; }
.friend:hover b { color: var(--accent); }

/* Page publique d'un lieu */
.venue-cover { position: relative; height: 190px; display: flex; align-items: center;
  justify-content: center; font-size: 56px; background-size: cover; background-position: center; }
.cover-btn { width: 32px; height: 32px; font-size: 17px; }
.cover-add { right: 12px; bottom: 12px; position: absolute; }
.cover-del { right: 12px; top: 12px; position: absolute; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin-top: 10px; }
.gallery-item { position: relative; margin: 0; }
.gallery-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); display: block; }
.gallery-item figcaption { font-size: 12px; color: var(--muted); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-del { position: absolute; top: -4px; right: -4px; margin: 0; }
.gallery-del .av-btn { position: static; }
a.sub-row { color: var(--text); }
a.sub-row:hover b { color: var(--accent); }

/* Fil d'actus (fiche musicien) */
.post { margin-bottom: 12px; }
.post-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 8px; font-size: 12px; }
.post-text { line-height: 1.6; font-size: 15px; white-space: normal; }
.post-photo { margin-top: 10px; }
.post-photo img { max-width: 100%; max-height: 420px; border-radius: 10px; border: 1px solid var(--line); }
.post-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }

/* Page À propos */
.apropos p { line-height: 1.7; font-size: 15px; margin: 0 0 14px; }
.apropos p:last-of-type { margin-bottom: 0; }
.apropos-sign { text-align: right; font-style: italic; color: var(--muted); margin-top: 18px !important; }

/* Cases à cocher (instruments / styles du profil musicien) */
.checkbox-multi > div { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 4px; }
.checkbox-multi label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px;
  font-weight: 500; cursor: pointer; }
.checkbox-multi input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }

/* Listes d'abonnements (Mes abonnements) */
.sub-list { display: flex; flex-direction: column; gap: 8px; }
.sub-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.sub-row .muted { font-size: 13px; }

/* --- Mobile : menu hamburger --- */
@media (max-width: 720px) {
  .header-inner { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .logo img { height: 28px; }

  /* Bouton hamburger (à droite du logo) */
  .hamburger { display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; margin-left: auto; cursor: pointer; border-radius: 8px; }
  .hamburger span { display: block; width: 24px; height: 2px; margin: 0 auto;
    background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }

  /* Panneau déroulant : caché par défaut, affiché quand le hamburger est coché */
  .nav-wrap { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch;
    gap: 2px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
  .nav-toggle:checked ~ .nav-wrap { display: flex; }

  nav { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  nav a { padding: 12px 14px; font-size: 15px; border-radius: 10px; }

  .nav-auth { margin-left: 0; flex-direction: column; align-items: stretch; gap: 8px;
    margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
  .nav-auth .btn, .nav-auth form, .nav-auth form .btn { width: 100%; text-align: center; }
  .user-email { text-align: center; }

  /* Le hamburger se transforme en croix une fois ouvert */
  .nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero h1 { font-size: 24px; }
}
