/* Site header "Carré doux" (from site/_mockup/header). Markup: blocks/header/render.php, behaviour: js/header.js. */


.tth-h {
  --navy: #1F538A;
  --navy-deep: #183B56;
  --red: #D9230F; --red-accent: #F22811;
  --red-hover: #B81C0B;
  --ink: #1D2430;
  --muted: #667085;
  --line: #E6E9EE;
  --soft: #F3F6FA;
  --h: 82px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  position: fixed; top: 0; left: 0; right: 0; z-index: 9990;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.tth-h.is-scrolled { --h: 68px; }
.tth-h *, .tth-h *::before, .tth-h *::after { box-sizing: border-box; }
.tth-h ul { list-style: none; margin: 0; padding: 0; }
.tth-h a { text-decoration: none; }
.tth-h button { font-family: inherit; }
.tth-h svg { display: block; flex: none; }
.tth-h :focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- Utility bar ---------- */
.tth-h__util {
  background: var(--navy-deep); color: rgba(255, 255, 255, .82);
  font-size: 12.5px; font-weight: 500; overflow: hidden; max-height: 40px; transition: max-height .25s;
}
.tth-h.is-scrolled .tth-h__util { max-height: 0; }
.tth-h__util-inner { max-width: 1240px; margin: 0 auto; padding: 0 28px; height: 40px; display: flex; align-items: center; gap: 22px; }
.tth-h .tth-h__util a { color: rgba(255, 255, 255, .82); display: inline-flex; align-items: center; gap: 7px; transition: color .2s; }
.tth-h .tth-h__util a:hover { color: #fff; }
.tth-h__util svg { width: 14px; height: 14px; }
.tth-h__util .tth-h__socials { margin-left: auto; gap: 14px; }
.tth-h .tth-h__util .tth-h__socials a { width: auto; height: auto; background: none; color: rgba(255, 255, 255, .82); }

/* ---------- Main bar ---------- */
.tth-h__bar { background: #fff; transition: box-shadow .25s; }
.tth-h.is-scrolled .tth-h__bar { box-shadow: 0 6px 24px rgba(16, 36, 64, .08); }
.tth-h__inner {
  max-width: 1240px; margin: 0 auto; padding: 0 28px;
  height: var(--h); display: flex; align-items: center; gap: 28px;
  transition: height .25s;
}
.tth-h__logo { flex: none; display: block; line-height: 0; }
.tth-h__logo img { height: 54px; width: auto; transition: height .25s; }
.tth-h.is-scrolled .tth-h__logo img { height: 46px; }

/* ---------- Navigation ---------- */
.tth-h__nav { margin-left: auto; }
.tth-h__menu { display: flex; align-items: center; gap: 2px; }
.tth-h__item { position: relative; }
.tth-h .tth-h__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 12px; border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 600; line-height: 1;
  color: var(--navy-deep); position: relative; white-space: nowrap;
  transition: color .2s;
}
.tth-h .tth-h__link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--red-accent); border-radius: 2px; transform: scaleX(0); transition: transform .25s ease;
}
.tth-h .tth-h__link:hover, .tth-h .tth-h__link:focus-visible, .tth-h .tth-h__item.is-open > .tth-h__link { color: var(--navy); }
.tth-h .tth-h__link:hover::after, .tth-h .tth-h__link[aria-current="page"]::after, .tth-h .tth-h__link[aria-current="true"]::after,
.tth-h .tth-h__item.is-open > .tth-h__link::after, .tth-h .tth-h__item:hover > .tth-h__link::after { transform: scaleX(1); }
.tth-h__chev { width: 13px; height: 13px; transition: transform .25s; }
.tth-h__item:hover .tth-h__chev, .tth-h__item:focus-within .tth-h__chev, .tth-h__item.is-open .tth-h__chev { transform: rotate(180deg); }

/* Dropdown panel ("Nos actions") */
.tth-h__panel {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translate(-50%, 8px); opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 48px rgba(16, 36, 64, .14);
  padding: 22px; display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 6px 26px;
}
.tth-h__panel--list { grid-template-columns: minmax(220px, 1fr); padding: 12px; }
.tth-h__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.tth-h__item:hover > .tth-h__panel, .tth-h__item:focus-within > .tth-h__panel, .tth-h__item.is-open > .tth-h__panel {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.tth-h .tth-h__col-title {
  display: block; padding: 4px 12px 10px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.tth-h a.tth-h__col-title:hover { color: var(--red); }
.tth-h .tth-h__sublink {
  display: block; padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; line-height: 1.3; color: var(--ink);
  transition: background .15s, color .15s;
}
.tth-h .tth-h__sublink:hover, .tth-h .tth-h__sublink:focus-visible { background: var(--soft); color: var(--navy); }
.tth-h__cap { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; color: var(--muted); }

/* ---------- Actions ---------- */
.tth-h__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.tth-h .tth-h__donate {
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 18px; border-radius: 8px;
  background: var(--red); color: #fff;
  font-size: 15px; font-weight: 700; line-height: 1; white-space: nowrap;
  transition: background .2s, transform .2s, box-shadow .2s;
}
/* Live-site bug: the global link hover turned this text red on red. Keep it white. */
.tth-h .tth-h__donate:hover, .tth-h .tth-h__donate:focus-visible {
  background: var(--red-hover); color: #fff;
}
/* Logo hands (white) with a white dot between them: the brand motif in place of a heart */
.tth-h__hands { position: relative; width: 20px; height: 22px; flex: none; }
.tth-h__hands img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tth-h__hands b { position: absolute; left: 51%; top: 50.6%; width: 26%; aspect-ratio: 1; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); transition: transform .25s; }
.tth-h .tth-h__donate:hover .tth-h__hands b { transform: translate(-50%, -50%) scale(1.35); }
@media (prefers-reduced-motion: reduce) { .tth-h__hands b { transition: none; } }

.tth-h .tth-h__ghost {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 8px; border: 1.5px solid #C9D3DF;
  color: var(--navy-deep); background: transparent;
  font-size: 14.5px; font-weight: 700; line-height: 1; white-space: nowrap;
  transition: background .2s, color .2s;
}
.tth-h .tth-h__ghost:hover, .tth-h .tth-h__ghost:focus-visible { border-color: var(--navy); color: var(--navy); background: var(--soft); }

.tth-h .tth-h__burger {
  display: none; width: 46px; height: 46px; padding: 0; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; color: var(--navy-deep);
}
.tth-h .tth-h__burger svg { width: 22px; height: 22px; }

/* ---------- Mobile drawer ---------- */
.tth-h__drawer { position: fixed; inset: 0; z-index: 9995; visibility: hidden; }
.tth-h__drawer.is-open { visibility: visible; }
.tth-h__scrim { position: absolute; inset: 0; background: rgba(12, 24, 44, .45); opacity: 0; transition: opacity .25s; }
.tth-h__drawer.is-open .tth-h__scrim { opacity: 1; }
.tth-h__sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  overflow-y: auto;
}
.tth-h__drawer.is-open .tth-h__sheet { transform: none; }
.tth-h__sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.tth-h__sheet-head img { height: 40px; width: auto; }
.tth-h .tth-h__close svg { width: 22px; height: 22px; }
.tth-h .tth-h__close { width: 44px; height: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--navy-deep); }
.tth-h__mnav { padding: 8px 20px; }
.tth-h__mnav > ul > li { border-bottom: 1px solid var(--line); }
.tth-h .tth-h__mlink {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 17px 2px; background: none; border: 0; cursor: pointer; text-align: left;
  font-size: 16px; font-weight: 700; color: var(--navy-deep);
}
.tth-h .tth-h__mlink[aria-current="page"], .tth-h .tth-h__mlink[aria-current="true"] { color: var(--red); }
.tth-h__mlink .tth-h__chev { width: 18px; height: 18px; }
.tth-h__mlink[aria-expanded="true"] .tth-h__chev { transform: rotate(180deg); }
.tth-h__msub { display: none; padding: 0 0 14px; }
.tth-h__msub.is-open { display: block; }
.tth-h__msub .tth-h__col-title { padding: 10px 2px 4px; }
.tth-h .tth-h__msub a.tth-h__sublink { padding: 10px 2px; font-size: 15px; }
.tth-h .tth-h__msub a.tth-h__all { display: block; font-weight: 800; color: var(--navy2); }
.tth-h__mcta { padding: 20px; display: grid; gap: 10px; margin-top: auto; }
.tth-h__mcta .tth-h__donate, .tth-h__mcta .tth-h__ghost { justify-content: center; height: 52px; font-size: 15px; }
.tth-h__mcontact { padding: 4px 20px 24px; color: var(--muted); font-size: 14px; display: grid; gap: 8px; }
.tth-h__mcontact a { color: var(--navy-deep); font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.tth-h__mcontact svg { width: 16px; height: 16px; }
.tth-h__socials { display: flex; gap: 8px; }
.tth-h .tth-h__socials a { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); color: var(--navy-deep); }
.tth-h__socials svg { width: 16px; height: 16px; }
html.tth-lock, html.tth-lock body { overflow: hidden !important; }

/* ---------- Responsive ---------- */
/* The nav (with Accueil) + both buttons need about 1150px: switch to the drawer before they collide */
@media (max-width: 1180px) {
  .tth-h__nav, .tth-h__actions .tth-h__ghost { display: none; }
  .tth-h .tth-h__burger { display: inline-flex; }
  .tth-h__actions { margin-left: auto; }
}
@media (max-width: 767px) {
  .tth-h__util { display: none; }
}
@media (max-width: 520px) {
  .tth-h, .tth-h.is-scrolled { --h: 64px; }
  .tth-h__inner { padding: 0 16px; gap: 12px; }
  .tth-h__logo img, .tth-h.is-scrolled .tth-h__logo img { height: 36px; }
  .tth-h .tth-h__actions .tth-h__donate { height: 40px; padding: 0 14px; font-size: 14px; }
}

/* Logged-in editors: keep the fixed header below the WordPress toolbar */
.admin-bar .tth-h { top: 32px; }
@media (max-width: 782px) { .admin-bar .tth-h { top: 46px; } }
@media (max-width: 600px) { .admin-bar .tth-h { top: 0; } }

/* The mockup's header inherited a 24px line height from the old theme; keep it so spacing matches */
.tth-h { line-height: 24px; }
