/* Variables */
:root {
	/* --couleur_1: #F8E6E0; */
	--couleur_bg: #f7fafc;
	--couleur_1: #ffcc04;
	--couleur_2: #0689d6;
	--degrade_1: linear-gradient(to bottom right, #0689d6, #20A3E6); /* Anciennement #059ae9 */
	--couleur_bg2: white; /* Couleur de fond 2 (en-tête, bas de page) */
	--couleur_ombre: #e8e8e8; /* Couleur de l'ombre */
	--couleur_grisclair: #6b7280; /* Couleur des légendes et autres textes de moindre importance. */
	--police: 'Inter';
}

/* Par défaut */
body {
	background-color: var(--couleur_bg);
	font-family: var(--police), Serif;
	font-size: 20px;
	margin: 0px;
	text-align: justify;
}

/* Pour faire fonctionner les anciennes balises de formatage HTML simple. */
i {
	font-style: italic;
}
u {
	text-decoration: underline;
}
b {
	font-weight: bold;
}
s {
	text-decoration: line-through;
}
tt {
	font-family: Monospace;
}
center {
	text-align: center;
}
big {
	font-size: larger;
}

/* En-tête */
header {
	top: 0px;
	padding: 1em;
	position: sticky;
	background-color: var(--couleur_bg2);
	width: 100%;
	box-shadow: 0px 5px 9px var(--couleur_ombre);
	box-sizing: border-box; /* Inclut aussi le padding dans le width. */
	display: flex;
    justify-content: space-between;
	align-items: center;
	max-height: 4em;
	overflow-x: auto;
	white-space: nowrap;
}
nav {
	display: flex;
	align-items: center;
	gap: 1em;
}

/* Contenu principal */
main {
	padding: 1em;
	box-sizing: border-box;
}

/* Formulaire principal */
div#formulaire_principal {
	background-color: white;
	box-shadow: 0px 0px 15px grey;
	color: black;
	width : 35%;
	border-radius: 15px;
	box-sizing: border-box;
	padding: 1em;
	margin: auto;
	font-family: var(--police);
	display: flex;
	flex-direction: column;
	gap: 1em;
}
div#formulaire_principal h1 {
	font-size: 1.7em;
	margin: 0px;
}
div#formulaire_principal p {
	color: var(--couleur_grisclair);
	font-size: 0.8em;
	margin: 0px;
}
div.champ_form {
	display: flex;
	flex-direction: column;
	gap: 0.1em;
}
div.champ_form label {
	color: var(--couleur_grisclair);
	font-weight: bold;
	font-size: 0.8em;
}
div.erreur {
    /* background-color: rgba(255, 255, 255, 0.75);  */
	/* padding: 1em; */
	/* border-radius: 3px; */
	color: red; 
	line-height: 1em;
	font-size: 0.9em;
}
@keyframes shake {
	0%   { transform: translateX(0); }
	10%  { transform: translateX(-8px); }
	20%  { transform: translateX(8px); }
	30%  { transform: translateX(-6px); }
	40%  { transform: translateX(6px); }
	50%  { transform: translateX(-4px); }
	60%  { transform: translateX(4px); }
	70%  { transform: translateX(-2px); }
	80%  { transform: translateX(2px); }
	90%  { transform: translateX(-1px); }
	100% { transform: translateX(0); }
}
.shake {
	animation: shake 480ms cubic-bezier(.36,.07,.19,.97);
}

/* Questionnaire principal */
div#questionnaire_principal {
	background-color: #f7fafc;
	width: 60%;
	margin: auto;
	box-sizing: border-box;
	padding: 2em;
	border-radius: 5px;
	border: solid 2px black;
}

/* Boîte de dialogue pour les cookies */
div#preferences {
	position: fixed; 
	background-color: var(--couleur_bg2); /* #A9D0F5 */
	border-radius: 10px;
	border: 10px ridge red;
	box-shadow: 5px 5px 15px grey;
	width: 40%;
	display: block;
	padding: 1em;
	box-sizing: border-box;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 20;
}
img.croix_rouge {
	width: 8%;
	position: absolute;
	top: 10px;
	right: 10px;
	cursor: pointer;
}

/* Conteneurs */
div.classement {
	border: solid 2px black;
	border-radius: 10px;
	box-sizing: border-box;
	padding: 1em;
	box-shadow: 5px 5px 15px grey;
}
div.classement h3 {
	margin: 0px;
}
div.classement ul {
	line-height: 1.5em;
}
div#info {
	position: fixed;
	bottom: 2%; 
	right: 1%; 
	background-color: #FAEDE9; 
	border-radius: 10px;	
	border: 5px ridge blue;	
	width: 25%; 
	padding: 1em;
}
div#menu_boutons {
	position: fixed; 
	text-align: right;
	right: 2%; 
	bottom: 2%;
}
div.giga_conteneur {
	display: flex;
	gap: 1.5em;
	padding: 1em;
	box-sizing: border-box;
	flex-wrap: wrap;
}
div.bloc_element {
	flex: 1 0 45%;
	padding: 1em;
	box-sizing: border-box;
	border: solid 2px black;
	border-radius: 6px;
	box-shadow: 5px 5px 10px grey;
	background-color: #f7fafc;
}

/* Paragraphes et autre textes */
span.obligatoire::after {
	content: ' *';
	color: red;
	font-weight: normal;
}
p.indications {
	color: white;
	line-height: 1em;
	line-height: 1.1em;
}
p.teasing {
	font-style: italic;
	color: red;
	text-shadow: 1px 1px 2px grey;
}
.infos {
	color: #00FFFF;
}
a {
	color: var(--couleur_2);
}

/* Champs de saisie */
.champ1 {
	font-family: var(--police);
	font-size: 1em;
	border-radius: 4px;
	border: 1px solid var(--couleur_grisclair);
	background-color: var(--couleur_bg);
	box-sizing: border-box;
	padding: 0.2em;
	width: 100%;
	
}
input#prenom {
	text-transform: capitalize;
}
#oeil_ouvert {
	cursor: pointer;
	position: absolute;
	transform: translateX(0.2em) translateY(0.2em);
}
#oeil_ferme {
	cursor: pointer;
	display: none;
	position: absolute;
	transform: translateX(0.2em) translateY(0.2em);
}
.champ1:invalid:focus {
	/* border: red solid 2px; */
	background-color: #FFCCCC;
}
.champ1:valid:focus {
	/* border: green solid 2px; */
	background-color: #BFFFBF;
}
input.choix_couleur {
	display: none;
}
label.choix_couleur {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
}
label.choix_couleur {
    content: '';
	display: inline;
    left: 0;
    top: 50%;
    /* transform: translateY(-50%); */
    /* width: 1em; */
    height: 1.5em;
	flex: 1;
    border: 2px solid var(--couleur_grisclair);
	margin: 2px;
}
input.choix_couleur:checked + label {
    border: 3px solid #00FF40;
}

/* Boutons */
.bouton {
	transition: .2s ease-in-out;
	font-size: 1.3em;
	border-radius: 10px;
	text-decoration: none;
	border: solid 2px;
	display: inline-block;
	padding: 4px 12px;
	text-align: center;
	font-family: Inter, Serif;
}
.bouton:hover {
	cursor: pointer;
	transform: scale(1.15);
	box-shadow: 0px 3px 7px grey;
	transform: translateY(-3px);
}
.bouton:active {
	transition: 0s ease-in-out;
	cursor: pointer;
	transform: scale(1.05); /* Attention : c'est un zoom par rapport à :hover. */
}
/* Bouton principal : validation... (vert, bleu) */
.bouton1 {
	/* background-color: #00FF40; */
	background: var(--degrade_1);
	color: white;
	border-color: white;
	box-shadow: 0px 0px 5px white;
	font-weight: bold;
}
/* Bouton secondaire : refuser, supprimer... (rouge, orange) */
.bouton2 {
	background-color: #DF0101;
	color: white;
	border-color: white;
	box-shadow: 0px 0px 5px white;
}
/* Bouton terciaire : paramétrer, autre... (blanc, gris) */
.bouton3 {
	background-color: white;
	color: var(--couleur_1);
	border-color: var(--couleur_1);
	box-shadow: 0px 0px 5px white;
}
.bouton3:hover {
	background-color: var(--couleur_1);
	color: white;
	border-color: white;
}
/* Bouton bariolé sans cohérence */
.bouton4 {
	transition: .2s ease-in-out;
	background-color: yellow;
	color: red;
	font-size: 1.5em;
	font-family: Serif;
	border: solid 2px green;
	border-radius: 10px;
	box-shadow: 0 0 5px green;
	text-decoration: none;
}
.bouton4:hover {
	transition: .2s ease-in-out;
	cursor: pointer;
	font-size: 2em;
}
.bouton4:active {
	transition: 0s ease-in-out;
	cursor: pointer;
	font-size: 1.9em;
}
/* Boutons pour le canva */
.bouton_canva{
	display: inline-block; 
	background: #69c; 
	color: #fff; 
	padding: 5px 10px; 
	font-family: Serif; 
	font-size: 1em; 
	cursor: pointer;
}

/* Images */
img.logo {
	height: 3em; 
	width: auto;
	display: block; 
}

/* Cookies */
table.table_cookies {
	border-width: 1em; 
	border: dashed var(--couleur_2); 
	padding: 1em; 
	margin: auto;
	box-sizing: border-box;
	text-align: left;
}
table.table_cookies  tr {
	padding-top: 0.3em;
	padding-bottom: 0.3em;
}
table.table_cookies td {
	padding: 0.1em;
}
table.table_cookies label, table.table_cookies input[type='radio'] {
	cursor: pointer;
}
img#cookies {
	position: absolute; 
	right: 15em; 
	top: 4em;
	width: 10%;
}
img#discours_cookies {
	cursor: pointer;
	width: 10%;
	float: right;
}

/* Code QR du quiz */
div#emplacement_qrcode {
	position: fixed;
	padding: 1em;
	box-sizing: border-box;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	box-shadow: 5px 5px 15px grey;
	background-color: white;
	width: 35%;
	border: solid 2px black;
	border-radius: 5px;
}
div#emplacement_qrcode img:not(img.croix_rouge) {
	width: 95%;
}

/* Pour la toile de peinture */
canvas#peinture {
	border: solid; 
	background: white; 
	cursor: crosshair;
}

/* Pour les confettis */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.confetti {
    position: absolute;
    width: 7px;
    height: 7px;
    background-color: #ff0;
    opacity: 0.8;
    animation: fall linear forwards;
}
@keyframes fall {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100vh);
    }
}

/* Pour le responsive design */
@media screen and (max-width: 1000px) {
	div#preferences {
		width: 76%;
	}
	div#formulaire_principal, div#questionnaire_principal {
		width : 95%; 
	}
	div.giga_conteneur {
		flex-direction: column;
	}
}