html.spip-mobile #header,html.spip-mobile #footer,html.spip-mobile #aside,html.spip-mobile #content .breadcrumb{display:none!important}html.spip-mobile .page.container,html.spip-mobile .page>.container,html.spip-mobile #content{width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box}html.spip-mobile .page>.container{padding:0 12px}html.spip-mobile #content{float:none!important}html.spip-mobile .row{margin-left:0!important}html.spip-mobile img{max-width:100%}html.spip-mobile{overflow-x:hidden}html.spip-mobile .inner-content{overflow-x:auto}
/* La navigation appartient à l’application : ne pas répéter celle du site. */
html.spip-mobile .tsmc-nav,html.spip-mobile .tsmc-bandeau,html.spip-mobile.page_commune #content .inner-content>h1{display:none!important}
html.spip-mobile body{margin:0;background:#fff;font-size:15px;line-height:1.6}
html.spip-mobile .page.container{border:0;border-radius:0;box-shadow:none;padding:0}
html.spip-mobile .page>.container{padding:8px 16px 20px}
html.spip-mobile .inner-content{padding:0;overflow-x:auto;min-width:0}
html.spip-mobile #content h1{font-size:23px;line-height:1.3;letter-spacing:-.45px;margin:8px 0 18px;overflow-wrap:break-word}
html.spip-mobile #content h2{font-size:19px;line-height:1.4}
html.spip-mobile .commune-identite{margin-top:4px}
html.spip-mobile .commune-photo{flex-basis:100%;min-width:0}
html.spip-mobile .commune-photo img{width:100%;max-height:240px;object-fit:cover;border-radius:12px}
html.spip-mobile .commune-fiche{flex-basis:100%;min-width:0}
@media(min-width:700px){html.spip-mobile .page>.container{padding:12px 24px 24px}html.spip-mobile .commune-photo,html.spip-mobile .commune-fiche{flex-basis:calc(50% - 10px)}html.spip-mobile .commune-photo img{max-height:320px}html.spip-mobile #content h1{font-size:27px}}

/* Les noms de territoires doivent se replier, contrairement aux valeurs numériques. */
html.spip-mobile #content table thead th,
html.spip-mobile #content table thead td,
html.spip-mobile #content table.spip tr.row_first th,
html.spip-mobile #content table.spip tr.row_first td{
  white-space:normal!important;
  overflow-wrap:anywhere;
  word-break:normal;
  hyphens:auto;
  max-width:12ch;
  line-height:1.35;
  vertical-align:middle;
}
@media(max-width:600px){
  html.spip-mobile #content table.spip thead th,
  html.spip-mobile #content table.spip thead td{padding:9px 6px;font-size:.82em}
  html.spip-mobile #content table.spip tbody td,
  html.spip-mobile #content table.spip tbody th{padding:9px 6px}
}

/* La ville est déjà indiquée dans la barre de l’application. */
html.spip-mobile #content h1{font-size:20px;line-height:1.35;letter-spacing:-.3px;margin:6px 0 16px}
html.spip-mobile #content h2{font-size:18px;line-height:1.4}
html.spip-mobile #content h3{font-size:16px;line-height:1.4}
@media(min-width:700px){html.spip-mobile #content h1{font-size:23px}html.spip-mobile #content h2{font-size:20px}}

/* Le thème est transmis uniquement par le conteneur autorisé, en mode application. */
html.spip-mobile[data-mobile-theme="dark"]{color-scheme:dark;background:#101b27}
html.spip-mobile[data-mobile-theme="dark"] body,
html.spip-mobile[data-mobile-theme="dark"] .page,
html.spip-mobile[data-mobile-theme="dark"] #content{background:#101b27!important;color:#e4edf5!important}
html.spip-mobile[data-mobile-theme="dark"] #content :is(h1,h2,h3,h4){color:#d3eaff!important}
html.spip-mobile[data-mobile-theme="dark"] #content a{color:#7fc3f3!important}
html.spip-mobile[data-mobile-theme="dark"] #content :is(table,th,td){border-color:#344a5d!important;color:#e4edf5!important}
html.spip-mobile[data-mobile-theme="dark"] #content :is(th,thead td,tr.row_first td){background:#243e54!important}
html.spip-mobile[data-mobile-theme="dark"] #content tbody :is(td,th){background:#182736!important}
html.spip-mobile[data-mobile-theme="dark"] #content :is(blockquote,.commune-fiche,.tsmc-chiffre,.tsmc-chiffres,.tsmc-encadre){background:#182736!important;color:#e4edf5!important;border-color:#344a5d!important}

/* Encadrés du site : conserver un contraste lisible en mode sombre. */
html.spip-mobile[data-mobile-theme="dark"] #content :is(.presentation,h2,.ins-chiffres li,.log-chiffres li,.ins-legende){background:#243e54!important;color:#e4edf5!important;border-color:#344a5d!important}
html.spip-mobile[data-mobile-theme="dark"] #content :is(.ins-chiffres,.log-chiffres) :is(b,small,.compare){color:#d3eaff!important}
/* Les graphiques SVG conservent leur fond clair et leurs couleurs de données. */
html.spip-mobile[data-mobile-theme="dark"] #content :is(.pop-graph,.eco-chart){background:#f7fafd!important;color:#1d2330!important}
html.spip-mobile[data-mobile-theme="dark"] #content :is(.pop-graph,.eco-chart) :is(figcaption,p){color:#1d2330!important}

/* Le fond du tableau remplit aussi l'espace hors des cellules. */
html.spip-mobile[data-mobile-theme="dark"] #content table.spip{background:#182736!important}
/* Les tableaux INSEE courts utilisent toute la largeur disponible. Les autres
   tableaux conservent leur défilement horizontal. */
html.spip-mobile #content table.tab-insee{display:table!important;width:100%;max-width:100%;table-layout:auto}
html.spip-mobile #content table.tab-insee thead :is(th,td){white-space:normal!important;overflow-wrap:normal;hyphens:auto}
html.spip-mobile #content table.tab-insee :is(th,td).nb{white-space:nowrap}
@media(max-width:600px){html.spip-mobile #content table.tab-insee thead :is(th,td){font-size:12px;padding:9px 6px}}

@media(max-width:600px){
 html.spip-mobile #content table.tab-insee :is(th,td).barre{display:none!important}
 html.spip-mobile #content table.tab-insee thead :is(th,td){max-width:none;hyphens:none;word-break:normal}
}
