/* =========================================================================
   Plaisirs d’Olympe — feuille de style principale
   Les couleurs (--bg, --bg-2, --text, --accent, …) sont injectées par la
   palette active (voir inc/customizer.php).
   ========================================================================= */

/* Police d'affichage Heorot (auto-hébergée) — H1 + menus uniquement.
   ⚠️ Licence non commerciale : régulariser une licence commerciale avant
   la mise en ligne (voir assets/fonts/HEOROT-LICENSE.txt). */
@font-face {
	font-family: 'Heorot';
	src: url('../fonts/heorot.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Heorot Expanded';
	src: url('../fonts/heorot-expanded.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	--font-display: 'Heorot', 'Cinzel', Georgia, serif;      /* H1 + menus */
	--font-head: 'Cinzel', Georgia, 'Times New Roman', serif; /* H2–H6 */
	--font-body: 'Spectral', Georgia, 'Times New Roman', serif;
	--container: 1200px;
	--radius: 10px;
	--radius-sm: 6px;
	--gap: 24px;
	--header-h: 76px;
	--transition: .2s ease;

	/* Valeurs de repli (palette « Santorin », injectée par le thème). */
	--bg: #FFFFFF;
	--bg-2: #E8F2FC;
	--bg-3: #D3E6FA;
	--text: #0B2A4A;
	--text-muted: #4E6582;
	--accent: #0A84E0;
	--accent-2: #0A5BC0;
	--on-accent: #FFFFFF;
	--border: #C9DEF4;
	--meander: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2728%27%20height%3D%2716%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%230A84E0%27%20stroke-width%3D%272%27%3E%3Cpath%20d%3D%27M0%2015h28%27%2F%3E%3Cpath%20d%3D%27M4%2015V4h16v8H10V8h6%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}

/* ----- Base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.2;
	color: var(--text);
	letter-spacing: .01em;
	margin: 0 0 .6em;
}
h1 {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(2rem, 4.4vw, 3rem);
	letter-spacing: .03em;
	line-height: 1.12;
}
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ----- Accessibilité ----- */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: var(--accent); color: var(--on-accent);
	padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ----- Boutons ----- */
.btn, .button, button.search-submit,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	font-family: var(--font-body); font-weight: 600; font-size: .95rem;
	padding: .72em 1.6em; border-radius: 999px;
	border: 1.5px solid transparent; cursor: pointer; line-height: 1;
	transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.btn--primary, .woocommerce a.button.alt, .woocommerce button.button.alt {
	background: var(--accent); color: var(--on-accent); border-color: var(--accent);
	box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 70%, #000);
}
.btn--primary:hover { transform: translateY(-1px); color: var(--on-accent); box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 70%, #000); }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 70%, #000); }
/* Pilule à double contour inspirée de la référence */
.btn--ghost {
	background: var(--bg); color: var(--accent); border-color: var(--accent);
	box-shadow: 0 4px 0 var(--accent-2);
}
.btn--ghost:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--accent-2); color: var(--accent); }
.btn--ghost:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-2); }

/* =========================================================================
   Topbar
   ========================================================================= */
.topbar { background: var(--accent); font-size: .82rem; }
.topbar__inner { display: flex; justify-content: center; align-items: center; min-height: 38px; }
.topbar__msg { margin: 0; color: var(--on-accent); text-align: center; letter-spacing: .02em; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 14px rgba(11,27,51,.06); }
.site-header::after { content: ""; display: block; height: 16px; background: var(--meander) repeat-x; background-size: 28px 16px; opacity: .95; }
.site-header__inner {
	display: flex; align-items: center; gap: var(--gap);
	min-height: var(--header-h);
}
.site-branding { flex: 0 0 auto; }
.site-branding .custom-logo { max-height: 52px; width: auto; }
.site-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--text); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }

.main-navigation { flex: 1 1 auto; }
.header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-action {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 50%;
	background: transparent; border: 1px solid transparent; color: var(--text);
	font-size: 1.05rem; cursor: pointer; position: relative;
}
.header-action:hover { background: var(--bg-2); border-color: var(--border); }
.header-cart__count {
	position: absolute; top: 2px; right: 0;
	min-width: 18px; height: 18px; padding: 0 4px;
	background: var(--accent); color: var(--on-accent);
	font-size: .68rem; font-weight: 700; line-height: 18px;
	border-radius: 9px; text-align: center;
}

/* Recherche dépliable */
.header-search { background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 16px 0; }
.header-search[hidden] { display: none; }
.search-form { display: flex; gap: 8px; }
.search-field {
	flex: 1 1 auto; background: var(--bg); color: var(--text);
	border: 1px solid var(--border); border-radius: var(--radius-sm);
	padding: .7em 1em; font-size: 1rem;
}
.search-field::placeholder { color: var(--text-muted); }

/* Bouton hamburger (mobile) */
.menu-toggle { display: none; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); width: 46px; height: 42px; cursor: pointer; }
.menu-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; align-items: center; }
.menu-toggle__bars span { width: 22px; height: 2px; background: var(--text); transition: var(--transition); }

/* =========================================================================
   Menu principal & méga-menu
   ========================================================================= */
.primary-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.primary-menu a { display: block; color: var(--text); padding: .6em .9em; border-radius: var(--radius-sm); font-weight: 500; }
.primary-menu > li > a { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: 1.15rem; padding: .7em 1.05em; }
.primary-menu > li > a { position: relative; }
.primary-menu > li > a:hover { color: var(--accent); background: var(--bg-2); }
.primary-menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.submenu-toggle { display: none; }

/* --- Desktop --- */
@media (min-width: 993px) {
	.primary-menu > li { position: relative; }

	/* Panneau méga (niveau 1 des sous-menus) */
	.primary-menu > li > .sub-menu {
		display: grid; /* toujours rendu ; visibilité pilotée par opacity/visibility */
		visibility: hidden;
		opacity: 0;
		pointer-events: none;
		/* fermeture : délai 200 ms pour permettre le mouvement diagonal */
		transition: opacity .18s ease, visibility 0s .2s;
		position: absolute; top: 100%; left: 0; /* pas de gap */
		min-width: 260px;
		background: var(--bg-2);
		border: 1px solid var(--border);
		border-radius: var(--radius);
		box-shadow: 0 18px 40px rgba(11,27,51,.16);
		padding: 18px;
		grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
		gap: 10px 26px;
		z-index: 200;
	}
	.primary-menu > li.menu-item-has-children:hover > .sub-menu,
	.primary-menu > li.menu-item-has-children:focus-within > .sub-menu {
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
		transition-delay: 0s; /* ouverture instantanée */
	}
	/* Indicateur ▾ */
	.primary-menu > li.menu-item-has-children > a::after {
		content: "▾"; margin-left: 6px; font-size: .7em; color: var(--text-muted);
	}

	/* Colonnes : un item de 2e niveau avec enfants = titre de colonne */
	.primary-menu > li > .sub-menu > li > a {
		padding: .25em .2em; font-family: var(--font-head); font-weight: 600;
		font-size: .95rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: .03em;
	}
	.primary-menu > li > .sub-menu > li > a:hover { background: transparent; color: var(--accent); }

	/* 3e niveau : liste statique sous le titre de colonne */
	.primary-menu > li > .sub-menu > li > .sub-menu {
		display: block; position: static; margin-top: 4px;
	}
	.primary-menu > li > .sub-menu > li > .sub-menu > li > a {
		padding: .35em .2em; font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0;
	}
	.primary-menu > li > .sub-menu > li > .sub-menu > li > a:hover { color: var(--accent); }
}

/* --- Mobile / tablette --- */
@media (max-width: 992px) {
	.menu-toggle { display: inline-flex; align-items: center; justify-content: center; order: 3; }
	.header-actions { order: 2; margin-left: auto; }
	.site-branding { order: 1; margin-right: auto; }

	.main-navigation {
		flex-basis: 100%; order: 4;
		max-height: 0; overflow: hidden;
		transition: max-height .3s ease;
	}
	body.menu-open .main-navigation { max-height: 80vh; overflow-y: auto; }

	.site-header__inner { flex-wrap: wrap; }

	.primary-menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 16px; }
	.primary-menu li { border-bottom: 1px solid var(--border); position: relative; }
	.primary-menu a { padding: .9em .4em; }

	.primary-menu .sub-menu { display: none; padding-left: 14px; }
	.primary-menu li.is-open > .sub-menu { display: block; }

	.submenu-toggle {
		display: flex; align-items: center; justify-content: center;
		position: absolute; top: 0; right: 0; width: 48px; height: 48px;
		background: transparent; border: 0; border-left: 1px solid var(--border);
		color: var(--text); font-size: 1rem; cursor: pointer;
	}
	.submenu-toggle[aria-expanded="true"] { color: var(--accent); }
	.submenu-toggle .chevron { transition: transform var(--transition); }
	.submenu-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

	body.menu-open .menu-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	body.menu-open .menu-toggle__bars span:nth-child(2) { opacity: 0; }
	body.menu-open .menu-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

	.footer-nav__grid { grid-template-columns: 1fr; gap: 24px; }
}

/* =========================================================================
   Contenu
   ========================================================================= */
.site-content { padding: 40px 0 64px; }
.site-main { min-height: 40vh; }
.page-header { margin-bottom: 28px; }
.page-title span { color: var(--accent); }

.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }
.post-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card__thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.post-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.post-card__title { font-size: 1.15rem; margin: 0; }
.post-card__meta { color: var(--text-muted); font-size: .82rem; }
.post-card .btn { align-self: flex-start; margin-top: 6px; }

.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: var(--radius); margin: 1em 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: .7em .9em; text-align: left; }
.entry-content th { background: var(--bg-2); font-family: var(--font-head); }
.entry-content h2 { margin-top: 1.6em; border-left: 3px solid var(--accent); padding-left: .5em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }

.no-results { text-align: center; padding: 60px 0; }

/* Pagination */
.pagination, .woocommerce-pagination { margin-top: 40px; display: flex; justify-content: center; }
.pagination .page-numbers, .woocommerce-pagination .page-numbers {
	display: inline-block; padding: .5em .9em; margin: 0 3px;
	border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
}
.pagination .current, .woocommerce-pagination .current { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* =========================================================================
   WooCommerce — ajustements de base
   ========================================================================= */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	background: var(--bg-2); border-left: 3px solid var(--accent); color: var(--text);
	padding: 1em 1.4em; border-radius: var(--radius-sm); list-style: none;
}
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
	background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
	padding: 14px; text-align: center;
}
.woocommerce ul.products li.product .price { color: var(--accent); font-weight: 700; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--font-head); font-size: 1rem; }
.woocommerce span.onsale { background: var(--accent-2); color: var(--on-accent); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--accent); }
.woocommerce .star-rating span { color: var(--accent-2); }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: 40px; position: relative; }
.site-footer::before { content: ""; display: block; height: 16px; background: var(--meander) repeat-x; background-size: 28px 16px; opacity: .95; }
.footer-reassurance { border-bottom: 1px solid var(--border); padding: 26px 0; }
.footer-reassurance__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.reassurance-item { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.reassurance-item span[aria-hidden] { grid-row: 1 / 3; font-size: 1.6rem; }
.reassurance-item strong { font-family: var(--font-head); }
.reassurance-item > span:last-child { color: var(--text-muted); font-size: .85rem; }

.footer-nav { padding: 38px 0; }
.footer-nav__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer-nav-menu { list-style: none; margin: 0; padding: 0; }
.footer-nav-menu li { margin-bottom: .6em; }
.footer-nav-menu a { font-size: .95rem; }

.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; }
.footer-bottom__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; }
.footer-copyright { margin: 0; color: var(--text-muted); font-size: .85rem; }
.footer-18 { display: block; opacity: .8; }
.footer-legal__menu { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; }
.footer-legal__menu a { color: var(--text-muted); font-size: .85rem; }
.footer-payments { display: flex; gap: 8px; }
.footer-payments span {
	font-size: .72rem; font-weight: 600; letter-spacing: .03em;
	padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-muted);
}

/* =========================================================================
   Divers
   ========================================================================= */
.comment-form input, .comment-form textarea {
	width: 100%; background: var(--bg); color: var(--text);
	border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7em 1em;
}
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }


/* ---- Santorin : renforcer la présence du bleu ---- */
h2 { color: var(--accent); }
.entry-content h2 { border-left-color: var(--accent); }
.site-header { border-bottom: 2px solid var(--accent); }
.footer-reassurance { background: var(--bg-2); }
.footer-nav { background: var(--accent); }
.footer-nav-menu a { color: rgba(255,255,255,.85); }
.footer-nav-menu a:hover { color: #fff; }
.footer-bottom { background: var(--accent-2); border-top: 0; }
.footer-bottom .footer-copyright,
.footer-bottom .footer-legal__menu a,
.footer-bottom .footer-payments span { color: #fff; }
.footer-bottom .footer-payments span { border-color: rgba(255,255,255,.5); }

/* Hero d'accueil (pleine largeur, au-dessus du menu) */
.site-hero{width:100%;line-height:0;}
.site-hero img{width:100%;height:auto;display:block;}

/* Icônes SVG inline (remplacent les emojis) */
.ddt-icon{display:inline-block;vertical-align:-0.15em;flex:0 0 auto;}
.topbar__msg .ddt-icon{vertical-align:-0.2em;}
.header-action .ddt-icon{width:1.4em;height:1.4em;}
.reassurance-item .ddt-icon{display:block;margin:0 auto .45rem;color:var(--accent);}

/* Pages catégorie SEO+GEO : bloc « En résumé » + FAQ accordéon */
.ddt-resume{background:var(--bg-2,#E8F2FC);border-left:4px solid var(--accent,#0A84E0);padding:1rem 1.25rem;border-radius:8px;margin:0 0 1.5rem;}
.ddt-resume p{margin:0;}
.entry-content .faq-item{border:1px solid var(--border,#C9DEF4);border-radius:8px;padding:.7rem 1rem;margin:.5rem 0;background:#fff;}
.entry-content .faq-item summary{cursor:pointer;font-weight:600;color:var(--text,#0B2A4A);}
.entry-content .faq-item[open] summary{margin-bottom:.5rem;}
.woocommerce.columns-3 ul.products li.product,.entry-content .products li.product{margin-bottom:1.5rem;}

/* ── Fiche produit : titre commercial en <span>, H1 SEO dans description ── */
/* Le <span class="product_title entry-title"> prend le même rendu qu'un H1 */
.woocommerce div.product .product_title.entry-title {
	display: block;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(1.6rem, 3.5vw, 2.4rem);
	line-height: 1.15;
	letter-spacing: .03em;
	color: var(--text);
	margin: 0 0 .6em;
}
/* Nom produit (partie en CAPS après le tiret) — police Heorot Expanded */
.woocommerce div.product .product_title.entry-title .ddt-product-name {
	font-family: 'Heorot Expanded', 'Heorot', var(--font-display);
	letter-spacing: .06em;
	color: var(--accent);
}
/* H1 SEO dans la description : style légèrement distinct pour différencier */
.woocommerce div.product .product-h1-seo {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: clamp(1.3rem, 2.5vw, 1.8rem);
	color: var(--accent);
	margin: 0 0 1em;
	padding-bottom: .35em;
	border-bottom: 2px solid var(--accent);
}
