/* Styles for the password generator page */

/* Variables CSS */
:root {
  --primary-color: #48c78e;
  --primary-dark: #3a9e6b;
  --secondary-color: #3e8ed0;
  --accent-color: #ffdd57;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --border-radius: 20px;
  --transition: all 0.2s ease-in-out;
}

/* Container principal */
.password-container {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
  padding: 1.5rem;
}

.password-container:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Ensure monospace box wraps cleanly */
#password-output {
  word-break: break-all;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  border: 2px dashed #dee2e6;
  font-size: 1.2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  margin-bottom: 1rem;
  cursor: pointer; /* Rendre le mot de passe cliquable */
}

/* Icône de rafraîchissement */
.password-refresh-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  color: #777;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.password-refresh-icon:hover {
  opacity: 1;
  color: var(--primary-color);
  transform: translateY(-50%) rotate(180deg);
}

/* Animation de rotation pour l'icône */
@keyframes spin {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}

.password-refresh-icon.spin {
  animation: spin 0.7s ease-out;
}

/* Animation de clic sur un mot de passe */
@keyframes pulse {
  0% { background-color: var(--primary-color); color: white; }
  100% { background-color: #f8f9fa; color: inherit; }
}

.password-click-effect {
  animation: pulse 0.5s;
}

#password-output:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

#password-output.is-hidden-password {
  -webkit-text-security: disc;
  font-family: 'password', monospace; /* Fallback pour les navigateurs ne supportant pas webkit-text-security */
  letter-spacing: 0.2em;
}

@font-face {
  font-family: 'password';
  font-style: normal;
  font-weight: 400;
  src: url('data:font/woff;base64,d09GRgABAAAAAArsAAsAAAAAEGgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZSGVVnY21hcAAAAYQAAACVAAABqJXkD69nbHlmAAACHAAABXMAAAcMm2Dt4WhlYWQAAAeMAAAAMAAAADYY/sLxaGhlYQAAB7wAAAAgAAAAJAc0A+BobXR4AAAH3AAAABQAAAAY5gAAAGxvY2EAAAfwAAAADgAAAA4FzAQubWF4cAAACAAAAAAfAAAAIAEhAFhuYW1lAAAIIAAAASQAAAI0hJIUy3Bvc3QAAAk0AAAARgAAAFqYuQOdeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGRgYGBj6GWaxcDFwMDIwMwgBiEmIGZkYGJgZGJiZGVjYmRnYGBgZmBg4ACjL+MChAACGBjqGRqYeJztkcENgDAIRR9tNcbExjh51MA+ZQIXcwyeoQP0UCb8hQ/oB2YgMrtmkV5SLN3KLb5jpx+JeorTSavvOZdtvc/4br7+jr5iLvJtz/QiQ33Fno6u5Jm+yDv9kW+nF/Bjp5e+XQGzASNPeJxdkL9LQlEUx7/nvKevX4i99FVPAUXRNS15mEME/QORUBIWGVQYBLWEQf9DQyDS1K1Vl9oiahVCiopaonBqzqnlnZC3nMt9nHPP+d5z74GAgSdyQTbIOekm0e6rhh54MYgxTMMPF6ZgxaRjCxvYJz5cIX18RhTFSSUiFRtSQzpJN3KhG8+4X+N1cjY12Jm8zGTDZDYS5ZZ1Wd45q9kRK1t1JVxRq2Pt9gZnOlWZi0qjSqtOJJKORFLpBX/AL7EYMf1u+jQhy9OcKGeZks+XTGeY1aMHPbjg5rgMuMnXssN5sUOrs8rZ9rJlODHrf1ovWwlWm5v/+Sh9sGHX9IvC6UtR07Tt9JrBQJUoh34MW4liArMYhweYxw7e++ftMjN0mPbRGEr+llpq+ZdaTscVj1vhPm8ExzGIIWiYJ89JDt/xCCU9YYaH5fAJQVjYui/9AKLtU9AA') format('woff');
}

/* Password action buttons */
.password-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.password-actions button {
  flex-grow: 1;
  flex-basis: 0;
  min-width: 120px;
}

/* Tabs styling */
.tabs.is-boxed {
  margin-bottom: 1.5rem;
}

.tabs.is-boxed li.is-active a {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.tab-content.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Strength bar customization */
#strength-bar {
  width: 100%;
  height: 10px;
  border-radius: 5px;
}

/* Multiple passwords section */
#multiple-passwords-section {
  margin-top: 2rem;
  display: none;
}

.multiple-password-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #f8f9fa;
  border-radius: 5px;
  margin-bottom: 0.5rem;
}

.multiple-password-item:nth-child(odd) {
  background: #f1f3f5;
}

.multiple-password-item .password-text {
  font-family: monospace;
  word-break: break-all;
}

/* Style pour les boutons de copie des mots de passe multiples */
.copy-single-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--primary-color);
  transition: all 0.2s ease;
}

.copy-single-btn:hover {
  color: var(--primary-dark);
  transform: scale(1.1);
}

.copy-single-btn .icon {
  width: auto;
  height: auto;
}

/* Option cards */
.option-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  height: 100%;
  transition: var(--transition);
}

.option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Section titles */
.section-title {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
}

/* Slider styling */
input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Settings group */
.settings-group {
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 1rem;
}

/* Notification styling */
#notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: none;
  min-width: 300px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Password stats */
.stat-box {
  border-left: 5px solid var(--primary-color);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(to right, rgba(72, 199, 142, 0.05), transparent);
  padding: 15px 20px;
  margin-bottom: 15px;
  transition: all 0.2s ease;
}

.stat-box:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transform: translateX(2px);
}

.stat-label {
  font-weight: 600;
  color: var(--primary-dark);
  display: block;
  margin-bottom: 8px;
  font-size: 1.1em;
}

.security-stats-container {
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.security-stats-container:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.security-stats-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 15px 15px 0 0;
  position: relative;
}

.security-stats-header h4 {
  margin: 0;
  font-weight: 600;
}

.security-stats-content {
  padding: 20px;
  background: white;
  border-radius: 0 0 15px 15px;
}

.stat-composition {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-composition p {
  margin: 5px 0;
  display: flex;
  align-items: center;
}

.stat-composition p i {
  margin-right: 8px;
}

/* Styles pour la personnalisation des caractères spéciaux - Version compacte */
.symbol-grid-compact {
  margin-top: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.symbol-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.symbol-row:last-child {
  margin-bottom: 0;
}

.symbol-item-compact {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: white;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  transition: all 0.2s ease-in-out;
  margin: 0;
  cursor: pointer;
  height: 44px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.symbol-item-compact:hover {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(72, 199, 142, 0.2);
}

.symbol-item-compact.selected {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
  border-color: var(--primary-dark) !important;
  color: white !important;
}

.symbol-item-compact.selected .symbol-char {
  color: white !important;
}

/* Cases à cocher customisées */
.symbol-item-compact input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.symbol-item-compact input[type="checkbox"]:checked + .symbol-char {
  color: white !important;
  transform: scale(1.1);
}

.symbol-char {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--primary-color);
  font-family: 'Courier New', monospace;
  min-width: 18px;
  text-align: center;
  transition: all 0.2s ease;
  z-index: 1;
}

/* Indicateur visuel de sélection */
.symbol-item-compact::before {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.symbol-item-compact.selected::before {
  opacity: 1;
  transform: scale(1);
  background: white;
}

@media (max-width: 768px) {
  .symbol-item-compact {
    padding: 0.4rem;
    height: 40px;
  }
  
  .symbol-char {
    font-size: 1.1rem;
  }
  
  .symbol-row {
    gap: 0.4rem;
  }
  
  .symbol-grid-compact {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .symbol-item-compact {
    padding: 0.3rem;
    height: 36px;
  }
  
  .symbol-char {
    font-size: 1rem;
  }
  
  .symbol-row {
    gap: 0.3rem;
  }
  
  .symbol-grid-compact {
    padding: 0.8rem;
  }
}

/* Animation pour l'affichage/masquage de la section */
#custom-symbols-section {
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

#custom-symbols-section.show {
  display: block !important;
}

/* Style pour le compteur de caractères spéciaux sélectionnés */
#selected-symbols-count {
  margin-left: 0.5rem;
  font-size: 0.85rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-weight: 600;
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  box-shadow: 0 2px 6px rgba(72, 199, 142, 0.3);
}

/* Amélioration des boutons de sélection */
#select-all-symbols, #deselect-all-symbols {
  margin-right: 0.7rem;
  margin-bottom: 0.5rem;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

#select-all-symbols:hover, #deselect-all-symbols:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cases à cocher principales améliorées */
.settings-group .checkbox {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  background: white;
  border-radius: 10px;
  border: 2px solid #f0f0f0;
  transition: all 0.2s ease;
  cursor: pointer;
}

.settings-group .checkbox:hover {
  border-color: var(--primary-color);
  background: #f8fffe;
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(72, 199, 142, 0.1);
}

.settings-group .checkbox input[type="checkbox"] {
  margin-right: 0.8rem;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

/* Amélioration de la section sécurité */
.security-stats-container {
  border-radius: 16px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  margin-bottom: 1.5rem;
}

.security-stats-container:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.security-stats-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1.2rem 1.5rem;
  border-radius: 16px 16px 0 0;
  position: relative;
}

.security-stats-header::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--primary-dark);
}

.security-stats-header h4 {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

.security-stats-content {
  padding: 1.5rem;
  background: white;
  border-radius: 0 0 16px 16px;
}

.strength-container {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
}

.stat-box {
  border-left: 4px solid var(--primary-color);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(to right, rgba(72, 199, 142, 0.08), rgba(72, 199, 142, 0.02));
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-box:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transform: translateX(3px);
  background: linear-gradient(to right, rgba(72, 199, 142, 0.12), rgba(72, 199, 142, 0.04));
}

/* Repositionnement et amélioration du bouton générer */
.generate-button-container {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 1.5rem 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 1rem;
  z-index: 10;
}

#generate-btn {
  border-radius: 50px;
  padding: 0.8rem 2.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(72, 199, 142, 0.3);
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border: none;
  position: relative;
  overflow: hidden;
}

#generate-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

#generate-btn:hover::before {
  left: 100%;
}

#generate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(72, 199, 142, 0.4);
}

#generate-btn:active {
  transform: translateY(-1px);
}

/* Responsivité pour les petits écrans */
@media (max-width: 480px) {
  #custom-symbols-section {
    margin-left: 15px !important;
  }
}

@media (max-width: 768px) {
  .columns.is-multiline {
    flex-direction: column;
  }
  
  .password-actions {
    flex-direction: column;
  }
  
  .password-actions button {
    width: 100%;
  }
  
  .generate-button-container {
    position: relative;
    margin-top: 1rem;
  }
  
  #generate-btn {
    width: 100%;
    padding: 1rem 1.5rem;
  }
  
  .security-stats-header::after {
    display: none;
  }
  
  .stat-composition {
    grid-template-columns: 1fr;
  }
}

/* Animation pour les changements d'état */
@keyframes checkboxPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.symbol-item-compact.selected {
  animation: checkboxPulse 0.3s ease !important;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
  border-color: var(--primary-dark) !important;
  color: white !important;
}

/* Amélioration des transitions */
* {
  transition-property: background-color, border-color, color, box-shadow, transform;
  transition-duration: 0.2s;
  transition-timing-function: ease-in-out;
}

/* Focus states améliorés */
.symbol-item-compact:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

input[type="checkbox"]:focus {
  outline: none;
}

/* Amélioration des barres de progression */
.progress {
  border-radius: 20px !important;
  height: 12px !important;
  background: #e9ecef !important;
  overflow: hidden;
  --progress-color: #00d1b2;
}

.progress::-webkit-progress-bar {
  background: #e9ecef !important;
  border-radius: 20px;
}

.progress::-webkit-progress-value {
  background: var(--progress-color) !important;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

.progress::-moz-progress-bar {
  background: var(--progress-color) !important;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

/* Classes de couleur pour la barre de progression */
.progress.is-danger {
  --progress-color: #ff3860 !important;
}

.progress.is-danger::-webkit-progress-value {
  background: #ff3860 !important;
}

.progress.is-danger::-moz-progress-bar {
  background: #ff3860 !important;
}

.progress.is-warning {
  --progress-color: #ffdd57 !important;
}

.progress.is-warning::-webkit-progress-value {
  background: #ffdd57 !important;
}

.progress.is-warning::-moz-progress-bar {
  background: #ffdd57 !important;
}

.progress.is-success {
  --progress-color: #00d1b2 !important;
}

.progress.is-success::-webkit-progress-value {
  background: #00d1b2 !important;
}

.progress.is-success::-moz-progress-bar {
  background: #00d1b2 !important;
}

.progress.is-info {
  --progress-color: #3e8ed0 !important;
}

.progress.is-info::-webkit-progress-value {
  background: #3e8ed0 !important;
}

.progress.is-info::-moz-progress-bar {
  background: #3e8ed0 !important;
}
