/* police Plus Jakarta Sans hébergée localement (assets/fonts/plus-jakarta-sans, licence SIL OFL) : aucun appel externe */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-400.woff2) format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-500.woff2) format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-600.woff2) format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-700.woff2) format("woff2");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/plus-jakarta-sans/plus-jakarta-sans-latin-800.woff2) format("woff2");
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-weight: 500;
  background: linear-gradient(160deg, #e8eeff 0%, #f6f8ff 55%, #dfe7ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.form-login {
  background-color: #155EEF;
  background-image: linear-gradient(145deg, #3B7BF5 0%, #155EEF 45%, #0B3B9E 100%);
  padding: 20px;
  border-radius: 16px;
  border-top: 4px solid #F97316;
  box-shadow: 0 20px 50px rgba(11, 59, 158, 0.35);
  margin-top: 9vh;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

/* icônes des champs : cases blanches assorties aux champs */
.form-login .input-group-addon {
  background-color: #fff;
  border: 0;
  color: #155EEF;
  min-width: 42px;
}

.form-login .input-group-addon:first-child {
  border-radius: 8px 0 0 8px;
}

.form-login .input-group-addon:last-child {
  border-radius: 0 8px 8px 0;
  border-left: 1px solid #e3e9f8;
}

.form-login .input-group .form-control:not(:last-child) {
  border-radius: 0;
}

.form-login .input-group .form-control:last-child {
  border-radius: 0 8px 8px 0;
}

/* bouton pleine largeur, aligné sur les champs (les styles en ligne de la page sont surchargés) */
.form-login .wrapper .btn {
  width: 100%;
  height: 44px !important;
  font-size: 16px !important;
}

.form-login .plogo {
  background-color: #fff;
  width: 100%;
  border-radius: 12px;
  text-align: center;
}
h4 {
  text-align: center;
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.wrapper {
  text-align: center;
}
.logo {
  display: block;
  background-color: #fff;
  border-radius: 12px;
  margin-left: auto;
  margin-right: auto;
  max-height: 250px!important;
}

.form-login .form-control {
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
}

.form-login .form-control:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.btn {
  font-weight: 600;
  color: #fff;
  background-color: #F97316;
  border-color: #F97316;
  border-radius: 8px;
  transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn.active,
.btn.focus,
.btn:active,
.btn:focus,
.btn:hover,
.open > .dropdown-toggle.btn {
  color: #fff;
  background-color: #EA580C;
  border-color: #EA580C;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.btn:hover {
  transform: translateY(-1px);
}


/* =====================================================================
   PAGE DE CONNEXION (index.php) : panneau de marque bleu + carte blanche
   Prefixe "body.page-login" / "lg-" : n'affecte pas mot_de_passe_obligatoire.php
   ===================================================================== */
body.page-login {
  --lg-blue: #155EEF;
  --lg-blue-soft: #e8eeff;
  --lg-orange: #F97316;
  --lg-orange-hover: #EA580C;
  --lg-bg: #F8FAFC;
  --lg-ink: #14213d;
  --lg-muted: #64748b;
  --lg-line: #e3e9f8;
  --lg-line-strong: #cfd8ea;
  --lg-danger: #DC2626;
  margin: 0;
  min-height: 100vh;
  font-size: 14px;
  color: var(--lg-ink);
  background: var(--lg-bg);
}

.lg-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- Panneau de marque ---------- */
.lg-brand {
  position: relative;
  flex: 0 0 44%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  color: #fff;
  background: var(--lg-blue);
  overflow: hidden;
}

/* cercles décoratifs */
.lg-brand::before,
.lg-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.lg-brand::before {
  width: 520px;
  height: 520px;
  top: -170px;
  right: -210px;
  background: rgba(255, 255, 255, 0.07);
}

.lg-brand::after {
  width: 380px;
  height: 380px;
  bottom: -150px;
  left: -150px;
  border: 50px solid rgba(255, 255, 255, 0.06);
}

.lg-brand > * {
  position: relative;
  z-index: 1;
}

.lg-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 100px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(11, 59, 158, 0.30);
}

.lg-brand__logo img {
  max-width: 100%;
  max-height: 100%;
}

body.page-login .lg-brand__titre {
  margin: 44px 0 14px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

/* repère orange sous le titre */
.lg-brand__titre::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 18px;
  border-radius: 4px;
  background: var(--lg-orange);
}

.lg-brand__texte {
  max-width: 380px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.lg-atouts {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.lg-atouts li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 500;
}

.lg-atouts .glyphicon {
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  height: 36px;
  font-size: 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
}

.lg-brand__pied {
  margin: 32px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- Zone du formulaire ---------- */
.lg-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.lg-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  background: #fff;
  border: 1px solid var(--lg-line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(11, 59, 158, 0.08);
}

.lg-card__logo-mobile {
  display: none;
}

body.page-login .lg-card__titre {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--lg-ink);
}

.lg-card__sous-titre {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--lg-muted);
}

/* ---------- Alertes ---------- */
.lg-alerte {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.45;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: 10px;
}

.lg-alerte .glyphicon {
  top: 2px;
  flex: 0 0 auto;
}

.lg-alerte p,
.lg-alerte ul {
  margin: 0;
}

.lg-alerte ul {
  padding-left: 0;
  list-style: none;
}

.lg-alerte li + li {
  margin-top: 4px;
}

.lg-alerte--erreur {
  color: #991b1b;
  background: #fef2f2;
  border-color: #f1a1a1;
  border-left-color: var(--lg-danger);
}

.lg-alerte--attention {
  color: #92400e;
  background: #fffbeb;
  border-color: #f5c363;
  border-left-color: #F59E0B;
}

/* ---------- Champs ---------- */
.lg-champ {
  margin-bottom: 18px;
}

body.page-login .lg-champ label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.lg-saisie {
  position: relative;
}

.lg-saisie > .glyphicon {
  position: absolute;
  top: 50%;
  left: 14px;
  font-size: 14px;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
  transition: color .15s ease;
}

.lg-saisie:focus-within > .glyphicon {
  color: var(--lg-blue);
}

body.page-login .lg-saisie .form-control {
  height: 46px;
  padding: 10px 14px 10px 42px;
  font-size: 15px;
  color: var(--lg-ink);
  background: #fff;
  border: 1px solid var(--lg-line-strong);
  border-radius: 10px;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

body.page-login .lg-saisie--mdp .form-control {
  padding-right: 50px;
}

body.page-login .lg-saisie .form-control::placeholder {
  color: #9aa8c0;
}

body.page-login .lg-saisie .form-control:focus {
  border-color: var(--lg-blue);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.18);
  outline: 0;
}

/* bouton afficher / masquer le mot de passe */
.lg-oeil {
  position: absolute;
  top: 50%;
  right: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--lg-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  transform: translateY(-50%);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.lg-oeil:hover {
  color: var(--lg-blue);
  background: var(--lg-blue-soft);
}

.lg-oeil:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.25);
}

.lg-majuscules {
  display: none;
  margin: 6px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #b45309;
}

.lg-majuscules.is-visible {
  display: block;
}

/* ---------- Bouton principal ---------- */
.lg-bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--lg-orange);
  border: 1px solid var(--lg-orange);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.28);
  transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

.lg-bouton:hover {
  background: var(--lg-orange-hover);
  border-color: var(--lg-orange-hover);
  transform: translateY(-1px);
}

.lg-bouton:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.35);
}

.lg-bouton[disabled] {
  opacity: .8;
  cursor: wait;
  transform: none;
}

.lg-bouton .glyphicon {
  top: 0;
}

.lg-aide {
  margin: 22px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--lg-muted);
}

/* ---------- Mobile et tablette : une seule colonne ---------- */
@media (max-width: 899px) {
  .lg-brand {
    display: none;
  }

  .lg-main {
    align-items: flex-start;
    padding: 32px 16px;
    background: linear-gradient(var(--lg-blue) 0, var(--lg-blue) 150px, var(--lg-bg) 150px);
  }

  .lg-card {
    padding: 28px 20px;
  }

  .lg-card__logo-mobile {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }

  .lg-card__logo-mobile img {
    max-height: 64px;
    max-width: 180px;
  }

  body.page-login .lg-card__titre,
  .lg-card__sous-titre {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-bouton,
  .lg-bouton:hover {
    transition: none;
    transform: none;
  }
}
