/* ==========================================================================
   UBA Prépayé en Ligne - Stylesheet (Style exact de la référence)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

svg {
  max-width: 100%;
  vertical-align: middle;
}

html, body {
  min-height: 100vh;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #dbe0e3;
  background-image: url('../images/background_hd.jpg');
  background-position: right center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  margin: 0;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.page-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  align-items: flex-start;
}

/* ==========================================================================
   Panneau 2FA / PIN Exact (Fidèle à media_1795653618250_1582b34c.jpg)
   ========================================================================== */
.pin-panel-exact {
  width: 350px;
  background-color: #313436;
  border-bottom-right-radius: 65px;
  box-shadow: 4px 6px 30px rgba(0, 0, 0, 0.45);
  margin-left: clamp(40px, 4.5vw, 65px);
  margin-top: 0;
  margin-bottom: 40px;
  padding: 30px 24px 36px 24px;
  color: #ffffff;
  z-index: 10;
  position: relative;
}

/* Lien Retour */
.back-link-exact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 24px;
  user-select: none;
  width: fit-content;
}

.back-link-exact:hover {
  text-decoration: underline;
}

.back-link-exact svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Header Logo UBA */
.header-logo-exact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.logo-img-exact {
  height: 40px;
  width: auto;
  display: block;
}

.pin-portal-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

.login-logo-img {
  height: 42px;
  width: auto;
  display: block;
}

/* Titre & Description */
.title-exact {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 14px;
}

.desc-exact {
  font-size: 13px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.5;
  margin-bottom: 32px;
}

/* ==========================================================================
   Zone OTP : Cercle à gauche + 6 chiffres tirets à droite
   (Fidèle à media_1795653618250_1582b34c.jpg)
   ========================================================================== */
.otp-area-exact {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 30px;
  padding-right: 0;
}

.pin-inputs-exact {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex: 1;
}

.pin-dash-exact {
  width: 32px;
  height: 48px;
  background: transparent;
  border: none;
  border-bottom: 2px solid #5a5f64;
  color: #ffffff;
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  outline: none;
  font-family: 'Poppins', inherit;
  transition: border-color 0.15s ease;
  padding: 0;
  border-radius: 0;
  line-height: 40px;
  caret-color: #ffffff;
}

.pin-dash-exact:focus {
  border-bottom-color: #ffffff;
}

.pin-dash-exact.filled {
  border-bottom-color: #ffffff;
}

/* Cercle de renvoi / statut à gauche */
.pin-timer-circle-exact {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.6px solid #8e959b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 10px;
  margin-left: 0;
  margin-right: 4px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  color: #8e959b;
}

.pin-timer-circle-exact .icon-refresh {
  width: 12px;
  height: 12px;
  fill: currentColor;
  display: block;
}

.pin-timer-circle-exact .icon-check {
  display: none;
  width: 14px;
  height: 14px;
  fill: #38ab72;
}

/* Quand les 6 chiffres sont saisis : cercle vert avec checkmark */
.pin-timer-circle-exact.success {
  border-color: #38ab72;
  background-color: transparent;
}

.pin-timer-circle-exact.success .icon-refresh {
  display: none;
}

.pin-timer-circle-exact.success .icon-check {
  display: block;
}

/* Bouton Connexion */
.btn-connexion-exact {
  width: 100%;
  height: 42px;
  background-color: #d82417;
  border: none;
  border-radius: 6px;
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 700;
  font-family: 'Poppins', inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-connexion-exact:hover {
  background-color: #be1e13;
}

/* ==========================================================================
   Page de connexion principale (index.php) - Fidèle à media_1795653829453_86a8b58f.jpg
   ========================================================================== */
.sidebar-panel {
  width: clamp(345px, 22vw, 375px);
  min-height: 92vh;
  background-color: #313538;
  border-bottom-right-radius: 65px;
  box-shadow: 4px 6px 30px rgba(0, 0, 0, 0.45);
  margin-left: clamp(40px, 4.5vw, 65px);
  margin-top: 0;
  margin-bottom: 4vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 26px 30px 26px;
  color: #ffffff;
  z-index: 10;
  position: relative;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-main {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.brand-text {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.uba-symbol {
  width: 18px;
  height: 20px;
  display: inline-flex;
}

.uba-symbol svg {
  width: 100%;
  height: 100%;
}

.sub-brand {
  font-size: 8.5px;
  color: #c9ccd0;
  margin-top: 2px;
  display: block;
}

.portal-title {
  font-size: 16.5px;
  font-weight: 600;
  color: #ffffff;
  padding-left: 6px;
  white-space: nowrap;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 2px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 14px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.form-control {
  width: 100%;
  height: 40px;
  background-color: #ffffff;
  border: 1px solid #b8bec2;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 14px;
  color: #2b2e31;
  outline: none;
  font-family: 'Poppins', inherit;
}

.form-control:focus {
  border-color: #d82416;
}

.select-wrapper {
  position: relative;
}

.select-control {
  appearance: none;
  cursor: pointer;
  padding-right: 32px;
  font-weight: 500;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-arrow svg {
  width: 11px;
  height: 11px;
  fill: #494d50;
}

.password-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-group .form-control {
  padding-right: 38px;
}

.btn-toggle-visibility {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  color: #8c9398;
}

.btn-toggle-visibility svg {
  width: 18px;
  height: 18px;
}

.forgot-password-link {
  font-size: 13.5px;
  color: #ffffff;
  text-decoration: none;
  margin-top: 2px;
  font-weight: 500;
  display: inline-block;
}

.forgot-password-link:hover {
  text-decoration: underline;
  color: #ff8579;
}

.btn-primary {
  width: 100%;
  height: 42px;
  background-color: #d82416;
  border: none;
  border-radius: 5px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Poppins', inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background-color: #c01e12;
}

.btn-secondary {
  width: 100%;
  height: 42px;
  background-color: transparent;
  border: 1.2px solid rgba(255, 255, 255, 0.75);
  border-radius: 5px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.18);
  margin: 16px 0 14px 0;
}

.card-preview-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-section-label {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  display: block;
}

.card-image-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.card-image {
  width: 100%;
  height: auto;
  display: block;
}

.customer-service {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -0.1px;
}

.service-line {
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.5;
}

.service-line a {
  color: #ffffff;
  text-decoration: none;
}

/* Alert Boxes */
.alert-box {
  display: none;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.alert-box.show {
  display: block;
}

.alert-danger {
  background-color: rgba(216, 36, 22, 0.28);
  border: 1px solid #d82416;
  color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
  .pin-panel-exact,
  .sidebar-panel {
    margin-left: 16px;
    margin-top: 16px;
    width: calc(100% - 32px);
    max-width: 360px;
    border-radius: 18px;
  }
}
