/*
Theme Name:  Pilot Demo Theme
Description: Thème neutre de démonstration. Affiche les sections Hero et Rangée Flexible (ACF) des contenus importés depuis le site Pilot. Remplaçable par le thème WALT d'origine.
Version:     1.5.3
Author:      FTC
Text Domain: pilot-demo-theme
Requires PHP: 7.4
*/

:root {
	--ink: #1d2433;
	--muted: #5c6475;
	--line: #e3e6ec;
	--bg: #ffffff;
	--soft: #f5f6f9;
	--accent: #1f4fd8;
	--demo: #fff3cd;
	--radius: 10px;
	--wrap: 1120px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }

.pd-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Bandeau démo */
.pd-demo-bar {
	background: var(--demo);
	border-bottom: 1px solid #f0d98c;
	font-size: 14px;
	text-align: center;
	padding: 6px 16px;
}

/* Barre du haut */
.pd-topbar { background: #1d2433; color: #fff; font-size: 15px; }
.pd-topbar .pd-wrap { display: flex; justify-content: flex-end; align-items: center; gap: 24px; min-height: 40px; }
.pd-top-link { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 0; }
.pd-top-link:hover span { text-decoration: underline; }
.pd-lang-code { border-bottom: 2px solid #fff; line-height: 1.2; }

/* En-tête */
.pd-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.pd-header .pd-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.pd-brand { font-weight: 700; font-size: 20px; text-decoration: none; color: var(--ink); }
.pd-menu { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; align-items: center; }
.pd-menu-top { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; font: inherit; font-weight: 600; font-size: 17px; color: var(--accent); cursor: pointer; text-decoration: none; padding: 24px 0; }
.pd-menu-top .pd-icon { width: 16px; height: 16px; transition: transform .2s; }
.pd-has-sub { position: relative; }
.pd-submenu { list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: -16px; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(29, 36, 51, .12); display: none; }
.pd-has-sub:hover .pd-submenu, .pd-has-sub:focus-within .pd-submenu, .pd-has-sub.is-open .pd-submenu { display: block; }
.pd-has-sub:hover .pd-icon, .pd-has-sub.is-open .pd-icon { transform: rotate(180deg); }
.pd-submenu a { display: block; padding: 9px 18px; color: var(--ink); text-decoration: none; font-size: 15px; }
.pd-submenu a:hover { background: var(--soft); color: var(--accent); }
.pd-burger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 8px; }
.pd-burger span { display: block; height: 2px; background: var(--ink); margin: 5px 0; }

/* Fenêtre des pays */
.pd-lang-modal { border: 0; border-radius: 12px; padding: 48px 56px 32px; width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 64px); overflow: auto; box-shadow: 0 24px 64px rgba(0, 0, 0, .25); }
.pd-lang-modal::backdrop { background: rgba(29, 36, 51, .6); }
.pd-modal-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #1d2433; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.pd-countries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 32px; }
.pd-country a, .pd-country > span { display: flex; align-items: center; gap: 14px; padding: 8px 0; text-decoration: none; color: var(--accent); font-size: 17px; }
.pd-country a:hover .pd-country-name { text-decoration: underline; }
.pd-country.is-current .pd-country-name { border-bottom: 2px solid var(--accent); }
.pd-country.is-off > span { color: #9aa1af; cursor: default; }
.pd-country.is-off .pd-flag { opacity: .45; filter: grayscale(.6); }
.pd-flag { width: 28px; display: inline-flex; justify-content: center; font-size: 20px; }
.pd-flag img { width: 24px; height: 16px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.pd-country-tag { font-size: 11px; line-height: 1.6; padding: 0 7px; border-radius: 10px; background: #fcf3e3; color: #7a4b00; text-transform: uppercase; letter-spacing: .04em; }
.pd-country.is-fallback .pd-flag { opacity: .85; }
.pd-fallback-notice { background: #eef1fb; color: #2e3f8f; text-align: center; font-size: 14px; padding: 8px 16px; }
.pd-countries-note { color: var(--muted); font-size: 13px; margin: 20px 0 0; }

/* Hero */
.pd-hero { position: relative; background: var(--soft); min-height: 340px; display: flex; align-items: flex-end; overflow: hidden; }
.pd-hero img.pd-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-hero .pd-wrap { position: relative; width: 100%; padding-top: 48px; padding-bottom: 40px; }
.pd-hero-card { background: rgba(255,255,255,.92); border-radius: var(--radius); padding: 24px 28px; max-width: 560px; }
.pd-hero-title { font-size: 32px; line-height: 1.2; margin: 0 0 8px; }
.pd-hero-text p { margin: 0; }

/* Blocs */
.pd-block { padding: 56px 0; border-bottom: 1px solid var(--line); }
.pd-block:last-child { border-bottom: 0; }
.pd-split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.pd-split.pd-media-left .pd-media { order: -1; }
.pd-media img, .pd-media video, .pd-media iframe { border-radius: var(--radius); width: 100%; }
.pd-media iframe { aspect-ratio: 16 / 9; height: auto; border: 0; }
.pd-text h2 { font-size: 28px; line-height: 1.25; margin-top: 0; }
.pd-text h3 { font-size: 20px; }
.pd-block-header { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.pd-headline { text-transform: uppercase; letter-spacing: 2px; font-size: 13px; color: var(--muted); }
.pd-block-header h2 { margin: 6px 0 0; font-size: 28px; }

.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.pd-card { background: var(--soft); border-radius: var(--radius); padding: 16px; }
.pd-card img { border-radius: 8px; margin-bottom: 12px; width: 100%; }
.pd-card h3 { font-size: 16px; margin: 0; }

.pd-mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pd-mosaic img { border-radius: 8px; width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Listes */
.pd-list { padding: 48px 0; }
.pd-list h1 { margin-top: 0; }
.pd-list ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pd-list li a { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; }
.pd-list li small { display: block; color: var(--muted); font-weight: 400; }

.pd-footer { background: var(--soft); color: var(--muted); font-size: 14px; padding: 24px 0; margin-top: 40px; }

@media (max-width: 960px) {
	.pd-burger { display: block; }
	.pd-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
	.pd-nav.is-open { display: block; }
	.pd-header .pd-wrap { position: relative; }
	.pd-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.pd-menu-top { padding: 12px 0; width: 100%; justify-content: space-between; }
	.pd-submenu { position: static; box-shadow: none; border: 0; padding: 0 0 8px 12px; }
	.pd-has-sub:hover .pd-submenu { display: none; }
	.pd-has-sub.is-open .pd-submenu { display: block; }
	.pd-countries { grid-template-columns: repeat(2, 1fr); }
	.pd-lang-modal { padding: 56px 24px 24px; }
}

@media (max-width: 760px) {
	.pd-countries { grid-template-columns: 1fr; }
	.pd-split { grid-template-columns: 1fr; gap: 24px; }
	.pd-split.pd-media-left .pd-media { order: 0; }
	.pd-hero-title { font-size: 26px; }
	.pd-block { padding: 40px 0; }
}

/* ---------- Page d'accueil ---------- */

.pd-slider { position: relative; background: var(--soft); }
.pd-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pd-slides::-webkit-scrollbar { display: none; }
.pd-slide { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: 45% 55%; min-height: 480px; }
.pd-slide-text { background: #1d2433; color: #fff; display: flex; align-items: center; justify-content: flex-end; }
.pd-slide-inner { max-width: 440px; padding: 48px 40px; width: 100%; }
.pd-crumb { font-size: 14px; opacity: .8; }
.pd-slide-text h2 { font-size: 44px; line-height: 1.12; margin: 72px 0 24px; color: #fff; }
.pd-slide-text p { margin: 0 0 24px; font-size: 18px; opacity: .92; }
.pd-btn { display: inline-block; background: #fff; color: #1d2433; text-decoration: none; font-weight: 600; padding: 12px 24px; border-radius: 4px; }
.pd-btn:hover { background: #e9ecf2; }
.pd-slide-media { position: relative; overflow: hidden; background: #2b3346; }
.pd-slide-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-slider-nav { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 20px; position: relative; }
.pd-dots { display: flex; gap: 8px; }
.pd-dot { width: 10px; height: 10px; border-radius: 10px; border: 0; background: #cfd4de; cursor: pointer; padding: 0; transition: width .2s; }
.pd-dot.is-active { width: 28px; background: #1d2433; }
.pd-arrow { position: absolute; right: 20px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ink); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; }

.pd-featured { background: var(--soft); }
.pd-featured .pd-text h2 { font-size: 32px; }

.pd-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.pd-product { display: block; text-decoration: none; color: var(--ink); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; }
.pd-product:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(29, 36, 51, .1); }
.pd-product img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pd-product span { display: block; padding: 14px 16px; font-weight: 600; }

@media (max-width: 760px) {
	.pd-slide { grid-template-columns: 1fr; grid-template-rows: auto 260px; min-height: 0; }
	.pd-slide-text { justify-content: flex-start; }
	.pd-slide-inner { padding: 32px 20px; }
	.pd-slide-text h2 { font-size: 32px; margin: 24px 0 16px; }
	.pd-slide-media { order: 2; }
}

/* ---------- Page produit ---------- */

.pd-product-hero { display: grid; grid-template-columns: 45% 55%; min-height: 480px; }
.pd-product-hero .pd-slide-text h1 { font-size: 48px; line-height: 1.1; margin: 120px 0 24px; }
.pd-crumb { display: flex; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.pd-crumb a { color: inherit; text-decoration: none; }
.pd-crumb a:hover { text-decoration: underline; }
.pd-hero-text p { margin: 0; font-size: 18px; }

/* Panneaux et sections colorés */
.pd-pal-dark, .pd-pal-dark h1, .pd-pal-dark h2, .pd-pal-dark h3, .pd-pal-dark .pd-headline { color: #fff; }
.pd-pal-dark a { color: #fff; }
.pd-slide-text.pd-pal-light { color: var(--ink); }
.pd-slide-text.pd-pal-light .pd-crumb { opacity: .8; }
.pd-block.pd-pal-dark { border-bottom: 0; }
.pd-block.pd-pal-light { border-bottom-color: transparent; }
.pd-block + .pd-block.pd-pal-light[style*="#ffffff"] { border-top: 1px solid var(--line); }
.pd-pal-dark .pd-text h2 { color: #fff; }
.pd-text-video .pd-text h2, .pd-text-image .pd-text h2 { font-size: 32px; }
.pd-block { padding: 80px 0; }

@media (max-width: 760px) {
	.pd-product-hero { grid-template-columns: 1fr; grid-template-rows: auto 260px; min-height: 0; }
	.pd-product-hero .pd-slide-text h1 { font-size: 34px; margin: 32px 0 16px; }
	.pd-block { padding: 48px 0; }
}

.pd-center { text-align: center; max-width: 760px; margin: 0 auto; }
