/* ====== FONTS ====== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800;900&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }

/* ====== BACKGROUND avec décors visuels ====== */
body {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 24px;
  color: #0f172a;
  overflow: auto;
  position: relative;
  background: #ffffff;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(139, 92, 246, 0.25), transparent 25%),
    radial-gradient(circle at 88% 15%, rgba(96, 165, 250, 0.30), transparent 28%),
    radial-gradient(circle at 82% 88%, rgba(139, 92, 246, 0.22), transparent 25%),
    radial-gradient(circle at 15% 85%, rgba(59, 130, 246, 0.20), transparent 28%),
    linear-gradient(180deg, #f0f9ff 0%, #ffffff 50%, #eff6ff 100%);
}

/* === Vagues SVG décoratives (en haut à gauche) === */
body::before {
  content: '';
  position: fixed;
  top: -100px;
  left: -150px;
  width: 600px;
  height: 600px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'><g fill='none' stroke='%238b5cf6' stroke-width='1' opacity='0.35'><path d='M0,150 Q150,50 300,150 T600,150'/><path d='M0,180 Q150,80 300,180 T600,180'/><path d='M0,210 Q150,110 300,210 T600,210'/><path d='M0,240 Q150,140 300,240 T600,240'/><path d='M0,270 Q150,170 300,270 T600,270'/><path d='M0,300 Q150,200 300,300 T600,300'/><path d='M0,330 Q150,230 300,330 T600,330'/><path d='M0,360 Q150,260 300,360 T600,360'/></g></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  transform: rotate(-20deg);
  pointer-events: none;
  z-index: 1;
  animation: floatWave 18s ease-in-out infinite;
}

/* === Vagues SVG en bas à droite + motif de points === */
body::after {
  content: '';
  position: fixed;
  bottom: -100px;
  right: -100px;
  width: 700px;
  height: 600px;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 700 600'><g fill='none' stroke='%2360a5fa' stroke-width='1' opacity='0.4'><path d='M100,100 Q300,200 500,100 T900,100'/><path d='M100,130 Q300,230 500,130 T900,130'/><path d='M100,160 Q300,260 500,160 T900,160'/><path d='M100,190 Q300,290 500,190 T900,190'/><path d='M100,220 Q300,320 500,220 T900,220'/><path d='M100,250 Q300,350 500,250 T900,250'/></g></svg>"),
    radial-gradient(circle, rgba(96, 165, 250, 0.5) 1.5px, transparent 2px);
  background-size: contain, 18px 18px;
  background-position: center, top right;
  background-repeat: no-repeat, no-repeat;
  transform: rotate(15deg);
  pointer-events: none;
  z-index: 1;
  animation: floatWave 22s ease-in-out infinite reverse;
}

@keyframes floatWave {
  0%, 100% { transform: translate(0, 0) rotate(-20deg); }
  50%      { transform: translate(20px, -30px) rotate(-15deg); }
}

/* ====== CARD ====== */
.container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  margin: auto;
  padding: 32px 36px 28px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  box-shadow:
    0 30px 80px rgba(59, 130, 246, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  animation: cardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== BRAND "SmartHire" bicolor — VERSION CORRIGÉE ====== */
.container .brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  text-align: center;
  letter-spacing: -1px;
  margin-bottom: 4px;
  line-height: 1.1;
}

.container .brand-smart {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

.container .brand-hire {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

/* Tagline — NOUVEAU TEXTE */
.container .tagline {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 0;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

/* ====== LABELS ====== */
.container label {
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.2px;
}

/* ====== INPUTS ====== */
.container input[type="text"],
.container input[type="email"],
.container input[type="tel"],
.container select {
  width: 100%;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition: all 0.25s ease;
}

.container select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%238b5cf6' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
  cursor: pointer;
}

.container input::placeholder { color: #94a3b8; }

.container input:hover,
.container select:hover { border-color: #cbd5e1; }

.container input:focus,
.container select:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Hint sous les inputs */
.hint {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #94a3b8;
  letter-spacing: 0.1px;
}

/* ====== CONSENT ====== */
#consentLabel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.55;
  cursor: pointer;
}

#consentCheckbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  min-width: 20px;
  margin-top: 2px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

#consentCheckbox:hover { border-color: #2563eb; }

#consentCheckbox:checked {
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  border-color: transparent;
}

#consentCheckbox:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

#consentHighlight {
  color: #8b5cf6;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px dashed #c4b5fd;
  transition: all 0.2s ease;
}

#consentHighlight:hover { color: #6d28d9; border-bottom-color: #8b5cf6; }

/* ====== BUTTON ====== */
.container button,
#login {
  position: relative;
  width: 100%;
  margin-top: 18px;
  padding: 13px 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #6366f1 50%, #8b5cf6 100%);
  background-size: 200% 200%;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.container button::before,
#login::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.6s ease;
}

.container button:hover::before,
#login:hover::before { left: 100%; }

.container button:hover,
#login:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(99, 102, 241, 0.55);
}

.container button:active,
#login:active { transform: translateY(0); }

.container button:disabled,
#login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  animation: none;
}

/* ====== CONSENT POPUP ====== */
#consentPopup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

#consentPopup[style*="block"],
#consentPopup[style*="flex"] { display: flex !important; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#consentPopup > div {
  max-width: 640px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 44px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.7;
  animation: popIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

#consentPopup h1, #consentPopup h2, #consentPopup h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #1e3a8a;
  margin-bottom: 14px;
}

/* Footer modal avec 2 boutons */
.modal-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

.modal-actions button { margin-top: 0; width: auto; min-width: 160px; }

#consentDecline {
  padding: 13px 32px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

#consentDecline:hover { background: #e2e8f0; color: #1e293b; }

#closeConsent {
  display: inline-block;
  padding: 13px 40px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
}

#closeConsent:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(99, 102, 241, 0.55);
}

/* Scrollbar */
#consentPopup > div::-webkit-scrollbar { width: 8px; }
#consentPopup > div::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
#consentPopup > div::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #2563eb, #8b5cf6); border-radius: 4px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 520px) {
  .container { padding: 28px 20px 24px; border-radius: 22px; }
  .container .brand { font-size: 1.75rem; }
  body::before, body::after { width: 400px; height: 400px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
}