div.spv-app {
border-radius:1rem;
border: 7px solid #f3f5f7;
  background: #f8f9fa;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
overflow:hidden;
}

/* Header */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid #e0e3e7;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.app-header .header-left {
  display: flex;
  align-items: center;
}
.app-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 18px;
}
.app-header .logo .logo-icon {
  width: 32px;
  height: 32px;
}
.app-header .logo .logo-text {
  color: #202124;
  font-family: 'Google Sans', sans-serif;
}
.app-header .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-header .header-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #1a73e8;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.app-header .header-btn:hover {
  background: #1461c5; /* darken(#1a73e8, 8%) */
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
}
.app-header .header-btn:active {
  transform: translateY(0);
}

.view-toggle {
  display: flex;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 4px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
.view-toggle .view-btn {
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #5f6368;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.view-toggle .view-btn:hover:not(.active) {
  background: rgba(0,0,0,0.05);
}
.view-toggle .view-btn.active {
  background: #ffffff;
  color: #1a73e8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* App Container */
.app-container {
  display: flex;
  height: calc(100vh - 64px);
}

/* Editor Panel */
.editor-panel {
  width: 420px;
  background: #ffffff;
  border-right: 1px solid #e0e3e7;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.editor-panel::-webkit-scrollbar { width: 8px; }
.editor-panel::-webkit-scrollbar-track { background: #f8f9fa; }
.editor-panel::-webkit-scrollbar-thumb {
  background: #cbd2d9;
  border-radius: 4px;
}
.editor-panel::-webkit-scrollbar-thumb:hover { background: #9aa0a6; }
.editor-panel .panel-section {
  padding: 28px;
  border-bottom: 1px solid #e0e3e7;
}
.editor-panel .panel-section:last-child { border-bottom: none; }
.editor-panel .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5f6368;
  margin-bottom: 24px;
}
.editor-panel .section-title svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}
.editor-panel .input-group { margin-bottom: 24px; }
.editor-panel .input-group:last-child { margin-bottom: 0; }
.editor-panel .input-label {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #202124;
}
.editor-panel .input-label .label-helper {
  font-size: 12px;
  font-weight: 400;
  color: #5f6368;
  margin-left: 8px;
}
.editor-panel .char-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}
.editor-panel .char-indicator .char-count {
  font-size: 12px;
  color: #5f6368;
  font-weight: 400;
  transition: color 0.2s;
}
.editor-panel .char-indicator .char-count.over-limit {
  color: #d33b27;
  font-weight: 500;
}
.editor-panel .char-indicator .char-status {
  font-size: 14px;
  transition: all 0.2s;
}
.editor-panel .input-wrapper { position: relative; }
.editor-panel .input-wrapper.has-progress .input-field { padding-bottom: 20px; }
.editor-panel .input-wrapper .input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #5f6368;
  pointer-events: none;
}
.editor-panel .input-wrapper .input-icon svg {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}
.editor-panel .input-field {
  width: 100%;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #202124;
  transition: all 0.2s;
}
.editor-panel .input-field::placeholder { color: #9aa0a6; }
.editor-panel .input-field:hover { background: #f2f4f6; } /* darken(#f8f9fa,2%) */
.editor-panel .input-field:focus {
  outline: none;
  background: #ffffff;
  border-color: #1a73e8;
  box-shadow: 0 0 0 4px rgba(26,115,232,0.1);
}
.editor-panel .input-field.textarea-auto {
  resize: none;
  min-height: 40px;
  line-height: 1.5;
  overflow: hidden;
}
.editor-panel .input-field.compact {
  width: auto;
  min-width: 120px;
  margin-top: 8px;
}
.editor-panel .progress-bar {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  overflow: visible;
}
.editor-panel .progress-bar .progress-fill {
  height: 100%;
  background: #1e8e3e;
  border-radius: 2px;
  width: var(--progress, 0%);
  transition: all 0.3s ease;
}
.editor-panel .progress-bar .progress-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
}
.editor-panel .progress-bar .progress-markers .marker {
  position: absolute;
  width: 1px;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
}
.editor-panel .progress-bar .progress-markers .marker.optimal {
  background: #1e8e3e;
  opacity: 0.3;
}
.editor-panel .progress-bar.warning .progress-fill { background: #f9ab00; }
.editor-panel .progress-bar.danger .progress-fill { background: #d33b27; }
.editor-panel .input-feedback { margin-top: 6px; min-height: 20px; }
.editor-panel .input-feedback .feedback-text {
  font-size: 12px;
  color: #5f6368;
  transition: all 0.2s;
}
.editor-panel .input-feedback .feedback-text.success { color: #1e8e3e; }
.editor-panel .input-feedback .feedback-text.warning { color: #f9ab00; }
.editor-panel .input-feedback .feedback-text.danger { color: #d33b27; }

/* Options */
.option-item { margin-bottom: 20px; }
.option-item .switch-control {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.option-item .switch-control input { display: none; }
.option-item .switch-control .switch-track {
  width: 44px;
  height: 24px;
  background: #cbd2d9;
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
  margin-top: 2px;
}
.option-item .switch-control .switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.option-item .switch-control input:checked + .switch-track { background: #1a73e8; }
.option-item .switch-control input:checked + .switch-track::after { transform: translateX(20px); }
.option-item .switch-control .switch-label { flex: 1; }
.option-item .switch-control .switch-label .switch-hint {
  display: block;
  font-size: 12px;
  color: #5f6368;
  margin-top: 2px;
  font-weight: 400;
}

.hidden { display: none !important; }

.panel-footer {
  padding: 24px 28px;
  margin-top: auto;
  background: #f8f9fa;
  border-top: 1px solid #e0e3e7;
}
.panel-footer .shortcuts h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #5f6368;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.panel-footer .shortcuts .shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel-footer .shortcuts .shortcut-list span {
  font-size: 12px;
  color: #5f6368;
}
.panel-footer .shortcuts .shortcut-list span kbd {
  display: inline-block;
  padding: 2px 6px;
  background: #ffffff;
  border: 1px solid #e0e3e7;
  border-radius: 4px;
  font-family: 'SF Mono', monospace;
  font-size: 11px;
  color: #202124;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Preview Area */
.preview-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: auto;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
.preview-wrapper {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
}

/* Device Frame */
.device-frame {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.device-frame.mobile-view {
  width: 375px;
  border-radius: 24px;
  border: 8px solid #1a1a1a;
}
.device-frame.mobile-view .device-screen {
  border-radius: 16px;
  max-height: 700px;
  overflow-y: auto;
}
.device-frame.desktop-view {
  width: 100%;
  max-width: 1000px;
}

.device-screen {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}
.device-screen::-webkit-scrollbar { width: 8px; }
.device-screen::-webkit-scrollbar-track { background: #f8f9fa; }
.device-screen::-webkit-scrollbar-thumb {
  background: #cbd2d9;
  border-radius: 4px;
}

/* Google SERP - Exact Styling */
.google-serp {
  font-family: 'Roboto', arial, sans-serif;
  background: #fff;
  min-height: 600px;
}

/* Google Header */
.google-header {
  padding: 20px 20px 12px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.google-header .google-logo {
  margin-bottom: 20px;
  width: 92px;
  height: 30px;
}
.google-header .google-search-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #dadce0;
  border-radius: 24px;
  padding: 5px 8px 5px 16px;
  box-shadow: 0 2px 5px 1px rgba(64,60,67,.16);
  background: #fff;
}
.google-header .google-search-box:hover {
  box-shadow: 0 2px 8px 1px rgba(64,60,67,.24);
}
.google-header .google-search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #202124;
  font-family: 'Roboto', arial, sans-serif;
  background: transparent;
}
.google-header .google-search-box .search-buttons {
  display: flex;
  gap: 8px;
}
.google-header .google-search-box .search-buttons button {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-view .google-header { padding: 14px 16px 12px; }

.desktop-view .google-header {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 20px 24px 16px;
}
.desktop-view .google-header .google-logo { margin-bottom: 0; }
.desktop-view .google-header .google-search-box {
  max-width: 690px;
  flex: 1;
}

/* Results Info */
.google-results-info {
  padding: 0 20px 12px;
  font-size: 14px;
  color: #5f6368;
  font-family: 'Google Sans','Roboto', arial, sans-serif;
  background: #fff;
}
.desktop-view .google-results-info { padding: 0 180px 12px; }

/* Google Results */
.google-results {
  padding: 0 16px 40px;
  background: #fff;
}
.desktop-view .google-results {
  padding: 0 180px 40px;
  max-width: 1200px;
}

/* Google Result Item */
.google-result {
  margin-bottom: 32px;
  font-family: 'Roboto', arial, sans-serif;
}
.google-result.user-result {
  position: relative;
  background: linear-gradient(90deg, rgba(26,115,232,0.04) 0%, transparent 100%);
  padding: 12px;
  margin: 0 -12px 32px;
  border-radius: 8px;
  animation: highlight 0.5s ease;
}
.google-result.ghost { opacity: 0.25; }
.google-result.ghost .ghost-element {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
.google-result.ghost .ghost-element.favicon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.google-result.ghost .ghost-text {
  height: 14px;
  display: inline-block;
}
.google-result.ghost .result-title .ghost-text {
  height: 20px;
  margin: 3px 0;
}
.google-result.ghost .result-snippet .ghost-text {
  display: block;
  height: 14px;
}

@keyframes highlight {
  from { background: linear-gradient(90deg, rgba(26,115,232,0.1) 0%, transparent 100%); }
  to   { background: linear-gradient(90deg, rgba(26,115,232,0.04) 0%, transparent 100%); }
}

/* Result Components */
.result-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.result-header .favicon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}
.result-header .favicon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}
.result-header .result-source {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.result-header .result-source cite {
  font-style: normal;
  font-size: 14px;
  line-height: 20px;
  color: #202124;
  display: flex;
  align-items: center;
  gap: 4px;
}
.result-header .result-source cite .site-name { color: #202124; }
.result-header .result-source cite .breadcrumb:not(:empty)::before {
  content: ' › ';
  color: #5f6368;
}
.result-header .result-source cite.url {
  color: #5f6368;
  font-size: 12px;
}

.result-title {
  margin: 0;
  font-weight: 400;
  font-size: 20px;
  line-height: 26px;
}
.result-title a {
  color: #1a0dab;
  text-decoration: none;
  cursor: pointer;
  display: block;
}
.result-title a:hover { text-decoration: underline; }

/* Result Snippet with inline date */
.result-snippet-container {
  font-size: 14px;
  line-height: 22px;
  color: #4d5156;
  word-wrap: break-word;
}
.result-date {
  color: #5f6368;
  display: none;
}
.result-date:not(:empty) { display: inline; }
.result-date:not(:empty)::after {
  content: " — ";
  color: #5f6368;
}
.result-snippet { color: #4d5156; }

/* Rating */
.result-rating {
  margin-top: 4px;
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.result-rating .rating-stars { color: #fbbc05; font-size: 14px; }
.result-rating .rating-text { color: #5f6368; font-size: 14px; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-overlay .loading-content { text-align: center; color: #fff; }
.loading-overlay .loading-content .loader {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
}
.toast {
  background: #ffffff;
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideIn 0.3s cubic-bezier(0.4,0,0.2,1);
  font-size: 14px;
}
.toast.error   { border-left: 4px solid #d33b27; }
.toast.success { border-left: 4px solid #1e8e3e; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .editor-panel { width: 380px; }
}
@media (max-width: 768px) {
  .app-container { flex-direction: column; }
  .editor-panel {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e3e7;
    max-height: 50vh;
  }
  .preview-area { padding: 16px; }
  .desktop-view .google-results,
  .desktop-view .google-results-info {
    padding-left: 20px;
    padding-right: 20px;
  }
}
/* MOBILE : un seul scroll, sections plein écran */
@media (max-width: 768px) {
  /* Le document ne scrolle pas, on confie le scroll au conteneur */
  html, body {
    height: 100%;
  }

  /* Le conteneur occupe tout le viewport dispo sous le header */
  .app-container {
    height: calc(100dvh - 64px);   /* dVH = viewport dynamique mobile */
    display: block;                 /* pile verticale */
    overflow-y: auto;               /* un seul scroll ici */
    -webkit-overflow-scrolling: touch;
  }

  /* Chaque section occupe 100% de la hauteur dispo, pas de scroll interne */
  .editor-panel,
  .preview-area {
    min-height: calc(100dvh - 64px);
    max-height: none;
    overflow: visible;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #e0e3e7; /* garde une séparation légère */
  }

  /* Désactiver les scrollbars internes de la preview */
  .preview-area { padding: 16px; }
  .device-frame .device-screen { 
    max-height: none;
    overflow: visible;
  }
  /* Si tu utilises la variante mobile de device-frame, on écrase aussi */
  .device-frame.mobile-view .device-screen {
    max-height: none;
    overflow: visible;
  }

  /* Évite la contrainte précédente de 50vh mentionnée dans tes styles */
  .editor-panel {
    max-height: none !important;
  }
}