/* -------------------------------
   🔧 Taille de base (important !)
------------------------------- */
html {
  font-size: 16px; /* Desktop */
}

@media (max-width: 768px) {
  html {
    font-size: 14px; /* Smartphones */
  }
}

@media (max-width: 480px) {
  html {
    font-size: 12px; /* Petits écrans */
  }
}

/* -------------------------------
   🎨 Police globale classique
------------------------------- */
html, body, h1, h2, h3, h4, h5, h6, p, span, label, input, button,
.nav-link, .overlay-text, a, li, select, option, textarea, table, th, td {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: normal;
}

/* -------------------------------
   🎨 Styles de base
------------------------------- */
#google_translate_element {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

body {
  background-color: #f0e6d2;
  margin: 0;
  padding: 0;
  font-size: 1rem; /* suit html */
  line-height: 1.4;
}

h1, h2 {
  color: #8b4513;
  text-align: center;
  margin-bottom: 30px;
}

h4 {
  color: #8b4513;
  margin-bottom: 18px;
}

.form-group { margin-bottom: 15px; }

.container.mt-5 { margin-top: 5px !important; }

#eventTable, #userTable { margin-top: 30px; }

/* -------------------------------
   🛒 Bouton Panier
------------------------------- */
.panier-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panier-img { width: 100%; height: 100%; object-fit: contain; }

/* -------------------------------
   🔘 Boutons login/register/logout
------------------------------- */
.action-button {
  min-width: 6rem;
  height: 2rem;
  font-size: 0.85rem;
  padding: 0;
  margin-right: 0.6rem;
  line-height: 2rem;
  border-radius: 6px;
  text-align: center;
  display: inline-block;
}

/* -------------------------------
   Icônes et divers
------------------------------- */
.flag { width: 1.8rem; height: 1.2rem; margin-right: 0.6rem; display: inline-block; }

.contact-icon, .website-icon { font-size: 1.2em; color: #8b4513; }

.delete-btn { cursor: pointer; color: #dc3545; font-size: 1.2em; }

#adminContact, .creator-info {
  margin-top: 30px;
  font-size: 0.9em;
  color: #6c757d;
  text-align: center;
}

.hidden-email { display: none; }

#countryFilter { margin-bottom: 20px; }

#printButton { margin-left: auto; }

/* -------------------------------
   Navigation Tabs
------------------------------- */
.nav-tabs { 
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
}

.nav-tabs .nav-link { color: #8b4513; }

.nav-tabs .nav-link.active {
  color: #fff;
  background-color: #8b4513;
  border-color: #8b4513;
}

/* -------------------------------
   Tables
------------------------------- */
#map { height: 400px; margin-bottom: 20px; }

.table .actions-cell { text-align: center; }
.table .actions-cell i { cursor: pointer; font-size: 1rem; }

/* -------------------------------
   Containers et bannières
------------------------------- */
.banner { width: 100%; text-align: center; margin-bottom: 20px; }
.banner img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 1200px;
  padding: 1rem;
  margin: 20px auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.container.mt-5 iframe {
  width: 100%;
  height: auto;
  border: none;
  margin: 20px auto;
  display: block;
}

/* -------------------------------
   🔧 Responsive
------------------------------- */

/* Tablettes */
@media (max-width: 992px) {
  h1 { font-size: 1.6rem; } 
  h2 { font-size: 1.3rem; } 
  h3 { font-size: 1.1rem; }
  h4 { font-size: 1rem; }
  .nav-tabs .nav-link { font-size: 1rem; padding: 0.6rem; }
  .action-button { min-width: 7rem; height: 2.2rem; font-size: 0.8rem; }
  .panier-button { width: 1.8rem; height: 1.8rem; }
  .banner img { max-height: 160px; }
  .scene img { max-height: 160px; }
}

/* Mobiles */
@media (max-width: 768px) {
  h1 { font-size: 1.4rem; margin-bottom: 15px; }
  h2 { font-size: 1.2rem; margin-bottom: 10px; }
  h3 { font-size: 1rem; margin-bottom: 8px; }
  h4 { font-size: 0.8rem; margin-bottom: 6px; }
  p, label, input, button, select, option, textarea, .nav-link {
    font-size: 0.85rem;
  }
  
  .container.mt-5 {
    margin-top: 0 !important;
  }

  .container {
    padding: 0.5rem;
    margin: 8px auto;
    border-radius: 6px;
  }

  .form-group { margin-bottom: 8px; }

  .nav-tabs .nav-link {
        display: inline-block;
        width: auto;
        margin-right: 8px; /* écart horizontal */
        margin-bottom: 6px; /* petit espace vertical si wrap */
        padding: 0.6rem 0.8rem;
    }

    /* supprimer marge du dernier onglet pour ne pas avoir trop d’espace */
    .nav-tabs .nav-link:last-child {
        margin-right: 0;
    }

  table.dataTable {
    font-size: 0.8rem;
    white-space: nowrap;
  }
  th, td {
    padding: 6px 4px;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .action-button {
    min-width: 5.5rem;
    height: 2rem;
    font-size: 0.75rem;
  }
  select, input {
    font-size: 0.8rem;
    padding: 5px;
  }
}

/* Très petits écrans */
@media (max-width: 480px) {
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1rem; }
  h3 { font-size: 0.9rem; }
  h4 { font-size: 0.8rem; }
  p, label, input, button, select, option, textarea, .nav-link {
    font-size: 0.75rem;
  }
  .action-button { height: 1.8rem; font-size: 0.7rem; }
  .panier-button { width: 1.6rem; height: 1.6rem; }
}

/* -------------------------------
   Autres styles supplémentaires
------------------------------- */
.past-event { background-color: #f8f9fa; color: #6c757d; }

.disabled-mail-button {
  color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
  filter: grayscale(100%);
  text-decoration: none;
}

.flag-icon { margin-right: 5px; }

.custom-button { height: 36px; width: 100px; font-size: 0.875rem; margin-top: 10px; }

.checkbox-container { display: flex; align-items: center; margin-top: 10px; margin-bottom: 15px; }

.checkbox-container input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 2px solid #007bff;
  border-radius: 5px;
  transition: border-color 0.3s ease;
}

.checkbox-container input[type="checkbox"]:hover { border-color: #0056b3; }
.checkbox-container input[type="checkbox"]:focus { outline: none; border-color: #28a745; }

.checkbox-container label { font-weight: normal; font-size: 0.85rem; color: #333; }
.checkbox-container label:hover { color: #007bff; cursor: pointer; }

.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.scene img { max-height: 250px; object-fit: cover; }
@media (max-width: 768px) { .scene img { max-height: 150px; } }

.lazyload { display: none; }

/* Overlay texte sur bannière */
.overlay-text {
    font-size: clamp(1rem, 6vw, 2.5rem);
    color: white;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
    pointer-events: none;
}
