/* =========================
   BASE
========================= */

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  background: #f7f2ea;
  color: #333333;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}


/* =========================
   ACCESSIBILITÉ CLAVIER
========================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #7a5c3a;
  outline-offset: 3px;
}


/* =========================
   HEADER
========================= */

header {
  background: #ffffff;
  border-bottom: 1px solid #d8cfc4;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  color: #6b4d2e;
  margin: 0;
  font-size: 2rem;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  margin-left: 20px;
  padding: 5px 2px;
  text-decoration: none;
  color: #333333;
  font-weight: 600;
}

nav a.active {
  color: #6b4d2e;
  text-decoration: underline;
}

nav a:hover,
nav a:focus-visible {
  color: #6b4d2e;
  text-decoration: underline;
}


/* =========================
   TITRE
========================= */

.page-title {
  margin-top: 20px;
}

.page-title h2 {
  margin-bottom: 8px;
  color: #333333;
  font-size: 2rem;
  line-height: 1.2;
}

.page-title p,
.muted {
  color: #595959;
}


/* =========================
   COMMANDES
========================= */

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 25px;
}

.order-card {
  width: 100%;
  background: #ffffff;
  border: 1px solid #d8cfc4;
  border-radius: 10px;
  padding: 20px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
}

.order-header h3 {
  margin-top: 0;
  margin-bottom: 5px;
  line-height: 1.3;
}

.order-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 20px;
  margin-top: 15px;
}

.order-details p {
  margin: 5px 0;
}

.order-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* =========================
   BADGES / STATUTS
========================= */

.badge {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  white-space: nowrap;
}

/* En attente */
.pending {
  background: #fff4e5;
  color: #704900;
  border: 1px solid #8a5a00;
}

/* Acceptée */
.accepted {
  background: #e8f5e9;
  color: #205c24;
  border: 1px solid #2e7d32;
}

/* Terminée */
.done {
  background: #eeeeee;
  color: #444444;
  border: 1px solid #666666;
}


/* =========================
   BOUTONS
========================= */

.btn-secondary,
.btn-danger {
  min-height: 44px;
  border: 2px solid transparent;
  padding: 10px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.btn-secondary {
  background: #6b4d2e;
  border-color: #6b4d2e;
  color: #ffffff;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: #4f381f;
  border-color: #4f381f;
}

.btn-danger {
  background: #8b3028;
  border-color: #8b3028;
  color: #ffffff;
}

.btn-danger:hover,
.btn-danger:focus-visible {
  background: #68231e;
  border-color: #68231e;
}


/* =========================
   MESSAGES
========================= */

.message-erreur {
  color: #a0001b;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.message-succes {
  color: #236b27;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}


/* =========================
   FOOTER
========================= */

footer {
  background: #ffffff;
  border-top: 1px solid #d8cfc4;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}

footer a {
  color: #6b4d2e;
  font-weight: 600;
  text-decoration: underline;
}

footer a:hover,
footer a:focus-visible {
  color: #4f381f;
}


/* =========================
   TABLETTE / MOBILE
========================= */

@media (max-width: 768px) {

  .header-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .logo {
    margin: 0;
  }

  nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  nav a {
    margin: 0;
    padding: 8px 10px;
  }

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

  .order-details {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 480px) {

  .container {
    padding: 15px;
  }

  .header-content {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .logo {
    font-size: 1.6rem;
  }

  nav {
    gap: 4px;
  }

  nav a {
    margin: 0;
    padding: 8px;
    font-size: 1rem;
  }

  .page-title h2 {
    font-size: 1.7rem;
  }

  .orders-list {
    gap: 15px;
    margin-top: 20px;
  }

  .order-card {
    padding: 15px;
  }

  .order-actions {
    flex-direction: column;
  }

  .order-actions .btn-secondary,
  .order-actions .btn-danger,
  .order-actions a {
    width: 100%;
  }

  .btn-secondary,
  .btn-danger {
    width: 100%;
    text-align: center;
  }

  .footer-content {
    gap: 12px;
  }
}