/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: var(--texte);
}

html {
	background:var(--fond);
}
body {
	font-size: 1em;
	font-family:sans-serif;
	font-weight:lighter;
    line-height: 1.4;
}

article { width:90%; margin:1em auto; }
article ul { margin:0; }
article ul li { display:inline-block; width:260px; margin:4px;}
article ul li a { font-weight:bold; }

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: var(--selection);
    text-shadow: none;
}

::selection {
    background: var(--selection);
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid var(--bordure);
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
 */

img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Chrome Frame prompt
   ========================================================================== */

.chromeframe {
    margin: 0.2em 0;
    background: var(--fond-alerte);
    color: var(--texte-alerte);
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

h1,h2,h3,h4 { font-weight:normal; }

strong { white-space:nowrap; }
a { text-decoration: none; font-weight:normal; color:var(--lien); white-space:nowrap; }
a:hover { color:var(--lien-survol); }
a.button { display:inline-block; padding:10px 30px; border:1px solid var(--bordure-bouton); border-radius:8px; background:var(--fond-bouton); }

#header { display:block; }

form {
	padding:10px;
	background:var(--formulaire);
	border-bottom:1px solid var(--bordure-formulaire);
	text-align:center;
	background:var(--formulaire);
}

#content { text-align:center; }
#content p { text-align:justify; }
#content > div { width:95%; margin:1em auto; }
#content div.sep { clear:both; }

.CP  { background: var(--niveau-cp); }
.CE1 { background: var(--niveau-ce1); }
.CE2 { background: var(--niveau-ce2); }
.CM1 { background: var(--niveau-cm1); }
.CM2 { background: var(--niveau-cm2); }


#footer {
	clear:both;
	bottom:0;
	right:0;
	left: 0;
	color:var(--gris);
	border-top:1px solid var(--bordure-pied);
	margin-top:100px;
	padding-left:2em;
	padding-top:5px;
	font-size:50%;
	text-align:center;
}

#footer p {
	padding:10px;
	font-weight:300;
	line-height:150%;
	width:90%;
	margin:0 auto;
}

#footer h2 {
	padding:10px;
	border-top:1px solid var(--bordure);
	font-weight:300;
	line-height:150%;
}

#footer a { white-space:wrap; }
#footer h2 a { color:var(--lien-pied); }

#footer div.right {
	float:right;
	margin-right:2em;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width:10024px) {
	#main h1, #main h2, #main h3, #main p { width:70%; }
	#content > div, #main #listapps div p, #main #listapps div pre { width:70%; }
	#references h2, #references ul, #content ul.tags, #lastnews div.media, #app { width:78%; }
	#listapps div { width:100%; }
	body.admin #main div.message { width:77%; }
}

@media print,
       (-o-min-device-pixel-ratio: 5/4),
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

@media print {
	#header, #menu, #submenu { display:none; }
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a, a:visited { text-decoration: underline; } 
    a[href]:after { content: " (" attr(href) ")"; } 
    abbr[title]:after { content: " (" attr(title) ")"; } 
    .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
	pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } 
    thead { display: table-header-group; /* h5bp.com/t */ } 
    tr, img { page-break-inside: avoid; } 
    img { max-width: 100% !important; } 
    p, h2, h3 { orphans: 3; widows: 3; } 
    h2, h3 { page-break-after: avoid; }

    @page { margin: 0.5cm; } 
}


@media screen and (min-device-width: 640px){
#main p,
#main div.app p,
#main #listapps div p.liens { width:90%; }
}

@media screen and (max-device-width: 640px){
	body,
	#listapps div, #references h2, #references ul, #content > div, #app #main form
	{ width:device-width; }

	#header ul {
		top:auto;
		right:auto;
		margin:0;
		padding:0 1em 1em 1em;
		padding:-1em 0 0 0;
		text-align:center;
		line-height:10%;
		width:auto;
		position:relative;
		background:var(--fond-menu);
		-webkit-transform:rotate(0);
	}
	#header ul li {
		margin:0;
		padding:0 1em;
		display:inline-block;
		margin-top:40px;
		width:auto;
		-webkit-transform:rotate(0);
	}
	#header #social { width:60px; padding-top:20px; }
	#header #social a { margin-top:10px; }
}
