/* Portail admin */
:root { --a-orange: #e8660c; --a-orange-dark: #b94f06; }
body { background: #f6f4f1; }
.a-navbar { background: var(--a-orange); }
.a-navbar .navbar-brand { font-weight: 700; }
/* Menu en boutons : chaque entrée est une pastille, la page courante en blanc */
.a-navbar .navbar-nav { gap: 6px; }
.a-navbar .nav-link { color: #fff; font-weight: 500; padding: 6px 14px; border-radius: 8px;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); transition: background .12s; }
.a-navbar .nav-link:hover, .a-navbar .nav-link:focus-visible, .a-navbar .nav-link.show { color: #fff; background: rgba(255,255,255,.28); }
.a-navbar .nav-link.active { color: var(--a-orange-dark); background: #fff; border-color: #fff; font-weight: 600; }
.a-navbar .a-nav-user .nav-link { background: transparent; }
.a-navbar .a-nav-user .nav-link:hover, .a-navbar .a-nav-user .nav-link.show { background: rgba(255,255,255,.18); }
/* Menus déroulants et recherche rapide */
.a-navbar .dropdown-menu { border: 0; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.16); padding: 6px; min-width: 15rem; }
.a-navbar .dropdown-item { border-radius: 6px; padding: 7px 12px; }
.a-navbar .dropdown-item.active, .a-navbar .dropdown-item:active { background: var(--a-orange); color: #fff; }
.a-navbar .dropdown-item:hover:not(.active) { background: color-mix(in srgb, var(--a-orange) 10%, #fff); }
.a-menu-plus { display: inline-block; width: 1em; font-weight: 700; color: var(--a-orange); }
.dropdown-item.active .a-menu-plus { color: #fff; }
.a-menu-ext { color: #adb5bd; font-size: .85em; }
.a-nav-search { margin: 0 12px; }
.a-nav-search .form-control { width: 15rem; background: rgba(255,255,255,.92); border: 0; border-radius: 8px; }
.a-nav-search .form-control:focus { background: #fff; box-shadow: 0 0 0 .2rem rgba(255,255,255,.45); }
@media (min-width: 992px) and (max-width: 1199.98px) {
    .a-nav-search .form-control { width: 11rem; }
}
@media (max-width: 991.98px) {
    .a-navbar .navbar-nav { padding-top: 10px; }
    .a-navbar .nav-link { padding: 10px 14px; }
    .a-navbar .dropdown-menu { box-shadow: none; background: rgba(255,255,255,.96); margin-bottom: 6px; }
    .a-nav-search { margin: 10px 0 0; }
    .a-nav-search .form-control { width: 100%; padding: 10px 12px; font-size: 1rem; }
}
.a-main { padding-block: 24px 48px; max-width: 1800px; }
.a-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 1rem; }

.btn-primary { --bs-btn-bg: var(--a-orange); --bs-btn-border-color: var(--a-orange); --bs-btn-hover-bg: var(--a-orange-dark);
    --bs-btn-hover-border-color: var(--a-orange-dark); --bs-btn-active-bg: var(--a-orange-dark); --bs-btn-active-border-color: var(--a-orange-dark);
    --bs-btn-disabled-bg: var(--a-orange); --bs-btn-disabled-border-color: var(--a-orange); }
.btn-outline-primary { --bs-btn-color: var(--a-orange-dark); --bs-btn-border-color: var(--a-orange); --bs-btn-hover-bg: var(--a-orange);
    --bs-btn-hover-border-color: var(--a-orange); --bs-btn-active-bg: var(--a-orange-dark);
    --bs-btn-active-border-color: var(--a-orange-dark); --bs-btn-disabled-color: var(--a-orange-dark); --bs-btn-disabled-border-color: var(--a-orange); }
a { color: var(--a-orange-dark); }
.pagination { --bs-pagination-active-bg: var(--a-orange); --bs-pagination-active-border-color: var(--a-orange); --bs-pagination-color: var(--a-orange-dark); }
.form-control:focus, .form-select:focus { border-color: color-mix(in srgb, var(--a-orange) 55%, #fff); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--a-orange) 20%, transparent); }

/* Formulaires en sections (fiche membre, paramètres) */
.a-form .card-body { padding: 0; }
.a-form-section { padding: 20px 24px; }
.a-form-section + .a-form-section { border-top: 1px solid #eee; }
.a-section-title { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--a-orange-dark); margin-bottom: 14px; }
.a-form .form-label { font-size: .875rem; color: #555; margin-bottom: 4px; }
.a-required::after { content: " *"; color: #c0392b; font-weight: 700; }
/* Réglage numérique : libellé à gauche, valeur et unité à droite */
.a-setting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 8px 0; }
.a-setting + .a-setting { border-top: 1px dashed #eee; }
.a-setting-label { margin: 0; }
.a-setting-input { width: 270px; max-width: 100%; }
.a-setting-input .form-control { max-width: 90px; }
.a-setting-input .input-group-text { flex: 1; font-size: .85rem; color: #666; }
.a-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }

.a-login { max-width: 420px; margin: 8vh auto 0; }
.a-filters .form-label { font-size: .85rem; margin-bottom: .2rem; color: #555; }
.a-table th { white-space: nowrap; background: #faf7f3; font-size: .9rem; }
.a-table th .a-sort { color: inherit; text-decoration: none; }
.a-table th .a-sort:hover { text-decoration: underline; }
.a-sort-arrow { font-size: .7rem; opacity: .35; }
.a-sort.active .a-sort-arrow { opacity: 1; }
.a-row-link { cursor: pointer; }
.a-inactive td { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.a-details { max-width: 520px; word-break: break-word; }
.a-history { max-height: 420px; overflow-y: auto; }

.a-tile { text-decoration: none; color: inherit; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .1s; }
.a-tile:hover { transform: translateY(-2px); color: inherit; }
.a-tile-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.a-tile-label { color: #6c757d; font-size: .9rem; margin-top: 4px; }
.a-tile-accent { background: var(--a-orange); color: #fff; }
.a-tile-accent .a-tile-label { color: rgba(255,255,255,.9); }
.a-tile-accent:hover { color: #fff; }
.a-weapon-checks { max-height: 260px; overflow-y: auto; border: 1px solid #dee2e6; border-radius: .375rem; padding: 8px 12px; }

/* Statistiques : colonnes simples (une série) */
.a-bars { display: flex; align-items: flex-end; gap: 2px; height: 180px; }
.a-bar-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; text-align: center; }
.a-bar-area { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.a-bar { background: var(--a-orange); border-radius: 4px 4px 0 0; margin: 0 15%; min-height: 0; }
.a-bar-col:hover .a-bar { background: var(--a-orange-dark); }
.a-bar-value { font-size: .75rem; color: #444; line-height: 1.4; }
.a-bar-label { font-size: .75rem; color: #6c757d; border-top: 1px solid #ddd; padding-top: 2px; white-space: nowrap; overflow: hidden; }
.a-delta { display: inline-block; margin-top: 6px; font-size: .78rem; color: #6c757d; }

/* Photo du membre (fiche) */
.a-photo { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.a-photo-frame { position: relative; width: 150px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden;
    background: #e9ecef; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.a-photo-frame img, .a-photo-frame video { width: 100%; height: 100%; object-fit: cover; }
.a-photo-frame video { position: absolute; inset: 0; }
.a-photo-frame video[hidden] { display: none; }
.a-photo-none { font-size: 4rem; font-weight: 700; color: #adb5bd; }
.a-photo-tools { flex: 1 1 200px; }
.a-photo.is-new .a-photo-frame { outline: 3px solid #ffc107; }
.a-photo-thumb { width: 96px; }
.a-photo-thumb .a-photo-none { font-size: 2.6rem; }

/* Calendrier des séances d'initiation (admin/initiations.php) */
.a-cal-month { display: inline-block; min-width: 9.5em; text-align: center; font-weight: 600; }
.a-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--bs-border-color); }
.a-cal-head { padding: 6px 8px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #666;
    background: #f8f9fa; border-bottom: 1px solid var(--bs-border-color); }
.a-cal-day { min-height: 104px; padding: 4px 6px 6px; border-right: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color);
    display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.a-cal-day:nth-child(7n + 7) { border-right: 0; }
.a-cal-day.is-closed { background: repeating-linear-gradient(135deg, #f6f6f6 0 6px, #efefef 6px 12px); }
.a-cal-day.is-other { opacity: .45; }
.a-cal-day.is-today { box-shadow: inset 0 0 0 2px var(--a-orange); }
.a-cal-num { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; font-weight: 600; color: #444; }
.a-cal-day.is-today .a-cal-num { color: var(--a-orange-dark); }
.a-cal-wd { display: none; }
.a-cal-add { width: 22px; height: 22px; line-height: 20px; text-align: center; border-radius: 50%; text-decoration: none; color: var(--a-orange-dark);
    border: 1px solid transparent; font-weight: 700; opacity: 0; transition: opacity .15s; }
.a-cal-day:hover .a-cal-add, .a-cal-add:focus-visible { opacity: 1; border-color: var(--a-orange); }
.a-cal-item { display: flex; gap: 4px; align-items: baseline; padding: 2px 6px; border-radius: 5px; font-size: .78rem; line-height: 1.3;
    text-decoration: none; color: #222; background: color-mix(in srgb, var(--a-orange) 15%, #fff); border-left: 3px solid var(--a-orange); min-width: 0; }
.a-cal-item:hover { filter: brightness(.95); }
.a-cal-item.is-selected { outline: 2px solid var(--a-orange-dark); }
.a-cal-item.is-en_cours { background: #d5f1df; border-left-color: #198754; }
.a-cal-item.is-terminee { background: #e9ecef; border-left-color: #6c757d; color: #555; }
.a-cal-item.is-annulee { background: #f8f9fa; border-left-color: #ced4da; color: #888; text-decoration: line-through; }
.a-cal-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-cal-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.a-cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: #fde7d6;
    border-left: 3px solid var(--a-orange); }
.a-cal-dot.is-en_cours { background: #d5f1df; border-left-color: #198754; }
.a-cal-dot.is-terminee { background: #e9ecef; border-left-color: #6c757d; }
.a-cal-dot.is-annulee { background: #f8f9fa; border-left-color: #ced4da; }
.a-cal-dot.is-closed { background: repeating-linear-gradient(135deg, #f6f6f6 0 3px, #ddd 3px 5px); border-left: 0; }
.a-link-box { background: color-mix(in srgb, var(--a-orange) 5%, #fff); border: 1px solid color-mix(in srgb, var(--a-orange) 30%, #fff); border-radius: 8px; padding: 10px 12px; }
/* Téléphone : liste des jours qui ont des séances (et aujourd'hui) */
@media (max-width: 767.98px) {
    .a-cal { display: block; }
    .a-cal-head, .a-cal-day.is-empty:not(.is-today), .a-cal-day.is-other { display: none; }
    .a-cal-day { min-height: 0; border-right: 0; padding: 8px 12px; }
    .a-cal-wd { display: inline; }
    .a-cal-add { opacity: 1; }
    .a-cal-item { font-size: .9rem; padding: 6px 8px; }
}

/* Image du club : aperçus */
.a-brand-preview { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 12px;
                   background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 0 0 / 16px 16px; border: 1px solid var(--bs-border-color); border-radius: 6px; }
.a-brand-preview img { max-width: 100%; max-height: 160px; }
.a-brand-carte-fond img { width: 323px; max-height: none; aspect-ratio: 85.6 / 54; object-fit: cover; border-radius: 10px; }
.a-brand-icone img { width: 96px; height: 96px; }

/* Réglages et Paramètres : barre des sections, qui reste visible au défilement */
.a-subnav { position: sticky; top: 1rem; }
.a-subnav .list-group-item { padding: .45rem .9rem; font-size: .925rem; }
.a-form-section[id], .card[id] { scroll-margin-top: 1rem; }
@media (max-width: 991.98px) { .a-subnav { position: static; display: flex; flex-wrap: wrap; flex-direction: row; gap: .25rem; }
    .a-subnav .list-group-item { border-radius: 999px !important; border-width: 1px !important; width: auto; } }

/* Mention TirPass, discrète, au pied des pages */
.a-footer { text-align: center; padding: 28px 0 18px; }
.tp-powered { display: inline-flex; align-items: center; gap: 5px; color: #a8a8a8 !important; font-size: .75rem; text-decoration: none; opacity: .85; }
.tp-powered:hover { color: #666 !important; opacity: 1; }
.tp-powered img { width: 14px; height: 14px; filter: grayscale(1); opacity: .7; }
.tp-powered:hover img { filter: none; opacity: 1; }
@media print { .a-footer { display: none; } }
