/* FileMorning language selector: isolated below logo/categories navigation.
   Adjust ONLY these two variables to test desktop menu widths and font size.
   Example: --fm-menu-width: 195px;  --fm-menu-font-size: 13px;
*/
:root { --fm-menu-width: 190px; --fm-menu-font-size: 18px; --fm-menu-collapse: 1235px; }
.site-header .header-container {max-width: 1260px; box-sizing: border-box; display:flex; align-items:center; gap:12px; flex-wrap:nowrap; }
.site-header .header-left { flex: 0 0 auto; }
.site-header .top-menus { flex: 1 1 auto; min-width:0; }
.site-header .menu-grid { grid-template-columns:repeat(5, var(--fm-menu-width)) !important; gap: 6px; }
.site-header .menu-item a { box-sizing:border-box; width:var(--fm-menu-width); min-width:0; white-space:nowrap; font-size:var(--fm-menu-font-size); }
.site-header .menu-item a span { white-space:nowrap; }
/* Independent left and right slots: never rely on intrinsic width of a flex bar. */
.fm-language-bar {
  width:100%; max-width:1260px; box-sizing:border-box;
  border-top:1px solid #f1f2f5; margin:0 auto;
  padding:5px 12px 7px; min-height:44px;
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:center; column-gap:16px;
}
.fm-language-side {min-width:0; justify-self:start; display:flex; justify-content:flex-start;}
.fm-display-side {min-width:0; justify-self:end; display:flex; justify-content:flex-end;}
.fm-language-picker .fm-language-options {left:0; right:auto;}

.fm-language-picker { position:relative; font-family:inherit; z-index:90; }
.fm-language-picker > summary {display:flex;align-items:center;gap:7px;padding:5px 10px;
  border:1px solid #cbd5e1;border-radius:8px;background:white;color:#17305c;cursor:pointer;
  list-style:none;font-size:13px;font-weight:700;white-space:nowrap;}
.fm-language-picker > summary::-webkit-details-marker {display:none;}
.fm-language-picker > summary::marker {content:'';}
.fm-language-picker[open]>summary { border-color:#6b21a8;box-shadow:0 0 0 2px #6b21a827; }
.fm-language-picker img {object-fit:cover;display:block;border:1px solid #e2e6eb;border-radius:2px;}
.fm-language-picker .fm-language-options {position:absolute;top:calc(100% + 5px);right:0;
  min-width:175px;list-style:none;margin:0;padding:5px;background:white;box-shadow:0 9px 25px #0002;
  border:1px solid #d2d9e2;border-radius:10px;z-index:100;}
.fm-language-picker .fm-language-options a {display:flex;align-items:center;gap:10px;padding:10px;
  border-radius:6px;color:#182c50;text-decoration:none;font-size:14px;}
.fm-language-picker .fm-language-options a:hover,.fm-language-picker .fm-language-options a:focus-visible {background:#f0eafd;outline-offset:1px;}
.fm-language-picker .fm-language-options a[aria-current=page] {font-weight:700;}
.fm-lang-check {margin-left:auto;color:#047857;}
/* The five-column grid needs ~1,200px. Collapse it before any overlap can occur. */
@media (max-width:1235px) and (min-width:901px) {
 .site-header .top-menus{display:none!important;}
 .site-header .header-container{justify-content:space-between;}
 .site-header .eft-mobile-navigation{display:block;flex-shrink:0;}
 .site-header .eft-mobile-navigation > summary{list-style:none;display:flex;align-items:center;gap:.5rem;
   padding:.65rem .8rem;background:var(--menu-bg);color:var(--violet);font-weight:700;
   border-radius:8px;cursor:pointer;}
 .site-header .eft-mobile-navigation > summary::-webkit-details-marker{display:none;}
 .site-header .eft-mobile-navigation nav{position:absolute;top:100%;left:12px;right:12px;
   max-height:min(65vh,450px);overflow-y:auto;z-index:1100;background:white;
   border:1px solid #ddd6fe;border-radius:10px;box-shadow:0 8px 22px #0002;padding:10px;}
 .site-header .eft-mobile-navigation ul{list-style:none;padding:0;margin:0;}
 .site-header .eft-mobile-navigation a,.site-header .eft-mobile-navigation .eft-mobile-unavailable{display:block;padding:.65rem .75rem;text-decoration:none;color:var(--violet);}
}
@media(max-width:900px){.fm-language-bar{padding-right:12px}.fm-language-picker .fm-language-options{left:0;right:auto;}}

/* The language is at the left, display-mode menu at the right. */
.fm-language-picker, .fm-theme-picker { flex:0 0 auto; }
.fm-theme-picker { position:relative; z-index:89; font-family:inherit; }
.fm-theme-picker > summary { display:flex; align-items:center; gap:7px; padding:5px 10px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#17305c; cursor:pointer; list-style:none; font-size:13px; font-weight:700; white-space:nowrap; }
.fm-theme-picker > summary::-webkit-details-marker { display:none; }
.fm-theme-picker > summary::marker {content:'';}
.fm-theme-picker[open] > summary { border-color:#6b21a8; box-shadow:0 0 0 2px #6b21a827; }
.fm-theme-options { position:absolute; top:calc(100% + 5px); right:0; min-width:160px; padding:5px; margin:0; list-style:none; z-index:100; background:#fff; border:1px solid #d2d9e2; border-radius:10px; box-shadow:0 9px 25px #0002; }
.fm-theme-options button { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; border:0; border-radius:6px; background:transparent; color:#182c50; padding:10px; text-align:left; font:inherit; font-size:14px; cursor:pointer; }
.fm-theme-options button:hover, .fm-theme-options button:focus-visible { background:#f0eafd; }
.fm-theme-options button[aria-pressed=true] {font-weight:700;}

/* Icons and labels inside the display-mode menu */
.fm-theme-option-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fm-theme-option-main svg {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}

.fm-theme-check { visibility:hidden; color:#047857; }
.fm-theme-options button[aria-pressed=true] .fm-theme-check {visibility:visible;}
@media(max-width:900px) { .fm-language-bar { padding-left:12px; padding-right:12px; } }

/* The trigger shows the CURRENT translated mode, not a long generic title. */
.fm-theme-current-icon {display:none; flex-shrink:0;}
:root:not([data-fm-theme]) .fm-theme-icon-classic,
:root[data-fm-theme="classic"] .fm-theme-icon-classic,
:root[data-fm-theme="dark"] .fm-theme-icon-dark,
:root[data-fm-theme="minimal"] .fm-theme-icon-minimal {display:block;}
.fm-theme-current-label {font-weight:700;}
@media(max-width:440px){
  .fm-language-bar {column-gap:8px; padding-left:8px; padding-right:8px;}
  .fm-language-picker > summary,.fm-theme-picker > summary {padding:6px 8px; gap:5px;}
}


/* Position des deux sélecteurs sur ordinateur */
@media (min-width: 901px) {
  .fm-language-bar {
    padding-left: 224px;
    padding-right: 62px;
  }
}

/* Apparence verte des deux sélecteurs */
html .fm-language-bar .fm-language-side .fm-language-picker > summary,
html .fm-language-bar .fm-display-side .fm-theme-picker > summary {
  border: 1px solid var(--green-text, #047857);
  background: var(--green-hover, #d1fae5);
  color: var(--green-text, #047857);
}

/* Apparence lorsque le menu est ouvert */
html .fm-language-bar :is(.fm-language-picker, .fm-theme-picker)[open] > summary {
  border-color: var(--green-text, #047857);
  box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.18);
}