/**
 * Souper Spectacle 2026 - Styles CSS (Version avec QR)
 * Path: /wp-content/plugins/souper-spectacle-2026/assets/style.css
 * Compatible avec le design moderne et QR
 */

/* Variables CSS - DRY */
:root {
  --ss26-primary: #2563eb;
  --ss26-secondary: #64748b;
  --ss26-accent: #10b981;
  --ss26-danger: #ef4444;
  --ss26-warning: #f59e0b;
  --ss26-light: #f8fafc;
  --ss26-dark: #1e293b;
  --ss26-border: #d1d5db;
  --ss26-border-focus: #3b82f6;
  --ss26-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --ss26-shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
  --ss26-radius: 6px;
  --ss26-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset et base */
.ss26-form-container,
.ss26-admin-container {
  font-family: var(--ss26-font);
  line-height: 1.6;
  color: var(--ss26-dark);
}

.ss26-form-container *,
.ss26-admin-container * {
  box-sizing: border-box;
}

/* ========================
   FORMULAIRE PUBLIC
======================== */

.ss26-form-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: var(--ss26-radius);
  box-shadow: var(--ss26-shadow-lg);
  padding: 0 2rem 2rem 2rem;
}

.ss26-form-title {
  text-align: center;
  color: var(--ss26-primary);
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 600;
}

/* Lignes du formulaire */
.ss26-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ss26-form-row:last-child {
  margin-bottom: 0;
}

.ss26-form-group {
  display: flex;
  flex-direction: column;
}

.ss26-form-group.full-width {
  grid-column: 1 / -1;
}

/* Labels */
.ss26-form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--ss26-dark);
  font-size: 0.95rem;
}

.ss26-required {
  color: var(--ss26-danger);
}

/* Inputs - Style basé sur votre capture */
.ss26-form-group input[type="text"],
.ss26-form-group input[type="email"],
.ss26-form-group input[type="number"] {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--ss26-border);
  border-radius: var(--ss26-radius);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.ss26-form-group input:focus {
  outline: none;
  border-color: var(--ss26-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ss26-form-group input:invalid {
  border-color: var(--ss26-danger);
}

.ss26-form-group input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* Contrôle quantité - Style moderne comme votre capture */
.ss26-quantity-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.ss26-qty-btn {
  width: 50px;
  height: 50px;
  border: 2px solid var(--ss26-border);
  background: white;
  border-radius: var(--ss26-radius);
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ss26-qty-btn:hover {
  border-color: var(--ss26-primary);
  background: var(--ss26-light);
}

.ss26-qty-btn:active {
  transform: translateY(1px);
}

.ss26-quantity-control input[type="number"] {
  width: 80px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  background: var(--ss26-light);
  border: 2px solid var(--ss26-border);
}

/* Prix total - Style encadré comme votre capture */
.ss26-price-total {
  background: var(--ss26-light);
  border: 2px solid var(--ss26-border);
  border-radius: var(--ss26-radius);
  padding: 1rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 1.5rem 0;
  color: var(--ss26-dark);
}

/* Checkbox moderne - Style personnalisé */
.ss26-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.ss26-checkbox-label input[type="checkbox"] {
  /* Cacher la checkbox native */
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ss26-border);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  margin: 0;
  flex-shrink: 0;
}

.ss26-checkbox-label input[type="checkbox"]:checked {
  background: var(--ss26-primary);
  border-color: var(--ss26-primary);
}

.ss26-checkbox-label input[type="checkbox"]:checked::after {
  content: "✓";
  color: white;
  font-size: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
}

.ss26-checkbox-label input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Bouton principal - Style bleu arrondi comme votre capture */
.ss26-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--ss26-primary);
  color: white;
  border: none;
  border-radius: var(--ss26-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1rem;
}

.ss26-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: var(--ss26-shadow-lg);
}

.ss26-btn:active {
  transform: translateY(0);
}

.ss26-btn:disabled {
  background: var(--ss26-secondary);
  cursor: not-allowed;
  transform: none;
}

/* Messages */
.ss26-message {
  padding: 1rem;
  border-radius: var(--ss26-radius);
  margin-top: 1rem;
  font-weight: 500;
}

.ss26-message.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.ss26-message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Container de succès - remplace le formulaire */
.ss26-success-container {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
  border-radius: var(--ss26-radius);
  border: 2px solid var(--ss26-accent);
  margin-top: 2rem;
  animation: ss26-fadeIn 0.5s ease-out;
}

.ss26-success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: ss26-bounce 0.6s ease-out;
}

.ss26-success-container h3 {
  color: var(--ss26-accent);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.ss26-success-container p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--ss26-dark);
}

.ss26-success-container p:last-of-type {
  margin-bottom: 2rem;
  color: var(--ss26-secondary);
}

.ss26-btn-secondary {
  background: var(--ss26-secondary);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: var(--ss26-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: auto;
  margin-top: 0;
}

.ss26-btn-secondary:hover {
  background: #475569;
  transform: translateY(-1px);
  box-shadow: var(--ss26-shadow-lg);
}

@keyframes ss26-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* ========================
   INTERFACE ADMIN
======================== */

.ss26-admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.ss26-admin-container h3 {
  color: var(--ss26-primary);
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.ss26-admin-container h4 {
  color: var(--ss26-secondary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  border-bottom: 2px solid var(--ss26-border);
  padding-bottom: 0.5rem;
}

.ss26-admin-section {
  background: white;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: var(--ss26-radius);
  box-shadow: var(--ss26-shadow);
  border-left: 4px solid var(--ss26-primary);
}

/* Options */
.ss26-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.ss26-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--ss26-light);
  border-radius: var(--ss26-radius);
  border: 1px solid var(--ss26-border);
}

.ss26-option label {
  font-weight: 500;
  min-width: 150px;
}

.ss26-option input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--ss26-border);
  border-radius: 4px;
}

.ss26-option button {
  background: var(--ss26-accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.ss26-option button:hover {
  background: #059669;
}

/* Nouvelles options entreprise - QR */
.ss26-company-options {
  background: var(--ss26-light);
  padding: 1.5rem;
  border-radius: var(--ss26-radius);
  border: 1px solid var(--ss26-border);
}

.ss26-company-options .ss26-form-row {
  margin-bottom: 1rem;
}

.ss26-company-options .ss26-form-group label {
  color: var(--ss26-dark);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.ss26-company-options input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--ss26-border);
  border-radius: 4px;
  font-size: 0.95rem;
}

.ss26-company-options input:focus {
  outline: none;
  border-color: var(--ss26-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Statistiques */
.ss26-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.ss26-stat {
  background: var(--ss26-light);
  padding: 1.5rem;
  border-radius: var(--ss26-radius);
  text-align: center;
  border: 1px solid var(--ss26-border);
}

.ss26-stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--ss26-primary);
  margin-bottom: 0.5rem;
}

.ss26-stat-label {
  color: var(--ss26-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Tableau */
.ss26-table-container {
  overflow-x: auto;
  border-radius: var(--ss26-radius);
  border: 1px solid var(--ss26-border);
}

.ss26-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  min-width: 1000px;
}

.ss26-table th,
.ss26-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--ss26-border);
  vertical-align: top;
}

.ss26-table th {
  background: var(--ss26-primary);
  color: white;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.ss26-table tbody tr:hover {
  background: var(--ss26-light);
}

.ss26-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status badges */
.ss26-status-paid {
  color: #166534;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.ss26-status-pending {
  color: #92400e;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Boutons d'action - Mise à jour pour QR */
.ss26-action-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.ss26-btn-validate {
  background: var(--ss26-accent);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.ss26-btn-validate:hover {
  background: #059669;
  transform: translateY(-1px);
}

.ss26-btn-validate:disabled {
  background: var(--ss26-border);
  color: var(--ss26-secondary);
  cursor: not-allowed;
}

/* Nouveau bouton QR */
.ss26-btn-qr {
  background: var(--ss26-warning);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.ss26-btn-qr:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.ss26-btn-qr:disabled {
  background: var(--ss26-border);
  color: var(--ss26-secondary);
  cursor: not-allowed;
}

/* Messages d'erreur */
.ss26-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 1rem;
  border-radius: var(--ss26-radius);
  border: 1px solid #fecaca;
  text-align: center;
}



/* Bouton envoi/renvoi billet */
.ss26-btn-ticket {
  background: var(--ss26-warning);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.ss26-btn-ticket:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.ss26-btn-ticket:disabled {
  background: var(--ss26-border);
  color: var(--ss26-secondary);
  cursor: not-allowed;
}

/* Statut d'envoi du billet */
.ss26-ticket-status-sent {
  color: #166534;
  background: #dcfce7;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-weight: 500;
  display: inline-block;
}

.ss26-ticket-status-pending {
  color: #92400e;
  background: #fef3c7;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-weight: 500;
  display: inline-block;
}

/* Animation pulse pour statut en attente */
.ss26-ticket-status-pending {
  animation: ss26-pulse 2s ease-in-out infinite;
}

@keyframes ss26-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* ========================
   FILTRES CHIPS MODERNES
======================== */

.ss26-status-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.ss26-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: white;
  border: 2px solid var(--ss26-border);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--ss26-dark);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ss26-chip:hover {
  border-color: var(--ss26-primary);
  background: var(--ss26-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: #000000;
}

.ss26-chip-active {
  background: linear-gradient(135deg, var(--ss26-primary), #1d4ed8);
  color: white;
  border-color: var(--ss26-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ss26-chip-active:hover {
  background: linear-gradient(135deg, #1d4ed8, var(--ss26-primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.ss26-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 0.5rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ss26-chip-active .ss26-chip-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Animation au clic */
.ss26-chip:active {
  transform: scale(0.95);
}

/* Responsive chips */
@media (max-width: 480px) {
  .ss26-status-filters {
    gap: 0.5rem;
  }
  
  .ss26-chip {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .ss26-chip-count {
    min-width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
}

/* ========================
   RESPONSIVE
======================== */

/* Tablette */
@media (max-width: 768px) {
  .ss26-form-container {
    padding: 1.5rem;
  }
  
  .ss26-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .ss26-admin-container {
    padding: 1rem;
  }
  
  .ss26-stats {
    grid-template-columns: 1fr;
  }
  
  .ss26-options {
    grid-template-columns: 1fr;
  }

  .ss26-company-options .ss26-form-row {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .ss26-form-container {
    padding: 1rem;
  }
  
  .ss26-form-title {
    font-size: 1.3rem;
  }
  
  .ss26-quantity-control {
    gap: 0.5rem;
  }
  
  .ss26-qty-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .ss26-quantity-control input {
    width: 60px;
    font-size: 1rem;
  }
  
  .ss26-checkbox-label {
    font-size: 0.9rem;
  }
  
  .ss26-btn {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }

  .ss26-action-buttons {
    flex-direction: column;
    gap: 0.25rem;
  }

  .ss26-btn-validate,
  .ss26-btn-qr {
    width: 100%;
    text-align: center;
  }
}

/* Loading states */
.ss26-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.ss26-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid var(--ss26-border);
  border-radius: 50%;
  border-top-color: var(--ss26-primary);
  animation: ss26-spin 0.8s linear infinite;
}

@keyframes ss26-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Animations */
.ss26-form-container,
.ss26-admin-section {
  animation: ss26-fadeIn 0.5s ease-out;
}

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

/* Focus visible pour accessibilité */
.ss26-btn:focus-visible,
.ss26-qty-btn:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ss26-primary);
  outline-offset: 2px;
}

/* Patch manuel visuel - Compatibilité Elementor */
body .elementor .ss26-table a {
  color: #000;
}

/* Nouvelles classes pour les erreurs de validation */
.ss26-field-error {
  border-color: var(--ss26-danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.ss26-field-error-message {
  color: var(--ss26-danger);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  font-style: italic;
}

.ss26-price-updated {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* Notifications toast */
.ss26-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 10000;
  max-width: 400px;
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
}

.ss26-notification-success {
  background: #22c55e;
}

.ss26-notification-error {
  background: #ef4444;
}


/* Shortcode total invités */
.ss26-total-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--ss26-primary), var(--ss26-accent));
  color: white;
  border-radius: var(--ss26-radius);
  font-weight: 600;
  box-shadow: var(--ss26-shadow-lg);
}

.ss26-total-label {
  font-size: 1rem;
}

.ss26-total-value {
  font-size: 1.5rem;
  font-weight: bold;
}


/* Bouton renvoyer email facture */
.ss26-btn-invoice {
  background: var(--ss26-primary);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.ss26-btn-invoice:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.ss26-btn-invoice:disabled {
  background: var(--ss26-border);
  color: var(--ss26-secondary);
  cursor: not-allowed;
}