/* Page de connexion — photo du siège la nuit sous voile marine, carte ivoire. */
body.connexion { min-height: 100vh; margin: 0; background: #061833; color: #E2E8F0; overflow-x: hidden; }
.cx-fond { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.cx-photo { position: absolute; inset: -2%; background-size: cover; background-position: 62% 30%; transform: scale(1.04); animation: cx-derive 38s ease-in-out infinite alternate; }
.cx-voile { position: absolute; inset: 0; background:
  linear-gradient(100deg, rgba(6, 24, 51, .94) 0%, rgba(11, 37, 69, .78) 42%, rgba(11, 37, 69, .45) 70%, rgba(6, 24, 51, .82) 100%),
  radial-gradient(900px 500px at 82% 12%, rgba(91, 155, 216, .22), transparent 60%); }
.cx-etoile { position: absolute; right: 9%; top: 9%; width: 4.2rem; height: 4.2rem; color: #fff;
  filter: drop-shadow(0 0 18px rgba(147, 197, 253, .9)) drop-shadow(0 0 42px rgba(59, 130, 246, .6));
  animation: cx-scintille 5.5s ease-in-out infinite; }
@keyframes cx-derive { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.09) translate(-1.5%, -1%); } }
@keyframes cx-scintille { 0%, 100% { opacity: .75; transform: rotate(0) scale(1); } 50% { opacity: 1; transform: rotate(14deg) scale(1.12); } }

.cx-page { position: relative; z-index: 1; min-height: 100vh; display: grid; align-items: center; gap: 3rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); padding: 3rem clamp(1rem, 5vw, 6rem); max-width: 1320px; margin: 0 auto; box-sizing: border-box; }

.cx-recit { max-width: 34rem; animation: cx-entree .8s cubic-bezier(.16, 1, .3, 1) both; }
.cx-surtitre { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem; font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #C9D4B5; }
.cx-surtitre::before { content: ""; width: 2.2rem; height: 1px; background: #A3AD8A; }
.cx-accroche { margin: 0; font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.12; color: #fff; letter-spacing: -.015em; }
.cx-points { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.cx-points li { display: flex; gap: .85rem; align-items: flex-start; font-size: .95rem; line-height: 1.5; color: rgba(226, 232, 240, .86); }
.cx-points svg { flex: none; width: 2.1rem; height: 2.1rem; padding: .45rem; border-radius: .7rem; color: #C9D4B5; background: rgba(163, 173, 138, .14); box-shadow: inset 0 0 0 1px rgba(163, 173, 138, .3); }

.cx-carte { background: #FFFDF8; color: #3B4757; border-radius: 1.4rem; padding: 2.1rem 2rem 1.4rem;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .5); position: relative; overflow: hidden;
  animation: cx-entree .7s .1s cubic-bezier(.16, 1, .3, 1) both; }
.cx-carte::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #0B2545, #0B4F8A 50%, #A3AD8A); }
.cx-logo img { height: 3.4rem; width: auto; display: block; }
.cx-entete { margin: 1.4rem 0 1.3rem; }
.cx-entete h2 { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 1.55rem; font-weight: 600; color: #0B2545; }
.cx-entete p { margin: .3rem 0 0; font-size: .88rem; color: #7A8494; }

.cx-alerte { display: flex; gap: .6rem; align-items: flex-start; border-radius: .8rem; padding: .7rem .85rem; font-size: .84rem; line-height: 1.4; margin-bottom: 1rem; }
.cx-alerte svg { flex: none; width: 1.05rem; height: 1.05rem; margin-top: .05rem; }
.cx-alerte-erreur { background: #FEF2F2; color: #991B1B; box-shadow: inset 0 0 0 1px #FECACA; animation: cx-secoue .4s; }
.cx-alerte-verrou { background: #FFFBEB; color: #92400E; box-shadow: inset 0 0 0 1px #FDE68A; }
.cx-alerte-info { background: #EEF4FA; color: #0A4275; box-shadow: inset 0 0 0 1px #B3CDE7; }

.cx-form { display: grid; gap: 1rem; }
.cx-champ { display: grid; gap: .4rem; }
.cx-etiquette { font-size: .8rem; font-weight: 600; color: #0B2545; }
.cx-saisie { position: relative; display: flex; align-items: center; }
.cx-saisie > svg { position: absolute; left: .85rem; width: 1.05rem; height: 1.05rem; color: #7A8494; pointer-events: none; }
.cx-saisie input { width: 100%; box-sizing: border-box; font: inherit; font-size: .95rem; color: #0B2545; background: #F8F4EA; border: 1px solid #E5DDCB; border-radius: .8rem; padding: .8rem 2.8rem .8rem 2.6rem; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.cx-saisie input:focus { outline: none; background: #fff; border-color: #0B4F8A; box-shadow: 0 0 0 4px rgba(11, 79, 138, .14); }
.cx-saisie input::placeholder { color: #A1A8B3; }
.cx-oeil { position: absolute; right: .45rem; width: 2.1rem; height: 2.1rem; border: 0; background: transparent; border-radius: .55rem; color: #7A8494; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cx-oeil:hover { background: rgba(11, 37, 69, .06); color: #0B2545; }
.cx-oeil svg { width: 1.05rem; height: 1.05rem; }
.cx-maj { display: flex; align-items: center; gap: .35rem; margin: -.4rem 0 0; font-size: .75rem; color: #B45309; }
.cx-maj svg { width: .9rem; height: .9rem; }
.cx-bouton { margin-top: .4rem; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; width: 100%; border: 0; border-radius: .85rem; padding: .9rem 1rem; font: inherit; font-weight: 600; font-size: .95rem; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #0B4F8A 0%, #0B2545 70%); box-shadow: 0 14px 30px -14px rgba(11, 37, 69, .9); transition: transform .15s, box-shadow .2s, filter .2s; }
.cx-bouton:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -14px rgba(11, 37, 69, .95); }
.cx-bouton svg { width: 1.1rem; height: 1.1rem; transition: transform .2s; }
.cx-bouton:hover svg { transform: translateX(3px); }
.cx-bouton.en-cours { filter: saturate(.7); pointer-events: none; }
.cx-bouton:focus-visible, .cx-oeil:focus-visible, .cx-aide summary:focus-visible { outline: 2px solid #0B4F8A; outline-offset: 2px; }

.cx-aide { margin-top: 1.2rem; border-top: 1px solid #EFE8D8; padding-top: .9rem; font-size: .8rem; color: #5B6575; }
.cx-aide summary { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; font-weight: 600; color: #0B4F8A; list-style: none; }
.cx-aide summary::-webkit-details-marker { display: none; }
.cx-aide summary svg { width: .95rem; height: .95rem; }
.cx-aide p { margin: .55rem 0 0; line-height: 1.45; }
.cx-pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: 1.2rem; font-size: .7rem; color: #98A0AC; }
.cx-securite { display: inline-flex; align-items: center; gap: .3rem; color: #5D6748; font-weight: 600; }
.cx-securite svg { width: .85rem; height: .85rem; }

@keyframes cx-entree { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cx-secoue { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (max-width: 960px) {
  .cx-page { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 2rem 1rem; gap: 1.5rem; }
  .cx-recit { text-align: left; max-width: 27rem; }
  .cx-points { display: none; }
  .cx-accroche { font-size: 1.6rem; }
  .cx-carte { width: 100%; max-width: 27rem; box-sizing: border-box; padding: 1.7rem 1.3rem 1.2rem; }
  .cx-etoile { right: 6%; top: 3%; width: 3rem; height: 3rem; }
}
@media (prefers-reduced-motion: reduce) { .cx-photo, .cx-etoile, .cx-recit, .cx-carte, .cx-alerte-erreur { animation: none; } }

/* Page à carte seule (vérification 2FA) */
.cx-page-seule { grid-template-columns: minmax(0, 27rem); justify-content: center; }
.cx-code { width: 100%; box-sizing: border-box; text-align: center; font-family: 'IBM Plex Mono', monospace; font-size: 2rem; letter-spacing: .45em; padding: .7rem .5rem .7rem 1rem; color: #0B2545; background: #F8F4EA; border: 1px solid #E5DDCB; border-radius: .8rem; }
.cx-code:focus { outline: none; background: #fff; border-color: #0B4F8A; box-shadow: 0 0 0 4px rgba(11, 79, 138, .14); }
.cx-lien { display: inline-flex; align-items: center; gap: .3rem; border: 0; background: none; padding: 0; font: inherit; color: #0B4F8A; font-weight: 600; cursor: pointer; }
.cx-lien svg { width: .85rem; height: .85rem; }
