/* HEADER */

.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(3, 5, 11, 0.78);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  width: 100%;
  max-width: none;
  height: 86px;
  padding: 0 42px;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.logo {
  justify-self: start;
}

.nav-links {
  justify-self: center;
}

.nav-actions {
  justify-self: end;
}

.logo {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* BOUTONS HEADER */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-action-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.nav-action-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: var(--transition);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.18),
    rgba(0, 212, 255, 0.14),
    rgba(255, 45, 154, 0.16)
  );
}

.nav-action-btn:hover::before {
  opacity: 1;
}

.nav-action-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.38);
  box-shadow: 0 16px 45px rgba(0, 212, 255, 0.12);
}

.nav-action-btn span {
  position: relative;
  z-index: 1;
}

.logout-btn {
  min-width: 175px;
  border-color: rgba(255, 45, 154, 0.45);
  background:
    linear-gradient(rgba(3, 5, 11, 0.92), rgba(3, 5, 11, 0.92)) padding-box,
    linear-gradient(135deg, rgba(255, 45, 154, 0.55), rgba(0, 212, 255, 0.35)) border-box;
}

.logout-btn:hover {
  border-color: transparent;
  box-shadow:
    0 16px 45px rgba(255, 45, 154, 0.16),
    0 0 35px rgba(0, 212, 255, 0.08);
}

.nav-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.download-btn {
  display: none;
  min-width: 138px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  background: rgba(24, 25, 31, 0.88);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  isolation: isolate;
}

.download-btn::before {
  content: "";
  position: absolute;
  inset: -120%;
  z-index: 0;
  opacity: 1;
  background:
    conic-gradient(
      from 180deg,
      transparent 0deg,
      transparent 42deg,
      rgba(0, 212, 255, 0.85) 70deg,
      transparent 110deg,
      transparent 220deg,
      rgba(139, 92, 246, 0.78) 250deg,
      transparent 286deg,
      transparent 360deg
    );
  animation: loginBorderSpin 3.6s linear infinite;
}

.download-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: inherit;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.14) 1px, transparent 1.4px) right center / 13px 13px,
    linear-gradient(180deg, rgba(35, 36, 43, 0.96), rgba(24, 25, 31, 0.96));
}

.download-btn:hover {
  border-color: transparent;
  box-shadow:
    0 18px 48px rgba(0, 212, 255, 0.14),
    0 0 36px rgba(139, 92, 246, 0.10);
}

.download-btn span {
  z-index: 2;
}

.login-btn {
  min-width: 140px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(24, 25, 31, 0.88);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  isolation: isolate;
}

.login-btn::before {
  content: "";
  position: absolute;
  inset: -120%;
  z-index: 0;
  opacity: 1;
  background:
    conic-gradient(
      from 0deg,
      transparent 0deg,
      transparent 46deg,
      #ff6b00 72deg,
      transparent 108deg,
      transparent 210deg,
      rgba(0, 212, 255, 0.7) 236deg,
      transparent 270deg,
      transparent 360deg
    );
  animation: loginBorderSpin 3.2s linear infinite;
}

.login-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: inherit;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.16) 1px, transparent 1.4px) right center / 13px 13px,
    linear-gradient(180deg, rgba(35, 36, 43, 0.96), rgba(24, 25, 31, 0.96));
}

.login-btn:hover {
  border-color: transparent;
  box-shadow:
    0 18px 48px rgba(255, 107, 0, 0.12),
    0 0 36px rgba(0, 212, 255, 0.10);
}

.login-btn .nav-icon svg {
  display: none;
}

.login-btn span {
  z-index: 2;
}

.login-btn .nav-icon {
  order: 2;
}

.login-btn span:not(.nav-icon) {
  order: 1;
}

.login-btn .nav-icon::before {
  content: "→";
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

@keyframes loginBorderSpin {
  to {
    transform: rotate(360deg);
  }
}

/* PROFIL HEADER */

.profile-menu {
  position: relative;
  display: none;
}

.notifications-menu {
  position: relative;
}

.notifications-trigger {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  transition: var(--transition);
}

.notifications-trigger:hover,
.notifications-menu.open .notifications-trigger {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  transform: none;
}

.notifications-trigger svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notifications-badge {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: #ffffff;
  background: #ff315d;
  border: 2px solid rgba(3, 5, 11, 0.98);
  display: none;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.notifications-badge.visible {
  display: grid;
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 380px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(5, 8, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
}

.notifications-menu.open .notifications-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 14px;
}

.notifications-head strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.notifications-read-all {
  padding: 0;
  color: var(--blue);
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
  transition: var(--transition);
}

.notifications-read-all:hover {
  color: var(--text);
}

.notifications-list {
  display: grid;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-top: 8px;
  padding-right: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.notifications-list::-webkit-scrollbar {
  width: 8px;
}

.notifications-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.notifications-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(0, 212, 255, 0.78), rgba(139, 92, 246, 0.72));
  border: 2px solid rgba(5, 8, 20, 0.96);
}

.notifications-list::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(0, 212, 255, 0.95), rgba(139, 92, 246, 0.88));
}

.notifications-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.72) rgba(255, 255, 255, 0.045);
}

.notification-item {
  min-height: 76px;
  padding: 14px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  transition: var(--transition);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 212, 255, 0.22);
}

.notification-item.is-read {
  opacity: 0.66;
}

.notification-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.notification-item p {
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.notification-author {
  display: block;
  margin-top: 8px;
  color: #d7dbe8;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.notification-item small {
  display: block;
  margin-top: 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.notification-type-icon {
  color: var(--muted);
  padding-top: 1px;
}

.notification-type-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-item[data-notification-type="info"] .notification-type-icon {
  color: var(--blue);
}

.notification-item[data-notification-type="update"] .notification-type-icon {
  color: #a78bfa;
}

.notification-item[data-notification-type="warning"] .notification-type-icon {
  color: var(--orange);
}

.notification-empty {
  min-height: 112px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
  padding: 12px;
}

.profile-menu.visible {
  display: block;
}

.profile-trigger {
  height: 58px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: var(--transition);
}

.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.045);
}

.profile-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  display: block;
}

.profile-avatar-wrap img {
  width: 50px;
  height: 50px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.profile-online-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--bg);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.8);
}

.profile-arrow {
  width: 22px;
  height: 22px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.profile-arrow svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-menu.open .profile-arrow {
  color: var(--text);
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 285px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(5, 8, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
}

.profile-menu.open .profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-user-box {
  padding: 8px 10px 14px;
}

.profile-user-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.profile-user-box strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-separator {
  width: 100%;
  height: 1px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.09);
}

.profile-dropdown-link {
  width: 100%;
  min-height: 56px;
  padding: 0 12px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.profile-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.07);
}

.profile-logout-link:hover {
  background: rgba(255, 45, 154, 0.10);
}

.profile-dropdown-icon {
  width: 26px;
  height: 26px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-dropdown-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* État connecté */
body.user-connected .download-btn {
  display: inline-flex;
}

body.user-connected .login-btn {
  display: none;
}

body.user-connected [data-auth-profile] {
  display: block;
}

.menu-btn {
  display: none;
  width: 45px;
  height: 45px;
  background: transparent;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 29px;
  height: 3px;
  background: var(--text);
  margin: 6px auto;
  border-radius: 20px;
  transition: var(--transition);
}

.menu-btn.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* SECTIONS */

.section {
  max-width: var(--max-width);
  margin: auto;
  padding: 95px 24px;
}

.page-hero {
  padding: 165px 24px 60px;
}

.section-heading,
.page-title {
  max-width: 850px;
  margin: 0 auto 58px;
  text-align: center;
}

.section-heading > span,
.page-title > span,
.split-text > span,
.contact-info > span,
.cta-section > div > span {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--blue);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(0, 212, 255, 0.42);
}

.section-heading > span::before,
.page-title > span::before,
.split-text > span::before,
.contact-info > span::before,
.cta-section > div > span::before {
  content: "";
  width: 22px;
  height: 1px;
  flex: 0 0 22px;
  background: linear-gradient(90deg, transparent, var(--blue));
  opacity: 0.9;
}

.section-heading h2,
.page-title h1,
.split-text h2,
.cta-section h2,
.contact-info h2 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 18px 0;
}

.section-heading p,
.page-title p,
.split-text p,
.cta-section p,
.contact-info p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

/* CTA */

.cta-section {
  --cta-x: 50%;
  --cta-y: 50%;
  --cta-tilt-x: 0deg;
  --cta-tilt-y: 0deg;
  --cta-angle: 135deg;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: var(--max-width);
  margin: 50px auto 100px;
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at var(--cta-x) var(--cta-y), rgba(0, 212, 255, 0.16), transparent 34%),
    linear-gradient(var(--cta-angle), rgba(139, 92, 246, 0.10), rgba(0, 212, 255, 0.045), rgba(255, 45, 154, 0.08)),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateX(var(--cta-tilt-x)) rotateY(var(--cta-tilt-y));
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
  will-change: transform, background;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--cta-x) var(--cta-y), rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(var(--cta-angle), transparent 22%, rgba(0, 212, 255, 0.12), transparent 68%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cta-section > * {
  position: relative;
  z-index: 1;
}

.cta-section:hover,
body.animations-ready .cta-section.reveal.visible:hover {
  border-color: rgba(0, 212, 255, 0.28);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42), 0 0 44px rgba(0, 212, 255, 0.08);
  transform: perspective(1200px) translateY(-5px) rotateX(var(--cta-tilt-x)) rotateY(var(--cta-tilt-y));
}

.cta-section:hover::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cta-section,
  .cta-section::before {
    transition: none;
  }

  .cta-section:hover,
  body.animations-ready .cta-section.reveal.visible:hover {
    transform: none;
  }
}

/* FOOTER */

.footer {
  padding: 34px clamp(190px, 22vw, 560px);
  min-height: 108px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.72);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.footer-copy {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #d7dbe3;
  font-size: 15px;
  font-weight: 700;
}

.footer-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #eaff21;
  box-shadow: 0 0 20px rgba(234, 255, 33, 0.9);
  flex: 0 0 auto;
}

.footer-trust {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  color: #f2f4f7;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.footer-trust svg,
.footer-social-link svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-trust svg {
  width: 18px;
  height: 18px;
  color: #eaff21;
}

.footer-separator-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #eaff21;
  box-shadow: 0 0 12px rgba(234, 255, 33, 0.75);
}

.footer-socials {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-socials > span {
  color: #d7dbe3;
  font-size: 15px;
  font-weight: 700;
}

.footer-socials::before {
  display: none;
}

.footer-social-link {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #f2f4f7;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.footer-social-link:hover {
  color: var(--blue);
  border-color: rgba(0, 212, 255, 0.36);
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-3px);
}

.footer-social-link svg {
  width: 20px;
  height: 20px;
}
