/* =======================================================
   🎨 Bee2Me Techno-Nature – Theme global + Dark Mode
   Version refactorisée
   ======================================================= */

/* -----------------------------
   1. Variables de design
   ----------------------------- */
:root {
  /* Palette principale Bee2Me */
  --bee-yellow: #f9d71c;
  --bee-green:  #8ab17d;
  --bee-blue:   #9ecae1;
  --bee-dark:   #264653;
  --bee-sand:   #fdf6e3;

  /* Alias Bootstrap-like */
  --bee2me-primary: var(--bee-yellow);

  /* Design tokens (light par défaut) */
  --bee-bg-light:    var(--bee-sand);
  --bee-bg-dark:     #0f1214;
  --bee-bg:          var(--bee-bg-light);

  --bee-card-light:  #f5f7f9;
  --bee-card-dark:   #181c1f;
  --bee-card:        var(--bee-card-light);

  --bee-text-light:  #1b1b1b;
  --bee-text-dark:   #e8e8e8;
  --bee-text:        var(--bee-text-light);

  --bee-soft-light:  rgba(255, 221, 85, .4);
  --bee-soft-dark:   rgba(255, 221, 85, .15);
  --bee-soft:        var(--bee-soft-light);

  --bee-yellow-home: var(--bee-yellow);
  --bee-yellow-home-dark: #d4a72c;
  --bee-blue-home: #0b1e33;
  --bee-shadow-home: rgba(0,0,0,0.08);
}

/* Dark auto (si l'utilisateur est en mode sombre au niveau OS) */
@media (prefers-color-scheme: dark) {
  :root {
    --bee-bg:    var(--bee-bg-dark);
    --bee-card:  var(--bee-card-dark);
    --bee-text:  var(--bee-text-dark);
    --bee-soft:  var(--bee-soft-dark);
  }
}

/* Dark manuel (toggle Bee2Me) */
body[data-theme="dark"] {
  --bee-bg:    var(--bee-bg-dark);
  --bee-card:  var(--bee-card-dark);
  --bee-text:  var(--bee-text-dark);
  --bee-soft:  var(--bee-soft-dark);
}

body[data-theme="light"] {
  --bee-bg:    var(--bee-bg-light);
  --bee-card:  var(--bee-card-light);
  --bee-text:  var(--bee-text-light);
  --bee-soft:  var(--bee-soft-light);
}

/* -------------------------------------------------
   2. Base
   ------------------------------------------------- */
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background-color: var(--bee-bg);
  color: var(--bee-text);
}

a {
  text-decoration: none;
}

/* Typo responsive */
@media (max-width: 768px) {
  .card {
    margin-bottom: 1rem;
  }
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.4rem;
  }
}

/* -------------------------------------------------
   3. Navbar
   ------------------------------------------------- */
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--bee-yellow);
}

/* Navbar – variation dark manuelle */
body[data-theme="dark"] .navbar {
  background-color: #0f1a25 !important;
  border-bottom: 1px solid #1f2a36;
}

body[data-theme="dark"] .navbar .nav-link {
  color: #dce7f3 !important;
}

body[data-theme="dark"] .navbar .nav-link:hover,
body[data-theme="dark"] .navbar .nav-link.active {
  color: #8ab17d !important; /* vert nature */
}

/* Bouton toggle thème (si présent) */
#themeToggle {
  border-color: #264653;
  color: #264653;
}

body[data-theme="dark"] #themeToggle {
  border-color: #8ab17d !important;
  color: #8ab17d !important;
}

/* -------------------------------------------------
   4. Boutons
   ------------------------------------------------- */
.btn-warning {
  background-color: var(--bee-yellow);
  border-color: var(--bee-yellow);
}

.btn-outline-primary,
.btn-outline-success,
.btn-outline-warning {
  border-radius: .75rem;
}

/* Variantes Bee2Me (si définies côté Bootstrap custom) */
.btn-bee2me-primary {
  background-color: var(--bee2me-primary) !important;
  border-color: var(--bee2me-primary) !important;
  color: #000 !important;
}

.btn-outline-bee2me-primary {
  border-color: var(--bee2me-primary) !important;
  color: var(--bee2me-primary) !important;
}

.btn-outline-bee2me-primary:hover {
  background-color: var(--bee2me-primary) !important;
  color: #000 !important;
}

/* -------------------------------------------------
   5. Cards & effets hover
   ------------------------------------------------- */
.card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,.05);
  background-color: var(--bee-card);
}

/* Carte stats */
.stat-card {
  padding: 1.5rem;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Micro-variantes hover */
.hover-card {
  transition: transform .25s ease, box-shadow .25s ease;
}

.hover-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-hover-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(41, 128, 185, 0.2);
}

.card-hover-success:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(46, 204, 113, 0.2);
}

.card-hover-warning:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(241, 196, 15, 0.25);
}

/* Carte stats dashboard */
.bee-stat-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  transition: 0.25s;
}

.bee-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.stat-number {
  font-size: 2.6rem;
  font-weight: 800;
  color: #0b1e33;
}

.stat-label {
  font-size: 0.95rem;
}

/* -------------------------------------------------
   6. Badges & couleurs
   ------------------------------------------------- */
.urgent-card {
  border-left: 6px solid #C0392B;
}

.warning-card {
  border-left: 6px solid #F9D71C;
}

.ok-card {
  border-left: 6px solid #1ABC9C;
}

.bg-danger-soft {
  background-color: rgba(220, 53, 69, 0.08) !important;
}

.bg-warning-soft {
  background-color: rgba(255, 193, 7, 0.15) !important;
}

/* -------------------------------------------------
   7. Formulaires
   ------------------------------------------------- */
input,
select,
textarea {
  border-radius: .5rem;
  border: 1px solid var(--bee-green);
  background-color: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--bee-yellow);
  box-shadow: 0 0 0 .25rem rgba(249,215,28,.25);
  outline: none;
}

.form-check-input:checked {
  background-color: var(--bee-green);
  border-color: var(--bee-green);
}

.form-check-input:focus {
  box-shadow: 0 0 0 .25rem rgba(138,177,125,.25);
}

/* Slider */
input[type=range] {
  accent-color: var(--bee-green);
}

/* Validation explicite pour select */
select.is-invalid,
.was-validated select.is-invalid {
  border-color: #dc3545 !important;
  padding-right: calc(1.5em + .75rem) !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right calc(.375em + .1875rem) center !important;
  background-size: calc(.75em + .375rem) calc(.75em + .375rem) !important;
}

select:is(.is-invalid) {
  background-image: none;
}


/* ---------------------------------------------
   🌙 DARK MODE – auto + manuel
---------------------------------------------- */

/* — Hero Section — */
body[data-theme="dark"] .hero-section,
@media (prefers-color-scheme: dark) {
    .hero-section {
        background: radial-gradient(circle at 20% 20%, #1b1f24 0%, #0f1214 60%);
    }
}

body[data-theme="dark"] .hero-title,
@media (prefers-color-scheme: dark) {
    .hero-title {
        color: #f5f5f5;
    }
}

body[data-theme="dark"] .hero-subtitle,
@media (prefers-color-scheme: dark) {
    .hero-subtitle {
        color: #cccccc;
    }
}

/* — CTA Hero — */
body[data-theme="dark"] .btn-bee-cta,
@media (prefers-color-scheme: dark) {
    .btn-bee-cta {
        box-shadow: 0 4px 12px rgba(255, 221, 85, 0.25);
    }
}

/* — Feature icons — */
body[data-theme="dark"] .feature-icon,
@media (prefers-color-scheme: dark) {
    .feature-icon {
        color: var(--bee-yellow-home);
    }
}

/* — Bee cards — */
body[data-theme="dark"] .bee-card,
@media (prefers-color-scheme: dark) {
    .bee-card {
        background: var(--bee-card-dark);
        color: var(--bee-text-dark);
        box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    }

    .bee-card:hover {
        box-shadow: 0 14px 26px rgba(0,0,0,0.55);
    }
}

/* — Preview section — */
body[data-theme="dark"] .preview-section,
@media (prefers-color-scheme: dark) {
    .preview-section {
        background: linear-gradient(135deg, #222831, #1a1f25);
    }
}

/* — Testimonial — */
body[data-theme="dark"] .testimonial,
@media (prefers-color-scheme: dark) {
    .testimonial {
        background: #1b1f22;
        border-left-color: var(--bee-yellow);
        color: var(--bee-text-dark);
        box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    }
}

/* — CTA Final — */
body[data-theme="dark"] .cta-section,
@media (prefers-color-scheme: dark) {
    .cta-section {
        background: linear-gradient(135deg, #0a121d, #0f1a25);
        color: #fff !important;
    }
}

/* — Dark CTA button — */
body[data-theme="dark"] .btn-cta-dark,
@media (prefers-color-scheme: dark) {
    .btn-cta-dark {
        box-shadow: 0 4px 12px rgba(249, 215, 28, 0.3);
    }
}

/* — BeeMap — */
body[data-theme="dark"] #beeMap,
@media (prefers-color-scheme: dark) {
    #beeMap {
        box-shadow: 0 3px 14px rgba(255,255,255,0.05);
    }
}



body[data-theme="dark"] .text-muted-strong {
    color: #b8c7d9 !important;
}

/* -------------------------------------------------
   8. Hero & logo
   ------------------------------------------------- */
.hero-section {
  background: linear-gradient(135deg, #fdf6e3 0%, #9ecae1 40%, #f9d71c 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease-in-out infinite;
  color: var(--bee-dark);
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.05);
  transition: background 1s ease;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Logo "battement d’ailes" */
.logo-bee {
  display: inline-block;
  transition: transform .2s ease;
  animation: beeWings 3s ease-in-out infinite;
}

.logo-bee:hover {
  animation-duration: 1.5s;
}

@keyframes beeWings {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-2deg); }
  75%      { transform: rotate(2deg); }
}

/* -------------------------------------------------
   9. Flash overlay (notifications)
   ------------------------------------------------- */
#flash-overlay-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 700px;
  z-index: 9999;
  pointer-events: none;
}

.flash-overlay {
  pointer-events: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  animation: flash-slide-down 0.4s ease-out;
}

@keyframes flash-slide-down {
  from {
    transform: translate(-50%, -20px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* -------------------------------------------------
   10. Photos / dropzone / lightbox
   ------------------------------------------------- */
.photo-dropzone {
  border: 2px dashed #ced4da;
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.photo-dropzone.dragover {
  border-color: #ffc107;
  background-color: #fff8e1;
}

/* Miniature container */
.photo-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  flex: 0 0 120px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #ffc107;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.photo-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(255, 193, 7, 0.4);
}

/* Miniature image */
.photo-wrapper img,
.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Thumb clickable */
.photo-thumb {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: .7rem;
  cursor: pointer;
  transition: transform .25s ease, opacity .25s ease;
}

.photo-thumb:hover {
  transform: scale(1.07);
  opacity: .9;
}

/* Croix suppression */
.photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  background: white;
  border-radius: 50%;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  z-index: 20;
}

/* Animation suppression */
@keyframes zoomOutFade {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.5);
    opacity: 0;
  }
}

.photo-wrapper.zoom-out {
  animation: zoomOutFade 0.2s ease forwards;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 10500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 0 0.5rem;
}

.lightbox-nav.left {
  left: -2rem;
}

.lightbox-nav.right {
  right: -2rem;
}

.lightbox-close {
  position: absolute;
  top: -1.5rem;
  right: -1.5rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

/* Bouton rond de fermeture (modal photo) */
.photo-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  z-index: 20;
}

.photo-modal-close:hover {
  transform: scale(1.1);
  background: #f8f9fa;
}

.photo-modal-close::before {
  content: "\2715";
  font-size: 20px;
  color: #000;
  line-height: 40px;
  display: block;
  text-align: center;
}

#photoModal .modal-content {
  background: #000 !important;
  padding: 0;
  border-radius: 1rem;
}

#photoModal .modal-dialog {
  max-width: 90vw;
  max-height: 90vh;
}

#photoModalImg {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
  display: block;
}

/* Mobile adaptation miniatures */
@media (max-width: 575px) {
  .photo-wrapper {
    width: 100px;
    height: 100px;
    flex: 0 0 100px;
  }
}

.text-muted-strong {
    opacity: .85;
}

/* -------------------------------------------------
   11. Timeline & événements
   ------------------------------------------------- */
/* Forcer la disparition des cartes filtrées */
.timeline-item.hidden-by-search {
    display: none !important;
}

.timeline-vertical {
  position: relative;
}

/*.hero-section {
    background: radial-gradient(circle at 20% 20%, #fff8e1 0%, #ffffff 60%);
    padding-top: 4rem;
    padding-bottom: 4rem;
    border-radius: 1.2rem;
}*/

.hero-title {
    color: var(--bee-blue-home);
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-subtitle {
    color: rgba(0,0,0,0.65);
    font-size: 1.2rem;
}

/* CTA principal */
.btn-bee-cta {
    background: var(--bee-yellow-home);
    color: #000;
    border-radius: 30px;
    padding: 12px 32px;
    font-weight: 600;
    border: none;
    transition: 0.25s;
    box-shadow: 0 4px 10px var(--bee-shadow-home);
}

.btn-bee-cta:hover {
    background: var(--bee-yellow-home-dark);
    transform: translateY(-2px);
}

/* ---------------------------------------------
   C. Feature icons
---------------------------------------------- */
.feature-icon {
    font-size: 2.4rem;
    color: var(--bee-yellow-home-dark);
    margin-bottom: 12px;
}

/* ---------------------------------------------
   D. Bee cards (features)
---------------------------------------------- */
.bee-card {
    background: var(--bee-card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
    transition: 0.3s;
}

.bee-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 26px rgba(0,0,0,0.12);
}



/* ---------------------------------------------
   E. Aperçu interface (preview section)
---------------------------------------------- */
.preview-section {
    background: linear-gradient(135deg, #f9fbe7, #fffde7);
    padding-top: 4rem;
    padding-bottom: 4rem;
    border-radius: 1rem;
}

/* ---------------------------------------------
   F. Testimonials
---------------------------------------------- */
.testimonial {
    background: #ffffff;
    border-left: 6px solid var(--bee-yellow-home);
    padding: 24px;
    border-radius: 12px;
    font-style: italic;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

/* ---------------------------------------------
   G. CTA final (footer call-to-action)
---------------------------------------------- */
.cta-section {
    background: linear-gradient(135deg, var(--bee-blue-home), #102944);
    text-align: center;
    padding: 4rem 0;
    color: white;
    border-radius: 1.2rem;
}

.btn-cta-dark {
    background: var(--bee-yellow-home);
    color: #000;
    border-radius: 30px;
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    transition: 0.25s;
}

.btn-cta-dark:hover {
    background: var(--bee-yellow-home-dark);
    transform: translateY(-3px);
}

/* ---------------------------------------------
   H. Carte Bee2Me (map)
---------------------------------------------- */
#beeMap {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0,0,0,0.12);
}

/* Marqueur abeille animé */
.bee-marker {
    position: relative;
    width: 32px;
    height: 32px;
}

.bee-marker .pulse {
    width: 28px;
    height: 28px;
    background: rgba(247, 201, 72, 0.35);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    animation: beePulse 1.8s infinite ease-out;
}

@keyframes beePulse {
    0%   { transform: scale(1); opacity: 0.7; }
    70%  { transform: scale(2); opacity: 0; }
    100% { opacity: 0; }
}

.bee-marker .icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    font-size: 26px;
    line-height: 32px;
    text-align: center;
    z-index: 10;
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.4));
}


/* ---------------------------------------------
   12. CONTACT
---------------------------------------------- */
.contact-hero {
    background: linear-gradient(135deg, var(--bee-sand), var(--bee-blue));
    padding: 4rem 2rem;
    border-radius: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,.05);
}

body[data-theme="dark"] .contact-hero {
    background: linear-gradient(135deg, #1b1f24, #0f1214);
}

.contact-card {
    background: var(--bee-card);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.07);
}

body[data-theme="dark"] .contact-card {
    background: var(--bee-card-dark);
    box-shadow: 0 6px 20px rgba(0,0,0,.45);
}

.contact-info-icon {
    font-size: 1.8rem;
    color: var(--bee-yellow);
}
body[data-theme="dark"] .contact-info-icon {
    color: var(--bee-yellow-home);
}

/* -------------------------------------------------
   12. Page 404 Bee2Me
   ------------------------------------------------- */

.bee-404-hero {
  background: var(--bee-card);
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
}

.bee-404-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(249, 215, 28, 0.18) 0, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(158, 202, 225, 0.16) 0, transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.bee-404-hero > .card-body {
  position: relative;
  z-index: 1;
}

.bee-404-chip {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--bee-yellow);
  box-shadow: 0 0 0 6px rgba(249, 215, 28, 0.25);
}

/* Illustration */

.bee-404-illustration {
  position: relative;
}

.bee-404-orbit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

.bee-404-number {
  font-weight: 800;
  font-size: clamp(3.2rem, 8vw, 4.5rem);
  letter-spacing: 0.05em;
  color: var(--bee-blue-home);
  position: relative;
  z-index: 1;
}

.bee-404-zero {
  display: inline-block;
  position: relative;
}

.bee-404-bee {
  position: absolute;
  font-size: 2.2rem;
  animation: bee404-fly 6s ease-in-out infinite;
  transform-origin: center;
}

.bee-404-trail {
  position: absolute;
  width: 140%;
  height: 140%;
  border-radius: 999px;
  border: 1px dashed rgba(38, 70, 83, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  animation: bee404-orbit 12s linear infinite;
}

/* Petit texte d’info */

.bee-404-mini-info {
  border-radius: 999px;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.02);
}

/* Animations */

@keyframes bee404-fly {
  0%   { transform: translate(0, -35px) rotate(0deg); }
  25%  { transform: translate(40px, -10px) rotate(8deg); }
  50%  { transform: translate(0, 20px) rotate(-6deg); }
  75%  { transform: translate(-35px, -5px) rotate(5deg); }
  100% { transform: translate(0, -35px) rotate(0deg); }
}

@keyframes bee404-orbit {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* -------------------------------------------------
   13. Page 500 Bee2Me
   ------------------------------------------------- */

.bee-500-hero {
  background: var(--bee-card);
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
}

.bee-500-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 170, 0, 0.18) 0, transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(255, 100, 50, 0.16) 0, transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.bee-500-hero > .card-body {
  position: relative;
  z-index: 1;
}

.bee-500-chip {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--bee-orange);
  box-shadow: 0 0 0 6px rgba(255, 170, 0, 0.25);
}

/* Illustration */

.bee-500-smoke {
  position: relative;
  display: inline-block;
  padding: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

.bee-500-code {
  font-weight: 800;
  font-size: clamp(3.2rem, 8vw, 4.5rem);
  letter-spacing: 0.05em;
  color: var(--bee-orange);
  position: relative;
  z-index: 5;
}

.bee-500-bee {
  position: absolute;
  font-size: 2.2rem;
  animation: bee500-shake 4s ease-in-out infinite;
  transform-origin: center;
}

.bee-500-vapor {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 140%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(140,140,140,0.22), transparent 70%);
  filter: blur(14px);
  animation: bee500-smoke 6s infinite ease-in-out;
}

/* Animations */

@keyframes bee500-shake {
  0%, 100% { transform: translate(0, -35px); }
  20% { transform: translate(8px, -20px) rotate(4deg); }
  40% { transform: translate(-10px, -15px) rotate(-4deg); }
  60% { transform: translate(5px, -10px) rotate(2deg); }
  80% { transform: translate(-8px, -25px) rotate(-2deg); }
}

@keyframes bee500-smoke {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50%  { transform: translate(-50%, -52%) scale(1.1); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
}

/* Petit encart d’info */

.bee-500-mini-info {
  border-radius: 999px;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.02);
}

/* -------------------------------------------------
   Amélioration lisibilité DARK MODE (404 + 500)
   ------------------------------------------------- */

/* Textes dans les cartes 404 et 500 */
body[data-theme="dark"] .bee-404-hero,
body[data-theme="dark"] .bee-500-hero {
  color: var(--bs-light); /* texte principal très lisible */
}

/* Textes secondaires (lead, muted…) */
body[data-theme="dark"] .bee-404-hero .text-muted,
body[data-theme="dark"] .bee-500-hero .text-muted {
  color: rgba(255, 255, 255, 0.75) !important;
}

body[data-theme="dark"] .bee-404-hero .lead,
body[data-theme="dark"] .bee-500-hero .lead {
  color: rgba(255, 255, 255, 0.88);
}

/* Titres */
body[data-theme="dark"] .bee-404-hero h1,
body[data-theme="dark"] .bee-500-hero h1 {
  color: var(--bee-yellow-home);
}

/* Pastilles (chips) */
body[data-theme="dark"] .bee-404-chip,
body[data-theme="dark"] .bee-500-chip {
  box-shadow: 0 0 0 6px rgba(249, 215, 28, 0.35);
}

/* Mini encart d’info */
body[data-theme="dark"] .bee-404-mini-info,
body[data-theme="dark"] .bee-500-mini-info {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

/* Liens */
body[data-theme="dark"] .bee-404-hero a,
body[data-theme="dark"] .bee-500-hero a {
  color: var(--bee-yellow-home);
}

body[data-theme="dark"] .bee-404-hero a:hover,
body[data-theme="dark"] .bee-500-hero a:hover {
  color: var(--bee-yellow); 
}

/* Illustrations */
body[data-theme="dark"] .bee-404-number,
body[data-theme="dark"] .bee-500-code {
  color: var(--bee-yellow-home);
}

/* Abeilles en mode dark */
body[data-theme="dark"] .bee-404-bee,
body[data-theme="dark"] .bee-500-bee {
  filter: brightness(1.1);
}

/* Halo autour des illustrations */
body[data-theme="dark"] .bee-404-orbit,
body[data-theme="dark"] .bee-500-smoke {
  background: rgba(22, 24, 26, 0.95);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75);
}

/* Trail / vapor plus contrasté */
body[data-theme="dark"] .bee-404-trail {
  border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .bee-500-vapor {
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
}

/* Lisibilité des boutons CTA en mode dark */
body[data-theme="dark"] .btn-bee-cta {
    color: var(--bs-dark) !important; /* texte foncé lisible sur fond clair */
    font-weight: 600;
}

body[data-theme="dark"] .btn-bee-cta:hover {
    color: #000 !important; /* légèrement plus fort au survol */
}


/* ============================================================
   🐝 Bee2Me — Formulaire Premium (Dark + Light unifiés)
   ============================================================ */

/* --- Cards du formulaire --- */
.bee-form-card {
    background: var(--bee-card);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.06);
    transition: background .2s, color .2s, border-color .2s;
}

body[data-theme="dark"] .bee-form-card {
    background: var(--bee-card-dark);
    color: var(--bee-text-dark);
    border-color: rgba(255,255,255,0.12);
}

/* --- Labels --- */
.bee-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bee-text);
}

body[data-theme="dark"] .bee-label {
    color: var(--bee-text-dark);
}

/* --- Input group icons --- */
.bee-input-icon {
    background: var(--bee-card);
    border-right: none;
    color: var(--bee-yellow);
}

body[data-theme="dark"] .bee-input-icon {
    background: rgba(255,255,255,0.08);
    color: var(--bee-yellow);
}

/* --- Inputs & selects --- */
.bee-input,
.bee-select {
    background: var(--bee-card);
    color: var(--bee-text);
    border: 1px solid var(--bee-green);
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}

body[data-theme="dark"] .bee-input,
body[data-theme="dark"] .bee-select {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    color: var(--bee-text-dark);
}

.bee-input::placeholder,
.bee-select::placeholder {
    color: rgba(0,0,0,0.4);
}

body[data-theme="dark"] .bee-input::placeholder,
body[data-theme="dark"] .bee-select::placeholder {
    color: rgba(255,255,255,0.45);
}

/* --- Focus style --- */
.bee-input:focus,
.bee-select:focus {
    border-color: var(--bee-yellow);
    box-shadow: 0 0 0 0.25rem rgba(249, 215, 28, 0.28);
}

/* --- Hints --- */
.bee-hint {
    font-size: .75rem;
    color: var(--bee-text);
    opacity: 0.7;
}

body[data-theme="dark"] .bee-hint {
    color: var(--bee-text-dark);
    opacity: 0.7;
}

/* --- Checkbox (ruchette) --- */
.bee-switch {
    accent-color: var(--bee-yellow);
}

body[data-theme="dark"] .bee-switch {
    accent-color: var(--bee-yellow);
}

/* --- Buttons cohérents avec ton thème --- */
.bee-btn-primary {
    background-color: var(--bee-yellow);
    border-color: var(--bee-yellow);
    color: #000;
}

.bee-btn-outline {
    border-color: var(--bee-yellow);
    color: var(--bee-yellow);
}

.bee-btn-outline:hover {
    background-color: var(--bee-yellow);
    color: #000;
}

/* --- CLUSTER HEXAGONAL BEE2ME --- */
.bee-cluster-hexagon {
    position: relative;
    width: 48px;
    height: 48px;
    background: #f7c948;
    clip-path: polygon(
        25% 3%,   75% 3%,
        100% 50%, 75% 97%,
        25% 97%, 0% 50%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 17px;
    color: #000;
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    border: 2px solid #d4a72c;
    transition: transform 0.2s ease;
}

.bee-cluster-hexagon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.28);
}

/* Animation légère de 2s en rotation-oscillation (optionnel) */
.bee-cluster-hexagon {
    animation: beeHexFloat 3s ease-in-out infinite;
}

@keyframes beeHexFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.bee-cluster-hexagon::before {
    content: "";
    position: absolute;
    width: 64px;
    height: 64px;
    top: -8px;
    left: -8px;
    clip-path: polygon(
        25% 3%, 75% 3%,
        100% 50%, 75% 97%,
        25% 97%, 0% 50%
    );
    background: rgba(255, 223, 114, 0.25);
    z-index: -1;
}

.text-bee {
    color: var(--bee2me-primary);
}

.bg-bee2me-green {
    background: var(--bee2me-green) !important;
}

.btn-bee2me {
    background: var(--bee2me-primary);
    color: #fff;
    border-radius: 12px;
}

.btn-bee2me:hover {
    background: #002538;
}

/* ============================================================
   👑 Bee2Me — Queen
   ============================================================ */

/* Conteneur centré */
.queen-mark-wrapper {
    display: flex;
    justify-content: center;
}

/* Disque de marquage */
.queen-mark-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

/* Icône gem au centre */
.queen-mark-icon {
    font-size: 2rem;
    color: #000000; /* noir pour contraste maximal */
}

/* Mode sombre : noir → blanc pour contraste */
[data-bs-theme="dark"] .queen-mark-icon {
    color: #ffffff;
}

/* Animation premier niveau */
@keyframes queenPulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--queen-pulse-rgb), 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(var(--queen-pulse-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

.queen-pulse {
    animation: queenPulse 2.5s infinite ease-out;
    transition: all .3s ease-in-out;
}

/* On reçoit la couleur via un attribut data-pulse-color */
.queen-pulse {
    --queen-pulse-rgb: 255, 221, 0; /* valeur par défaut */
}

.queen-pulse[data-pulse-color] {
    /* Convertit hex -> rgb dans le CSS via custom property */
}

/* Variante mode sombre : pulse moins vif */
[data-bs-theme="dark"] .queen-pulse {
    animation-duration: 3s;
    opacity: 0.9;
}

/* ------------------------------
   SECTION HEADINGS
-------------------------------*/

.section-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 2.2rem;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.section-title::after {
    content: "";
    flex-grow: 1;
    height: 2px;
    background: var(--bee2me-primary);
    opacity: .15;
    border-radius: 4px;
}

[data-bs-theme="dark"] .section-title::after {
    background: var(--bee2me-yellow);
    opacity: .12;
}

/* ------------------------------
   INTERNAL CARDS (subsections)
-------------------------------*/

.subcard {
    background: var(--bs-light);
    border-radius: 18px;
    padding: 1.2rem 1.4rem;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

[data-bs-theme="dark"] .subcard {
    background: var(--bs-dark);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07);
}

/* ------------------------------
   INPUTS
-------------------------------*/

.form-control, .form-select {
    border-radius: 12px !important;
    padding: .55rem .9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bee2me-primary);
    box-shadow: 0 0 0 .2rem rgba(0,50,80,.2);
}

/* ------------------------------
   SWITCHES Bee2Me
-------------------------------*/

.form-check-input {
    width: 2.6em;
    height: 1.4em;
}

.form-check-input:checked {
    background-color: var(--bee2me-primary);
    border-color: var(--bee2me-primary);
}

/* ------------------------------
   TAG SELECTORS PREMIUM
-------------------------------*/

.bee-tag-select {
    cursor: pointer;
    background: var(--bs-gray-200);
    padding: .45rem .9rem;
    border-radius: 14px;
    transition: .25s;
    user-select: none;
    border: 1px solid transparent;
    font-weight: 500;
}

[data-bs-theme="dark"] .bee-tag-select {
    background: var(--bs-gray-700);
    color: var(--bs-gray-300);
}

.bee-tag-select:hover {
    background: var(--bee2me-primary);
    color: #fff;
    transform: translateY(-2px);
}

.bee-tag-select input:checked + .tag-label,
.bee-tag-select input:checked ~ .tag-label {
    background: var(--bee2me-primary);
    color: #fff;
    border-radius: 14px;
    padding: .45rem .9rem;
    box-shadow: 0 3px 6px rgba(0,0,0,.15);
}

/* ------------------------------
   FILE INPUTS
-------------------------------*/

input[type="file"] {
    padding: .55rem;
    border-radius: 12px;
    background: var(--bs-gray-100);
}

[data-bs-theme="dark"] input[type="file"] {
    background: var(--bs-gray-800);
}

/* ------------------------------
   SUBMIT BUTTON
-------------------------------*/

.btn-bee2me {
    background: var(--bee2me-primary);
    color: #fff;
    border-radius: 12px;
    padding: .65rem 1.3rem;
    font-size: 1rem;
    transition: .25s;
}

.btn-bee2me:hover {
    transform: translateY(-2px);
    background: #002538;
}

/* ------------------------------------------------------
   TIMELINE STRUCTURE
------------------------------------------------------ */

.timeline {
    position: relative;
    padding-left: 28px;
    margin-top: 2rem;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12px;
    width: 4px;
    height: 100%;
    background: linear-gradient(var(--bee2me-primary), transparent);
    border-radius: 2px;
    opacity: .4;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.2rem;
    padding-left: 1rem;
}

.timeline-dot {
    width: 18px;
    height: 18px;
    background: var(--bee2me-primary);
    border-radius: 50%;
    position: absolute;
    left: -2px;
    top: 0.2rem;
    box-shadow: 0 0 0 4px rgba(0,90,150,0.15);
}

[data-bs-theme="dark"] .timeline-dot {
    box-shadow: 0 0 0 4px rgba(255,255,255,0.10);
}

/* ------------------------------------------------------
   CARDS
------------------------------------------------------ */

.timeline-card {
    background: var(--bs-light);
    border-radius: 18px;
    padding: 1.2rem 1.4rem;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
    transition: .25s;
}

.timeline-card:hover {
    transform: translateX(4px);
    box-shadow: inset 0 0 0 1px var(--bee2me-primary),
                0 4px 10px rgba(0,0,0,0.08);
}

[data-bs-theme="dark"] .timeline-card {
    background: var(--bs-dark);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.timeline-date {
    font-size: .9rem;
    opacity: .6;
}

/* ------------------------------------------------------
   BADGES
------------------------------------------------------ */

.badge-type {
    border-radius: 10px;
    padding: .25rem .55rem;
    font-size: .75rem;
    font-weight: 600;
}

.badge-sanitaire {
    background: #ffdddd;
    color: #b40000;
}
[data-bs-theme="dark"] .badge-sanitaire {
    background: rgba(255,50,50,.15);
    color: #ff8181;
}

.badge-recolte {
    background: #fff4d1;
    color: #8a5b00;
}

.badge-systeme {
    background: #d8f2ff;
    color: #005c7a;
}

.badge-observation {
    background: #e9ffe8;
    color: #2e7d32;
}

/* ------------------------------------------------------
   PHOTOS
------------------------------------------------------ */

.timeline-photos {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, 120px);
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.timeline-photos img {
    position: static !important;   /* 🔥 clé absolue */
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    cursor: zoom-in;
}


.timeline-photos img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
}

.journal-header {
    background: var(--bs-light);
}
[data-bs-theme="dark"] .journal-header {
    background: var(--bs-dark);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.journal-header strong {
    font-weight: 600;
}

.btn-outline-bee2me {
    border: 2px solid var(--bee2me-primary);
    color: var(--bee2me-primary);
    border-radius: 12px;
    padding: .55rem 1rem;
    font-weight: 600;
    transition: .25s;
}

.btn-outline-bee2me:hover {
    background: var(--bee2me-primary);
    color: #fff;
    transform: translateY(-2px);
}

[data-bs-theme="dark"] .btn-outline-bee2me {
    border-color: var(--bee2me-yellow);
    color: var(--bee2me-yellow);
}

[data-bs-theme="dark"] .btn-outline-bee2me:hover {
    background: var(--bee2me-yellow);
    color: #000;
}

/* ===============================
   Timeline – Visit scorecards
   =============================== */

.visit-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.visit-card {
    background: var(--bee-card-bg, #fff);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    border-left: 4px solid transparent;
}

[data-bs-theme="dark"] .visit-card {
    background: rgba(255,255,255,.03);
}

.visit-card h6 {
    font-weight: 600;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.visit-card.resources { border-color: #6c9f3a; }
.visit-card.harvest   { border-color: #f4b400; }
.visit-card.sanitary  { border-color: #d9534f; }
.visit-card.behavior  { border-color: #ff9800; }

.visit-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: .5rem;
}
