/* ==========================================
   HEADER - TELEPILOTE SAS v2.0
   ========================================== */

/* Announcement bar */
.tp-announce-bar {
  background: var(--tp-navy-deep);
  padding: 8px 0;
  font-size: 13px;
  color: var(--tp-gray-400);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tp-announce-bar .tp-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tp-announce-icon { display: flex; align-items: center; }
.tp-announce-bar strong { color: var(--tp-orange); }
.tp-announce-link {
  color: var(--tp-orange);
  text-decoration: none;
  font-weight: 600;
  margin-left: 8px;
}
.tp-announce-link:hover { text-decoration: underline; }

/* Header */
.tp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--tp-navy);
  border-bottom: 2px solid var(--tp-orange);
  transition: box-shadow 0.3s ease;
}
.tp-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.tp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

/* Logo */
.tp-logo img {
  height: 42px;
  width: auto;
  transition: height 0.3s ease;
}
.tp-header.scrolled .tp-logo img { height: 36px; }

/* Nav */
.tp-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.tp-nav-item { position: relative; }
.tp-nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-family: var(--tp-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--tp-gray-200);
  text-decoration: none;
  border-radius: var(--tp-radius);
  transition: var(--tp-transition);
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
}
.tp-nav-link:hover,
.tp-nav-link[aria-expanded="true"] {
  color: var(--tp-white);
  background: rgba(255,255,255,0.08);
}
.tp-nav-link svg {
  transition: transform 0.2s ease;
}
.tp-nav-link[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Mega menu */
.tp-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--tp-white);
  border-radius: 0 0 var(--tp-radius-lg) var(--tp-radius-lg);
  box-shadow: var(--tp-shadow-lg);
  padding: 24px;
  min-width: 720px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}
.tp-mega-menu[aria-hidden="false"],
.tp-has-mega:hover .tp-mega-menu,
.tp-has-mega:focus-within .tp-mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.tp-mega-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tp-orange);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tp-gray-100);
}
.tp-mega-col { padding-right: 16px; }
.tp-mega-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--tp-gray-700);
  text-decoration: none;
  transition: var(--tp-transition);
}
.tp-mega-col a:hover {
  color: var(--tp-orange);
  padding-left: 4px;
}
.tp-mega-highlight {
  background: var(--tp-gray-50);
  margin: -24px -24px -24px 0;
  padding: 24px;
  border-radius: 0 0 var(--tp-radius-lg) 0;
}
.tp-mega-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--tp-gray-200); }
.tp-mega-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--tp-orange) !important;
}

/* Dropdown */
.tp-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--tp-white);
  border-radius: 0 0 var(--tp-radius-lg) var(--tp-radius-lg);
  box-shadow: var(--tp-shadow-lg);
  padding: 12px 0;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}
.tp-dropdown[aria-hidden="false"],
.tp-has-dropdown:hover .tp-dropdown,
.tp-has-dropdown:focus-within .tp-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.tp-dropdown a {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  color: var(--tp-gray-700);
  text-decoration: none;
  transition: var(--tp-transition);
}
.tp-dropdown a:hover {
  background: var(--tp-gray-50);
  color: var(--tp-orange);
}
.tp-dd-all {
  border-top: 1px solid var(--tp-gray-100);
  margin-top: 8px;
  padding-top: 12px !important;
  font-weight: 600;
  color: var(--tp-orange) !important;
}

/* Header CTAs */
.tp-header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.tp-btn-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--tp-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--tp-gray-200);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--tp-radius);
  transition: var(--tp-transition);
}
.tp-btn-phone:hover {
  border-color: var(--tp-orange);
  color: var(--tp-orange);
}
.tp-btn-header {
  padding: 10px 20px;
  font-size: 13px;
}

/* Hamburger */
.tp-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.tp-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--tp-white);
  border-radius: 2px;
  transition: var(--tp-transition);
}
.tp-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.tp-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.tp-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile overlay */
.tp-mobile-overlay[hidden] { display: none !important; }
.tp-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--tp-white);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: tpOverlayIn 0.25s ease;
}
@keyframes tpOverlayIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tp-mo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--tp-gray-200);
  flex-shrink: 0;
}
.tp-mo-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tp-radius);
  border: 1px solid var(--tp-gray-200);
  background: var(--tp-gray-50);
  color: var(--tp-navy);
  cursor: pointer;
}
.tp-mo-links {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tp-mo-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tp-orange);
  margin-top: 16px;
  margin-bottom: 4px;
  padding: 4px 16px;
}
.tp-mo-label:first-child { margin-top: 8px; }
.tp-mo-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--tp-navy);
  border-radius: var(--tp-radius-lg);
  min-height: 48px;
  transition: background 0.2s;
}
.tp-mo-links a:hover,
.tp-mo-links a:active {
  background: var(--tp-gray-50);
}
.tp-mo-all {
  font-weight: 600 !important;
  color: var(--tp-orange) !important;
  font-size: 14px !important;
}
.tp-mo-bottom {
  padding: 16px 20px 32px;
  border-top: 1px solid var(--tp-gray-200);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tp-mo-cta {
  display: block;
  text-align: center;
  padding: 14px;
  font-family: var(--tp-font);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--tp-radius);
  min-height: 48px;
}
.tp-mo-cta-navy {
  background: var(--tp-navy);
  color: var(--tp-white);
}
.tp-mo-cta-orange {
  background: linear-gradient(135deg, var(--tp-orange), var(--tp-orange-hover));
  color: var(--tp-white);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .tp-nav, .tp-header-cta .tp-btn-phone { display: none; }
  .tp-hamburger { display: flex; }
  .tp-header-inner { height: 60px; }
  .tp-header-cta .tp-btn-header { display: none; }
}
@media (max-width: 640px) {
  .tp-logo img { height: 34px; }
  .tp-announce-bar { font-size: 12px; }
  .tp-announce-link { display: none; }
}
