/* ========================================
   FairPrint - Styles globaux
   Theme: Blanc & Vert
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  /* Palette verte */
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  /* Palette neutre */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Couleurs semantiques */
  --primary: var(--green-600);
  --primary-hover: var(--green-700);
  --primary-light: var(--green-50);
  --primary-accent: var(--green-100);
  --background: var(--white);
  --surface: var(--gray-50);
  --text: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --border: var(--gray-200);
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --card-bg: var(--white);
  --success: #16a34a;
  --warning: #d97706;

  /* Header */
  --header-height: 72px;

  /* Typographie */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;
}

/* Dark mode */
html.dark-mode {
  --background: #0f1419;
  --surface: #1a1f26;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border: #30363d;
  --gray-50: #161b22;
  --gray-100: #21262d;
  --gray-200: #30363d;
  --gray-300: #484f58;
  --gray-400: #6e7681;
  --gray-500: #8b949e;
  --gray-600: #8b949e;
  --gray-700: #c9d1d9;
  --gray-800: #e6edf3;
  --gray-900: #e6edf3;
  --white: #161b22;
  --primary-light: rgba(34, 197, 94, 0.15);
  --primary-accent: rgba(34, 197, 94, 0.25);
  --card-bg: #161b22;
  --success: #22c55e;
  --warning: #f59e0b;
}

/* ========== Reset ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ========== Typographie ========== */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

.font-serif {
  font-family: var(--font-serif);
}

/* ========== Layout ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 480px;
}

.container-md {
  max-width: 768px;
}

.container-lg {
  max-width: 1024px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

/* ========== Header / Navigation ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 32px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  z-index: 1000;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.header-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--gray-50);
  font-size: 0.875rem;
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

.header-search input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.header-search input::placeholder {
  color: var(--gray-400);
}

.header-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.875rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 1.1rem;
}

.header-actions a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* Menu hamburger mobile */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  font-size: 1.3rem;
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 999;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.mobile-nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ========== Boutons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

.btn-full {
  width: 100%;
}

.btn i {
  font-size: 0.875em;
}

/* ========== Cards Artwork ========== */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) {
  .artwork-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .artwork-grid { grid-template-columns: repeat(2, 1fr); }
}

.artwork-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  transition: var(--transition-slow);
  cursor: pointer;
}

.artwork-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.artwork-card-image {
  position: relative;
  width: 100%;
  padding-top: 141.4%; /* A-ratio portrait (√2 : 1) */
  overflow: hidden;
  background: var(--gray-100);
}

.artwork-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.artwork-card:hover .artwork-card-image img {
  transform: scale(1.05);
}

.artwork-card-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transition: var(--transition);
}

.artwork-card:hover .artwork-card-overlay {
  opacity: 1;
}

.artwork-card-overlay button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 0.875rem;
}

.artwork-card-overlay button:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.artwork-card-body {
  padding: 16px;
}

.artwork-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artwork-card-artist {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.artwork-card-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.artwork-card-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ========== Tags / Badges ========== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--text-secondary);
  transition: var(--transition);
}

.tag:hover {
  background: var(--primary-accent);
  color: var(--primary);
}

.tag.active {
  background: var(--primary);
  color: var(--white);
}

/* ========== Hero Section ========== */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-50) 0%, var(--white) 50%, var(--green-50) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-100) 0%, transparent 70%);
  opacity: 0.5;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-100) 0%, transparent 70%);
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--primary-accent);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 .highlight {
  color: var(--primary);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========== Section Headings ========== */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ========== Features / How it works ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius-xl);
  background: var(--white);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--primary-accent);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== Categories ========== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.category-card {
  position: relative;
  height: 160px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-slow);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.category-card .overlay span {
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
}

/* ========== CTA Section ========== */
.cta-section {
  background: var(--green-800);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  color: var(--white);
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 1.1rem;
  color: var(--green-200);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-primary {
  background: var(--white);
  color: var(--green-800);
}

.cta-section .btn-primary:hover {
  background: var(--green-100);
}

/* ========== Footer ========== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--gray-700);
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand .logo span {
  color: var(--white);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--gray-400);
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--green-400);
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-socials a:hover {
  background: var(--primary);
  color: var(--white);
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ========== Formulaires ========== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.9375rem;
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

select.form-input {
  cursor: pointer;
  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='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-error {
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 4px;
}

/* ========== Auth Pages ========== */
.auth-page {
  min-height: calc(100vh - var(--header-height) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .logo {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.auth-header h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: var(--green-50);
  color: var(--green-800);
  border: 1px solid var(--green-200);
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-dismissible {
  position: relative;
  padding-right: 40px;
  animation: alertSlideIn 0.3s ease;
}

@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes alertFadeOut {
  from { opacity: 1; max-height: 100px; margin-bottom: 16px; }
  to { opacity: 0; max-height: 0; margin-bottom: 0; padding: 0; overflow: hidden; }
}

/* ========== Profile Page ========== */
.profile-layout {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.profile-sidebar {
  width: 260px;
  flex-shrink: 0;
}

.profile-sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--primary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
}

.profile-name {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-role {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.profile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.profile-nav a:hover {
  background: var(--gray-50);
  color: var(--text);
}

.profile-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.profile-nav a i {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
}

.profile-content {
  flex: 1;
  min-width: 0;
}

.profile-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
}

.profile-section h2 {
  font-size: 1.25rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.info-item label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-item span {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

/* ========== Sidebar (alternate class names) ========== */
.sidebar-sticky-wrap {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
}

.sidebar-profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.sidebar-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
}

.sidebar-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--primary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 2rem;
  color: var(--primary);
}

.sidebar-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.sidebar-role {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-nav a:hover {
  background: var(--gray-50);
  color: var(--text);
}

.sidebar-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-nav a i {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.sidebar-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 14px;
  margin-bottom: 4px;
  font-weight: 600;
}

.sidebar-logout {
  color: var(--danger) !important;
}

/* ========== Profile info grid (alternate class names) ========== */
.profile-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.info-item {
  min-width: 0;
}

.info-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.profile-bio-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.profile-bio-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-bio-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== Browse / Parcourir ========== */
.browse-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.browse-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 20px;
}

.browse-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.browse-search {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.browse-search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  background: var(--white);
  outline: none;
  transition: var(--transition);
}

.browse-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.browse-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.875rem;
}

.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tag:hover {
  background: var(--primary-accent);
  color: var(--primary);
}

.filter-tag.active {
  background: var(--primary);
  color: var(--white);
}

.browse-sort {
  margin-left: auto;
}

.browse-sort select {
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--white);
  cursor: pointer;
  outline: 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='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.browse-results-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ========== Artwork Detail ========== */
.artwork-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 40px 0;
}

.artwork-detail-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--gray-100);
}

.artwork-detail-image img {
  width: 100%;
  height: auto;
  display: block;
}

.artwork-detail-info h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 8px;
}

.artwork-detail-artist {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.artwork-detail-artist .artist-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.75rem;
}

.artwork-detail-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}

.artwork-detail-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.artwork-detail-price small {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.format-selector {
  margin-bottom: 24px;
}

.format-selector h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.format-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.format-option {
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
  color: var(--text);
}

.format-option:hover {
  border-color: var(--primary);
}

.format-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.artwork-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

/* ========== Pagination ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 48px;
}

.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--gray-100);
  color: var(--text);
}

.pagination .active {
  background: var(--primary);
  color: var(--white);
}

/* ========== Empty States ========== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state i {
  font-size: 3rem;
  color: var(--gray-300);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 24px;
}

/* ========== Utilities ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-white { color: var(--white); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .artwork-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .profile-layout {
    flex-direction: column;
  }

  .profile-sidebar {
    width: 100%;
  }

  .profile-sidebar-card,
  .sidebar-profile-card {
    position: static;
  }

  .sidebar-sticky-wrap {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .info-grid,
  .profile-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    padding: 48px 0;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .nav-links {
    display: none;
  }

  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .artwork-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .browse-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .browse-search {
    max-width: 100%;
  }

  .browse-sort {
    margin-left: 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px;
  }

  .hero h1 {
    font-size: 1.875rem;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-layout {
    grid-template-columns: 1fr !important;
  }
}

/* ========== Status Badges ========== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.status-pending, .status-en_attente {
  background: #fef3c7;
  color: #92400e;
}

.status-approved, .status-livree {
  background: var(--green-100);
  color: var(--green-800);
}

.status-rejected, .status-annulee {
  background: #fef2f2;
  color: #991b1b;
}

.status-prise_en_compte, .status-impression_realisee {
  background: #dbeafe;
  color: #1e40af;
}

.status-expediee {
  background: #ede9fe;
  color: #5b21b6;
}

.status-deletion_requested {
  background: #fff7ed;
  color: #c2410c;
}

/* ========== Accessibility ========== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.3);
}

/* ========== Stat Cards ========== */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-accent);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========== Loading / Skeleton ========== */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== Tooltips ========== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--gray-800);
  color: white;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: 10;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ========== Smooth scroll target highlighting ========== */
:target {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

/* ========== Better mobile cart ========== */
@media (max-width: 768px) {
  .cart-layout {
    grid-template-columns: 1fr !important;
  }
  
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
}

/* ========== Quantity selector (cart) ========== */
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  min-width: 130px;
}

.qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
  font-size: 0.8rem;
  transition: var(--transition);
}

.qty-btn:hover:not(:disabled) {
  background: var(--primary-light);
  color: var(--primary);
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.qty-value {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  min-width: 40px;
  user-select: none;
}

.qty-form {
  display: flex;
  align-items: center;
}
