/*
 * Connexion TECHCARE — écran scindé plein viewport.
 * Remplace l'ancienne carte flottante. Aucune dépendance au thème Dore / Bootstrap.
 * Photo : Pexels 247786 (licence Pexels, usage commercial libre), fichier local login-hero.jpg.
 * Typographie : Inter (SIL Open Font License), fichiers locaux.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../font/inter/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../font/inter/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../font/inter/inter-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../font/inter/inter-latin-700-normal.woff2") format("woff2");
}

body.tcare-login {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: #122033;
  color-scheme: light;
  background: #fff;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.tcare-login *,
body.tcare-login *::before,
body.tcare-login *::after {
  box-sizing: border-box;
}

body.tcare-login img {
  max-width: 100%;
  height: auto;
}

body.tcare-login a {
  color: #1d4fa8;
}

.tc-skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 5;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: #122033;
  font-weight: 600;
  text-decoration: none;
}

.tc-skip:focus {
  top: 16px;
  outline: 2px solid #1d4fa8;
  outline-offset: 2px;
}

.tc-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  grid-template-areas: "hero panel";
  min-height: 100vh;
  min-height: 100dvh;
}

.tc-hero {
  grid-area: hero;
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 52px 48px;
  color: #fff;
  background-color: #0c2348;
  background-image:
    linear-gradient(165deg, rgba(8, 28, 64, 0.78) 0%, rgba(16, 62, 132, 0.42) 46%, rgba(6, 18, 40, 0.88) 100%),
    url("../img/login-hero.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.tc-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 640px;
  min-height: 100%;
  gap: 32px;
}

.tc-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tc-brand img {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 7px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(4, 14, 32, 0.28);
}

.tc-brand strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.tc-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.tc-hero-copy {
  max-width: 540px;
}

.tc-tagline {
  margin: 0;
  max-width: 14em;
  font-size: clamp(1.85rem, 2.5vw, 2.7rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.tc-points {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.tc-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.98rem;
  font-weight: 500;
}

.tc-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.tc-panel {
  grid-area: panel;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 48px 40px;
  background:
    radial-gradient(1200px 420px at 100% -10%, rgba(42, 111, 219, 0.08), transparent 55%),
    #fff;
  box-shadow: -28px 0 60px rgba(8, 20, 40, 0.06);
}

.tc-card {
  width: 100%;
  max-width: 420px;
}

.tc-form-logo {
  display: block;
  width: 200px;
  height: auto;
  object-fit: contain;
}

.tc-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  color: #1d4fa8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tc-cross {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.tc-cross::before,
.tc-cross::after {
  content: "";
  position: absolute;
  border-radius: 2px;
  background: #d23c3c;
}

.tc-cross::before {
  top: 5px;
  left: 0;
  width: 12px;
  height: 2px;
}

.tc-cross::after {
  top: 0;
  left: 5px;
  width: 2px;
  height: 12px;
}

.tc-title {
  margin: 8px 0 8px;
  color: #102033;
  font-size: clamp(1.8rem, 2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.tc-sub {
  margin: 0 0 28px;
  color: #4d5e70;
  font-size: 1rem;
  line-height: 1.55;
}

.tc-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f0c2c2;
  border-radius: 12px;
  background: #fff4f4;
  color: #8d1d1d;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.4;
}

.tc-alert svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.tc-field {
  margin: 0 0 16px;
}

.tc-field label {
  display: block;
  margin: 0 0 8px;
  color: #1b2c3d;
  font-size: 0.9rem;
  font-weight: 600;
}

.tc-req {
  color: #d23c3c;
}

.tc-field input {
  display: block;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #d3ddea;
  border-radius: 12px;
  background: #f7f9fc;
  color: #122033;
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.tc-field input:hover {
  border-color: #b7c6da;
}

.tc-field input:focus {
  border-color: #2a6fdb;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(42, 111, 219, 0.18);
}

.tc-field input:-webkit-autofill {
  -webkit-text-fill-color: #122033;
  box-shadow: 0 0 0 1000px #fff inset, 0 0 0 4px rgba(42, 111, 219, 0.18);
}

.tc-password {
  position: relative;
}

.tc-password input {
  padding-right: 56px;
}

.tc-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #526579;
  cursor: pointer;
  transform: translateY(-50%);
}

.tc-toggle:hover {
  color: #1d4fa8;
  background: rgba(42, 111, 219, 0.08);
}

.tc-toggle:focus-visible {
  outline: 2px solid #1d4fa8;
  outline-offset: 2px;
}

.tc-toggle .tc-icon-off {
  display: none;
}

.tc-toggle.is-visible .tc-icon-on {
  display: none;
}

.tc-toggle.is-visible .tc-icon-off {
  display: block;
}

.tc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tc-btn-primary {
  border-color: #1a56b0;
  background: linear-gradient(180deg, #3b82ea 0%, #1f62d0 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(31, 98, 208, 0.28);
}

.tc-btn-primary:hover {
  background: #1a56b8;
  color: #fff;
}

.tc-btn-primary:active {
  background: #164a9e;
  transform: translateY(1px);
}

.tc-btn-primary:focus-visible,
.tc-btn-ghost:focus-visible,
.tc-help a:focus-visible {
  outline: 2px solid #0d2f66;
  outline-offset: 3px;
}

.tc-actions {
  display: grid;
  gap: 10px;
}

.tc-btn-ghost {
  border-color: #d3ddea;
  background: #fff;
  color: #16324f;
  box-shadow: none;
}

.tc-btn-ghost:hover {
  border-color: #2a6fdb;
  color: #1d4fa8;
  background: #f5f8ff;
}

.tc-help {
  margin: 26px 0 0;
  color: #5a6b7d;
  font-size: 0.9rem;
  text-align: center;
}

.tc-help p {
  margin: 0 0 6px;
}

.tc-help-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
}

.tc-help a {
  color: #1d4fa8;
  font-weight: 600;
  text-decoration: none;
}

.tc-help a:hover {
  text-decoration: underline;
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  .tc-hero {
    padding: 32px 36px 36px;
  }

  .tc-panel {
    padding: 36px 28px;
  }
}

@media (max-height: 820px) and (min-width: 992px) {
  .tc-hero {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .tc-brand img {
    width: 56px;
    height: 56px;
  }

  .tc-tagline {
    font-size: 1.7rem;
  }

  .tc-points {
    margin-top: 16px;
    gap: 8px;
  }

  .tc-panel {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .tc-form-logo {
    width: 170px;
    height: auto;
  }

  .tc-kicker {
    margin-top: 12px;
  }

  .tc-sub {
    margin-bottom: 16px;
  }
}

@media (max-width: 991.98px) {
  .tc-shell {
    align-content: start;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "hero"
      "panel";
    min-height: 100dvh;
  }

  .tc-hero {
    align-self: start;
    height: auto;
    min-height: 0;
    padding: 0;
  }

  .tc-hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    max-width: none;
    padding: 14px 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .tc-hero-copy {
    display: none;
  }

  .tc-brand img {
    width: 48px;
    height: 48px;
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(4, 14, 32, 0.22);
  }

  .tc-brand strong {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
  }

  .tc-brand span {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .tc-panel {
    align-items: flex-start;
    align-self: stretch;
    width: 100%;
    min-height: calc(100dvh - 76px);
    padding: 28px 20px 36px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    box-shadow: none;
  }

  .tc-form-logo {
    display: none;
  }

  .tc-kicker {
    margin-top: 0;
  }

  .tc-card {
    max-width: 520px;
  }

  .tc-help-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .tc-help a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 10px;
  }
}

@media (max-width: 575.98px) {
  .tc-title {
    font-size: 1.7rem;
  }

  .tc-sub {
    margin-bottom: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-field input,
  .tc-btn {
    transition: none;
  }
}
