:root{
  --mlr-night:#071a54;
  --mlr-night-deep:#04133f;
  --mlr-gold:#f5b51b;
  --mlr-white:#ffffff;
}

/* Pages intérieures : un repère de marque, un contexte, un retour. */
body.mlr-interior-clean .topbar,
body.mlr-interior-clean .charter-topbar{display:none!important}

body.mlr-interior-clean .site-header,
body.mlr-interior-clean .master-header,
body.mlr-interior-clean .mlr-header{
  position:sticky;
  top:0;
  z-index:80;
  min-height:44px!important;
  height:auto!important;
  padding:0!important;
  background:#071A5C!important;
  border-bottom:2px solid #F2B321!important;
  box-shadow:0 4px 14px rgba(2,10,35,.16)!important;
}

.mlr-compact-inner{
  width:min(1180px,calc(100% - 24px));
  min-height:44px;
  margin:0 auto;
  padding:4px 0;
  display:grid;
  grid-template-columns:minmax(160px,auto) 1fr auto;
  gap:12px;
  align-items:center;
}

.mlr-compact-brand{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  color:#fff!important;
  text-decoration:none!important;
  min-width:0;
}
.mlr-compact-brand img{width:32px!important;height:32px!important;object-fit:contain!important;flex:none}
.mlr-compact-brand strong{display:block;color:#fff;font-family:Georgia,serif;font-size:.95rem;line-height:1.05}
.mlr-compact-brand small{display:block;color:#F2B321;font-size:.68rem;line-height:1.15;margin-top:1px}

.mlr-compact-context{
  color:#FBF8EF;
  font-size:.82rem;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  text-align:center;
}

.mlr-return-link{
  min-height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border:1px solid #F2B321;
  border-radius:8px;
  color:#FBF8EF!important;
  background:transparent;
  text-decoration:none!important;
  font-weight:800;
  font-size:.78rem;
  white-space:nowrap;
}
.mlr-return-link:hover,.mlr-return-link:focus-visible{background:var(--mlr-gold);color:var(--mlr-night)!important;outline:none}

/* Le grand menu et les menus mobiles historiques n'ont plus lieu d'être dans un article. */
body.mlr-interior-clean .site-header .nav,
body.mlr-interior-clean .site-header .master-nav,
body.mlr-interior-clean .mlr-mobile-guide,
body.mlr-interior-clean .mlr-mobile-drawer,
body.mlr-interior-clean .mlr-mobile-menu-toggle,
body.mlr-interior-clean .menu-btn{display:none!important}

/* Pied de page encyclopédique compact. */
body.mlr-interior-clean .footer,
body.mlr-interior-clean footer.site-footer,
body.mlr-interior-clean footer.mlr-footer{
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  background:#071A5C!important;
  color:#FBF8EF!important;
}
.mlr-footer-compact{
  width:min(1180px,calc(100% - 24px));
  min-height:36px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:6px 0;
  font-size:.78rem;
}
.mlr-footer-compact p{margin:0!important;color:rgba(255,255,255,.82)!important}
.mlr-footer-compact nav{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.mlr-footer-compact a{color:#fff!important;text-decoration:none!important}
.mlr-footer-compact a:hover,.mlr-footer-compact a:focus-visible{color:var(--mlr-gold)!important}

/* Compteur : les nombres restent visibles même si une ancienne règle mobile est chargée. */
.mlr-public-visitors-count strong,
#mlrVisitorToday,
#mlrVisitorYear{
  display:inline-block!important;
  min-width:1.5ch!important;
  visibility:visible!important;
  opacity:1!important;
  color:var(--mlr-gold)!important;
  font-weight:900!important;
  transform:none!important;
  text-indent:0!important;
  clip:auto!important;
}

@media(max-width:720px){
  .mlr-compact-inner{
    width:min(100% - 16px,1180px);
    min-height:40px;
    grid-template-columns:1fr auto;
    gap:8px;
  }
  body.mlr-interior-clean .site-header,
  body.mlr-interior-clean .master-header,
  body.mlr-interior-clean .mlr-header{min-height:40px!important}
  .mlr-compact-brand img{width:28px!important;height:28px!important}
  .mlr-compact-brand strong{font-size:.88rem}
  .mlr-compact-brand small{font-size:.62rem}
  .mlr-compact-context{display:none}
  .mlr-return-link{min-height:30px;padding:0 10px;font-size:.72rem}
  .mlr-footer-compact{min-height:34px;justify-content:center;text-align:center;padding:5px 0}
  .mlr-footer-compact nav{display:none}
  .mlr-public-visitors{width:100%!important;max-width:100%!important;padding:14px 12px!important}
  .mlr-public-visitors-count{font-size:1rem!important;line-height:1.65!important}
  .mlr-public-visitors-count strong{font-size:1.2em!important}
  .community-floating{right:8px!important;gap:7px!important}
  .community-floating button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
}

@media(max-width:390px){
  .mlr-compact-brand small{display:none}
  .mlr-return-link{padding:0 10px;font-size:.74rem}
}

/* V22.7 — lisibilité globale, téléphone et articles encyclopédiques. */
html,body{max-width:100%;overflow-x:hidden!important}
body.mlr-interior-clean .mlr-header,
body.mlr-interior-clean .site-header,
body.mlr-interior-clean .master-header{background:#071A5C!important}
body.mlr-interior-clean>nav:first-of-type,
body.mlr-interior-clean .article-nav,
body.mlr-interior-clean .sticky-nav{display:none!important}

/* Les anciens modules bleu nuit conservent impérativement un texte clair. */
body.mlr-agri-page .time,
body.mlr-agri-page .bigfact,
body.mlr-agri-page table,
body.mlr-agri-page table td,
body.mlr-agri-page .gallery figure,
body.mlr-agri-page .gallery figcaption,
body.mlr-agri-page figure .cap,
body.mlr-agri-page figure .small,
body.mlr-agri-page .poster .tile,
body.mlr-agri-page .poster .tile b{
  color:#f7f9ff!important;
}
body.mlr-agri-page .time p,
body.mlr-agri-page .time span,
body.mlr-agri-page .bigfact p,
body.mlr-agri-page table td,
body.mlr-agri-page figure figcaption{
  color:#f7f9ff!important;
  opacity:1!important;
}
body.mlr-agri-page .time b,
body.mlr-agri-page table th,
body.mlr-agri-page .poster .tile b{color:#f5c451!important}
body.mlr-agri-page .bigfact{line-height:1.28!important}
body.mlr-agri-page figure figcaption{background:#0b2234!important}

.mlr-table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:14px}
.mlr-table-scroll table{margin:0!important}

/* Bouton d'urgence/localisation présent sans recouvrir la lecture. */
.mlr-global-where,
body.mlr-interior-clean .mlr-location-control{
  position:fixed;right:12px;bottom:10px;z-index:1090;
  display:inline-flex;align-items:center;justify-content:center;
  min-height:34px;padding:0 12px;border:2px solid #F2B321;border-radius:999px;
  background:#071A5C!important;color:#FBF8EF!important;text-decoration:none!important;
  font-weight:800;font-size:.78rem;box-shadow:0 6px 16px rgba(4,19,63,.22)
}
.mlr-global-where:hover,.mlr-global-where:focus-visible,
body.mlr-interior-clean .mlr-location-control:hover,
body.mlr-interior-clean .mlr-location-control:focus-visible{background:#F2B321!important;color:#071A5C!important;outline:2px solid #fff}
body.mlr-interior-clean .mlr-global-where ~ .mlr-location-control,
body.mlr-interior-clean .mlr-location-control ~ .mlr-global-where{display:none!important}

/* Encyclopédie : le dock communautaire ne recouvre plus le texte. */
body.mlr-interior-clean .community-floating{display:none!important}
body.mlr-interior-clean{padding-bottom:52px}
body.mlr-interior-clean .encyclo-topic-hero h1,
body.mlr-interior-clean .zistoir-hero h1,
body.mlr-interior-clean .slavery-hero h1,
body.mlr-interior-clean .anne-hero h1{color:#F2B321!important}

/* Le menu communautaire devient un seul bouton sur les petits écrans. */
.mlr-mobile-actions-toggle{display:none}

@media(max-width:820px){
  body{font-size:16px!important;line-height:1.62!important}
  body h1{font-size:clamp(2.45rem,12vw,4rem)!important;line-height:1.02!important;overflow-wrap:anywhere}
  body h2{font-size:clamp(2rem,9vw,2.75rem)!important;line-height:1.08!important;overflow-wrap:anywhere}
  body h3{font-size:clamp(1.35rem,6vw,1.85rem)!important;line-height:1.18!important}
  body section{padding-left:5%!important;padding-right:5%!important}
  body.mlr-agri-page .timeline,
  body.mlr-agri-page .mlr-timeline{grid-template-columns:1fr!important}
  body.mlr-agri-page .time{min-height:0!important;padding:20px!important}
  body.mlr-agri-page .bigfact{font-size:clamp(1.65rem,7.4vw,2.35rem)!important;padding:22px!important}
  body.mlr-agri-page .mlr-table-scroll table{min-width:720px!important}
  body.mlr-agri-page .photo{height:auto!important;max-height:none!important;object-fit:contain!important}
  body.mlr-agri-page figure img{height:auto!important;max-height:420px!important;object-fit:contain!important}
  body.mlr-agri-page .gallery{grid-template-columns:1fr!important}
  .mlr-global-where,body.mlr-interior-clean .mlr-location-control{right:8px;bottom:8px;min-height:32px;padding:0 11px;font-size:.74rem}

  .mlr-actions-mobile{position:fixed!important;right:10px!important;bottom:70px!important;z-index:1080!important;display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:7px!important;width:auto!important}
  .mlr-actions-mobile>.community-fab{display:none!important;width:auto!important;min-width:112px!important;height:44px!important;min-height:44px!important;padding:0 15px!important;border-radius:999px!important;font-size:.86rem!important}
  .mlr-actions-mobile.mlr-actions-open>.community-fab{display:flex!important;align-items:center!important;justify-content:center!important}
  .mlr-mobile-actions-toggle{display:inline-flex!important;align-items:center;justify-content:center;min-width:86px;height:46px;padding:0 14px;border:2px solid var(--mlr-gold);border-radius:999px;background:#fff;color:var(--mlr-night);font-weight:900;box-shadow:0 8px 24px rgba(4,19,63,.22)}
}

@media(min-width:821px){
  .community-floating{right:0!important}
  .community-floating .community-fab{max-width:76px!important}
  .mlr-global-where,body.mlr-interior-clean .mlr-location-control{bottom:10px;right:88px}
}
