/* Atelia · porte d'entrée (js/session.js) : connexion, mot de passe oublié, choix du mot de passe,
   lien expiré, mauvais espace. Jetons de css/tokens.css, carte .card et boutons .btn existants.
   Téléphone et ordinateur : une seule colonne centrée, pleine largeur sous 480 px. */

/* Porte ouverte : rien de l'app ne dépasse (invite d'installation du mobile comprise). */
.porte-active .a2hs, .porte-active .a2hs-ios { display: none !important; }

.porte {
  position: fixed; inset: 0; z-index: 100; overflow-y: auto;
  display: flex; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: var(--cream); font-family: var(--font); color: var(--ink);
}
.porte-carte {
  width: 100%; max-width: 420px; margin: auto; overflow: visible;
  padding: 32px 30px 26px; box-shadow: var(--shadow-raised);
  display: flex; flex-direction: column;
}
.porte-tete { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 22px; }
.porte-marque { font-size: 32px; }
.porte-espace {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 700;
}
.porte-titre { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 800; color: var(--navy); }
.porte-texte { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.porte-texte b { color: var(--navy); word-break: break-word; }

.porte-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.porte-champ { display: flex; flex-direction: column; gap: 6px; }
.porte-champ span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.porte-champ input {
  width: 100%; box-sizing: border-box; min-height: 46px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2);
  font: inherit; font-size: 16px; color: var(--ink);   /* 16 px : pas de zoom automatique sur iPhone */
}
.porte-champ input:focus { outline: none; border-color: var(--blue); background: var(--surface); box-shadow: 0 0 0 3px rgba(36,86,196,.15); }
/* Cadre « Votre profil » : la liste des fonctions a le même aspect que les champs. */
.porte-champ select {
  width: 100%; box-sizing: border-box; min-height: 46px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2);
  font: inherit; font-size: 16px; color: var(--ink);
}
.porte-champ select:focus { outline: none; border-color: var(--blue); background: var(--surface); box-shadow: 0 0 0 3px rgba(36,86,196,.15); }

.porte-erreur {
  margin: 0; padding: 10px 12px; border-radius: var(--r-xs); border: 1px solid var(--rouge-bd);
  background: var(--rouge-bg); color: var(--rouge); font-size: 13px; font-weight: 600; line-height: 1.4;
}
.porte-erreur[hidden] { display: none; }

.porte-btn { justify-content: center; width: 100%; min-height: 46px; font-size: 15px; text-decoration: none; box-sizing: border-box; }
.porte-btn[disabled] { opacity: .6; cursor: progress; }
.porte-lien {
  align-self: center; margin-top: 16px; padding: 8px 10px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--blue);
}
.porte-lien:hover { text-decoration: underline; }
.porte-lien:focus-visible, .porte-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 480px) {
  .porte { align-items: flex-start; padding-left: 16px; padding-right: 16px; }
  .porte-carte { padding: 26px 20px 20px; border-radius: var(--r-sm); }
  .porte-titre { font-size: 20px; }
}

/* Pied du menu (console et Réseau) : compte connecté et « Se déconnecter ». */
.side-foot.avec-compte { flex-wrap: wrap; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b.courriel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot.avec-compte .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* fonction sous le nom */

/* App mobile : fonction en petite police discrète sous « Bonjour <prénom> ». */
.fr-root .fr-greet-fn { margin: 4px 0 0; font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.side-foot .deconnexion {
  flex: 1 0 100%; border: 1px solid var(--line); background: var(--surface); color: var(--navy); cursor: pointer;
  border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 12px; font-weight: 700;
}
.side-foot .deconnexion:hover { background: var(--surface-2); }
.side-foot .deconnexion .deco-ico { display: none; }   /* icône seule quand le menu de la console est replié (css/base.css) */

/* Console, carte et tiroir « Comptes » : profil du compte (« Prénom Nom · Fonction · téléphone ») sous l'adresse e-mail. */
.acces-profil { margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.acces-profil.muted { color: var(--muted); }
