/* Jargonizer - Styles complémentaires */

/* Shell viewport - pas de scroll page inutile sur desktop */
html {
  height: 100%;
}

.app-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  min-height: 0;
}

@media (min-width: 1024px) {
  .app-shell {
    min-height: 100%;
    overflow: visible;
  }

  .app-main {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .app-dashboard {
    flex: 1;
    min-height: 0;
    align-items: flex-start;
  }

  .app-forms,
  .app-result {
    min-height: 0;
    min-width: 0;
  }

  .app-forms {
    overflow-y: visible;
    overscroll-behavior: contain;
  }

  .app-result {
    display: block;
  }

  .result-card {
    min-height: 0;
  }
}

.app-footer {
  flex-shrink: 0;
  border-top: 1px solid #e4e4e7;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.625rem 0;
}

.app-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem 1rem;
}

.app-footer-copy {
  font-size: 0.75rem;
  color: #71717a;
  margin: 0;
}

.app-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  font-size: 0.75rem;
}

.app-footer-links a {
  color: #52525b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.app-footer-links a:hover {
  color: #4f46e5;
}

.app-footer-links a[aria-current="page"] {
  color: #4f46e5;
  font-weight: 500;
}

/* Page mentions légales */
.legal-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.legal-main {
  flex: 1;
}

.legal-content {
  max-width: none;
}

.legal-prose section + section {
  margin-top: 1.5rem;
}

.legal-prose h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #18181b;
  margin-bottom: 0.5rem;
}

.legal-prose p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #3f3f46;
  margin-bottom: 0.75rem;
}

.legal-prose p:last-child {
  margin-bottom: 0;
}

.legal-prose a {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-prose a:hover {
  color: #4338ca;
}

.legal-updated {
  margin-top: 2rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid #f4f4f5;
  font-size: 0.8125rem !important;
  color: #71717a !important;
}

/* Tab buttons - Desktop */
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #52525b;
  border-radius: 0.625rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #18181b;
  background-color: #f4f4f5;
}

.tab-btn.active {
  color: #4f46e5;
  background-color: #eef2ff;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.15);
}

/* Tab buttons - Mobile */
.tab-btn-mobile {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #52525b;
  border-radius: 0.625rem;
  transition: all 0.2s ease;
}

.tab-btn-mobile:hover {
  background-color: #f4f4f5;
}

.tab-btn-mobile.active {
  color: #4f46e5;
  background-color: #eef2ff;
}

/* Tab panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Cards */
.card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e4e4e7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f4f4f5;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #18181b;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.8125rem;
  color: #71717a;
  margin-top: 0.125rem;
}

.card-body {
  padding: 1.5rem;
}

/* Form elements */
.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #3f3f46;
  margin-bottom: 0.5rem;
}

.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #18181b;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 0.75rem;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea:focus {
  outline: none;
  border-color: #a4b8fc;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background: white;
}

.form-textarea::placeholder {
  color: #a1a1aa;
}

/* Range slider */
.form-range {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #c7d6fe, #6366f1);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2px solid #6366f1;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.form-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2px solid #6366f1;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  cursor: pointer;
}

.slider-value {
  font-weight: 600;
  color: #6366f1;
  font-size: 0.75rem;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.375rem;
  font-size: 0.625rem;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-pompier {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.btn-pompier:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #52525b;
  background: white;
  border: 1px solid #e4e4e7;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
  color: #18181b;
  border-color: #d4d4d8;
  background: #fafafa;
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary.copied {
  color: #16a34a;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

/* Result area */
.result-card {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.result-text {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d4d4d8 transparent;
}

.result-text::-webkit-scrollbar {
  width: 6px;
}

.result-text::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 999px;
}

.result-text.result-placeholder {
  color: rgba(39, 39, 42, 0.4);
  font-style: italic;
}

.result-error-fun .result-error-box {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

/* Loading spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e4e4e7;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Modal quota */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.5);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  background: white;
  border-radius: 1rem;
  border: 1px solid #e4e4e7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 24px 48px rgba(0, 0, 0, 0.12);
  padding: 1.75rem;
  text-align: center;
  animation: modalIn 0.25s ease;
}

.modal-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  background: #fffbeb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #18181b;
  margin-bottom: 0.75rem;
}

.modal-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #3a3445;
  margin-bottom: 1.5rem;
}

.modal-icon-rate-limit {
  background: #eef2ff;
}

html[data-theme="dark"] .modal-icon-rate-limit {
  background: rgba(79, 70, 229, 0.2);
  border-color: #818cf8;
}

.modal-retry {
  font-size: 0.875rem;
  font-weight: 600;
  color: #312e81;
  margin: -0.75rem 0 1.25rem;
}

html[data-theme="dark"] .modal-retry {
  color: #a5b4fc;
}

.modal-retry.hidden {
  display: none;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive tweaks */
@media (max-width: 1023px) {
  .result-card {
    min-height: 280px;
  }

  .result-text {
    max-height: 50vh;
  }
}

/* Pop-corporate refresh */
:root {
  --paper: #fff8e7;
  --paper-soft: #fffcf2;
  --royal: #0047ff;
  --royal-dark: #0030b8;
  --postit: #ffe45c;
  --alert: #ff6b22;
  --ink: #171717;
  --muted: #626262;
  --line: #171717;
  --mint-neon: #6effd2;
  --violet-neon: #bf7cff;
  color-scheme: light;
}

.app-shell {
  background: var(--paper);
  color: var(--ink);
}

.app-forms {
  padding-right: 0.625rem;
  padding-bottom: 0.625rem;
}

header {
  background: rgba(255, 252, 242, 0.92) !important;
  border-bottom: 2px solid var(--line) !important;
}

header .bg-gradient-to-br {
  background: linear-gradient(135deg, var(--royal), var(--alert)) !important;
  box-shadow: 4px 4px 0 var(--line) !important;
}

.app-footer {
  background: rgba(255, 252, 242, 0.92);
  border-top: 1px solid rgba(77, 65, 110, 0.12);
}

.app-footer-copy,
.card-subtitle,
.slider-ticks {
  color: var(--muted);
}

.app-footer-links a,
.form-label,
.card-title {
  color: var(--ink);
}

.app-footer-links a:hover,
.app-footer-links a[aria-current="page"],
.slider-value {
  color: var(--royal);
}

.tab-btn,
.tab-btn-mobile {
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: 1rem;
}

.tab-btn:hover,
.tab-btn-mobile:hover {
  color: var(--royal-dark);
  background-color: var(--postit);
  border-color: var(--line);
  box-shadow: 3px 3px 0 var(--line);
  transform: translateY(-1px);
}

.tab-btn.active,
.tab-btn-mobile.active {
  color: #ffffff;
  background-color: var(--royal);
  border-color: var(--line);
  box-shadow: 4px 4px 0 var(--line);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.75rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  background: var(--postit);
  border: 2px solid var(--line);
  border-radius: 1rem;
  box-shadow: 4px 4px 0 var(--line);
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  color: var(--royal-dark);
  background: #fff079;
  transform: translateY(-1px);
  box-shadow: 5px 5px 0 var(--line);
}

.theme-toggle-btn:active {
  transform: translateY(2px);
  box-shadow: 2px 2px 0 var(--line);
}

.theme-toggle-icon {
  line-height: 1;
}

.card {
  background: var(--paper-soft);
  border: 2px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: 8px 8px 0 var(--line);
}

.card-header {
  background: #ffffff;
  border-bottom: 2px solid var(--line);
}

.card-title {
  font-weight: 800;
  letter-spacing: 0;
}

.form-label {
  font-weight: 700;
}

.form-textarea {
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.16);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.form-textarea:focus {
  border-color: var(--royal);
  background: #ffffff;
  box-shadow: 5px 5px 0 var(--postit), 0 0 0 3px rgba(0, 71, 255, 0.14);
  transform: translateY(-1px);
}

.form-textarea::placeholder {
  color: #7a7a7a;
}

.form-range {
  background: linear-gradient(to right, var(--postit), var(--royal), var(--alert));
}

.form-range::-webkit-slider-thumb {
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--line);
}

.form-range::-moz-range-thumb {
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--line);
}

.btn-primary {
  font-weight: 800;
  background: var(--royal);
  border: 2px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 6px 6px 0 var(--line);
}

.btn-primary:hover:not(:disabled) {
  background: #0b55ff;
  transform: translateY(-2px);
  box-shadow: 8px 8px 0 var(--line);
}

.btn-primary:active:not(:disabled),
.btn-primary.is-pressing {
  transform: translateY(2px);
  box-shadow: 3px 3px 0 var(--line);
}

.btn-pompier {
  background: var(--alert);
  box-shadow: 6px 6px 0 var(--line);
}

.btn-pompier:hover:not(:disabled) {
  background: #ff7f35;
  box-shadow: 8px 8px 0 var(--line);
}

.btn-pompier.is-pressing {
  transform: translateY(2px);
  box-shadow: 3px 3px 0 var(--line);
}

.btn-secondary {
  color: var(--ink);
  background: var(--postit);
  border: 2px solid var(--line);
  border-radius: 1rem;
  box-shadow: 4px 4px 0 var(--line);
}

.btn-secondary:hover:not(:disabled) {
  color: var(--royal-dark);
  background: #fff079;
  transform: translateY(-1px);
  box-shadow: 5px 5px 0 var(--line);
}

.btn-secondary:active:not(:disabled),
.btn-secondary.is-pressing {
  transform: translateY(2px);
  box-shadow: 2px 2px 0 var(--line);
}

.btn-secondary.copied {
  border-color: var(--line);
  background: #d9ffe9;
}

.result-card {
  background: linear-gradient(180deg, #ffffff 0%, var(--paper-soft) 100%);
}

.result-text::-webkit-scrollbar-thumb {
  background: var(--royal);
}

.result-text.result-placeholder {
  color: rgba(23, 23, 23, 0.5);
}

.result-error-box {
  border-radius: 1rem;
}

.loading-spinner {
  border: 4px solid var(--postit);
  border-top-color: var(--royal);
  border-right-color: var(--alert);
  filter: drop-shadow(3px 3px 0 var(--line));
}

.loader-copy {
  position: relative;
  min-width: min(18rem, 75vw);
  min-height: 1.25rem;
  color: var(--ink) !important;
  font-weight: 700;
}

.loader-copy span {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: loaderMessage 4.8s infinite;
}

.loader-copy span:nth-child(2) {
  animation-delay: 1.6s;
}

.loader-copy span:nth-child(3) {
  animation-delay: 3.2s;
}

@keyframes loaderMessage {
  0%, 8% {
    opacity: 0;
    transform: translateY(6px);
  }

  12%, 30% {
    opacity: 1;
    transform: translateY(0);
  }

  34%, 100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.modal-panel {
  background: var(--paper-soft);
  border: 2px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: 8px 8px 0 var(--line), 0 24px 48px rgba(0, 0, 0, 0.12);
}

.modal-icon {
  background: var(--postit);
  border: 2px solid var(--line);
}

.modal-title {
  color: var(--ink);
}

.modal-text {
  color: #3a3445;
}

@media (prefers-color-scheme: dark) {
  .app-shell {
    background: #111111;
    color: #f6f6f6;
  }

  header,
  .app-footer,
  .card,
  .modal-panel {
    background: rgba(19, 19, 24, 0.94) !important;
    border-color: var(--violet-neon);
    box-shadow: 0 0 0 1px rgba(191, 124, 255, 0.45), 0 0 18px rgba(110, 255, 210, 0.18);
  }

  .card-header {
    background: rgba(27, 27, 34, 0.96);
    border-color: var(--mint-neon);
  }

  .card-title,
  .form-label,
  .app-footer-links a,
  .loader-copy,
  .modal-title {
    color: #f6f6f6 !important;
  }

  .card-subtitle,
  .app-footer-copy,
  .modal-text {
    color: #c7c7d1;
  }

  .form-textarea {
    color: #f6f6f6;
    background: #19191f;
    border-color: var(--mint-neon);
    box-shadow: 0 0 0 1px rgba(110, 255, 210, 0.5), 4px 4px 0 #000000;
  }

  .form-textarea:focus {
    border-color: var(--violet-neon);
  }

  .result-text {
    color: #f6f6f6;
  }
}

html[data-theme="light"] .app-shell {
  background: var(--paper);
  color: var(--ink);
}

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

html[data-theme="light"] header,
html[data-theme="light"] .app-footer,
html[data-theme="light"] .card,
html[data-theme="light"] .modal-panel {
  background: var(--paper-soft) !important;
  border-color: var(--line);
  box-shadow: 8px 8px 0 var(--line);
}

html[data-theme="light"] .app-forms {
  padding-right: 0.875rem;
  padding-bottom: 0.875rem;
}

html[data-theme="light"] header {
  background: rgba(255, 252, 242, 0.92) !important;
  box-shadow: none;
}

html[data-theme="light"] .card-header {
  background: #ffffff !important;
  border-color: var(--line);
}

html[data-theme="light"] .app-forms .card,
html[data-theme="light"] .app-forms .card-body {
  background: #ffffff !important;
}

html[data-theme="light"] .result-card {
  background: linear-gradient(180deg, #ffffff 0%, var(--paper-soft) 100%) !important;
}

html[data-theme="light"] .card,
html[data-theme="light"] .result-text,
html[data-theme="light"] .card-title,
html[data-theme="light"] .form-label,
html[data-theme="light"] .app-footer-links a {
  color: var(--ink) !important;
}

html[data-theme="light"] .card-subtitle,
html[data-theme="light"] .app-footer-copy {
  color: var(--muted) !important;
}

html[data-theme="light"] .form-textarea {
  color: var(--ink) !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: var(--line) !important;
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.16) !important;
  caret-color: var(--ink);
  color-scheme: light;
}

html[data-theme="light"] .form-textarea:focus {
  border-color: var(--royal) !important;
  box-shadow: 5px 5px 0 var(--postit), 0 0 0 3px rgba(0, 71, 255, 0.14) !important;
}

html[data-theme="light"] .form-textarea::placeholder {
  color: #7a7a7a !important;
}

html[data-theme="dark"] .app-shell {
  background: #101014 !important;
  color: #f6f6f6 !important;
}

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

html[data-theme="dark"] header,
html[data-theme="dark"] .app-footer,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-panel {
  background: rgba(19, 19, 24, 0.96) !important;
  border-color: var(--violet-neon) !important;
  box-shadow: 1px 1px 0 #050508, 10px 10px 0 rgba(110, 255, 210, 0.78), 0 0 22px rgba(191, 124, 255, 0.28) !important;
}

html[data-theme="dark"] header,
html[data-theme="dark"] .app-footer {
  box-shadow: 0 0 0 1px rgba(191, 124, 255, 0.55), 0 0 18px rgba(110, 255, 210, 0.18) !important;
}

html[data-theme="dark"] .result-card {
  box-shadow: 1px 1px 0 #050508, 10px 10px 0 rgba(191, 124, 255, 0.78), 0 0 22px rgba(110, 255, 210, 0.2) !important;
}

html[data-theme="dark"] .app-forms {
  padding-right: 1rem;
  padding-bottom: 1rem;
}

html[data-theme="dark"] .card-header {
  background: #181820 !important;
  border-color: var(--mint-neon) !important;
}

html[data-theme="dark"] .card-body,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] #result-content,
html[data-theme="dark"] #result-error {
  background: #131318 !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .result-text,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .app-footer-links a,
html[data-theme="dark"] .loader-copy,
html[data-theme="dark"] .modal-title,
html[data-theme="dark"] #result-status {
  color: #f6f6f6 !important;
}

html[data-theme="dark"] .card-subtitle,
html[data-theme="dark"] .app-footer-copy,
html[data-theme="dark"] .modal-text,
html[data-theme="dark"] .slider-ticks {
  color: #c7c7d1 !important;
}

html[data-theme="dark"] .form-textarea {
  color: #f6f6f6 !important;
  background: #19191f !important;
  background-color: #19191f !important;
  border-color: var(--mint-neon) !important;
  box-shadow: 0 0 0 1px rgba(110, 255, 210, 0.5), 4px 4px 0 #000000 !important;
  caret-color: #f6f6f6;
  color-scheme: dark;
}

html[data-theme="dark"] .form-textarea::placeholder {
  color: #aaaac0 !important;
}

html[data-theme="dark"] .result-text.result-placeholder {
  color: rgba(246, 246, 246, 0.62) !important;
}

html[data-theme="dark"] .tab-btn,
html[data-theme="dark"] .tab-btn-mobile {
  color: #f6f6f6;
  border-color: rgba(110, 255, 210, 0.55);
  box-shadow: 1px 1px 0 #050508, 4px 4px 0 rgba(110, 255, 210, 0.7);
}

html[data-theme="dark"] .tab-btn:hover,
html[data-theme="dark"] .tab-btn-mobile:hover {
  color: #101014;
  background: var(--mint-neon);
  border-color: #050508;
  box-shadow: 1px 1px 0 #050508, 6px 6px 0 var(--violet-neon);
}

html[data-theme="dark"] .tab-btn.active,
html[data-theme="dark"] .tab-btn-mobile.active {
  color: #ffffff;
  background: var(--royal);
  border-color: #050508;
  box-shadow: 1px 1px 0 #050508, 6px 6px 0 var(--mint-neon);
}

html[data-theme="dark"] .theme-toggle-btn,
html[data-theme="dark"] .btn-secondary {
  color: #101014;
  background: var(--mint-neon);
  border-color: #050508;
  box-shadow: 1px 1px 0 #050508, 6px 6px 0 var(--violet-neon);
}

html[data-theme="dark"] .btn-primary {
  border-color: #050508;
  box-shadow: 1px 1px 0 #050508, 6px 6px 0 var(--mint-neon);
}

html[data-theme="dark"] .btn-primary:hover:not(:disabled) {
  box-shadow: 1px 1px 0 #050508, 8px 8px 0 var(--mint-neon);
}

html[data-theme="dark"] .btn-pompier {
  border-color: #050508;
  box-shadow: 1px 1px 0 #050508, 6px 6px 0 var(--violet-neon);
}

html[data-theme="dark"] .btn-pompier:hover:not(:disabled) {
  box-shadow: 1px 1px 0 #050508, 8px 8px 0 var(--violet-neon);
}

html[data-theme="dark"] .btn-secondary:hover:not(:disabled),
html[data-theme="dark"] .theme-toggle-btn:hover {
  box-shadow: 1px 1px 0 #050508, 6px 6px 0 var(--violet-neon);
}

html[data-theme="dark"] .btn-primary.is-pressing,
html[data-theme="dark"] .btn-secondary.is-pressing {
  transform: translateY(2px);
  box-shadow: 1px 1px 0 #050508, 3px 3px 0 var(--mint-neon) !important;
}

html[data-theme="dark"] .btn-pompier.is-pressing {
  transform: translateY(2px);
  box-shadow: 1px 1px 0 #050508, 3px 3px 0 var(--violet-neon) !important;
}

html[data-theme="dark"] #mobile-menu-btn {
  color: #f6f6f6;
}

/* Distinct visual pass: oddball office, not neo-brutalist */
:root {
  --memo-ink: #202124;
  --memo-blue: #2554d9;
  --memo-blue-soft: #eef3ff;
  --memo-yellow: #ffeaa6;
  --memo-coral: #f27a54;
  --memo-lilac: #c8b8ff;
  --memo-mint: #9be7d1;
  --memo-border: #d8d1e7;
  --memo-shadow: 0 18px 42px rgba(35, 31, 77, 0.14), 0 4px 14px rgba(18, 71, 216, 0.08);
  --memo-shadow-hover: 0 22px 50px rgba(35, 31, 77, 0.18), 0 8px 18px rgba(18, 71, 216, 0.12);
}

.app-shell,
html[data-theme="light"] .app-shell {
  background: #f7f2e8;
}

header,
html[data-theme="light"] header {
  background: rgba(255, 253, 247, 0.9) !important;
  border-bottom: 1px solid rgba(77, 65, 110, 0.14) !important;
}

header .bg-gradient-to-br {
  background: var(--memo-blue) !important;
  border-radius: 1.1rem !important;
  box-shadow: 0 10px 22px rgba(18, 71, 216, 0.22) !important;
}

.card,
html[data-theme="light"] .card,
html[data-theme="light"] .modal-panel {
  background: #ffffff !important;
  border: 1px solid var(--memo-border) !important;
  border-radius: 1.35rem !important;
  box-shadow: var(--memo-shadow) !important;
}

html[data-theme="light"] .modal-title {
  color: var(--memo-ink) !important;
}

html[data-theme="light"] .modal-text {
  color: #3a3445 !important;
}

html[data-theme="light"] .modal-retry {
  color: #312e81 !important;
}

.card-header,
html[data-theme="light"] .card-header {
  background: #fbf8ef !important;
  border-bottom: 1px dashed rgba(77, 65, 110, 0.22) !important;
}

.result-card,
html[data-theme="light"] .result-card {
  background: #ffffff !important;
  border-color: #cfd8ff !important;
  box-shadow: 0 18px 42px rgba(18, 71, 216, 0.14), 0 4px 14px rgba(255, 122, 89, 0.1) !important;
}

.card-title,
html[data-theme="light"] .card-title {
  color: var(--memo-ink) !important;
  font-weight: 800;
}

.card-subtitle,
html[data-theme="light"] .card-subtitle {
  color: #686071 !important;
}

.form-label,
html[data-theme="light"] .form-label {
  color: #3a3445 !important;
}

.form-textarea,
html[data-theme="light"] .form-textarea {
  background: #fbfcff !important;
  border: 1px solid #cfd8ff !important;
  border-radius: 1.15rem !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 22px rgba(18, 71, 216, 0.08) !important;
}

.form-textarea:focus,
html[data-theme="light"] .form-textarea:focus {
  border-color: var(--memo-blue) !important;
  box-shadow: 0 0 0 4px rgba(255, 240, 168, 0.9), 0 12px 28px rgba(18, 71, 216, 0.14) !important;
}

.form-range {
  background: #dbe4ff !important;
}

.form-range::-webkit-slider-thumb {
  background: var(--memo-blue) !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 5px 14px rgba(37, 84, 217, 0.28) !important;
}

.form-range::-moz-range-thumb {
  background: var(--memo-blue) !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 5px 14px rgba(37, 84, 217, 0.28) !important;
}

.tab-btn,
.tab-btn-mobile {
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: none;
}

.tab-btn:hover,
.tab-btn-mobile:hover {
  color: var(--memo-blue);
  background: rgba(255, 240, 168, 0.85);
  border-color: rgba(18, 71, 216, 0.16);
  box-shadow: 0 8px 18px rgba(18, 71, 216, 0.1);
}

.tab-btn.active,
.tab-btn-mobile.active {
  color: #ffffff;
  background: var(--memo-blue);
  border-color: rgba(18, 71, 216, 0.18);
  box-shadow: 0 10px 24px rgba(18, 71, 216, 0.28);
}

.btn-primary,
.btn-secondary,
.theme-toggle-btn {
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 22px rgba(18, 71, 216, 0.26), inset 0 -3px 0 rgba(16, 32, 86, 0.22) !important;
}

.btn-primary {
  background: var(--memo-blue) !important;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--memo-shadow-hover) !important;
}

.btn-primary:active:not(:disabled),
.btn-primary.is-pressing {
  transform: translateY(2px);
  box-shadow: 0 5px 12px rgba(18, 71, 216, 0.2), inset 0 2px 0 rgba(16, 32, 86, 0.18) !important;
}

.btn-pompier {
  background: var(--memo-coral) !important;
  box-shadow: 0 10px 22px rgba(255, 122, 89, 0.28), inset 0 -3px 0 rgba(128, 44, 24, 0.22) !important;
}

.btn-pompier:hover:not(:disabled) {
  box-shadow: 0 22px 46px rgba(255, 122, 89, 0.22), 0 8px 18px rgba(18, 71, 216, 0.08) !important;
}

.btn-secondary,
.theme-toggle-btn {
  color: #2d2550;
  background: var(--memo-yellow) !important;
  box-shadow: 0 9px 20px rgba(128, 95, 22, 0.16), inset 0 -3px 0 rgba(128, 95, 22, 0.16) !important;
}

.btn-secondary:hover:not(:disabled),
.theme-toggle-btn:hover {
  color: var(--memo-blue);
  box-shadow: 0 14px 28px rgba(128, 95, 22, 0.2), inset 0 -3px 0 rgba(128, 95, 22, 0.14) !important;
}

html[data-theme="dark"] .app-shell {
  background: #11131b !important;
}

html[data-theme="dark"] header,
html[data-theme="dark"] .app-footer {
  background: rgba(17, 19, 27, 0.92) !important;
  border-color: rgba(132, 244, 207, 0.18) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="dark"] .app-footer {
  border-top-color: rgba(132, 244, 207, 0.14) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .app-footer {
  background: rgba(255, 252, 242, 0.92) !important;
  border-top: 1px solid rgba(77, 65, 110, 0.12) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-panel {
  background: #191b27 !important;
  border: 1px solid rgba(132, 244, 207, 0.26) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38), 0 0 30px rgba(183, 156, 255, 0.12) !important;
}

html[data-theme="dark"] .result-card {
  background: #191b27 !important;
  border-color: rgba(183, 156, 255, 0.3) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38), 0 0 30px rgba(132, 244, 207, 0.12) !important;
}

html[data-theme="dark"] .card-header {
  background: #202334 !important;
  border-bottom: 1px dashed rgba(132, 244, 207, 0.28) !important;
}

html[data-theme="dark"] .card-body,
html[data-theme="dark"] #result-content,
html[data-theme="dark"] #result-error {
  background: transparent !important;
}

html[data-theme="dark"] .form-textarea {
  background: #11131b !important;
  border: 1px solid rgba(132, 244, 207, 0.34) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="dark"] .form-textarea:focus {
  border-color: var(--memo-mint) !important;
  box-shadow: 0 0 0 4px rgba(132, 244, 207, 0.14), 0 12px 30px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .form-range {
  background: rgba(155, 231, 209, 0.2) !important;
}

html[data-theme="dark"] .form-range::-webkit-slider-thumb {
  background: var(--memo-mint) !important;
  border-color: #11131b !important;
  box-shadow: 0 5px 14px rgba(155, 231, 209, 0.22) !important;
}

html[data-theme="dark"] .form-range::-moz-range-thumb {
  background: var(--memo-mint) !important;
  border-color: #11131b !important;
  box-shadow: 0 5px 14px rgba(155, 231, 209, 0.22) !important;
}

html[data-theme="dark"] .tab-btn,
html[data-theme="dark"] .tab-btn-mobile {
  border: 1px solid rgba(132, 244, 207, 0.18);
  box-shadow: none;
}

html[data-theme="dark"] .tab-btn:hover,
html[data-theme="dark"] .tab-btn-mobile:hover {
  color: #11131b;
  background: var(--memo-mint);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(132, 244, 207, 0.18);
}

html[data-theme="dark"] .tab-btn.active,
html[data-theme="dark"] .tab-btn-mobile.active {
  background: #4667f0;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(87, 112, 255, 0.32);
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-pompier,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .theme-toggle-btn {
  border: 0 !important;
}

html[data-theme="dark"] .btn-primary {
  box-shadow: 0 12px 26px rgba(87, 112, 255, 0.32), inset 0 -3px 0 rgba(2, 8, 27, 0.36) !important;
}

html[data-theme="dark"] .btn-pompier {
  box-shadow: 0 12px 26px rgba(255, 122, 89, 0.3), inset 0 -3px 0 rgba(52, 13, 8, 0.34) !important;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .theme-toggle-btn {
  color: #10131a;
  background: var(--memo-mint) !important;
  box-shadow: 0 12px 24px rgba(132, 244, 207, 0.18), inset 0 -3px 0 rgba(10, 74, 58, 0.18) !important;
}
