/* ==========================================================================
   Header (design "Corail") — balisage : templates/includes/menu.tpl
   + displayMainMenu() ; comportements : theme/js/header.js
   Mobile (< 820px) : barre logo + burger, recherche pleine largeur,
   la navigation devient un tiroir en accordéon.
   ========================================================================== */

html{ scroll-padding-top:140px; }

.uh{
	--uh-ink:#2b2421; --uh-muted:#75685f; --uh-coral:#e8604f; --uh-coral-d:#c2402f; --uh-coral-dd:#8f2d20;
	--uh-line:#efe6e1; --uh-line2:#e6dbd5; --uh-line3:#f1e9e5; --uh-tint:#fdece8; --uh-tint-bd:#f3cfc6;
	--uh-field:#f5efeb; --uh-paper:#fbf8f6;
	position:sticky; top:0; z-index:100;
	background:rgba(255,255,255,.94); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
	border-bottom:1px solid var(--uh-line);
	font-family:'DM Sans',sans-serif; font-size:14px; line-height:1.35; color:var(--uh-ink);
}
/* Neutralise les styles globaux du thème (button bleu majuscule, inputs, liens) */
.uh *, .uh *::before, .uh *::after{ box-sizing:border-box; }
.uh a, .uh a:hover, .uh a:focus{ color:inherit; text-decoration:none; }
.uh button{ font:inherit; color:inherit; background:none; border:0; padding:0; margin:0; border-radius:0;
	text-transform:none; letter-spacing:normal; cursor:pointer; transition:none; box-shadow:none; }
.uh ul{ list-style:none; margin:0; padding:0; }
.uh img{ max-width:none; }
.uh :focus{ outline:none; }
.uh :focus-visible{ outline:2px solid var(--uh-coral); outline-offset:2px; }
/* le thème force border-color:#fff !important sur button:focus / input:focus */
.uh .uh-lang-btn:focus, .uh .uh-burger:focus{ border-color:var(--uh-line2) !important; }
.uh .uh-dd.is-open > .uh-lang-btn:focus{ border-color:var(--uh-tint-bd) !important; }
.uh .uh-account-btn:focus{ border-color:var(--uh-ink) !important; }
.uh .uh-login input:focus{ border-color:var(--uh-coral) !important; }

/* ---------- Barre principale ---------- */
.uh-bar{ max-width:1240px; margin:0 auto; padding:14px 24px; display:flex; align-items:center; gap:16px 24px; flex-wrap:wrap; }

.uh-brand{ display:flex; align-items:center; gap:10px; flex:none; }
.uh-brand img{ width:46px; height:46px; object-fit:contain; display:block; }
.uh-word{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:22px; line-height:1; letter-spacing:-.02em; color:var(--uh-ink); }
.uh-word span{ color:var(--uh-coral); }

.uh-search{ flex:1 1 280px; max-width:560px; height:46px; margin:0; display:flex; align-items:center; gap:10px;
	background:var(--uh-field); border-radius:999px; padding:0 6px 0 18px; }
.uh .uh-search input[type="text"]{ flex:1; min-width:0; height:46px; margin:0; padding:0; border:0; border-radius:0;
	background:transparent; outline:none; font:inherit; font-size:15px; color:var(--uh-ink); }
.uh .uh-search input[type="text"]:focus{ border:0 !important; }
.uh .uh-search input::placeholder{ color:#8c7f77; }
.uh .uh-search-btn{ flex:none; width:34px; height:34px; border-radius:50%; background:var(--uh-ink); color:#fff; display:grid; place-items:center; }
.uh .uh-search-btn:hover{ background:#000; }
.uh-search-btn svg{ width:17px; height:17px; display:block; }

.uh-actions{ display:flex; align-items:center; gap:18px; margin-left:auto; }
.uh-link{ font-size:14px; font-weight:600; }
.uh .uh-link:hover{ color:var(--uh-coral-d); }

/* ---------- Menus déroulants (langue, compte) ---------- */
.uh-dd{ position:relative; }
.uh-dd-panel{ display:none; position:absolute; right:0; top:calc(100% + 6px); z-index:60; min-width:190px;
	background:#fff; border:1px solid var(--uh-line); border-radius:18px; box-shadow:0 20px 40px -18px rgba(80,40,30,.35); padding:6px; }
.uh-dd-panel::before{ content:''; position:absolute; left:0; right:0; top:-8px; height:8px; } /* pont de survol */
.uh-dd.is-open > .uh-dd-panel{ display:block; }

.uh .uh-lang-btn{ display:flex; align-items:center; gap:7px; height:38px; padding:0 12px 0 10px; border:1px solid var(--uh-line2);
	background:#fff; border-radius:999px; font-weight:600; font-size:13.5px; color:var(--uh-ink); }
.uh .uh-lang-btn:hover, .uh .uh-dd.is-open > .uh-lang-btn{ border-color:var(--uh-tint-bd); background:#fffaf8; }
.uh-caret{ font-size:10px; opacity:.6; }
/* Drapeaux simplifiés (4:3, coins arrondis) : pas de requête, pas d'armoiries lourdes */
.uh-flag{ width:20px; height:15px; flex:none; display:block; border-radius:4px; background:#eee center/cover no-repeat;
	box-shadow:inset 0 0 0 1px rgba(43,36,33,.14); }
.uh-flag-fr{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath fill='%23002395' d='M0 0h4v9H0z'/%3E%3Cpath fill='%23fff' d='M4 0h4v9H4z'/%3E%3Cpath fill='%23ED2939' d='M8 0h4v9H8z'/%3E%3C/svg%3E"); }
.uh-flag-it{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath fill='%23009246' d='M0 0h4v9H0z'/%3E%3Cpath fill='%23fff' d='M4 0h4v9H4z'/%3E%3Cpath fill='%23CE2B37' d='M8 0h4v9H8z'/%3E%3C/svg%3E"); }
.uh-flag-nl{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath fill='%23AE1C28' d='M0 0h12v3H0z'/%3E%3Cpath fill='%23fff' d='M0 3h12v3H0z'/%3E%3Cpath fill='%2321468B' d='M0 6h12v3H0z'/%3E%3C/svg%3E"); }
.uh-flag-es{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath fill='%23AA151B' d='M0 0h12v9H0z'/%3E%3Cpath fill='%23F1BF00' d='M0 2.25h12v4.5H0z'/%3E%3Cpath fill='%23AA151B' d='M2.6 3.5h1.5v2.1c0 .5-.35.8-.75.8s-.75-.3-.75-.8z'/%3E%3C/svg%3E"); }
.uh-flag-pt{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath fill='%23FF0000' d='M0 0h12v9H0z'/%3E%3Cpath fill='%23006600' d='M0 0h4.8v9H0z'/%3E%3Ccircle cx='4.8' cy='4.5' r='2' fill='%23FFCC00'/%3E%3Cpath fill='%23fff' stroke='%23D00' stroke-width='.35' d='M4 3.6h1.6v1.3c0 .6-.4.9-.8.9s-.8-.3-.8-.9z'/%3E%3C/svg%3E"); }
.uh-flag-en{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath fill='%23fff' d='M0 0h12v9H0z'/%3E%3Cpath fill='%23B22234' d='M0 0h12v.69H0zm0 1.38h12v.69H0zm0 1.39h12v.69H0zm0 1.38h12v.69H0zm0 1.39h12v.69H0zm0 1.38h12v.69H0zm0 1.39h12V9H0z'/%3E%3Cpath fill='%233C3B6E' d='M0 0h5.2v4.85H0z'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='.9' cy='.9' r='.25'/%3E%3Ccircle cx='2.1' cy='.9' r='.25'/%3E%3Ccircle cx='3.3' cy='.9' r='.25'/%3E%3Ccircle cx='4.5' cy='.9' r='.25'/%3E%3Ccircle cx='1.5' cy='2.4' r='.25'/%3E%3Ccircle cx='2.7' cy='2.4' r='.25'/%3E%3Ccircle cx='3.9' cy='2.4' r='.25'/%3E%3Ccircle cx='.9' cy='3.9' r='.25'/%3E%3Ccircle cx='2.1' cy='3.9' r='.25'/%3E%3Ccircle cx='3.3' cy='3.9' r='.25'/%3E%3Ccircle cx='4.5' cy='3.9' r='.25'/%3E%3C/g%3E%3C/svg%3E"); }

.uh-lang-item{ display:flex; align-items:center; gap:10px; border-radius:12px; padding:9px 12px; font-size:14px; color:var(--uh-ink); }
.uh .uh-lang-item:hover{ background:var(--uh-tint); }
.uh-lang-item.is-current{ font-weight:600; cursor:default; }
.uh-check{ margin-left:auto; color:var(--uh-coral-d); font-weight:700; }

.uh .uh-account-btn{ display:flex; align-items:center; gap:8px; border:1.5px solid var(--uh-ink); background:#fff; border-radius:999px;
	padding:8px 16px 8px 13px; font-weight:600; font-size:14px; line-height:1.2; color:var(--uh-ink); }
.uh .uh-account-btn:hover, .uh .uh-dd.is-open > .uh-account-btn{ background:var(--uh-ink); color:#fff; }
.uh-user-ic{ width:17px; height:17px; display:block; }
.uh-account-btn.is-logged .uh-user-ic{ color:var(--uh-coral); }
.uh-account-panel{ min-width:270px; }
.uh-menu-link{ display:block; border-radius:12px; padding:10px 12px; font-size:14.5px; font-weight:500; }
.uh .uh-menu-link:hover{ background:var(--uh-tint); }
.uh .uh-menu-logout, .uh .uh-menu-logout:hover{ color:var(--uh-muted); }
.uh-menu-logout{ border-top:1px solid var(--uh-line3); border-radius:0 0 12px 12px; margin-top:4px; }
.uh-login{ display:flex; flex-direction:column; gap:8px; padding:10px 8px 6px; margin:0; }
.uh .uh-login input[type="email"], .uh .uh-login input[type="password"]{ height:42px; width:100%; margin:0; padding:0 14px;
	border:1px solid var(--uh-line2); border-radius:12px; background:#fff; font:inherit; font-size:14.5px; color:var(--uh-ink); }
.uh .uh-login input:focus{ box-shadow:0 0 0 3px var(--uh-tint); }
.uh .uh-login-btn{ height:42px; border-radius:999px; background:var(--uh-ink); color:#fff; font-weight:600; font-size:14.5px; }
.uh .uh-login-btn:hover{ background:#000; }
.uh .uh-register, .uh .uh-register:hover{ color:var(--uh-coral-d); font-weight:600; }

/* ---------- Navigation (ordinateur) ---------- */
.uh .uh-burger{ display:none; }
.uh-nav{ max-width:1240px; margin:0 auto; padding:0 12px 10px; }
.uh-nav-list{ display:flex; flex-wrap:wrap; gap:2px; }
.uh-item-drop{ position:relative; }
.uh-top{ display:flex; align-items:center; gap:6px; padding:9px 14px; border-radius:999px; font-weight:600; font-size:14.5px; color:var(--uh-ink); }
.uh .uh-top:hover{ background:var(--uh-tint); }
.uh .uh-item.is-open > .uh-top{ background:var(--uh-tint); color:var(--uh-coral-dd); }

.uh-panel{ display:none; }
.uh-item.is-open > .uh-panel{ display:block; }

/* Méga-menus : pleine largeur sous le header */
.uh-mega{ position:absolute; left:0; right:0; top:100%; padding:0 24px; }
.uh-mega-in{ max-width:1192px; margin:0 auto; background:#fff; border:1px solid var(--uh-line); border-radius:0 0 28px 28px;
	box-shadow:0 30px 60px -24px rgba(80,40,30,.28); padding:28px 32px 20px;
	display:grid; grid-template-columns:190px 170px 230px minmax(0,1fr); gap:32px; }
.uh-h{ font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--uh-muted); margin-bottom:12px; }
.uh-list a{ display:block; padding:7px 0; font-size:15px; }
.uh .uh-list a:hover{ color:var(--uh-coral-d); }
.uh-cats{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:20px; }
.uh-cats a{ padding:6px 0; font-size:14.5px; }
.uh-letters{ display:grid; grid-template-columns:repeat(5,1fr); gap:6px; }
.uh-letters a{ height:38px; display:grid; place-items:center; border:1px solid var(--uh-line); background:var(--uh-paper); border-radius:12px; font-weight:700; font-size:14px; }
.uh .uh-letters a:hover{ background:var(--uh-tint); border-color:var(--uh-tint-bd); }
.uh-mega-foot{ grid-column:1/-1; display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap;
	border-top:1px solid var(--uh-line3); padding-top:16px; }
.uh-mega-title{ display:flex; align-items:center; gap:10px; font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:18px; }
.uh-dot{ width:10px; height:10px; border-radius:50%; background:var(--uh-coral); }
.uh .uh-mega-all{ background:var(--uh-ink); color:#fff; border-radius:999px; padding:10px 18px; font-weight:600; font-size:14px; }
.uh .uh-mega-all:hover{ background:#000; color:#fff; }

/* Communauté : petit menu sous l'entrée */
.uh-drop{ position:absolute; left:0; top:calc(100% + 10px); z-index:60; min-width:260px; background:#fff; border:1px solid var(--uh-line);
	border-radius:18px; box-shadow:0 24px 44px -20px rgba(80,40,30,.3); padding:6px; }
.uh-drop a{ display:block; border-radius:12px; padding:10px 12px; }
.uh .uh-drop a:hover{ background:var(--uh-tint); }
.uh-drop-t{ display:block; font-weight:600; font-size:14.5px; }
.uh-drop-d{ display:block; font-size:13px; color:var(--uh-muted); margin-top:1px; }

/* Outils */
.uh-tools-in{ display:block; padding:28px 32px; }
.uh-tools-in .uh-h{ margin-bottom:14px; }
.uh-tools{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.uh-tool{ display:flex; gap:14px; align-items:center; border:1px solid var(--uh-line); background:#fff; border-radius:18px; padding:14px 16px; }
.uh .uh-tool:hover{ background:#fffaf8; border-color:var(--uh-tint-bd); }
.uh-tool-ic{ flex:none; width:42px; height:42px; border-radius:14px; background:var(--uh-tint); color:var(--uh-coral-d); display:grid; place-items:center;
	font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:17px; }
.uh-tool-t{ display:block; font-weight:700; font-size:15px; }
.uh-tool-d{ display:block; font-size:13px; color:var(--uh-muted); margin-top:2px; }

/* Bloc réservé au tiroir mobile */
.uh-extra{ display:none; }

/* Pub 728x90 (hors header collant) */
.uh-ad{ max-width:1240px; margin:12px auto 0; padding:0 24px; }

/* ---------- Tablette : on resserre ---------- */
@media (max-width:1100px) and (min-width:820px){
	.uh-mega-in{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px 28px; }
	.uh-mega-in > .uh-col:nth-child(4){ grid-column:1/-1; }
	.uh-cats{ grid-template-columns:repeat(3,minmax(0,1fr)); }
	.uh-tools{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* ---------- Mobile : tiroir en accordéon ---------- */
@media (max-width:819px){
	html{ scroll-padding-top:150px; }
	.uh-bar{ padding:14px 16px; gap:14px 12px; }
	.uh-search{ order:3; flex:1 1 100%; max-width:none; }
	.uh-actions{ display:none; }
	.uh .uh-burger{ display:flex; margin-left:auto; width:44px; height:44px; border-radius:14px; border:1px solid var(--uh-line2); background:#fff;
		flex-direction:column; justify-content:center; align-items:center; gap:4px; }
	.uh-burger span{ display:block; width:18px; height:2px; background:var(--uh-ink); border-radius:2px; transition:transform .2s, opacity .2s; }
	.uh.is-drawer .uh-burger span:nth-child(1){ transform:translateY(6px) rotate(45deg); }
	.uh.is-drawer .uh-burger span:nth-child(2){ opacity:0; }
	.uh.is-drawer .uh-burger span:nth-child(3){ transform:translateY(-6px) rotate(-45deg); }

	.uh-nav{ display:none; max-width:none; border-top:1px solid var(--uh-line); padding:4px 16px 20px; max-height:72vh; overflow:auto;
		-webkit-overflow-scrolling:touch; overscroll-behavior:contain; background:#fff; }
	.uh.is-drawer .uh-nav{ display:block; }
	.uh-nav-list{ display:block; }
	.uh-item{ border-bottom:1px solid var(--uh-line3); }
	.uh-item-drop{ position:static; }
	.uh .uh-top, .uh-extra-link{ display:flex; justify-content:space-between; align-items:center; width:100%; padding:15px 4px; border-radius:0;
		font-weight:600; font-size:16px; color:var(--uh-ink); }
	.uh .uh-top:hover, .uh .uh-item.is-open > .uh-top{ background:none; color:var(--uh-ink); }
	.uh-caret{ display:none; }
	.uh-top::after, .uh-extra-link::after{ content:'\2192'; color:var(--uh-muted); font-weight:500; }
	.uh-item.has-panel > .uh-top::after{ content:'+'; font-size:18px; }
	.uh-item.has-panel.is-open > .uh-top::after{ content:'\2212'; }

	.uh-mega, .uh-drop{ position:static; padding:0; min-width:0; border:0; border-radius:0; box-shadow:none; background:none; }
	.uh-mega-in{ display:flex; flex-direction:column; gap:14px; max-width:none; padding:0 4px 16px; border:0; border-radius:0; box-shadow:none; background:none; }
	.uh-col-chips .uh-h{ display:none; }
	.uh-col-chips .uh-list{ display:flex; flex-wrap:wrap; gap:6px; }
	.uh-col-chips .uh-list a{ border:1px solid var(--uh-line2); background:#fff; border-radius:999px; padding:8px 12px; font-size:14px; }
	.uh-h{ margin-bottom:10px; }
	.uh-letters{ grid-template-columns:repeat(7,1fr); }
	.uh-letters a{ height:44px; }
	.uh-cats{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 12px; }
	.uh-cats a{ padding:8px 0; }
	.uh-mega-foot{ border-top:0; padding-top:0; }
	.uh-mega-title{ display:none; }

	.uh-drop{ padding:0 4px 14px; }
	.uh-drop a{ padding:8px 0; border-radius:0; }
	.uh .uh-drop a:hover{ background:none; }
	.uh-drop-t{ font-size:15px; }

	.uh-tools-in{ padding:0 0 16px; }
	.uh-tools-in .uh-h{ display:none; }
	.uh-tools{ display:flex; flex-direction:column; gap:8px; }
	.uh-tool{ gap:12px; border-radius:16px; padding:10px 12px; }
	.uh-tool-ic{ width:38px; height:38px; border-radius:12px; font-size:15px; }
	.uh-tool-t{ font-size:14.5px; }
	.uh-tool-d{ font-size:12.5px; margin-top:0; }

	.uh-extra{ display:block; }
	.uh-extra-link{ border-bottom:1px solid var(--uh-line3); }
	.uh-extra-h{ margin:18px 0 10px; padding:0 4px; }
	.uh-langs{ display:flex; flex-wrap:wrap; gap:6px; padding:0 4px; }
	.uh-lang-chip{ display:flex; align-items:center; gap:8px; height:44px; min-width:52px; padding:0 14px; border-radius:999px;
		border:1px solid var(--uh-line2); background:#fff; color:var(--uh-ink); font-weight:600; font-size:14px; }
	.uh-lang-chip.is-current{ background:var(--uh-ink); border-color:var(--uh-ink); color:#fff; }

	.uh-ad{ padding:0 16px; }
}
