/* WikiMaps - feuille de style du site (HTML, CSS et JavaScript sans dépendance).
   Reprend l'apparence de la version construite avec Blocs (2018-2026). */

/* ------------------------------------------------------------------ Variables */

:root {
	--color-white: #fff;
	--color-black: #000;
	--color-ink: #0f1c29;            /* titre WikiMaps */
	--color-grey: #ccc;              /* texte de la page méthodologique */
	--color-accent: #85acd9;         /* intertitres h3 et h4 */
	--color-blue: #0196d0;           /* bandeaux équipe et licence */
	--color-link: #0d6efd;           /* liens de la page méthodologique */
	--text-on-dark: rgba(255, 255, 255, .7);
	--text-on-light: rgba(0, 0, 0, .5);
	--link-on-dark: rgba(255, 255, 255, .6);
	--link-on-light: rgba(0, 0, 0, .6);
	--caption-background: rgba(0, 0, 0, .6);

	--font-title: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-heading: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-text: Helvetica, "Helvetica Neue", Arial, sans-serif;

	--container-width: 1170px;
	--header-height: 108px;          /* mis à jour par wikimaps.js */
}

/* ------------------------------------------------------------------ Base */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	overflow-x: hidden;
	background: var(--color-white);
	color: #212529;
	font-family: var(--font-text);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

h1,
h2,
h3,
h4 {
	line-height: 1.2;
}

p {
	margin: 10px 0 20px;
}

a {
	color: inherit;
	transition: color .3s ease-in-out;
}

a:hover {
	text-decoration: none;
}

[id] {
	scroll-margin-top: var(--header-height);
}

/* Jeu d'icônes intégré en haut de chaque page (fonctionne aussi en ouvrant le fichier localement). */
.icon-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.icon {
	display: inline-block;
	width: auto;
	height: 1em;
	vertical-align: -.125em;
	fill: currentColor;
}

/* ------------------------------------------------------------------ En-tête et navigation */

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--color-white);
	transition: box-shadow .2s ease-out;
}

.site-header.is-scrolled {
	box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
}

.brand {
	padding: 5px 0;
	color: var(--color-ink);
	font-family: var(--font-title);
	font-size: 55px;
	font-weight: 300;
	line-height: 1.5;
	text-decoration: none;
}

.brand:hover {
	color: var(--color-black);
}

.nav-toggle {
	display: none;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.nav-toggle svg {
	display: block;
	width: 33px;
	height: 33px;
}

.nav-toggle path {
	fill: none;
	stroke: rgba(0, 0, 0, .5);
	stroke-width: 2px;
}

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__link {
	display: block;
	padding: 8px;
	color: var(--link-on-light);
	font-family: var(--font-title);
	font-size: 16px;
	font-weight: 400;
	text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
	color: var(--color-black);
}

/* Lien vers l'autre page : séparé des ancres de la page par un trait discret. */
.site-nav__link--page {
	margin-left: 8px;
	padding-left: 16px;
	border-left: 1px solid rgba(0, 0, 0, .15);
}

@media (max-width: 1099px) {
	.nav-toggle {
		display: block;
	}

	.site-nav {
		display: none;
		flex-basis: 100%;
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav__list {
		flex-direction: column;
		padding-bottom: 8px;
	}

	.site-nav__link--page {
		margin: 4px 0 0;
		padding-left: 8px;
		border-left: 0;
		border-top: 1px solid rgba(0, 0, 0, .15);
	}
}

@media (max-width: 767px) {
	.brand {
		font-size: 50px;
	}
}

/* ------------------------------------------------------------------ Sections */

.section {
	position: relative;
	padding: 0 20px;
}

.section--dark {
	background: var(--color-black);
	color: var(--text-on-dark);
}

.section--light {
	background: var(--color-white);
	color: var(--text-on-light);
}

.section--blue {
	background: var(--color-blue);
	color: var(--color-white);
}

.section__inner {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 50px 0;
}

.section__inner--large {
	padding: 100px 0;
}

.section__inner--small {
	padding: 20px 0;
}

.section--dark a {
	color: var(--link-on-dark);
}

.section--dark a:hover {
	color: var(--color-white);
}

.section--light a {
	color: var(--link-on-light);
}

.section--light a:hover {
	color: var(--color-black);
}

.section-title {
	margin: 10px 0 20px;
	font-family: var(--font-title);
	font-size: 50px;
	font-weight: 300;
}

.section--dark .section-title {
	color: var(--color-white);
}

.section--light .section-title {
	color: var(--color-black);
}

.section-title--small {
	font-size: 32px;
}

@media (max-width: 767px) {
	.section-title {
		font-size: 40px;
	}

	.section-title--small {
		font-size: 32px;
	}
}

/* Repère de version : situe chaque partie dans l'histoire du projet. */
.version-tag {
	display: inline-block;
	position: relative;
	top: -.35em;
	margin-left: .6em;
	padding: .25em .6em;
	border: 1px solid currentColor;
	border-radius: 3px;
	font-family: var(--font-title);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: .06em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: middle;
	opacity: .65;
}

.version-tag--current {
	color: var(--color-accent);
	opacity: 1;
}

.subsection {
	margin-top: 30px;
}

.subsection h3 {
	margin: 10px 0 20px;
	color: var(--color-accent);
	font-family: var(--font-heading);
	font-size: 20px;
	font-weight: 400;
}

.subsection h4 {
	margin: 10px 0 10px;
	color: var(--color-accent);
	font-family: var(--font-heading);
	font-size: 16px;
	font-style: italic;
	font-weight: 400;
}

/* Page principale : texte en Lato. */
.page-home .section p,
.page-home .section li {
	font-family: var(--font-title);
}

/* Page méthodologique : texte gris, liens bleus. */
.page-methods .section--dark {
	color: var(--color-grey);
}

.page-methods .section--dark .section-title {
	font-size: 32px;
}

.page-methods .section--dark p a,
.page-methods .section--dark li a {
	color: var(--color-link);
}

.page-methods .section--dark p a:hover,
.page-methods .section--dark li a:hover {
	color: var(--color-white);
}

/* ------------------------------------------------------------------ Image d'en-tête */

.hero {
	padding: 30px 0 0;
	background: var(--color-black);
}

.hero img {
	display: block;
	width: 100%;
}

/* ------------------------------------------------------------------ Chiffres clés */

.figures {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	text-align: center;
}

.figures__icon {
	font-size: 30px;
}

.figures__title {
	margin: 10px 0 20px;
	color: var(--color-accent);
	font-family: var(--font-heading);
	font-size: 20px;
	font-weight: 400;
}

.figures p {
	margin: 0 0 1rem;
}

@media (max-width: 767px) {
	.figures {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------ Carrousels */

.carousel {
	position: relative;
	margin: 0;
	overflow: hidden;
}

.carousel__slides {
	display: grid;
}

.carousel__slide {
	grid-area: 1 / 1;
	position: relative;
	margin: 0;
	visibility: hidden;
}

.carousel__slide.is-active,
.carousel__slide.is-moving {
	visibility: visible;
}

.carousel__slide img {
	display: block;
	width: 100%;
}

.carousel__caption {
	position: absolute;
	left: 15%;
	right: 15%;
	bottom: 3rem;
	padding: .1rem .5rem;
	background: var(--caption-background);
	color: var(--color-white);
	text-align: center;
}

.page-home .carousel__caption {
	color: var(--color-accent);
	font-family: var(--font-title);
	font-size: 18px;
	font-style: italic;
	font-weight: 300;
}

.page-methods .carousel__caption {
	font-family: var(--font-text);
	font-size: 16px;
}

.carousel__control {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 15%;
	padding: 0;
	border: 0;
	background: none;
	opacity: .5;
	cursor: pointer;
	transition: opacity .15s ease;
}

.carousel__control:hover,
.carousel__control:focus-visible {
	opacity: .9;
}

.carousel__control--prev {
	left: 0;
}

.carousel__control--next {
	right: 0;
}

.carousel__control path {
	fill: none;
	stroke: var(--color-white);
	stroke-width: 2px;
	stroke-linecap: round;
}

.carousel__indicators {
	position: absolute;
	left: 15%;
	right: 15%;
	bottom: 0;
	z-index: 2;
	display: flex;
	justify-content: center;
	margin: 0 0 1rem;
}

.carousel__indicator {
	flex: 0 1 30px;
	min-width: 6px;
	height: 3px;
	box-sizing: content-box;
	margin: 0 3px;
	padding: 0;
	border: 0;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	background: var(--color-white);
	background-clip: padding-box;
	opacity: .5;
	cursor: pointer;
	transition: opacity .6s ease;
}

.carousel__indicator[aria-current="true"] {
	opacity: 1;
}

@media (max-width: 767px) {
	.carousel__caption {
		left: 8%;
		right: 8%;
		bottom: 2.25rem;
	}

	.page-home .carousel__caption,
	.page-methods .carousel__caption {
		font-size: 14px;
	}
}

/* Sur téléphone, légende et puces passent sous l'image pour ne pas la masquer. */
@media (max-width: 575px) {
	.carousel__caption {
		position: static;
		padding: .5rem 0 0;
		background: none;
		color: inherit;
	}

	.carousel__indicators {
		position: static;
		margin: .5rem 15% 0;
	}

	.carousel__indicator {
		background-color: currentColor;
	}
}

/* ------------------------------------------------------------------ Comparaisons (curseur avant / après) */

.compare {
	margin: 0;
}

.compare__frame {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.compare__frame img-comparison-slider {
	display: block;
	width: 100%;
	min-height: 200px;
	--divider-width: 2px;
	--divider-color: #fff;
	--divider-shadow: 0 0 6px rgba(0, 0, 0, .4);
	--default-handle-width: 50px;
	--default-handle-color: #fff;
	--default-handle-shadow: 0 0 8px rgba(0, 0, 0, .5);
}

.compare__frame img {
	display: block;
	width: 100%;
}

.compare__label {
	position: absolute;
	top: 50%;
	z-index: 3;
	padding: 4px 12px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .5);
	color: var(--color-white);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	transform: translateY(-50%);
	pointer-events: none;
}

.compare__label--left {
	left: 12px;
}

.compare__label--right {
	right: 12px;
}

.compare__captions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-top: 1rem;
}

.compare__captions p {
	margin: 0 0 1rem;
}

@media (min-width: 992px) {
	.compare__captions p {
		text-align: center;
	}
}

/* ------------------------------------------------------------------ Page méthodologique : éléments de contenu */

.quote {
	margin: 0 0 1rem;
	padding: 0 20px;
	border-left: 2px solid currentColor;
	font-size: 20px;
}

.quote p {
	margin: 10px 0 10px;
}

.note {
	margin: 10px 0 30px;
	padding: 0 20px;
	border-left: 2px solid var(--color-accent);
}

.note p {
	margin: 0;
}

.figure-image {
	display: block;
	max-width: 100%;
	margin: 0 auto 30px;
}

.figure-caption {
	text-align: center;
}

.curves {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-around;
	gap: 24px;
}

.curves .figure-image {
	flex: 0 1 auto;
	margin: 0 0 10px;
}

.case {
	margin-top: 30px;
}

.facts {
	margin: 10px 0 20px;
	padding-left: 1.25rem;
}

.facts li {
	margin-bottom: .35rem;
}

/* ------------------------------------------------------------------ Vidéo */

.video {
	position: relative;
	aspect-ratio: 16 / 9;
}

.video iframe,
.video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ------------------------------------------------------------------ Équipe */

.team {
	color: var(--color-white);
}

.team__title {
	margin: 0;
	color: var(--color-white);
	font-family: var(--font-title);
	font-size: 50px;
	font-weight: 300;
	text-align: center;
}

.team__subtitle,
.team__thanks,
.team__member p {
	font-family: var(--font-title);
	font-size: 18px;
	font-weight: 300;
}

.team__subtitle {
	margin: 0 0 1rem;
	text-align: center;
}

.team__members {
	display: grid;
	grid-template-columns: 1fr 2fr 1fr 2fr;
	gap: 24px;
	margin-top: 80px;
}

.team__avatar {
	display: block;
	width: 150px;
	height: 150px;
	margin: 0 auto;
	border-radius: 50%;
}

.team__name {
	margin: 0 0 .5rem;
	color: var(--color-white);
	font-family: var(--font-title);
	font-size: 30px;
	font-weight: 300;
}

.team__member p {
	margin: 0 0 20px;
}

.team__member .team__link {
	margin: 10px 0 30px;
}

.team .team__link a {
	color: var(--color-white);
}

.team .team__link a:hover {
	color: var(--color-grey);
}

.team__link .icon {
	font-size: 18px;
}

.team__past {
	margin: 0;
	color: var(--color-white);
	font-family: var(--font-title);
	font-size: 30px;
	font-weight: 300;
	text-align: center;
}

.team__thanks {
	margin: 0 0 1rem;
}

@media (min-width: 992px) {
	.team__thanks {
		text-align: center;
	}
}

@media (max-width: 767px) {
	.team__title {
		font-size: 40px;
	}

	.team__members {
		grid-template-columns: 1fr;
		margin-top: 30px;
		text-align: center;
	}

	.team__name,
	.team__past {
		font-size: 26px;
	}

	.team__subtitle,
	.team__thanks,
	.team__member p {
		font-size: 16px;
	}
}

/* ------------------------------------------------------------------ Partenaires et licence */

.partners {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	align-items: start;
}

.partners + .partners {
	margin-top: 30px;
}

.partners img {
	display: block;
	margin: 10px auto 30px;
}

.partners .partners__wide {
	width: 206px;
}

.license img {
	display: block;
	margin: 0 auto;
}

@media (max-width: 767px) {
	.partners {
		grid-template-columns: 1fr;
	}

	.partners + .partners {
		margin-top: 5px;
	}
}

@media (max-width: 575px) {
	.partners .partners__wide {
		width: 180px;
	}
}

/* ------------------------------------------------------------------ Retour en haut */

.scroll-top {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 999;
	width: 36px;
	height: 36px;
	padding: 5px;
	border: 0;
	border-radius: 6px;
	background: rgba(0, 0, 0, .3);
	opacity: 0;
	cursor: pointer;
	pointer-events: none;
	transition: opacity .3s ease-in-out;
}

.scroll-top.is-visible {
	opacity: 1;
	pointer-events: auto;
}

.scroll-top path {
	fill: none;
	stroke: var(--color-white);
	stroke-width: 2px;
	stroke-linecap: round;
}
