:root {
  /* Couleurs principales */
  --primary-green: #4caf50;
  --primary-green-dark: #2e7d32;
  --primary-green-light: #81c784;

  /* Couleurs des légumes */
  --carrot-orange: #ff6b35;
  --eggplant-purple: #8e24aa;
  --corn-yellow: #ffc107;
  --tomato-red: #f44336;

  /* Couleurs neutres */
  --black: #1b1b1b;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray-medium: #e0e0e0;

  /* Variations pour l'interface */
  --background: #f8f9fa;
  --text-primary: #1b1b1b;
  --text-secondary: #666666;
  --border: #e0e0e0;

  /* États interactifs */
  --hover-green: #45a049;
  --focus-green: #388e3c;
}

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--primary-green-dark) 100%
  );
  min-height: 100vh;
  padding: 20px;
  color: var(--text-primary);
}

/* Header Hero */
.hero-section {
  text-align: center;
  padding: 60px 20px;
  margin-bottom: 40px;
  background: linear-gradient(
    135deg,
    rgba(76, 175, 80, 0.9),
    rgba(46, 125, 50, 0.9)
  );
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInDown 0.8s ease-out;
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.farm-logo {
  width: 320px;
  height: 320px;
  object-fit: contain;
  border-radius: 50%;
  padding: 10px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.farm-logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.hero-text {
  text-align: left;
  flex: 1;
  min-width: 300px;
}

.hero-section h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  font-weight: 300;
  margin: 0 0 20px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.certifications {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-wrap: wrap;
  justify-content: center;
}

.bio-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: var(--white);
  border-radius: 8px;
  padding: 5px;
  flex-shrink: 0;
}

.bio-text {
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Sections */
section {
  background: var(--white);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.8s ease-out;
  backdrop-filter: blur(10px);
}

section h2 {
  color: var(--primary-green);
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--gray-light);
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-green),
    var(--primary-green-dark)
  );
  border-radius: 2px;
}

/* Section histoire de la ferme */
.farm-story {
  background: linear-gradient(135deg, var(--background), var(--white));
  border-left: 5px solid var(--primary-green);
}

.story-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  align-items: center;
}

.story-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-align: justify;
}

.farm-stats {
  display: flex;
  gap: 25px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #e8f5e8, #d4f4dd);
  border-radius: 12px;
  border: 1px solid var(--primary-green);
  transition: transform 0.3s ease;
  flex: 1;
  min-width: 120px;
}

.stat:hover {
  transform: translateY(-5px);
}

.stat strong {
  display: block;
  font-size: 1.8rem;
  color: var(--primary-green);
  margin-bottom: 5px;
}

.stat span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.story-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.story-image img:hover {
  transform: scale(1.05);
}

.image-caption {
  text-align: center;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 10px;
  font-size: 0.9rem;
}

/* Section valeurs */
.values-section {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border-left: 5px solid var(--corn-yellow);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.value-card {
  background: var(--white);
  padding: 30px 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-top: 4px solid var(--corn-yellow);
}

.value-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(255, 193, 7, 0.2);
}

.value-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.value-card h3 {
  color: var(--primary-green-dark);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.value-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Sections de commande */
.order-section {
  border-left: 5px solid var(--primary-green);
}

.form-section {
  border-left: 5px solid var(--eggplant-purple);
}

.cart-section {
  border-left: 5px solid var(--primary-green);
}

.section-intro {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 25px;
  text-align: center;
  font-style: italic;
}

.stock-header {
  margin-bottom: 20px;
}

.stock-header h3 {
  color: var(--primary-green);
  font-size: 1.4rem;
  padding: 15px;
  background: linear-gradient(135deg, #f8f9ff, #e9ecff);
  border-radius: 10px;
  border: 1px solid var(--primary-green);
  text-align: center;
}

.customer-info {
  margin: 25px 0;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 25px 0;
  flex-wrap: wrap;
}

/* Stock disponible */
#liste-stock {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  list-style: none;
}

#liste-stock li {
  background: linear-gradient(135deg, var(--background), var(--gray-light));
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid var(--primary-green);
  transition: all 0.3s ease;
  cursor: pointer;
}

#liste-stock li:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
  border-left-color: var(--primary-green-dark);
}

#liste-stock li strong {
  color: var(--primary-green);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 8px;
}

/* Formulaires */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: end;
  margin-bottom: 20px;
}

label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  display: block;
}

input,
select {
  padding: 12px 15px;
  border: 2px solid var(--gray-medium);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
  min-width: 150px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
  transform: translateY(-1px);
}

button {
  background: linear-gradient(
    135deg,
    var(--primary-green),
    var(--primary-green-dark)
  );
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
  background: linear-gradient(135deg, var(--hover-green), var(--focus-green));
}

button:active {
  transform: translateY(0);
}

/* Container pour tables responsives */
.table-container {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Tableau des commandes */
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  min-width: 500px;
}

thead {
  background: linear-gradient(
    135deg,
    var(--primary-green),
    var(--primary-green-dark)
  );
  color: var(--white);
}

th,
td {
  padding: 15px 12px;
  text-align: left;
  border: none;
}

th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

tbody tr {
  transition: all 0.3s ease;
}

tbody tr:nth-child(even) {
  background: rgba(76, 175, 80, 0.05);
}

tbody tr:hover {
  background: rgba(76, 175, 80, 0.1);
  transform: scale(1.01);
}

td {
  border-bottom: 1px solid var(--gray-light);
  font-weight: 500;
}

/* Input nom client */
#nom-client {
  width: 100%;
  margin: 20px 0;
  padding: 15px;
  font-size: 1.1rem;
  border: 2px solid var(--gray-medium);
  border-radius: 10px;
}

/* Boutons d'action */
div:has(#valider-commande) {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 25px 0;
  flex-wrap: wrap;
}

#valider-commande {
  background: linear-gradient(
    135deg,
    var(--primary-green),
    var(--primary-green-light)
  );
  font-size: 1.1rem;
  padding: 15px 30px;
}

#valider-commande:hover {
  background: linear-gradient(135deg, var(--hover-green), var(--primary-green));
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

#vider-panier {
  background: linear-gradient(135deg, var(--tomato-red), var(--carrot-orange));
}

#vider-panier:hover {
  background: linear-gradient(135deg, #c62828, var(--tomato-red));
  box-shadow: 0 8px 20px rgba(244, 67, 54, 0.3);
}

/* Footer principal */
.main-footer {
  background: linear-gradient(135deg, var(--primary-green-dark), var(--black));
  color: var(--white);
  margin-top: 50px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding: 40px 30px;
}

.footer-section h4 {
  color: var(--primary-green-light);
  margin-bottom: 15px;
  font-size: 1.2rem;
  border-bottom: 2px solid var(--primary-green-light);
  padding-bottom: 8px;
  display: inline-block;
}

.footer-section p {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.admin-link {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--tomato-red), var(--carrot-orange));
  color: var(--white) !important;
  text-decoration: none;
  border-radius: 25px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.admin-link:hover {
  background: linear-gradient(135deg, var(--carrot-orange), var(--tomato-red));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px 30px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 5px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--primary-green-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-certif {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-bio-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: var(--white);
  border-radius: 4px;
  padding: 3px;
}

.footer-certif span {
  color: var(--primary-green-light);
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-bottom a:hover {
  color: var(--primary-green);
  text-decoration: underline;
}

/* Lien téléphone */
.phone-link {
  color: var(--primary-green-light) !important;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.phone-link:hover {
  color: var(--primary-green) !important;
  text-decoration: underline;
}

/* Lien développeur invisible mais fonctionnel */
.dev-credit {
  color: inherit !important;
  text-decoration: none !important;
  cursor: default;
  transition: all 0.3s ease;
}

.dev-credit:hover {
  color: inherit !important;
  text-decoration: none !important;
  cursor: pointer;
  opacity: 0.8;
}

/* Messages */
#message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transition: all 0.5s ease;
}

#message.success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: var(--primary-green-dark);
  border: 1px solid #c3e6cb;
  opacity: 1;
}

#message.error {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f5c6cb;
  opacity: 1;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Modal admin */
.admin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.admin-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  min-width: 300px;
  text-align: center;
  animation: slideIn 0.4s ease;
}

.admin-modal-title {
  margin-bottom: 25px;
  color: var(--primary-green-dark);
  font-size: 1.5rem;
}

.admin-modal-body {
  margin-bottom: 20px;
}

.admin-password-input {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--gray-medium);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.admin-password-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.admin-modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.admin-btn {
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.admin-btn-success {
  background: linear-gradient(
    135deg,
    var(--primary-green),
    var(--primary-green-light)
  );
  color: var(--white);
}

.admin-btn-success:hover {
  background: linear-gradient(
    135deg,
    var(--primary-green-light),
    var(--primary-green)
  );
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.admin-btn-danger {
  background: linear-gradient(135deg, var(--tomato-red), var(--carrot-orange));
  color: var(--white);
}

.admin-btn-danger:hover {
  background: linear-gradient(135deg, var(--carrot-orange), var(--tomato-red));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.admin-error {
  margin-top: 15px;
  padding: 10px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 5px;
  display: none;
  font-size: 0.9rem;
}

/* Animations du modal */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* ========================================
   RESPONSIVE DESIGN OPTIMISÉ
   ======================================== */

/* TABLET LANDSCAPE - 1024px et moins */
@media (max-width: 1024px) {
  .story-content {
    grid-template-columns: 1fr 300px;
    gap: 30px;
  }

  .farm-logo {
    width: 280px;
    height: 280px;
  }

  .hero-section h1 {
    font-size: 2.8rem;
  }
}

/* TABLET PORTRAIT - 768px et moins */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  /* Hero section responsive */
  .hero-section {
    padding: 40px 20px;
  }

  .logo-section {
    flex-direction: column;
    gap: 25px;
  }

  .farm-logo {
    width: 220px;
    height: 220px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-section h1 {
    font-size: 2.4rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .certifications {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Story section responsive */
  .story-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .story-image {
    order: -1;
  }

  .story-text p {
    text-align: left;
    font-size: 1rem;
  }

  .farm-stats {
    justify-content: center;
    gap: 20px;
  }

  .stat {
    min-width: 140px;
  }

  /* Values grid responsive */
  .values-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }

  /* Footer responsive */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 20px;
  }

  /* Forms responsive */
  form {
    flex-direction: column;
    gap: 20px;
  }

  input,
  select,
  button {
    width: 100%;
    min-width: auto;
  }

  /* Stock grid responsive */
  #liste-stock {
    grid-template-columns: 1fr;
  }

  /* Action buttons responsive */
  .action-buttons,
  div:has(#valider-commande) {
    flex-direction: column;
    gap: 15px;
  }

  /* Tables responsive */
  .table-container {
    margin: 15px -15px;
    border-radius: 0;
  }

  table {
    font-size: 0.9rem;
    min-width: 600px;
  }

  th,
  td {
    padding: 12px 8px;
  }

  /* Sections responsive */
  section {
    padding: 20px;
    margin-bottom: 20px;
  }

  section h2 {
    font-size: 1.4rem;
  }

  /* Admin modal responsive */
  .admin-modal-content {
    margin: 20px;
    padding: 30px 20px;
    min-width: auto;
    width: calc(100% - 40px);
    max-width: 400px;
  }

  .admin-modal-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .admin-btn {
    width: 100%;
  }
}

/* MOBILE LARGE - 480px et moins */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  /* Hero très compact sur mobile */
  .hero-section {
    padding: 30px 15px;
    margin-bottom: 25px;
  }

  .farm-logo {
    width: 180px;
    height: 180px;
  }

  .hero-section h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  .certifications {
    padding: 12px 15px;
    gap: 8px;
  }

  .bio-logo {
    width: 40px;
    height: 40px;
  }

  .bio-text {
    font-size: 0.9rem;
  }

  /* Stats en colonne sur très petit écran */
  .farm-stats {
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
  }

  .stat {
    padding: 15px;
    min-width: auto;
  }

  .stat strong {
    font-size: 1.6rem;
  }

  /* Story text plus lisible sur mobile */
  .story-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
  }

  /* Values cards plus compactes */
  .values-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .value-card {
    padding: 25px 15px;
  }

  .value-icon {
    font-size: 2.5rem;
  }

  .value-card h3 {
    font-size: 1.2rem;
  }

  .value-card p {
    font-size: 0.9rem;
  }

  /* Sections très compactes */
  section {
    padding: 15px;
    border-radius: 12px;
  }

  section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }

  /* Forms ultra-responsive */
  input,
  select {
    padding: 14px 12px;
    font-size: 16px; /* Évite le zoom sur iOS */
  }

  button {
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  #nom-client {
    padding: 14px 12px;
    font-size: 16px;
  }

  /* Tables très compactes */
  table {
    font-size: 0.85rem;
    min-width: 500px;
  }

  th,
  td {
    padding: 10px 6px;
  }

  th {
    font-size: 0.8rem;
  }

  /* Footer très compact */
  .footer-content {
    padding: 25px 15px;
    gap: 25px;
  }

  .footer-section h4 {
    font-size: 1.1rem;
  }

  .footer-section p {
    font-size: 0.9rem;
  }

  .footer-bottom {
    padding: 15px;
  }

  .footer-bottom p {
    font-size: 0.85rem;
  }

  /* Admin modal très compact */
  .admin-modal-content {
    margin: 15px;
    padding: 25px 15px;
  }

  .admin-modal-title {
    font-size: 1.3rem;
  }

  .admin-password-input {
    padding: 14px 12px;
    font-size: 16px; /* Évite le zoom sur iOS */
  }

  .admin-btn {
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  /* Messages plus compacts */
  #message {
    padding: 12px;
    font-size: 0.9rem;
    margin-top: 15px;
  }
}

/* MOBILE EXTRA SMALL - 360px et moins */
@media (max-width: 360px) {
  .hero-section h1 {
    font-size: 1.8rem;
  }

  .farm-logo {
    width: 150px;
    height: 150px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  section {
    padding: 12px;
  }

  .footer-content {
    padding: 20px 12px;
  }

  .admin-modal-content {
    margin: 10px;
    padding: 20px 12px;
  }

  table {
    min-width: 450px;
  }

  th,
  td {
    padding: 8px 4px;
  }
}

/* AMÉLIORATIONS TACTILES POUR MOBILE */
@media (max-width: 768px) {
  /* Zones de clic plus grandes */
  button {
    min-height: 48px;
    touch-action: manipulation;
  }

  input,
  select {
    min-height: 48px;
    touch-action: manipulation;
  }

  .admin-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  /* Hover désactivé sur tactile */
  @media (hover: none) {
    .farm-logo:hover {
      transform: none;
    }

    .story-image img:hover {
      transform: none;
    }

    .value-card:hover {
      transform: none;
    }

    .stat:hover {
      transform: none;
    }

    #liste-stock li:hover {
      transform: none;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    button:hover {
      transform: none;
      box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    }

    tbody tr:hover {
      transform: none;
      background: rgba(76, 175, 80, 0.05);
    }
  }
}

/* ORIENTATION LANDSCAPE SUR MOBILE */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-section {
    padding: 25px 20px;
  }

  .logo-section {
    flex-direction: row;
    gap: 30px;
  }

  .farm-logo {
    width: 160px;
    height: 160px;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .farm-stats {
    flex-direction: row;
    justify-content: space-around;
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* PRINT STYLES */
@media print {
  body {
    background: white !important;
    color: black !important;
    padding: 0;
  }

  .hero-section,
  .admin-link,
  .admin-modal,
  button,
  form {
    display: none !important;
  }

  section {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .footer-content {
    display: block;
  }
}

/* PRÉFÉRENCES D'ACCESSIBILITÉ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .farm-logo:hover,
  .story-image img:hover,
  .value-card:hover,
  .stat:hover,
  button:hover {
    transform: none !important;
  }
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --white: #2d2d2d;
    --gray-light: #3a3a3a;
    --gray-medium: #4a4a4a;
  }

  body {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d1b0f 100%);
  }

  section {
    background: var(--white);
    color: var(--text-primary);
  }

  input,
  select {
    background: var(--gray-light);
    color: var(--text-primary);
    border-color: var(--gray-medium);
  }

  table {
    background: var(--white);
  }

  tbody tr:nth-child(even) {
    background: rgba(76, 175, 80, 0.1);
  }
}

footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}
