@charset "UTF-8";
/* ---------- Print : paysage et masquage de la colonne Suppression ---------- */
/* Note : ce bloc doit être placé en-dehors de tout @media, directement
   à la racine de votre feuille CSS, idéalement **après** toutes les autres règles */
@page {
  size: landscape;
}

@media print {
  /* Ne garder que le tableau */
  body * {
    visibility: hidden !important;
  }
  #actions_table,
  #actions_table * {
    visibility: visible !important;
  }
  #actions_table {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }

  /* Masquer la colonne "Suppression" */
  #actions_table th:last-child,
  #actions_table td:last-child {
    display: none !important;
  }
}

/* ---------- Base ---------- */
body {
    background-color: white;
    color: #f0f0f0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Sections et titres ---------- */
h1, h2, h3, h4 {
    color: #ffffff;
    margin-bottom: 1rem;
}

section {
    background-color: #1e1e1e;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
/* Correction des champs de formulaire */
input[type="text"],
textarea,
select {
    background-color: white;
    color: black;
    border: 1px solid #ccc;
    padding: 8px;
}


input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
}

/* ---------- Formulaires et champs ---------- */
.form-label {
    color: red;
}

/* Harmonisation du style des champs de formulaire */
input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select,
.form-control,
.form-select {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #ccc;
    padding: 8px;
}

/* Focus visuel cohérent */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    background-color: #ffffff;
    color: #000000;
}

/* ---------- Boutons ---------- */
.btn {
    font-weight: 500;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004ba0;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* ---------- Alertes ---------- */
.alert {
    font-weight: 500;
}

.alert-success {
    background-color: #234d28;
    border-color: #1f4224;
    color: #c5f6d0;
}

/* ---------- Zone des détails KPI ---------- */
#kpi_details {
    background-color: #2d2d2d;
    border: 1px solid #444;
    font-size: 0.95rem;
}

#kpi_details p {
    margin-bottom: 0.5rem;
}

/* ---------- Chart.js canvas ---------- */
canvas#kpi_chart {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
   
    display: block; /* pour éviter comportement inline par défaut */
}

/* ---------- Media queries ---------- */
@media (max-width: 768px) {
    section {
        padding: 1rem;
    }

    .form-label {
        font-size: 0.95rem;
    }
}




.voyant {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin: 0 auto;
}

.voyant.rouge {
    background-color: red;
}

.voyant.vert {
    background-color: green;
}

.voyant.orange {
    background-color: orange;
}

/* Optionnel : centrer dans la cellule */
td.voyant-cell {
    text-align: center;
}

/*Arbre des actions*/
#actions_tree { font-size: 0.95rem; }
#actions_tree ul { list-style: none; margin: 0; padding-left: .9rem; border-left: 1px dashed #dee2e6; }
#actions_tree li { margin: .2rem 0; }

#actions_tree .tree-node { display: flex; align-items: center; gap: .5rem; }
#actions_tree .tree-toggle {
  border: 0; background: none; padding: 0; width: 1rem; cursor: pointer;
  line-height: 1; color: #6c757d;
}
#actions_tree .tree-toggle::before { content: '▸'; display: inline-block; transform: rotate(0deg); transition: transform .15s; }
#actions_tree .tree-toggle[aria-expanded="true"]::before { content: '▾'; }

#actions_tree .tree-label { cursor: pointer; user-select: none; }
#actions_tree .tree-label:hover { text-decoration: underline; }
#actions_tree .badge-count { font-size: .7rem; }
#actions_tree .muted { color: #6c757d; }

#evt_table.col-statut select {
  width: 100%;
}

.tree-scroll{
  max-height: clamp(120px, 65vh, 300px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;    /* évite les sauts de mise en page */
  border: 1px solid #ddd;
  border-radius: .5rem;
  padding: .5rem;
}

/* bonus: éviter le débordement horizontal des libellés */
#actions_tree .tree-node{
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
#actions_tree ul{ margin:0; padding-left:1rem; }

.col-12, [class*="col-"] { min-height: 0; }
