/* En-tête des pages piliers — barre en pilule de la charte oaka, tout est préfixé .oaka-entete */

.oaka-entete {
  --oe-orange-700: #CD5116;
  --oe-orange-300: #FFA452;
  --oe-ink-950: #080605;
  --oe-ink-700: #4A423B;
  --oe-ink-200: #E5DFD7;
  --oe-white: #FFFFFF;
  --oe-ticbox: linear-gradient(90deg, #FF8300 0%, #E66A0B 19%, #CD5116 40%, #C2461B 100%);
  --oe-haut: 16px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  height: 88px; /* réserve la place de la barre, qui flotte au-dessus de la page */
}
.oaka-entete *, .oaka-entete *::before, .oaka-entete *::after { box-sizing: border-box; }
.admin-bar .oaka-entete { --oe-haut: 48px; }
@media (max-width: 782px) { .admin-bar .oaka-entete { --oe-haut: 16px; } }

/* la section et la rangée Divi qui contiennent l'en-tête ne gardent ni marge ni largeur limitée */
.et_pb_section:has(.oaka-entete) { padding: 0 !important; background: transparent !important; }
body .et_pb_row:has(.oaka-entete) { width: 100% !important; max-width: none !important; padding: 0 !important; }

.oaka-entete .oe-barre {
  position: fixed; z-index: 9990; top: var(--oe-haut); left: 50%;
  width: calc(100% - 32px); max-width: 1240px;
  display: flex; align-items: center; gap: 28px;
  padding: 12px 12px 12px 24px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--oe-ink-200); border-radius: 999px;
  box-shadow: 0 2px 4px rgba(20, 17, 15, 0.06), 0 1px 2px rgba(20, 17, 15, 0.04);
  transform: translateX(-50%);
  transition: transform 260ms ease, opacity 260ms ease;
}
.oaka-entete .oe-barre[data-etat="cachee"] { transform: translate(-50%, calc(-100% - var(--oe-haut) - 8px)); opacity: 0; }

.oaka-entete .oe-logo { display: block; flex: none; line-height: 0; }
.oaka-entete .oe-logo img { height: 32px; width: auto; }

.oaka-entete .oe-nav { flex: 1; }
.oaka-entete .oe-liens { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.oaka-entete .oe-liens li { list-style: none; margin: 0; padding: 0; }
.oaka-entete .oe-liens a { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--oe-ink-950) !important; text-decoration: none; transition: color 160ms; }
.oaka-entete .oe-liens a:hover,
.oaka-entete .oe-liens .current-menu-item > a,
.oaka-entete .oe-liens .current-menu-ancestor > a { color: var(--oe-orange-700) !important; }

.oaka-entete a.oe-btn {
  flex: none; display: inline-flex; align-items: center;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--oe-ticbox); color: var(--oe-white) !important; text-decoration: none;
  transition: filter 200ms;
}
.oaka-entete a.oe-btn:hover { color: var(--oe-white) !important; filter: brightness(1.08); }
.oaka-entete a:focus-visible, .oaka-entete button:focus-visible { outline: 3px solid var(--oe-orange-300); outline-offset: 2px; }

.oaka-entete .oe-burger { display: none; }

/* tablette et mobile : les liens passent dans un panneau sous la barre */
@media (max-width: 980px) {
  .oaka-entete { height: 80px; }
  .oaka-entete .oe-barre { flex-wrap: wrap; gap: 12px; padding: 10px 10px 10px 20px; border-radius: 28px; }
  .oaka-entete .oe-logo { margin-right: auto; }
  .oaka-entete .oe-logo img { height: 28px; }
  .oaka-entete .oe-burger {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; padding: 0; margin: 0; cursor: pointer;
    background: transparent; border: 1px solid var(--oe-ink-200); border-radius: 999px;
  }
  .oaka-entete .oe-burger-trait,
  .oaka-entete .oe-burger-trait::before,
  .oaka-entete .oe-burger-trait::after { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--oe-ink-950); transition: transform 200ms, background 200ms; }
  .oaka-entete .oe-burger-trait { position: relative; }
  .oaka-entete .oe-burger-trait::before, .oaka-entete .oe-burger-trait::after { content: ""; position: absolute; left: 0; }
  .oaka-entete .oe-burger-trait::before { top: -5px; }
  .oaka-entete .oe-burger-trait::after { top: 5px; }
  .oaka-entete .oe-burger[aria-expanded="true"] .oe-burger-trait { background: transparent; }
  .oaka-entete .oe-burger[aria-expanded="true"] .oe-burger-trait::before { transform: translateY(5px) rotate(45deg); }
  .oaka-entete .oe-burger[aria-expanded="true"] .oe-burger-trait::after { transform: translateY(-5px) rotate(-45deg); }

  .oaka-entete .oe-nav { display: none; order: 3; flex: 1 0 100%; padding: 4px 6px 10px 0; }
  .oaka-entete .oe-barre.oe-ouverte .oe-nav { display: block; }
  .oaka-entete .oe-liens { flex-direction: column; gap: 0; }
  .oaka-entete .oe-liens a { display: block; padding: 12px 0; font-size: 16px; border-top: 1px solid var(--oe-ink-200); }
}
@media (max-width: 479px) {
  .oaka-entete a.oe-btn { padding: 10px 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .oaka-entete .oe-barre { transition: none; }
}

/* ---------- Méga-menu : un canevas Divi par entrée de premier niveau (modules « canvas portal » de l'en-tête) ---------- */
.et_pb_canvas_portal[class*="_tb_header"] { display: none; }
@media (min-width: 981px) {
  .et_pb_canvas_portal[class*="_tb_header"] { position: fixed; z-index: 9989; top: 92px; left: 50%; transform: translateX(-50%); width: min(1240px, calc(100% - 32px)); margin: 0 !important; }
  .admin-bar .et_pb_canvas_portal[class*="_tb_header"] { top: 124px; }
  .et_pb_canvas_portal[class*="_tb_header"].is-open { display: block; animation: oe-mega-ouvre 180ms ease-out; }
  /* pont invisible entre la barre et le panneau, pour que la souris ne le referme pas en chemin */
  .et_pb_canvas_portal[class*="_tb_header"]::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
}
.et_pb_canvas_portal[class*="_tb_header"] .et_pb_section, .et_pb_canvas_portal[class*="_tb_header"] .et_pb_row { padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: none !important; background: transparent !important; }
@keyframes oe-mega-ouvre { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .et_pb_canvas_portal[class*="_tb_header"].is-open { animation: none; } }

.oe-mega { --oe-ink-950: #080605; --oe-ink-700: #4A423B; --oe-ink-500: #8E8378; --oe-ink-200: #E5DFD7; --oe-cream: #FAF7F2; --oe-orange-700: #CD5116; --oe-orange-50: #FFF4EB; --oe-forest: #15321F; --oe-ticbox: linear-gradient(90deg, #FF8300 0%, #E66A0B 19%, #CD5116 40%, #C2461B 100%);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr); gap: 32px; padding: 28px; border: 1px solid var(--oe-ink-200); border-radius: 28px; background: #fff; box-shadow: 0 24px 60px rgba(20, 17, 15, 0.16); font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--oe-ink-950); text-align: left; }
.oe-mega *, .oe-mega *::before, .oe-mega *::after { box-sizing: border-box; }
.oe-mega-intro { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 20px; background: var(--oe-cream); }
.oe-mega-sur { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--oe-orange-700); }
.oe-mega-titre { margin: 0; padding: 0; font-family: 'Sora', system-ui, sans-serif; font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--oe-ink-950); }
.oe-mega-texte { margin: 0; padding: 0; font-size: 14px; line-height: 1.6; color: var(--oe-ink-700); }
.oe-mega a.oe-mega-cta { align-self: flex-start; margin-top: auto; display: inline-flex; padding: 10px 18px; border-radius: 999px; background: var(--oe-ticbox); color: #fff !important; font-size: 14px; font-weight: 600; text-decoration: none; }
.oe-mega a.oe-mega-cta:hover { filter: brightness(1.08); }
.oe-mega-cols { display: grid; grid-template-columns: repeat(var(--oe-cols, 3), minmax(0, 1fr)); gap: 8px 24px; align-content: start; }
.oe-mega-col h4 { margin: 4px 0 8px; padding: 0 10px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--oe-ink-500); }
.oe-mega-col ul { margin: 0; padding: 0; list-style: none; }
.oe-mega-col li { margin: 0; padding: 0; list-style: none; }
.oe-mega a.oe-mega-lien { display: block; padding: 8px 10px; border-radius: 12px; color: var(--oe-ink-950) !important; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.35; transition: background 160ms; }
.oe-mega a.oe-mega-lien small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--oe-ink-700); }
.oe-mega a.oe-mega-lien:hover { background: var(--oe-orange-50); color: var(--oe-orange-700) !important; }
.oe-mega a.oe-mega-lien.is-fort { background: var(--oe-forest); color: #fff !important; }
.oe-mega a.oe-mega-lien.is-fort small { color: #CFE0D4; }
.oe-mega a.oe-mega-lien.is-fort:hover { background: var(--oe-ticbox); }
.oe-mega a:focus-visible { outline: 3px solid #FFA452; outline-offset: 2px; }
.oaka-entete .oe-liens > li[class*="oe-mega-"] > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; vertical-align: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.5; }
@media (max-width: 980px) { .oaka-entete .oe-liens > li[class*="oe-mega-"] > a::after { display: none; } }
/* paragraphes vides laissés par le module Texte (balise orpheline) et marges des paragraphes Divi */
.oe-mega p:empty { display: none; }
.oe-mega p.oe-mega-titre, .oe-mega p.oe-mega-texte { padding: 0 !important; margin: 0 !important; }
.oe-mega-intro { gap: 8px; }
.oe-mega-sur + .oe-mega-titre, .oe-mega-sur + p:empty + .oe-mega-titre { margin-top: -2px !important; }
/* bloc d'introduction : le fond de l'atelier 3D (crème + halo orange), halo un peu plus marqué vu la petite surface */
.oe-mega-intro { background-color: #FAF7F2; background-image: radial-gradient(ellipse at 50% 85%, rgba(255, 131, 0, 0.16) 0%, rgba(255, 131, 0, 0) 65%); }
