/* QG Bobons Pas Chers : feuille de style.
   Toutes les couleurs passent par des variables, redéfinies par [data-theme] sur <html>.
   Seule la police des titres change selon le thème ; le texte reste en Atkinson Hyperlegible Next.
   Chaque thème garde un contraste d'au moins 4,5:1 (vérifié paire par paire). */

/* Variables communes (valeurs par défaut, calculées à partir des couleurs du thème) */
:root {
  --font-texte: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --fs: 18px;
  --stage: 2.2rem;
  --r: 14px;
  --on-acc: #FFFFFF;             /* texte sur --acc-fill */
  --acc2-text: var(--acc2);      /* ambre utilisé comme texte sur fond ou carte */
  --head-muted: var(--muted);    /* texte secondaire dans l'en-tête */
  --alert-bg: #3A1D12;
  --hatch: #4A4038;              /* hachures des vacances */
  --cal-bord: transparent;       /* contour des cases du calendrier */
  --titre-poids: 800;
  --titre-echelle: 1;            /* réduit les polices de titres plus larges */
  --logo: var(--acc2);           /* couleur (ou dégradé) du logo */
  --head-fond: var(--head);      /* fond de l'en-tête (couleur ou dégradé) */
  --deco-fond: none;             /* décor du fond de page (halos du thème BBPC) */
  --card-ombre: none;            /* profondeur des cartes */
  color-scheme: dark;
}

/* Thèmes : couleurs, police des titres, bandeau et logo */

/* BBPC (thème par défaut) : les quatre couleurs des instruments du groupe
   (rouge, jaune, bleu clair, bleu) sur un fond indigo presque noir.
   Il a quelques touches de plus que les autres : halos colorés dans le fond,
   en-tête en dégradé et cartes avec un peu de profondeur. */
[data-theme="bbpc"] {
  --bg: #0F1020; --card: #1A1B33; --card2: #15162B; --head: #0A0A17; --head-text: #F4F1FF; --head-muted: #B8B9E0;
  --border: #2E3060; --text: #F4F2FF; --muted: #B7B8DD;
  --acc: #3A6FF7; --acc-fill: #D62839; --acc-text: #FF6B78; --acc2: #FFC93C; --on-acc2: #0F1020; --acc2-text: #7FD8FF;
  --yes: #2E7D32; --no: #C62828; --alert-bg: #2A1426; --hatch: #2E3A7A;
  --font-titre: "Russo One", "Arial Black", sans-serif; --titre-poids: 400; --titre-echelle: .8;
  --stripe: repeating-linear-gradient(90deg,
    #E63946 0 28px, #0A0A17 28px 31px, #FFC93C 31px 45px, #0A0A17 45px 48px,
    #6FD3FF 48px 62px, #0A0A17 62px 65px, #3A6FF7 65px 93px, #0A0A17 93px 96px);
  --logo: linear-gradient(120deg, #FF4D5E 0%, #FFC93C 35%, #6FD3FF 65%, #3A6FF7 100%);
  --head-fond: linear-gradient(135deg, #0A0A17 0%, #141233 60%, #1B1030 100%);
  --deco-fond:
    radial-gradient(60% 40% at 0% 0%, rgba(230, 57, 70, .12), transparent 70%),
    radial-gradient(50% 35% at 100% 15%, rgba(58, 111, 247, .14), transparent 70%),
    radial-gradient(55% 35% at 15% 85%, rgba(111, 211, 255, .08), transparent 70%),
    radial-gradient(55% 40% at 100% 100%, rgba(255, 201, 60, .07), transparent 70%);
  --card-ombre: 0 0 0 1px rgba(111, 211, 255, .06), 0 10px 24px rgba(0, 0, 0, .35);
}
[data-theme="folk"] {
  --bg: #1C1815; --card: #2A241F; --card2: #231E1A; --head: #14110F; --head-text: #F1E8D8;
  --border: #3D342C; --text: #F1E8D8; --muted: #B9AD9A;
  --acc: #C0562A; --acc-fill: #A8441F; --acc-text: #E07A45; --acc2: #D9A441; --on-acc2: #1C1815;
  --yes: #4A7043; --no: #A8441F;
  --font-titre: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --stripe: repeating-linear-gradient(90deg, #C0562A 0 30px, #14110F 30px 33px, #D9A441 33px 39px, #14110F 39px 42px);
  --logo: linear-gradient(135deg, #D9A441, #E07A45);
}
[data-theme="rock"] {
  --bg: #111111; --card: #1D1D1D; --card2: #181818; --head: #000000; --head-text: #F5F5F5; --head-muted: #B8B8B8;
  --border: #3A3A3A; --text: #F5F5F5; --muted: #B3B3B3;
  --acc: #C8201F; --acc-fill: #B01C1B; --acc-text: #FF6A5E; --acc2: #F2B233; --on-acc2: #111111;
  --yes: #2E7D32; --no: #B01C1B; --alert-bg: #3A1212; --hatch: #444444;
  --font-titre: "Anton", Impact, sans-serif; --titre-poids: 400;
  --stripe: repeating-linear-gradient(90deg, #C8201F 0 30px, #000 30px 33px, #F5F5F5 33px 37px, #000 37px 40px);
  --logo: linear-gradient(135deg, #FF6A5E, #C8201F);
}
/* Punk : bleu skate-punk, inspiré de Millencolin (Life on a Plate) */
[data-theme="punk"] {
  --bg: #0B1330; --card: #14204A; --card2: #101A3D; --head: #070D22; --head-text: #EAF2FF; --head-muted: #A9BCE6;
  --border: #26386E; --text: #EEF4FF; --muted: #A9BCE6;
  --acc: #2F7BFF; --acc-fill: #1F5FD6; --acc-text: #7FB2FF; --acc2: #FFD23F; --on-acc2: #0B1330;
  --yes: #2E7D32; --no: #C62828; --alert-bg: #2A1030; --hatch: #2A3A66;
  --font-titre: "Permanent Marker", "Comic Sans MS", cursive; --titre-poids: 400; --titre-echelle: .85;
  --stripe: repeating-linear-gradient(45deg, #2F7BFF 0 12px, #070D22 12px 24px, #FFD23F 24px 36px, #070D22 36px 48px);
  --logo: linear-gradient(135deg, #7FB2FF, #2F7BFF 60%, #FFD23F);
}
[data-theme="metal"] {
  --bg: #0A0A0A; --card: #161616; --card2: #111111; --head: #000000; --head-text: #E6E6E6; --head-muted: #A8A8A8;
  --border: #2E2E2E; --text: #E6E6E6; --muted: #A8A8A8;
  --acc: #A30F0F; --acc-fill: #A30F0F; --acc-text: #E85555; --acc2: #C0C0C0; --on-acc2: #0A0A0A;
  --yes: #2F6B34; --no: #A30F0F; --alert-bg: #2A0A0A; --hatch: #3A3A3A;
  --font-titre: "Metal Mania", Impact, serif; --titre-poids: 400; --titre-echelle: .95;
  --stripe: repeating-linear-gradient(90deg, #A30F0F 0 22px, #000 22px 26px, #8A8A8A 26px 30px, #000 30px 34px);
  --logo: linear-gradient(180deg, #F2F2F2, #8A8A8A 55%, #D0D0D0);
}
/* Angine de Poitrine : noir et blanc, à pois, comme leurs costumes */
[data-theme="angine"] {
  --bg: #000000; --card: #141414; --card2: #0C0C0C; --head: #000000; --head-text: #FFFFFF; --head-muted: #BDBDBD;
  --border: #5A5A5A; --text: #FFFFFF; --muted: #BDBDBD;
  --acc: #FFFFFF; --acc-fill: #F2F2F2; --on-acc: #000000; --acc-text: #FFFFFF; --acc2: #8C8C8C; --on-acc2: #000000; --acc2-text: #FFFFFF;
  --yes: #2E7D32; --no: #C62828; --alert-bg: #262626; --hatch: #555555;
  --font-titre: "Rubik Mono One", "Arial Black", sans-serif; --titre-poids: 400; --titre-echelle: .75;
  --stripe: radial-gradient(circle, #FFFFFF 0 3px, transparent 3.5px) 0 50% / 12px 10px repeat-x, #000000;
  --logo: #FFFFFF;
}
[data-theme="armee"] {
  --bg: #1E2116; --card: #2A2E1F; --card2: #24281A; --head: #15170F; --head-text: #E8E4D0; --head-muted: #B5B09A;
  --border: #3D4230; --text: #ECE8D4; --muted: #B5B09A;
  --acc: #6B7B3A; --acc-fill: #556B2F; --acc-text: #A9BF6A; --acc2: #C8B560; --on-acc2: #1E2116;
  --yes: #4A7043; --no: #8B2E1F; --alert-bg: #3A2A16; --hatch: #4A4F3A;
  --font-titre: "Black Ops One", Impact, sans-serif; --titre-poids: 400; --titre-echelle: .8;
  --stripe: repeating-linear-gradient(90deg, #556B2F 0 26px, #3B3F26 26px 40px, #8A7B4A 40px 54px, #2A2E1F 54px 64px);
  --logo: linear-gradient(135deg, #C8B560, #8A9A4A);
}
[data-theme="automne"] {
  --bg: #1F1410; --card: #2E1E17; --card2: #271912; --head: #170E0B; --head-text: #F5E6D3; --head-muted: #C9B09A;
  --border: #4A3226; --text: #F5E6D3; --muted: #C9B09A;
  --acc: #D2691E; --acc-fill: #A0461A; --acc-text: #F08A4B; --acc2: #E0A526; --on-acc2: #1F1410;
  --yes: #4F7233; --no: #9E2B25; --alert-bg: #3A1D12; --hatch: #4A3A30;
  --font-titre: "Alfa Slab One", Rockwell, serif; --titre-poids: 400; --titre-echelle: .8;
  --stripe: repeating-linear-gradient(90deg, #D2691E 0 26px, #170E0B 26px 29px, #E0A526 29px 38px, #170E0B 38px 41px, #9E2B25 41px 56px, #170E0B 56px 59px);
  --logo: linear-gradient(135deg, #E0A526, #D2691E 55%, #9E2B25);
}
[data-theme="hiver"] {
  --bg: #0F1A26; --card: #182838; --card2: #132131; --head: #0A121B; --head-text: #EAF4FF; --head-muted: #A9C1D9;
  --border: #2A3F55; --text: #EAF4FF; --muted: #A9C1D9;
  --acc: #5FA8D3; --acc-fill: #2B6C99; --acc-text: #8CC8F0; --acc2: #DDEFFF; --on-acc2: #0F1A26; --acc2-text: #BFE0FF;
  --yes: #3E7D5A; --no: #B03A48; --alert-bg: #3A1D2A; --hatch: #34495E;
  --font-titre: "Fredoka", "Arial Rounded MT Bold", sans-serif; --titre-poids: 700; --titre-echelle: .85;
  --stripe: repeating-linear-gradient(90deg, #5FA8D3 0 24px, #0A121B 24px 27px, #FFFFFF 27px 33px, #0A121B 33px 36px);
  --logo: linear-gradient(180deg, #FFFFFF, #8CC8F0);
}
/* Printemps et été : thèmes clairs (l'en-tête et les onglets restent foncés) */
[data-theme="printemps"] {
  --bg: #F6F8EF; --card: #FFFFFF; --card2: #EEF2E4; --head: #2F5D3A; --head-text: #FFFFFF; --head-muted: #D5E8CF;
  --border: #CFD8C0; --text: #1E2A1E; --muted: #4F5E4C;
  --acc: #E07AA0; --acc-fill: #B83B6B; --acc-text: #A8325F; --acc2: #B9E4A0; --on-acc2: #10210E; --acc2-text: #3F7A2A;
  --yes: #2E7D4F; --no: #B3262E; --alert-bg: #FCE4EC; --hatch: #D9DECF; --cal-bord: #CFD8C0;
  --font-titre: "Baloo 2", "Arial Rounded MT Bold", sans-serif; --titre-echelle: .9;
  --stripe: repeating-linear-gradient(90deg, #E07AA0 0 24px, #FFFFFF 24px 28px, #B9E4A0 28px 40px, #FFFFFF 40px 44px);
  --logo: linear-gradient(135deg, #F7B7CF, #B9E4A0);
  color-scheme: light;
}
[data-theme="ete"] {
  --bg: #FFF8E7; --card: #FFFFFF; --card2: #FFF1CC; --head: #0B6E79; --head-text: #FFFFFF; --head-muted: #CDEFF2;
  --border: #F0DDA8; --text: #2B2118; --muted: #6A5A45;
  --acc: #F28C28; --acc-fill: #C2410C; --acc-text: #B23A0A; --acc2: #FFE27A; --on-acc2: #2B2118; --acc2-text: #0B6E79;
  --yes: #2E7D4F; --no: #B3262E; --alert-bg: #FDE3D8; --hatch: #EAD9A8; --cal-bord: #F0DDA8;
  --font-titre: "Bungee", Impact, sans-serif; --titre-poids: 400; --titre-echelle: .72;
  --stripe: repeating-linear-gradient(90deg, #F28C28 0 24px, #0B6E79 24px 28px, #FFE27A 28px 40px, #0B6E79 40px 44px);
  --logo: linear-gradient(135deg, #FFE27A, #F28C28);
  color-scheme: light;
}
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
html.big { --fs: 22px; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); background-image: var(--deco-fond); background-attachment: fixed; color: var(--text);
  font-family: var(--font-texte); line-height: 1.45;
}
body.staged { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--acc-text); }
:focus-visible { outline: 3px solid var(--acc2); outline-offset: 2px; }
[hidden] { display: none !important; }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- En-tête ---------- */
/* La barre du haut a TOUJOURS la même hauteur, sur tous les écrans et même en A+ :
   hauteur fixe en px, titre et sous-titre sur une seule ligne chacun (« … » si trop long). */
.top { background: var(--head-fond); color: var(--head-text); padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; position: relative; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: var(--stripe); }
.top-in { max-width: 44rem; margin: 0 auto; display: flex; gap: 12px; align-items: center; height: 96px; }
.titre-bloc { display: grid; gap: 4px; }
.titre-ligne { display: flex; align-items: center; gap: 4px; min-width: 0; }
.top h1 { min-width: 0; font-family: var(--font-titre); font-weight: var(--titre-poids); text-transform: uppercase; font-size: calc(clamp(24px, 7.2vw, 40px) * var(--titre-echelle)); line-height: 1.15; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sub { color: var(--head-muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Coin droit de l'en-tête : logo aux couleurs du thème, puis choix du thème et A+ */
.top-aside { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; height: 96px; }
.outils { display: flex; gap: 6px; }
.theme-btn { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; background: transparent; padding: 0; border: 2px solid var(--border); border-radius: 10px; color: var(--head-text); }
.theme-btn .ico { width: 24px; height: 24px; }
/* Le vrai <select> est invisible par-dessus l'icône : le téléphone ouvre son sélecteur natif. */
.theme-btn select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; min-height: 0; padding: 0; border: 0; }
.theme-btn select option { background: var(--card); color: var(--text); }
.theme-btn:focus-within { outline: 3px solid var(--acc2); outline-offset: 2px; }
/* Le logo est un pochoir (logo-masque.png) coloré par --logo : une ligne à changer par thème. */
.logo { display: block; width: 74px; aspect-ratio: 1.571; background: var(--logo);
  -webkit-mask: url("logo-masque.png") center / contain no-repeat; mask: url("logo-masque.png") center / contain no-repeat; }
.sans-logo .logo { display: none; }
.logo-texte { display: none; font-family: var(--font-titre); font-weight: var(--titre-poids); text-transform: uppercase; line-height: 1; text-align: center; background: var(--logo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sans-logo .logo-texte { display: block; }
.top .hello { color: var(--acc2); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .grow { flex: 1; min-width: 0; }
.bigbtn { flex: none; background: transparent; border: 2px solid var(--border); color: var(--head-text); border-radius: 10px; width: 44px; height: 44px; font-size: 16px; font-weight: 700; padding: 0; }
.bigbtn[aria-pressed="true"] { background: var(--head-text); color: var(--head); }
/* Flèche Retour, à gauche du titre des fiches */
.back { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; background: none; border: 0; color: var(--acc2); padding: 0; }
.back .ico { width: 26px; height: 26px; }
.navbtn { flex: none; background: var(--card); border: 0; border-radius: 12px; min-width: 2.75rem; min-height: 2.75rem; display: grid; place-items: center; color: var(--text); }
/* Navigation du calendrier (au-dessus de la grille) */
.nav-mois { display: flex; align-items: center; gap: .5rem; max-width: 30rem; width: 100%; margin: 0 auto; }

/* minmax(0, 1fr) : la colonne ne s'élargit jamais au-delà de l'écran, même avec un contenu large. */
main { max-width: 44rem; margin: 0 auto; padding: 1.8rem 1rem calc(76px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }

/* ---------- Éléments communs ---------- */
.card { background: var(--card); border: 2px solid var(--border); border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: var(--card-ombre); }
.card.hl { border-color: var(--acc); }
.card.warn { border-color: var(--acc2); }
.card.dark { background: var(--head); }
.kicker { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--acc2-text); }
.kicker.rust { color: var(--acc-text); }
.kicker.muted { color: var(--muted); }
.big-title { font-family: var(--font-titre); font-weight: var(--titre-poids); text-transform: uppercase; font-size: calc(2rem * var(--titre-echelle)); line-height: 1.1; margin: .25rem 0 .4rem; overflow-wrap: anywhere; }
.sec-title { font-family: var(--font-titre); font-weight: var(--titre-poids); text-transform: uppercase; font-size: calc(1.6rem * var(--titre-echelle)); color: var(--acc2-text); margin-top: .4rem; }
/* Bloc sur fond d'en-tête à l'intérieur d'une carte (établissement) */
.onhead { background: var(--head); color: var(--head-text); padding: 1rem 1.1rem; }
.onhead .kicker { color: var(--acc2); }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: .75rem; }
.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: .6rem; }
.empty { color: var(--muted); padding: .6rem 0; }

.pill { display: inline-flex; align-items: center; border-radius: 99px; padding: .3rem .9rem; font-weight: 700; font-size: .92rem; background: var(--border); color: var(--text); white-space: nowrap; }
.pill.oui, .pill.confirme { background: var(--yes); color: #fff; }
.pill.peut_etre, .pill.en_attente, .pill.opportunite, .pill.a_faire_suivi { background: var(--acc2); color: var(--on-acc2); }
.pill.non, .pill.vacances, .pill.annule { background: var(--no); color: #fff; }
.pill.none, .pill.passe { background: var(--card2); color: var(--muted); border: 1px solid var(--border); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 3rem; padding: .5rem .8rem; border-radius: 12px; font-weight: 700; border: 2px solid transparent; background: var(--card); color: var(--text); text-decoration: none; min-width: 0; text-align: center; overflow-wrap: break-word; }
.btn.primary { background: var(--acc-fill); color: var(--on-acc); }
.btn.yes { background: var(--yes); color: #fff; }
.btn.amber { background: var(--acc2); color: var(--on-acc2); }
.btn.outline { background: transparent; border-color: var(--acc); color: var(--text); }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.dashed { background: transparent; border: 2px dashed var(--border); color: var(--text); }
.btn.danger { background: transparent; border-color: var(--no); color: var(--acc-text); }
.btn.block { width: 100%; }
.btn.dark { background: var(--head); color: var(--head-text); }
.link { background: none; border: 0; padding: 0; color: var(--acc-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 2.75rem; text-align: left; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }

input[type=search], input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url],
input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; background: var(--card2); border: 2px solid var(--border); border-radius: 12px; padding: .65rem .8rem; min-height: 3rem;
}
textarea { resize: vertical; }
.search { position: relative; }
.search .ico { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 2.8rem; background: var(--card); border-color: var(--card); }

/* Liste cliquable (à faire, membres, établissements) */
.item { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; background: var(--card); border: 2px solid var(--border); border-radius: var(--r); padding: .9rem 1rem; color: var(--text); box-shadow: var(--card-ombre); }
.item.warn { border-color: var(--acc2); }
.item .t { font-weight: 700; font-size: 1.08rem; }
.item .s { color: var(--muted); }
.item > .ico:last-child { color: var(--muted); }
.badge { width: 3.2rem; height: 3.2rem; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--head); color: var(--acc2); }
.badge.amber { background: var(--acc2); color: var(--on-acc2); }
.badge .ico { width: 1.6rem; height: 1.6rem; }
.avatar { width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--head); color: var(--acc2); font-family: var(--font-titre); font-weight: var(--titre-poids); font-size: calc(1.35rem * var(--titre-echelle)); }
.avatar.me { background: var(--acc-fill); color: var(--on-acc); }
.avatar.amber { background: var(--acc2); color: var(--on-acc2); }

/* Tableau clé / valeur (cachet, heures, équipement) */
.kv { display: grid; gap: .55rem; }
.kv div { display: flex; justify-content: space-between; gap: 1rem; }
.kv dt, .kv .k { color: var(--muted); }
.kv dd, .kv .v { margin: 0; font-weight: 700; text-align: right; }
.divider { border: 0; border-top: 1px solid var(--border); margin: .8rem 0; }

/* Statut (fiche événement) */
.statuts { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.statuts button { min-height: 3rem; border-radius: 12px; border: 2px solid var(--border); background: var(--card2); font-weight: 700; }
.statuts button[aria-pressed="true"] { background: var(--acc2); border-color: var(--acc2); color: var(--on-acc2); }
.statuts button.annule[aria-pressed="true"] { background: var(--no); border-color: var(--no); color: #fff; }
.statuts button.confirme[aria-pressed="true"] { background: var(--yes); border-color: var(--yes); color: #fff; }

.alert { display: flex; gap: .8rem; align-items: flex-start; background: var(--alert-bg); border: 2px solid var(--acc); border-radius: var(--r); padding: .9rem 1rem; }
.alert .ico { color: var(--acc-text); width: 1.6rem; height: 1.6rem; margin-top: .1rem; }

.dispos { padding: .3rem 1rem; }
.dispos li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.dispos li:last-child { border-bottom: 0; }
.dispos ul { list-style: none; margin: 0; padding: 0; }
.reponse { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.reponse button { min-height: 3.2rem; border-radius: 12px; border: 3px solid transparent; font-weight: 700; }
.reponse .oui { background: var(--yes); color: #fff; }
.reponse .peut_etre { background: var(--acc2); color: var(--on-acc2); }
.reponse .non { background: var(--no); color: #fff; }
.reponse button[aria-pressed="false"] { opacity: .45; }
.reponse button[aria-pressed="true"] { border-color: var(--text); opacity: 1; }
.reponse.none button { opacity: 1; }

.placeholder { display: flex; align-items: center; justify-content: center; gap: .6rem; border: 2px dashed var(--border); border-radius: var(--r); padding: 1.6rem 1rem; color: var(--muted); text-align: center; }

/* Sondage */
.vote { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .6rem; margin: .9rem 0 .6rem; }
.vote button { min-height: 3.4rem; border-radius: 12px; font-weight: 700; font-size: 1.1rem; border: 2px solid var(--acc); background: transparent; }
.vote button[aria-pressed="true"] { background: var(--yes); border-color: var(--yes); color: #fff; }
.vote .n { font-weight: 400; font-size: .9rem; }

/* ---------- Calendrier ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; max-width: 30rem; width: 100%; margin: 0 auto; user-select: none; -webkit-user-select: none; }
/* Appui long et double tap sur mobile : pas de menu contextuel ni de zoom */
.cal button { touch-action: manipulation; -webkit-touch-callout: none; }
.cal .dow { text-align: center; color: var(--muted); font-weight: 700; padding: .2rem 0; }
/* Pas de min-height ici : avec aspect-ratio, ça forcerait une largeur minimale et la grille déborderait. */
.cal button { position: relative; aspect-ratio: 1.15; min-height: 44px; min-width: 0; border: 2px solid var(--cal-bord); border-radius: 10px; background: var(--card); font-weight: 700; font-size: 1.05rem; padding: 0; }
.cal button.show { background: var(--acc-fill); color: var(--on-acc); border-color: transparent; }
.cal button.pratique { background: var(--acc2); color: var(--on-acc2); }
.cal button.vac { background: repeating-linear-gradient(135deg, var(--card) 0 6px, var(--hatch) 6px 12px); }
.cal button.today { border-color: var(--text); }
.cal button.sel { outline: 3px solid var(--acc2); outline-offset: 1px; }
/* Légende du calendrier : une seule ligne ; si l’écran est trop étroit, elle défile de côté. */
.legend { display: flex; flex-wrap: nowrap; gap: .75rem; overflow-x: auto; scrollbar-width: none; max-width: 30rem; width: 100%; margin: 0 auto; font-size: .88rem; }
.legend span { display: flex; align-items: center; gap: .4rem; flex: none; white-space: nowrap; }
.legend i { width: 1rem; height: 1rem; border-radius: 4px; display: inline-block; flex: none; }

/* ---------- Tounes ---------- */
.segs { display: flex; flex-wrap: wrap; gap: .4rem; background: var(--card); border-radius: 12px; padding: .3rem; }
.segs button { flex: 1 1 auto; padding: 0 .6rem; min-height: 2.9rem; border: 0; border-radius: 9px; background: transparent; font-weight: 700; color: var(--muted); }
.segs button[aria-current="page"] { background: var(--acc-fill); color: var(--on-acc); }
.chips { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; }
.chip { border: 2px solid var(--border); background: transparent; border-radius: 99px; padding: .35rem 1rem; min-height: 2.75rem; white-space: nowrap; font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--acc2); border-color: var(--acc2); color: var(--on-acc2); }
.count { color: var(--muted); font-size: .92rem; }
.songs { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.songlines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
/* Trois colonnes alignées : artiste (italique) | titre | durée */
.songline { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: .6rem; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: .7rem .2rem; min-height: 2.75rem; color: var(--text); }
.songline .art { font-style: italic; color: var(--muted); overflow-wrap: anywhere; }
.songline .tit { font-weight: 700; overflow-wrap: anywhere; }
.songline .dur { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.tag { font-size: .8rem; border: 1px solid var(--border); border-radius: 6px; padding: .05rem .45rem; color: var(--muted); }
.tag.instr { border-color: var(--acc2); color: var(--acc2); }
.meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
pre.accords { font-family: var(--font-mono); font-weight: 500; white-space: pre-wrap; margin: 0; font-size: 1rem; line-height: 1.5; }
.paroles { white-space: pre-wrap; }

.setlist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--border); }
.setlist .srow { display: grid; grid-template-columns: 2.1rem 1fr auto; align-items: center; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.setlist .n { font-family: var(--font-titre); font-weight: var(--titre-poids); color: var(--acc-text); font-size: 1.4rem; text-align: right; }
.setlist .body { display: grid; min-width: 0; }
.setlist .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.setlist .ctl { grid-column: 2 / -1; display: flex; gap: .4rem; }
.setlist .pause { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.setlist .pl { flex: 1; text-align: center; font-weight: 700; color: var(--acc2-text); border-top: 2px dashed var(--acc2-text); border-bottom: 2px dashed var(--acc2-text); padding: .3rem 0; }
.ic-btn { min-width: 2.75rem; min-height: 2.75rem; border: 2px solid var(--border); background: var(--card); border-radius: 10px; }
.ic-btn:disabled { opacity: .35; cursor: default; }

/* ---------- Onglets du bas ---------- */
/* Onglets du bas : autant de colonnes que d'onglets. Taille fixe (pas affectée par A+) pour que 6 onglets tiennent sur un cellulaire. */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--head); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs button { min-width: 0; background: none; border: 0; color: var(--head-text); font-weight: 700; font-size: 11px; letter-spacing: -.03em; line-height: 1.1; padding: 5px 1px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.tabs .ico { width: 22px; height: 22px; }
.tabs button[aria-current="page"] { color: var(--acc2); }

/* ---------- Formulaire (feuille du bas) ---------- */
dialog { width: 100%; max-width: 34rem; margin: auto auto 0; border: 0; border-radius: 18px 18px 0 0; padding: 1.2rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); background: var(--card); color: var(--text); max-height: 92%; overflow: auto; }
@media (min-width: 40rem) { dialog { margin: auto; border-radius: 18px; } }
dialog::backdrop { background: rgba(0, 0, 0, .65); }
.sheet { display: grid; gap: .35rem; }
.sheet h3 { font-family: var(--font-titre); font-weight: var(--titre-poids); text-transform: uppercase; font-size: calc(1.7rem * var(--titre-echelle)); margin-bottom: .3rem; }
.sheet label { font-weight: 700; font-size: .95rem; margin-top: .5rem; }
.sheet .hint { color: var(--muted); font-size: .88rem; }
.sheet fieldset { border: 0; padding: 0; margin: .5rem 0 0; }
.sheet legend { font-weight: 700; font-size: .95rem; padding: 0; }
.checks { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .3rem; }
.checks label { font-weight: 400; display: flex; align-items: center; gap: .45rem; margin: 0; min-height: 2.75rem; }
.checks input { width: 1.4rem; height: 1.4rem; accent-color: var(--acc2); }
.sheet-actions { display: flex; gap: .5rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
textarea.mono { font-family: var(--font-mono); }

/* ---------- Mode scène : contraste maximal, très gros caractères ---------- */
#stage { position: fixed; inset: 0; background: #000; color: #fff; z-index: 50; overflow: auto; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.stage-bar { position: sticky; top: 0; display: flex; gap: .5rem; align-items: center; padding: .6rem 1rem; background: #000; border-bottom: 1px solid #333; }
.stage-bar button { background: #222; color: #fff; border: 0; border-radius: 10px; min-height: 2.9rem; min-width: 3rem; font-weight: 700; padding: 0 .8rem; }
.stage-list { list-style: none; margin: 0; padding: .6rem 1rem 3rem; font-size: var(--stage); line-height: 1.15; }
.stage-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em .5em; padding: .35em 0; border-bottom: 1px solid #333; }
.sn { font-family: var(--font-titre); font-weight: var(--titre-poids); color: var(--acc2); min-width: 1.6em; }
.st { font-weight: 700; flex: 1; min-width: 0; }
.sk { font-size: .6em; color: #ddd; }
.si { font-size: .5em; color: var(--acc2); width: 100%; padding-left: 2.1em; }
.s-pause { justify-content: center; color: var(--acc2); font-size: .7em; border-top: 3px dashed var(--acc2); border-bottom: 3px dashed var(--acc2) !important; margin: .4em 0; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(62px + env(safe-area-inset-bottom, 0px)); background: var(--text); color: var(--bg); padding: .7rem 1.1rem; border-radius: 12px; max-width: 90%; z-index: 60; font-weight: 700; }
.toast:empty { display: none; }

/* ---------- Fériés du Québec : barre de couleur propre à chaque férié ---------- */
.cal button.ferie::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 12%; height: 5px; border-radius: 3px; background: var(--ferie); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.legend i.barre { height: .45rem; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }

/* ---------- Sections dans un formulaire (ex. « Coordonnées », « Personne contact ») ---------- */
.sheet .sheet-sec { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--acc-text); margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--border); }
.sous-titre { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--acc-text); }

/* ---------- Page de connexion ---------- */
.login { min-height: 100svh; display: grid; place-items: center; padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); background: radial-gradient(120% 70% at 50% 0%, var(--card) 0%, var(--bg) 60%); }
.login-in { width: 100%; max-width: 24rem; display: grid; gap: 1.4rem; }
.login-marque { display: grid; justify-items: center; gap: .7rem; text-align: center; }
.login-marque .logo { width: min(13rem, 60vw); }
.login-marque .logo-texte { font-size: calc(2.4rem * var(--titre-echelle)); }
.login-marque p { color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; font-weight: 700; }
.login-marque .bande { width: 5rem; height: 6px; border-radius: 3px; background: var(--stripe); }
.login .card { padding: 1.3rem 1.2rem; }
.login-outils { display: flex; justify-content: center; gap: .5rem; }
.login-outils .theme-btn, .login-outils .bigbtn { color: var(--text); }

/* ---------- Logo dans l'en-tête, page de connexion, utilitaires ---------- */
.logo-bloc { display: grid; justify-items: center; }
.top .logo-texte { width: 74px; font-size: 15px; }
main.main-login { max-width: none; padding: 0; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Onglet Événements : talon de billet avec la date ---------- */
.evligne { align-items: stretch; padding: 0; overflow: hidden; }
.evligne > .grow { padding: .8rem 0; }
.evligne > .ico { align-self: center; margin-right: .8rem; }
.talon { flex: none; width: 4.2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--acc-fill); color: var(--on-acc); border-right: 3px dashed var(--bg); padding: .5rem .2rem; }
.evligne.prac .talon { background: var(--acc2); color: var(--on-acc2); }
.talon b { font-family: var(--font-titre); font-weight: var(--titre-poids); font-size: calc(1.7rem * var(--titre-echelle)); line-height: 1; }
.talon span { font-size: .85rem; font-weight: 700; }
.talon .an { font-size: .72rem; font-weight: 400; opacity: .9; }

/* ---------- Tounes à apprendre : barre de progression du groupe ---------- */
.progres { height: 10px; border-radius: 99px; background: var(--card2); border: 1px solid var(--border); overflow: hidden; }
.progres span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--acc-fill), var(--acc2)); }
[data-theme="bbpc"] .progres span { background: linear-gradient(90deg, #E63946, #FFC93C, #6FD3FF, #3A6FF7); }
