﻿/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : 24 sept. 2024, 10:30:16
    Author     : SG41RPichet
*/

/* ===== Style Global RuralDash ===== */
/* ===== ThÃ¨me adaptatif RuralDash (clair/sombre automatique) ===== */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f7f9fc;
  color: #222;
}

/* Titres de page */
h2 {
  color: #207c3a;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #ff4900;
  display: inline-block;
}

.container h2,
.container-xl h2 {
  margin-top: 1rem;
}

/* Sections */
section {
  margin-bottom: 2rem;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e0e0e0;
  }
  .table-compact,
  .card,
  .card-body,
  .card-header,
  .card-footer,
  input.form-control,
  select.form-control {
    background-color: #1e1e1e;
    color: #fff;
    border-color: #333;
  }
  .table-compact th {
    background-color: #2a2a2a;
    border-bottom: 2px solid #444;
  }
  .table-compact tbody tr:nth-child(even) {
    background-color: #1a1a1a;
  }
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_paginate,
  label {
    color: #ccc;
  }
  .dataTables_filter input {
    background-color: #2a2a2a;
    color: #fff;
    border-color: #555;
  }
  .dt-buttons .btn {
    background-color: #198754;
    color: white;
  }
  .dt-buttons .btn:hover {
    background-color: #146c43;
  }
}

/* Tableaux */
.table-compact {
  font-size: 12px;
  line-height: 1.3;
}
.table-compact th,
.table-compact td {
  padding: 0.4rem 0.6rem;
  vertical-align: middle;
}
.table-compact th {
  background-color: #f0f0f0;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}
.table-compact tbody tr:nth-child(even) {
  background-color: #fbfbfb;
}
.table-compact a {
  color: #0d6efd;
  text-decoration: none;
}
.table-compact a:hover {
  text-decoration: underline;
}

/* DataTables */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  font-size: 12px;
}
.dataTables_filter {
  text-align: left !important;
  margin-top: 1rem;
}
.dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.dataTables_filter input {
  margin-left: 0 !important;
  width: auto;
  max-width: 300px;
}

/* Boutons */
.dt-buttons .btn,
.dt-buttons .buttons-excel,
.dt-buttons .buttons-csv,
.dt-buttons .buttons-pdf,
.dt-buttons .buttons-copy {
  background-color: #198754;
  color: white;
  border: none;
  padding: 6px 12px;
  margin-right: 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.dt-buttons .btn:hover {
  background-color: #146c43;
}

/* Spinner */
.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
  color: #198754;
}

/* Cartes */
.card {
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  margin-bottom: 2rem;
  background-color: #fff;
  color: #222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

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

.card-header {
  background: linear-gradient(135deg, #f0f4f8, #e9ecef);
  font-weight: 600;
  border-bottom: 2px solid #207c3a;
  padding: 1rem 1.25rem;
  border-radius: 10px 10px 0 0;
}

.card-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 10px 10px;
}

/* Formulaires */
label {
  font-weight: 500;
}
select.form-control,
input.form-control {
  font-size: 14px;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}
button.btn-primary,
button.btn-success {
  font-size: 14px;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  background-color: #207c3a;
  border: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(32, 124, 58, 0.2);
}

button.btn-primary:hover,
button.btn-success:hover {
  background-color: #1a6430;
  box-shadow: 0 4px 8px rgba(32, 124, 58, 0.3);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border-color: #207c3a;
  color: #207c3a;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: #207c3a;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(32, 124, 58, 0.2);
}

.logo-container .custom-logo {
  max-height: 120px; /* Taille réduite pour plus d'harmonie */
  width: auto;
  position: relative;
  margin-left: 20px; /* Maintenez le dÃ©bordement Ã  gauche */
  margin-top: 0;
  transition: transform 0.3s ease;
}

.logo-container .custom-logo:hover {
  transform: scale(1.05);
}

/* Amélioration du header */
#safer-header-main {
  background: linear-gradient(to bottom, #ffffff, #f8f9fa);
  border-bottom: 3px solid #207c3a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 10px 15px;
}

#safer-header-main .row {
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  padding: 5px 0;
}

/* Style du menu de navigation amélioré */
#site-navigation {
  padding: 5px 0;
}

#primary-menu {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#primary-menu li a {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

#primary-menu li a:hover {
  background-color: #ff4900;
  color: white;
  box-shadow: 0 4px 8px rgba(255, 73, 0, 0.25);
  transform: translateY(-2px);
}

/* Fix pour affichage du logo WordPress */
.custom-logo-link {
  display: inline-block !important;
  line-height: 0;
}

.custom-logo-link img {
  max-height: 120px !important;
  height: auto !important;
  width: auto !important;
  display: block !important;
}

/* Responsive header */
@media (max-width: 768px) {
  .logo-container .custom-logo,
  .custom-logo-link img {
    max-height: 70px !important;
  }

  #safer-header-main {
    padding: 8px 10px;
  }

  #primary-menu {
    justify-content: center;
  }
}

.hidden { display: none; }

.safer-chart {
  width: 100%;
  min-height: 360px;
}

.qual-chart {
  width: 100%;
  min-height: 420px;
  margin-bottom: 8px;
}

.qual-metric-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.qual-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 8px 0 16px;
  font-size: 12px;
}

.qual-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 320px;
}

.qual-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 10px;
}


/**/
.ui-autocomplete {
  background-color: white !important; /* ou une autre couleur adaptÃ©e Ã  ton thÃ¨me */
  z-index: 9999; /* s'assurer qu'elle est au-dessus des autres Ã©lÃ©ments */
  border: 1px solid #ccc;
  max-width: 250px;
  list-style-type: none;
  padding-left: 0; 
}
body.dark-mode .ui-autocomplete {
  background-color: #222 !important;
  color: white;
  border: 1px solid #444;
  max-width: 250px;
  list-style-type: none;
  padding-left: 0; 
}
.ui-autocomplete .ui-menu-item-wrapper {
  padding: 8px 12px;
  cursor: pointer;
}
.ui-autocomplete li {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
}

.ui-autocomplete li.ui-menu-item-wrapper.ui-state-focus {
  background-color: #198754;  /* Bleu Bootstrap par exemple */
  color: white;               /* Texte en blanc */
}
.ui-menu-item-wrapper {
  transition: background-color 0.2s ease;
}

/* ===== Entreprises secteur ===== */
.rd-entreprises {
  --rd-border: #e4e7ec;
  --rd-bg: #f5f7fb;
  --rd-card: #ffffff;
  --rd-title: #1f2937;
  --rd-muted: #6b7280;
  --rd-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.rd-entreprises .rd-page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fafc, #eef2f7);
  box-shadow: var(--rd-shadow);
  margin-bottom: 20px;
}

.rd-entreprises .rd-page-title h2 {
  margin: 0;
  font-size: 22px;
  color: var(--rd-title);
}

.rd-entreprises .rd-page-title p {
  margin: 6px 0 0;
  color: var(--rd-muted);
  font-size: 13px;
}

.rd-entreprises .rd-page-legend .badge {
  margin-right: 6px;
}

.rd-entreprises .rd-results-count {
  font-weight: 600;
  margin: 10px 0 0;
  color: var(--rd-title);
}

.rd-entreprise-card {
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  box-shadow: var(--rd-shadow);
  overflow: hidden;
}

.rd-entreprise-card .rd-card-header {
  background: #f3f5f7;
  border-bottom: 1px solid var(--rd-border);
}

.rd-entreprise-card .rd-card-title {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--rd-title);
}

.rd-entreprise-card .rd-card-subtitle {
  font-size: 12px;
  color: var(--rd-muted);
}

.rd-entreprise-card .card-body {
  background: var(--rd-card);
}

.rd-entreprise-card .card-text {
  margin-bottom: 8px;
  font-size: 13px;
}

.rd-entreprise-card .card-footer {
  background: #f8fafc;
  border-top: 1px solid var(--rd-border);
}

@media (max-width: 768px) {
  .rd-entreprises .rd-page-head {
    padding: 14px 16px;
  }
}
