@import url('struct.css');

/**********************************
 * structure de la page d'accueil *
 **********************************/

body {
	height: 100%; /* nécessaire pour que 100vh fonctionne correctement */
}

main {
	display: flex;
	flex-direction: column;
	align-items: center;
}

section {
	width: 100%;
	padding: 20px; /* pour séparer un peu le contenu des différentes sections, et laisser des marges latérales à leurs contenus */
	min-height: calc(100vh - 70px); /* ajuste pour déduire la hauteur du header et occuper le reste de l'écran */
	min-height: calc(100vh - env(safe-area-inset-top) - 70px); /* pour environnement iOS et autres, ne garder que l'espace visible */
}

div[id$="-anchor"] { /* ancres invisibles aussi hautes que le header, pour gérer les liens vers les sections, sans que le header ne les cache */
	height: 70px;
	margin-top: -70px;
	visibility: hidden;
}

h3 {
	margin-bottom: 15px;
}

/*******************
 * section d'intro *
 *******************/

#intro {
	display: flex;
	flex-direction: column;
	justify-content: space-between; /* espacement harmonieux des éléments */
	align-items: center;
	background-image: url('../resources/feuilles.png');
	background-repeat: no-repeat;
	background-size: cover; /* prendre la place de toute la section */
	color: white; /* pour le contraste */
}

#site-name {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 25px;
}

#logo {
	max-height: 150px;
	width: auto; /* conserver les proportions */
}

#intro h2 {
	font-size: 4em;
}

#intro p {
	font-size: 1.3em;
}

#intro a:link, #intro a:visited {
	color: white;
}

#short-description {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: auto; /* la coller à l'élément supérieur si la place est disponible */
}

#intitule-metier {
	font-size: 2em;
	margin-bottom: 15px;
}

#aepf-container {
	width: 100%; /* prendre toute la largeur de l'écran */
	display: flex;
	justify-content: flex-end; /* mettre le logo aepf à droite */
	padding-top: 15px;
	padding-bottom: 15px;
}

#aepf-subcontainer {
	display: flex;
	flex-direction: column;
	align-items: flex-end; /* serrer les éléments à droite */
	font-size: 0.9em; /* "agrée..." en taille plus petite */
	text-align: right; /* coller le texte à droite */
}

#aepfLogo {
	max-width: 200px;
	height: auto; /* conserver les proportions */
	margin-top: 10px; /* séparer du texte "agréée..." */
	border: 2px solid var(--light-green);
	border-radius: 5px;
}

@media screen and (max-width: 670px) {
	#aepfLogo {
		max-width: 160px;
	}
}

@media screen and (max-width: 500px) {
	#intro {
		background-image: url('../resources/feuillesZoom.png');
	}

	#intro h2 {
		font-size: 3em;
	}

	#intitule-metier {
		font-size: 1.5em;
	}

	#intro p {
		font-size: 1.2em;
	}

	#aepfLogo {
		max-width: 120px;
	}
}

/*******************************************
 * section de présentation des prestations *
 *******************************************/

#prestations {
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

#prestations ul li {
	margin: 30px 0; /* séparer les puces verticalement */
}

#prestations p {
	margin-top: 15px;
	margin-bottom: 15px;
}

/********************************************
 * section de présentation des réalisations *
 ********************************************/

#realisations-container {
	position: relative;
	overflow: hidden; /* cache les images en dehors de la zone visible */
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

#realisations-carousel {
	width: 100%;
	display: flex;
	transition: transform 0.5s ease-in-out;
}

.carousel-item {
	flex: 0 0 50%;
	max-width: 50%;
	height: calc(100vh - 70px - 41px); /* taille de la section en retirant aussi la taille du h3 */

	padding: 10px; /* espacer les éléments du carousel */
}

#realisations figure {
	display: flex;
	flex-direction: column;
	align-items: center;
}

#realisations figure > img {
	max-width: 100%;
	max-height: calc(100% - 100px); /* taille de la figure (.carousel-item), en retirant la taille maximale du figcaption */
	object-fit: contain;
	border-radius: 5px;
}

#realisations figcaption {
	text-align: center;
	margin-bottom: 10px;
}

#realisations-container div[id$="-panel"] {
	position: absolute; /* restent fixes par rapport à #realisations-container */
	top: 50%; /* centre verticalement */
	transform: translateY(-50%); /* ajuste pour aligner le centre */
	width: 50px;
	height: 50px;
	z-index: 5; /* au-dessus du carousel mais derrière le header du site */
	cursor: pointer;
}

#left-button-panel {
	left: 10px;
	background: url('../resources/leftArrow.png');
	background-size: contain;
	background-repeat: no-repeat;
}

#right-button-panel {
	right: 10px;
	background: url('../resources/rightArrow.png');
	background-size: contain;
	background-repeat: no-repeat;
}

@media screen and (max-width: 670px) {
	
	.carousel-item {
		flex: 0 0 100%;
		max-width: 100%;
		padding: 20px;
	}
}

@media screen and (max-width: 400px) {	
	#realisations-container div[id$="-panel"] {
		width: 30px;
		height: 30px;
	}

	#left-button-panel {
		left: 0;
	}

	#right-button-panel {
		right: 0;
	}
}
/*************************************
 * section de présentation de Marion *
 *************************************/
#quiSuisJe {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
}

#mainQuiSuisJe-container {
	display: flex;
	justify-content: space-around; /* pour affichage harmonieux */
	margin: 0 20px;
}

@media screen and (max-width: 670px) {
	#mainQuiSuisJe-container {
		flex-direction: column;
		align-items: center;
	}

	#profile-img {
		margin-bottom: 20px;
	}
}

#profile-img-container {
		flex: 30%;
}

#text-container {
		flex: 45%;
}

#profile-img-container, #text-container {
	display: flex;
	justify-content: center;
	align-items: center;
}

#profile-img {
	max-height: 300px;
	width: auto; /* conserver les proportions */
	border-radius: 15px;
}

#text-container {
	margin-right: 20px;
}

#ecritoire-container {
		margin: 30px 0;
}

/**********************
 * section de contact *
 **********************/

#contact {
	font-size: 2em;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.logo-line {
	display: flex; /* affichage en ligne */
	margin-top: 10px;
}

.external-logo {
	height: 1em; /* même taille que le texte */
	width: auto; /* conserver proportion */
	margin-right: 5px;
}

@media screen and (max-height: 550px) {
	#contact {
		height: calc(100vh - 70px);
	}
}

@media screen and (max-width: 670px) {
	#contact {
		align-items: flex-start;
		font-size: 1.7em;
	}
}

@media screen and (max-width: 500px) {
	#contact {
		font-size : 1.4em;
	}
}
