/* ============================================================
   Coquille EasyAdmin — dashboard "app" (racine)
   Ce fichier n'est chargé que par le dashboard applicatif
   (DashboardController) : masque le chrome EasyAdmin par défaut
   au profit du header applicatif (.as-header) + de la nav rapide
   (.as-quicknav). Le backoffice (/admin, BackofficeDashboardController)
   ne charge pas ce fichier et garde le chrome EasyAdmin standard.
   ============================================================ */

.sidebar-wrapper {
    display: none;
}

#navigation-toggler {
    display: none;
}

/* Barre mobile EasyAdmin par défaut (logo texte + avatar), visible sous
   992px : remplacée par notre propre header applicatif (.as-header), sinon
   les deux s'affichent l'un au-dessus de l'autre. */
.responsive-header {
    display: none;
}

@media (min-width: 992px) {
    .wrapper {
        grid-template-columns: auto;
    }
}

/* Navigation rapide (Recettes / Planification / Courses), affichée dans la
   barre .content-top à la place du menu de gauche masqué hors mode admin. */
.as-quicknav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.as-quicknav::-webkit-scrollbar {
    display: none;
}

/* .content-top (EasyAdmin) répartit ses enfants par flex justify-content:
   space-between, donc centrer .as-quicknav sur lui-même ne le centre pas
   dans la barre — il faut le sortir du flux et le centrer sur .content-top,
   qui est positionné en relative à partir de ce même breakpoint. */
@media (min-width: 992px) {
    .content-top .as-quicknav {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

.as-quicknav-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--text-color, #4b5165);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    flex: none;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.as-quicknav-link:hover {
    background: rgba(99, 102, 241, .1);
    color: #4f46e5;
}
.as-quicknav-link.is-active {
    background: #6366f1;
    color: #fff;
}
.as-quicknav-link svg {
    flex-shrink: 0;
}

/* Mobile : la nav rapide devient une barre d'onglets fixe en bas d'écran
   plutôt qu'une rangée scrollable en haut du contenu. */
@media (max-width: 640px) {
    .as-quicknav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        justify-content: space-between;
        gap: 0;
        overflow-x: visible;
        background: #fff;
        border-top: 1px solid rgba(15, 23, 42, .08);
        box-shadow: 0 -4px 16px rgba(15, 23, 42, .08);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }

    /* Cible tactile alignée sur le minimum iOS (44pt) : icône agrandie et
       hauteur mini garantie, faute de quoi les onglets se sentent trop
       petits au doigt comparés aux tab bars natives. */
    .as-quicknav-link {
        flex: 1 1 0;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 8px 2px 6px;
        border-radius: 12px;
        font-size: 11px;
        text-align: center;
        min-height: 50px;
    }

    .as-quicknav-link svg {
        width: 22px;
        height: 22px;
    }

    .as-quicknav-link.is-active {
        background: rgba(99, 102, 241, .1);
        color: #4f46e5;
    }

    /* Laisse la place à la barre fixe pour ne pas masquer le bas du contenu. */
    .content-wrapper {
        padding-bottom: 84px;
    }
}

/* Espace au-dessus du contenu, la section .content-header (titre EasyAdmin)
   étant retirée sur les pages custom (cf. templates/admin/layout.html.twig). */
.content {
    margin-top: 10px;
}

/* Bandeau d'impersonation (admin connecté "en tant que" un autre utilisateur),
   affiché sur toutes les pages tant que la session est usurpée. */
.imp-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #78350f;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 12px;
    font-size: 13.5px;
}
.imp-banner__text i {
    margin-right: 6px;
}
.imp-banner__exit {
    color: #78350f;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}
.imp-banner__exit:hover {
    color: #451a03;
}
