/* Mes Corrections Web v1.12.25 - maintien du menu original a gauche.
   Feuille additive : ne modifie pas app.css de Mes Corrections 1.12.24. */
.shell { direction: ltr; }
html[dir="rtl"] .shell > .side,
html[dir="rtl"] .shell > .main { direction: rtl; }
.mcw-left-menu-toggle,
.mcw-left-menu-backdrop,
.mcw-left-menu-close { display: none; }
@media (max-width: 720px) {
  /* Le menu reste vertical et ancre a gauche, au lieu de la barre superieure. */
  .shell { display: block; }
  .shell.mcw-left-menu-ready > .side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 121;
    width: min(280px, 86vw);
    height: 100vh;
    height: 100dvh;
    padding: 18px 17px 25px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 6px 0 24px #061e3066;
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .2s ease, visibility .2s ease;
  }
  .shell.mcw-left-menu-open > .side {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .shell.mcw-left-menu-ready > .side > .brand { margin-top: 35px; padding: 0 9px; gap: 12px; }
  .shell.mcw-left-menu-ready > .side > .brand .brand-mark { width: 43px; height: 43px; border-radius: 13px; font-size: 27px; }
  .shell.mcw-left-menu-ready > .side > .brand strong { font-size: 1.22rem; }
  .shell.mcw-left-menu-ready > .side > .brand small { display: block; }
  .shell.mcw-left-menu-ready > .side > .nav {
    display: grid;
    position: static;
    inset: auto;
    gap: 5px;
    padding: 0;
    overflow: visible;
    background: transparent;
  }
  .shell.mcw-left-menu-ready > .side > .nav button {
    display: flex;
    width: 100%;
    min-height: 43px;
    flex-shrink: 1;
    gap: 12px;
    padding: 11px 13px;
    font-size: .92rem;
    text-align: start;
  }
  .shell.mcw-left-menu-ready > .side > .nav .symbol { font-size: 19px; min-width: 25px; }
  .shell.mcw-left-menu-ready > .side > .side-foot { display: block; }
  .mcw-left-menu-toggle {
    display: grid;
    place-items: center;
    position: fixed;
    left: 12px;
    top: 9px;
    top: max(9px, env(safe-area-inset-top));
    z-index: 110;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 11px;
    background: var(--navy);
    color: white;
    box-shadow: 0 3px 12px #061e3033;
    font-size: 25px;
    cursor: pointer;
  }
  .mcw-left-menu-toggle:focus-visible,
  .mcw-left-menu-close:focus-visible { outline: 3px solid #e1a45c; outline-offset: 2px; }
  .mcw-left-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    background: #061e3077;
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .shell.mcw-left-menu-open > .mcw-left-menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .mcw-left-menu-close {
    display: grid;
    place-items: center;
    position: absolute;
    right: 12px;
    top: 10px;
    width: 38px;
    height: 38px;
    border: 1px solid #ffffff40;
    border-radius: 9px;
    background: #ffffff16;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
  }
  body.mcw-left-menu-lock { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .shell > .side, .mcw-left-menu-backdrop { transition: none; }
}
@media print {
  .mcw-left-menu-toggle, .mcw-left-menu-backdrop, .mcw-left-menu-close { display: none !important; }
}

/* v1.12.26 — mobile uniquement : barre fixe comme l'exemple fourni.
   Le menu lateral et l'interface de bureau restent inchanges. */
.mcw-mobile-page-title { display: none; }
@media (max-width: 720px) {
  .shell.mcw-left-menu-ready > .main {
    /* L'espace est reserve sous la barre fixe afin qu'aucun contenu ne soit masque. */
    padding-top: calc(81px + env(safe-area-inset-top, 0px));
  }
  .shell.mcw-left-menu-ready > .main > .top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 110;
    height: calc(64px + env(safe-area-inset-top, 0px));
    min-height: 0;
    padding: calc(9px + env(safe-area-inset-top, 0px)) 12px 9px;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    direction: ltr;
    background: var(--bg);
    border-bottom: 1px solid var(--edge);
    box-shadow: 0 3px 11px #112c3d12;
  }
  .shell.mcw-left-menu-ready > .main > .top > .mcw-left-menu-toggle {
    position: static;
    inset: auto;
    z-index: auto;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--edge);
    border-radius: 12px;
    box-shadow: none;
    color: var(--navy);
    background: var(--surface);
    font-size: 26px;
  }
  .shell.mcw-left-menu-ready > .main > .top > .mcw-mobile-page-title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--ink);
    line-height: 1.3;
    text-align: left;
    unicode-bidi: plaintext;
  }
  .shell.mcw-left-menu-ready > .main > .top > .crumb { display: none; }
  .shell.mcw-left-menu-ready > .main > .top > .toptools {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
  }
  .shell.mcw-left-menu-ready > .main > .top > .toptools > .online-indicator {
    display: none; /* l'indicateur reste disponible dans les autres ecrans */
  }
  .shell.mcw-left-menu-ready > .main > .top > .toptools > #lang-control {
    width: 65px !important;
    min-height: 44px !important;
    padding: 6px 4px;
    background: var(--surface);
  }
  .shell.mcw-left-menu-ready > .main > .top > .toptools > [data-action="logout"] {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--edge);
    border-radius: 12px;
    background: var(--surface);
    color: var(--navy);
    font-size: 0; /* garde le texte traduit dans le DOM et pour l'accessibilite */
  }
  .shell.mcw-left-menu-ready > .main > .top > .toptools > [data-action="logout"]::before {
    content: '\21E5';
    font-size: 26px;
    line-height: 1;
  }
}
@media (max-width: 350px) {
  .shell.mcw-left-menu-ready > .main > .top { padding-left: 8px; padding-right: 8px; gap: 6px; }
  .shell.mcw-left-menu-ready > .main > .top > .toptools { gap: 5px; }
  .shell.mcw-left-menu-ready > .main > .top > .toptools > #lang-control { width: 58px !important; }
}

@media (max-width: 720px) {
  html[dir="rtl"] .shell.mcw-left-menu-ready > .main > .top > .mcw-mobile-page-title { direction: rtl; text-align: right; }
}
