/**
 * Ekho — style global (mobile-first)
 * Fond clair pour que tout type de logo commerce ressort sans bug graphique.
 */

:root {
  --ekho-bg: #ffffff;
  --ekho-surface: #f5f5f5;
  --ekho-primary: #2c3e50;
  --ekho-text: #1a1a1a;
  --ekho-muted: #5a6c7d;
  --ekho-error: #c62828;
  --ekho-success: #2e7d32;
  --ekho-border: #e0e0e0;
  --ekho-focus: #3d5a80;
  /* Couleurs d'accent pour infos clés (dashboard) — cohérentes avec la palette */
  --ekho-accent: #0284c7;
  --ekho-accent-soft: #e0f2fe;
  --ekho-success-soft: #dcfce7;
  --ekho-warning: #b45309;
  --ekho-warning-soft: #fef3c7;
  /* Surfaces interactives : distinct de bg et surface pour feedback visuel clair */
  --ekho-outline-hover: #e5ecf4;
  --ekho-outline-border-hover: #b8c9dc;
  --ekho-radius: 8px;
  --ekho-touch: 44px;
  --ekho-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ekho-transition: 0.15s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--ekho-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ekho-text);
  background: var(--ekho-bg);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.ekho-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1rem, 4vw, 2rem);
  padding-left: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left));
  padding-right: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-right));
  padding-bottom: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-bottom));
  max-width: 42rem;
  margin: 0 auto;
}

/* --- Admin layout (mobile-first) --- */

.ekho-admin-page {
  max-width: 64rem;
}

.ekho-admin-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ekho-bg);
  padding-bottom: 0.5rem;
}

.ekho-admin-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ekho-admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.ekho-admin-title {
  margin: 0;
  font-size: 1.35rem;
}

.ekho-admin-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--ekho-muted);
}

.ekho-admin-user {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ekho-muted);
}

.ekho-admin-nav {
  display: flex;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--ekho-border);
  gap: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.ekho-admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ekho-touch);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--ekho-muted);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
}

.ekho-admin-tab-active {
  color: var(--ekho-primary);
  background-color: var(--ekho-outline-hover);
  border-color: var(--ekho-outline-border-hover);
  font-weight: 600;
}

.ekho-admin-main {
  margin-top: 1.25rem;
}

.ekho-admin-card {
  margin-bottom: 2rem;
}

/* Inscription rapide */
.ekho-card-inscription .ekho-inscription-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  color: var(--ekho-text);
}

.ekho-form-quick fieldset {
  margin-top: 0;
}

.ekho-btn-submit {
  margin-top: 1.25rem;
}

.ekho-success-inscription .ekho-success-link {
  word-break: break-all;
  font-size: 0.85rem;
}

.ekho-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.ekho-btn-success-link {
  flex: 1;
  min-width: 8rem;
  text-align: center;
  text-decoration: none;
}

.ekho-success-actions .ekho-btn-outline {
  flex: 1;
  min-width: 8rem;
  cursor: pointer;
}

/* Blocs repliables (details/summary) */
.ekho-details {
  margin-top: 1rem;
  border: 1px solid var(--ekho-border);
  border-radius: var(--ekho-radius);
  background: rgba(255, 255, 255, 0.5);
}

.ekho-details[open] {
  border-color: var(--ekho-focus);
  background: var(--ekho-bg);
}

.ekho-details summary {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ekho-primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ekho-details summary::-webkit-details-marker,
.ekho-details summary::marker {
  display: none;
}

.ekho-details summary::before {
  content: '▸';
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.ekho-details[open] summary::before {
  transform: rotate(90deg);
}

.ekho-details-hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ekho-muted);
}

.ekho-details fieldset {
  padding: 0 1rem 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--ekho-border);
}

.ekho-details .ekho-checkbox {
  margin-top: 1rem;
}

/* Stats de pages (Option A, anonyme) */
.ekho-stats-summary {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(44, 62, 80, 0.04);
  border-radius: var(--ekho-radius);
  border-left: 4px solid var(--ekho-primary);
}

.ekho-stats-summary p {
  margin: 0.35rem 0;
}

.ekho-qr-hint {
  margin-top: 0.5rem;
  padding: 0.5rem 0;
}

.ekho-qr-block {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--ekho-surface, #f5f5f5);
  border-radius: var(--ekho-radius, 0.5rem);
  border: 1px solid var(--ekho-border, #ddd);
}

.ekho-qr-img {
  display: block;
  max-width: 280px;
  height: auto;
}

.ekho-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ekho-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--ekho-surface);
  border-radius: var(--ekho-radius);
  border: 1px solid var(--ekho-border);
}

.ekho-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ekho-primary);
}

.ekho-stat-label {
  font-size: 0.8rem;
  color: var(--ekho-muted);
  line-height: 1.3;
}

/* Screen reader only */
.ekho-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Page Stats dédiée — sélecteur + panneau */
.ekho-stats-search-wrapper {
  position: relative;
  margin: 1rem 0;
}

.ekho-stats-search-input {
  width: 100%;
  min-height: var(--ekho-touch);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--ekho-border);
  border-radius: var(--ekho-radius);
  -webkit-appearance: none;
  appearance: none;
}

.ekho-stats-search-input:focus {
  outline: none;
  border-color: var(--ekho-focus);
  box-shadow: 0 0 0 2px rgba(61, 90, 128, 0.2);
}

.ekho-stats-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow-y: auto;
  margin-top: 0.25rem;
  background: var(--ekho-bg);
  border: 1px solid var(--ekho-border);
  border-radius: var(--ekho-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.ekho-stats-result-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--ekho-border);
  -webkit-tap-highlight-color: transparent;
}

.ekho-stats-result-item:last-of-type {
  border-bottom: none;
}

.ekho-stats-result-item {
  transition: background var(--ekho-transition);
}
.ekho-stats-result-item:hover,
.ekho-stats-result-item:focus {
  background: var(--ekho-outline-hover);
}

.ekho-stats-result-more {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--ekho-muted);
  background: var(--ekho-surface);
}

.ekho-stats-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--ekho-surface);
  border: 1px solid var(--ekho-border);
  border-radius: var(--ekho-radius);
}

.ekho-stats-selected-name {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ekho-primary);
}

.ekho-stats-merchant-name {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ekho-primary);
}

.ekho-stats-merchant-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.95rem;
}

.ekho-stats-arrow {
  color: var(--ekho-muted);
}

.ekho-stats-ratio {
  color: var(--ekho-muted);
  font-size: 0.9rem;
}

.ekho-stats-merchant-breakdown {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--ekho-muted);
}

.ekho-stats-breakdown-item {
  display: inline-block;
  margin-right: 1rem;
}

/* Modifications - page clients */
.ekho-modif-title {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
}

.ekho-modif-subtitle {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--ekho-muted);
}

.ekho-select-merchant {
  width: 100%;
  min-height: var(--ekho-touch);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ekho-text);
  background: var(--ekho-bg);
  border: 1px solid var(--ekho-border);
  border-radius: var(--ekho-radius);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6c7d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.ekho-select-merchant:focus {
  outline: none;
  border-color: var(--ekho-focus);
  box-shadow: 0 0 0 2px rgba(61, 90, 128, 0.2);
}

.ekho-config-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.ekho-admin-form fieldset {
  border: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.ekho-admin-form fieldset:first-of-type {
  margin-top: 0.5rem;
}

.ekho-admin-form legend {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ekho-text);
  margin-bottom: 0.35rem;
}

.ekho-admin-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ekho-text);
  background: var(--ekho-bg);
  border: 1px solid var(--ekho-border);
  border-radius: var(--ekho-radius);
  resize: vertical;
}

.ekho-admin-form textarea:focus {
  outline: none;
  border-color: var(--ekho-focus);
  box-shadow: 0 0 0 2px rgba(61, 90, 128, 0.2);
}

.ekho-success {
  background: rgba(46, 125, 50, 0.06);
  border: 1px solid var(--ekho-success);
  border-radius: var(--ekho-radius);
  padding: 0.9rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.ekho-success code {
  background: rgba(0, 0, 0, 0.04);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

/* Boutons outline : fond distinct au hover (--ekho-outline-hover), texte lisible */
.ekho-btn-outline {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  justify-content: center;
  min-height: var(--ekho-touch);
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--ekho-radius);
  border: 1px solid var(--ekho-border);
  background: transparent;
  color: var(--ekho-primary);
  text-decoration: none;
  transition: background var(--ekho-transition), border-color var(--ekho-transition), color var(--ekho-transition);
}

.ekho-btn-outline:focus {
  outline: none;
}
.ekho-btn-outline:hover,
.ekho-btn-outline:focus,
.ekho-btn-outline:focus-visible {
  background: var(--ekho-outline-hover);
  border-color: var(--ekho-outline-border-hover);
  color: var(--ekho-primary);
}
.ekho-btn-outline:focus-visible {
  outline: 2px solid var(--ekho-focus);
  outline-offset: 2px;
}

/* Combiné avec ekho-btn : annuler le fond sombre du primaire, garder style outline */
.ekho-btn.ekho-btn-outline {
  background: transparent;
  color: var(--ekho-primary);
  border: 1px solid var(--ekho-border);
}
.ekho-btn.ekho-btn-outline:hover,
.ekho-btn.ekho-btn-outline:focus,
.ekho-btn.ekho-btn-outline:focus-visible {
  background: var(--ekho-outline-hover);
  color: var(--ekho-primary);
  border-color: var(--ekho-outline-border-hover);
}

.ekho-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ekho-logo {
  display: inline-block;
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

/* Bloc commerce : logo + titre centrés (page inscription) */
.ekho-merchant-block {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ekho-merchant-logo {
  max-height: 96px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.75rem;
}

.ekho-merchant-block h1 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ekho-text);
  text-align: center;
}

.ekho-subtitle {
  margin: 0.5rem auto 0;
  max-width: 22rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ekho-muted);
}

/* Offre : bien visible pour inciter à s’inscrire */
.ekho-merchant-block .ekho-gift {
  margin: 1rem 0 0;
  padding: 1.125rem 1.25rem;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ekho-primary);
  text-align: center;
  background: linear-gradient(180deg, #eef2f7 0%, #e4eaf2 100%);
  border: 1px solid #a8bdd1;
  border-radius: var(--ekho-radius);
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.12), 0 1px 2px rgba(44, 62, 80, 0.06);
}

h1, h2 {
  font-weight: 600;
  color: var(--ekho-text);
  margin: 0 0 0.5rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; color: var(--ekho-muted); }

p {
  margin: 0 0 1rem;
  color: var(--ekho-muted);
}

.ekho-card {
  background: var(--ekho-surface);
  border: 1px solid var(--ekho-border);
  border-radius: var(--ekho-radius);
  padding: 1.25rem 1.1rem 1.35rem;
  margin-bottom: 1.5rem;
}

.ekho-card-title {
  text-align: center;
  margin-bottom: 1rem;
}

.ekho-success-spam-hint {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ekho-muted);
}

.ekho-form label {
  display: block;
  font-size: 0.9375rem;
  color: var(--ekho-muted);
  margin-top: 0.85rem;
  margin-bottom: 0.25rem;
}

.ekho-form label:first-of-type { margin-top: 0; }

.ekho-form input[type="text"],
.ekho-form input[type="email"],
.ekho-form input[type="date"],
.ekho-form input[type="tel"],
.ekho-form input.ekho-input-tel {
  width: 100%;
  min-height: var(--ekho-touch);
  padding: 0.75rem 1rem;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--ekho-text);
  background: var(--ekho-bg);
  border: 1px solid var(--ekho-border);
  border-radius: var(--ekho-radius);
  -webkit-appearance: none;
  appearance: none;
}

/* Téléphone : 16px pour lisibilité mobile et éviter zoom auto au focus */
.ekho-form input[type="tel"],
.ekho-form input.ekho-input-tel {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.ekho-form input:focus {
  outline: none;
  border-color: var(--ekho-focus);
  box-shadow: 0 0 0 2px rgba(61, 90, 128, 0.2);
}

.ekho-form input::placeholder {
  color: var(--ekho-muted);
  opacity: 0.8;
}

.ekho-form .ekho-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.ekho-form .ekho-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ekho-form .ekho-radio-group .ekho-checkbox {
  margin-top: 0;
}

.ekho-form .ekho-checkbox input {
  width: 1.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  accent-color: var(--ekho-focus);
}

.ekho-form .ekho-checkbox label {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ekho-muted);
}

.ekho-field-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--ekho-muted);
  line-height: 1.35;
}

.ekho-unsub-hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--ekho-muted);
  opacity: 0.9;
  text-align: right;
}

.ekho-legal-footer {
  margin: 1.25rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ekho-border, #eee);
  font-size: 0.7rem;
  color: var(--ekho-muted);
  line-height: 1.4;
  text-align: center;
}

.ekho-legal-footer p {
  margin: 0.25rem 0 0;
  font-style: normal;
}

.ekho-legal-footer p:first-child {
  margin-top: 0;
}

.ekho-legal-footer a {
  color: inherit;
  text-decoration: underline;
}

.ekho-legal-footer a:hover {
  opacity: 0.85;
}

.ekho-page-footer {
  max-width: 42rem;
  margin: 3rem auto 0;
  padding: 1.5rem clamp(1rem, 4vw, 2rem) 0;
  border-top: 1px solid var(--ekho-border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--ekho-muted);
}

.ekho-page-footer p {
  margin: 0.25rem 0;
}

.ekho-page-footer a {
  color: var(--ekho-primary);
  text-decoration: none;
  font-weight: 500;
}

.ekho-page-footer a:hover {
  text-decoration: underline;
}

.ekho-page-footer-copy {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  opacity: 0.85;
}

.ekho-required-hint {
  margin: 1rem 0 0.25rem;
  font-size: 0.8rem;
  color: var(--ekho-muted);
}

.ekho-btn {
  display: inline-block;
  width: 100%;
  min-height: var(--ekho-touch);
  margin-top: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--ekho-primary);
  border: none;
  border-radius: var(--ekho-radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--ekho-transition), opacity var(--ekho-transition);
}

.ekho-btn:hover,
.ekho-btn:focus {
  background: var(--ekho-focus);
}

.ekho-btn:active {
  opacity: 0.9;
}

.ekho-form-submit-wrap {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.ekho-btn-sm {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.ekho-btn-preview {
  min-width: 8rem;
}

.ekho-btn-preview,
.ekho-btn-preview:hover,
.ekho-btn-preview:focus,
.ekho-btn-preview:active {
  color: var(--ekho-text) !important;
}

/* Aperçu = outline : fond hover distinct, texte lisible */
.ekho-btn-preview:hover,
.ekho-btn-preview:focus {
  background: var(--ekho-outline-hover) !important;
  border-color: var(--ekho-outline-border-hover);
}

.ekho-btn-preview[aria-busy="true"] {
  opacity: 0.8;
}

.ekho-card-templates {
  margin-top: 2rem;
}

.ekho-template-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ekho-border);
}

.ekho-template-block:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.ekho-template-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
}

.ekho-template-vars {
  margin: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--ekho-muted);
}

.ekho-template-vars code {
  font-size: 0.8em;
  background: var(--ekho-surface);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.ekho-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15em 0.5em;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
}

.ekho-badge-active {
  background: rgba(34, 139, 34, 0.15);
  color: #228b22;
}

.ekho-badge-inactive {
  background: rgba(128, 128, 128, 0.15);
  color: #666;
}

.ekho-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ekho-preview-block {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--ekho-surface);
  border: 1px solid var(--ekho-border);
  border-radius: var(--ekho-radius);
}

.ekho-preview-title {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.ekho-preview-subject-line {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--ekho-muted);
}

.ekho-preview-frame-wrap {
  border: 1px solid var(--ekho-border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.ekho-preview-iframe {
  display: block;
  width: 100%;
  min-height: 400px;
  height: 500px;
  border: none;
}

.ekho-errors {
  background: rgba(198, 40, 40, 0.08);
  border: 1px solid var(--ekho-error);
  border-radius: var(--ekho-radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.ekho-errors ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ekho-error);
  font-size: 0.9375rem;
}

.ekho-demo-message {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--ekho-warning-soft);
  border: 1px solid var(--ekho-warning);
  border-radius: var(--ekho-radius);
  text-align: center;
}

.ekho-demo-message p {
  margin: 0 0 0.75rem;
  color: var(--ekho-text);
  font-size: 0.95rem;
}

.ekho-demo-message .ekho-btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.ekho-success-msg {
  color: var(--ekho-success);
}

.ekho-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ekho-small {
  font-size: 0.875rem;
  color: var(--ekho-muted);
  margin-top: 1rem;
}

.ekho-stack {
  font-size: 0.75rem;
  overflow: auto;
  max-height: 12rem;
  padding: 0.75rem;
  background: var(--ekho-surface);
  border-radius: var(--ekho-radius);
  color: var(--ekho-muted);
}

@media (min-width: 480px) {
  .ekho-btn { width: auto; min-width: 10rem; }
}

@media (max-width: 380px) {
  .ekho-admin-title {
    font-size: 1.15rem;
  }

  .ekho-admin-user {
    font-size: 0.75rem;
  }
}

@media (min-width: 768px) {
  .ekho-admin-header {
    margin-bottom: 1.5rem;
  }

  .ekho-admin-header-top {
    gap: 1.5rem;
  }

  .ekho-admin-title {
    font-size: 1.5rem;
  }

  .ekho-admin-main {
    margin-top: 1.5rem;
  }
}

/* Standalone PWA (évite double barre de statut) */
@media (display-mode: standalone) {
  .ekho-page {
    padding-top: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-top));
  }
}
