/* ============================
   Base - Général
============================ */
body {
  background-color: #a5662a;
  color: #000;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
}

/* ============================
   Navbar
============================ */
.navbar {
  padding: 0.5rem 1rem;
}

.navbar-brand span {
  font-weight: bold;
  font-size: 1.2rem;
}

.nav-link {
  font-size: 0.95rem;
}

.nav-link:hover {
  color: #ffcc00 !important;
}

.navbar-text {
  font-size: 0.95rem;
}

#checkout-navbar {
  background-color: #ffcc00;
  color: #000;
  font-weight: 500;
  transition: all 0.3s ease;
}

#checkout-navbar:hover {
  background-color: #e6b800;
  color: #000;
  transform: translateY(-2px);
}

/* ============================
   Boutons
============================ */
.btn {
  border-radius: 0.25rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
}
.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

.btn-dark {
  background-color: #343a40;
  border-color: #343a40;
  color: #fff;
}
.btn-dark:hover {
  background-color: #23272b;
  border-color: #1d2124;
}

.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-warning {
  background-color: #ffcc00;
  border-color: #ffcc00;
  color: #000;
}
.btn-warning:hover {
  background-color: #e6b800;
  border-color: #e6b800;
}

.btn-success {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
}
.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.btn-outline-primary {
  color: #007bff;
  border-color: #007bff;
}
.btn-outline-primary:hover {
  background-color: #007bff;
  color: #fff;
}

.btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
}
.btn-outline-danger:hover {
  background-color: #dc3545;
  color: #fff;
}

.btn-outline-warning {
  color: #ffcc00;
  border-color: #ffcc00;
}
.btn-outline-warning:hover {
  background-color: #ffcc00;
  color: #000;
}

/* ============================
   Containers et Cards
============================ */
.container {
  padding: 20px;
}

.card {
  background-color: #fffbe6;
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ============================
   Formulaires
============================ */
form .form-group,
form .mb-3 {
  margin-bottom: 1rem;
}

input.form-control,
textarea.form-control {
  border-radius: 0.25rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  width: 100%;
}

input.form-control:focus,
textarea.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* ============================
   Alertes
============================ */
.alert {
  border-radius: 0.25rem;
  padding: 0.75rem 1.25rem;
}

/* ============================
   Tables
============================ */
table {
  border-collapse: collapse;
  width: 100%;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 8px;
}

table th {
  background-color: #333;
  color: #fff;
  text-align: left;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* ============================
   Landing Page
============================ */
.landing-hero {
  min-height: 70vh;
  background: linear-gradient(100deg, #a5662a 0%, #f7c873 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-hero h1,
.landing-hero p {
  color: #fff;
}

.subscription {
  text-align: center;
  padding: 4rem 2rem;
}

/* ============================
   Popups / Messages
============================ */
#popup-message {
  display: none;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    display: none;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* ============================
   Success / Cancel Pages
============================ */
.text-success {
  color: #28a745 !important;
}
.text-danger {
  color: #dc3545 !important;
}

/* ============================
   Chatbot Flottant
============================ */

/* Le bouton flottant */
#openChatBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #a5662a;
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: all 0.3s ease;
}

#openChatBtn:hover {
  background-color: #8b5423;
  transform: translateY(-2px);
}

/* La fenêtre du chatbot */
#chatbot {
  /* Je cache par défaut */
  display: none;
  flex-direction: column;
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  max-height: 500px;
  background: #fefdfb;
  border: 2px solid #a5662a;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  overflow: hidden;
}

/* Header du chatbot */
.chat-header {
  background: linear-gradient(135deg, #a5662a 0%, #8b5423 100%);
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h2 {
  margin: 0;
  font-size: 16px;
}

#closeChatBtn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

/* Chat box */
.chat-box {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #fefdfb;
}

.message {
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 15px;
  max-width: 80%;
}

.message.user {
  background: #a5662a;
  color: white;
  margin-left: auto;
  text-align: right;
}

.message.bot {
  background: #f5e6d3;
  color: #5a3d1f;
  margin-right: auto;
  border: 1px solid #d4a574;
}

.input-container {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid #d4a574;
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #a5662a;
}

.send-btn {
  background: #a5662a;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
}

/* ============================
   Responsive
============================ */
@media (max-width: 768px) {
  .navbar-brand span {
    font-size: 1rem;
  }
  .nav-link {
    font-size: 0.85rem;
  }
  .container {
    padding: 10px;
  }
  .card {
    padding: 1rem;
  }
  .btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  #chatbot {
    width: 90%;
    bottom: 80px;
    right: 5%;
  }
}
