/** assets\styles\dashboard-custom.css */
.kpi-icon-bg { background-color: rgba(0,0,0,.1); }
.ea-flash-messages { display: none !important; }

/* Descend le toast SweetAlert2 sous la navbar EasyAdmin (~60px) */
.swal2-container.swal2-top-end,
.swal2-container.swal2-top-start,
.swal2-container.swal2-top {
    top: 70px !important;
}

/* 1. Ajustement de la grille pour la sidebar compacte à 60px */
body.ea-sidebar-width-compact .wrapper {
    display: grid !important;
    grid-template-columns: 60px minmax(0, 1fr) !important;
}
body.ea-sidebar-width-compact .content-wrapper {
    display: grid !important;
    /*padding: 0 15px 15px 15px;*/
}

body.ea-sidebar-width-compact .sidebar {
    padding: 6px;
}

/* 1. On retire le décalage forcé sur la navbar */
.sidebar .main-header .navbar {
    padding: 0 !important;
}

/*************************************************************************/

/* Style du Logo PROSAV **************************************************/
.main-header #header-logo a.logo {
    padding: 8px 0 !important; /* Réduit à 10px en haut/bas au lieu de 17/28 */
    line-height: normal !important; /* Libère la contrainte de hauteur de ligne */
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 60px; /* Force une hauteur stable */
    overflow: hidden; /* Sécurité anti-scroll supplémentaire */
}
/* 2. CONTENEUR DU REFLET : On limite la zone de brillance à l'image */
.main-header #header-logo .logo-custom {
    position: relative; /* Indispensable pour le positionnement de l'after */
    display: inline-block; /* S'adapte à la largeur de l'image */
    overflow: hidden; /* Coupe le reflet quand il sort du logo */
    line-height: 0; /* Évite un petit décalage de 2px sous l'image */
}

.logo-custom img {
    max-width: 200px; /* Largeur max raisonnable pour le menu normal */
    max-height: 48px; /* Hauteur max pour ne jamais pousser les bords */
    width: auto !important; /* Garde le ratio proportionnel */
    height: auto !important;
    display: block;
    position: relative;
}

/* 4. LE REFLET BLANC (Fonctionne en mode Clair et Sombre) */
.logo-custom::after {
    content: "";
    position: absolute;
    inset: 0;

    /* Lumière blanche pure inclinée */
    background: linear-gradient(110deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 70% );
    background-size: 200% 100%; /* On l'élargit pour pouvoir le décaler */
    background-repeat: no-repeat;

    /* 2. LE MASQUE RESTE FIXE (Ne bouge pas) */
    -webkit-mask-image: url('/images/logo.png');
    mask-image: url('/images/logo.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;

    /* 3. On anime le BACKGROUND, pas le bloc after */

    animation: shine-fixed-logo 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes shine-fixed-logo {
    0% { background-position: 200% 0; }
    80% { background-position: -200% 0; }
    100% { background-position: -200% 0; }
}

/* Logo mode Compact *******************/
body.ea-sidebar-width-compact .main-header #header-logo a.logo {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 8px 0 !important; /* Espace vertical */
    margin: 0 !important;
}

body.ea-sidebar-width-compact .logo-compact img {
    width: 48px; /* Taille idéale pour une sidebar de 60px */
    height: auto;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: contrast(1.1);
}

/* Petit effet au survol de l'image */
body.ea-sidebar-width-compact .logo-compact:hover img {
    transform: scale(1.1) rotate(-3deg);
}

/* Gestion de l'affichage logo mode normal/compact*/
body:not(.ea-sidebar-width-compact) .logo-compact { display: none !important; }
body.ea-sidebar-width-compact .logo-custom { display: none !important; }

/*************************************************************************/
/* menu principal gauche (sidebar) ***************************************/
#main-menu .menu .menu-header { /* Titre des menu */
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin-block-start: 5px;
    padding: 6px 10px 6px 15px;
    margin:4px 0;
    border-left: 3px solid #7f8c8d;
    background: linear-gradient(90deg, rgba(127, 140, 141, 0.1) 0%, transparent 100%);
}

#main-menu .menu-item i {
    position: relative;
    overflow: visible !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    transform-origin: center;

    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.3));
}
body.ea-sidebar-width-compact #main-menu .menu .menu-item .menu-icon, #main-menu .menu .menu-item .menu-icon {
    block-size: 28px;
    flex-shrink: 0;
    inline-size: 1.25em;
    margin-inline-end: 20px;
    text-align: center;
}

/* Couleurs par thématique - Version VIBRANTE */
.fa-tools, .fa-file-invoice, .fa-file-invoice-dollar, .fa-file-contract { background-image: linear-gradient(180deg, #FFD000 0%, #FF5100 100%); } /* Or/Orange */
.fa-microscope, .fa-industry { background-image: linear-gradient(180deg, #00D2FF 0%, #3a7bd5 100%); } /* Cyan/Bleu */
.fa-book, .fa-boxes, .fa-puzzle-piece, .fa-flask, .fa-wrench, .fa-bell-concierge, .fa-concierge-bell, .fa-plug {
	background-image: linear-gradient(180deg, #e0c3fc 0%, #8e2de2 100%);
} /* Mauve/Violet */
/*.fa-bell-concierge, .fa-concierge-bell { background-image: linear-gradient(180deg, #e0c3fc 0%, #8e2de2 100%);}*/

/* Badges pièces/prestations — vue détail intervention */
.badge-piece       { background-color: #8e2de2; color: #fff; }
.badge-prestation  { background-color: #b914ff; color: #fff; }
.badge-logistique-recup  { background-color: #0284c7; color: #fff; }
.badge-logistique-depl   { background-color: #059669; color: #fff; }
.badge-livraison-facture { background-color: #7c3aed; color: #fff; }
.badge-livraison-sans    { background-color: #b45309; color: #fff; }
.badge-urgente           { background-color: #dc2626; color: #fff; }
.badge-urgente-confirmee { background-color: #16a34a; color: #fff; }
.badge-urgente-modifiee  { background-color: #d97706; color: #fff; }

.fa-user-shield { background-image: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%); } /* Bleu électrique */
.fa-user-friends { background-image: linear-gradient(180deg, #42e695 0%, #3bb2b8 100%); } /* Menthe/Emeraude */
.fa-user-tie { background-image: linear-gradient(180deg, #f9d423 0%, #ff4e50 100%); } /* Jaune/Rouge (Staff) */
.fa-home, .fa-globe { background-image: linear-gradient(180deg, #bdc3c7 0%, #2c3e50 100%); } /* Acier */
.bi-person-fill-lock { background-image: linear-gradient(180deg, #ff416c 0%, #b91d73 100%); } /* Rose/Crimson SuperAdmin */
.fa-building { background-image: linear-gradient(180deg, #4776e6 0%, #8e54e9 100%); } /* Indigo/Violet — Paramètres Entreprise */
.bi-lightning-charge-fill { background-image: linear-gradient(180deg, #00D2FF 0%, #3a7bd5 100%); } /* Cyan/Bleu — Commercial */
.bi-envelope-fill { background-image: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%); } /* Cyan — SMTP */
.bi-cart-plus { background-image: linear-gradient(180deg, #f7971e 0%, #ffd200 100%); } /* Orange/Or — Demandes d'Achat */

/* Force Bootstrap Icons font-family dans la sidebar (évite la surcharge EA) */
#main-menu .menu-item i.bi {
    font-family: "bootstrap-icons" !important;
    font-style: normal !important;
}
/*.fa-power-off { background-image: linear-gradient(180deg, #ff0844 0%, #ffb199 100%); } /* Rouge flash */


/* Harmonisation des tailles d'icônes */
#main-menu .menu-item i.fa-user-tie {
    font-size: 1.4rem !important; /* On l'agrandit légèrement (de 1.25 à 1.4) */
    transform: scale(1.1); /* Petit boost de volume */
}
#main-menu .menu-item i.fa-user-tie::before {
    display: block;
    width: 100%;
    text-align: center;
}

/* 3. L'effet Glossy Menu */
#main-menu .menu-item i::after {
    content: "";
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 35%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50% 50% 5px 5px;
    pointer-events: none;

}

/* 4. États dynamiques Menu */
#main-menu .menu-item:hover i {
    /* Le scale 1.35 ne décalera plus le texte grâce au width: 24px fixé plus haut */
    transform: scale(1.33) rotate(3deg);
    filter: brightness(1.3) drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

@keyframes glossy-glow {
    0%, 100% { filter: drop-shadow(0 0 3px currentColor) brightness(1); }
    50% { filter: drop-shadow(0 0 10px currentColor) brightness(1.3); }
}

/* Style du label*/
/*#main-menu .menu .menu-item .menu-item-label {*/
    #main-menu .menu .menu-item  .menu-item-contents{
        align-items: center;
        align-content: center;
}

body.ea-sidebar-width-compact .sidebar-wrapper,
body.ea-sidebar-width-compact .sidebar,
body.ea-sidebar-width-compact #main-menu {
    overflow: visible !important;
}
/* Style du bouton de menu au survol */
body.ea-sidebar-width-compact #main-menu .menu-item:hover {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;

    transition: all 0.3s ease !important;
}
/* Style du label au survol avec isolation visuelle */
body.ea-sidebar-width-compact #main-menu .menu-item:hover .menu-item-label {
    display: block !important;
    position: absolute;
    left: 8px; /* Positionnement précis */
    margin: 0 4px; /* Ajustez selon la position souhaitée */

    /* 1. Opacité totale pour bloquer le texte du dessous */
    background-color: #1e3a8a !important; /* Bleu foncé solide */
    /* 2. Optionnel : Flou pour plus de modernité (si le fond est un peu transparent) */
    backdrop-filter: blur(8px);
    /* 3. Style visuel */
    color: #ffffff !important;
    padding:0 8px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10000;
    /* 4. Ombre forte pour détacher le label de la page */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    /* Empêche toute interaction avec le label lui-même */
    pointer-events: none;
}

/* suppression du fond blanc*/
body.ea-sidebar-width-compact #main-menu .menu-item:hover a {
    background-color: transparent !important
}

body.ea-sidebar-width-compact #main-menu .menu .menu-item .menu-item-badge {
    display: block;
}
#main-menu .menu .menu-item-badge{
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%) !important;
    color: white !important;
}

/* 2. Badge Danger (Interventions) : Style Moderne Glossy */
body.ea-sidebar-width-compact #main-menu .menu-item .badge-danger,
body.ea-sidebar-width-compact #main-menu .menu-item .badge {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 900;
    position: absolute;
    top: 2px;
    left: 20px;
    transform: scale(0.8);
}
/* 3. Animation de pulsation sur le badge pour attirer l'œil */
#main-menu .menu-item .badge-danger {
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}
/***********************/

/** SideBar resizer handler */
/* 1. Le trait de séparation (le rail) */
.resizer-handler-right { display: none; }
.resizer-handler-left {
    width: 3px !important;
    background-color: #dee2e6 !important;
    cursor: pointer !important;
    z-index: 1090 !important;
    position: relative;
}

/* 2. LE BOUTON FLOTTANT FIXE */
.resizer-handler-left::after {
    content: '<' !important;
    font-family: sans-serif;
    font-weight: bold;
    position: sticky !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;

    width: 28px !important;
    height: 28px !important;
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    z-index: 1090 !important;
}

body.ea-sidebar-width-compact .resizer-handler-left::after {
    content: '>' !important;
}

.resizer-handler-left:hover::after {
    display: flex;
    background-color: #2563eb !important;
    transform: translate(-50%, -50%) scale(1.5) !important;
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3) !important;
}

/* STATUTS des Interventions */
body#ea-index-Intervention .badge-status,
#espace-client .badge-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

body#ea-index-Intervention .badge-status:hover {
    filter: brightness(1.2);
}

/* On cible le pseudo-élément unique */
body#ea-index-Intervention .badge-status.dropdown-toggle::after {
    border: none !important;
    display: inline-block !important;
    content: "\f22c" !important;
    font-family: "bootstrap-icons" !important;
    margin-left: 5px;
    font-size: 0.7rem;
    vertical-align: middle;
    opacity: 0.7;
    width: auto;
    height: auto;
}

/* --- ICONES BOOTSTRAP HD CRYSTAL (WEB 2.0) --- */
.badge-status i.bi {
    position: relative;
    display: inline-block;
    font-size: 1.25rem;
    font-weight: bolder;
    margin-right: 2px;
    vertical-align: middle;
    background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 45%, #cbcbcb 50%, #e2e2e2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.72));
}

/* Icône sombre pour les fonds clairs (DevisStatut portail client) */
#espace-client .badge-warning i.bi,
#espace-client .badge-light i.bi {
    background: linear-gradient(180deg, #555 0%, #111 50%, #000 100%);
    -webkit-background-clip: text;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.4));
}

/* Palette PROSAV — 12 statuts (tons sourds, non saturés) */
.st-nouveau         { background-color: #FCD34D; color: #1F2937; border-color: #F59E0B; }
.st-logistique      { background-color: #7DD3FC; color: #1F2937; border-color: #38BDF8; }
.st-equipement-recu { background-color: #86EFAC; color: #1F2937; border-color: #4ADE80; }
.st-planification-diagnostic { background-color: #BFDBFE; color: #1F2937; border-color: #93C5FD; }
.st-diagnostic-en-cours      { background-color: #93C5FD; color: #1F2937; border-color: #60A5FA; }
.st-diagnostic-termine       { background-color: #60A5FA; color: #1F2937; border-color: #3B82F6; }
.st-devis-envoye    { background-color: #C4B5FD; color: #1F2937; border-color: #A78BFA; }
.st-commande-recue  { background-color: #DDD6FE; color: #1F2937; border-color: #C4B5FD; }
.st-reparation      { background-color: #BBF7D0; color: #1F2937; border-color: #86EFAC; }
.st-attente-pieces  { background-color: #FFC68A; color: #1F2937; border-color: #E8953A; }
.st-termine         { background-color: #6FE29A; color: #1F2937; border-color: #4ADE80; }
.st-livraison       { background-color: #A5F3FC; color: #1F2937; border-color: #67E8F9; }
.st-cloture         { background-color: #D1D5DB; color: #1F2937; border-color: #9CA3AF; }
.st-annule          { background-color: #FDA4AF; color: #1F2937; border-color: #FB7185; }


/* PieceRechange */
body#ea-index-PieceRechange .badge-danger { background-color: #E74C3C; color: white; border-color: #C0392B; }
body#ea-index-PieceRechange .bg-danger    { background-color: #E74C3C; color: white; border-color: #C0392B; }

/* Inverse l'icône horizontalement pour la livraison */
body#ea-index-Intervention .icon-mirror,
#espace-client .icon-mirror {
    display: inline-block;
    transform: scaleX(-1);
    filter: drop-shadow(-2px 2px 2px rgba(0, 0, 0, 0.8)) !important; /* On inverse aussi l'ombre */
}

.dg-twocol-choices .form-widget {
    -webkit-columns: 3;
    columns: 3;
    display: inline-block;
}

.column-search-row input {
    border: 1px solid #ced4da;
    font-size: 0.85rem;
}
/* user top-right menu à déplacer et éliminer "ea-index-Intervention" */
body#ea-index-Intervention .dropdown-menu {
    z-index: 1060;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Empêche le menu d'être coupé par les bords du tableau */
body#ea-index-Intervention .datagrid td[data-column="statut"] {
    overflow: visible !important;
    position: relative;
}

/* 1. Bloquer tout scroll sur la sidebar */
.sidebar-wrapper {
    position: sticky !important;
    top: 0;
    z-index: 1090 !important;
}
@media (min-width: 992px) {
    .sidebar-wrapper {
        height: 100vh !important;
    }
}

/* 2. Permettre le scroll uniquement dans le menu si les items dépassent */
/* (Optionnel : à retirer si vous voulez un blocage total même si le menu est long) */
#main-menu {
    height: calc(100vh - 80px) !important; /* Ajuste selon la hauteur du logo */
    overflow-y: auto !important;
    scrollbar-width: none; /* Cache la barre de scroll sur Firefox */
}

#main-menu::-webkit-scrollbar {
    display: none; /* Cache la barre de scroll sur Chrome/Safari */
}
/*************************************************************************/

/** Contenu principal ****************************************************/
/* 3. Ajustement de la zone de contenu pour garantir le scroll */
.main-content {
    height: 100vh !important;
    overflow-x: clip !important;
    overflow-y: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}
/* Force le bandeau de recherche au-dessus de tout le contenu qui défile */
.content-top {
    z-index: 1070 !important; /* Supérieur au z-index des badges (1060) */
    position: sticky !important;
    top: 0;
    background-color: #ffffff !important;
    border-bottom: 1px solid #dee2e6 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Ajout d'une ombre légère pour masquer le passage des badges */
}
.content-wrapper {
    flex: 1 !important;
    overflow-y: auto !important; /* Seul scroll autorisé */
    height: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}
/*************************************************************************/

/* Largeurs colonnes — Catalogue Pièces */
body#ea-index-PieceRechange .datagrid th[data-column="quantite_stock"],
body#ea-index-PieceRechange .datagrid td[data-column="quantite_stock"] { width: 70px; text-align: center; }

body#ea-index-PieceRechange .datagrid th[data-column="seuil_alerte"],
body#ea-index-PieceRechange .datagrid td[data-column="seuil_alerte"] { width: 70px; text-align: center; }

body#ea-index-PieceRechange .datagrid th[data-column="modelesList"],
body#ea-index-PieceRechange .datagrid td[data-column="modelesList"] { width: 350px; }

/* Largeurs colonnes — Liste Interventions */
body#ea-index-Intervention .datagrid th[data-column="date_creation"],
body#ea-index-Intervention .datagrid td[data-column="date_creation"] { width: 85px; white-space: nowrap; }

body#ea-index-Intervention .datagrid th[data-column="technicien"],
body#ea-index-Intervention .datagrid td[data-column="technicien"],
body#ea-index-Intervention .datagrid th[data-column="createdBy"],
body#ea-index-Intervention .datagrid td[data-column="createdBy"] { width: 160px; }

body#ea-index-Intervention .datagrid td[data-column="technicien"] a,
body#ea-index-Intervention .datagrid td[data-column="createdBy"] a { white-space: nowrap; }

/* Couleurs bg-* globales — même palette que badge-* interventions ci-dessus */
.bg-amber    { background-color: #F1C40F !important; color: #2C3E50 !important; }
.bg-teal     { background-color: #17A589 !important; color: white !important; }
.bg-violet   { background-color: #8E44AD !important; color: white !important; }
.bg-indigo   { background-color: #9B59B6 !important; color: white !important; }
.bg-navy     { background-color: #21618C !important; color: white !important; }
.bg-orange   { background-color: #E67E22 !important; color: white !important; }
.bg-turquoise { background-color: #1ABC9C !important; color: white !important; }
.bg-brown    { background-color: #795548 !important; color: white !important; }
/*************************************************************************/

/** user menu (top-right) ************************************************/
/* user Avatar Cercle */
.avatar-circle {
    width: 38px; height: 38px;
    background-color: var(--avatar-bg); /* Couleur générée dynamiquement */
    color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 1.1rem;
    transition: all 0.2s;
}
.avatar-button:hover .avatar-circle { filter: brightness(1.05); transform: translateY(-1px); }
.custom-user-dropdown .user-info-header {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column; /* Empilement vertical propre */
    border-bottom: 1px solid #eee;
    margin-bottom: 0.5rem;
}
.custom-user-dropdown .user-name {
    display: block;
    font-weight: 700;
    color: #202124;
    font-size: 0.95rem;
    line-height: 1.4;
}
.custom-user-dropdown .user-email {
    display: block;
    color: #70757a;
    font-size: 0.85rem;
    text-transform: none; /* Annule le style EA */
}
.custom-user-dropdown .dropdown-item {
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    color: #3c4043;
}
.custom-user-dropdown .dropdown-item i {
    width: 20px; margin-right: 12px;
    color: #5f6368; font-size: 0.9rem;
}

/** Mobile — correctif grille EasyAdmin **************************************
 * Sur mobile (< 992px) .wrapper est un grid 2-col et .responsive-header est
 * visible. Sans span, auto-placement place .main-content en col-1 (60px) →
 * le contenu s'affiche sur ~1 cm à gauche. On force .responsive-header à
 * occuper les 2 colonnes pour que .sidebar et .main-content se retrouvent
 * en ligne 2, colonne 1 et colonne 2 respectivement.
 *****************************************************************************/
@media (max-width: 991.98px) {
    /* responsive-header spans both columns so it stays full-width */
    .responsive-header {
        grid-column: 1 / -1 !important;
    }
    /* Col 1 (sidebar-wrapper shell) = 0 — .sidebar is position:fixed overlay on mobile */
    .wrapper,
    body.ea-sidebar-width-compact .wrapper {
        grid-template-columns: 0 minmax(0, 1fr) !important;
    }
    .main-content {
        height: auto !important;
        overflow-y: visible !important;
        overflow-x: hidden !important;
        min-height: 100dvh;
    }
    .content-wrapper {
        max-inline-size: 100% !important;
        padding-inline: 0.75rem !important;
    }
    /* Sidebar scrollable sur mobile — uniquement .sidebar (overlay), pas .sidebar-wrapper (position:relative) */
    .sidebar,
    body .sidebar,
    body.ea-sidebar-width-compact .sidebar {
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
    }
    body.ea-sidebar-width-compact #main-menu,
    #main-menu {
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
}
/*************************************************************************/
