/*
 * Adaptation aux écrans étroits (smartphone, tablette) et garde-fou contre le défilement horizontal.
 * Chargé après site.css : l'ancienne charte (core.css, bootstrap.css, site.css) reste inchangée.
 */

/* Jamais de barre de défilement horizontale */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }

img { max-width: 100%; }
.contenu img, .embed img, .fullrubrique img { height: auto; }
.contenu table { max-width: 100%; display: block; overflow-x: auto; }
.breadcrumb, #footer { word-wrap: break-word; }
/* Boutons de lien : le texte peut passer à la ligne au lieu de dépasser de l'encadré */
.Link .btn, .embed .btn { white-space: normal; max-width: 100%; word-wrap: break-word; }
.Link .btn a { word-break: break-word; }

/* Tablette */
@media (min-width: 768px) and (max-width: 991px) {
	.item { width: 50%; }
	.ContentAccueil .contenu { margin-left: 30px; }
}

/* Smartphone */
@media (max-width: 767px) {
	body { font-size: 15px; }

	/* Accueil : une rubrique par bloc, texte pleine largeur puis image */
	.LigneAccueil { margin-top: 3em; margin-bottom: 1.5em; }
	.ContentAccueil .Folder.droite, .ContentAccueil .Folder.gauche { margin: 0; padding: 0; }
	.ContentAccueil.text-right, .ContentAccueil.pull-right { float: none !important; text-align: left; }
	.ContentAccueil .contenu { margin-left: 0; padding: 0 5px; }
	.Folder .EmbedInline .Title { font-size: 12vw; line-height: 1.1; text-align: center; margin-top: 0; }
	.ContentAccueil .finContenu { margin: .5em 0 1em; }
	.LigneAccueil .col-sm-6 > .row { margin: 0; }
	.LigneAccueil .col-sm-6 img { display: block; margin: 0 auto; }

	/* Pages de rubrique */
	.HeadPicture .bandeau .bandeau-parallax { height: 150px; }
	.Folder .full .Title { font-size: 12vw; line-height: 1.1; text-align: center; }
	.item { width: 100%; padding: 10px 0; }
	.ShortDescription { margin-bottom: 1em; }
	.breadcrumb { font-size: 14px; padding: 8px 15px; }
	#path ul li { margin: 0 .3em; }

	/* Contact et carte */
	.formulaire textarea { height: 120px; }
	.formulaire .btn-submit { width: 100%; padding: 12px; }
	.CarteOpenStreetMap { height: 260px !important; }
	#Contact .col-sm-offset-1 { text-align: center; }

	/* Pied de page : une colonne de liens, texte centré */
	#footer { text-align: center; padding: 10px 0; }
	#footer .niveau_1 { padding: 0 5px; }
	#footer .niveau_1 li { margin: 0 0 .5em; }
	#footer .navbar-text, #footer .Signature { float: none; text-align: center; margin: 5px 0; }
	#footer .navbar-nav, #footer .navbar-right { float: none; margin: 0; }
	#footer .navbar-collapse { display: block; height: auto !important; padding: 0; }
}
