/**
 * SUPERNET - Modern Product Tabs CSS
 * Enhanced tab system for product pages with accessibility support
 * Compatible with modern-product-page.js
 */

/* ==== CSS VARIABLES FOR TABS ==== */
:root {
  --supernet-tab-border: #e2e8f0;
  --supernet-tab-active: var(--supernet-primary, #4CAF50);
  --supernet-tab-hover: #f1f5f9;
  --supernet-tab-text: #475569;
  --supernet-tab-active-text: #ffffff;
  --supernet-tab-radius: 8px;
  --supernet-tab-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --supernet-tab-shadow-active: 0 4px 16px rgba(3, 129, 65, 0.2);
  --supernet-tab-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==== MASQUER FLECHES INPUT NUMBER ==== */
/* Chrome, Safari, Edge, Opera */
#quantity_wanted::-webkit-outer-spin-button,
#quantity_wanted::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
#quantity_wanted[type=number] {
  -moz-appearance: textfield;
}

/* ==== MAIN TAB CONTAINER ==== */
.supernet-product-tabs {
  margin: var(--supernet-spacing-xl, 32px) 0;
  background: white;
  border-radius: var(--supernet-tab-radius);
  box-shadow: var(--supernet-tab-shadow);
  overflow: hidden;
}

/* ==== TAB NAVIGATION ==== */
.supernet-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  background: var(--supernet-secondary, #f8fafc);
  border-bottom: 1px solid var(--supernet-tab-border);
  position: relative;
  gap: 2px;
  padding: 2px;
}

.supernet-tab-btn {
  flex: 1;
  min-width: 120px;
  padding: var(--supernet-spacing-md, 16px) var(--supernet-spacing-sm, 8px);
  border: none;
  background: transparent;
  color: var(--supernet-tab-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--supernet-tab-transition);
  border-radius: calc(var(--supernet-tab-radius) - 2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--supernet-spacing-xs, 4px);
  position: relative;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.supernet-tab-btn:hover {
  background: var(--supernet-tab-hover);
  color: var(--supernet-primary, var(--supernet-primary, #4CAF50));
  transform: translateY(-1px);
}

.supernet-tab-btn:focus {
  outline: 2px solid var(--supernet-primary, var(--supernet-primary, #4CAF50));
  outline-offset: 2px;
  z-index: 10;
}

.supernet-tab-btn.supernet-tab-active {
  background: var(--supernet-tab-active);
  color: var(--supernet-tab-active-text);
  box-shadow: var(--supernet-tab-shadow-active);
  transform: translateY(-2px);
}

.supernet-tab-btn.supernet-tab-active:hover {
  background: var(--supernet-primary-dark, #026d37);
  transform: translateY(-2px);
}

.supernet-tab-btn .material-icons {
  font-size: 18px;
  opacity: 0.8;
}

.supernet-tab-btn.supernet-tab-active .material-icons {
  opacity: 1;
}

/* Mobile: Stack tabs */
@media (max-width: 767px) {
  .supernet-tabs-nav {
    flex-direction: column;
    gap: 1px;
  }
  
  .supernet-tab-btn {
    min-width: unset;
    flex: none;
    padding: var(--supernet-spacing-sm, 8px) var(--supernet-spacing-md, 16px);
    font-size: 13px;
  }
  
  .supernet-tab-btn .material-icons {
    font-size: 16px;
  }
}

/* Tablet: 2 per row for main tabs */
@media (min-width: 768px) and (max-width: 1023px) {
  .supernet-tab-btn {
    min-width: calc(50% - 4px);
    max-width: calc(50% - 4px);
  }
  
  .supernet-tab-btn:nth-child(n+3) {
    min-width: calc(33.333% - 4px);
    max-width: calc(33.333% - 4px);
  }
}

/* ==== TAB CONTENT ==== */
.supernet-tabs-content {
  position: relative;
}

.supernet-tab-pane {
  display: none;
  padding: var(--supernet-spacing-xl, 32px);
  animation: fadeIn 0.3s ease-in-out;
}

.supernet-tab-pane.supernet-tab-active {
  display: block;
}

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

.supernet-tab-content-wrapper {
  max-width: none;
}

.supernet-tab-title {
  display: flex;
  align-items: center;
  gap: var(--supernet-spacing-sm, 8px);
  font-size: 20px;
  font-weight: 600;
  color: var(--supernet-primary, var(--supernet-primary, #4CAF50));
  margin: 0 0 var(--supernet-spacing-lg, 24px) 0;
  padding-bottom: var(--supernet-spacing-sm, 8px);
  border-bottom: 2px solid var(--supernet-primary-light, rgba(3, 129, 65, 0.1));
}

.supernet-tab-title .material-icons {
  color: var(--supernet-primary, var(--supernet-primary, #4CAF50));
  font-size: 24px;
}

/* ==== DESCRIPTION CONTENT ==== */
.supernet-description-content {
  font-size: 16px;
  line-height: 1.6;
  color: var(--supernet-text, #2d3748);
}

.supernet-description-content p {
  margin-bottom: var(--supernet-spacing-md, 16px);
}

.supernet-description-content ul,
.supernet-description-content ol {
  margin: var(--supernet-spacing-md, 16px) 0;
  padding-left: var(--supernet-spacing-lg, 24px);
}

.supernet-description-content li {
  margin-bottom: var(--supernet-spacing-xs, 4px);
}

/* ==== COMPACT FEATURES TABLE ==== */
.supernet-features-table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: var(--supernet-tab-radius);
  border: 1px solid var(--supernet-tab-border);
}

.supernet-features-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0;
}

.supernet-feature-row {
  border-bottom: 1px solid var(--supernet-tab-border);
  transition: background-color 0.2s ease;
}

.supernet-feature-row:last-child {
  border-bottom: none;
}

.supernet-feature-row:hover {
  background: var(--supernet-tab-hover);
}

.supernet-feature-name {
  padding: var(--supernet-spacing-sm, 8px) var(--supernet-spacing-md, 16px);
  font-weight: 600;
  color: var(--supernet-primary, var(--supernet-primary, #4CAF50));
  background: var(--supernet-secondary, #f8fafc);
  border-right: 1px solid var(--supernet-tab-border);
  vertical-align: top;
  width: 40%;
  min-width: 120px;
}

.supernet-feature-value {
  padding: var(--supernet-spacing-sm, 8px) var(--supernet-spacing-md, 16px);
  color: var(--supernet-text, #2d3748);
  vertical-align: top;
  word-break: break-word;
}

.supernet-not-specified {
  color: var(--supernet-text-light, #718096);
  font-style: italic;
  font-size: 13px;
}

/* Mobile: Stack table cells */
@media (max-width: 767px) {
  .supernet-features-table,
  .supernet-features-table tbody,
  .supernet-feature-row {
    display: block;
  }
  
  .supernet-feature-row {
    margin-bottom: var(--supernet-spacing-sm, 8px);
    border: 1px solid var(--supernet-tab-border);
    border-radius: var(--supernet-tab-radius);
    overflow: hidden;
  }
  
  .supernet-feature-name,
  .supernet-feature-value {
    display: block;
    width: 100%;
    border-right: none;
    padding: var(--supernet-spacing-xs, 4px) var(--supernet-spacing-md, 16px);
  }
  
  .supernet-feature-name {
    border-bottom: 1px solid var(--supernet-tab-border);
    padding-bottom: var(--supernet-spacing-xs, 4px);
  }
  
  .supernet-feature-value {
    padding-top: var(--supernet-spacing-xs, 4px);
    background: white;
  }
}

/* ==== ATTACHMENTS STYLING ==== */
.supernet-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--supernet-spacing-md, 16px);
  border: 1px solid var(--supernet-tab-border);
  border-radius: var(--supernet-tab-radius);
  margin-bottom: var(--supernet-spacing-md, 16px);
  gap: var(--supernet-spacing-md, 16px);
  transition: var(--supernet-tab-transition);
}

.supernet-attachment-item:last-child {
  margin-bottom: 0;
}

.supernet-attachment-item:hover {
  border-color: var(--supernet-primary, var(--supernet-primary, #4CAF50));
  box-shadow: var(--supernet-tab-shadow);
}

.supernet-attachment-info {
  flex: 1;
}

.supernet-attachment-name {
  margin: 0 0 var(--supernet-spacing-xs, 4px) 0;
  font-size: 16px;
  font-weight: 600;
}

.supernet-attachment-name a {
  color: var(--supernet-primary, var(--supernet-primary, #4CAF50));
  text-decoration: none;
}

.supernet-attachment-name a:hover {
  text-decoration: underline;
}

.supernet-attachment-description {
  margin: 0;
  color: var(--supernet-text-light, #718096);
  font-size: 14px;
}

.supernet-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--supernet-spacing-xs, 4px);
  padding: var(--supernet-spacing-sm, 8px) var(--supernet-spacing-md, 16px);
  background: var(--supernet-primary, var(--supernet-primary, #4CAF50));
  color: white;
  text-decoration: none;
  border-radius: var(--supernet-tab-radius);
  font-weight: 500;
  transition: var(--supernet-tab-transition);
  white-space: nowrap;
}

.supernet-download-btn:hover {
  background: var(--supernet-primary-dark, #026d37);
  transform: translateY(-1px);
  box-shadow: var(--supernet-tab-shadow);
  color: white;
  text-decoration: none;
}

.supernet-download-btn:focus {
  outline: 2px solid var(--supernet-primary, var(--supernet-primary, #4CAF50));
  outline-offset: 2px;
}

.supernet-download-btn .material-icons {
  font-size: 18px;
}

/* Mobile: Stack attachment items */
@media (max-width: 767px) {
  .supernet-attachment-item {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .supernet-attachment-info {
    margin-bottom: var(--supernet-spacing-sm, 8px);
  }
  
  .supernet-download-btn {
    justify-content: center;
    width: 100%;
  }
}

/* ==== EXTRA CONTENT STYLING ==== */
.supernet-extra-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--supernet-text, #2d3748);
}

.supernet-extra-content p {
  margin-bottom: var(--supernet-spacing-md, 16px);
}

/* ==== ACCESSIBILITY IMPROVEMENTS ==== */
@media (prefers-reduced-motion: reduce) {
  .supernet-tab-btn,
  .supernet-tab-pane,
  .supernet-feature-row,
  .supernet-attachment-item,
  .supernet-download-btn {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-contrast: high) {
  .supernet-tab-btn {
    border: 2px solid currentColor;
  }
  
  .supernet-features-table {
    border: 2px solid currentColor;
  }
  
  .supernet-feature-row {
    border-bottom: 1px solid currentColor;
  }
}

/* Focus improvements */
.supernet-focused {
  outline: 3px solid var(--supernet-primary, var(--supernet-primary, #4CAF50));
  outline-offset: 2px;
}

/* ==== PRINT STYLES ==== */
@media print {
  .supernet-product-tabs {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .supernet-tabs-nav {
    display: none;
  }
  
  .supernet-tab-pane {
    display: block !important;
    page-break-inside: avoid;
  }
  
  .supernet-tab-title {
    page-break-after: avoid;
  }
  
  .supernet-download-btn {
    background: white;
    color: black;
    border: 1px solid black;
  }
}
/* ═══════════════════════════════════════════════════════════════════
 * SUPERNET PRODUCT SECTIONS - Style Supermarché Digital
 * Sections visibles (sans onglets)
 * ═══════════════════════════════════════════════════════════════════ */

/* Container des sections */
.supernet-product-sections {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Section générique */
.supernet-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

/* Header de section */
.supernet-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--supernet-primary, #4CAF50) 0%, #026d37 100%);
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.supernet-section-header i.material-icons {
  color: white;
  font-size: 1.25rem;
  opacity: 0.9;
}

/* Contenu de section */
.supernet-section-content {
  padding: 1.25rem;
}

/* Tableau des caractéristiques */
.supernet-features-table-container {
  width: 100%;
}

.supernet-features-table tr.supernet-feature-row {
  border-bottom: 1px solid #f1f5f9;
}

.supernet-features-table tr.supernet-feature-row:last-child {
  border-bottom: none;
}

.supernet-features-table tr.supernet-feature-row:nth-child(even) {
  background: #f8fafc;
}

.supernet-features-table td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
}

.supernet-features-table td.supernet-feature-name {
  width: 40%;
  font-weight: 500;
  color: #374151;
  background: #f8fafc;
  border-right: 2px solid var(--supernet-primary, #4CAF50);
}

.supernet-features-table td.supernet-feature-value {
  width: 60%;
  color: #111827;
  font-weight: 600;
}

.supernet-no-features {
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* Section description */
.supernet-description-text {
  color: #374151;
  line-height: 1.7;
  font-size: 0.95rem;
}

.supernet-description-text p {
  margin-bottom: 1rem;
}

.supernet-description-text p:last-child {
  margin-bottom: 0;
}

.supernet-description-text ul,
.supernet-description-text ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.supernet-description-text li {
  margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .supernet-product-sections {
    padding: 0 0.75rem;
    gap: 0.75rem;
  }

  .supernet-section-header {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .supernet-section-content {
    padding: 1rem;
  }

  .supernet-features-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .supernet-features-table td.supernet-feature-name {
    width: 45%;
  }

  .supernet-features-table td.supernet-feature-value {
    width: 55%;
  }
}

@media (max-width: 480px) {
  .supernet-features-table td.supernet-feature-name,
  .supernet-features-table td.supernet-feature-value {
    display: block;
    width: 100%;
    border-right: none;
  }

  .supernet-features-table td.supernet-feature-name {
    padding-bottom: 0.25rem;
    font-size: 0.85rem;
  }

  .supernet-features-table td.supernet-feature-value {
    padding-top: 0.25rem;
    padding-bottom: 0.75rem;
  }

  .supernet-features-table tr.supernet-feature-row:nth-child(even) td {
    background: #f8fafc;
  }
}

/* Cacher les anciens onglets */
.supernet-product-tabs-full-width,
.supernet-tabs-nav,
.supernet-tabs-content {
  display: none !important;
}
