/*
 * Espace pro (organisateurs + administration) : templates/backoffice/base.html.twig.
 * Gabarit d'application : barre latérale, barre du haut, contenu sur fond gris clair. Couleurs de la marque.
 */
:root {
    --bo-primary: #0a4d8c;
    --bo-primary-dark: #073a6a;
    --bo-primary-tint: #e8f0f8;
    --bo-ink: #14223a;
    --bo-ink-soft: #5b6676;
    --bo-line: #e3e7ed;
    --bo-bg: #f5f7fa;
    --bo-surface: #ffffff;
    --bo-side: #0f1b2d;
    --bo-side-ink: #c5cedb;
    --bo-side-muted: #7d8a9c;
    --bo-side-hover: #1b2a41;
    --bo-radius: 10px;
    --bo-sidebar: 260px;
    --bo-font-title: 'Outfit', system-ui, sans-serif;
    --bo-font-body: 'Source Sans 3', system-ui, sans-serif;
}

body.bo { margin: 0; background: var(--bo-bg); color: var(--bo-ink); font-family: var(--bo-font-body); font-size: 15px; }
.bo a { color: var(--bo-primary); }
.bo h1, .bo h2, .bo h3, .bo .h3, .bo .h4, .bo .h5 { font-family: var(--bo-font-title); color: var(--bo-ink); }

/* ---------- Barre latérale ---------- */
.bo-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--bo-sidebar); background: var(--bo-side); color: var(--bo-side-ink); display: flex; flex-direction: column; z-index: 1040; }
.bo-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid rgba(255, 255, 255, .06); text-decoration: none; }
.bo-brand img { height: 30px; width: auto; filter: brightness(0) invert(1); opacity: .95; }
.bo-brand span { font-family: var(--bo-font-title); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--bo-side-muted); }
.bo-nav { flex: 1; overflow-y: auto; padding: 12px 12px 20px; }
.bo-nav__title { margin: 18px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bo-side-muted); }
.bo-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--bo-side-ink); text-decoration: none; font-weight: 600; }
.bo-nav a .bi { font-size: 1.05rem; width: 20px; text-align: center; opacity: .85; }
.bo-nav a:hover { background: var(--bo-side-hover); color: #fff; }
.bo-nav a.is-active { background: var(--bo-primary); color: #fff; }
.bo-nav a.is-active .bi { opacity: 1; }
.bo-nav__count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.bo-nav__sub { font-size: 11px; color: var(--bo-side-muted); font-weight: 400; margin: 2px 10px 4px 40px; }
.bo-user { padding: 14px 20px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 13px; }
.bo-user__email { display: block; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }
.bo-user a { color: var(--bo-side-ink); text-decoration: none; margin-right: 14px; }
.bo-user a:hover { color: #fff; text-decoration: underline; }

/* ---------- Contenu ---------- */
.bo-main { margin-left: var(--bo-sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.bo-topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--bo-line); }
.bo-topbar h1 { font-size: 20px; margin: 0; font-weight: 600; }
.bo-topbar__sub { color: var(--bo-ink-soft); font-size: 13px; }
.bo-topbar__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.bo-toggle { display: none; border: 1px solid var(--bo-line); background: var(--bo-surface); border-radius: 8px; padding: 6px 10px; font-size: 1.2rem; line-height: 1; }
.bo-content { padding: 24px 28px 48px; max-width: 1240px; width: 100%; }

/* Cartes, tableaux, boutons : finitions communes */
.bo .card { border: 1px solid var(--bo-line); border-radius: var(--bo-radius); box-shadow: 0 1px 2px rgba(20, 34, 58, .04); }
.bo-panel { background: var(--bo-surface); border: 1px solid var(--bo-line); border-radius: var(--bo-radius); padding: 18px 20px; margin-bottom: 20px; }
.bo .table { background: var(--bo-surface); border-radius: var(--bo-radius); overflow: hidden; margin-bottom: 0; }
.bo .table > thead th { background: #f0f3f7; color: var(--bo-ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; border-bottom-width: 1px; }
.bo .table-wrap { background: var(--bo-surface); border: 1px solid var(--bo-line); border-radius: var(--bo-radius); overflow-x: auto; }
.bo .btn-primary { background: var(--bo-primary); border-color: var(--bo-primary); }
.bo .btn-primary:hover { background: var(--bo-primary-dark); border-color: var(--bo-primary-dark); }
.bo .nav-pills .nav-link.active { background: var(--bo-primary); }
.bo-empty { text-align: center; padding: 40px 20px; color: var(--bo-ink-soft); }
.bo-empty .bi { font-size: 2rem; display: block; margin-bottom: 8px; color: var(--bo-primary); }

/* ---------- Mobile : barre latérale en tiroir ---------- */
.bo-overlay { display: none; }
@media (max-width: 991px) {
    .bo-sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    .bo-sidebar.is-open { transform: none; }
    .bo-overlay.is-open { display: block; position: fixed; inset: 0; background: rgba(15, 27, 45, .5); z-index: 1030; }
    .bo-main { margin-left: 0; }
    .bo-toggle { display: inline-block; }
    .bo-topbar { padding: 10px 16px; }
    .bo-content { padding: 18px 16px 40px; }
}
.bo-topbar > div:not(.bo-topbar__actions) { min-width: 0; }
@media (max-width: 600px) {
    .bo-topbar h1 { font-size: 18px; }
    .bo-topbar__sub { font-size: 12px; }
    .bo-topbar__actions { width: 100%; margin-left: 0; }
}
/* Le contenu ne s'élargit jamais au-delà de l'écran : les tableaux défilent dans leur cadre */
.bo-main, .bo-content { min-width: 0; }
@media (max-width: 600px) { .bo .card form input[name="note"] { min-width: 0 !important; } }

/* ---------- Pages d'accès : connexion, inscription, mot de passe (backoffice/auth.html.twig) ---------- */
.bo-auth__layout { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; min-height: 100vh; }
.bo-auth__brand { background: linear-gradient(160deg, var(--bo-side) 0%, #12345c 100%); color: var(--bo-side-ink); padding: 48px 44px; display: flex; flex-direction: column; }
.bo-auth__brand h2 { color: #fff; font-size: 26px; margin: 48px 0 12px; }
.bo-auth__brand p { font-size: 16px; line-height: 1.5; }
.bo-auth__brand ul { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; }
.bo-auth__brand li { display: flex; gap: 10px; align-items: flex-start; color: #e6ebf2; }
.bo-auth__brand li .bi { color: #6fc3ff; margin-top: 2px; }
.bo-auth__alt { margin-top: auto; font-size: 14px; color: var(--bo-side-muted); }
.bo-auth__alt a { color: #fff; }
.bo-auth__logo img { height: 46px; width: auto; }
.bo-auth__brand .bo-auth__logo img { filter: brightness(0) invert(1); }
.bo-auth__logo--mobile { display: none; }
.bo-auth__main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; }
.bo-auth__card { width: 100%; max-width: 440px; background: var(--bo-surface); border: 1px solid var(--bo-line); border-radius: 14px; box-shadow: 0 10px 30px rgba(20, 34, 58, .08); padding: 32px; }
.bo-auth__card h1 { font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.bo-auth__intro { color: var(--bo-ink-soft); margin: 0 0 20px; }
.bo-auth__card .form-label { font-weight: 600; font-size: 14px; }
.bo-auth__card .form-control { padding: 10px 12px; }
.bo-auth__card .btn-primary { width: 100%; padding: 10px; font-weight: 600; margin-top: 8px; }
.bo-auth__row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 12px; font-size: 14px; }
.bo-auth__sep { display: flex; align-items: center; gap: 10px; color: var(--bo-ink-soft); font-size: 13px; margin: 20px 0 14px; }
.bo-auth__sep::before, .bo-auth__sep::after { content: ""; flex: 1; border-top: 1px solid var(--bo-line); }
.bo-auth__footer { width: 100%; max-width: 440px; text-align: center; margin-top: 18px; font-size: 14px; color: var(--bo-ink-soft); }
.bo-auth__footer p { margin: 6px 0; }
.bo-auth__done { text-align: center; }
.bo-auth__done .bo-auth__icon { font-size: 2.4rem; color: var(--bo-primary); display: block; margin-bottom: 6px; }
.bo-pass { position: relative; }
.bo-pass .form-control { padding-right: 44px; }
.bo-reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 6px 10px; color: var(--bo-ink-soft); }
.bo-reveal:hover { color: var(--bo-primary); }
@media (max-width: 860px) {
    .bo-auth__layout { grid-template-columns: 1fr; }
    .bo-auth__brand { display: none; }
    .bo-auth__logo--mobile { display: block; margin-bottom: 20px; }
    .bo-auth__main { justify-content: flex-start; padding-top: 28px; }
    .bo-auth__card { padding: 24px 20px; }
}
/* Champ mot de passe en erreur : l'icône de Bootstrap se place à gauche du bouton « afficher » */
.bo-pass .form-control.is-invalid, .bo-pass .form-control.is-valid { padding-right: 72px; background-position: right 42px center; }
