/* ==========================================================================
   QUANTUM EXCELLIUM — site-frame.css  v2  ·  adaptateur « Cadre Versailles »
   --------------------------------------------------------------------------
   À charger avec qe-frame.css (les calques du cadre, communs à tout le site).
   Ce fichier ne contient que la mise en page des pages FR/EN : colonne de
   navigation, page, barre et menu mobiles, tout à l'intérieur de la fenêtre
   du cadre. L'ordre de chargement vis-à-vis de site.css et site-pro.css est
   indifférent (spécificité supérieure).
   ========================================================================== */

:root .site-rail{
  inset:var(--qe-frame) auto var(--qe-frame) var(--qe-frame) !important;
  border:0 !important;
  border-right:1px solid var(--line) !important;
  border-radius:0 !important;
  padding:24px 18px 20px !important;
  overflow:auto !important;
  scrollbar-width:thin;
}
:root .page{
  margin-left:calc(var(--rail) + var(--qe-frame)) !important;
  padding:var(--qe-frame) var(--qe-frame) var(--qe-frame) 0 !important;
}

@media (max-width:1180px) and (min-width:941px){
  :root .site-rail{padding:22px 12px 18px !important}
}

/* Écrans peu hauts : on compacte la colonne plutôt que d'en couper le pied */
@media (min-width:941px) and (max-height:900px){
  :root .brand-art{display:block;max-width:180px;margin-left:auto;margin-right:auto}
  :root .brand-caption{margin:10px 0 12px}
  :root .rail-nav{gap:2px}
  :root .rail-nav a{padding:7px 12px}
}
@media (min-width:941px) and (max-height:780px){
  :root .brand-art{max-width:130px}
  :root .language-tabs{margin-bottom:10px}
  :root .language-tabs a,:root .language-tabs span{min-height:32px;padding:5px 8px}
  :root .rail-nav a{padding:5px 12px;font-size:.84rem}
}

@media (max-width:940px){
  :root .site-rail{display:none !important}
  :root .page{margin-left:0 !important;padding:12px calc(var(--qe-frame) + 4px) var(--qe-frame) !important}
  :root .mobile-top{
    position:sticky !important;
    top:calc(var(--qe-frame) + 8px) !important;
    margin:calc(var(--qe-frame) + 8px) calc(var(--qe-frame) + 8px) 0 !important;
  }
  :root .mobile-menu{
    top:calc(var(--qe-frame) + 86px) !important;
    left:calc(var(--qe-frame) + 8px) !important;
    right:calc(var(--qe-frame) + 8px) !important;
    max-height:calc(100vh - 2 * var(--qe-frame) - 100px) !important;
  }
}

@media (max-height:540px) and (orientation:landscape) and (max-width:940px){
  :root .mobile-menu{top:calc(var(--qe-frame) + 72px) !important;max-height:calc(100vh - 2 * var(--qe-frame) - 84px) !important}
}

@media print{
  :root .site-rail{display:none !important}
  :root .page{margin:0 !important;padding:0 !important}
}
