/*
 * UTRAV Premium 1.4.6 : finition visuelle (chargée après utrav.min.css).
 * Uniquement de la mise en forme : aucun texte, lien, balise SEO ni formulaire n'est modifié.
 * Couleurs, logo et polices : ceux du thème (violet #765BA8, violet profond #231A3A, jaune #F7DD09,
 * Red Hat Display / Red Hat Text). Retour à la 1.4.3.1 : filtre utrav_theme_finition à false.
 */

/* 1. Rythme vertical : les sections prennent la hauteur de leur contenu (plus d'écrans à moitié vides). */
:root { --fin-pad: clamp(56px, 7vw, 104px); --fin-gap: clamp(32px, 4vw, 56px); }
main > :is(section, .section):not(.hero, .section--hero, .hero-monde),
footer.closing {
	height: auto !important;
	min-height: 0 !important;
	padding-top: var(--fin-pad);
	padding-bottom: var(--fin-pad);
}
main > :is(section, .section):not(.hero, .section--hero, .hero-monde) > :is(.wrap, .container),
footer.closing > .wrap { height: auto; }
main > :is(section, .section).g2 > :is(.wrap, .container),
footer.closing.g2 > .wrap { display: flex; flex-direction: column; row-gap: var(--fin-gap); }
main > :is(section, .section):not(.hero, .section--hero, .hero-monde) .fill,
main > :is(section, .section):not(.hero, .section--hero, .hero-monde) .group { flex: none; }
main > section.section--list { min-height: 0 !important; }
/* Deux sections claires qui se suivent : un seul espace, pas deux. */
main > section.section:not(.ground-inverse):not(.hero-monde) + section.section:not(.ground-inverse) { padding-top: calc(var(--fin-pad) * .55); }

/* 2. Cadres photo et cartes dans les blocs « texte + visuel » : proportion fixe, plus de hauteur écran. */
main .grid.fill { align-items: stretch; }
main .frame.frame--fill { width: 100%; max-width: 100%; height: auto !important; min-height: 0; aspect-ratio: 4 / 3; align-self: start; }
@media (min-width: 1024px) {
	main .grid.fill > .frame.frame--fill { aspect-ratio: auto; align-self: stretch; min-height: 440px; max-height: 640px; }
}
main .frame.frame--fill > img { width: 100%; height: 100%; object-fit: cover; }
.agences-map > img.media__map { object-position: 62% 32%; }

/* 3. Cartes de départs et de destinations : photo pleine, même hauteur par rangée, jamais de vide gris. */
.tile__media { overflow: clip; background: var(--p-surface); }
.tile__media { position: relative; }
.tile__media > picture { position: absolute; inset: 0; display: block; }
.tile__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tiles-grid { align-items: start; row-gap: var(--fin-gap); }
@media (min-width: 1024px) {
	#departs .tiles-grid > .tile > .tile__media,
	#departs .tiles-grid--flip > .tile > .tile__media,
	#departs .tiles-grid--flip > a.tile.tile--lead > .tile__media { height: clamp(260px, 24vw, 340px) !important; min-height: 0 !important; aspect-ratio: auto !important; flex: none !important; }
	.dest-cards > .tile > .tile__media { height: clamp(280px, 26vw, 380px) !important; aspect-ratio: auto !important; }
}
@media (hover: hover) and (pointer: fine) { a.tile:hover .tile__media img { transform: scale(1.03); } }
.tile__media img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) { .tile__media img { transition: none; } a.tile:hover .tile__media img { transform: none; } }
.tile__foot { margin-top: auto; }
.tile .tile__head h3, .tile .tile__head h2 { text-wrap: balance; }

/* Mobile : vignette des listes = carré plein, sans bande grise dessous. */
@media (max-width: 639px) {
	#departs .grid > .tile.tile--lead > .tile__media,
	#departs .grid > .tile > .tile__media { aspect-ratio: 1 / 1; height: auto !important; min-height: 0 !important; align-self: start; border-radius: var(--r-md); }
	#departs .grid > .tile.tile--lead { --tile-ratio: 16 / 9; }
	#departs .grid > .tile.tile--lead > .tile__media { aspect-ratio: 16 / 9 !important; }
	#departs .grid > .tile > .tile__media { width: 100%; }
}

/* 4. Textes longs (destinations, Omra, agences, guides) : titres respirés, lignes lisibles. */
main .prose.page-content { font-size: 1.0625rem; line-height: 1.72; }
main .prose.page-content > * { max-width: 68ch; }
main .prose.page-content > p, main .prose.page-content > ul, main .prose.page-content > ol { margin-top: 0; margin-bottom: 1em; }
main .prose.page-content > h2 { margin-bottom: .5em !important; }
main .prose.page-content > h2:not(:first-child) { font-size: clamp(1.625rem, 2.4vw, 2.125rem); margin-top: clamp(40px, 5vw, 64px); margin-bottom: .45em; line-height: 1.12; text-wrap: balance; }
main .prose.page-content > h3 { margin-top: 1.8em !important; margin-bottom: .35em !important; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: var(--p-ink); }
main .prose.page-content > h2 + p, main .prose.page-content > h3 + p { margin-top: 0; }
main .prose.page-content > ul, main .prose.page-content > ol { padding-inline-start: 1.25em; }
main .prose.page-content > ul > li, main .prose.page-content > ol > li { margin-bottom: .35em; padding-inline-start: .2em; }
main .prose.page-content > ul > li::marker { color: var(--p-accent); }
main .prose.page-content a { text-underline-offset: .2em; }
main .prose-split { row-gap: var(--fin-gap); }

/* 5. Bandeau final « Un projet de voyage ? » : vrai bouton (violet devis validé), plus de barre pleine largeur. */
.closing__cta { padding-bottom: clamp(40px, 5vw, 64px); }
.closing__cta .btn.btn--primary {
	width: auto; align-self: flex-start; justify-self: start; min-height: 52px; padding-inline: 28px;
	font-weight: 600;
}
.closing__cta .btn.btn--primary:active { transform: translateY(1px); }

/* 6. Pied de page : logo officiel en couleurs sur plaque blanche (au lieu d'une silhouette blanche), textes lisibles. */
.footer .footer__logo {
	filter: none; height: 48px; width: auto; box-sizing: content-box;
	padding: 8px 14px; background: #ffffff; border-radius: 12px;
}
.footer .footer__col li, .footer .footer__col p, .footer .footer__col address { color: var(--p-inv-muted); }
.footer .footer__col a, .footer .menu a, .footer .stack-4 a { color: var(--p-inv-ink); text-underline-offset: .2em; }
.footer .footer__col a:hover, .footer .menu a:hover, .footer .stack-4 a:hover { color: var(--p-inv-accent); }
.footer :is(.footer__col, .menu) li + li { margin-top: 6px; }

/* 7. Bandeau de réassurance sous le Hero : lisible sur mobile. */
.hero-monde__trust li { font-size: .9375rem; }
@media (max-width: 639px) { .hero-monde__trust li { font-size: .875rem; } }

/* 8. Cibles tactiles ≥ 44 px pour les liens d'action. */
.link { min-height: 44px; display: inline-flex; align-items: center; }
.agency__links { display: flex; flex-wrap: wrap; column-gap: 20px; }

/* 9. Tablette (640–1023 px) : destinations en deux colonnes égales, carte et devis type à leur taille. */
@media (min-width: 640px) and (max-width: 1023px) {
	.dest-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.dest-cards > .tile { grid-column: auto !important; }
	.dest-cards > .tile.tile--dest-wide { grid-column: 1 / -1 !important; }
	.dest-cards > .tile.tile--portrait > .tile__media { aspect-ratio: 4 / 5 !important; height: auto !important; }
}
@media (max-width: 1023px) {
	main .frame.frame--fill:not(.quote-frame) { flex: none !important; aspect-ratio: 4 / 3 !important; height: auto !important; min-height: 0 !important; }
	main .agences-map, main .frame.frame--fill.agences-map { flex: none !important; aspect-ratio: 4 / 3 !important; height: auto !important; min-height: 0 !important; }
	.agences-map > img.media__map { object-position: 60% 35%; }
	main .quote-frame.frame--fill { flex: none !important; min-height: 0 !important; aspect-ratio: auto !important; height: auto !important; padding-block: clamp(24px, 5vw, 48px); }
}

/* 10. Pages simples (Qui sommes-nous, CGV, mentions) : colonne de lecture limitée à 68 caractères. */
main .page-content > :is(p, ul, ol, h2, h3, h4, blockquote) { max-width: 68ch; }
main .page-content > :is(ul, ol) > li + li { margin-top: .35em; }
