/* En-tête de la page */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  background: white;
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.header-main {
  flex: 1;
}

.header-count {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-color);
  background: rgba(52, 152, 219, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-left: 0.5rem;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.view-toggle {
  display: flex;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

/* Toggle de vue */
.view-toggle-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-label {
  font-weight: 500;
  color: var(--dark-color);
  font-size: 0.9rem;
}

.view-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #6c757d;
}

.view-btn:hover {
  background: #e9ecef;
  color: var(--dark-color);
}

.view-btn.active {
  background: var(--primary-color);
  color: white;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-title i {
  color: var(--warning-color);
}

.page-description {
  margin: 0.5rem 0 0 0;
  color: #6c757d;
  font-size: 0.95rem;
}

/* Section des filtres */
.filters-section {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.filters-container {
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark-color);
  margin-bottom: 0.2rem;
}

.filter-input,
.filter-select{
  padding: 0.5rem 0.7rem;
  border: 2px solid #e1e8ed;
  border-radius: 5px;
  font-size: 0.85rem;
  transition: var(--transition);
  background: white;
  height: 38px;
  line-height: 1.2;
}

.filter-select {
  padding:0px !important;
  padding-right: 2rem;
}

.filter-input:focus,
.filter-select:focus  {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-actions {
  display: flex;
  align-items: flex-end;
}

/* list & table */
/* TODO : Il y a un truc bizarre ici avec les scrolls si je change de nom*/
.offers-container {
  max-height: 70vh;
  overflow-y: auto;
}

/*.main-container::-webkit-scrollbar {
  width: 8px;
}

.main-container::-webkit-scrollbar-track {
  background: #f1f2f6;
}

.main-container::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}*/


/* États de chargement */
.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: var(--border-radius);
}


/* Vue grille */
.elems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  /*padding: 1rem;*/
}

.elem-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}

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

.elem-card-header {
  position: relative;
  padding: 1rem;
  padding-bottom: 0;
}

.card-content {
  padding: 1rem;
  padding-bottom: 0;
}

.card-content h3 {  
  margin-left:7px;
  margin-right: 7px;;
  margin-top: 0;
}

.card-actions {
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  display: flex;
  justify-content: center;
}

.elem-thumbnail-button {
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.elem-thumbnail-button:hover .thumbnail-overlay {
  opacity: 1;
}

.offer-thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.offer-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width:100%;
  text-align:left
}

.offer-link .offer-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #e1e8ed;
  transition: var(--transition);
}

.offer-link:hover .offer-thumbnail {
  border-color: var(--primary-color);
}

.thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(52, 152, 219, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  color: white;
  font-size: 1.5rem;
}

.offer-title {
  font-weight: 500;
  color: var(--dark-color);
  line-height: 1.2;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 400px;
}


.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: var(--border-radius);
  color: #6c757d;
}

.empty-icon {
  font-size: 4rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0 0 0.5rem 0;
}

.empty-message {
  font-size: 1rem;
  margin: 0;
}


.external-link {
  flex: 1;
  padding: 0.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.small-external-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.small-external-link {
  color: #e74c3c;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.small-external-link:hover {
  color: #c0392b;
}

.yahoo-link {
  background: #ff6b6b;
  color: white;
}

.yahoo-link:hover {
  background: #ff5252;
}

.zenmarket-link {
  background: #4ecdc4;
  color: white;
}

.zenmarket-link:hover {
  background: #26a69a;
}

.stats-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-color);
}

.stat-value.cost {
  color: var(--danger-color);
}

.stat-value.sold {
  color: var(--warning-color);
}

.stat-value.revenue {
  color: var(--success-color);
}

.links-section {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  max-width: 400px;
}

.toast.success {
  background: rgba(72, 187, 120, 0.95);
  color: white;
}

.toast.error {
  background: rgba(245, 101, 101, 0.95);
  color: white;
}

.toast.warning {
  background: rgba(237, 137, 54, 0.95);
  color: white;
}

.toast.info {
  background: rgba(66, 153, 225, 0.95);
  color: white;
}

.toast-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-close {
  background: none;
  border: none;
  color: currentColor;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.toast-close:hover {
  opacity: 1;
}

/* Toast Animation */
.toast-enter-active {
  transition: all 0.4s ease;
}

.toast-leave-active {
  transition: all 0.3s ease;
}

.toast-enter-from {
  opacity: 0;
  transform: translateX(100%);
}

.toast-leave-to {
  opacity: 0;
  transform: translateX(100%);
}

@media (max-width: 1024px) {
  .page-header {
    padding: 1.5rem;
  }

   .page-title {
    font-size: 2rem;
  }
  
  .main-container {
    padding: 1rem 0.5rem;
  }

  .elems-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
  }
}


/* Responsive */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .header-actions {
    justify-content: center;
  }

   .filters-container {
    grid-template-columns: 1fr;
  } 

  .elems-grid {
    grid-template-columns: 1fr;
  } 

  .stats-section {
    grid-template-columns: 1fr;
  } 
}

@media (max-width: 480px) {
  .page-header {
    padding: 0.75rem;
  }

   .page-title {
    font-size: 1.5rem;
  } 

  .main-container {
    padding: 0.5rem 0.25rem;
  }  

  .card-header {
    padding: 1rem;
  }

  .card-content {
    padding: 0 1rem 1rem;
  }

   .offer-title {
    max-width: 150px;
    font-size: 0.9rem;
  } 
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .page-header
  {
    background: rgba(45, 55, 72, 0.95);
    border-color: rgba(74, 85, 104, 0.5);
  }

  .page-title,
 {
    color: #f7fafc;
  } 
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 10pt;
}

table {
  width: 100%;
  border-collapse: collapse;
  /*margin: 20px 0;*/
}

table th,
table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

table th {
  background-color: #3498db;
  color: white;
}

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

table tr:hover {
  background-color: #e1e1e1;
}

a {
  color: #42b983;
}

form {
    /* max-width: 500px; */
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
  }
  
  form input,
  form button {
    width: 100%;
    padding: 10px;
    /*margin-bottom: 20px;*/
    border-radius: 4px;
    border: 1px solid #ccc;
    /* font-size: 16px; */
  }
  
  form input:focus {
    border-color: #3498db;
    outline: none;
  }
  
  form button {
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    /* font-size: 16px; */
  }
  
  form button:hover {
    background-color: #2980b9;
  }

  

  h3 {
    margin: 40px 0 0;
  }
  ul {
    list-style-type: none;
    padding: 0;
  }
  li {
    display: inline-block;
    margin: 0 10px;
  }