:root {
  --primary-color: #544fc5;
  --text-dark: #121f3d;
  --text-medium: #2d3e60;
  --text-light: #cccaee;
  --accent-color: #5c6ac4;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-strong: rgba(0, 0, 0, 0.2);
}

/* Global structure */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Quicksand', sans-serif;
  background: url('https://be-cloud.ch/wp-content/uploads/Colin/Fond.png') no-repeat center center fixed;
  background-size: cover;
  color: #000;
  scroll-behavior: smooth;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

/* Fade animation */
.fade-in {
  opacity: 0;
  animation: fadeInUp 1.2s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Welcome banner */
.welcome-banner {
  text-align: center;
  margin: 30px 0 -10px;
}

.welcome-banner h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

/* Logo */
.logo {
  margin: 0 auto;
  height: 40px;
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  background-color: transparent;
  padding: 30px 0;
}

.nav-container {
  background-color: white;
  border-radius: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 900px;
  height: 50px;
  box-shadow: 0 4px 12px var(--shadow-light);
  overflow: visible;         /* important */
  position: relative;        /* ✅ nécessaire */
  z-index: 10;               /* ✅ surélève */
}

nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: black;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

nav a:hover {
  background-color: black;
  color: white;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.nav-container a:hover {
  text-decoration: none !important;
}

nav a.active {
  position: relative;
  color: var(--primary-color);
  font-weight: 600;
}

nav a.active::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 20%;
  width: 60%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 5px;
  animation: slideIn 0.4s ease forwards;
}

nav a.active:hover {
  background-color: transparent;
  color: #2b3c79;
  transform: none;
  cursor: default;
}

@keyframes slideIn {
  from {
    width: 0;
    left: 50%;
  }
  to {
    width: 60%;
    left: 20%;
  }
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  text-decoration: none;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  border-radius: 25px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 8px;
  min-width: 160px;
  z-index: 1000; /* ✅ indispensable */
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #000;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background-color: black;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* Header */
header {
  text-align: center;
  margin: 20px 0;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Cards */
.cards-accueil {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 30px;
  padding: 40px 20px 80px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeIn 3s ease-out forwards;
}

.card-accueil {
  width: 218px;
  height: 397px;
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  color: white;
  padding: 20px;
  position: relative;
  box-shadow: 0 8px 20px var(--shadow-strong);
  transition: transform 0.3s;
  will-change: transform;
}

.card-accueil:hover {
  transform: translateY(-10px);
}

.card-accueil.middle {
  margin-bottom: 25px;
}

.card-accueil .btn {
  position: absolute;
  bottom: 17px;
  right: 11px;
  background: transparent;
  color: transparent;
  border: none;
  padding: 3px 6px;
  border-radius: 20px;
  font-size: 0.8rem;
  text-decoration: none;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 40px 20px 20px;
  font-family: 'Quicksand', sans-serif;
  width: 100%;
  box-sizing: border-box;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
}

.footer-logo img {
  height: 40px;
}

.footer-center {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-light);
}

.footer-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 16px;
  border: 1px solid var(--text-light);
  border-radius: 6px;
  color: var(--text-light);
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.footer-btn:hover {
  background-color: var(--text-light);
  color: var(--text-dark);
}

/* Main Section */
.main-section {
  padding: 60px 20px 80px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.section-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-medium);
  margin-bottom: 10px;
}

.description {
  font-size: 1rem;
  color: #4a5e7a;
  line-height: 1.6;
}

.table-placeholder {
  margin-top: 40px;
}

/* FAQ */
.faq-section {
  max-width: 900px;
  margin: 60px auto 0;
  padding: 0 20px;
  font-family: 'Quicksand', sans-serif;
  text-align: left;
}

.faq-title {
  font-size: 2.8rem;
  color: var(--text-dark);
  margin-bottom: 40px;
}

.faq-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--shadow-light);
  padding: 20px 25px;
  margin-bottom: 20px;
  transition: transform 0.3s;
  border-top: 1px solid #ddd;
}

.faq-item:last-child {
  border-bottom: 1px solid #ddd;
}

.faq-item:hover {
  transform: translateY(-2px);
}

.faq-question {
  background: none;
  border: none;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: #1e1e2f;
  position: relative;
  padding: 0;
  transition: color 0.3s;
}

.faq-question::before {
  content: "❓";
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-right: 10px;
  position: relative;
  left: -5px;
}

.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
  padding-top: 0;
  font-size: 1rem;
  color: #444;
}

.faq-question.active + .faq-answer {
  opacity: 1;
  transform: translateY(0);
}

.faq-answer p,
.faq-answer ul {
  margin-top: 15px;
  color: #3b3b3b;
}

.faq-answer ul {
  padding-left: 20px;
  list-style: disc;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container,
  .cards-accueil {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-container {
    flex-direction: column;
    height: auto;
    border-radius: 20px;
  }

  nav a {
    width: 100%;
    padding: 10px 0;
    border-radius: 20px;
  }

  .footer-right {
    justify-content: center;
  }
}

/* Bouton principal */
#chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  padding: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.25s ease;
  z-index: 1001;
}

#chatbot-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#chatbot-toggle:hover {
  animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 120, 212, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 8px rgba(0, 120, 212, 0.3); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 120, 212, 0.4); }
}

#chatbot-toggle.rebound {
  animation: rebound 0.5s ease-in-out;
}

@keyframes rebound {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3); }
  50%  { transform: scale(0.85); }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes rebound-loop {
  0%, 100%   { transform: translateY(0); }
  50%        { transform: translateY(-6px); }
}

#chatbot-toggle.attention {
  animation: rebound-loop 1.5s ease-in-out infinite;
}

/* Bouton reset */
#chatbot-reset {
  position: fixed;
  bottom: 26px;
  right: 90px;
  background-color: #ffffff;
  color: #0078D4;
  border: 1px solid #d0d0d0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 1002;
  display: none;
}

#chatbot-reset:hover {
  background-color: #f3f9ff;
  transform: scale(1.05);
}

/* Conteneur bot */
#chatbot-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 340px;
  height: 480px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: none;
  opacity: 0;
  overflow: hidden;
}

#chatbot-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* Animations */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOutDown {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(20px); }
}

#chatbot-container.show {
  animation: fadeInUp 0.3s ease-out forwards;
}

#chatbot-container.hide {
  animation: fadeOutDown 0.3s ease-in forwards;
}

/* Responsive */
@media (max-width: 500px) {
  #chatbot-container {
    width: 90%;
    height: 70%;
    right: 5%;
    bottom: 80px;
  }

  #chatbot-toggle {
    width: 44px;
    height: 44px;
    padding: 4px;
  }

  #chatbot-reset {
    width: 36px;
    height: 36px;
    font-size: 14px;
    bottom: 26px;
    right: 80px;
  }
}

/* Animation subtile de rebond classe */
@keyframes attention-rebound {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

#chatbot-toggle.attention {
  animation: attention-rebound 1.2s ease-in-out infinite;
}




