/* theme.css — mots-de-passe
   Feuille propre à cet outil : composants et couleurs FONCTIONNELLES seulement.
   L'identité de marque (couleurs, dégradés, mode sombre) vient de
   /sites/viepriveemondroit.com/theme.css, chargé avant cette feuille.
   Ne pas redéfinir ici --site-primary*, --bg-*, --text-* ni --border-* :
   voir docs/DESIGN_SYSTEM.md.
*/

/* sites/passwords.tools/theme.css
   Site-specific theme: Passwords Tools
   Theme: Security Orange - Caution and protection
*/

:root {
  /* Strength indicator colors (semantic - do not use as brand colors) */
  --site-danger-dark: #dc2626;   /* Darker red */
  --site-danger-light: #fef2f2;  /* Very light red background */
  --site-danger-lighter: #fee2e2; /* Light red for cards */

  /* Secondary/Accent colors */
  --site-warning-dark: #d97706;  /* Darker amber */
  --site-warning-light: #fffbeb; /* Light amber background */

  /* Safety/Success colors */
  --site-safe: #22c55e;          /* Green for strong/safe passwords */
  --site-safe-dark: #16a34a;     /* Darker green */
  --site-safe-light: var(--bg-secondary);    /* Light green background */

  /* Dark mode design tokens (single source of truth) */

  
  --dm-site-danger-light: #7f1d1d;    /* Darker for dark mode backgrounds */
  --dm-site-warning-light: #78350f;   /* Darker amber for backgrounds */
  --dm-site-safe-light: #14532d;      /* Darker green for backgrounds */

  /* Legacy support */
  --primary: var(--site-primary);

  /* Override shared gradient for the hero (used by hero-modern[data-theme="security"]) */
  --gradient-security: linear-gradient(135deg, var(--site-primary) 0%, var(--site-primary-dark) 100%);
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
:root {
    /* Adjusted colors for better visibility */
    --site-danger-light: var(--dm-site-danger-light);
    --site-warning-light: var(--dm-site-warning-light);
    --site-safe-light: var(--dm-site-safe-light);
  }

}

html.dark,
html.dark-mode,
html[data-theme="dark"] {
  /* Adjusted colors */
  --site-danger-light: var(--dm-site-danger-light);
  --site-warning-light: var(--dm-site-warning-light);
  --site-safe-light: var(--dm-site-safe-light);
}

html[data-theme="light"] {
  color-scheme: light;

  /* Adjusted colors */
  --site-danger-light: #fef2f2;
  --site-warning-light: #fffbeb;
  --site-safe-light: var(--bg-secondary);
}

html.dark .footer,
html.dark-mode .footer,
html[data-theme="dark"] .footer {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

/* Hero section with security theme */
.hero--security,
.hero-standard[data-theme="security"] {
  background: linear-gradient(135deg, var(--site-primary) 0%, var(--site-primary-dark) 100%);
  color: var(--text-inverse);
}

/* Feature cards with security theme */
.feature-card--security {
  border-left: 4px solid var(--site-primary);
  transition: all 0.3s ease;
}

.feature-card--security:hover {
  box-shadow: 0 8px 24px rgba(3, 105, 161, 0.2);
  transform: translateY(-2px);
}

/* Shared info section backgrounds */
.info-section--primary {
  background: var(--bg-primary, #ffffff);
  padding: var(--space-fluid-xl, 3rem) var(--space-fluid-md, 1.5rem);
}

.info-section--secondary {
  background: var(--bg-secondary, #fef2f2);
  padding: var(--space-fluid-xl, 3rem) var(--space-fluid-md, 1.5rem);
}

/* Password Checker Section Styles */
.password-checker-section {
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, var(--site-primary-light) 0%, #ffffff 100%);
}

.password-checker-section .container {
    max-width: 900px;
    margin: 0 auto;
}

.checker-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.08);
    border: 1px solid #fee2e2;
}

.checker-card h2 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1.875rem;
}

.checker-card h3 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1.5rem;
}

.checker-intro {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.checker-intro a {
    color: var(--site-primary);
    text-decoration: underline;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

#password-input {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s;
}

#password-input:focus {
    outline: none;
    border-color: var(--site-primary);
}

#toggle-visibility,
#check-btn {
    padding: 1rem 1.5rem;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    transition: all 0.3s;
}

#toggle-visibility:hover,
#check-btn:hover {
    background: #e5e7eb;
}

.btn-check {
    background: var(--site-primary) !important;
    color: white !important;
}

.btn-check:hover {
    background: var(--site-primary-dark) !important;
}

.btn-check.is-loading {
    cursor: wait;
    opacity: 0.9;
    transform: none;
}

.spinner-inline {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--site-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--site-primary-light);
    border: 1px dashed var(--site-primary);
    border-radius: 8px;
    color: #1f2937;
    margin-bottom: 1rem;
}

.strength-result {
    background: #f9fafb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.strength-result.hidden {
    display: none;
}

.result-section {
    margin-bottom: 2rem;
}

.result-section:last-child {
    margin-bottom: 0;
}

.strength-bar-container {
    height: 16px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.strength-bar {
    height: 100%;
    transition: width 0.5s ease, background-color 0.5s;
    border-radius: 8px;
}

.strength-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.strength-label {
    font-weight: 700;
    font-size: 1.25rem;
}

.strength-score {
    font-weight: 600;
    font-size: 1.125rem;
    color: #6b7280;
}

.crack-time {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #dc2626;
}

.feedback-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feedback-list li {
    padding: 0.75rem 0;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.feedback-list li:last-child {
    border-bottom: none;
}

.feedback-list li span {
    color: #dc2626;
    font-weight: bold;
    flex-shrink: 0;
}

/* Breach Check Styles */
.breach-status {
    padding: 1rem;
    border-radius: 8px;
}

.loading {
    text-align: center;
    padding: 1rem;
    color: #6b7280;
    font-style: italic;
}

.breach-found,
.breach-safe,
.breach-error {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: 8px;
}

.breach-found {
    background: #fef2f2;
    border: 2px solid #fca5a5;
}

.breach-safe {
    background: #dcfce7;
    border: 2px solid #86efac;
}

.breach-error {
    background: var(--bg-secondary);
    border: 2px solid var(--site-primary-lighter);
}

.breach-found .icon {
    font-size: 2rem;
}

.breach-safe .icon {
    font-size: 2rem;
}

.breach-error .icon {
    font-size: 2rem;
}

.breach-found strong,
.breach-safe strong,
.breach-error strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.breach-found p,
.breach-safe p,
.breach-error p {
    margin: 0;
    color: #374151;
}

/* Generator Section */
.generator-section {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--site-primary-light) 0%, var(--bg-secondary) 100%);
    border-radius: 12px;
    border: 1px solid var(--site-primary-lighter);
}

.generator-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.generator-controls label,
.slider-label {
    font-weight: 600;
}

#length-slider {
    width: 100%;
    margin-top: 0.5rem;
    cursor: pointer;
}

.btn-generate {
    padding: 1rem 2rem;
    background: var(--site-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-generate:hover {
    background: var(--site-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3, 105, 161, 0.3);
}

.generated-password {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.generated-password.hidden {
    display: none;
}

#generated-password-text {
    flex: 1;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    border: 2px solid #16a34a;
    border-radius: 8px;
    background: white;
    color: #1f2937;
}

.btn-copy {
    padding: 1rem 1.5rem;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-copy:hover {
    background: #15803d;
    transform: translateY(-2px);
}

.generator-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.5rem;
}

.generator-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--site-primary-light);
    border: 1px solid var(--site-primary-lighter);
    border-radius: 10px;
    font-weight: 600;
    color: #1f2937;
}


.generator-option--muted {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #4b5563;
}

.generator-feedback {
    font-size: 0.95rem;
    color: #374151;
    margin-top: 0.5rem;
}

.generator-feedback.is-error {
    color: #b91c1c;
    font-weight: 700;
}

.generator-strength {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.generator-strength.hidden {
    display: none;
}

.strength-chip {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    color: #0f172a;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.strength-chip--excellent,
.strength-chip--very-strong {
    background: #22c55e;
    color: #ffffff;
}

.strength-chip--strong {
    background: #84cc16;
    color: #0f172a;
}

.strength-chip--moderate {
    background: #f59e0b;
    color: #0f172a;
}

.strength-chip--weak {
    background: var(--site-primary);
    color: #0f172a;
}

.strength-chip--very-weak {
    background: #ef4444;
    color: #ffffff;
}

/* Tips Section */
.tips-section {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 12px;
    border: 1px solid #bfdbfe;
}

.tips-section h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.tips-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-section li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
    color: #1f2937;
}

.tips-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--site-primary);
    font-weight: bold;
    font-size: 1.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
.checker-card {
        padding: 1.5rem;
    }

.input-group {
        flex-direction: column;
    }

#password-input {
        min-width: 100%;
    }

.generator-controls {
        flex-direction: column;
        align-items: stretch;
    }

.breach-found,
    .breach-safe,
    .breach-error {
        flex-direction: column;
        text-align: center;
    }

}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
.checker-card {
    padding: 1rem;
  }

#password-input {
    font-size: 1rem;
  }

}

/* TV / Large screens (≥1920px) */
@media (min-width: 1920px) {
.checker-card {
    padding: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }

.password-checker-section {
    padding: 6rem 2rem;
  }

}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
.password-checker-section {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }

.checker-card {
        background: #1f2937;
        border-color: #374151;
    }

.checker-card h2,
    .checker-card h3 {
        color: #f9fafb;
    }

.checker-intro {
        color: #9ca3af;
    }

#password-input {
        background: #111827;
        border-color: #374151;
        color: #f9fafb;
    }

#toggle-visibility,
    #check-btn {
        background: #374151;
        color: #f9fafb;
    }

.strength-result {
        background: #111827;
        border-color: #374151;
    }

.crack-time {
        background: #1f2937;
    }

.feedback-list li {
        color: #d1d5db;
        border-color: #374151;
    }

/* Tips section dark mode */
    .tips-section {
        background: linear-gradient(135deg, #1e3a5f 0%, #1a2332 100%);
        border-color: #374151;
    }

.tips-section h3 {
        color: #f1f5f9;
    }

.tips-section li {
        color: #e5e7eb;
    }

.tips-section li::before {
        color: var(--site-primary);
    }

}

html.dark .tips-section,
html.dark-mode .tips-section,
html[data-theme="dark"] .tips-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a2332 100%);
    border-color: #374151;
}

html.dark .tips-section h3,
html.dark-mode .tips-section h3,
html[data-theme="dark"] .tips-section h3 {
    color: #f1f5f9;
}

html.dark .tips-section li,
html.dark-mode .tips-section li,
html[data-theme="dark"] .tips-section li {
    color: #e5e7eb;
}

html.dark .tips-section li::before,
html.dark-mode .tips-section li::before,
html[data-theme="dark"] .tips-section li::before {
    color: var(--site-primary);
}

/* =============================================
   DARK MODE — Component Class Overrides
   (Mirrors @media prefers-color-scheme: dark)
   ============================================= */

html.dark .password-checker-section,
html.dark-mode .password-checker-section,
html[data-theme="dark"] .password-checker-section {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

html.dark .checker-card,
html.dark-mode .checker-card,
html[data-theme="dark"] .checker-card {
    background: #1f2937;
    border-color: #374151;
}

html.dark .checker-card h2,
html.dark .checker-card h3,
html.dark-mode .checker-card h2,
html.dark-mode .checker-card h3,
html[data-theme="dark"] .checker-card h2,
html[data-theme="dark"] .checker-card h3 {
    color: #f9fafb;
}

html.dark .checker-intro,
html.dark-mode .checker-intro,
html[data-theme="dark"] .checker-intro {
    color: #9ca3af;
}

html.dark #password-input,
html.dark-mode #password-input,
html[data-theme="dark"] #password-input {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
}

html.dark #toggle-visibility,
html.dark #check-btn,
html.dark-mode #toggle-visibility,
html.dark-mode #check-btn,
html[data-theme="dark"] #toggle-visibility,
html[data-theme="dark"] #check-btn {
    background: #374151;
    color: #f9fafb;
}

html.dark .strength-result,
html.dark-mode .strength-result,
html[data-theme="dark"] .strength-result {
    background: #111827;
    border-color: #374151;
}

html.dark .crack-time,
html.dark-mode .crack-time,
html[data-theme="dark"] .crack-time {
    background: #1f2937;
}

html.dark .feedback-list li,
html.dark-mode .feedback-list li,
html[data-theme="dark"] .feedback-list li {
    color: #d1d5db;
    border-color: #374151;
}

html.dark .loading-state,
html.dark-mode .loading-state,
html[data-theme="dark"] .loading-state {
    background: rgba(3, 105, 161, 0.1);
    border-color: var(--site-primary);
    color: #f9fafb;
}

/* Generator section dark mode */
html.dark .generator-section,
html.dark-mode .generator-section,
html[data-theme="dark"] .generator-section {
    background: linear-gradient(135deg, #1f2937 0%, #1a1f2e 100%);
    border-color: #374151;
}

html.dark .generator-option,
html.dark-mode .generator-option,
html[data-theme="dark"] .generator-option {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
}

html.dark .generator-option--muted,
html.dark-mode .generator-option--muted,
html[data-theme="dark"] .generator-option--muted {
    background: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}

html.dark #generated-password-text,
html.dark-mode #generated-password-text,
html[data-theme="dark"] #generated-password-text {
    background: #111827;
    border-color: #16a34a;
    color: #f9fafb;
}

html.dark .generator-feedback,
html.dark-mode .generator-feedback,
html[data-theme="dark"] .generator-feedback {
    color: #d1d5db;
}

/* Breach results dark mode */
html.dark .breach-found,
html.dark-mode .breach-found,
html[data-theme="dark"] .breach-found {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

html.dark .breach-safe,
html.dark-mode .breach-safe,
html[data-theme="dark"] .breach-safe {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

html.dark .breach-error,
html.dark-mode .breach-error,
html[data-theme="dark"] .breach-error {
    background: rgba(3, 105, 161, 0.15);
    border-color: rgba(3, 105, 161, 0.3);
}

html.dark .breach-found p,
html.dark .breach-safe p,
html.dark .breach-error p,
html.dark-mode .breach-found p,
html.dark-mode .breach-safe p,
html.dark-mode .breach-error p,
html[data-theme="dark"] .breach-found p,
html[data-theme="dark"] .breach-safe p,
html[data-theme="dark"] .breach-error p {
    color: #d1d5db;
}

/* Info sections dark mode */
html.dark .info-section--primary,
html.dark-mode .info-section--primary,
html[data-theme="dark"] .info-section--primary {
    background: var(--dm-bg-primary);
}

html.dark .info-section--secondary,
html.dark-mode .info-section--secondary,
html[data-theme="dark"] .info-section--secondary {
    background: var(--dm-bg-secondary);
}

