:root {
  --bg-page: #faf4f9;
  --bg-panel: #ffffff;
  --bg-muted: #f3e6f2;
  --border: #e2cfe2;
  --text-primary: #2f1a35;
  --text-secondary: #756285;
  --accent: #ee7aae;
  --accent-alt: #702261;
  --accent-soft: #b563a4;
  --deep: #3f277c;
  --secondary-deep: #5f508f;
  --success: #4bb482;
  --error: #d14372;
  --shadow: 0 18px 40px rgba(112, 34, 97, 0.15);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --transition: all 0.24s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  color: var(--accent-alt);
  min-height: 40px;
  text-decoration: none;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(238, 122, 174, 0.35);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(112, 34, 97, 0.35);
}

.btn.ghost {
  border-color: var(--accent-soft);
  background: rgba(238, 122, 174, 0.08);
  color: var(--accent-alt);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(238, 122, 174, 0.15);
}

.btn.btn-danger {
  border-color: var(--error);
  background: rgba(209, 67, 114, 0.08);
  color: var(--error);
}

.btn.btn-danger:hover {
  border-color: var(--error);
  color: #fff;
  background: var(--error);
}

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

.flash-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.flash {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: var(--shadow);
  animation: fadeIn 0.3s ease;
}

.flash.success {
  border-color: rgba(112, 34, 97, 0.28);
}

.flash.error {
  border-color: rgba(209, 67, 114, 0.35);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.public-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  background: linear-gradient(90deg, rgba(112, 34, 97, 0.18), rgba(63, 39, 124, 0.18));
}

.public-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-alt);
}

.public-header__brand span {
  display: inline-block;
  max-width: 220px;
}

.brand-logo {
  width: 140px;
  height: auto;
}

.sidebar .brand-logo {
  width: 160px;
}

.public-header__nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.public-header__nav a {
  color: var(--accent-alt);
  font-weight: 600;
}

.public-main {
  flex: 1;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: center;
}

.hero__text h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--accent-alt);
}

.hero__text p {
  color: var(--text-secondary);
  max-width: 480px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}

.hero__features {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
}

.hero__features li::before {
  content: '\2713';
  margin-right: 8px;
  color: var(--accent);
}

.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-illustration {
  position: relative;
  padding: 32px;
  background: linear-gradient(145deg, rgba(112, 34, 97, 0.2), rgba(63, 39, 124, 0.25));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.illustration__device {
  width: 240px;
  height: 440px;
  border-radius: 32px;
  background: var(--deep);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.device__screen {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: #fff;
  padding: 24px 20px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.screen__qr {
  width: 100%;
  background: repeating-linear-gradient(135deg, rgba(112, 34, 97, 0.9), rgba(112, 34, 97, 0.9) 6px, rgba(238, 122, 174, 0.9) 6px, rgba(238, 122, 174, 0.9) 12px);
  border-radius: 18px;
}

.screen__text {
  display: grid;
  gap: 8px;
}

.screen__text span {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.15);
}

.screen__text span:nth-child(1) {
  width: 80%;
}

.screen__text span:nth-child(2) {
  width: 60%;
}

.screen__text span:nth-child(3) {
  width: 90%;
}

.hero__card {
  position: absolute;
  bottom: -30px;
  right: -10px;
  background: linear-gradient(120deg, rgba(238, 122, 174, 0.9), rgba(63, 39, 124, 0.9));
  padding: 18px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  }

.hero__card p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.hero__card strong {
  display: block;
  font-size: 1.1rem;
  color: #fff;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.auth-grid__intro h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
  color: var(--accent-alt);
}

.auth-grid__intro p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.auth-grid__intro ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
}

.auth-grid__card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(238, 122, 174, 0.08));
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.auth-grid__card h2 {
  margin-top: 0;
}

.auth-switch {
  margin-top: 24px;
  color: var(--text-secondary);
}

.form {
  display: grid;
  gap: 18px;
}

.form label {
  font-weight: 600;
  font-size: 0.95rem;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="url"],
.form select,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  font-size: 1rem;
  transition: var(--transition);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(238, 122, 174, 0.15);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(238, 122, 174, 0.25);
}

.btn:focus:not(:focus-visible) {
  box-shadow: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(238, 122, 174, 0.25);
}

.hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: -10px;
}

.app-shell {
  min-height: 100vh;
}

.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--deep), var(--secondary-deep));
  color: rgba(255, 255, 255, 0.95);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar__brand .brand-mark {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}

.sidebar__brand {
  display: grid;
  gap: 12px;
}

.sidebar__brand p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.nav-item .icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(238, 122, 174, 0.25);
  color: #fff;
}

.nav-item.muted {
  opacity: 0.6;
  cursor: not-allowed;
}

.sidebar__footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar__footer .logout {
  color: rgba(255, 255, 255, 0.9);
}

.sidebar__footer .logout:hover {
  color: #fff;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  gap: 20px;
}

.topbar__right {
  display: flex;
  gap: 12px;
}

.subtitle {
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.main-content {
  flex: 1;
  padding: 0 32px 48px;
}

.panel-section {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.section-header h2 {
  margin: 0;
}

.section-header p {
  margin: 4px 0 0;
  color: var(--text-secondary);
}

.filters {
  display: flex;
  gap: 12px;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.chip.active,
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qr-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
}

.qr-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: rgba(112, 34, 97, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(112, 34, 97, 0.1);
  transition: var(--transition);
  height: fit-content;
  min-height: 280px;
}

.qr-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  background: rgba(238, 122, 174, 0.12);
}

.qr-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  min-height: 60px;
}

.qr-card__header > div {
  flex: 1;
  min-width: 0;
}

.qr-card__header h3 {
  margin: 0;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  flex: 1;
  min-width: 0;
}

.qr-card__link {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--accent-alt);
  font-weight: 500;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.4;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.qr-card__content {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex: 1;
}

.qr-card__preview {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
  flex-shrink: 0;
}

.qr-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-card__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}

.qr-card__target {
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.4;
}

.qr-card__target a {
  color: var(--accent-alt);
  text-decoration: none;
  transition: var(--transition);
}

.qr-card__target a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.qr-card__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
}

.qr-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(112, 34, 97, 0.08);
}

.empty-state {
  text-align: center;
  padding: 64px 32px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  display: grid;
  gap: 20px;
  justify-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.empty-state__illustration {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  background: repeating-linear-gradient(45deg, rgba(46, 91, 255, 0.15), rgba(46, 91, 255, 0.15) 10px, rgba(17, 24, 39, 0.05) 10px, rgba(17, 24, 39, 0.05) 20px);
  border-radius: 50%;
}

.analytics-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-items: start;
}

.analytics-card {
  background: rgba(112, 34, 97, 0.05);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: inset 0 0 0 1px rgba(112, 34, 97, 0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-box {
  position: relative;
  width: 100%;
  height: 320px;
}

#traffic-chart, #world-map, #timezone-chart {
  width: 100%;
  height: 100%;
  display: block;
}

/* Filtres dynamiques */
.filters-container {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 14px;
  min-width: 120px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(238, 122, 174, 0.2);
}

/* Top QR codes */
.qr-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.qr-item:last-child {
  border-bottom: none;
}

.qr-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qr-title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

.qr-scans {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Alertes */
.alert-banner {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.alert-banner.warning {
  background: linear-gradient(135deg, #ffa726, #ff9800);
}

.alert-banner.info {
  background: linear-gradient(135deg, #42a5f5, #2196f3);
}

.alert-banner.success {
  background: linear-gradient(135deg, #66bb6a, #4caf50);
}

/* Responsive */
@media (max-width: 768px) {
  .filters-container {
    flex-direction: column;
    gap: 12px;
  }
  
  .filter-select {
    min-width: 100%;
  }
}

.analytics-card.large {
  grid-column: 1 / -1;
  background: #fff;
  box-shadow: var(--shadow);
}

.analytics-card h3 {
  margin: 0;
}

.region-map,
#traffic-chart {
  min-height: 280px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.list.list--compact {
  gap: 8px;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(238, 122, 174, 0.16);
  color: var(--accent-alt);
  font-weight: 600;
  font-size: 0.8rem;
}

.scan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.scan-list li {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
}

.scan-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

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

.form-section {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.form-card,
.preview-card,
.overview-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(181, 99, 164, 0.12));
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.preview-card__body {
  display: grid;
  gap: 18px;
  color: var(--text-secondary);
}

.video-preview {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(112, 34, 97, 0.08);
  border: 1px solid rgba(112, 34, 97, 0.18);
  align-items: center;
  transition: var(--transition);
}

.video-preview__thumb {
  width: 160px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(112, 34, 97, 0.35), rgba(238, 122, 174, 0.35));
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(63, 39, 124, 0.12);
}

.video-preview__meta {
  display: grid;
  gap: 6px;
}

.video-preview__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-alt);
}

.video-preview__title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.video-preview__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.video-preview--loaded {
  background: rgba(238, 122, 174, 0.12);
  border-color: rgba(238, 122, 174, 0.35);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(112, 34, 97, 0.1);
  color: var(--accent-alt);
  font-weight: 600;
  font-size: 0.85rem;
}

.qr-detail {
  display: grid;
  gap: 32px;
  grid-template-columns: 2fr 1fr;
}

.qr-detail__main {
  display: grid;
  gap: 24px;
}

.overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
}

.overview-card__preview {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.05);
}

.overview-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.overview-card__info {
  display: grid;
  gap: 12px;
}

.overview-card__info .slug {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.permalink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(112, 34, 97, 0.06);
  border: 1px solid rgba(112, 34, 97, 0.12);
}

.permalink__body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.permalink__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-alt);
}

.permalink__url {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.permalink__meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.permalink__copy.success {
  background: rgba(0, 168, 120, 0.15);
  border-color: rgba(0, 168, 120, 0.4);
  color: #0c704f;
}

.permalink__copy,
.qr-card__copy {
  white-space: nowrap;
  flex-shrink: 0;
}

.permalink__copy.error,
.qr-card__copy.error {
  background: rgba(209, 67, 114, 0.15);
  border-color: rgba(209, 67, 114, 0.4);
  color: var(--error);
}

.qr-card__copy.success {
  background: rgba(0, 168, 120, 0.15);
  border-color: rgba(0, 168, 120, 0.4);
  color: #0c704f;
}

.overview-card__stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.overview-card__stats span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.download-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.qr-detail__analytics {
  display: grid;
  gap: 24px;
}

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    padding: 24px;
  }

  .main-content {
    padding: 0 24px 32px;
  }

  .qr-detail {
    grid-template-columns: 1fr;
  }

  .analytics-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .qr-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .qr-card {
    min-height: auto;
  }

  .qr-card__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .qr-card__preview {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 768px) {
  .public-main {
    padding: 32px 20px;
  }

  .panel-section {
    padding: 24px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__actions {
    flex-direction: column;
  }

  .analytics-card.large {
    grid-column: span 1;
  }

  .video-preview {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .video-preview__thumb {
    width: 100%;
  }

  .permalink {
    flex-direction: column;
    align-items: flex-start;
  }

  .permalink__copy {
    width: 100%;
    justify-content: center;
  }

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

  .qr-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: auto;
  }

  .qr-card__actions {
    justify-content: space-between;
  }

  .form-section {
    grid-template-columns: 1fr;
  }

  .auth-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero__text h1 {
    font-size: 2.2rem;
  }

  .overview-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }

  .overview-card__preview {
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }

  .download-group {
    flex-direction: column;
    gap: 8px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .topbar__right {
    align-self: stretch;
    justify-content: flex-end;
  }
}

/* Breakpoint pour très petits écrans */
@media (max-width: 480px) {
  .public-header {
    padding: 16px 20px;
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .public-header__nav {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .main-content {
    padding: 0 16px 24px;
  }

  .panel-section {
    padding: 16px;
    margin-bottom: 20px;
  }

  .qr-card {
    padding: 16px;
    gap: 12px;
  }

  .qr-card__actions {
    flex-direction: column;
    gap: 8px;
  }

  .qr-card__actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero__text h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  .hero__actions {
    gap: 12px;
  }

  .hero__actions .btn {
    width: 100%;
    text-align: center;
  }

  .form {
    gap: 16px;
  }

  .form input,
  .form select,
  .form textarea {
    font-size: 16px; /* Évite le zoom sur iOS */
  }

  .btn {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 44px; /* Taille recommandée pour le tactile */
  }

  .filters {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .chip {
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .auth-grid__card {
    padding: 20px;
  }

  .analytics-card {
    padding: 16px;
  }

  .empty-state {
    padding: 32px 16px;
  }

  /* Tables responsive */
  .list {
    gap: 8px;
  }

  .list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .badge {
    align-self: flex-end;
  }

  /* Amélioration des formulaires */
  .video-preview {
    padding: 12px;
    gap: 12px;
  }

  .video-preview__thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }

  .permalink {
    padding: 12px;
  }

  .permalink__url {
    font-size: 0.85rem;
    word-break: break-all;
  }
}

/* Breakpoint pour écrans très larges */
@media (min-width: 1400px) {
  .hero,
  .auth-grid {
    max-width: 1200px;
  }

  .main-content {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Profile Page Styles */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.profile-section {
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.profile-section h2 {
  margin: 0 0 20px 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.info-item span {
  color: var(--text-primary);
  font-size: 1rem;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.password-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.password-form label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.password-form input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--bg-panel);
}

.password-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(238, 122, 174, 0.1);
}

.password-form small {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 4px;
}

.account-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-actions p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9rem;
}

.btn.secondary {
  background: var(--bg-muted);
  color: var(--text-primary);
  border: 1px solid var(--border);
  align-self: flex-start;
}

.btn.secondary:hover {
  background: var(--border);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .profile-container {
    padding: 16px;
  }
  
  .profile-section {
    padding: 20px;
  }
}
