/* =====================================
   CNR LOGIN THEME – SYSTEM SAFE
   Namespace: cnr-*
===================================== */

:root {
  --cnr-blue: #084B6C;
  --cnr-blue-dark: #0f2230;
  --cnr-white: #ffffff;
  --cnr-input: #f5f5f5;
  --cnr-shadow: rgba(0,0,0,.18);
}

/* ---------- Base ---------- */
html, body {
  height: 100%;
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--cnr-blue);
}

/* ---------- Wrapper ---------- */
.cnr-wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ---------- Box ---------- */
.cnr-box {
  width: 960px;
  max-width: 95%;
  display: flex;
  background: var(--cnr-white);
  border-radius: 20px;
  padding: 35px;
  gap: 40px;
  box-shadow: 0 18px 45px var(--cnr-shadow);
  transition: transform .35s ease, box-shadow .35s ease;
}

.cnr-box:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
}

/* ---------- Logo ---------- */
.cnr-logo-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cnr-logo-container {
  text-align: center;
}

.cnr-logo {
  #max-width: 240px;
  display: none;
}

.cnr-logo-light { display: block; }

.cnr-logo-subtitle {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 500;
  color: #0f3051;
}

/* ---------- Form ---------- */
.cnr-form-section {
  flex: 1;
}

.cnr-form-section h2 {
  margin-bottom: 25px;
  font-size: 26px;
  color: #222;
}

/* Inputs générés par le système */
.cnr-form-section input {
  width: 100%;
  height: 46px;
  margin-bottom: 14px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: var(--cnr-input);
  font-size: 16px;
}

.cnr-form-section input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(8,75,108,.25);
}

/* Bouton système */
.cnr-form-section button {
  width: 100%;
  height: 48px;
  background: var(--cnr-blue);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 17px;
  cursor: pointer;
}

.cnr-form-section button:hover {
  opacity: .92;
}

/* Links */
.cnr-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  color: var(--cnr-blue);
  text-decoration: none;
}

/* Browsers */
.cnr-browsers {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.cnr-browsers img {
  width: 32px;
}

/* Footer */
.cnr-footer {
  margin-top: 22px;
  background: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,.18);
}

/* ---------- DARK MODE ---------- */
@media (prefers-color-scheme: dark) {

  body {
    background: var(--cnr-blue-dark);
  }

  .cnr-box,
  .cnr-footer {
    background: #0f2230;
    color: #e6f2ff;
    box-shadow: 0 18px 45px rgba(0,0,0,.55);
  }

  .cnr-form-section h2,
  .cnr-logo-subtitle {
    color: #e6f2ff;
  }

  .cnr-form-section input {
    background: #152c3e;
    color: #e8f3ff;
  }

  .cnr-form-section button {
    background: #16689c;
  }

  .cnr-logo-light { display: none; }
  .cnr-logo-dark { display: block; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 750px) {

  .cnr-box {
    flex-direction: column;
    text-align: center;
  }

  .cnr-logo {
    #max-width: 180px;
  }
}