* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', 'Palatino', 'Times New Roman', serif;
  background: #f5e8e4;
  color: #4a3428;
  line-height: 1.6;
}

h2 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 20px;
  margin-top: 10px;
  color: #B85C24;
  letter-spacing: 0.5px;
}
.error {
  color:#e74c3c;
  background:#fff0f0;
  border:1px solid #e74c3c;
  border-radius:6px;
  padding:10px;
  margin-bottom:18px;
  text-align:center;
  font-weight:500;
}


.page-box {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
}


.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-logo {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.nav h1 {
  font-size: 32px;
  font-weight: 300;
  color: #B85C24;
  letter-spacing: 1px;
}

.nav a {
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover {
  text-decoration: underline;
}


.form-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.form-box input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.form-box input:focus {
  border-color: #E89E6C;
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 158, 108, 0.1);
}

.add-recette-form-box {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  box-shadow: 0 4px 8px #dfdfdf;
  padding: 10px;
  margin-top: 20px;
}

.add-recette-form-box label {
  margin-bottom: 6px;
  font-weight: 400;
}

.add-recette-form-box input {
  flex: 1;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.textarea {
  width:100%;
  height:100px;
  border-radius:6px;
  border:1px solid #b0b8d1;
  padding:10px;
  margin-bottom:18px;
}


.btn-primary {
  background: #B85C24;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #9a4a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(184, 92, 36, 0.2);
}

.btn-secondary {
  background: transparent;
  color: #B85C24;
  border: 1px solid #B85C24;
  padding: 4px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  color: #ffffff;
  background: #B85C24;
  transform: translateY(-1px);
}

.btn-view {
  background: #E89E6C;
  color: #fff;
  padding: 6px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-view:hover {
  background: #d68850;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(232, 158, 108, 0.2);
}


.table-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table tr:nth-child(even) {
  background: #f9fafb;
}

table tr:hover {
  background: #fef3ef;
}

table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

table td:first-child {
  font-weight: 600;
}

table td input.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}




@media screen and (max-width: 768px) {
  .page-box {
    margin: 20px auto;
    padding: 15px;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
  }

  .nav h1 {
    font-size: 24px;
  }

  #nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  #nav-links a,
  #nav-links button {
    font-size: 13px;
    padding: 6px 10px;
  }

  
  table {
    font-size: 13px;
  }

  table td {
    padding: 10px 8px;
  }

  
  .hide-mobile {
    display: none;
  }

  
  .btn-primary,
  .btn-secondary,
  .btn-view {
    font-size: 13px;
    padding: 6px 10px;
  }

  
  .form-box {
    flex-direction: column;
    gap: 10px;
  }

  .add-recette-form-box {
    padding: 15px;
  }

  
  .ingredient-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .ingredient-row > div {
    width: 100% !important;
  }

  .ingredient-row button {
    width: 100%;
    margin-top: 10px !important;
  }
}


@media screen and (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .page-box {
    margin: 10px;
    padding: 10px;
  }

  .nav h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 18px;
  }

  
  table {
    font-size: 12px;
  }

  table td {
    padding: 8px 6px;
  }

  
  .add-recette-form-box {
    padding: 12px;
  }

  .add-recette-form-box input,
  .add-recette-form-box textarea,
  .add-recette-form-box select {
    font-size: 14px;
  }

  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    margin-bottom: 8px;
  }
}


@media screen and (min-width: 1200px) {
  .page-box {
    max-width: 1100px;
  }
}




.connection-status {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  z-index: 1000;
  transition: all 0.3s ease;
}

.connection-status.online {
  background: #10B981;
  color: white;
}

.connection-status.offline {
  background: #EF4444;
  color: white;
}


.install-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #B85C24;
  color: white;
  padding: 8px 24px;
  border-radius: 25px;
  border: none;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(184, 92, 36, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

.install-button:hover {
  background: #9a4a1a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(184, 92, 36, 0.5);
}

.install-button:active {
  transform: translateY(0);
}


.install-button.hidden {
  display: none;
}




@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.alert {
  animation: slideInDown 0.3s ease;
}

.alert.removing {
  animation: fadeOut 0.3s ease;
}


#app-content {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}









.recette-card {
  min-height: 120px;
  display: flex;
  flex-direction: column;
}


.ingredient-row {
  min-height: 85px;
}


#alertMessage {
  min-height: 20px;
  margin-bottom: 12px;
}


table td {
  padding: 14px 16px;
  min-width: 80px;
}


button, .btn-primary, .btn-secondary, .btn-view {
  min-height: 32px;
  min-width: 60px;
}


input[type="text"],
input[type="number"],
input[type="email"],
textarea,
select {
  min-height: 38px;
  padding: 8px 12px;
}


img {
  max-width: 100%;
  height: auto;
  display: block;
}


#app {
  max-width: 900px;
  margin: 0 auto;
}


#app-content {
  min-height: 300px;
}


.nav {
  min-height: 50px;
  margin-bottom: 24px;
}


#connectionStatus {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
}


#installButton {
  width: 200px;
  height: 45px;
  padding: 10px 16px;
}


