/* ================================================
   GEOIKO — Keycloak Login Theme
   Charte : beige #F7F5F2 · terre #C96A42 · bleu nuit #0C2033 · noir #000000
   ================================================ */

/* ---- Reset & page ---- */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #F7F5F2;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.login-pf body {
  background: #F7F5F2;
}

/* ---- Supprimer le bandeau Keycloak ---- */
#kc-header,
.login-pf-page .login-pf-header {
  display: none !important;
}

/* ---- Centrage de la card ---- */
.login-pf-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: #F7F5F2;
}

/* ---- Card principale ---- */
#kc-content,
.card-pf {
  background: #ffffff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 20px rgba(12,32,51,0.10);
  padding: 40px 40px 32px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

/* ---- Logo ---- */
#kc-content::before,
.login-pf-brand {
  display: block;
  content: '';
  width: 140px;
  height: 70px;
  background: url('../img/logo.png') no-repeat center center;
  background-size: contain;
  margin: 0 auto 28px;
}

.login-pf-brand img {
  display: block;
  max-width: 140px;
  max-height: 70px;
  margin: 0 auto 28px;
}

/* ---- Sous-titre sous le logo ---- */
#kc-subtitle {
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.5;
  margin: -12px 0 24px;
  padding: 0 4px;
}

/* ---- Ancien titre (masqué) ---- */
#kc-page-title,
.pf-c-title {
  display: none;
}

/* ---- Labels ---- */
.pf-c-form__label,
label,
.control-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #0C2033;
  margin-bottom: 4px;
  display: block;
}

/* ---- Inputs ---- */
.pf-c-form-control,
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: #0C2033;
  background: #fff;
  transition: border-color 0.15s;
  outline: none;
}

.pf-c-form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #C96A42;
  box-shadow: 0 0 0 3px rgba(201,106,66,0.15);
}

/* ---- Formulaire groupes ---- */
.form-group,
.pf-c-form__group {
  margin-bottom: 16px;
}

/* ---- Lien "mot de passe oublié" ---- */
#kc-form-options a,
.pf-c-login__main-footer-links a {
  color: #C96A42;
  font-size: 0.8125rem;
  text-decoration: none;
}
#kc-form-options a:hover,
.pf-c-login__main-footer-links a:hover {
  text-decoration: underline;
}

/* ---- Bouton principal ---- */
.pf-c-button.pf-m-primary,
.btn.btn-primary,
input[type="submit"],
#kc-login {
  width: 100%;
  padding: 11px 16px;
  background: #C96A42;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s;
  margin-top: 8px;
}

.pf-c-button.pf-m-primary:hover,
.btn.btn-primary:hover,
input[type="submit"]:hover,
#kc-login:hover {
  background: #b05a35;
}

/* ---- Séparateur ---- */
.pf-c-login__main-footer-band,
#kc-social-providers {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

/* ---- Bouton social ---- */
.pf-c-button.pf-m-secondary,
.btn.btn-default,
.kc-social-provider-logo + span,
a.zocial {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #0C2033;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.pf-c-button.pf-m-secondary:hover,
.btn.btn-default:hover,
a.zocial:hover {
  background: #F7F5F2;
  border-color: #C96A42;
  color: #C96A42;
}

/* ---- Messages d'erreur ---- */
.alert.alert-error,
.pf-c-alert.pf-m-danger,
#kc-error-message {
  background: #fff5f0;
  border: 1px solid #f5b89a;
  border-radius: 6px;
  padding: 10px 14px;
  color: #8c3a1e;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.alert.alert-warning,
.pf-c-alert.pf-m-warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 10px 14px;
  color: #92400e;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* ---- Checkbox "remember me" ---- */
#rememberMe {
  accent-color: #C96A42;
}

/* ---- Footer texte ---- */
#kc-form-options,
.pf-c-login__main-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
}

/* ---- Lien "Sinscrire" / "Pas encore de compte" ---- */
#kc-registration a,
#kc-registration-container a {
  color: #C96A42;
  text-decoration: none;
  font-weight: 500;
}
#kc-registration a:hover,
#kc-registration-container a:hover {
  text-decoration: underline;
}

/* ---- Texte gris secondaire ---- */
#kc-registration,
#kc-registration-container {
  color: #6b7280;
  font-size: 0.8125rem;
  text-align: center;
  margin-top: 16px;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  #kc-content,
  .card-pf {
    padding: 28px 20px 24px;
  }
}

/* ---- Google Sign-In button ---- */
#kc-social-providers {
  margin-top: 1.25rem;
}

#kc-social-providers hr {
  display: none;
}

#kc-social-providers h2 {
  display: none;
}

#kc-social-providers ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#kc-social-providers ul li {
  width: 100%;
}

#social-google {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  color: #0C2033;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

#social-google:hover {
  background: #F7F5F2;
  box-shadow: 0 2px 6px rgba(12,32,51,0.12);
  text-decoration: none;
  color: #0C2033;
}

#social-google .kc-social-provider-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

#social-google .kc-social-item-text {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Google "G" SVG logo */
#social-google::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3Cpath fill='none' d='M0 0h48v48H0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

#social-google .kc-social-provider-logo {
  display: none;
}
