/* Custom CSS pour Finint avec Bulma */

/* Couleurs custom */
:root {
  --primary-custom: #3273dc;
  --success-custom: #48c78e;
  --warning-custom: #ffe08a;
  --danger-custom: #f14668;
  --info-custom: #3e8ed0;
  --tooltip-bg: #363636;
  --tooltip-text: #ffffff;
}

/* Navbar custom */
.navbar-brand .navbar-item {
  font-weight: 600;
  color: var(--primary-custom);
}

.navbar-item i {
  color: #666;
}

.navbar-item:hover i {
  color: var(--primary-custom);
}

/* Cards avec hover effect */
.box:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Badges personnalisés */
.tag.is-success {
  background-color: var(--success-custom);
}

.tag.is-warning {
  background-color: var(--warning-custom);
  color: #333;
}

.tag.is-danger {
  background-color: var(--danger-custom);
}

/* Page d'accueil - stats cards */
.stats-card {
  padding: 2rem;
  text-align: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
}

.stats-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-custom);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stats-label {
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
}

/* Detail headers */
.detail-header {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.company-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.company-logo {
  width: 80px;
  height: 80px;
  background: var(--primary-custom);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Tabs personnalisés */
.tabs ul {
  border-bottom: 2px solid #f5f5f5;
}

.tabs li.is-active a {
  border-bottom-color: var(--primary-custom);
  color: var(--primary-custom);
}

/* Tables responsive */
.table-container {
  overflow-x: auto;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
  .company-info {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .company-logo {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .detail-header {
    padding: 1.5rem;
  }

  .stats-number {
    font-size: 2.5rem;
  }

  .navbar-item {
    padding: 0.5rem 1rem;
  }
}

/* Formulaires de recherche */
.search-section {
  color: #363636;
    padding: 2rem;
    margin: 1rem 2rem;
}

.search-section .input,
.search-section .select select {
  border-radius: 6px;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-section .button.is-primary {
  background: var(--primary-custom);
  border: 1px solid var(--primary-custom);
  color: white;
}

.search-section .button.is-primary:hover {
  background: #2366d1;
  border-color: #2366d1;
  transform: translateY(-1px);
}

/* Sanctions styling */
.sanction-item {
  border-left: 4px solid var(--danger-custom);
  background: #fefefe;
}

/* Animation de chargement */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sanction borders */
.has-border-danger {
  border-left: 4px solid var(--danger-custom);
}

.has-border-warning {
  border-left: 4px solid var(--warning-custom);
}

.has-border-grey {
  border-left: 4px solid #dbdbdb;
}

/* Fix subtitle margin issues */
.subtitle {
  margin-top: 0.5rem !important;
  margin-bottom: 1rem !important;
}

.subtitle.is-7 {
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
}

.subtitle.is-6 {
  margin-top: 0 !important;
  margin-bottom: 0.75rem !important;
}

/* =======================================
   TOOLTIPS POUR CLASSES DE NICE
   ======================================= */

/* Tooltip amélioré pour les classes de Nice */
.nice-class-tooltip {
  position: relative;
  cursor: help;
  transition: all 0.3s ease;
}

.nice-class-tooltip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Tooltip au survol */
.nice-class-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;

  /* Style du tooltip */
  background-color: var(--tooltip-bg);
  color: var(--tooltip-text);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: normal;
  text-align: left;
  white-space: normal;
  width: 300px;
  max-width: 300px;

  /* Animation */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;

  /* Ombre */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Flèche du tooltip */
.nice-class-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2px;

  border: 6px solid transparent;
  border-top-color: var(--tooltip-bg);

  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000;
}

/* Affichage au survol */
.nice-class-tooltip:hover::before,
.nice-class-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Tooltip responsive pour mobile */
@media (max-width: 768px) {
  .nice-class-tooltip::before {
    width: 250px;
    max-width: 250px;
    font-size: 12px;
    padding: 10px 12px;
  }
}

/* Style spécial pour les tags de classe */
.nice-class-tooltip.tag {
  border: 1px solid rgba(255,255,255,0.2);
}

.nice-class-tooltip.tag:hover {
  border-color: rgba(255,255,255,0.4);
}

/* Animation d'apparition */
@keyframes tooltip-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nice-class-tooltip:hover::before {
  animation: tooltip-fade-in 0.3s ease-out;
}

/* =======================================
   CORRECTIONS D'AFFICHAGE
   ======================================= */

/* Supprimer l'ombre des box dans les tab-content */
.tab-content .box {
  box-shadow: none;
  border: 1px solid #dbdbdb;
}

/* Espacement pour les containers non-colonnes */
.container:not(.columns > .container) + .container:not(.columns > .container) {
  margin-top: 2rem;
}

/* Espacement pour les sections principales */
.tab-content > .box + .box {
  margin-top: 1.5rem;
}

