/* ==========================================================================
   En-tête, menu principal, menu des catégories et pied de page
   Styles des gabarits PHP (template-parts/). Reprend le dessin de l'en-tête de la page d'accueil
   (barre de raccourcis, logo + devise + recherche, menu bleu collant) pour tout le site.
   Règles UI/UX Pro Max : touch-target-size, nav-state-active, focus-states, adaptive-navigation,
   persistent-nav, reduced-motion, color-not-only.
   ========================================================================== */

.uk-shell { max-width: var(--uk-container); margin: 0 auto; padding: 0 24px; }

/* Sécurité : une page qui embarque son propre en-tête (accueil #uk3, pages internes .kp) ne doit pas
   afficher le nôtre en plus. Le gabarit PHP respecte déjà le réglage « désactiver l'en-tête » de la page ;
   cette règle couvre le cas où ce réglage serait oublié. */
body:has(#uk3, .kp) .uk-shortcuts,
body:has(#uk3, .kp) #masthead,
body:has(#uk3, .kp) .uk-navwrap,
body:has(#uk3, .kp) .uk-catbar { display: none !important; }

/* ---------- Raccourcis ---------- */
.uk-shortcuts { background: var(--uk-navy); color: var(--uk-on-blue); }
.uk-shortcuts .uk-shell { display: flex; justify-content: flex-end; min-height: 42px; align-items: center; padding-block: 6px; }
.uk-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin: 0; padding: 0; list-style: none; }
.uk-pills li { margin: 0; }
.uk-pill, .uk-pills a {
	display: inline-flex; align-items: center; min-height: 32px; padding: 6px 12px;
	font-size: var(--uk-fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.2;
	color: var(--uk-on-blue); text-decoration: none;
	background: var(--uk-white-10); border: 1px solid var(--uk-white-30); border-radius: var(--uk-radius-pill);
	transition: background-color var(--uk-dur) var(--uk-ease), color var(--uk-dur) var(--uk-ease);
}
.uk-pill:hover, .uk-pills a:hover, .uk-pill.on, .uk-pills .current-menu-item > a {
	background: var(--uk-yellow); color: var(--uk-ink); border-color: var(--uk-yellow);   /* 14,7:1 */
}
.uk-shortcuts :focus-visible { outline-color: var(--uk-yellow); box-shadow: none; }

/* ---------- Identité : logo, nom, devise, recherche ---------- */
.uk-head { background: var(--uk-surface); }
.uk-head .uk-shell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 20px; }
.uk-logo { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.uk-mark { width: 72px; height: auto; flex: none; display: block; }
.uk-logo strong {
	display: block; font-family: var(--uk-font-display); font-weight: 800; text-transform: uppercase;
	font-size: clamp(22px, 3vw, 32px); line-height: 1.05; color: var(--uk-blue);
}
.uk-logo small { display: block; font-size: var(--uk-fs-sm); color: var(--uk-muted); font-style: italic; margin-top: 4px; }
.uk-logo:hover strong { color: var(--uk-navy); }

.uk-search { display: flex; align-items: center; border-bottom: 2px solid var(--uk-border-strong); min-width: min(100%, 320px); }
.uk-search:focus-within { border-color: var(--uk-blue); }
.uk-search input[type="search"] {
	flex: 1; min-height: var(--uk-target); border: 0; background: transparent; box-shadow: none;
	padding: 10px 4px; font: inherit; font-size: var(--uk-text-base);      /* 16 px : évite le zoom automatique d'iOS */
	color: var(--uk-ink);
}
.uk-search input[type="search"]:focus-visible { outline: none; box-shadow: none; }   /* le focus est porté par la ligne (focus-within) */
.uk-search:focus-within { outline: 3px solid var(--uk-focus); outline-offset: 2px; }
.uk-search button {
	display: flex; align-items: center; justify-content: center; width: var(--uk-target); height: var(--uk-target);
	padding: 0; border: 0; background: transparent; color: var(--uk-blue); min-height: 0;
}
.uk-search button:hover { background: var(--uk-cyan); color: var(--uk-navy); }

/* ---------- Menu principal (collant) ---------- */
.uk-navwrap { position: sticky; top: 0; z-index: 999; background: var(--uk-blue); box-shadow: var(--uk-shadow-1); }
.admin-bar .uk-navwrap { top: 32px; }
@media (max-width: 782px) { .admin-bar .uk-navwrap { top: 46px; } }
.uk-nav .uk-shell { display: flex; align-items: center; justify-content: space-between; min-height: 56px; position: relative; }
.uk-links { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.uk-links li { margin: 0; }
.uk-links a {
	display: flex; align-items: center; min-height: 56px; padding: 0 20px;
	color: var(--uk-on-blue); font-weight: 700; font-size: var(--uk-fs-ui); text-decoration: none;
	border-bottom: 4px solid transparent;
	transition: border-color var(--uk-dur) var(--uk-ease), background-color var(--uk-dur) var(--uk-ease);
}
.uk-links a:hover { color: var(--uk-on-blue); border-bottom-color: var(--uk-yellow); background: var(--uk-white-8); }
/* Page courante : soulignement jaune ET graisse renforcée (pas la couleur seule) */
.uk-links a[aria-current="page"], .uk-links .current-menu-item > a, .uk-links .current-menu-ancestor > a {
	border-bottom-color: var(--uk-yellow); background: var(--uk-white-8); font-weight: 800;
}
.uk-nav :focus-visible { outline-color: var(--uk-yellow); box-shadow: none; outline-offset: -3px; }

.uk-burger {
	display: none; margin-left: auto; align-items: center; gap: 8px; min-height: var(--uk-target);
	padding: 8px 14px; background: transparent; color: var(--uk-on-blue); font-weight: 700;
	border: 2px solid var(--uk-white-50); border-radius: 0;
}
.uk-burger:hover { background: var(--uk-white-12); color: var(--uk-on-blue); border-color: var(--uk-white-50); }

/* Mobile : menu replié derrière le bouton (si JavaScript actif ; sinon la liste reste visible) */
@media (max-width: 900px) {
	.uk-shortcuts .uk-shell { justify-content: flex-start; }
	.uk-pills { justify-content: flex-start; gap: 6px; }
	.uk-pill, .uk-pills a { padding: 6px 10px; font-size: var(--uk-fs-xs); }
	html.uk-js .uk-burger { display: inline-flex; }
	html.uk-js .uk-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--uk-navy); padding: 8px 0; box-shadow: var(--uk-shadow-1); }
	html.uk-js .uk-links.open { display: flex; }
	html.uk-js .uk-links a { padding: 0 24px; }
	html:not(.uk-js) .uk-links { flex-direction: column; width: 100%; }
	.uk-mark { width: 56px; }
}

/* ---------- Menu des catégories ---------- */
.uk-catbar { background: var(--uk-bg); border-bottom: 1px solid var(--uk-border); }
.uk-cats {
	display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
	margin: 0; padding: 0; list-style: none; box-sizing: border-box;
}
.uk-cats::-webkit-scrollbar { display: none; }
.uk-cats li { flex: none; margin: 0; border-right: 1px solid var(--uk-border-strong); }
.uk-cats li:last-child { border-right: 0; }
.uk-cats a {
	display: flex; align-items: center; min-height: var(--uk-target); padding: 0 16px;
	font-size: var(--uk-fs-md); font-weight: 700; line-height: 1; color: var(--uk-ink);
	text-decoration: underline; text-underline-offset: 3px;
}
.uk-cats li:first-child a { padding-left: 0; }
.uk-cats a:hover { color: var(--uk-blue); text-decoration-color: var(--uk-yellow); text-decoration-thickness: 3px; }
.uk-cats a[aria-current] { color: var(--uk-blue); box-shadow: inset 0 -4px var(--uk-yellow); font-weight: 800; }
.uk-cats a:focus-visible { outline: 3px solid var(--uk-blue); outline-offset: -3px; box-shadow: none; }

/* ---------- Pied de page ---------- */
.uk-footer-wrap, .uk-footer-wrap .uk-foot { background: var(--uk-navy); color: var(--uk-footer-text); }
.uk-foot { font-family: var(--uk-font-body); line-height: 1.5; text-align: left; margin-top: 64px; }
.uk-foot .uk-fi { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 56px; padding-bottom: 28px; }
.uk-foot .uk-fi > div { flex: 1 1 160px; display: flex; flex-direction: column; gap: 0; font-size: var(--uk-fs-ui); }
.uk-foot .uk-fi > div > strong { margin-bottom: 8px; }
.uk-foot .uk-fi > div:first-child { flex: 2 1 300px; }
.uk-foot strong { color: var(--uk-on-blue); font-size: var(--uk-fs-lg); }
.uk-foot .uk-brand { font-family: var(--uk-font-display); font-size: var(--uk-fs-brand); }
.uk-foot .uk-addr { font-style: normal; line-height: 1.7; margin-bottom: 8px; }
.uk-foot .uk-contact, .uk-foot .uk-contact a { color: var(--uk-yellow); }
.uk-foot a { color: var(--uk-footer-text); text-decoration: none; display: inline-flex; align-items: center; align-self: flex-start; min-height: var(--uk-target); }
.uk-foot a:hover { color: var(--uk-yellow); text-decoration: underline; text-underline-offset: 3px; }
.uk-foot :focus-visible { outline: 3px solid var(--uk-yellow); outline-offset: 2px; box-shadow: none; }
.uk-foot .uk-copy { border-top: 1px solid var(--uk-footer-line); padding: 18px 0; font-size: var(--uk-fs-sm); color: var(--uk-footer-muted); }
.uk-foot .uk-copy a { color: var(--uk-footer-muted); text-decoration: underline; text-underline-offset: 3px; display: inline; min-height: 0; }
.uk-foot .uk-copy a:hover { color: var(--uk-yellow); }
@media (max-width: 600px) { .uk-foot .uk-fi { gap: 28px; padding-top: 40px; } }
