:root { --navy: #0f2742; --navy-2: #173a60; --ink: #13202f; --ink-2: #4a5866; --muted: #7b8794; --line: #d6dce3; --accent: #1d5fa8;
  --accent-soft: #e8f0f9; --bg: #f4f6f8; --red: #ce1126; --yellow: #fcd116; --green: #009460; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font: 16px/1.5 "Source Sans 3", "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg); }
.flag { display: flex; height: 5px; } .flag i { flex: 1; } .flag i:nth-child(1) { background: var(--red); }
.flag i:nth-child(2) { background: var(--yellow); } .flag i:nth-child(3) { background: var(--green); }
.ic { width: 18px; height: 18px; flex: none; }
.wrap { min-height: calc(100% - 5px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }

/* ---- volet institutionnel ---- */
.side { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 44px 56px 32px; display: flex; flex-direction: column; gap: 28px; }
.map { position: absolute; right: -110px; bottom: -120px; width: 78%; max-width: 640px; }
.map path { fill: rgba(255, 255, 255, .045); stroke: rgba(255, 255, 255, .16); stroke-width: 1.2; stroke-linejoin: round; }
.side-top { display: flex; align-items: center; gap: 16px; position: relative; }
.logo { width: 92px; height: 92px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); }
.logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.logo span { display: none; color: var(--navy); font-weight: 700; font-size: 22px; letter-spacing: .04em; }
.logo.nologo span { display: block; }
.org { margin: 0; font-size: 15px; line-height: 1.35; color: #c9d6e4; } .org b { color: #fff; font-weight: 700; }
.side-text { position: relative; margin: auto 0; max-width: 540px; }
.kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow);
  padding-left: 12px; border-left: 3px solid var(--yellow); margin-bottom: 12px; }
.side-text h1 { font-size: 36px; line-height: 1.15; margin: 0 0 14px; font-weight: 700; }
.side-text > p { margin: 0; color: #c9d6e4; font-size: 17px; }
.feats { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.feats li { display: flex; gap: 14px; align-items: flex-start; }
.f-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; }
.f-ic .ic { width: 19px; height: 19px; }
.feats div { display: flex; flex-direction: column; line-height: 1.35; padding-top: 1px; }
.feats b { font-size: 16px; } .feats div span { font-size: 14px; color: #a9bcd1; }
.side-foot { position: relative; margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #8fa6bf; }
.secure { display: inline-flex; align-items: center; gap: 6px; color: #c9d6e4; }
.secure .ic { width: 15px; height: 15px; color: #7fd3a6; }

/* ---- formulaire ---- */
.panel { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px 64px; }
.box { width: 100%; max-width: 400px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-top: 4px solid var(--navy); border-radius: 12px; padding: 30px 32px 26px; box-shadow: 0 10px 30px rgba(15, 39, 66, .08); }
.box-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.box-ic .ic { width: 22px; height: 22px; }
h2 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; font-weight: 700; color: var(--navy); }
.hint { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
label { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.field { position: relative; margin: 0 0 16px; }
.field .lead { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
input { font: inherit; padding: 11px 12px 11px 40px; border: 1px solid var(--line); border-radius: 8px; width: 100%; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s; }
input:hover { border-color: #b9c3ce; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 95, 168, .18); }
.field:focus-within .lead { color: var(--accent); }
#password { padding-right: 46px; }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; }
.eye:hover { background: var(--bg); color: var(--navy); }
.eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.eye span { display: grid; }
.caps { display: flex; align-items: center; gap: 6px; margin: -8px 0 14px; font-size: 13px; color: #7a5400; }
.caps .ic { width: 15px; height: 15px; }
.submit { position: relative; margin-top: 6px; border: 0; border-radius: 8px; padding: 12px 16px; font: inherit; font-weight: 700; color: #fff; background: var(--navy);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s; }
.submit:hover { background: var(--navy-2); }
.submit:hover .go { transform: translateX(3px); }
.submit .go { transition: transform .15s; }
.submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
.submit.busy { background: var(--navy-2); cursor: progress; } .submit.busy .go { display: none; } .submit.busy .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 18px; padding: 10px 12px; border-radius: 8px; background: #fdecee; color: #9b1424;
  font-size: 14px; line-height: 1.4; border: 1px solid #f4c7cd; }
.err .ic { width: 17px; height: 17px; margin-top: 1px; }
.legal { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #edf0f3; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.copy { position: absolute; bottom: 20px; margin: 0; font-size: 13px; color: var(--ink-2); }

@media (max-width: 860px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .side { padding: 22px 20px 24px; gap: 16px; }
  .logo { width: 64px; height: 64px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
  .side-text h1 { font-size: 23px; margin-bottom: 0; }
  .kicker { margin-bottom: 8px; }
  .side-text > p, .feats, .side-foot { display: none; }
  .map { width: 70%; right: -40px; bottom: -30px; }
  .panel { padding: 22px 14px 28px; justify-content: flex-start; align-items: stretch; }
  .box { margin: 0 auto; }
  .box { padding: 24px 20px 20px; box-shadow: none; }
  .copy { position: static; margin-top: 22px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } .submit .go { transition: none; } }
