@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --app-bg: #f6f4ff;
  --app-surface: #ffffff;
  --app-primary: #4361ee;
  --app-primary-dark: #3a0ca3;
  --app-secondary: #7209b7;
  --app-accent: #ff006e;
  --app-warm: #ffb703;
  --app-success: #06d6a0;
  --app-text: #1b1740;
  --app-muted: #6b6892;
  --app-gradient: linear-gradient(135deg, #4361ee 0%, #7209b7 55%, #ff006e 100%);
  --app-gradient-warm: linear-gradient(135deg, #ffb703 0%, #fb5607 50%, #ff006e 100%);
  --app-radius: 20px;
  --app-shadow: 0 18px 45px rgba(58, 12, 163, 0.12);
  --app-shadow-hover: 0 26px 60px rgba(58, 12, 163, 0.22);
  --bs-primary: #4361ee;
  --bs-primary-rgb: 67, 97, 238;
  --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html {
  font-size: 15px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
	font-size: 16px;
  }
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--bs-body-font-family);
  color: var(--app-text);
  background: var(--app-bg);
  position: relative;
  overflow-x: hidden;
}

/* ===== Fond animé ===== */
.app-bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.app-bg-blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: blob-float 18s ease-in-out infinite alternate;
}

.app-bg-blobs span:nth-child(1) {
  width: 480px;
  height: 480px;
  background: #4361ee;
  top: -140px;
  left: -120px;
}

.app-bg-blobs span:nth-child(2) {
  width: 420px;
  height: 420px;
  background: #ff006e;
  top: 30%;
  right: -160px;
  animation-delay: -6s;
}

.app-bg-blobs span:nth-child(3) {
  width: 380px;
  height: 380px;
  background: #ffb703;
  bottom: -160px;
  left: 25%;
  animation-delay: -12s;
}

@keyframes blob-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.12); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

a {
  color: var(--app-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--app-accent);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

main > h1:first-child {
  font-weight: 800;
  background: var(--app-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1.25rem;
}

/* ===== Navbar ===== */
.app-navbar {
  background: var(--app-gradient);
  background-size: 200% 200%;
  animation: gradient-shift 12s ease infinite;
  box-shadow: 0 12px 35px rgba(114, 9, 183, 0.3);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.app-brand img {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
  transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1);
}

.app-brand:hover img {
  transform: rotate(-12deg) scale(1.12);
}

.app-brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.8;
  line-height: 1;
}

.app-navbar .nav-link {
  color: rgba(255, 255, 255, 0.92) !important;
  border-radius: 999px;
  padding: 0.45rem 1rem !important;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.show {
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
  transform: translateY(-1px);
}

.app-navbar .dropdown-menu {
  border: 0;
  border-radius: 16px;
  padding: 0.5rem;
  box-shadow: var(--app-shadow-hover);
  animation: dropdown-in 0.2s ease;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-navbar .dropdown-item {
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
}

.app-navbar .dropdown-item i {
  color: var(--app-secondary);
  font-size: 1.1rem;
}

.app-navbar .dropdown-item:hover {
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(255, 0, 110, 0.1));
  color: var(--app-primary-dark);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.65);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.navbar-toggler:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.22);
}

.app-main {
  padding-top: 1.75rem;
  flex: 1 0 auto;
}

/* ===== Hero ===== */
.hero-banner {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 2.25rem 2.25rem;
  padding-right: 11rem;
  box-shadow: var(--app-shadow);
  animation: fade-up 0.6s ease both;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--app-gradient);
}

.hero-banner::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  right: -60px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 183, 3, 0.35), transparent 70%);
}

.hero-title {
  font-weight: 800;
  background: var(--app-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  color: var(--app-muted);
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
}

.hero-icon {
  position: absolute;
  right: 2.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 104px;
  height: 104px;
  border-radius: 30px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: #fff;
  background: var(--app-gradient);
  box-shadow: 0 18px 40px rgba(114, 9, 183, 0.4);
  z-index: 1;
  animation: icon-float 4s ease-in-out infinite;
}

.hero-icon.warm {
  background: var(--app-gradient-warm);
  box-shadow: 0 18px 40px rgba(251, 86, 7, 0.4);
}

.hero-icon.success {
  background: linear-gradient(135deg, #06d6a0, #118ab2);
  box-shadow: 0 18px 40px rgba(6, 214, 160, 0.4);
}

.hero-illustration {
  position: absolute;
  right: 1rem;
  bottom: 0;
  height: 100%;
  max-height: 200px;
  z-index: 1;
  animation: icon-float 5s ease-in-out infinite;
}

@keyframes icon-float {
  0%, 100% { transform: translateY(-50%) rotate(-4deg); }
  50% { transform: translateY(calc(-50% - 10px)) rotate(4deg); }
}

.hero-illustration {
  animation-name: illu-float;
}

@keyframes illu-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 767.98px) {
  .hero-banner {
	padding: 1.75rem;
  }

  .hero-icon,
  .hero-illustration {
	display: none;
  }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Cartes ===== */
.card {
  border: 0;
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  animation: fade-up 0.5s ease both;
}

.card.shadow-sm {
  box-shadow: var(--app-shadow) !important;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(67, 97, 238, 0.1);
  padding: 1rem 1.25rem;
  border-top-left-radius: var(--app-radius) !important;
  border-top-right-radius: var(--app-radius) !important;
}

.card-header h2,
.card-header .h5 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--app-primary-dark);
}

.event-card {
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.3s ease;
}

.event-card::before {
  content: '';
  display: block;
  height: 6px;
  background: var(--app-gradient);
}

.event-card:hover {
  transform: translateY(-8px) rotate(-0.5deg);
  box-shadow: var(--app-shadow-hover);
}

.event-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: #fff;
  background: var(--app-gradient-warm);
  box-shadow: 0 10px 24px rgba(251, 86, 7, 0.35);
  margin-bottom: 1rem;
  transition: transform 0.35s ease;
}

.event-card:hover .event-card-icon {
  transform: scale(1.1) rotate(8deg);
}

.event-date,
.event-deadline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.event-date {
  background: rgba(67, 97, 238, 0.12);
  color: var(--app-primary-dark);
}

.event-deadline {
  background: rgba(255, 183, 3, 0.2);
  color: #b45309;
}

/* ===== Boutons ===== */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  border: 0;
  background: var(--app-gradient);
  background-size: 160% 160%;
  box-shadow: 0 10px 24px rgba(114, 9, 183, 0.3);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: var(--app-gradient);
  background-position: 100% 50%;
  box-shadow: 0 14px 30px rgba(114, 9, 183, 0.42);
  filter: brightness(1.05);
}

.btn-outline-primary {
  border-width: 2px;
  border-color: var(--app-primary);
  color: var(--app-primary);
}

.btn-outline-primary:hover {
  background: var(--app-primary);
  border-color: var(--app-primary);
}

.btn-secondary {
  border: 0;
  background: #ece9ff;
  color: var(--app-primary-dark);
}

.btn-secondary:hover {
  background: #ddd8ff;
  color: var(--app-primary-dark);
}

.btn-danger {
  border: 0;
  background: linear-gradient(135deg, #ff006e, #d00000);
  box-shadow: 0 10px 24px rgba(255, 0, 110, 0.3);
}

.btn-event {
  border-radius: 12px;
}

/* ===== Formulaires ===== */
.form-control,
.form-select {
  border-radius: 12px;
  border: 2px solid #e6e3fb;
  padding: 0.6rem 0.9rem;
  transition: border-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--app-primary);
}

.form-label {
  font-weight: 600;
  color: var(--app-primary-dark);
}

.form-check-input:checked {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
}

/* ===== Tableaux ===== */
.table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.table > thead th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--app-muted);
  border-bottom: 2px solid rgba(67, 97, 238, 0.15);
  background: rgba(67, 97, 238, 0.05);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: rgba(67, 97, 238, 0.035);
}

.table > tbody > tr {
  transition: background 0.15s ease;
}

.table > tbody > tr:hover > * {
  background: rgba(255, 0, 110, 0.05);
}

.table-bordered > :not(caption) > * > * {
  border-color: rgba(67, 97, 238, 0.1);
}

main > .table,
main > table {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--app-radius);
  overflow: hidden;
  box-shadow: var(--app-shadow);
}

.table-card {
  background: var(--app-surface);
  border-radius: var(--app-radius);
  padding: 1rem;
  box-shadow: var(--app-shadow);
}

tfoot th {
  background: rgba(114, 9, 183, 0.06);
}

#reservationTotal {
  background: var(--app-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* ===== Alertes ===== */
.alert {
  border: 0;
  border-radius: 16px;
  border-left: 5px solid;
  box-shadow: 0 8px 22px rgba(27, 23, 64, 0.06);
}

.alert-success { background: #e6fbf5; border-left-color: #06d6a0; color: #05664d; }
.alert-danger { background: #ffe8f1; border-left-color: #ff006e; color: #8a0040; }
.alert-info { background: #eaefff; border-left-color: #4361ee; color: #22307a; }
.alert-warning { background: #fff5dc; border-left-color: #ffb703; color: #7a4d00; }
.alert-secondary { background: #f3efff; border-left-color: #7209b7; color: #3a0c63; }

/* ===== Paiement ===== */
.payment-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--app-radius);
  padding: 1.5rem;
  color: #fff;
  background: var(--app-gradient);
  box-shadow: 0 20px 45px rgba(114, 9, 183, 0.35);
  animation: fade-up 0.6s ease both;
}

.payment-card::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  right: -60px;
  bottom: -90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.payment-communication {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.95);
  color: var(--app-primary-dark);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.payment-amount {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

/* ===== Footer ===== */
.app-footer {
  flex-shrink: 0;
  padding: 1.25rem 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(67, 97, 238, 0.12);
  color: var(--app-muted);
}

.app-footer img {
  width: 24px;
  height: 24px;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
	animation: none !important;
	transition: none !important;
  }
}
