/* ============================================
   FINANCES PERSONNELLES - Design Élégant
   Blanc, minimaliste, professionnel
   ============================================ */

/* Import des polices */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* Variables */
:root {
  --color-bg: #fefefe;
  --color-bg-soft: #f8f9fa;
  --color-text: #1a1a1a;
  --color-text-secondary: #5a5a5a;
  --color-text-muted: #8a8a8a;
  --color-accent: #1e3a5f;
  --color-accent-light: #2c5282;
  --color-success: #0f4c3a;
  --color-warning: #92400e;
  --color-border: #e5e7eb;
  --color-border-light: #f0f0f0;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Reset et base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typographie */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--color-text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-light);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(254, 254, 254, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-light);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg-soft) 0%, var(--color-bg) 100%);
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: var(--color-text-secondary);
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Cards Section */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header p {
  max-width: 500px;
  margin: 0 auto;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--color-border-light);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-border);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.card-link {
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Formulaires */
.form-section {
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.form-section h3 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-group input,
.form-group select {
  padding: 0.875rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--color-text);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.08);
}

.input-with-toggle {
  display: flex;
  gap: 0.5rem;
}

.input-with-toggle input {
  flex: 1;
}

.input-with-toggle select {
  width: 100px;
  padding: 0.875rem 0.5rem;
}

/* Input toggle buttons */
.toggle-group {
  display: flex;
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.toggle-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background: white;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* Résultats */
.results-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.result-card {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  transition: all 0.2s ease;
}

.result-card:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.result-card.highlight {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.result-card {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
}

.result-card.highlight {
  background: var(--color-accent);
  color: white;
}

.result-card.highlight .result-label {
  color: rgba(255, 255, 255, 0.7);
}

.result-card.highlight .result-value {
  color: white;
}

.result-label {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.result-value {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text);
}

.result-value.positive {
  color: var(--color-success);
}

.result-value.negative {
  color: #dc2626;
}

/* Graph container */
.chart-container {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  height: 400px;
}

/* Page Header */
.page-header {
  padding: 140px 0 60px;
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border-light);
}

.page-header h1 {
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.1rem;
  max-width: 600px;
  color: var(--color-text-secondary);
}

/* Simulateur content */
.simulator-content {
  padding: 60px 0 100px;
}

/* Verdict box */
.verdict {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.verdict.buy {
  background: rgba(15, 76, 58, 0.08);
  border: 1px solid rgba(15, 76, 58, 0.2);
}

.verdict.rent {
  background: rgba(30, 58, 95, 0.08);
  border: 1px solid rgba(30, 58, 95, 0.2);
}

.verdict-icon {
  font-size: 1.5rem;
}

.verdict-text h4 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.verdict-text p {
  margin: 0;
  font-size: 0.95rem;
}

/* Footer */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--color-border-light);
  text-align: center;
}

.footer p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 1.5rem;
}

.data-table th,
.data-table td {
  padding: 0.875rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

.data-table th {
  font-weight: 500;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  font-variant-numeric: tabular-nums;
}

.data-table tr:hover td {
  background: var(--color-bg-soft);
}

/* Small text in tables */
.data-table small {
  display: inline;
  font-size: 0.75em;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
  text-align: center;
}

.text-lg {
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

.form-title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.results-title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.table-title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.table-wrapper {
  margin-top: 2rem;
}

.btn-full {
  width: 100%;
  margin-bottom: 2rem;
}

.btn-lg {
  padding: 1.25rem 2.5rem;
  font-size: 1rem;
}

.details-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.section-alt {
  background: var(--color-bg-soft);
}

.section-cta {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-soft) 100%);
}

.features-list {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.feature {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.feature-number {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
}

.feature-content h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-content p {
  margin: 0;
}

.card-coming-soon {
  opacity: 0.7;
}

.muted {
  color: var(--color-text-muted);
}

.footer-disclaimer {
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* ============================================
   HAMBURGER MENU TOGGLE
   ============================================ */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 110;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.nav-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.nav-toggle span:nth-child(2) {
  transform: translateY(0);
}

.nav-toggle span:nth-child(3) {
  transform: translateY(6px);
}

/* Hamburger → X animation */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

/* Body scroll lock when menu is open */
body.menu-open {
  overflow: hidden;
}

/* Mobile overlay behind nav */
.nav-overlay {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
}

/* ============================================
   RESPONSIVE — TABLET (≤768px)
   ============================================ */

@media (max-width: 768px) {

  /* Show hamburger */
  .nav-toggle {
    display: flex;
  }

  /* Mobile nav-links dropdown */
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(254, 254, 254, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 0 1.5rem;
    gap: 0;
    list-style: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--color-border-light);
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s ease,
      padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-links.active {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--color-border-light);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.875rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color 0.2s ease, padding-left 0.2s ease;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--color-accent);
    padding-left: 0.5rem;
  }

  .nav-links a::after {
    display: none;
  }

  /* Show overlay */
  .nav-overlay {
    display: block;
  }

  /* Hero */
  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  /* Sections */
  .section {
    padding: 60px 0;
  }

  .section-cta {
    padding: 50px 0;
  }

  /* Containers */
  .container,
  .container-narrow {
    padding: 0 1.25rem;
  }

  /* Forms */
  .form-section,
  .results-section {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Cards */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .card {
    padding: 1.5rem;
  }

  /* Results */
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .result-card {
    padding: 1rem;
  }

  .result-value {
    font-size: 1.25rem;
  }

  .details-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Inputs */
  .input-with-toggle {
    flex-wrap: nowrap;
  }

  .input-with-toggle input {
    min-width: 0;
  }

  /* Chart */
  .chart-container {
    height: 300px;
    padding: 1rem;
  }

  /* Table */
  .data-table {
    font-size: 0.75rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.25rem;
  }

  /* Page header (simulator pages) */
  .page-header {
    padding: 100px 0 40px;
  }

  .page-header h1 {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
  }

  .page-header p {
    font-size: 1rem;
  }

  /* Verdict */
  .verdict {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }

  /* Buttons */
  .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .btn-group .btn {
    width: 100%;
    max-width: 360px;
    justify-content: center;
  }

  .btn-lg {
    padding: 1rem 2rem;
    font-size: 0.95rem;
  }

  /* Features */
  .feature {
    gap: 1rem;
  }

  /* Footer */
  .footer {
    padding: 40px 0 30px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1rem 2rem;
  }
}

/* ============================================
   RESPONSIVE — SMALL PHONE (≤480px)
   ============================================ */

@media (max-width: 480px) {

  .container,
  .container-narrow {
    padding: 0 1rem;
  }

  .hero {
    padding: 110px 0 50px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.85rem;
  }

  .form-section,
  .results-section {
    padding: 1rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
  }

  .input-with-toggle select {
    width: 80px;
    padding: 0.75rem 0.4rem;
    font-size: 0.85rem;
  }

  .result-value {
    font-size: 1.1rem;
  }

  .result-label {
    font-size: 0.7rem;
  }

  .chart-container {
    height: 260px;
    padding: 0.75rem;
  }

  .page-header {
    padding: 95px 0 30px;
  }

  .section {
    padding: 40px 0;
  }

  .section-cta {
    padding: 40px 0;
  }

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

  .note {
    font-size: 0.8rem;
    padding: 0.875rem;
  }

  .toggle-group {
    flex-wrap: nowrap;
  }

  .toggle-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  .mode-toggle-label {
    font-size: 0.85rem;
  }

  .mode-toggle-hint {
    font-size: 0.78rem;
  }
}

/* ============================================
   RESPONSIVE — VERY SMALL (≤360px)
   ============================================ */

@media (max-width: 360px) {

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .nav-inner {
    padding: 0 1rem;
  }
}

/* Print styles */
@media print {

  .nav,
  .btn {
    display: none;
  }

  .results-section {
    break-inside: avoid;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-soft);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Notes et explications */
.note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 1rem;
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-accent);
  margin-top: 1.5rem;
}

/* Mode toggle - Investissement locatif */
.mode-toggle-wrapper {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.mode-toggle input[type="checkbox"] {
  display: none;
}

.mode-toggle-slider {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--color-border);
  border-radius: 13px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.mode-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.mode-toggle input:checked+.mode-toggle-slider {
  background: var(--color-accent);
}

.mode-toggle input:checked+.mode-toggle-slider::after {
  transform: translateX(22px);
}

.mode-toggle-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

.mode-toggle-hint {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  margin-bottom: 0;
  transition: all 0.3s ease;
}

.mode-toggle-hint strong {
  color: var(--color-accent);
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip::after {
  content: 'ⓘ';
  font-size: 0.75rem;
  margin-left: 0.25rem;
  color: var(--color-text-muted);
}

/* ============================================
   BLOG STYLES
   ============================================ */

/* Blog listing */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.blog-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.blog-card-tag {
  display: inline-block;
  background: var(--color-bg-soft);
  color: var(--color-accent);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.blog-card h3 a {
  color: var(--color-text);
}

.blog-card h3 a:hover {
  color: var(--color-accent);
}

.blog-card p {
  font-size: 0.92rem;
  flex-grow: 1;
}

.blog-card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-accent);
}

/* Blog article */
.article-header {
  padding: 6rem 0 3rem;
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border-light);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.article-content {
  padding: 3rem 0 4rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-light);
}

.article-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.article-content p {
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--color-text-secondary);
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content strong {
  color: var(--color-text);
  font-weight: 600;
}

.article-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb span {
  margin: 0 0.4rem;
}

/* Article CTA */
.article-cta {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  margin-top: 3rem;
}

.article-cta h3 {
  margin-bottom: 0.75rem;
}

.article-cta p {
  margin-bottom: 1.25rem;
}

/* Article FAQ section */
.article-faq {
  margin-top: 2.5rem;
}

.article-faq details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.article-faq summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-soft);
  transition: background 0.2s ease;
}

.article-faq summary:hover {
  background: var(--color-border-light);
}

.article-faq details[open] summary {
  border-bottom: 1px solid var(--color-border);
}

.article-faq details p {
  padding: 1rem 1.25rem;
  margin: 0;
  font-size: 0.95rem;
}