/* assets/css/account-and-back.css */

/* ------------------------------------------------------------------
   Section fidélité (page account/loyalty.php)
   ------------------------------------------------------------------ */
.loyalty {
  background: #f9f9f9;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}
.loyalty h2 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}
.loyalty p {
  margin-bottom: 1rem;
}
.loyalty a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #007bff;
  color: #fff;
  border-radius: 4px;
  transition: background 0.2s;
}
.loyalty a:hover {
  background: #0069d9;
}

/* ------------------------------------------------------------------
   Formulaires (inscription, connexion, mot de passe oublié)
   ------------------------------------------------------------------ */
.form-container {
  max-width: 400px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.form-container h1 {
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.75rem;
}
.form-container label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}
/* Les select sont déjà inclus ici */
.form-container input,
.form-container select,
.form-container textarea {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.form-container button {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.75rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}
.form-container button:hover {
  background: #0069d9;
}
.errors {
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.errors ul {
  list-style: none;
}
.errors li {
  margin-left: 1rem;
}
.success {
  background: #d1e7dd;
  border: 1px solid #badbcc;
  color: #0f5132;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------------
   Mon compte – Profil (page account/profile.php)
   ------------------------------------------------------------------ */
.account-page {
  display: flex;
  flex-wrap: wrap;
  max-width: none;
  margin: 2rem auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  width: auto;
  overflow: visible;
}
.sidebar {
  flex: 0 0 200px;
  background: #f7f7f7;
  padding: 2rem 1rem;
}
.sidebar nav a {
  display: block;
  margin-bottom: 1rem;
  color: #333;
  padding: 0.5rem;
  border-radius: 4px;
}
.sidebar nav a.active,
.sidebar nav a:hover {
  background: #e2e2e2;
}
.content {
  flex: 1;
  padding: 2rem;
}
.content h1 {
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* ------------------------------------------------------------------
   Sections d’adresses épurées
   ------------------------------------------------------------------ */
.address-section {
  margin-bottom: 1.5rem;
}
.address-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #333;
}
.address-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.checkbox-group {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1rem;
}
.checkbox-group label {
  margin-left: 0.5rem;
  font-weight: 500;
}

/* ------------------------------------------------------------------
   Admin – back-office (tous les pages /admin/*.php)
   ------------------------------------------------------------------ */
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.admin-header-row h1 {
  font-size: 1.8rem;
}
.table-responsive {
  overflow-x: auto;
  margin-bottom: 2rem;
}
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}
.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  vertical-align: middle;
}
.admin-table thead th {
  background: #f1f1f1;
  font-weight: 600;
}
.admin-table tbody tr:hover td {
  background: #f9f9f9;
}
.admin-table .thumb {
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
}
.admin-table .price {
  text-align: right;
  font-weight: 600;
}
.admin-table .actions a {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

/* ------------------------------------------------------------------
   Responsive adresses (account)
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
  .address-fields {
    grid-template-columns: 1fr;
  }
}

/* 1) Styles pour input et textarea (sans flèche) */
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  background-color: #fff;
  appearance: none; /* standardise, mais aucune flèche */
  background-image: none; /* on s’assure qu’il n’y a pas de background */
}

/* 2) Styles spécifiques aux <select> (avec flèche) */
.form-group select {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  background-color: #fff;
  appearance: none; /* masque la flèche native */

  /* flèche personnalisée */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath fill='%23666' d='M0 0 L8 0 L4 5 Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 0.75rem) 50%;
  background-size: 8px 5px;
}

/* style “grisé” pour les champs désactivés */
.disabled-field {
  background-color: #e9ecef;
  cursor: not-allowed;
}

/* Note importante en profil */
.important-note {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #856404;
  border-radius: 4px;
}
.important-note strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}



