/* ==========================================================================
   THELIO / DATACADEMY — COMPOSANTS PARTAGÉS (HEADER, FOOTER, MODALES)
   Design System Thélio : Phosphor Icons Regular, Zéro emoji, Zéro popup native
   ========================================================================== */

/* --- HEADER & NAVIGATION --- */
.thelio-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  transition: all 0.2s ease;
}

.thelio-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.thelio-brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.thelio-brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* Navigation Desktop */
.thelio-nav-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.thelio-nav-item {
  position: relative;
  list-style: none;
}

.thelio-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--ink-body, #475569);
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm, 6px);
  transition: all 0.15s ease;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
}

.thelio-nav-link:hover,
.thelio-nav-item:hover > .thelio-nav-link {
  color: var(--primary, #1E73BE);
  background: rgba(30, 115, 190, 0.05);
}

.thelio-nav-link.active {
  color: var(--primary, #1E73BE);
  font-weight: 600;
}

.thelio-dropdown-chevron {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.thelio-nav-item:hover .thelio-dropdown-chevron,
.thelio-nav-item.is-open .thelio-dropdown-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu (Domaines) */
.thelio-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 320px;
  background: #ffffff;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-card, 12px);
  box-shadow: 0 14px 35px -8px rgba(8, 75, 114, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1010;
  pointer-events: none;
}

.thelio-nav-item:hover .thelio-dropdown-menu,
.thelio-nav-item:focus-within .thelio-dropdown-menu,
.thelio-nav-item.is-open .thelio-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.thelio-dropdown-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-radius: var(--radius-control, 8px);
  text-decoration: none;
  color: var(--ink, #0f172a);
  transition: all 0.15s ease;
}

.thelio-dropdown-link:hover {
  background: var(--surface-sunken, #f8fafc);
}

.thelio-dropdown-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--secondary, #084B72);
  line-height: 1.3;
  transition: color 0.15s ease;
}

.thelio-dropdown-link:hover .thelio-dropdown-title {
  color: var(--primary, #1E73BE);
}

.thelio-dropdown-desc {
  display: block;
  font-size: 12.5px;
  color: var(--ink-muted, #64748b);
  line-height: 1.4;
}

/* Actions Header */
.thelio-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.thelio-btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary, #1E73BE);
  color: #ffffff !important;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-control, 8px);
  border: 1px solid var(--primary, #1E73BE);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(30, 115, 190, 0.2);
}

.thelio-btn-cta:hover {
  background: var(--primary-hover, #165c9b);
  border-color: var(--primary-hover, #165c9b);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 115, 190, 0.3);
}

/* Burger Mobile Button */
.thelio-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ink, #0f172a);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
}

.thelio-mobile-toggle:hover {
  background: var(--surface-sunken, #f8fafc);
}

/* Mobile Drawer */
.thelio-mobile-drawer {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  padding: 24px;
  z-index: 999;
  overflow-y: auto;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
}

.thelio-mobile-drawer.is-open {
  display: block;
}

.thelio-mobile-links {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thelio-mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #0f172a);
  text-decoration: none;
  border-radius: 8px;
  background: var(--surface-sunken, #f8fafc);
}

.thelio-mobile-nav-link:hover {
  background: rgba(30, 115, 190, 0.08);
  color: var(--primary, #1E73BE);
}

.thelio-mobile-sublist {
  padding: 6px 0 6px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.thelio-mobile-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--ink-body, #475569);
  text-decoration: none;
  border-radius: 6px;
}

.thelio-mobile-sublink:hover {
  color: var(--primary, #1E73BE);
  background: rgba(30, 115, 190, 0.05);
}

/* Responsive Header Breakpoints */
@media (max-width: 1024px) {
  .thelio-nav-desktop {
    display: none;
  }
  .thelio-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* --- FOOTER UNIFIÉ THÉLIO --- */
.thelio-footer {
  background: var(--surface-dark, #06263d);
  color: #ffffff;
  padding: 64px 0 32px;
  font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.thelio-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.thelio-footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr 1.2fr 1.4fr;
  gap: 40px;
  margin-bottom: 48px;
}

.thelio-footer-brand-title {
  font-family: var(--font-display, 'Poppins', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 14px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.thelio-footer-brand-desc {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  max-width: 320px;
}

.thelio-footer-col-title {
  font-family: var(--font-display, 'Poppins', sans-serif);
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.thelio-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thelio-footer-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 13.5px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

.thelio-footer-link:hover {
  color: #ffffff;
  transform: translateX(2px);
}

.thelio-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.thelio-footer-legal-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.thelio-footer-legal-btn {
  color: rgba(255, 255, 255, 0.6);
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.thelio-footer-legal-btn:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .thelio-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .thelio-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .thelio-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- MODALES LÉGALES & INFOS (DESIGN SYSTEM THÉLIO) --- */
.thelio-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 75, 114, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.thelio-modal-overlay.is-open {
  display: flex;
}

.thelio-modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  border-radius: var(--radius-panel, 16px);
  box-shadow: 0 25px 50px -12px rgba(8, 75, 114, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: thelioModalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes thelioModalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.thelio-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface-sunken, #f8fafc);
}

.thelio-modal-title {
  font-family: var(--font-display, 'Poppins', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--secondary, #084B72);
  margin: 0;
}

.thelio-modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--ink-muted, #64748b);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.thelio-modal-close:hover {
  color: var(--ink, #0f172a);
  background: rgba(0, 0, 0, 0.05);
}

.thelio-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-body, #475569);
}

.thelio-modal-body h4 {
  color: var(--secondary, #084B72);
  margin: 16px 0 8px;
  font-size: 15px;
}

.thelio-modal-body p {
  margin-bottom: 12px;
}

.thelio-modal-body ul {
  margin: 8px 0 16px 20px;
}

.thelio-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
  display: flex;
  justify-content: flex-end;
  background: var(--surface-sunken, #f8fafc);
}
