/* maths-pdf.com — surcharges de l'agent principal (chargées en dernier). Ne pas modifier par les agents. */

/* Site pleine largeur, 5 px de marge à gauche (contenu) et à droite (sidebar) */
body .mpc-wrap{max-width:none!important;width:100%!important;padding-left:5px!important;padding-right:5px!important;box-sizing:border-box}
.mpc-header-in,.mpc-footer-in{max-width:none!important}

/* Bannière panoramique (3:1) tout en haut, sur toute la largeur de l'écran */
.mpc-topbanner{position:relative;overflow:hidden;height:auto!important;background:#0B5FA5;line-height:0}
.mpc-topbanner::before{content:none!important}
.mpc-topbanner a{display:block!important;height:auto!important;max-width:none!important;margin:0!important}
.mpc-topbanner picture{display:block;height:auto!important;line-height:0}
.mpc-topbanner img{width:100%!important;height:auto!important;max-height:none!important;max-width:none!important;aspect-ratio:3/1;object-fit:cover!important;display:block;box-shadow:none}
.mpc-hero{display:none!important}

/* Menu : bande rectangulaire pleine largeur sous le logo, onglets rectangulaires (aucun arrondi) */
@media(min-width:761px){
  .mpc-header{padding:0!important;background:#083F70!important;border-top:3px solid #FFC93C;border-bottom:3px solid #FFC93C;box-shadow:none!important}
  .mpc-header-in{display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important;padding:0 10px!important;min-height:0!important}
  .mpc-logo{display:none!important}
  .mpc-nav{order:1;flex:1 1 auto!important;width:auto;margin:0!important;background:transparent!important;border:0!important;border-radius:0!important}
  .mpc-flags{order:2;margin:0 0 0 auto!important;padding:0 4px;align-self:center}
  .mpc-nav .mpc-menu{display:flex!important;flex-wrap:wrap;justify-content:center;gap:0!important;margin:0!important;padding:0!important}
  .mpc-nav .mpc-menu>li{margin:0!important;border-radius:0!important}
  .mpc-nav .mpc-menu>li>a{display:block!important;border-radius:0!important;margin:0!important;padding:14px 24px!important;font-weight:800;font-size:15px;line-height:1.2;color:#fff!important;background:transparent!important;border:0!important;border-right:1px solid rgba(255,255,255,.2)!important;box-shadow:none!important;transition:background .15s}
  .mpc-nav .mpc-menu>li:first-child>a{border-left:1px solid rgba(255,255,255,.2)!important}
  .mpc-nav .mpc-menu>li>a:hover,.mpc-nav .mpc-menu>li>a:focus,.mpc-nav .mpc-menu>li.current-menu-item>a,.mpc-nav .mpc-menu>li.current-menu-ancestor>a,.mpc-nav .mpc-menu>li.current-menu-parent>a{background:#FF6F59!important;color:#fff!important}
  .mpc-nav .sub-menu{border-radius:0!important;padding:0!important;background:#fff!important;box-shadow:0 10px 24px rgba(8,63,112,.25)!important;border-top:3px solid #FF6F59}
  .mpc-nav .sub-menu a{border-radius:0!important;display:block;padding:10px 16px!important;color:#083F70!important;font-weight:700;border-bottom:1px solid #E8F3FC}
  .mpc-nav .sub-menu a:hover{background:#E8F3FC!important}
}

/* Titres des exercices au-dessus de l'énoncé, sans flèches de défilement */
.mpc-ex-list .mpc-ex{flex-wrap:wrap;flex-direction:column;gap:6px}
.mpc-ex .mpc-ex-h{order:-1;width:100%;margin:0 0 4px;padding:0 0 6px;border-bottom:2px dashed #FFC9BE;font-size:1.15rem;color:#0B5FA5}
.mpc-ex .mpc-ex-n{display:none}
body .mpc-ex .mpc-ex-q{width:100%;overflow:visible!important;padding:6px 0}

@media(max-width:760px){.mpc-logo{display:none!important}.mpc-header{background:#083F70!important;padding:6px 8px!important}.mpc-header-in{align-items:center}}

/* Bouton retour en haut : pastille dégradée bleu → corail avec chevron blanc */
body .mpc-top{width:56px!important;height:56px!important;right:22px!important;bottom:22px!important;border:3px solid #fff!important;border-radius:18px!important;background:linear-gradient(135deg,#0B5FA5 0%,#3A8BFF 45%,#FF6F59 100%)!important;box-shadow:0 10px 24px rgba(8,63,112,.35),0 0 0 4px rgba(255,201,60,.35)!important;font-size:0!important;color:transparent!important;padding:0!important;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease;display:flex;align-items:center;justify-content:center}
body .mpc-top::before{content:"";width:24px;height:24px;background:#fff;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5l-8 8 2.1 2.1L12 9.2l5.9 5.9L20 13z' fill='black'/%3E%3Cpath d='M12 11l-6 6 1.6 1.6L12 14.2l4.4 4.4L18 17z' fill='black' opacity='.55'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5l-8 8 2.1 2.1L12 9.2l5.9 5.9L20 13z' fill='black'/%3E%3Cpath d='M12 11l-6 6 1.6 1.6L12 14.2l4.4 4.4L18 17z' fill='black' opacity='.55'/%3E%3C/svg%3E") center/contain no-repeat}
body .mpc-top:hover{transform:translateY(-4px) scale(1.06);box-shadow:0 14px 30px rgba(8,63,112,.45),0 0 0 6px rgba(255,201,60,.5)!important}
body .mpc-top:active{transform:scale(.95)}
@media(max-width:760px){body .mpc-top{width:48px!important;height:48px!important;right:14px!important;bottom:14px!important;border-radius:15px!important}}

/* Accueil : 6 types en 3x2 (pas 5+1) */
@media(min-width:761px){body .mpch-types{grid-template-columns:repeat(3,1fr)!important}}
/* accueil : texte blanc dans les cartes colorees (09/11) */
body .mpch a.mpch-lvl,body .mpch a.mpch-lvl:visited,body .mpch a.mpch-lvl:hover,body .mpch a.mpch-lvl .mpch-lvl-t,body .mpch a.mpch-lvl .mpch-lvl-a,body .mpch a.mpch-lvl .mpch-lvl-n,body .mpch-game>h3,body .mpch-game>h3 *,body .mpch-cd-grid div,body .mpch-cd-grid div *{color:#fff!important}
body .mpch a.mpch-lvl .mpch-lvl-t{text-shadow:0 1px 2px rgba(0,0,0,.35)}

/* mobile : sous-menus repliés, un seul ouvert à la fois (09/11) */
@media(max-width:760px){
body .mpc-nav .sub-menu{display:none!important;max-height:60vh;overflow-y:auto}
body .mpc-nav li.mpc-sub-open>.sub-menu{display:block!important}
body .mpc-nav .menu-item-has-children>a:after{content:" ▾"}
body .mpc-nav .menu-item-has-children.mpc-sub-open>a:after{content:" ▴"}
}

/* bouton monter en haut : au-dessus de la pub ancrée AdSense (09/11) */
body .mpc-top,body a.generate-back-to-top{bottom:120px!important}
@media(min-width:761px){body .mpc-top,body a.generate-back-to-top{bottom:100px!important}}
