/* Palette de couleurs basée sur le logo maPtiteListe.com */
:root {
  --background: oklch(0.99 0.005 100); /* Blanc cassé */
  --foreground: oklch(0.35 0.01 330);  /* Gris foncé/mauve */
  --card: oklch(1 0 0);                 /* Blanc pur */
  --card-foreground: oklch(0.35 0.01 330);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.35 0.01 330);

  /* Couleurs primaires du logo */
  --primary: oklch(0.75 0.12 25);     /* Rose Corail */
  --primary-foreground: oklch(1 0 0);  /* Blanc */
  --secondary: oklch(0.93 0.04 305);   /* Lavande clair */
  --secondary-foreground: oklch(0.57 0.07 330); /* Mauve foncé */
  --accent: oklch(0.77 0.09 305);      /* Lavande */
  --accent-foreground: oklch(1 0 0);   /* Blanc */
  
  --muted: oklch(0.96 0.02 305);
  --muted-foreground: oklch(0.57 0.07 330);
  
  --destructive: oklch(0.65 0.2 15);
  --destructive-foreground: oklch(1 0 0);

  --border: oklch(0.93 0.01 305);
  --input: oklch(0.93 0.01 305);
  --ring: oklch(0.75 0.12 25 / 0.6); /* Rose Corail avec transparence */
  
  --radius: 0.75rem; /* Bords légèrement plus arrondis */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Thème Sombre */
.dark {
  --background: oklch(0.15 0.02 300); /* Violet très sombre */
  --foreground: oklch(0.95 0.01 300); /* Lavande très clair */
  --card: oklch(0.18 0.02 300);
  --card-foreground: oklch(0.95 0.01 300);
  --popover: oklch(0.18 0.02 300);
  --popover-foreground: oklch(0.95 0.01 300);

  --primary: oklch(0.75 0.12 25);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.3 0.04 305);
  --secondary-foreground: oklch(0.95 0.01 300);
  --accent: oklch(0.77 0.09 305);
  --accent-foreground: oklch(0.15 0.02 300);
  
  --muted: oklch(0.3 0.04 305);
  --muted-foreground: oklch(0.8 0.02 300);
  
  --destructive: oklch(0.65 0.2 15);
  --destructive-foreground: oklch(1 0 0);

  --border: oklch(0.25 0.03 300);
  --input: oklch(0.25 0.03 300);
  --ring: oklch(0.75 0.12 25 / 0.5);
}

* {
  box-sizing: border-box;
}

body {
  /* Police plus moderne, en accord avec le logo */
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background: var(--card / 0.8); /* Fond avec transparence */
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

/* Application du dégradé du logo sur le nom de la marque */
.brand a {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  text-decoration: none;
}

.brand a:hover {
  opacity: 0.8;
}

/* Logo */
.logo {
  height: auto;
  width: auto;
  max-height: 2.5rem;
  max-width: 200px;
  transition: all 0.2s ease;
  object-fit: contain;
}

.brand a:hover .logo {
  transform: scale(1.05);
}

/* Interrupteur de thème */
.theme-toggle {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--accent);
  color: var(--accent-foreground);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  transition: transform 0.3s ease;
  display: block;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(15deg);
}

/* --- Le reste du CSS reste inchangé --- */

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-toggle:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.dropdown-toggle::after {
  content: '▼';
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  overflow: hidden;
  z-index: 50;
}

.dropdown-menu[aria-hidden="false"] {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--popover-foreground);
  transition: background-color 0.2s ease;
  border-bottom: 1px solid var(--border);
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.btn {
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 0.875rem;
  width: auto;
  justify-content: center;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Bouton principal avec dégradé */
.btn-gradient {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: var(--primary-foreground);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.btn-destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.btn-destructive:hover {
  opacity: 0.9;
}

.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--card-foreground);
}

.card-content {
  margin-bottom: 1rem;
}

.card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  text-align: center;
}

form div {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--ring);
}

.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-danger {
  background: var(--destructive / 0.2);
  color: var(--destructive);
  border-color: var(--destructive / 0.5);
}

.alert-success {
  background: var(--accent / 0.1);
  color: var(--accent-foreground);
  border-color: var(--accent / 0.3);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-6 { margin-top: 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--muted-foreground); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-lg { max-width: 32rem; }
.mt-8 { margin-top: 2rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: calc(var(--radius) + 0.25rem); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.transition { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 200ms; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:shadow-lg:hover { box-shadow: var(--shadow-lg); }
.hover\:underline:hover { text-decoration: underline; }
.text-primary { color: var(--primary); }
.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.space-y-4 > * + * { margin-top: 1rem; }
.cursor-move { cursor: move; }
.drag-handle { cursor: grab; user-select: none; }
.drag-handle:active { cursor: grabbing; }
.h-80 { height: 20rem; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.overflow-hidden { overflow: hidden; }

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Améliorations pour mobile */
@media (max-width: 768px) {
  .container {
    padding: 0 0.75rem;
  }
  
  nav {
    padding: 0.75rem;
  }
  
  .brand {
    font-size: 1.25rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .grid {
    gap: 0.75rem;
  }
}

/* Footer moderne et attrayant */
.footer {
  background: linear-gradient(135deg, var(--muted) 0%, var(--secondary) 100%);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.footer-content {
  padding: 3rem 0 1.5rem;
}

.footer-main {
  margin-bottom: 2rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.footer-section h4 {
  color: var(--foreground);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  position: relative;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-section li:not(:has(a)) {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.footer-copyright {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.footer-made-with {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  font-weight: 500;
}

/* Responsive footer */
@media (max-width: 1024px) {
  .footer-links {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .footer-content {
    padding: 2rem 0 1rem;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 400px;
  }
  
  .footer-copyright {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .footer-content {
    padding: 1.5rem 0 1rem;
  }
  
  .footer-section h4 {
    font-size: 1rem;
  }
  
  .footer-section a,
  .footer-section li:not(:has(a)) {
    font-size: 0.85rem;
  }
}

/* Styles supplémentaires pour mobile */
@media (max-width: 768px) {
  .text-sm { font-size: 0.95rem; }
  .text-lg { font-size: 1.25rem; }
  .text-xl { font-size: 1.5rem; }
  .text-2xl { font-size: 1.75rem; }
  .text-3xl { font-size: 2.25rem; }
  
  /* Titres plus lisibles */
  h1, .text-3xl { font-size: 2rem; font-weight: 700; }
  h2, .text-2xl { font-size: 1.5rem; font-weight: 600; }
  h3, .text-xl { font-size: 1.25rem; font-weight: 600; }
  
  /* Grille responsive */
  .grid-cols-2, .grid-cols-3, .grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
  }
  
  /* Navigation mobile */
  nav {
    flex-direction: row;
    gap: 1rem;
    padding: 1rem;
  }
  
  .brand {
    font-size: 1.25rem;
  }
  
  .dropdown-menu {
    right: auto;
    left: 0;
    min-width: 200px;
    font-size: 1rem;
  }
  
  .logo {
    max-height: 2.5rem;
    max-width: 180px;
  }
  
  /* Cartes plus grandes et lisibles */
  .card {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
  }
  
  /* Boutons plus grands pour mobile */
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    min-height: 44px; /* Taille minimale recommandée pour mobile */
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .btn-sm {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    min-height: 40px;
  }
  
  /* Formulaires plus lisibles */
  input, textarea, select {
    padding: 1rem;
    font-size: 1rem;
    min-height: 44px;
    border-radius: 0.5rem;
  }
  
  label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
  }
  
  /* Espacements optimisés */
  .mb-4 { margin-bottom: 1.25rem; }
  .mb-6 { margin-bottom: 1.75rem; }
  .mt-6 { margin-top: 1.75rem; }
  .gap-2 { gap: 0.75rem; }
  .gap-3 { gap: 1rem; }
  .gap-4 { gap: 1.25rem; }
  
  /* Cartes d'articles optimisées */
  .card-footer {
    padding-top: 1.25rem;
    gap: 0.75rem;
    flex-direction: column;
  }
  
  .card-footer .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Prix plus visible */
  .card-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
  }
  
  /* Images d'articles */
  .card-image {
    height: 12rem !important;
    margin-bottom: 1rem;
  }
  
  /* Description plus lisible */
  .card-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  /* Liens plus accessibles */
  .card-link a {
    font-size: 1rem;
    padding: 0.5rem 0;
    display: inline-block;
  }
}

/* Améliorations pour très petits écrans */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .btn {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
  }
  
  input, textarea, select {
    padding: 1.125rem;
    font-size: 1.1rem;
  }
  
  .text-3xl { font-size: 1.75rem; }
  .text-2xl { font-size: 1.5rem; }
  .text-xl { font-size: 1.25rem; }
}

/* Aperçu d'image */
.image-preview-container {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
  text-align: center;
}

.preview-image {
  max-width: 200px;
  max-height: 150px;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.preview-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* Animation de chargement pour l'image */
.image-loading {
  opacity: 0.5;
  filter: blur(2px);
}

.image-error {
  border: 2px solid var(--destructive);
  background: var(--destructive / 0.1);
}

/* Suppression de la duplication de prefers-color-scheme car la classe .dark est utilisée */

/* Style pour les liens dans le contenu qui doivent ressembler aux liens du footer */
.footer-link-style {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link-style:hover {
  color: var(--primary);
  transform: translateX(4px);
}