/*
Theme Name:   Voyage Globe
Description:  Thème de carnet de voyage conçu pour le plugin Travel Globe : page d'accueil avec globe plein écran, bannières de destination avec parallaxe et barre de progression de lecture.
Version:      1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Author:       Voyage Globe
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  voyage-globe
Tags:         blog, custom-logo, custom-menu, featured-images, one-column, translation-ready
*/

/* ==========================================================================
   Base
   ========================================================================== */

:root {
	--vg-ink: #1d1f24;
	--vg-muted: #6b7078;
	--vg-line: #e6e7e9;
	--vg-bg: #ffffff;
	--vg-accent: #1d1f24;
	--vg-header-height: 72px;
	--vg-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--tg-font: var(--vg-font);
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--vg-bg);
	color: var(--vg-ink);
	font-family: var(--vg-font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100001;
	width: auto;
	height: auto;
	margin: 0;
	padding: 10px 16px;
	clip: auto;
	background: #fff;
	color: var(--vg-ink);
}

/* ==========================================================================
   Logo (en haut à gauche) et pied de page
   ========================================================================== */

.site-header {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1000;
	padding: clamp(14px, 2vw, 28px) clamp(16px, 3vw, 36px);
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 0px);
}

.site-branding .custom-logo-link {
	display: block;
	line-height: 0;
}

.site-branding .custom-logo {
	display: block;
	width: auto;
	max-height: 44px;
}

.site-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.site-title a {
	text-decoration: none;
}

/* Pages courantes : on réserve la place du logo. */
body:not(.tg-front):not(.tg-single-destination) .site-main {
	padding-top: 90px;
}

/* Sur le globe et sur la bannière (fonds sombres) : logo et titre en blanc. */
.tg-front .site-title a,
.tg-single-destination .site-title a {
	color: #fff;
}

.tg-front .custom-logo,
.tg-single-destination .custom-logo {
	filter: brightness(0) invert(1) drop-shadow(0 1px 8px rgba(0, 0, 0, 0.35));
}

.site-footer {
	padding: 28px clamp(16px, 3vw, 36px);
	color: var(--vg-muted);
	font-size: 14px;
	text-align: center;
}

.site-footer p {
	margin: 0;
}

/* ==========================================================================
   Page d'accueil : le globe occupe tout l'écran
   ========================================================================== */

.tg-front #page {
	position: relative;
	height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
	overflow: hidden;
}

.site-main--globe {
	position: absolute;
	inset: 0;
}

.site-main--globe .travel-globe-wrapper {
	height: 100%;
	min-height: 0;
}

/* Texte de copyright en blanc, posé en bas du globe. */
.tg-front .site-footer {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	padding: 12px 16px;
	color: #fff;
	font-size: 13px;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
	pointer-events: none;
	transition: opacity 0.25s ease;
}

/* Quand une fiche est ouverte, le texte s'efface pour ne pas la recouvrir. */
.tg-front #page:has(.travel-globe-panel-open) .site-footer {
	opacity: 0;
}

.tg-front-notice {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 24px;
	text-align: center;
	color: var(--vg-muted);
}

/* ==========================================================================
   Page destination : bannière, progression, contenu
   ========================================================================== */

#scroll-progress-bar {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100001;
	width: 0;
	height: 4px;
	background: var(--vg-accent);
}

.admin-bar #scroll-progress-bar {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.destination-hero {
	position: relative;
	width: 100%;
	height: 85vh;
	min-height: 420px;
	overflow: hidden;
	background: #20242b;
}

.destination-hero-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 120%;
	object-fit: cover;
	will-change: transform;
}

.destination-hero-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 55%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
}

.destination-hero-text {
	position: absolute;
	bottom: 8%;
	left: 8%;
	right: 8%;
	z-index: 2;
	color: #fff;
}

.destination-hero-title {
	margin: 0 0 12px;
	font-size: clamp(36px, 6vw, 64px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.destination-hero-resume {
	max-width: 600px;
	margin: 0 0 8px;
	font-size: 18px;
	line-height: 1.5;
}

.destination-hero-date {
	margin: 0;
	font-size: 14px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	opacity: 0.85;
}

.destination-content {
	max-width: 800px;
	margin: 0 auto;
	padding: 60px 25px;
}

.destination-content img {
	border-radius: 0;
}

.destination-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 48px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.destination-back:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Contenu éditorial (pages, articles, éditeur de blocs)
   ========================================================================== */

.entry {
	max-width: 760px;
	margin: 0 auto;
	padding: clamp(32px, 6vw, 72px) 25px;
}

.entry-title {
	margin: 0 0 24px;
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.entry-title a {
	text-decoration: none;
}

.entry-content > *:first-child { margin-top: 0; }

.entry-content h2,
.entry-content h3,
.destination-content h2,
.destination-content h3 {
	margin: 2em 0 0.6em;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.entry-content figure,
.destination-content figure {
	margin: 2em 0;
}

.entry-content figcaption,
.destination-content figcaption {
	margin-top: 8px;
	color: var(--vg-muted);
	font-size: 14px;
}

.entry-content blockquote,
.destination-content blockquote {
	margin: 2em 0;
	padding-left: 20px;
	border-left: 3px solid var(--vg-ink);
	font-size: 1.15em;
}

.alignwide {
	width: min(1100px, 100vw - 50px);
	margin-left: 50%;
	transform: translateX(-50%);
}

.alignfull {
	width: 100vw;
	margin-left: 50%;
	transform: translateX(-50%);
}

.pagination,
.navigation.pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 40px;
}

/* ==========================================================================
   Liste des destinations
   ========================================================================== */

.archive-header {
	max-width: 1100px;
	margin: 0 auto;
	padding: clamp(32px, 6vw, 72px) 25px 0;
}

.archive-title {
	margin: 0;
	font-size: clamp(32px, 5vw, 48px);
	letter-spacing: -0.02em;
}

.destination-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 28px;
	max-width: 1100px;
	margin: 0 auto;
	padding: 32px 25px 72px;
}

.destination-card {
	display: block;
	overflow: hidden;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.06);
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.destination-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 14px 32px rgba(0, 0, 0, 0.12);
}

.destination-card-image {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	background: #e9eaec;
}

.destination-card-body {
	padding: 16px 18px 20px;
}

.destination-card-title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.2;
}

.destination-card-summary {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin: 0;
	color: var(--vg-muted);
	font-size: 15px;
	line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
	.destination-card,
}
