﻿/* Used for CS Projects Web Site */

@import "csprojects_colors.css";

/* Main page parts */

body {
	background-image:url("support.png"); 
	background-repeat:repeat;
	background-attachment:fixed;
}

main {
	max-width:1240px; /* and not 1280, to always have a margin */
	background-color: var(--color-txt-bckgnd);
	margin: 1rem auto;
	font-family: Calibri, Geneva, sans-serif;
	color: Cornsilk;
	box-shadow:10px 10px 28px 0px rgba(0,0,0,0.75);
}

section {  /* Works without, had to add these redundant styles to visualise pages correctly under Web Expression */
	background-color: var(--color-txt-bckgnd);
	font-family: Calibri, Geneva, sans-serif; 
	color: Cornsilk;
}


header, nav, section, hr, footer {
	margin: 0 1rem;
}


/* Common text blocks */

h1, h2, h3, h4 {
	margin-top: 0.8rem;
	margin-bottom:0.5rem;
	font-weight: bold;
}

h1 {
	font-size: 2.3rem;
}

h2 {
	font-size: 2rem;
}

h3 {
	font-size: 1.7rem;
}

h4 {
	font-size: 1.2rem;
}

p, ul, ol, li {
	text-align: justify;
	margin-top: 0.6rem;
	margin-bottom: 0.6rem;
	font-size: 1rem;
	line-height:1.1;
}

blockquote {
	border-style: solid;
	border-width: 1px;
	margin:0;
	padding: 0.5rem 1rem 0.5rem 1rem;
	font-style:italic;
}

a {
	text-decoration: none;
	color: var(--color-txt-url);
}

a:visited {
	color: var(--color-txt-url-visited);
}

a:hover {
	text-decoration:underline;
}

hr {
	height:0.3rem;
	background-color: Cornsilk;
}

section hr {
	margin:0;
}


/* Generic Classes */

.ctr {
	text-align: center;
}

.caption {
	font-style:italic;
	text-align:center;
}


/* Tables */

table, th, td {
    border: 1px solid Cornsilk;
    border-collapse: collapse;
}


/* Images Layout */

img {
	max-width: 100%;
    height:auto;
    margin:0.4rem;
    box-shadow: 10px 10px 28px 0px rgba(0,0,0,0.75);
    vertical-align: middle;
	object-fit:contain; 
}

img:active {
	transform:scale(1.15, 1.15);
}

img:hover{
	box-shadow: 0px 0px 39px 0px rgba(255,255,255,0.75);
}

figure {
	position:relative;
	text-align:center;
	font-style:italic;
	margin-top:1rem;
	margin-left:0;
	margin-right:0;
}

div.container {
	display:flex;
	flex-direction:row;
	flex-wrap:wrap;
	justify-content:space-around;
    margin:0 auto;
}

div.container figure a img {
	height:100%;
	margin:0;
	width:100%; /* To avoid narrow img */
}

div.container figcaption {
	position:absolute;
	top:0;
	left:0;
	width:100%;
	color:White; /* In case the title is not en URL */
	background: rgba(0,0,0, .6); /* Translucid Black Background ! */
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

div.container figcaption a {
	font-size:1.2rem;
	font-weight:bold;
	font-style:normal;
}


/* Videos */

video {
	display:block;
	margin:0 auto;
	width:40%;
	height:auto;
}

.videoWrapper {
	position: relative;
	margin: 0 auto;
	width:50%;
	height:0;
	padding-bottom: 28.25%; /* 16:9 = 56.25% */
}

.videoWrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}


/* Header */

header {
	margin: 1rem 1rem 1rem 1rem;
	background-image: url("banner.jpg");
	background-repeat: repeat-x;
}

header h1 {
	margin-left: 1rem;
	margin-top:0; 
	margin-bottom:0; 
	font-weight: bolder;
	font-size: 5rem;
	background-color:Cornsilk;
	color: var(--color-txt-bckgnd);
	width: 26.5rem; 
	text-align:center;
}

header h1:hover {
	text-decoration:none;
	background-color:var(--color-txt-bckgnd);
}

header h1 a {
	text-decoration:none;
	color:var(--color-txt-bckgnd);
}

header h1 a:hover {
	text-decoration:none; 
	color:Cornsilk;
}

header a:visited {
	color:var(--color-txt-bckgnd); /* Remettre la couleur d'origine, ne pas indiquer les liens déjà visités */
}


header>h4 {
	margin-left: 1rem;
	margin-top:0; 
	margin-bottom:0; 
	font-weight: bolder;
	font-size: 1rem;
	background-color:var(--color-txt-bckgnd);
	color:Cornsilk;
	width: 26.5rem;
	text-align:center;
}


header h4 a {
	text-decoration:none;
	color:Cornsilk;
}

header h4 a:hover{
	text-decoration:none;
}

header h4 a:visited {
	color:Cornsilk; /* Ne pas changer couleur */
}


/* Top Navigation Menu */

nav {
	display:block;
    margin: 0 auto;
}

nav ul {
	display:flex;
	flex-direction:row;
	flex-wrap:wrap;
	justify-content:center;
	list-style: none;
	padding:0;
}

nav ul li {
	margin: 0rem 0rem 0.8em 0rem;
	box-shadow:10px 10px 28px 0px rgba(0,0,0,0.75);
}

nav ul li a {
	display: block;
 	padding: 0.3em 0.5em 0.3em 0.5rem; 
	text-decoration: none;
	font-size: 1.3rem;
	font-weight: bold;
	background-color: var(--color-btn-bckgnd);
	color: Cornsilk;
}

nav ul li a:hover {
	color: var(--color-btn-bckgnd);
	text-decoration:none;
	background-color:Cornsilk;
}

nav ul a:visited {  /* bizarre : il a fallu retirer "li" */
	color:Cornsilk;
}


/* Sidebar Menu */

.sidebar {
	float:left; 
	display:flex;
	flex-direction:row;
	flex-wrap:wrap;
	justify-content:content;
	width: 12.2rem;
}

.sidebar ul {
	padding: 0;
	margin:0;
	list-style: none;
}

.sidebar li {
	font-weight: bold;
}

.sidebar a {
	display: block;
	color: Cornsilk;
	text-decoration:none;
	background: var(--color-btn-bckgnd);
	font-size: 1.1rem;
	font-weight: bold;
 	padding: 0.5rem; 
}

.sidebar a:hover {
	color: var(--color-btn-bckgnd);
	border:medium;
	text-decoration:none;
	background-color: Cornsilk;
}

.content {  /* Pour laisser une marge pour le sous-menu */
	margin-left: 12.8rem;
}

/* Footer */

footer {
	margin: 0 auto;
}

footer p {
	font-size: 0.9rem;
	text-align: center;
}

footer a {
	text-decoration: underline;
}

footer img {
	display:block;
	margin:0 auto ;
	padding-bottom:0.5rem;
    box-shadow:none;
}

/* Specifics for mobile devices */

@media only screen and (max-device-width: 640px) {
	header h1 {font-size: 3.5rem;}
}

/* Fin CSS */