/* Home Cap Bourbon (sous-site 2) — enqueue conditionnel dans functions.php (is_cap_bourbon_home()). Mobile-first, points de rupture du thème : 768 / 992 / 1200. */

.home-cap-bourbon {
	--cb-bleu-nuit: #132F6B;
	--cb-arc:       10.3vw;                      /* flèche du dôme : 198 px à 1920 sur la maquette */
	--cb-dome-r:    126.5vw;                     /* rayon du cercle du dôme */
	--cb-gutter:    48px;                        /* couloir central où passe le tracé */
	--cb-img:       clamp(150px, 42vw, 290px);   /* côté des photos */
	--cb-text-w:    500px;
	--cb-row-gap:   56px;
	--cb-label-gap: 8px;                         /* entre la photo et sa pilule */
	--cb-pad-top:   40px;                        /* entre le dôme et la première photo */
	--cb-map-scale: 1.12;                        /* 1 = viewBox de planisphere-trajet.svg ; 1,12 = échelle de la maquette */

	/* Centre du marqueur de l'étape 1 : dôme + espace + photo + 53 px (pilule 72 + espace 8 − remontée du marqueur 27) */
	--cb-anchor1-y: calc(var(--cb-arc) + var(--cb-pad-top) + var(--cb-img) + 53px);
}

@media (min-width: 768px)  { .home-cap-bourbon { --cb-gutter: 90px; --cb-row-gap: 40px; } }
@media (min-width: 992px)  { .home-cap-bourbon { --cb-pad-top: 70px; } }
@media (min-width: 1200px) { .home-cap-bourbon { --cb-gutter: 140px; --cb-row-gap: 20px; } }

/* Accès rapides : [pastille][tiret] par colonne, le tiret déborde de la gouttière jusqu'à la pastille suivante */

.home-cap-bourbon .acces-col {
	display: flex;
	align-items: center;
}

.home-cap-bourbon .acces-col .item-acces {
	flex: 0 0 auto;
	width: min(180px, 100%);
}

.home-cap-bourbon .acces-link {
	flex: 1 1 auto;
	height: 1px;
	margin-right: calc(-1 * var(--bs-gutter-x, 1.5rem));
	background-color: #02BAFF;
}

@media (max-width: 767.98px) {
	.home-cap-bourbon .acces-col:nth-child(3n) .acces-link { display: none; } /* 3 par rangée : pas de tiret en bout */
}

/* Section trajet — z-index : 1 planisphère, 2 tracé, 3 contenu, 4 creux du bas */

.trajet {
	position: relative;
	isolation: isolate;
	margin-top: 40px;
	padding: calc(var(--cb-arc) + var(--cb-pad-top)) 0 120px;
	color: #fff;
	overflow: hidden;
	background: linear-gradient(var(--cb-bleu-nuit), var(--cb-bleu-nuit)) no-repeat 0 var(--cb-arc) / 100% calc(100% - var(--cb-arc));
}

/* Le dôme : un disque tangent au haut de la section */
.trajet::before {
	content: "";
	position: absolute;
	z-index: 0;
	top: 0;
	left: 50%;
	width: calc(var(--cb-dome-r) * 2);
	aspect-ratio: 1 / 1;
	transform: translateX(-50%);
	border-radius: 50%;
	background-color: var(--cb-bleu-nuit);
}

@media (min-width: 992px) {
	.trajet {
		margin-top: 80px;
		padding-bottom: 180px;
	}
}

/* Planisphère à taille fixe, centré sur l'axe et calé pour que La Réunion (1414, 1173 dans le SVG,
   soit 282 à droite du centre) tombe sous le marqueur de l'étape 1. Rogné sur le cercle du dôme. */
.trajet__map {
	position: absolute;
	z-index: 1;
	top: 0;
	left: 0;
	right: 0;
	height: 1100px;
	pointer-events: none;
	clip-path: circle(var(--cb-dome-r) at 50% var(--cb-dome-r));
	background: url("../images/planisphere-trajet.svg") no-repeat
		calc(50% - 282px * var(--cb-map-scale))
		calc(var(--cb-anchor1-y) - 1173px * var(--cb-map-scale))
		/ calc(2262.8px * var(--cb-map-scale)) auto;
	opacity: .55;
	-webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
	        mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

.trajet__svg {
	position: absolute;
	z-index: 2;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}

/* Grille des étapes : [visuels/textes] [couloir] [visuels/textes]. Largeur donnée par le .container du thème. */

.trajet > .container {
	position: relative;
	z-index: 3;
}

.trajet__steps {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--cb-gutter) minmax(0, 1fr);
	row-gap: var(--cb-row-gap);
}

.trajet__step {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: subgrid;
	grid-template-rows: auto auto;
	align-items: start;
}

/* Ancre : point de passage du tracé, mesuré par le JS, au centre du couloir au niveau de la pilule */
.trajet__anchor {
	grid-column: 2;
	grid-row: 1;
	align-self: end;
	justify-self: center;
	width: 0;
	height: 0;
}

.trajet__figure {
	grid-row: 1;
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(var(--cb-img), 100%);
	margin: 0;
}

.trajet__step[data-side="left"]  .trajet__figure { grid-column: 1; justify-self: end; }
.trajet__step[data-side="right"] .trajet__figure { grid-column: 3; justify-self: start; }

.trajet__figure img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* La goutte : un coin carré (ordre TL TR BR BL), la pilule s'y accroche avec son propre coin carré */
.trajet [data-corner="br"] img { border-radius: 50% 50% 0   50%; }
.trajet [data-corner="bl"] img { border-radius: 50% 50% 50% 0;   }
.trajet [data-corner="tr"] img { border-radius: 50% 0   50% 50%; }
.trajet [data-corner="tl"] img { border-radius: 0   50% 50% 50%; }

.trajet__label {
	position: relative;
	z-index: 1;
	width: min(236px, 100%);
	padding: 16px 22px;
	border-radius: 20px;
	background-color: rgba(140, 185, 255, .28); /* voile clair + verre dépoli = #395591 de la maquette, carte visible au travers */
	-webkit-backdrop-filter: blur(8px);
	        backdrop-filter: blur(8px);
	font-family: 'Maven Pro', sans-serif;
	font-size: .95rem;
	line-height: 1.3;
	color: #fff;
}

.trajet__label strong { font-weight: 700; }

.trajet__step[data-side="left"] .trajet__label,
.trajet__end .trajet__label { text-align: right; } /* le texte regarde vers l'axe */

.trajet [data-corner="br"] .trajet__label,
.trajet [data-corner="tr"] .trajet__label { align-self: flex-end; }
.trajet [data-corner="bl"] .trajet__label,
.trajet [data-corner="tl"] .trajet__label { align-self: flex-start; }
.trajet [data-corner="br"] .trajet__label,
.trajet [data-corner="bl"] .trajet__label { margin-top: var(--cb-label-gap); }
.trajet [data-corner="tr"] .trajet__label,
.trajet [data-corner="tl"] .trajet__label { order: -1; margin-bottom: var(--cb-label-gap); }
.trajet [data-corner="br"] .trajet__label { border-top-right-radius: 0; }
.trajet [data-corner="bl"] .trajet__label { border-top-left-radius: 0; }
.trajet [data-corner="tr"] .trajet__label { border-bottom-right-radius: 0; }
.trajet [data-corner="tl"] .trajet__label { border-bottom-left-radius: 0; }

/* Marqueur de l'étape 1 (même dessin que les points du SVG des îles) et libellés d'îles */

.trajet__marker {
	grid-column: 2;
	grid-row: 1;
	align-self: end;
	justify-self: start;
	margin: 0 0 14px calc(50% - 13px);
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.trajet__dot {
	position: relative;
	display: grid;
	place-items: center;
	flex: none;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid #fff;
	background:
		radial-gradient(circle at center, rgba(255, 255, 255, .55) 0, rgba(255, 255, 255, .12) 38%, rgba(255, 255, 255, 0) 75%),
		rgba(0, 49, 160, .48);
}

.trajet__dot::before {
	content: "";
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: #fff;
}

/* Le tracé part du centre du point (grid-* à auto : un enfant absolu d'une grille se cale sinon sur sa zone) */
.trajet__dot .trajet__anchor {
	position: absolute;
	grid-column: auto;
	grid-row: auto;
	top: 50%;
	left: 50%;
}

.trajet__marker-label,
.trajet__island {
	font-family: 'Maven Pro', sans-serif;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .15em;
	text-transform: uppercase;
	white-space: nowrap;
}

.trajet__text {
	grid-column: 1 / -1;
	grid-row: 2;
	margin-top: 28px;
	font-weight: 300;
	font-size: 1rem;
	line-height: 1.85;
}

.trajet__text p { margin: 0; }
.trajet__text p + p { margin-top: .8em; }
.trajet__text strong { font-weight: 700; }

/* Étapes 5 et 6 de part et d'autre du bloc des îles */

.trajet__pair { display: contents; }

.trajet__islands {
	grid-column: 1 / -1;
	position: relative;
	width: min(100%, 340px);
	aspect-ratio: 681.554 / 677.161;
	justify-self: center;
}

.trajet__islands .trajet__anchor {
	position: absolute;
	top: 7.3%; /* fin du tracé : la ride juste à gauche du point Amsterdam */
	left: 50%;
}

.trajet__ripples,
.trajet__ripples svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}

.trajet__island {
	position: absolute;
	left: calc(var(--x) + 16px);
	top: var(--y);
	transform: translateY(-50%);
}

/* Arrivée (7e ligne) : photo bord droit sur l'axe, pilule au-dessus et texte dessous si renseignés */

.trajet__end {
	grid-column: 1 / -1;
	position: relative;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	margin: 0;
}

.trajet__end .trajet__figure { margin-right: 50%; }

.trajet__end .trajet__text {
	width: 100%;
	margin-top: 24px;
}

/* Desktop : les étapes se fondent dans la grille et chaque élément prend sa ligne, entrelacées comme la maquette :
   1 photo1 | — · 2 texte1 | photo2 · 3 — | texte2 · 4 texte3 | photo3 · 5 photo4 | texte4 · 6 étape5 | îles | étape6 · 7 arrivée */

@media (min-width: 768px) {
	.trajet__step { display: contents; }

	.trajet__text {
		max-width: var(--cb-text-w);
		margin-top: 0;
	}

	.trajet__step[data-step="1"] .trajet__text   { grid-column: 1; grid-row: 2; justify-self: end; text-align: right; }
	.trajet__step[data-step="2"] .trajet__figure { grid-row: 2; margin-top: -24px; } /* remontée vers la pilule 1, sous le libellé du marqueur */
	.trajet__step[data-step="2"] .trajet__anchor { grid-row: 2; }
	.trajet__step[data-step="2"] .trajet__text   { grid-column: 3; grid-row: 3; justify-self: start; }
	.trajet__step[data-step="3"] .trajet__figure { grid-row: 4; }
	.trajet__step[data-step="3"] .trajet__anchor { grid-row: 4; }
	.trajet__step[data-step="3"] .trajet__text   { grid-column: 1; grid-row: 4; justify-self: end; align-self: end; text-align: right; }
	.trajet__step[data-step="4"] .trajet__figure { grid-row: 5; }
	.trajet__step[data-step="4"] .trajet__anchor { grid-row: 5; }
	.trajet__step[data-step="4"] .trajet__text   { grid-column: 3; grid-row: 5; justify-self: start; align-self: center; }

	.trajet__pair > .trajet__step {
		display: flex;
		flex-direction: column;
		grid-row: 6;
	}

	.trajet__pair > .trajet__step .trajet__text { margin-top: 24px; }

	.trajet__pair > .trajet__step[data-side="left"] {
		grid-column: 1;
		align-items: flex-end;
		padding-right: clamp(0px, 8vw, 120px);
	}

	.trajet__pair > .trajet__step[data-side="right"] {
		grid-column: 3;
		align-items: flex-start;
		padding-left: clamp(0px, 8vw, 120px);
		margin-top: 55px;
	}

	.trajet__islands {
		grid-column: 2;
		grid-row: 6;
		width: clamp(340px, 42vw, 600px);
	}

	.trajet__end {
		grid-column: 1 / 3;
		grid-row: 7;
		justify-self: end;
		max-width: var(--cb-text-w);
		margin: -80px calc(var(--cb-gutter) / 2) 0 0; /* moins un demi-couloir : bord droit sur l'axe */
	}

	.trajet__end .trajet__figure { margin-right: 0; }
	.trajet__end .trajet__text   { text-align: right; }

	.trajet:has(.trajet__end .trajet__text) { padding-bottom: 260px; }
}

@media (min-width: 992px) {
	.trajet__end { margin-bottom: -20px; }
}

/* Creux du bas */

.trajet__wave {
	position: absolute;
	z-index: 4;
	left: 0;
	right: 0;
	bottom: -1px; /* évite un liseré bleu subpixel */
	line-height: 0;
	pointer-events: none;
}

.trajet__wave svg {
	display: block;
	width: 100%;
	height: auto;
}

.trajet__wave path { fill: #fff; }

/* Apparitions pilotées par trajet.js : tout est visible par défaut, .trajet--anim masque jusqu'à .is-visible.
   On anime les enfants, jamais l'étape ni le marqueur, pour que l'ancre reste mesurable à sa vraie position. */

.trajet--anim .trajet__step > :not(.trajet__anchor),
.trajet--anim .trajet__islands > :not(.trajet__anchor),
.trajet--anim .trajet__end > * {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}

.trajet--anim .is-visible > :not(.trajet__anchor) {
	opacity: 1;
	transform: none;
}

.trajet--anim .trajet__step > .trajet__marker { transform: none; }

.trajet--anim .trajet__pair > .trajet__step[data-side="right"] > :not(.trajet__anchor) { transition-delay: .2s; }

.trajet__head { transition: opacity .3s; }

@media (prefers-reduced-motion: reduce) {
	.trajet--anim .trajet__step > :not(.trajet__anchor),
	.trajet--anim .trajet__islands > :not(.trajet__anchor),
	.trajet--anim .trajet__end > * {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Section « Engagée pour une pêche durable » */

.peche {
	padding: 60px 0 40px;
	text-align: center;
	color: var(--text-color);
}

.peche__inner {
	max-width: 1180px;
	margin-inline: auto;
}

.peche__title {
	margin-bottom: 24px;
	font-size: 1.5rem;
	font-weight: 400;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--secondary-color);
}

.peche__title strong { font-weight: 700; }

.peche__intro {
	max-width: 1080px;
	margin: 0 auto;
	font-size: 1.125rem;
	font-weight: 300;
	line-height: 1.75;
}

.peche__cols {
	display: grid;
	gap: 40px;
	text-align: left;
}

.peche__col h3 {
	margin-bottom: 20px;
	font-family: 'Roboto', sans-serif;
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--secondary-color);
}

.peche__col p {
	margin: 0;
	font-weight: 300;
	line-height: 2;
}

@media (min-width: 768px) {
	.peche { padding: 130px 0 80px; }
	.peche__title { margin-bottom: 40px; font-size: 1.875rem; }
	.peche__cols { grid-template-columns: 1fr 1fr; gap: 64px; }
}

/* Hero : picto « 974 » à gauche du titre (maquette : 60 px de large, 28 px avant le H1) */

.home-cap-bourbon .cb-titre {
	display: flex;
	align-items: flex-start;
	gap: 28px;
}

.home-cap-bourbon .cb-titre__picto {
	flex: none;
	width: 60px;
	height: auto;
	margin-top: -6px;
}

/* Partenaires : 3 logos encadrés + légende, cliquables */

.partenaires { padding-bottom: 60px; }

.partenaires__list {
	display: grid;
	gap: 40px 22px;
	max-width: 1224px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.partenaires__item {
	width: 100%;
	max-width: 394px;
	margin: 0 auto;
	text-align: center;
}

.partenaires__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.partenaires__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 232px;
	padding: 30px;
	border: 1px solid #707070;
	background: #fff;
	transition: border-color .25s;
}

a.partenaires__link:hover .partenaires__logo,
a.partenaires__link:focus-visible .partenaires__logo { border-color: var(--secondary-color); }

.partenaires__logo img {
	width: auto;
	height: auto;
	max-width: min(100%, 240px);
	max-height: 170px;
}

.partenaires__text {
	margin: 29px 0 0;
	padding: 0 11px;
	font-size: .875rem;
	font-weight: 300;
	line-height: 22px;
	color: var(--text-color);
}

@media (min-width: 768px) {
	.partenaires { padding-bottom: 0; }
	.partenaires__list { grid-template-columns: repeat(3, 1fr); }
}

/* Liens en avant (Traçabilité / Recettes) : cartes avec picto en médaillon débordant en haut, titre, bouton */

.liens { padding-top: 40px; }

.liens__grid {
	display: grid;
	gap: 25px;
	max-width: 1224px;
	margin: 0 auto;
}

.liens__carte {
	position: relative;
	margin-top: 44px;
	padding: 66px 20px 42px;
	text-align: center;
	background: #EBEFF9;
	color: #14306C;
}

.liens__carte--sombre {
	background: #14306C;
	color: #fff;
}

.liens__picto {
	position: absolute;
	top: -44px;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 110px;
	height: 110px;
	transform: translateX(-50%);
	border: 2px solid #14306C;
	border-radius: 50%;
	background: #fff;
}

.liens__picto img {
	width: auto;
	height: auto;
	max-width: 60px;
	max-height: 60px;
}

.liens__title {
	margin: 24px 0;
	font-family: 'Maven Pro', sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: inherit;
}

.liens__carte .btn-color-2 { margin: 0 auto; }

@media (min-width: 768px) {
	.liens { padding-top: 90px; }
	.liens__grid { grid-template-columns: 1fr 1fr; }
}

/* Bloc actualités / offres (markup du thème) */

.home-cap-bourbon .bloc-actualites { padding-top: 60px; }

@media (min-width: 992px) {
	.home-cap-bourbon .bloc-actualites { padding-top: 130px; }
}
