* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f5f5f5;
  padding: 20px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.analyzer-container {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 900px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

h3 {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  color: #333;
}

h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

textarea,
input[type="text"],
input[type="url"] {
  
  width: 100%;
  padding: 16px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 20px;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}

textarea {
  min-height: 300px;
  line-height: 1.6;
}

textarea:focus,
input:focus {
  border-color: #ff9320;
}

.url-section {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.url-section input {
  flex: 1;
  margin-bottom: 0;
}

.url-section button {
  padding: 16px 24px;
  background: #ff9320;
  color: #333;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s;
  white-space: nowrap;
}

.url-section button:hover {
  background: #fe8f19;
  transform: translateY(-2px);
}

.url-section button:active {
  transform: translateY(0);
}

.url-section button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}

.stat-box {
  background: #f7f7f7;
  border-radius: 12px;
  flex: 1 1 140px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
  transition: transform .2s, box-shadow .2s;
}

.stat-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.stat-box .icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
  font-size: 32px;
}

.stat-box .icon img {
  width: 50%;
  max-width: 60px;
  height: auto;
}

.label {
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}

.value {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #222;
}

.value.red { color: #f44336; }
.value.orange { color: #ff9800; }
.value.green { color: #4CAF50; }

.meter-bg {
  width: 100%;
  height: 8px;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 4px;
}

.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 8px 0 0 8px;
  transition: width .3s, background .3s;
  background-color: #333;
}

.meter-fill.red { background-color: #f44336; }
.meter-fill.orange { background-color: #ff9800; }
.meter-fill.green { background-color: #4CAF50; }

.keyword-list {
  margin-top: 24px;
  padding: 20px;
  background: #f7f7f7;
  border-radius: 12px;
  display: none;
}

.keyword-list.visible {
  display: block;
}

.keyword-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.keyword-name {
  font-weight: 500;
  color: #333;
}

.keyword-count {
  background: #ff9320;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.heading-item {
  margin-left: 0;
  padding: 8px 12px;
  background: #f5f5f5;
  border-left: 3px solid #4CAF50;
  border-radius: 4px;
  margin-bottom: 6px;
  word-break: break-word;
}

/* Notifications en bas */
.notification {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: slideUp .3s ease-out;
  z-index: 9999;
}

@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.notification-error {
  background: #ffebee;
  border-left: 4px solid #f44336;
}

.notification-message-wrapper {
  flex: 1;
}

.notification-solutions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f44336;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.solutions-title {
  font-weight: 600;
  color: #c62828;
  font-size: 13px;
  margin-bottom: 6px;
}

.notification-solutions ol {
  margin-left: 16px;
  color: #c62828;
  font-size: 13px;
  line-height: 1.5;
}

.notification-solutions li {
  margin-bottom: 4px;
}

.notification-success {
  background: #e8f5e9;
  border-left: 4px solid #4CAF50;
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  color: #333;
}

.notification-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.notification-error .notification-message {
  color: #c62828;
}

.notification-success .notification-message {
  color: #2e7d32;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity .2s;
  flex-shrink: 0;
}

.notification-close:hover {
  opacity: 1;
}

/* Responsive */
@media(max-width: 768px) {
  .analyzer-container {
    padding: 20px;
    max-width: 100%;
  }

  h3 {
    font-size: 22px;
  }

  .stats {
    flex-direction: column;
    gap: 12px;
  }

  .stat-box {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .stat-box .icon img {
    width: 40%;
    max-width: 50px;
  }

  textarea {
    min-height: 250px;
    font-size: 14px;
    padding: 12px;
  }

  textarea,
  input[type="text"],
  input[type="url"] {
    font-size: 14px;
    padding: 12px;
    margin-bottom: 16px;
  }

  .url-section {
    flex-direction: column;
    gap: 10px;
  }

  .url-section input {
    margin-bottom: 0;
  }

  .url-section button {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
  }

  .notification {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }
}

@media(max-width: 480px) {
  .analyzer-container {
    padding: 16px;
    border-radius: 12px;
  }

  h3 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .stat-box {
    padding: 12px;
  }

  .label {
    font-size: 12px;
  }

  .value {
    font-size: 16px;
  }

  textarea {
    min-height: 200px;
  }

  .notification-message {
    font-size: 13px;
  }
}

