/* ============================================================
   SysVote — Login Page Styles (Refonte UI 2026)
   Palette principale harmonisée : Bleu électoral #1E3A8A + Fond clair #F3F4F6
   Typo    : EB Garamond (sérif) + DM Sans (sans-serif)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: #F3F4F6;
  color: #1E3A8A;
}

/* ── Root wrapper ─────────────────────────────────────────── */
.wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

/* ── Geometric SVG Background ─────────────────────────────── */
.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.background svg {
  width: 100%;
  height: 100%;
}

/* ── Corner Accents ───────────────────────────────────────── */
.corner {
  position: fixed;
  width: 20px;
  height: 20px;
  z-index: 10;
}
.corner.tl { top: 16px; left: 16px; border-top: 2px solid #1E3A8A; border-left: 2px solid #1E3A8A; }
.corner.tr { top: 16px; right: 16px; border-top: 2px solid #1E3A8A; border-right: 2px solid #1E3A8A; }
.corner.bl { bottom: 16px; left: 16px; border-bottom: 2px solid #1E3A8A; border-left: 2px solid #1E3A8A; }
.corner.br { bottom: 16px; right: 16px; border-bottom: 2px solid #1E3A8A; border-right: 2px solid #1E3A8A; }

/* ── Left Panel ───────────────────────────────────────────── */
.left-panel {
  width: 40%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 48px;
  position: relative;
  z-index: 1;
  background: #1E3A8A;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.left-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1E3A8A 0%, #1E2F6F 100%);
  z-index: -1;
}

/* ── Seal / Logo ──────────────────────────────────────────── */
.seal {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.seal img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* ── Left Panel Text ──────────────────────────────────────── */
.panel-org {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 14px;
  font-weight: 500;
}

.panel-title {
  font-family: 'EB Garamond', serif;
  font-size: 42px;
  font-weight: 600;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
}

.panel-divider {
  width: 48px;
  height: 2px;
  background: #F3F4F6;
  margin-bottom: 20px;
}

.panel-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  max-width: 280px;
  font-weight: 400;
}

/* ── Status Row ───────────────────────────────────────────── */
.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

.status-dot.active {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.status-text {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

.panel-copyright {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
}

/* ── Right Panel (Forms) ──────────────────────────────────── */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0px 56px 0px 56px;
  position: relative;
  z-index: 1;
  background: #F3F4F6;
}

/* ── Form Headers ─────────────────────────────────────────── */
.form-eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #1E3A8A;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-heading {
  font-family: 'EB Garamond', serif;
  font-size: 28px;
  color: #1E3A8A;
  font-weight: 500;
  margin-bottom: 36px;
}

/* ── Countdown ────────────────────────────────────────────── */
.countdown-block {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px 28px;
  margin-bottom: 36px;
  min-height: 100px;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.countdown-block.red {
  border-color: #EF4444;
  background: #FEF2F2;
}

.countdown-block.error {
  border-color: #EF4444;
  background: #FEF2F2;
  color: #DC2626;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.time-value {
  font-family: 'EB Garamond', serif;
  font-size: 42px;
  color: #1E3A8A;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: block;
}

.time-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6B7280;
  margin-top: 8px;
  display: block;
  font-weight: 500;
}

.time-separator {
  font-family: 'EB Garamond', serif;
  font-size: 32px;
  color: #9CA3AF;
  padding: 0 6px;
  line-height: 1;
  align-self: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

/* ── Code Inputs ──────────────────────────────────────────── */
.code-section-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6B7280;
  font-weight: 600;
  margin-bottom: 14px;
}

.code-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}

.code-input {
  flex: 1;
  height: 60px;
  max-width: 60px;
  width: 60px !important;
  padding: 0 !important;
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  text-align: center;
  font-family: 'EB Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: #1E3A8A;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.code-input:focus {
  border-color: #1E3A8A;
  box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}

.code-input.error {
  border-color: #EF4444;
  background: #FEF2F2;
}

/* ── Warning Notice ───────────────────────────────────────── */
.notice-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: #FEF3C7;
  border-left: 3px solid #F59E0B;
  border-radius: 8px;
  margin-bottom: 28px;
}

.notice-icon {
  font-size: 16px;
  color: #F59E0B;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-text {
  font-size: 13px;
  color: #92400E;
  line-height: 1.5;
}

/* ── Buttons ──────────────────────────────────────────────── */
button,
.btn-primary {
  width: 100%;
  padding: 16px 24px;
  background: #1E3A8A;
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 28px;
}

button:hover,
.btn-primary:hover {
  background: #2E4A9A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,58,138,0.3);
}

button:active {
  transform: translateY(0);
}

/* ── Separator ────────────────────────────────────────────── */
.separator {
  width: 100%;
  height: 1px;
  background: #E5E7EB;
  border: none;
  margin: 28px 0;
}

/* ── Footer Links ─────────────────────────────────────────── */
.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.link-action {
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
  width: auto;
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  font-weight: 500;
}

.link-action:hover {
  color: #1E3A8A;
  background: none;
  border: none;
}

.link-sep {
  color: #D1D5DB;
  font-size: 12px;
}

/* ── Admin Panel ──────────────────────────────────────────── */
.admin-login-container {
  display: none;
}

.input-group {
  margin-bottom: 24px;
}

.input-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6B7280;
  font-weight: 600;
  margin-bottom: 10px;
}

.input-with-icon {
  position: relative;
}

.icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.5;
}

.admin-login-container input[type="text"],
.admin-login-container input[type="password"] {
  width: 100%;
  padding: 14px 14px 14px 44px;
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  color: #1E3A8A;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: all 0.2s;
}

.admin-login-container input[type="text"]:focus,
.admin-login-container input[type="password"]:focus {
  border-color: #1E3A8A;
  box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}

.admin-login-container input::placeholder {
  color: #9CA3AF;
}

.link-back {
  font-size: 11px;
  color: #6B7280;
  cursor: pointer;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
  width: auto;
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}

.link-back:hover {
  color: #1E3A8A;
  background: none;
  border: none;
}

/* ── Shake / Fall animations ──────────────────────────────── */
@keyframes shake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-6px); }
  50%  { transform: translateX(6px); }
  75%  { transform: translateX(-6px); }
  100% { transform: translateX(0); }
}

@keyframes fall {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}

.shake { animation: shake 0.45s ease; }
.fall  { animation: fall 0.45s forwards; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .wrapper { flex-direction: column; }

  .left-panel {
    width: 100%;
    min-height: auto;
    padding: 36px 32px 28px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .panel-title { font-size: 34px; }
  .panel-subtitle { max-width: 100%; }
  .panel-copyright { display: none; }

  .right-panel { padding: 40px 32px; }
}

@media (max-width: 480px) {
  .left-panel { padding: 28px 20px 20px; }
  .right-panel { padding: 32px 20px; }

  .panel-title { font-size: 28px; }
  .form-heading { font-size: 22px; }

  .code-input {
    height: 50px;
    font-size: 22px;
    max-width: 50px;
  }

  .time-value { font-size: 32px; }

  .seal { width: 64px; height: 64px; margin-bottom: 24px; }
  .seal img { width: 36px; height: 36px; }
}