/* ============================================================================
   assets/css/interface_commune.css — Le tronc commun de l'administration et du tableau
   des modules, chargé après charte.css par vues/gabarits/tete_interface.php.
   Préfixe socle-, JAMAIS « ad- » : les bloqueurs de publicité le masquent.
   AUCUNE COULEUR LITTÉRALE : tout vient des jetons --m-* de charte.css.
   ============================================================================ */

[hidden] { display: none !important; }

/* Lu par les lecteurs d'écran, jamais vu : libellés de champs sans titre visible, annonces. */
.socle-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Le formulaire du bouton de déconnexion (POST avec jeton) : invisible pour la mise en page. */
.socle-deconnexion { display: contents; }

/* Le lien « Aller au contenu » : hors de l'écran, il n'apparaît qu'au clavier. */
.socle-evitement {
  position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 10px 16px;
  background: var(--m-emphase); color: var(--m-sur-emphase); border-radius: var(--m-rayon);
  text-decoration: none; font-weight: 600; transform: translateY(-200%);
  transition: transform .2s var(--m-doux);
}
.socle-evitement:focus { transform: none; }

/* Le filet de la barre : une lueur d'accent le parcourt en 11 s. À 1 px elle se lisait
   comme un reflet, pas comme un mouvement voulu : 2 px. Sous une barre par défaut, le long
   de l'arête droite d'une colonne avec .socle-filet-vertical. */
.socle-filet { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--m-entete-bordure); overflow: hidden; pointer-events: none; }
.socle-filet::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(90deg, transparent, var(--m-entete-accent), transparent);
  animation: socleFilet 11s linear infinite;
}
.socle-filet-vertical { top: 0; left: auto; width: 2px; height: auto; }
.socle-filet-vertical::after {
  bottom: auto; left: 0; right: 0; width: auto; height: 18%;
  background: linear-gradient(180deg, transparent, var(--m-entete-accent), transparent);
  animation-name: socleFiletVertical;
}
@keyframes socleFilet { from { transform: translateX(-100%); } to { transform: translateX(222%); } }
@keyframes socleFiletVertical { from { transform: translateY(-100%); } to { transform: translateY(556%); } }

/* La pastille de la personne connectée, dans la barre ou la colonne : blanc translucide,
   initiales blanches, fine bordure. JAMAIS une teinte d'identité : celles-ci distinguent
   les AUTRES personnes entre elles. Avec une photo, le fond et la bordure s'effacent. */
.socle-pastille-moi {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--m-entete-surface-forte); color: var(--m-entete-fort);
  border: 1px solid var(--m-entete-bordure);
}
/* Sur une surface claire (la fenêtre « Mon profil ») : le gris de la charte, pas celui de la barre. */
.socle-pastille-surface, .socle-pastille-grande { background: var(--m-gris-100); color: var(--m-gris-700); border-color: var(--m-bordure); }
.socle-pastille-surface { width: 40px; height: 40px; font-size: 14px; }
.socle-pastille-grande { width: 96px; height: 96px; font-size: 32px; }
.socle-pastille-moi.avec-photo { background: none; border-color: transparent; }
.socle-pastille-moi img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* La fenêtre « Mon profil » (vues/gabarits/fenetre_profil.php). */
.socle-profil { max-width: 560px; }
.socle-profil-actions { display: flex; justify-content: flex-end; }
.socle-profil-photo { display: flex; align-items: flex-start; gap: var(--m-espace-5); }
.socle-profil-photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--m-espace-3); min-width: 0; }
.socle-profil-rangee { display: flex; flex-wrap: wrap; gap: var(--m-espace-2); }
.socle-profil-rangee form { margin: 0; }
.socle-profil-confirmation .socle-profil-rangee { margin-top: var(--m-espace-2); }

/* Le champ mot de passe (champ_mot_de_passe()) : l'œil dans le champ, les règles dessous. */
.socle-mdp { position: relative; }
.socle-mdp .m-form-input { width: 100%; padding-right: 46px; }
.socle-mdp-voir {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; border-radius: var(--m-rayon-sm); background: none;
  color: var(--m-gris-500); cursor: pointer; display: grid; place-items: center;
}
.socle-mdp-voir:hover { color: var(--m-noir); background: var(--m-gris-50); }
.socle-mdp-voir:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--m-accent); }
.socle-regles-mdp {
  list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px 12px; font-size: 13px; color: var(--m-gris-500);
}
.socle-regles-mdp i { width: 14px; font-size: 7px; text-align: center; }
.socle-regles-mdp .ok { color: var(--m-succes); }
.socle-regles-mdp .ok i { font-size: 11px; }

@media (max-width: 480px) {
  .socle-profil-onglets .m-onglet { padding: 10px 10px; white-space: nowrap; }
  .socle-profil-photo { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .socle-filet::after { display: none; }
}
