/* Calendrier commun : Coin du bureau (édition) et Coin des sorties (lecture seule).
   Grille mensuelle avec numéros de semaine, badges par couche, légende masquable. */

.bu-cal-dot{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:middle}
.bu-cal-ferie{background:#dc2626}
.bu-cal-vacances{background:#f59e0b}
.bu-cal-election{background:#7c3aed}
.bu-cal-autre{background:#0284c7}
.bu-cal-sortie{background:#059669}
.bu-cal-sortie-nev{background:#0891b2}
/* Brouillon : sortie planifiée, pas encore ouverte aux inscriptions (visible du bureau seulement) */
.bu-cal-sortie-brouillon{background:repeating-linear-gradient(135deg,#db2777 0 6px,#be185d 6px 12px)}
.bu-cal-nav{display:flex;align-items:center;justify-content:center;gap:16px;margin-bottom:10px;font-size:14px;color:#1e3a5f}
.bu-cal-entetes{display:grid;grid-template-columns:34px repeat(7,minmax(0,1fr));gap:4px;font-size:11px;color:#9ca3af;text-align:center;margin-bottom:4px;text-transform:uppercase}
.bu-cal-grille{display:grid;grid-template-columns:34px repeat(7,minmax(0,1fr));gap:4px}
.bu-cal-semaine{display:flex;align-items:center;justify-content:center;min-width:0;box-sizing:border-box;
    border-radius:6px;font-size:10px;font-weight:700;color:#fff}
.bu-cal-semaine.bu-cal-semaine-impaire{background:#94a3b8}
.bu-cal-semaine.bu-cal-semaine-paire{background:#475569}
.bu-cal-jour{min-height:74px;min-width:0;box-sizing:border-box;overflow:hidden;border:1px solid #e5e7eb;border-radius:6px;padding:4px;font-size:11px;background:#fff;cursor:pointer}
.bu-cal-jour:hover{border-color:#1e3a5f}
.bu-cal-jour.bu-cal-vide{background:#f9fafb;border-style:dashed;cursor:default}
.bu-cal-jour.bu-cal-vide:hover{border-color:#e5e7eb}
.bu-cal-jour.bu-cal-ferie-jour{background:#fef2f2}
.bu-cal-jour.bu-cal-vacances-jour{background:#fffbeb}
/* Jour avec une sortie du club : case teintee de vert, prioritaire sur les fonds ferie/vacances */
.bu-cal-jour.bu-cal-sortie-jour{--teinte:#ecfdf5;background:var(--teinte);border-color:#059669}
.bu-cal-jour.bu-cal-sortie-nev-jour{--teinte:#ecfeff;background:var(--teinte);border-color:#0891b2}
.bu-cal-jour.bu-cal-sortie-brouillon-jour{--teinte:#fdf2f8;background:var(--teinte);border:1px dashed #db2777}
/* Demi-journée : départ l'après-midi (bas de la case teinté) ou retour le matin (haut teinté) */
.bu-cal-jour.bu-cal-demi-apm{background:linear-gradient(to bottom,#fff 50%,var(--teinte) 50%)}
.bu-cal-jour.bu-cal-demi-matin{background:linear-gradient(to bottom,var(--teinte) 50%,#fff 50%)}
/* La barre de la sortie suit la demi-journée : moitié droite (départ l'après-midi) ou moitié gauche (retour le matin) */
.bu-cal-badge.bu-cal-barre-apm{margin-left:50%}
.bu-cal-badge.bu-cal-barre-matin{margin-right:50%}
.bu-cal-num{font-weight:700;color:#374151;margin-bottom:3px}
.bu-cal-badge{display:block;border-radius:3px;padding:1px 4px;margin-bottom:2px;font-size:10px;line-height:1.3;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bu-cal-badge.bu-cal-ferie{background:#dc2626}
.bu-cal-badge.bu-cal-vacances{background:#f59e0b;color:#78350f}
.bu-cal-badge.bu-cal-election{background:#7c3aed}
.bu-cal-badge.bu-cal-autre{background:#0284c7}
.bu-cal-badge.bu-cal-sortie{background:#059669;font-weight:700;font-size:11px;padding:2px 5px}
.bu-cal-badge.bu-cal-sortie.bu-cal-sortie-nev{background:#0891b2}
.bu-cal-badge.bu-cal-sortie.bu-cal-sortie-brouillon{background:repeating-linear-gradient(135deg,#db2777 0 6px,#be185d 6px 12px)}
/* Vacances des zones A/B (autres académies) : simple liseré discret, pas
   un badge texte, juste pour signaler visuellement qu'il y a des vacances
   ailleurs sans surcharger l'affichage — la Zone C (Toulouse) reste seule
   à avoir un badge complet, car c'est elle qui contraint les sorties. */
.bu-cal-vacances-autre{height:3px;border-radius:2px;background:#cbd5e1;margin-top:2px}
@media (max-width: 600px) {
    .bu-cal-entetes,.bu-cal-grille{gap:2px;grid-template-columns:22px repeat(7,minmax(0,1fr))}
    .bu-cal-jour{min-height:52px;padding:2px;font-size:9px}
    .bu-cal-badge{padding:0 2px;font-size:8px}
    .bu-cal-badge.bu-cal-sortie{padding:1px 2px;font-size:9px}
    .bu-cal-num{font-size:10px;margin-bottom:1px}
    .bu-cal-semaine{font-size:8px;border-radius:4px}
}

/* ── Calendrier : couches Espagne / Catalogne (masquables) ── */
.bu-cal-couches{display:flex;flex-direction:column;gap:6px;font-size:12.5px;color:#374151;margin:0 0 12px;padding:8px 12px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:8px}
.bu-cal-couches[hidden]{display:none !important}
.bu-cal-groupe{display:flex;align-items:baseline;gap:10px}
.bu-cal-couches-titre{font-weight:700;color:#1e3a5f;flex:0 0 64px}
.bu-cal-groupe-items{display:flex;flex-wrap:wrap;gap:4px 16px;min-width:0}
.bu-cal-legende-note{margin:2px 0 0;font-size:12px;color:#6b7280}
.bu-cal-vacances-ab-dot{background:#cbd5e1;height:4px;border-radius:2px;vertical-align:middle}
.bu-cal-couches label{display:inline-flex;align-items:center;gap:5px;cursor:pointer;font-weight:400}
.bu-cal-couches input[type=checkbox]{width:16px;height:16px;margin:0;flex:none}
.bu-cal-ferie-es,.bu-cal-badge.bu-cal-ferie-es{background:#c2410c}
.bu-cal-ferie-ct,.bu-cal-badge.bu-cal-ferie-ct{background:#a16207}
.bu-cal-vacances-ct-dot{background:repeating-linear-gradient(90deg,#facc15 0 3px,#dc2626 3px 6px)}
.bu-cal-pont-dot{background:#fff;box-shadow:inset 0 0 0 2px #fb923c}
.bu-cal-vacances-ct{height:4px;border-radius:2px;margin-top:2px;background:repeating-linear-gradient(90deg,#facc15 0 6px,#dc2626 6px 12px)}
.bu-cal-jour.bu-cal-pont-jour{box-shadow:inset 0 0 0 2px #fb923c}
.bu-cal-jour.bu-cal-pont-fr-jour{outline:2px dashed #dc2626;outline-offset:-2px}
/* France + Espagne le meme jour : le tirete rouge passe a l'interieur du trait orange */
.bu-cal-jour.bu-cal-pont-jour.bu-cal-pont-fr-jour{outline-offset:-5px}
.bu-cal-pont-fr-dot{background:#fff;outline:2px dashed #dc2626;outline-offset:-2px}
@media (max-width:720px){
    .bu-cal-couches{font-size:13px;gap:8px}
    .bu-cal-groupe{flex-direction:column;gap:2px}
    .bu-cal-couches-titre{flex:none}
}

/* Lecture seule (Coin des sorties) : une sortie est un bouton qui ouvre sa fiche ; coche = inscrit ou en attente.
   Scopé avec !important : Astra impose fond, majuscules et padding aux boutons. */
.bu-cal-grille button.bu-cal-badge{all:unset;box-sizing:border-box;display:block !important;width:100% !important;cursor:pointer;
    background:#059669 !important;color:#fff !important;font-weight:700 !important;font-size:11px !important;line-height:1.3 !important;
    padding:2px 5px !important;margin:0 0 2px !important;border-radius:3px !important;text-transform:none !important;letter-spacing:normal !important;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left !important;border:0 !important;box-shadow:none !important}
.bu-cal-grille button.bu-cal-badge:hover{background:#047857 !important}
.bu-cal-grille button.bu-cal-badge.bu-cal-barre-apm{width:50% !important;margin-left:50% !important}
.bu-cal-grille button.bu-cal-badge.bu-cal-barre-matin{width:50% !important}
.bu-cal-grille button.bu-cal-badge.bu-cal-sortie-nev{background:#0891b2 !important}
.bu-cal-grille button.bu-cal-badge.bu-cal-sortie-nev:hover{background:#0e7490 !important}
.bu-cal-grille button.bu-cal-badge:focus-visible{outline:2px solid #0e7490;outline-offset:1px}
.bu-cal-grille .bu-cal-moi::before{content:"✓ "}
@media (max-width: 600px) {
    .bu-cal-grille button.bu-cal-badge{padding:1px 2px !important;font-size:9px !important}
}

/* Badge d'une proposition dans la grille (liseré ambre tireté, distinct des brouillons roses) */
.bu-cal-badge.bu-cal-proposition{background:#fffbeb;color:#92400e;border:1px dashed #d97706;font-weight:600;display:flex;align-items:center;gap:3px}
.bu-cal-badge.bu-cal-proposition svg{width:10px;height:10px;flex:none;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bu-cal-dot.bu-cal-proposition{background:#fffbeb;border:1px dashed #d97706}
.bu-cal-badge.bu-cal-proposition.bu-cal-proposition-refusee{background:#f3f4f6;color:#6b7280;border-color:#9ca3af}

