/* TRADUCTIONS EBENE — même charte que SPICA (violet #3903A5, cartes arrondies) */
:root {
	--violet: #3903A5;
	--violet-fonce: #2a0279;
	--violet-clair: #f3f1f8;
	--bordure: #e4e0ee;
	--texte: #222;
	--gris: #666;
	--fond: #f7f6fb;
	--rouge: #b3261e;
	--vert: #1e7b34;
	--orange: #9a5b00;
}
body { background: var(--fond); color: var(--texte); font-size: 14px; }
a { color: var(--violet); }
a:hover { color: var(--violet-fonce); }

/* ----- Barre (reprise de BarreConnexion2.php de SPICA) ----- */
.bc-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; background: #fff; border: 1px solid var(--bordure); border-radius: 12px;
	box-shadow: 0 4px 24px rgba(57, 3, 165, .06); padding: 8px 16px; margin: 8px 8px 20px; font-size: 13px; }
.bc-marque { display: flex; align-items: center; gap: 10px; color: var(--violet); font-weight: bold; font-size: 17px; text-decoration: none; margin-right: 6px; }
.bc-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--violet); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.bc-marque small { display: block; font-size: 11px; color: var(--gris); font-weight: normal; letter-spacing: .5px; }
.bc-menu { display: flex; flex-wrap: wrap; gap: 4px; }
.bc-lien { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; color: #444; text-decoration: none; font-weight: 600; }
.bc-lien:hover, .bc-lien.actif { background: var(--violet-clair); color: var(--violet); }
.bc-droite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-left: auto; }
.bc-utilisateur { display: flex; align-items: center; gap: 8px; color: #444; }
.bc-utilisateur small { display: block; color: var(--gris); font-size: 11px; }
.bc-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--violet); color: #fff; font-weight: bold; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bc-bouton { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: bold; border: 1px solid var(--violet);
	color: var(--violet); background: #fff; text-decoration: none; white-space: nowrap; }
.bc-bouton-plein { background: var(--violet); color: #fff; }
.bc-bouton-plein:hover { background: var(--violet-fonce); color: #fff; }
@media (max-width: 900px) { .bc-droite { margin-left: 0; width: 100%; } }

/* ----- Contenu ----- */
.contenu { max-width: 1280px; margin: 0 auto; padding: 0 16px 32px; }
.contenu-large { max-width: none; }
.pied { text-align: center; color: var(--gris); font-size: 12px; padding: 16px; }
h1 { font-size: 1.45rem; color: var(--violet-fonce); font-weight: bold; }
.carte { background: #fff; border: 1px solid var(--bordure); border-radius: 12px; box-shadow: 0 4px 24px rgba(57, 3, 165, .05); padding: 16px 20px; margin-bottom: 16px; }
.carte > h2 { font-size: 1.05rem; font-weight: bold; color: var(--violet); margin: 0 0 12px; }
.btn-primary { background: var(--violet); border-color: var(--violet); }
.btn-primary:hover, .btn-primary:focus { background: var(--violet-fonce); border-color: var(--violet-fonce); }
.btn-outline-primary { color: var(--violet); border-color: var(--violet); }
.btn-outline-primary:hover { background: var(--violet); border-color: var(--violet); }
.form-check-input:checked { background-color: var(--violet); border-color: var(--violet); }
.nav-tabs .nav-link { color: #444; }
.nav-tabs .nav-link.active { color: var(--violet); font-weight: bold; }
.carte-connexion { max-width: 420px; margin: 40px auto; }

/* ----- Pastilles et statuts ----- */
.puce { display: inline-block; background: var(--violet-clair); color: var(--violet-fonce); border-radius: 20px; padding: 0 8px; margin: 0 3px 3px 0; font-size: 11.5px; white-space: nowrap; }
.st { display: inline-block; border-radius: 20px; padding: 0 8px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.st-valide { background: #d6f0dc; color: var(--vert); }
.st-auto { background: #dbeafe; color: #1e40af; }
.st-a_revoir { background: #ffe8a3; color: #6b4e00; }
.st-manque { background: #fde2e1; color: var(--rouge); }
.st-npt { background: #e2e2e2; color: #555; }
.alerte-var { color: var(--rouge); font-weight: 600; }

/* ----- Tableau des clés ----- */
.filtres .form-select, .filtres .form-control { font-size: 13px; }
.table-cles { font-size: 13px; background: #fff; }
.table-cles th { position: sticky; top: 0; background: var(--violet-clair); color: var(--violet-fonce); z-index: 1; white-space: nowrap; }
.table-cles td { vertical-align: top; }
.table-cles .col-cle { width: 26%; word-break: break-all; font-family: Consolas, monospace; font-size: 12px; }
.table-cles .col-cle a { text-decoration: none; }
.table-cles .cle-archivee { text-decoration: line-through; color: var(--gris); }
.cellule { position: relative; white-space: pre-wrap; cursor: text; min-height: 1.6em; border-radius: 4px; padding: 2px 4px; margin: -2px -4px; }
.cellule:hover { background: #faf9fd; outline: 1px dashed var(--bordure); }
.cellule.vide::before { content: 'à traduire'; color: var(--rouge); font-style: italic; font-size: 12px; }
.cellule.npt { color: var(--gris); cursor: default; }
.cellule textarea { width: 100%; min-height: 60px; font-size: 13px; }
.cellule .barre-edit { display: flex; gap: 6px; margin-top: 4px; }
.cellule.enregistre { background: #eaf7ee; transition: background .8s; }
.espace-visible { background: #ffe8a3; }
.texte-fr { white-space: pre-wrap; }

/* ----- Divers ----- */
.jauge { height: 8px; background: #eee; border-radius: 5px; overflow: hidden; min-width: 80px; }
.jauge b { display: block; height: 100%; background: var(--vert); }
.jauge.moyen b { background: #e0a100; }
.jauge.faible b { background: var(--rouge); }
.table-stats td, .table-stats th { text-align: center; vertical-align: middle; white-space: nowrap; }
.table-stats td:first-child, .table-stats th:first-child { text-align: left; }
.cellule-stat { min-width: 90px; }
.cellule-stat small { display: block; color: var(--gris); font-size: 11px; }
.historique { font-size: 12.5px; }
.historique .ancien { color: var(--rouge); text-decoration: line-through; white-space: pre-wrap; }
.historique .nouveau { color: var(--vert); white-space: pre-wrap; }
.progression { height: 20px; }
.code { font-family: Consolas, monospace; font-size: 12px; }
.page-item.active .page-link { background: var(--violet); border-color: var(--violet); }
.page-link { color: var(--violet); }
.table-cles .col-cle .puce, .table-cles .col-cle .st { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ----- Templates ----- */
.table-champs td { vertical-align: top; }
.table-champs .texte-fr { color: #333; }
.lien-cle { text-decoration: none; color: var(--gris); }
.lien-cle:hover { color: var(--violet); }
.aide-tpl summary { color: var(--violet); cursor: pointer; font-size: 12.5px; }
.formule { background: #faf9fd; border: 1px solid var(--bordure); border-radius: 8px; padding: 8px 10px; font-family: Consolas, monospace; font-size: 12.5px; white-space: pre-wrap; margin: 0; }
.formule b { color: var(--violet-fonce); }
.f-param { font-family: system-ui, sans-serif; background: #e8f4ec; color: #14532d; border-radius: 4px; padding: 0 3px; }
.legende-formule td { padding: 1px 8px 1px 0; vertical-align: top; }
.legende-formule .code { color: var(--violet-fonce); font-weight: bold; }
.indicateur { border: 1px solid var(--bordure); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.indicateur .lettre { display: inline-block; min-width: 28px; text-align: center; background: var(--violet); color: #fff; border-radius: 6px; font-weight: bold; padding: 0 6px; margin-right: 6px; }
.courbe { background: #fff; border: 1px solid var(--bordure); border-radius: 8px; }
.note-sim { font-size: 1.1rem; font-weight: bold; }
.sim-champ { max-width: 130px; }
.principe { color: var(--violet-fonce); font-size: 1.15rem; font-weight: bold; margin: 18px 0 8px; }

.carte h2 { font-size: 1.05rem; font-weight: bold; color: var(--violet); }
.sim-groupe { font-weight: bold; font-size: .85rem; border-bottom: 1px solid #e4e0ee; margin-top: .5rem; padding-bottom: 2px; }
.sim-groupe:first-child { margin-top: 0; }
/* Bornes de saisie des champs (mini / maxi absolus, seuils d'alerte) */
.bornes { border-collapse: collapse; font-size: .8rem; }
.bornes th, .bornes td { padding: 1px 6px 1px 0; vertical-align: top; }
.bornes th { font-weight: normal; white-space: nowrap; }
.bornes td { font-weight: bold; }
.borne-abs, .bornes .borne-abs th { color: #b02a37; }
.borne-alerte, .bornes .borne-alerte th { color: #946200; }
.bornes tr.vide th, .bornes tr.vide td { color: #9a96a6; font-weight: normal; }
.bornes tr.vide td { font-style: italic; }
.borne-legende { white-space: nowrap; }
.cel-borne { min-width: 90px; }
