/* Habillage du panel par-dessus Tabler (static/vendor, MIT). Aucune ressource externe. */

/* Couleur principale : l'orange du castor. */
:root, [data-bs-theme=light] {
  --tblr-primary: #c25e22; --tblr-primary-rgb: 194, 94, 34;
  --tblr-primary-text-emphasis: #7a3912; --tblr-primary-bg-subtle: #fbeadf; --tblr-primary-border-subtle: #f0c3a6;
  --tblr-link-color: #b4561e; --tblr-link-color-rgb: 180, 86, 30; --tblr-link-hover-color: #8f4417;
}
[data-bs-theme=dark] {
  --tblr-primary: #e07a3c; --tblr-primary-rgb: 224, 122, 60;
  --tblr-primary-text-emphasis: #f2b48c; --tblr-primary-bg-subtle: #3b2112; --tblr-primary-border-subtle: #6b3a1d;
  --tblr-link-color: #f0965c; --tblr-link-color-rgb: 240, 150, 92; --tblr-link-hover-color: #f6b689;
}
.btn-primary { --tblr-btn-bg: var(--tblr-primary); --tblr-btn-border-color: var(--tblr-primary);
  --tblr-btn-hover-bg: #a84f1b; --tblr-btn-hover-border-color: #a84f1b; --tblr-btn-active-bg: #8f4417; --tblr-btn-color: #fff; }

[hidden] { display: none !important; }

/* Marque */
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; text-decoration: none; }
.brand img { border-radius: 10px; }
.brand-sub { font-weight: 400; opacity: .65; }
.brand-login { font-size: 1.35rem; color: var(--tblr-body-color); }
.topbar form.logout { margin: 0; }
.navbar-vertical .navbar-collapse { flex-direction: column; align-items: stretch; }

/* Journaux, sorties de commandes, valeurs secretes */
pre { white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; font-size: .8rem; }
pre.logs { white-space: pre; max-height: 560px; }
pre.secret { border: 1px solid var(--tblr-danger); }
/* Onglet Variables : une ligne par variable (nom, valeur, corbeille) ; valeurs en etoiles a la
   demande ; vue collage : texte en clair ou masque. */
.env-row { display: grid; grid-template-columns: minmax(10rem, 20rem) minmax(0, 1fr) auto; gap: .5rem; align-items: start; margin-bottom: .5rem; }
.env-row textarea.env-val { resize: vertical; }
.env-masque .env-val { -webkit-text-security: disc; }
@supports not (-webkit-text-security: disc) { .env-masque .env-val { filter: blur(5px); } }
.env-texte-masque, .env-masque .env-texte-clair { display: none; }
.env-masque .env-texte-masque { display: block; }
@media (max-width: 575.98px) {
  .env-row { grid-template-columns: minmax(0, 1fr) auto; }
  .env-row .env-key { grid-column: 1; grid-row: 1; }
  .env-row .env-del { grid-column: 2; grid-row: 1; }
  .env-row .env-val { grid-column: 1 / -1; grid-row: 2; }
}
/* Sortie d'une commande : la fin reste visible (le defilement part du bas). */
.logs-tail { display: flex; flex-direction: column-reverse; max-height: 65vh; overflow: auto; }
.logs-tail pre.logs { max-height: none; overflow: visible; }
.cmd-cell { max-width: 32rem; }
/* Onglets d'un site : sur une ligne, defilement horizontal sur petit ecran. */
.site-tabs .nav-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.site-tabs .nav-link { white-space: nowrap; }
.flash-body { min-width: 0; flex: 1; }
.flash-body pre { background: rgba(0, 0, 0, .06); color: inherit; }

/* Formulaires en ligne, colonnes qui se replient */
form.inline { display: inline; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; align-items: end; }
.form-grid .wide { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions form { margin: 0; }
details > summary { cursor: pointer; }
.card details + details { margin-top: .75rem; }
.font-mono { font-family: var(--tblr-font-monospace); }
.tabular { font-variant-numeric: tabular-nums; }

/* Barre du haut et cloche des notifications (menu depliant sans JavaScript : <details>) */
.topbar { min-height: 3.25rem; background: var(--tblr-bg-surface); border-bottom: 1px solid var(--tblr-border-color); }
details.notif { position: relative; }
details.notif > summary { list-style: none; cursor: pointer; position: relative; }
details.notif > summary::-webkit-details-marker { display: none; }
details.notif > summary .icon { width: 1.35rem; height: 1.35rem; }
details.notif > summary { padding-top: .6rem !important; padding-bottom: .6rem !important; }
details.notif .badge-notification { top: .3rem !important; right: -.05rem !important; transform: none !important; min-width: 1.15rem; font-size: .65rem; }
details.notif[open] > .dropdown-menu { display: block; position: absolute; right: 0; left: auto; top: calc(100% + .35rem); z-index: 1050; }
.notif-menu { width: 27rem; max-width: calc(100vw - 2rem); padding: 0; }
.notif-menu .card-header { gap: .5rem; flex-wrap: nowrap; }
.notif-menu .card-actions { white-space: nowrap; }
.notif-list { max-height: 22rem; overflow-y: auto; }

/* Editeur de fichier */
textarea.editor { min-height: 60vh; white-space: pre; tab-size: 4; font-size: .82rem; line-height: 1.5; }

/* Largeur des barres de progression (attribut style interdit par la politique de securite). */
.pw-0 { width: 0%; }
.pw-1 { width: 1%; }
.pw-2 { width: 2%; }
.pw-3 { width: 3%; }
.pw-4 { width: 4%; }
.pw-5 { width: 5%; }
.pw-6 { width: 6%; }
.pw-7 { width: 7%; }
.pw-8 { width: 8%; }
.pw-9 { width: 9%; }
.pw-10 { width: 10%; }
.pw-11 { width: 11%; }
.pw-12 { width: 12%; }
.pw-13 { width: 13%; }
.pw-14 { width: 14%; }
.pw-15 { width: 15%; }
.pw-16 { width: 16%; }
.pw-17 { width: 17%; }
.pw-18 { width: 18%; }
.pw-19 { width: 19%; }
.pw-20 { width: 20%; }
.pw-21 { width: 21%; }
.pw-22 { width: 22%; }
.pw-23 { width: 23%; }
.pw-24 { width: 24%; }
.pw-25 { width: 25%; }
.pw-26 { width: 26%; }
.pw-27 { width: 27%; }
.pw-28 { width: 28%; }
.pw-29 { width: 29%; }
.pw-30 { width: 30%; }
.pw-31 { width: 31%; }
.pw-32 { width: 32%; }
.pw-33 { width: 33%; }
.pw-34 { width: 34%; }
.pw-35 { width: 35%; }
.pw-36 { width: 36%; }
.pw-37 { width: 37%; }
.pw-38 { width: 38%; }
.pw-39 { width: 39%; }
.pw-40 { width: 40%; }
.pw-41 { width: 41%; }
.pw-42 { width: 42%; }
.pw-43 { width: 43%; }
.pw-44 { width: 44%; }
.pw-45 { width: 45%; }
.pw-46 { width: 46%; }
.pw-47 { width: 47%; }
.pw-48 { width: 48%; }
.pw-49 { width: 49%; }
.pw-50 { width: 50%; }
.pw-51 { width: 51%; }
.pw-52 { width: 52%; }
.pw-53 { width: 53%; }
.pw-54 { width: 54%; }
.pw-55 { width: 55%; }
.pw-56 { width: 56%; }
.pw-57 { width: 57%; }
.pw-58 { width: 58%; }
.pw-59 { width: 59%; }
.pw-60 { width: 60%; }
.pw-61 { width: 61%; }
.pw-62 { width: 62%; }
.pw-63 { width: 63%; }
.pw-64 { width: 64%; }
.pw-65 { width: 65%; }
.pw-66 { width: 66%; }
.pw-67 { width: 67%; }
.pw-68 { width: 68%; }
.pw-69 { width: 69%; }
.pw-70 { width: 70%; }
.pw-71 { width: 71%; }
.pw-72 { width: 72%; }
.pw-73 { width: 73%; }
.pw-74 { width: 74%; }
.pw-75 { width: 75%; }
.pw-76 { width: 76%; }
.pw-77 { width: 77%; }
.pw-78 { width: 78%; }
.pw-79 { width: 79%; }
.pw-80 { width: 80%; }
.pw-81 { width: 81%; }
.pw-82 { width: 82%; }
.pw-83 { width: 83%; }
.pw-84 { width: 84%; }
.pw-85 { width: 85%; }
.pw-86 { width: 86%; }
.pw-87 { width: 87%; }
.pw-88 { width: 88%; }
.pw-89 { width: 89%; }
.pw-90 { width: 90%; }
.pw-91 { width: 91%; }
.pw-92 { width: 92%; }
.pw-93 { width: 93%; }
.pw-94 { width: 94%; }
.pw-95 { width: 95%; }
.pw-96 { width: 96%; }
.pw-97 { width: 97%; }
.pw-98 { width: 98%; }
.pw-99 { width: 99%; }
.pw-100 { width: 100%; }

/* Telephone : les boutons de l'en-tete de page passent sous le titre au lieu de l'ecraser. */
@media (max-width: 767.98px) {
  .page-header .row > .col-auto { flex: 0 0 100%; max-width: 100%; margin-top: .75rem; }
}

/* Graphiques de ressources (onglet Ressources d'un site). */
.mchart { display: block; width: 100%; height: 120px; }
.mchart .mbar { fill: var(--tblr-primary); }
.mchart .mbar.err { fill: var(--tblr-danger); }
.mchart .mhit { fill: transparent; }
.mchart g:hover .mbar { opacity: .65; }
.mchart .mgrid { stroke: var(--tblr-border-color); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mticks { display: flex; justify-content: space-between; margin-top: .35rem; font-size: .75rem; color: var(--tblr-secondary); }

/* Assistant « nouveau site » : etapes. */
.wizard-steps { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
.wizard-steps li { padding: .35rem .75rem; border-radius: var(--tblr-border-radius); background: var(--tblr-bg-surface-secondary); color: var(--tblr-secondary); font-size: .875rem; }
.wizard-steps li.active { background: var(--tblr-primary); color: #fff; }
.wizard-steps li.done { color: var(--tblr-success); }
