:root {
  --primary-color: #243e66;
  --secondary-color: #47b7d7;
  --text-color: #333;
  --light-text: #6c757d;
  --border-color: #dee2e6;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --dark-bg: #343a40;
  --light-bg: #f8f9fa;
  --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --dark-text: #f5f5f5;
  --overlay-color: rgba(0, 0, 0, 0.3);
}

body {
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dark-mode {
  background-color: #1a1a1a;
  color: #ffffff;
}

.dark-mode .bg-white,
.dark-mode .navbar-light,
.dark-mode .navbar-collapse,
.dark-mode .airfrance-menu {
  background-color: #252525 !important;
  color: var(--dark-text);
}

.dark-mode .card,
.dark-mode .info-box {
  background-color: rgba(40, 40, 40, 0.95);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .card-title,
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode .text-dark {
  color: #f0f0f0 !important;
}

.dark-mode .text-muted {
  color: #aaaaaa !important;
}

.dark-mode .airfrance-menu .nav-link {
  color: #f0f0f0;
}

.dark-mode .airfrance-menu .nav-item:hover,
.dark-mode .airfrance-menu .nav-item.active {
  border-color: var(--secondary-color);
}

.dark-mode .form-control {
  background-color: #3a3a3a;
  border-color: #505050;
  color: #f0f0f0;
}

.dark-mode .form-control:focus {
  background-color: #3a3a3a;
  color: #f0f0f0;
}

.dark-mode ::placeholder {
  color: #909090;
}

.dark-mode .btn-outline-primary {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.dark-mode .btn-outline-primary:hover {
  background-color: var(--secondary-color);
  color: #252525;
}

.dark-mode .btn-outline-primary.active {
  background-color: var(--secondary-color);
  color: #252525;
}

.dark-mode .chat-panel {
  background-color: #2d2d2d;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dark-mode .chat-footer {
  border-top-color: #404040;
}

.dark-mode .message.system {
  background-color: #404040;
  color: #f0f0f0;
}

.dark-mode
  .badge:not(.bg-success):not(.bg-danger):not(.bg-warning):not(
    .bg-secondary-custom
  ):not(.bg-primary-custom) {
  background-color: #505050 !important;
  color: #f0f0f0;
}

.dark-mode .border-top,
.dark-mode .border-bottom,
.dark-mode .border {
  border-color: #404040 !important;
}

.dark-mode .pagination .page-link {
  background-color: #333;
  border-color: #505050;
  color: #f0f0f0;
}

.dark-mode .pagination .page-item.active .page-link {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #252525;
}

.dark-mode .forecast-day {
  border-right-color: #404040;
}

.dark-mode .icon-feature {
  background-color: rgba(71, 183, 215, 0.15);
}

.bg-primary-custom {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.bg-secondary-custom {
  background-color: var(--secondary-color) !important;
  color: white !important;
}

.text-primary-custom {
  color: var(--primary-color) !important;
}

.text-secondary-custom {
  color: var(--secondary-color) !important;
}

.btn-primary-custom {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-primary-custom:hover {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: white !important;
}

.btn-secondary-custom {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: white !important;
}

.btn-secondary-custom:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.nav-link {
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--secondary-color) !important;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-color);
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.position-relative {
  position: relative !important;
  overflow: hidden;
}

.card {
  border: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.info-box {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.section-title {
  position: relative;
  padding-bottom: 15px;
  margin-bottom: 30px;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 3px;
}

.rounded-custom {
  border-radius: 10px;
}

.icon-feature {
  height: 60px;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(71, 183, 215, 0.1);
  margin-bottom: 15px;
  font-size: 1.5rem;
  border: 2px solid var(--secondary-color);
  transition: all 0.3s ease;
}

.icon-feature i {
  color: var(--secondary-color);
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.icon-feature:hover {
  background-color: rgba(71, 183, 215, 0.2);
  border-color: var(--secondary-color);
  transform: translateY(-3px);
}

.passage-icon {
  background-color: rgba(71, 183, 215, 0.2);
  border: 2px solid var(--secondary-color);
}

.passage-icon i {
  color: var(--secondary-color);
  font-size: 2rem;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.icon-feature .bi-ship-fill {
  color: var(--secondary-color);
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.weather-widget {
  position: relative;
  backdrop-filter: blur(5px);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.weather-icon {
  font-size: 4rem;
}

.port-selector {
  position: relative;
  transition: all 0.3s ease;
}

.port-selector:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.chat-container {
  height: 350px;
  overflow-y: auto;
}

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

.message-received {
  background-color: #f1f1f1;
  border-top-left-radius: 0;
  margin-right: auto;
}

.message-sent {
  background-color: var(--secondary-color);
  color: white;
  border-top-right-radius: 0;
  margin-left: auto;
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.25rem;
}

.service-item {
  transition: all 0.3s ease;
}

.service-item:hover {
  transform: translateY(-5px);
}

.forecast-day {
  width: 80px;
  text-align: center;
  padding: 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.forecast-day:last-child {
  border-right: none;
}

.chat-icon {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 1050;
  transition: all 0.3s ease;
}

.chat-icon i {
  font-size: 32px;
}

.chat-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid white;
}

.chat-icon:hover {
  transform: scale(1.1);
  background-color: var(--primary-color);
}

.chat-panel {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  height: 450px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 1049;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  overflow: hidden;
}

.chat-panel.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  background-color: var(--primary-color);
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.message-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 10px;
  position: relative;
}

.message p {
  margin: 0;
}

.message.system {
  background-color: #f1f1f1;
  align-self: flex-start;
}

.message.user {
  background-color: var(--secondary-color);
  color: white;
  align-self: flex-end;
}

.chat-footer {
  padding: 10px 15px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}

.chat-footer input {
  flex: 1;
}

.navbar-brand img {
  transition: all 0.3s ease;
  filter: brightness(1.2) contrast(1.1);
}

.logo-banner {
  background-color: var(--primary-color);
  padding: 8px 15px;
  display: inline-block;
  border-radius: 0;
}

#portLogo {
  filter: brightness(3) contrast(1.2);
  height: 60px;
  width: auto;
  transition: all 0.3s ease;
}

.navbar-brand {
  padding: 0;
  margin-right: 2rem;
}

.navbar-brand.ms-0 {
  margin-left: 0 !important;
}

.navbar {
  background-color: var(--primary-color) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  padding-left: 0 !important;
  z-index: 1000;
}

.navbar .container-fluid {
  padding-left: 0;
}

.nav-item .bi-chat-dots-fill {
  font-size: 1.2rem;
  color: var(--secondary-color);
  transition: all 0.3s ease;
}

.nav-item:hover .bi-chat-dots-fill {
  transform: scale(1.2);
}

.navbar-dark {
  background-color: var(--primary-color) !important;
  padding-left: 0;
}

.navbar-dark .navbar-nav .nav-link {
  color: #ffffff !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--secondary-color) !important;
}

.navbar-dark .navbar-brand {
  color: #ffffff !important;
}

.navbar-dark .theme-toggle {
  color: #ffffff !important;
}

.dark-mode .navbar {
  background-color: #252525 !important;
}

.dark-mode .navbar-dark .navbar-nav .nav-link {
  color: #f0f0f0 !important;
}

.dark-mode .navbar-dark .navbar-brand {
  color: #f0f0f0 !important;
}

.dark-mode .navbar-dark .theme-toggle {
  color: #f0f0f0 !important;
}

.login-btn {
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(71, 183, 215, 0.2);
  font-size: 0.85rem;
}

.login-btn:hover {
  box-shadow: 0 5px 15px rgba(71, 183, 215, 0.4);
}

.login-btn .bi-person-fill {
  font-size: 0.9rem;
}

.login-btn .bi-key-fill {
  font-size: 0.75rem;
  transform: rotate(45deg);
}

@media (min-width: 992px) {
  .logo-banner {
    padding: 10px 20px;
  }

  #portLogo {
    height: 70px;
  }
}

.map-container {
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.map-legend {
  display: flex;
  align-items: center;
}

.badge {
  padding: 6px 10px;
  font-weight: 500;
}

.maritime-status {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.maritime-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
}

.badge.bg-success {
  background-color: #28a745 !important;
}

.badge.bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

.actualite-img {
  max-height: 180px;
  object-fit: cover;
  width: 100%;
  height: auto !important;
}

.section-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

html {
  scroll-behavior: smooth;
}

.btn {
  transition: all 0.3s ease;
}

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

.airfrance-menu {
  display: flex;
  justify-content: flex-start;
}

.airfrance-menu .nav-item {
  position: relative;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.airfrance-menu .nav-item:hover {
  border-bottom: 3px solid var(--secondary-color);
}

.airfrance-menu .nav-item.active {
  border-bottom: 3px solid var(--secondary-color);
}

.airfrance-menu .nav-link {
  color: var(--primary-color);
  font-weight: 500;
  padding: 1rem 1.5rem;
  transition: color 0.3s ease;
}

.airfrance-menu .nav-link:hover {
  color: var(--secondary-color);
}

.airfrance-menu .nav-item:first-child {
  border-left: none;
}

.login-btn {
  background-color: transparent;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.login-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: none;
  box-shadow: none;
}

@media (max-width: 991.98px) {
  .airfrance-menu {
    flex-direction: column;
  }

  .airfrance-menu .nav-item {
    border-bottom: 1px solid #eee;
  }

  .airfrance-menu .nav-link {
    padding: 0.75rem 0;
  }

  .navbar-collapse {
    background: white;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
  }
}

.desktop-toggle {
  display: flex !important;
  font-size: 1.5rem;
  background-color: transparent;
  border: none;
  padding: 0.35rem 0.5rem;
  border-radius: 0.25rem;
}

.desktop-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.desktop-toggle:focus {
  box-shadow: none;
  outline: none;
}

.desktop-toggle .bi-list {
  font-size: 1.75rem;
}

.dark-mode .section-title,
.dark-mode .text-uppercase,
.dark-mode .text-primary-custom,
.dark-mode .card-body h3,
.dark-mode .card-body h4,
.dark-mode .card-body h5 {
  color: #f0f0f0 !important;
}

.dark-mode .section-title:after {
  background-color: var(--secondary-color);
}

.dark-mode #reservations,
.dark-mode #actualites {
  background-color: #1e1e1e !important;
}

.dark-mode .bg-light {
  background-color: #1e1e1e !important;
  color: var(--dark-text);
}

.dark-mode .card-text,
.dark-mode .card-body p {
  color: #d0d0d0 !important;
}

.dark-mode .small,
.dark-mode .text-secondary {
  color: #bbb !important;
}

.dark-mode .fs-4.fw-bold.text-primary-custom {
  color: var(--secondary-color) !important;
}

.hero-img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
  object-position: center;
  min-height: 500px;
  max-height: 800px;
}

@media (max-width: 768px) {
  .hero-img {
    height: 40vh;
    min-height: 400px;
  }
}

@media (min-width: 2000px) {
  .hero-img {
    height: auto;
    max-height: none;
    width: 100%;
  }
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Style du menu déroulant */
.dropdown-menu.bg-primary-custom {
    background-color: var(--primary-color) !important;
    border: none !important;
    padding: 0 !important;
}

.dropdown-menu.bg-primary-custom .dropdown-item {
    color: white !important;
    background-color: transparent !important;
    padding: 0.5rem 1rem !important;
}

.dropdown-menu.bg-primary-custom .dropdown-item:hover {
    color: var(--secondary-color) !important;
    background-color: transparent !important;
}

/* Supprimer les styles personnalisés inutiles */
.custom-dropdown-menu,
.marina-dropdown-menu {
    display: none !important;
}

/* Navigation */
.navbar {
  z-index: 1000;
}

/* Footer */
footer {
  margin-top: auto;
  background-color: var(--primary-color) !important;
  color: white !important;
}

footer a {
  color: white !important;
}

footer a:hover {
  color: var(--secondary-color) !important;
}

/* Icônes et fonctionnalités */
.icon-feature {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(71, 183, 215, 0.1);
  border-radius: 50%;
}

/* Mode sombre */
.dark-mode {
  background-color: #1a1a1a;
  color: #ffffff;
}

.dark-mode .card {
  background: rgba(40, 40, 40, 0.95);
  color: #ffffff;
}

.dark-mode .info-box {
  background: rgba(40, 40, 40, 0.95);
  color: #ffffff;
}

/* Animations */
.section-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-img {
    height: 40vh;
  }
  
  .info-box {
    width: 90%;
    padding: 1.5rem !important;
  }
}

/* Dashboard Styles */
.dashboard-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.dashboard-card .card-header {
  background: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 1.5rem;
}

.dashboard-card .card-body {
  padding: 1.5rem;
}

.profile-header {
  background: linear-gradient(135deg, var(--bs-primary) 0%, #2c3e50 100%);
  color: white;
  padding: 3rem 0;
  margin-bottom: 2rem;
  border-radius: 0 0 30px 30px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--bs-primary);
  margin: 0 auto 1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.dashboard-nav .nav-pills .nav-link {
  border-radius: 10px;
  padding: 0.8rem 1.5rem;
  margin: 0.3rem;
  color: #6c757d;
}

.dashboard-nav .nav-pills .nav-link.active {
  background-color: var(--bs-primary);
  color: white;
}

.dashboard-table {
  margin-bottom: 0;
}

.dashboard-table th {
  border-top: none;
  font-weight: 600;
  color: #6c757d;
}

.dashboard-badge {
  padding: 0.5em 1em;
  border-radius: 8px;
}

.dashboard-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 500;
}

.stats-card {
  text-align: center;
  padding: 1.5rem;
}

.stats-number {
  font-size: 2rem;
  font-weight: 600;
  color: var(--bs-primary);
}

.stats-label {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Dark mode adjustments */
.dark-mode .dashboard-card {
  background-color: #2c3e50;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.dark-mode .dashboard-card:hover {
  box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.dark-mode .dashboard-card .card-header {
  border-bottom-color: rgba(255,255,255,0.1);
}

.dark-mode .dashboard-nav .nav-pills .nav-link {
  color: #adb5bd;
}

.dark-mode .dashboard-table th {
  color: #adb5bd;
}

.dark-mode .stats-label {
  color: #adb5bd;
}

/* Styles pour le chat */
.reactions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.reaction-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 1rem;
  transition: all 0.2s;
}

.reaction-btn:hover {
  background-color: #e9ecef;
}

.reaction-menu {
  min-width: auto;
  padding: 0.5rem;
}

.reaction-menu .dropdown-item {
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.reaction-option {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.25rem;
}

.reaction-option:hover {
  background-color: #f8f9fa;
}

.reaction-counts {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.reaction-display {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  background-color: rgba(0,0,0,0.05);
  padding: 0.125rem 0.375rem;
  border-radius: 1rem;
  flex-direction: row;
}

.reaction-display .count {
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: 500;
  order: -1;
  margin-right: 0.25rem;
}

.selected-reactions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.reaction-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #f8f9fa;
  font-size: 0.875rem;
}

.message {
  margin-bottom: 1rem;
}

.message-content {
  max-width: 80%;
  word-wrap: break-word;
}

.message-header {
  margin-bottom: 0.5rem;
}

.chat-messages {
  display: flex;
  flex-direction: column;
}

.message p {
  margin-bottom: 0.5rem;
}
