/* Page de connexion - Lonnya Health Care 2.0 */
:root {
  --cx-nuit: #06263a; --cx-nuit-2: #0b3d5c; --cx-sarcelle: #0e8fb3; --cx-cyan: #22c3e6;
  /* Dégradés et teintes (remplacés par le modèle de couleurs choisi dans la personnalisation) */
  --cx-degrade-1: #0f5f86; --cx-degrade-2: #0a4466; --cx-logo-1: #3fd2f0; --cx-logo-2: #0c86ad;
  --cx-ico-1: #1aa7c9; --cx-ico-2: #0c6f92; --cx-bouton-1: #12b3d3; --cx-bouton-2: #0e7fa3;
  --cx-cyan-rgb: 34, 195, 230; --cx-sarcelle-rgb: 14, 143, 179; --cx-nuit2-rgb: 11, 61, 92; --cx-fond-rgb: 3, 26, 40;
  --cx-texte: #0d2b3e; --cx-gris: #5b7083; --cx-bord: #d5e1ea;
}
body:has(.cx) { margin: 0; background: #f4f8fb; }
.cx { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 51%) minmax(0, 1fr); font-family: inherit; }

/* ── Panneau gauche ── */
.cx-gauche {
  position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column;
  background: radial-gradient(120% 80% at 30% 15%, var(--cx-degrade-1) 0%, var(--cx-degrade-2) 40%, var(--cx-nuit) 100%);
  padding: clamp(28px, 6vh, 60px) clamp(20px, 4vw, 64px) 0;
}
.cx-halo { position: absolute; width: 360px; height: 360px; border-radius: 50%; left: -230px; top: -230px;
  border: 2px solid rgba(var(--cx-cyan-rgb), .35); background: rgba(var(--cx-cyan-rgb), .08); }
.cx-marque { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: left; }
.cx-marque > * { align-self: stretch; max-width: 520px; margin-left: auto; margin-right: auto; width: 100%; }
.cx-logo {
  align-self: center !important; width: 136px !important; height: 136px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--cx-logo-1), var(--cx-logo-2) 70%); margin-bottom: 18px;
  box-shadow: 0 0 0 10px rgba(var(--cx-cyan-rgb), .12), 0 18px 40px rgba(0, 0, 0, .35);
}
/* Logo personnalisé : disque blanc pour qu'un logo de n'importe quelle couleur reste visible */
.cx-logo.cx-logo-image { background: #fff; padding: 18px; overflow: hidden; }
.cx-logo.cx-logo-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cx-gauche h1 { font-size: clamp(1.7rem, 3vw, 2.6rem); margin: 0; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.cx-gauche h1 em { color: var(--cx-cyan); font-style: italic; }
.cx-soustitre { margin: 4px 0 0; font-size: clamp(1rem, 1.6vw, 1.35rem); color: #cfe6f2; }
.cx-slogan { margin: 34px 0 0; font-style: italic; font-size: clamp(.95rem, 1.3vw, 1.15rem); color: #e9f5fb; line-height: 1.5; }

.cx-atouts { position: relative; z-index: 1; list-style: none; margin: 36px auto 0; padding: 0; width: 100%; max-width: 680px;
  display: grid; grid-template-columns: repeat(var(--nb-atouts, 4), minmax(0, 1fr)); gap: 12px; text-align: center; }
.cx-atouts li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cx-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: linear-gradient(160deg, var(--cx-ico-1), var(--cx-ico-2)); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.cx-ico { color: #fff; }
.cx-ico svg { width: 30px; height: 30px; fill: #fff; }
.cx-atouts strong { font-size: 1rem; }
.cx-atouts small { font-size: .82rem; color: #cfe1ec; line-height: 1.35; max-width: 150px; }

.cx-photo { flex: 1; min-height: 200px; margin: -40px calc(-1 * clamp(20px, 4vw, 64px)) 0;
  background: url("../img/connexion-photo.jpg") center 70% / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%); mask-image: linear-gradient(180deg, transparent 0%, #000 45%); }
.cx-licence { display: flex; align-items: center; gap: 14px; font-size: .85rem; color: #e3eef5; line-height: 1.45;
  margin: 0 calc(-1 * clamp(20px, 4vw, 64px)); padding: 14px clamp(20px, 4vw, 64px); background: rgba(var(--cx-fond-rgb), .82); position: relative; z-index: 1; }

/* ── Panneau droit ── */
.cx-droite { position: relative; display: flex; align-items: center; justify-content: center; padding: 80px 24px 48px;
  background: linear-gradient(180deg, #f7fbfd, #eef4f8); }
.cx-langue { position: absolute; top: 22px; right: 26px; display: flex; align-items: center; gap: 6px; color: var(--cx-texte);
  background: #fff; border: 1px solid var(--cx-bord); border-radius: 10px; padding: 6px 10px; box-shadow: 0 2px 6px rgba(13, 43, 62, .06); }
.cx-langue select { border: 0; background: transparent; font: inherit; color: inherit; padding: 4px 2px; cursor: pointer; min-height: 0; width: auto; box-shadow: none; }
.cx-form { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 20px; }
.cx-tete h2 { font-size: clamp(2rem, 3.4vw, 2.7rem); font-weight: 800; color: var(--cx-texte); margin: 6px 0 4px; letter-spacing: -.01em; }
.cx-tete p { margin: 0; font-size: 1.15rem; color: var(--cx-gris); }
.cx-champ label { display: block; font-weight: 700; color: var(--cx-texte); margin-bottom: 8px; font-size: 1.02rem; }
.cx-saisie { position: relative; }
.cx-saisie > svg { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: #37556a; pointer-events: none; }
.cx-saisie select, .cx-saisie input {
  width: 100%; height: 50px; box-sizing: border-box; padding: 0 46px 0 54px; font: inherit; font-size: 1rem; color: var(--cx-texte);
  background: #fff; border: 1px solid var(--cx-bord); border-radius: 8px; box-shadow: 0 1px 2px rgba(13, 43, 62, .05);
}
.cx-saisie select:focus, .cx-saisie input:focus { outline: none; border-color: var(--cx-sarcelle); box-shadow: 0 0 0 3px rgba(var(--cx-sarcelle-rgb), .18); }
.cx-oeil { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; cursor: pointer; color: #37556a; }
.cx-oeil svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.cx-oeil svg[hidden] { display: none; }
.cx-bouton { margin-top: 8px; height: 56px; border: 0; border-radius: 8px; cursor: pointer; color: #fff; font: inherit; font-size: 1.15rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(90deg, var(--cx-bouton-1) 0%, var(--cx-bouton-2) 55%, var(--cx-nuit-2) 100%); box-shadow: 0 8px 20px rgba(var(--cx-nuit2-rgb), .25); }
.cx-bouton:hover { filter: brightness(1.06); }
.cx-bouton:focus-visible { outline: 3px solid rgba(var(--cx-sarcelle-rgb), .45); outline-offset: 2px; }
.cx-oubli { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.cx-oubli::before, .cx-oubli::after { content: ""; flex: 1; height: 1px; background: var(--cx-bord); }
.cx-oubli button { background: none; border: 0; color: var(--cx-bouton-2); font: inherit; font-weight: 700; font-size: 1.02rem; cursor: pointer; padding: 4px; }
.cx-aide { margin: -6px 0 0; text-align: center; color: var(--cx-gris); font-size: .92rem; }
.cx-signature { position: absolute; right: 40px; bottom: 34px; display: flex; align-items: center; gap: 8px; color: #8fb9cc;
  font-style: italic; font-size: 1rem; transform: rotate(-8deg); line-height: 1.25; }

/* ── Écrans étroits ── */
@media (max-width: 980px) {
  .cx { grid-template-columns: 1fr; }
  .cx-gauche { padding-bottom: 0; }
  /* Sur téléphone et tablette, le formulaire vient tout de suite après la marque. */
  .cx-atouts, .cx-photo, .cx-slogan { display: none; }
  .cx-licence { margin-top: 22px; font-size: .78rem; }
  .cx-droite { padding: 76px 16px 90px; }
  .cx-signature { right: 20px; bottom: 20px; }
}
@media (max-width: 520px) {
  .cx-logo { width: 100px !important; height: 100px; }
  .cx-logo svg { width: 56px; height: 56px; }
  .cx-gauche h1 { text-align: center; }
  .cx-soustitre { text-align: center; }
}
