/* Console MyGlue : disposition et couleurs relevées sur la console réelle (barre #F6F6F6 de 56 px, onglet actif
   #1DBAAF, liens #56878F, Roboto 14 px, titres de 36 px, menu de gauche de 240 px). Le logo vient du fichier de la
   console (img/logo-myglue.png). */

.mg {
  --mg-barre: #f6f6f6;
  --mg-sarcelle: #1dbaaf;
  --mg-lien: #56878f;
  --mg-sombre: #4e7d85;
  --mg-vert: #52b26f;
  --mg-texte: #222;
  --mg-doux: #8a8f94;
  --mg-bordure: #e3e3e3;
  --mg-actif: #ececec;
  font-family: Roboto, "Segoe UI", system-ui, Arial, sans-serif;
  font-size: 14px;
  color: var(--mg-texte);
  background: #fff;
  min-height: calc(100vh - 32px);
}
.mg a { color: var(--mg-lien); text-decoration: none; }
.mg a:hover { text-decoration: underline; }
.mg button { font-family: inherit; font-size: inherit; cursor: pointer; }
.mg .ico { width: 16px; height: 16px; flex: none; }
.mg-gris { color: var(--mg-doux); }

/* --- La barre du haut --- */
.mg-top { display: flex; align-items: stretch; height: 56px; background: var(--mg-barre); border-bottom: 1px solid var(--mg-bordure); }
.mg-logo { display: flex; align-items: center; width: 236px; padding-left: 12px; }
.mg-logo img { display: block; }
.mg-nav { display: flex; }
.mg-nav a { display: flex; align-items: center; padding: 0 14px; color: #222 !important; font-size: 13px; font-weight: 700; }
.mg-nav a:hover { text-decoration: none; background: #ebebeb; }
.mg-nav a.actif { background: var(--mg-sarcelle); color: #fff !important; }
.mg-recherche { align-self: center; display: flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 18px; width: 74px; height: 28px; padding: 0 8px;
  background: #fff; border: 1px solid #fff; border-radius: 3px; color: #9aa0a6; font-size: 13px; }
.mg-recents { display: flex; align-items: center; gap: 4px; padding: 0 16px; background: #5f9ea6; border: 0; color: #fff; }
.mg-compte { display: flex; align-items: center; gap: 8px; padding: 0 16px; background: #7eaeb6; border: 0; color: #fff; font-weight: 700; font-size: 13px; }
.mg-avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #5f8f97;
  font-size: 10px; font-weight: 700; border: 1px solid #5f8f97; }
.mg-avatar.petit { width: 30px; height: 30px; background: #e8f1f2; border-color: #c9dcdf; }

/* --- Le menu de gauche --- */
.mg-corps { display: flex; height: calc(100vh - 32px - 56px); }
.mg-menu { flex: none; width: 240px; overflow-y: auto; background: #fafafa; border-right: 1px solid var(--mg-bordure); padding: 6px 0 40px; font-size: 12px; }
.mg-menu-item { display: flex; align-items: center; gap: 12px; padding: 7px 14px 7px 16px; color: #333 !important; border-left: 3px solid transparent; }
.mg-menu-item:hover { text-decoration: none; background: #f0f0f0; }
.mg-menu-item.actif { background: var(--mg-actif); border-left-color: var(--mg-sarcelle); font-weight: 700; }
.mg-menu-item .ico { width: 14px; height: 14px; color: #444; }
.mg-menu-item span { margin-left: auto; color: #444; }
.mg-menu-item em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-menu-titre { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 6px 16px; color: #8a8f94; font-size: 11px; letter-spacing: .02em; }
.mg-menu-titre .ico { width: 13px; height: 13px; }
.mg-menu-plus { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: #333; cursor: pointer; border-top: 1px solid var(--mg-bordure); margin-top: 8px; }

/* --- La page --- */
.mg-principal { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; }
.mg-fil { padding: 8px 14px; border-bottom: 1px solid var(--mg-bordure); font-size: 14px; color: #333; }
.mg-fil span { color: #333; }
.mg-page { flex: 1; padding: 18px 14px 30px; }
.mg-pied { padding: 8px 10px; font-size: 11px; color: #333; border-top: 1px solid var(--mg-bordure); }
.mg-pied a { margin-left: 6px; }
.mg-support { position: fixed; right: 18px; bottom: 0; background: #e8901c; color: #fff; border: 0; border-radius: 3px 3px 0 0; padding: 7px 16px; font-size: 14px; }

.mg-entete-page { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mg-entete-page h1, .mg-titre-org h1 { font-size: 36px; font-weight: 400; }
.mg-boutons, .mg-panneau-boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.mg-bouton { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 3px; border: 1px solid #c8cdd0; background: #fff; color: #444; font-size: 14px; }
.mg-bouton.sombre { background: var(--mg-sombre); border-color: var(--mg-sombre); color: #fff; font-weight: 700; }
.mg-bouton.vert { background: var(--mg-vert); border-color: var(--mg-vert); color: #fff; font-weight: 700; }
.mg-bouton.contour { background: #fff; color: #444; }
.mg-bouton.petit { height: 26px; padding: 0 10px; font-size: 13px; font-weight: 700; color: #222 !important; }
.mg-bouton.petit:hover { text-decoration: none; }

/* --- Les listes --- */
.mg-outils { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.mg-filtre { flex: 1; height: 40px; padding: 0 12px; border: 1px solid #cfd3d6; border-radius: 3px; font: inherit; color: #999; }
.mg-archive { display: flex; align-items: center; gap: 6px; color: #333; white-space: nowrap; }
.mg-compte-liste { white-space: nowrap; margin-right: 60px; }
.mg-icone { background: none; border: 0; color: #333; display: flex; }
.mg-tableau-cadre { overflow-x: auto; }
.mg-tableau { width: 100%; border-collapse: collapse; }
.mg-tableau th { text-align: left; font-weight: 700; padding: 12px 10px; border-bottom: 1px solid var(--mg-bordure); white-space: nowrap; }
.mg-tableau td { padding: 9px 10px; border-bottom: 1px solid var(--mg-bordure); white-space: nowrap; }
.mg-tableau tbody tr:hover { background: #f7fafa; }
.mg-tableau.compact th, .mg-tableau.compact td { padding: 8px 10px; }
.mg-tri { color: #c5c9cc; font-size: 11px; }
.mg-tri.actif { color: #222; }
.mg-case { width: 40px; }
.mg-tronque { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.mg-tronque.large { max-width: 340px; }
.mg-actions { text-align: right; }
.mg-actions button, .mg-icones-mdp button { background: none; border: 0; color: #333; padding: 2px 5px; }
.mg-icones-mdp { white-space: nowrap; }
.mg-icones-mdp .ico { width: 15px; height: 15px; }
.mg-droite { text-align: right; }
.mg-choisi td { background: #e6f5f4; }

/* --- L'accueil de l'organisation --- */
.mg-titre-org { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.mg-statut-org { color: var(--mg-doux); font-size: 16px; }
.mg-titre-org .ico { width: 20px; height: 20px; color: #c5c9cc; }
.mg-accueil { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mg-carte { border: 1px solid var(--mg-bordure); border-radius: 3px; padding: 14px 16px; }
.mg-carte h2 { font-size: 17px; font-weight: 400; margin-bottom: 10px; color: #333; }
.mg-liste-simple { list-style: none; margin: 0; padding: 0; }
.mg-liste-simple li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f1f1f1; }
.mg-liste-simple li:last-child { border-bottom: 0; }
.mg-liste-simple li > span:last-child:not(.mg-texte) { margin-left: auto; color: var(--mg-doux); font-size: 12px; white-space: nowrap; }
.mg-liste-simple.contacts li div { display: flex; flex-direction: column; }
.mg-liste-simple.contacts li div span { color: var(--mg-doux); font-size: 12px; }
.mg-voir-tout { display: inline-block; margin-top: 8px; font-size: 13px; }
.mg-vide { color: var(--mg-doux); font-size: 12px; margin: 6px 0; }

/* --- Les fiches (configuration, document, mot de passe) --- */
.mg-page:has(.mg-deux-colonnes) { padding: 0; }
.mg-deux-colonnes { display: flex; min-height: 100%; }
.mg-colonne-principale { flex: 1; min-width: 0; padding: 18px 14px 30px; }
.mg-panneau { flex: none; width: 440px; background: #fafafa; border-left: 1px solid var(--mg-bordure); padding: 14px 18px 40px; }
.mg-panneau-boutons { padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--mg-bordure); }
.mg-titre-fiche { font-size: 34px; font-weight: 400; margin-bottom: 6px; }
.mg-categorie { font-size: 18px; color: var(--mg-doux); }
.mg-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 11px; color: #666; margin-bottom: 22px; }
.mg-meta .ico { width: 12px; height: 12px; }
.mg-sep { width: 1px; height: 12px; background: #ccc; margin: 0 4px; }
.mg-point { width: 7px; height: 7px; border-radius: 50%; background: #2ecc71; margin-left: 4px; }
.mg-champs { max-width: 860px; }
.mg-champs.mdp { margin-top: 20px; }
.mg-champ { display: flex; align-items: center; min-height: 32px; padding: 2px 0; }
.mg-champ > span { flex: none; width: 252px; color: #9a9ea2; font-size: 13px; }
.mg-champ > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mg-champ .ico { width: 14px; height: 14px; }
.mg-copier { display: inline-flex; background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 3px; color: #888; }
.mg-afficher { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 4px 12px; font-size: 12px; color: #333; }
.mg-sous-titre { font-size: 17px; font-weight: 400; color: #555; margin: 26px 0 10px; }
.mg-source { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #199ed9; color: #fff; font-size: 10px; font-weight: 700; }
.mg-disque { max-width: 860px; margin-bottom: 10px; }
.mg-barre { height: 8px; background: #e6e9eb; margin: 4px 0; }
.mg-barre span { display: block; height: 100%; background: #5f9ea6; }

/* --- Le panneau de droite --- */
.mg-volet { border-bottom: 1px solid var(--mg-bordure); padding: 14px 0; }
.mg-volet header { display: flex; align-items: center; gap: 8px; cursor: pointer; color: #555; }
.mg-volet header h3 { flex: 1; font-size: 17px; font-weight: 400; margin: 0; }
.mg-volet header .ico:last-child { width: 12px; height: 12px; }
.mg-volet-corps { padding-top: 12px; }
.mg-depot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 10px; border: 2px dashed #bbb; cursor: pointer; }
.mg-depot strong { font-weight: 500; }
.mg-depot span { color: #555; font-size: 13px; }
.mg-ajout { display: block; margin-bottom: 8px; }
.mg-lie { display: flex; gap: 8px; padding: 6px 0; }
.mg-lie .ico { margin-top: 2px; color: #777; }
.mg-lie div { display: flex; flex-direction: column; }
.mg-lie span { color: #888; font-size: 11px; }
.mg-logiciels { margin-top: 12px; }
.mg-logiciels h4 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 400; color: #888; margin: 0 0 6px; }
.mg-logiciels table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mg-logiciels td { padding: 4px 0; border-bottom: 1px solid #eee; }
.mg-logiciels td:last-child { text-align: right; color: #666; }
.mg-desuet td { color: #c0392b !important; font-weight: 700; }
.mg-revisions { list-style: none; margin: 0; padding: 0; }
.mg-revisions li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid #eee; }
.mg-revisions span { color: #888; font-size: 12px; }
.mg-radio { display: flex; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.mg-acces { display: grid; grid-template-columns: 120px 1fr; gap: 6px 10px; margin: 10px 0 12px 22px; font-size: 13px; }
.mg-acces span { color: #888; }
.mg-acces strong { font-weight: 500; }
.mg-expiration { display: flex; align-items: center; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--mg-bordure); color: var(--mg-lien); font-size: 17px; cursor: pointer; }
.mg-public { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.mg-public span { flex-basis: 100%; color: #888; font-size: 12px; padding-left: 22px; }

/* --- Le document --- */
.mg-doc-haut { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--mg-bordure); }
.mg-doc-haut .mg-bouton { height: 30px; }
.mg-publie { text-align: right; font-size: 10px; color: #333; line-height: 1.3; }
.mg-publie span { color: #999; }
.mg-titre-doc { font-size: 32px; font-weight: 300; margin: 20px 0 10px; }
.mg-drapeau { display: flex; align-items: center; gap: 8px; padding: 10px; background: #f6f6f6; font-size: 13px; cursor: pointer; }
.mg-drapeau .ico { fill: currentColor; }
.mg-doc { display: flex; gap: 0; margin-top: 6px; }
.mg-sommaire { flex: none; width: 160px; padding: 10px 14px; background: #f6f6f6; align-self: flex-start; position: sticky; top: 0; }
.mg-sommaire-outils { display: flex; justify-content: space-between; color: #666; margin-bottom: 14px; }
.mg-sommaire a { display: block; padding: 5px 0; font-size: 12px; color: #444 !important; line-height: 1.3; }
.mg-doc-contenu { flex: 1; min-width: 0; padding: 4px 18px 0; line-height: 1.5; max-width: 900px; }
.mg-doc-contenu h2 { font-size: 20px; font-weight: 500; margin: 22px 0 8px; }
.mg-doc-contenu table { border-collapse: collapse; margin: 10px 0; }
.mg-doc-contenu th, .mg-doc-contenu td { border: 1px solid #ddd; padding: 6px 10px; text-align: left; vertical-align: top; }
.mg-doc-contenu thead th:empty { display: none; }
.mg-doc-contenu thead:has(th:empty) { display: none; }
.mg-doc-contenu blockquote { margin: 10px 0; padding: 8px 14px; background: #f3f9f9; border-left: 3px solid var(--mg-sarcelle); }
.mg-doc-contenu blockquote p { margin: 0; }
.mg-doc-contenu li { margin: 3px 0; }
.mg-doc-contenu li p { margin: 0; }
.mg-doc-contenu code { background: #f2f2f2; padding: 0 4px; border-radius: 2px; }
.mg-doc-contenu hr { border: 0; border-top: 1px solid #ddd; margin: 24px 0 10px; }

/* --- La recherche globale --- */
.mg-voile { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 50; display: flex; justify-content: center; padding-top: 84px; }
.mg-fenetre-recherche { display: flex; width: 560px; max-height: 520px; align-self: flex-start; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.mg-fenetre-recherche.avec-apercu { width: 1020px; }
.mg-recherche-gauche { width: 560px; flex: none; display: flex; flex-direction: column; background: #f3f3f3; }
.mg-recherche-champ { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; }
.mg-recherche-champ > .ico { width: 22px; height: 22px; }
.mg-recherche-champ label:first-of-type { flex: 1; display: flex; flex-direction: column; }
.mg-recherche-champ label span { font-size: 10px; color: #aaa; }
.mg-recherche-champ input#mg-recherche-champ { border: 0; outline: 0; font: inherit; font-size: 18px; padding: 0; }
.mg-recherche-champ .mg-archive { font-size: 11px; color: #555; align-self: flex-start; }
#mg-resultats { overflow-y: auto; }
.mg-resultat { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; color: #222 !important; border-bottom: 1px solid #e8e8e8; }
.mg-resultat:hover { text-decoration: none; background: #e9f3f3; }
.mg-resultat.choisi { background: #d5ebe9; }
.mg-resultat > span:first-child { display: flex; flex-direction: column; }
.mg-resultat strong { font-weight: 400; font-size: 14px; }
.mg-resultat em { font-style: normal; font-size: 11px; color: #999; }
.mg-resultat-type { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #999; width: 110px; }
.mg-resultat-type .ico { width: 13px; height: 13px; }
.mg-aucun { padding: 10px 14px; background: #d5ebe9; }
.mg-recherche-bas { display: flex; justify-content: space-between; padding: 8px 14px; font-size: 10px; color: #aaa; background: #fff; margin-top: auto; }
.mg-apercu { flex: 1; min-width: 0; padding: 16px 22px; overflow: hidden; }
.mg-apercu:empty { display: none; }
.mg-apercu h3 { font-size: 26px; font-weight: 400; margin: 0 0 14px; }
.mg-apercu .mg-champ > span { width: 110px; }
.mg-apercu-doc { font-size: 13px; line-height: 1.45; max-height: 420px; overflow: hidden; }
.mg-apercu-doc table { border-collapse: collapse; }
.mg-apercu-doc td, .mg-apercu-doc th { border: 1px solid #e3e3e3; padding: 4px 6px; vertical-align: top; }
.mg-apercu-doc thead:has(th:empty) { display: none; }
.mg-masque { letter-spacing: 2px; }
