/* login_register_password.css */
/* Objectif: reprendre le look des filtres de jobs.php (postalcode-bar) pour inputs et boutons */

:root{
  --jobs-teal:#2c6671;
  --jobs-teal-dark:#174e59;
  --jobs-teal-darker:#113e47;

  --jobs-border:#d7e2ea;
  --jobs-border-hover:#c5dde1;

  --jobs-bg:#ffffff;
  --jobs-bg-soft:#f7f9fb;
  --jobs-bg-active:#edf7f8;
  --jobs-bg-focus:#fbfeff;

  --jobs-shadow:0 8px 24px rgba(17,24,39,0.12);

  --jobs-radius-card:8px;
  --jobs-radius-ui:10px;
  --jobs-h:46px;
  --jobs-ring:0 0 0 2px rgba(44,102,113,0.08);

  --jobs-muted:#6b7280;
  --jobs-placeholder:#6f7d89;
  --jobs-text:#111827;
  --jobs-link:#2563eb;
}

/* Base */
html,
body{
  height:100%;
  margin:0;
  padding:0;
  background:var(--jobs-bg);
  touch-action:manipulation;
  -ms-touch-action:manipulation;
  -webkit-user-select:none;
}

a,
button,
input,
textarea,
label,
select{
  touch-action:manipulation !important;
  -ms-touch-action:manipulation !important;
}

body{
  position:relative;
  z-index:0;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  background-color:var(--jobs-bg);
  font-family:'Segoe UI','Roboto',sans-serif;
  font-size:16px;
  overflow-x:hidden;
  overflow-y:auto;
  padding:18px 14px;
  box-sizing:border-box;
}

/* Fond (set via <style> inline dans les pages) */
body::before{
  content:"";
  position:absolute;
  inset:0;
  background-size:auto;
  background-repeat:repeat;
  opacity:0.3;
  z-index:-1;
}

/* Carte */
.login-card{
  width:min(440px, 100%);
  background:var(--jobs-bg);
  border-radius:var(--jobs-radius-card);
  overflow:hidden;
  box-shadow:var(--jobs-shadow);
  border:none;
}

.login-header{
  background:var(--jobs-teal);
  text-align:center;
  border-top-left-radius:var(--jobs-radius-card);
  border-top-right-radius:var(--jobs-radius-card);
}

.login-header img{
  max-width:100%;
  height:auto;
  display:block;
  margin:0 auto;
}

.login-body{
  padding:24px;
}

/* Messages */
.info{
  margin-bottom:14px;
  padding:12px 14px;
  border-radius:var(--jobs-radius-ui);
  border:1px solid transparent;
  font-size:14px;
  line-height:1.35;
}

.info.error{
  background:#fff7f8;
  color:#7f0f1c;
  border-color:#e7c9cf;
}

.info.success{
  background:#f0fdf4;
  color:#166534;
  border-color:#bbf7d0;
}

/* ===== Inputs style "postalcode-bar" ===== */
.input-group{
  position:relative;
  display:flex;
  align-items:center;
  width:100%;
  height:var(--jobs-h);
  min-height:var(--jobs-h);
  background:var(--jobs-bg-soft);
  border:1px solid var(--jobs-border);
  border-radius:var(--jobs-radius-ui);
  padding:8px 10px;
  gap:10px;
  box-sizing:border-box;
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;
  margin-bottom:14px;
}

/* Focus similaire à jobs.php */
.input-group:focus-within{
  border-color:var(--jobs-border-hover);
  background:var(--jobs-bg-focus);
  box-shadow:var(--jobs-ring);
}

/* Icône gauche: rond comme le bouton des filtres */
.input-group .input-icon{
  position:relative;
  width:28px;
  min-width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#eaf1f4;
  border:1px solid var(--jobs-border);
  color:var(--jobs-teal);
  box-sizing:border-box;
  user-select:none;
  pointer-events:none;
}

.input-group .input-icon i{
  color:var(--jobs-teal);
  font-size:15px;
  line-height:1;
}

/* Champ */
.input-group input{
  flex:1 1 auto;
  min-width:0;
  height:100%;
  border:none;
  outline:none;
  background:transparent;
  font-family:inherit;
  font-size:1rem;
  line-height:1;
  padding:0 6px 0 0;
  color:var(--jobs-text);
  box-sizing:border-box;
}

/* Placeholder */
.input-group input::placeholder{
  color:var(--jobs-placeholder);
  opacity:1;
}

/* Autofill (Chrome) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input::-webkit-autofill,
input::-webkit-autofill:hover,
input::-webkit-autofill:focus{
  font-size:16px !important;
  line-height:1.4 !important;
  -webkit-text-fill-color:#000 !important;
  box-shadow:0 0 0 1000px #ffffff inset !important;
}

input:-webkit-autofill{
  font-size:16px !important;
  font-family:'Segoe UI','Roboto',sans-serif !important;
}

/* Toggle password: zone droite segmentée comme jobs.php (postalcode-button) */
.toggle-password{
  position:relative;
  width:52px;
  min-width:52px;
  height:calc(100% + 16px);
  margin:-8px -10px -8px 6px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-left:1px solid var(--jobs-border);
  border-radius:0 var(--jobs-radius-ui) var(--jobs-radius-ui) 0;
  background:#eef4f7; /* zone droite visible, comme jobs.php */
  box-shadow: inset 12px 0 14px -12px rgba(44,102,113,0.28);
  cursor:pointer;
  box-sizing:border-box;
  user-select:none;
  transition:background .15s ease, box-shadow .15s ease, border-left-color .15s ease;
}

 

.toggle-password i{
  color:var(--jobs-teal);
  font-size:14px;
  line-height:1;
}

.toggle-password:hover{
  background:#eaf1f4;
  box-shadow: inset 14px 0 16px -13px rgba(44,102,113,0.34);
}


.input-group:has(.toggle-password){
  gap:0; /* pas d’espace flex entre le champ et la zone droite */
}

.input-group:has(.toggle-password) .input-icon{
  margin-right:10px; /* on recrée l’espace qui existait via gap:10 */
}

.input-group:has(.toggle-password) input{
  padding-right:10px; /* petit confort avant la ligne verticale */
}

.input-group:focus-within .toggle-password{
  border-left-color:var(--jobs-border-hover);
}
 
.input-group:focus-within .toggle-password{
  background:#eef4f7;
}

/* ===== Checkbox (remember me / termes) ===== */
.remember-me{
  display:block;
  margin:0 0 10px 0;
  color:var(--jobs-muted);
  font-size:15px;
}

.remember-me label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  line-height:1.35;
  cursor:pointer;
  margin:0;
  font-weight:400;
  color:var(--jobs-muted);
}

.remember-me input[type="checkbox"]{
  -webkit-appearance:none;
  appearance:none;
  width:18px;
  height:18px;
  border:1px solid #c9d7de;
  border-radius:4px;
  background:#ffffff;
  position:relative;
  margin:0;
  flex:0 0 18px;
}

.remember-me input[type="checkbox"]:checked{
  background:var(--jobs-teal);
  border-color:var(--jobs-teal);
}

.remember-me input[type="checkbox"]:checked::after{
  content:'\f00c';
  font-family:'Font Awesome 6 Free';
  font-weight:900;
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  font-size:10px;
  color:#ffffff;
  line-height:1;
}

.remember-me a,
.remember-me .terms-link{
  color:var(--jobs-link);
  text-decoration:underline;
}

.remember-me a:hover,
.remember-me .terms-link:hover{
  opacity:0.85;
}

/* ===== Boutons style filtres jobs.php ===== */
.btn-submit{
  width:100%;
  min-height:var(--jobs-h);
  height:var(--jobs-h);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:0 14px;
  background:var(--jobs-bg-active);
  border:1px solid var(--jobs-border-hover);
  border-radius:var(--jobs-radius-ui);
  color:var(--jobs-teal-dark);
  font-size:16px;
  font-weight:700;
  cursor:pointer;
  box-sizing:border-box;
  transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}

.btn-submit:hover{
  background:#e4f1f3;
  border-color:var(--jobs-border-hover);
  color:var(--jobs-teal-darker);
  box-shadow:0 1px 4px rgba(0,0,0,0.05);
}

.btn-submit:active{
  box-shadow:none;
}

/* Liens secondaires (register, forgot, retour, accueil) */
.login-links{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
}

.login-links a{
  text-decoration:none;
}

.boutonleger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:var(--jobs-h);
  height:var(--jobs-h);
  width:100%;
  box-sizing:border-box;
  text-align:center;
  background:var(--jobs-bg-soft);
  border:1px solid var(--jobs-border);
  border-radius:var(--jobs-radius-ui);
  color:var(--jobs-teal-dark) !important;
  font-size:16px;
  font-weight:600;
  padding:0 14px;
  transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}

.boutonleger:hover{
  background:#eaf1f4;
  border-color:var(--jobs-border-hover);
  color:var(--jobs-teal-darker) !important;
  box-shadow:0 1px 4px rgba(0,0,0,0.05);
}

/* Footer bande du bas */
.login-footer-banner{
  background:var(--jobs-bg-soft);
  border-top:1px solid #e5e7eb;
  border-bottom-left-radius:var(--jobs-radius-card);
  border-bottom-right-radius:var(--jobs-radius-card);
  padding:12px 24px;
}

.login-footer-buttons{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:0;
  width:100%;
}

.login-footer-buttons div{
  background:transparent;
  padding:0;
  flex:1 1 0;
  min-width:0;
}

.login-footer-buttons div:nth-child(1){
  text-align:left;
}

.login-footer-buttons div:nth-child(2){
  text-align:center;
}

.login-footer-buttons div:nth-child(3){
  text-align:right;
}

.login-footer-buttons a{
  color:var(--jobs-teal-dark);
  font-size:15px;
  font-weight:500;
  text-decoration:none;
}

.login-footer-buttons a:hover{
  color:var(--jobs-teal-darker);
}
.login-footer-buttons a{
  display:inline-block;
  white-space:nowrap;
}

.login-footer-banner{
  overflow:hidden;
}
/* Hint mot de passe (register) */
.rule-hint{
  display:block;
  margin:-6px 0 12px 0;
  font-size:13px;
  color:#7f8b96;
  text-align:center;
}

/* Modal Terms */
#termsModal{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background-color:rgba(0,0,0,0.5);
  display:none;
  z-index:1000;
  overflow-y:auto;
}

#termsModal .modal-content{
  position:relative;
  max-width:820px;
  margin:28px auto;
  padding:24px;
  background-color:#ffffff;
  border-radius:var(--jobs-radius-card);
  border:1px solid #e5e7eb;
  box-shadow:var(--jobs-shadow);
}

#termsModal .modal-close{
  position:absolute;
  top:12px;
  right:12px;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#ffffff;
  border:1px solid var(--jobs-border);
  border-radius:999px;
  color:var(--jobs-teal);
  cursor:pointer;
  z-index:10;
  transition:transform .2s ease, box-shadow .2s ease, background .15s ease, border-color .15s ease;
}

#termsModal .modal-close:hover{
  transform:scale(1.04);
  background:#fbfeff;
  border-color:var(--jobs-border-hover);
  box-shadow:0 6px 16px rgba(17,24,39,0.10);
}

#termsModal .modal-footer{
  text-align:center;
  margin-top:20px;
}

#termsModal .modal-footer a{
  color:var(--jobs-link);
  text-decoration:underline;
  cursor:pointer;
}

/* Responsive */
@media (max-width:560px){
  body{
    padding:0;
    align-items:flex-start;
  }

    .login-card{
    width:100%;
    max-width:none;
    border-top-left-radius:0;
    border-top-right-radius:0;
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
    box-shadow:0 10px 22px -14px rgba(17,24,39,0.28);
  }

  .login-header{
    border-top-left-radius:0;
    border-top-right-radius:0;
  }

  .login-body{
    padding:18px;
  }

  .login-links{
    flex-direction:row;
  }

   .login-footer-banner{
    padding:12px 16px;
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
  }

  .login-footer-buttons{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:6px;
  }

  .login-footer-buttons div{
    flex:1 1 0;
    min-width:0;
  }

  .login-footer-buttons a{
    display:inline-block;
    white-space:nowrap;
    font-size:12px;
  }
    .footer-link,
  .footer-link-left,
  .footer-link-center,
  .footer-link-right{
    border-radius:0 !important;
  }
}

@media (max-width:768px){
  #termsModal .modal-content{
    max-width:84% !important;
  }
}