/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button, a {
  outline: none;
}

::selection {
  background: rgba(162, 198, 236, 0.25);
  color: inherit;
}

/* ===== FONTS ===== */
@font-face {
  font-family: "Satoshi";
  src: url("font/Satoshi-Light.otf") format("opentype");
  font-weight: 300;
}
@font-face {
  font-family: "Satoshi";
  src: url("font/Satoshi-Regular.otf") format("opentype");
  font-weight: 400;
}
@font-face {
  font-family: "Satoshi";
  src: url("font/Satoshi-Medium.otf") format("opentype");
  font-weight: 500;
}
@font-face {
  font-family: "Satoshi";
  src: url("font/Satoshi-Bold.otf") format("opentype");
  font-weight: 700;
}
@font-face {
  font-family: "Satoshi";
  src: url("font/Satoshi-Black.otf") format("opentype");
  font-weight: 900;
}

html, body {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: #0f172a;
}

body.acceuil {
  background: #ffffff;
}

/* ===== AMBIENT BG ===== */
.ambient-bg {
  position: fixed;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  z-index: -1;
  background:
    radial-gradient(900px 900px at 20% 30%, rgba(162, 198, 236, 0.35), transparent 70%),
    radial-gradient(800px 800px at 80% 60%, rgba(162, 198, 236, 0.25), transparent 70%);
  animation: ambientMove 28s ease-in-out infinite alternate;
}

@keyframes ambientMove {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(-60px, -40px); }
}

/* ===== TOP BANNER ===== */
.top-banner {
  position: relative;
  width: 100%;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  z-index: 100;
}

.top-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(162, 198, 236, 0.12) 50%, transparent 100%);
  animation: bannerShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bannerShimmer {
  0%   { left: -60%; }
  100% { left: 120%; }
}

.top-banner strong {
  color: #a2c6ec;
  font-weight: 700;
}

.top-banner-sep {
  opacity: 0.35;
}

.top-banner-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a2c6ec;
  flex-shrink: 0;
  animation: dotPulse 2.4s ease-in-out infinite;
}

@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(162, 198, 236, 0.7); }
  60%  { box-shadow: 0 0 0 6px rgba(162, 198, 236, 0); }
  100% { box-shadow: 0 0 0 0 rgba(162, 198, 236, 0); }
}

/* ===== HEADER ===== */
header {
  height: 56px;
  margin: 20px;
  padding: 0 28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

.logo {
  width: 200px;
  font-weight: 600;
  font-size: 18px;
  color: #0f172a;
}

.contact-header {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.contact-header:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14);
}

/* Chat header nav */
.contact {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, transform 0.15s ease;
}

.contact:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

.contactPrimary {
  background-color: #0f172a;
  color: #fff;
}

.contactPrimary:hover {
  background-color: #0f172a;
  border-color: rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

/* ===== ACCUEIL ===== */
.home {
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-content {
  text-align: center;
  padding: 20px;
  margin-bottom: 40px;
  margin-top: -20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.home-content h1 {
  font-size: 47px;
  font-weight: 600;
  margin-bottom: 0;
}

.home-content p {
  font-size: 18px;
  color: #475569;
  margin: 0 auto 22px;
}

.bold {
  font-weight: 600;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #224392;
  background: rgba(162, 198, 236, 0.35);
  border-radius: 999px;
}

.hero-badge img {
  width: 20px;
  margin-right: 10px;
}

/* Phrase crossfade */
.phrase-rotate {
  font-size: 22px;
  font-weight: 300;
  color: #0f172a;
  font-style: italic;
  letter-spacing: -0.01em;
  margin-top: 28px;
  margin-bottom: 72px;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
  min-height: 1.5em;
}

.phrase-rotate.phrase-out {
  opacity: 0;
  transform: translateY(-8px);
}

/* Avatar group */
.avatar-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto 18px;
}

.advisor-avatar-side {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 0;
  flex-shrink: 0;
  background: #dce9f5;
  box-shadow:
    0 0 0 2.5px rgba(255, 255, 255, 0.75),
    0 0 0 4px rgba(162, 198, 236, 0.3);
  opacity: 0.55;
  filter: grayscale(30%);
}

.advisor-avatar-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.advisor-avatar-side.left  { margin-right: -22px; }
.advisor-avatar-side.right { margin-left: -22px; }

.advisor-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  background: #dce9f5;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.85),
    0 0 0 5px rgba(162, 198, 236, 0.45),
    0 8px 24px rgba(15, 23, 42, 0.18);
}

.advisor-avatar img,
.advisor-avatar-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* Actions */
.actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.actions-row {
  display: flex;
  flex-direction: row;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  background: #0f172a;
  color: #fff;
  padding: 17px 34px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: auto;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1.5px rgba(162, 198, 236, 0.55),
    0 0 28px rgba(162, 198, 236, 0.55),
    0 0 56px rgba(162, 198, 236, 0.28),
    0 6px 20px rgba(15, 23, 42, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1.5px rgba(162, 198, 236, 0.7),
    0 0 40px rgba(162, 198, 236, 0.7),
    0 0 80px rgba(162, 198, 236, 0.38),
    0 8px 28px rgba(15, 23, 42, 0.45);
}

.btn-secondary {
  background: #1e293b;
  color: #fff;
  padding: 17px 34px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: auto;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.22);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.38);
}

.btn-primaryFORM {
  background: #0f172a;
  color: #fff;
  padding: 16px 28px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  width: auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primaryFORM:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
}

.info-link {
  margin-top: 6px;
  background: none;
  border: none;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
}

.info-link:hover {
  color: #0f172a;
  text-decoration: underline;
}

/* Animations */
.fade-up {
  opacity: 0;
  animation: fadeUp 0.8s ease-out forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-titre { display: none; }
.pc-titre     { display: block; }

/* ===== CHAT ===== */
.HeaderChat { width: 100%; }

.chat-container {
  height: 90vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 20px;
}

.chat-container iframe {
  width: 70%;
  height: 90%;
  border: none;
  box-shadow: 0 0 20px #e8e6e6;
  border-radius: 20px;
}

.chat-container.animate {
  animation: iframeFadeUp 0.8s ease-out forwards;
}

@keyframes iframeFadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.Notice {
  font-size: 12px;
  padding: 5px 0;
  opacity: 0.7;
  font-style: italic;
  font-weight: 100;
  text-align: center;
  width: 90%;
}

.bodychat {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* ===== FOOTER ===== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5vh;
  background: transparent;
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #94a3b8;
  opacity: 0.7;
  pointer-events: none;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #fff;
  padding: 32px;
  width: 90%;
  max-width: 420px;
  border-radius: 14px;
  text-align: center;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.35s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
  opacity: 1;
}

.modal.small {
  max-width: 320px;
  padding: 20px;
}

.modal h2 { margin-top: 0; margin-bottom: 8px; }
.modal h3 { margin-top: 0; }

.modal p {
  color: #475569;
  margin-bottom: 20px;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal input {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
}

.modal .close {
  margin-top: 16px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
}

.FormLogo {
  width: 35px;
  padding-bottom: 20px;
}

.menu-action {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}

.menu-action:hover {
  background: #f9fafb;
}

/* ===== FAQ ===== */
.faq-item {
  border-top: 1px solid #e5e7eb;
  padding: 12px 0;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-icon {
  font-size: 18px;
  transition: transform 0.25s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  font-size: 14px;
  color: #475569;
}

.faq-item.active .faq-answer { max-height: 300px; }
.faq-item.active .faq-icon   { transform: rotate(45deg); }

#faqModal .modal {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 20px;
}

#faqModal .modal::-webkit-scrollbar       { width: 6px; }
#faqModal .modal::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.2); border-radius: 6px; }
#faqModal .modal::-webkit-scrollbar-track { background: transparent; }

/* ===== MOBILE HEADER ===== */
.HeaderMobile {
  background: none;
  width: 90%;
  display: none;
  justify-content: flex-end;
  margin: 0;
  height: 50px;
  padding: 35px 20px 20px;
  border-radius: 0 0 15px 15px;
  align-items: center;
}

.more-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.more-btn img       { height: 30px; opacity: 0.85; }
.more-btn:active img { opacity: 1; transform: scale(0.95); }

.logoHeaderMobile { width: 30px; }

/* ===== PAGE TRANSITION ===== */
#page-transition {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#page-transition.active {
  opacity: 1;
  pointer-events: all;
}

body.loading #page-transition {
  opacity: 1;
  pointer-events: all;
}

.loader {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(15, 23, 42, 0.15);
  border-top-color: #0f172a;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

/* ===== MOBILE ===== */
@media only screen and (max-width: 768px) {

  html, body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  /* Banner */
  .top-banner {
    font-size: 11px;
    padding: 9px 14px;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.6;
    text-align: center;
  }

  /* Header */
  header {
    justify-content: center;
    margin: 10px 14px;
    height: 48px;
  }

  .contact-header { display: none; }

  /* Home */
  .home {
    height: auto;
    align-items: center;
    padding-bottom: 50px;
  }

  .home-content {
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 0 24px;
  }

  .home-content p {
    font-size: 15px;
    margin-bottom: 18px;
  }

  .pc-titre     { display: none; }
  .mobile-titre { display: block; margin-top: 0; }

  .home-content h1 {
    font-size: 34px;
    height: auto;
    line-height: 1.15;
    margin-bottom: 0;
  }

  .phrase-rotate {
    font-size: 15px;
    margin-top: 10px;
    margin-bottom: 24px;
    opacity: 0.6;
  }

  /* Avatar */
  .avatar-group { margin: 10px auto 12px; }

  .advisor-avatar { width: 82px; height: 82px; }

  .advisor-avatar-side { width: 60px; height: 60px; }
  .advisor-avatar-side.left  { margin-right: -18px; }
  .advisor-avatar-side.right { margin-left: -18px; }

  /* Buttons */
  .actions     { width: 100%; gap: 12px; }
  .actions-row { flex-direction: column; gap: 10px; width: 100%; }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 320px;
    padding: 16px 24px;
    font-size: 15px;
  }

  /* Footer */
  footer {
    position: relative;
    height: auto;
    padding: 16px 20px;
    margin-top: 16px;
  }

  /* Chat */
  .HeaderChat    { display: none; }
  .HeaderMobile  { display: flex !important; position: absolute; z-index: 1000; }

  .chat-container {
    height: 86vh;
    justify-content: center;
    align-items: center;
  }

  .chat-container iframe {
    width: 90%;
    height: 100%;
    border-radius: 15px;
    margin: 0;
  }

  .Notice   { margin: 0; font-size: 10px; }
  .bodychat { justify-content: normal !important; padding-top: 20px; }
  .BadgePC  { margin-bottom: 16px; }

  .modal { max-width: 320px; }
}
