/* =========================================
   PAGE LOGIN - STYLE BLIND TEST (VIOLET)
   ========================================= */

:root {
  --bg-main: #050505;
  --bg-secondary: #0f0f0f;
  --accent: #a238ff; /* Violet Deezer */
  --accent-soft: rgba(162, 56, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;
}

body {
  background-color: var(--bg-main);
  background-image: radial-gradient(
    circle at 50% 0%,
    #150525 0%,
    /* Reflet violet */ var(--bg-main) 60%
  );
  color: var(--text-primary);
  font-family: var(--font-body);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  padding-bottom: 2rem;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

.auth-wrapper {
  width: 100%;
  max-width: 550px;
}

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--accent);
  border-radius: 12px;
  padding: 3.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.5s ease-out;
}

.auth-header {
  margin-bottom: 2.5rem;
}

.auth-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.auth-header h2 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 2.4rem;
  margin: 0 0 0.5rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
}

/* Formulaire */
.input-group {
  margin-bottom: 1.8rem;
  text-align: left;
}

.input-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 15px 18px;
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.05rem;
  transition: all 0.3s;
  box-sizing: border-box;
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 10px rgba(162, 56, 255, 0.2);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-container input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.forgot-pass {
  color: var(--accent);
  text-decoration: none;
  transition: 0.2s;
  font-size: 0.9rem;
  border-bottom: 1px dotted transparent;
}

.forgot-pass:hover {
  border-bottom-color: var(--accent);
}

/* Bouton */
.btn-primary.full-width {
  width: 100%;
  display: block;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary.full-width:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 15px rgba(162, 56, 255, 0.3);
}

.auth-footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 5px;
  transition: color 0.3s;
}

.auth-footer a:hover {
  color: var(--accent);
}
.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .auth-card {
    padding: 2rem;
  }
  .auth-header h2 {
    font-size: 2rem;
  }
  .input-group input {
    font-size: 0.95rem;
    padding: 12px 15px;
  }
}

/* --- Mot de passe (œil) --- */
.password-container {
  position: relative;
  width: 100%;
}
.password-container input {
  padding-right: 45px;
}
.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
  font-size: 1.1rem;
  transition: color 0.3s;
  z-index: 10;
}
.toggle-password:hover {
  color: var(--accent);
}

/* --- Upload Avatar --- */
.input-file-hidden {
  display: none;
}
.file-upload-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.btn-upload-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}
.btn-upload-custom:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.avatar-preview-box {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  overflow: hidden;
  display: none;
  background: #000;
  box-shadow: 0 0 15px rgba(162, 56, 255, 0.2);
  margin-top: 15px;
}
.avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Modale Recadrage --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}
.crop-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.crop-modal-content h3 {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-heading);
  text-align: center;
}
.crop-container-wrapper {
  height: 400px;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
#image-to-crop {
  display: block;
  max-width: 100%;
}
.crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 10px;
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.crop-modal-content .btn-primary {
  padding: 10px 24px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: bold;
  cursor: pointer;
}
