:root {
  --navy: #03163a; --navy2: #062658; --cyan: #22d3ee; --cyan2: #13a9dc;
  --text: #eef4fb; --muted: #a9bdd6; --glass: rgba(18, 44, 78, .55); --line: rgba(120, 200, 230, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh; color: var(--text); overflow-x: hidden;
  font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(120% 90% at 10% 10%, #0a3a7a 0%, var(--navy2) 45%, #021233 100%);
  display: flex; align-items: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) 16px max(24px, env(safe-area-inset-bottom, 0px));
}
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- photo du port (à droite, fondue vers la gauche) ---------- */
.photo {
  position: fixed; inset: 0 0 0 auto; width: 60vw; z-index: 0;
  background: url("img/harbor.jpg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
}
.photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 24, 48, .15), rgba(8, 24, 48, .35)); }

.waves { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: 190px; z-index: 1; pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(63, 212, 228, .6)); }
.waves path { stroke: var(--cyan); stroke-width: 1.4; opacity: .55; }
.waves path:nth-child(2) { opacity: .35; }
.waves path:nth-child(3) { opacity: .2; }

/* ---------- colonne gauche ---------- */
.side { position: relative; z-index: 2; width: min(560px, 100%); margin-left: clamp(0px, 6vw, 110px);
  display: flex; flex-direction: column; align-items: center; }

.brand { text-align: center; margin-bottom: 30px; }
.logo { width: 168px; height: 168px; display: block; margin: 0 auto 4px; border-radius: 40px;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .7), 0 0 34px -6px rgba(34, 211, 238, .55); }
h1 { margin: 0; font-family: "Nunito", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-style: italic; font-weight: 800; font-size: clamp(46px, 9vw, 72px); letter-spacing: .5px; line-height: 1.05;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.tagline { display: flex; align-items: center; gap: 16px; margin: 12px 0 0; color: #dce8f5;
  font-size: clamp(15px, 2.6vw, 20px); letter-spacing: 1.6px; }
.tagline::before, .tagline::after { content: ""; flex: 1; min-width: 30px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan)); }
.tagline::after { background: linear-gradient(90deg, var(--cyan), transparent); }

/* ---------- carte ---------- */
.card { width: 100%; padding: 34px clamp(20px, 6vw, 56px) 26px; border-radius: 24px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08); }
label { display: block; font-weight: 600; font-size: 16px; margin: 0 0 9px; }
.field { position: relative; display: flex; align-items: center; margin-bottom: 22px;
  background: rgba(10, 30, 58, .55); border: 1px solid rgba(140, 190, 230, .3); border-radius: 14px;
  transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63, 212, 228, .18); }
.field > svg { width: 22px; height: 22px; margin-left: 18px; color: #dbe7f4; flex: none; }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text);
  font: inherit; font-size: 16px; padding: 16px 14px; }
.field input::placeholder { color: #c4d3e4; opacity: .8; }
.eye { background: none; border: 0; color: #dbe7f4; padding: 10px 16px; cursor: pointer; display: grid; place-items: center; }
.eye svg { width: 22px; height: 22px; }
.eye.on { color: var(--cyan); }

.check { display: flex; align-items: center; gap: 12px; font-weight: 400; cursor: pointer; margin: 2px 0 22px; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--cyan); display: grid; place-items: center; }
.check .box svg { width: 16px; height: 16px; stroke: var(--cyan); stroke-width: 2.6; opacity: 0; }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(63, 212, 228, .3); }

.error { margin: -6px 0 16px; padding: 10px 14px; border-radius: 10px; background: rgba(239, 68, 68, .15);
  border: 1px solid rgba(239, 68, 68, .45); color: #ffd1d1; font-size: 14px; }

.submit { width: 100%; border: 0; border-radius: 999px; padding: 16px; cursor: pointer;
  font: inherit; font-size: 19px; font-weight: 700; color: #072238;
  background: linear-gradient(180deg, #6fe6f1, var(--cyan2));
  box-shadow: 0 10px 30px -8px rgba(63, 212, 228, .7), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .1s, filter .15s; }
.submit:hover { filter: brightness(1.06); }
.submit:active { transform: translateY(1px); }
.submit:disabled { filter: grayscale(.4) brightness(.85); cursor: wait; }

.forgot { display: block; margin: 20px auto 0; background: none; border: 0; color: var(--cyan);
  font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.hint code { background: rgba(0, 0, 0, .25); padding: 1px 6px; border-radius: 5px; }

.secure { display: flex; align-items: center; gap: 12px; margin-top: 22px; color: #dce8f5; font-size: 15px; }
.secure::before, .secure::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.secure::after { background: linear-gradient(90deg, var(--line), transparent); }
.secure svg { width: 24px; height: 24px; color: #e6f0fa; }

/* ---------- tablette / mobile : photo en fond plein écran ---------- */
@media (max-width: 900px) {
  body { justify-content: center; }
  .photo { width: 100vw; -webkit-mask-image: none; mask-image: none; }
  .photo::after { background: linear-gradient(180deg, rgba(8, 24, 48, .78), rgba(8, 24, 48, .9)); }
  .side { margin-left: 0; }
  .waves { height: 120px; }
}
@media (max-width: 480px) {
  .logo { width: 120px; height: 120px; border-radius: 28px; }
  .brand { margin-bottom: 22px; }
  .card { padding-top: 26px; border-radius: 20px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
