/* Variables globales pour une cohérence visuelle */
:root {
  /* Palette de couleurs principale */
  --bg-dark: #0d1117;
  --bg-darker: #070a0e;
  --bg-medium: #141c26;
  --bg-light: #1c2636;
  --accent-primary: #58c7a5;
  --accent-secondary: #1e5f4b;
  --accent-warning: #f39c12;
  --accent-danger: #e74c3c;
  --accent-glow: rgba(88, 199, 165, 0.3);
  --accent-digital: #00ffcc;
  
  /* Couleurs de texte */
  --text-primary: #e4e6eb;
  --text-secondary: #9fa3a9;
  --text-accent: #58c7a5;
  
  /* Effets */
  --transition-main: all 0.25s cubic-bezier(0.3, 0, 0.2, 1);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 20px var(--accent-glow);
  --transform-hover: translateY(-5px);
  
  /* Typographie */
  --font-main: 'Inter', 'Segoe UI', -apple-system, sans-serif;
  --font-heading: 'Rajdhani', 'Play', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* Reset et styles de base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Effet de texture en overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%231e5f4b' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E"),
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url('/Images_Dayz/FondDayz/noise.png');
  background-size: 100px, cover, 200px;
  background-blend-mode: overlay;
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

/* Lignes de grille digitales - effet futuriste */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(0deg, rgba(88, 199, 165, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(88, 199, 165, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: -1;
  pointer-events: none;
}

/* Container principal */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  border: 1px solid rgba(88, 199, 165, 0.1);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.65);
  position: relative;
  overflow: hidden;
}

/* Effet de bord lumineux futuriste */
.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0.7;
}

/* En-tête */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 15px rgba(88, 199, 165, 0.5);
  animation: glow 5s infinite;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Disposition principale du contenu */
.main-content {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.qr-options-panel {
  flex: 1.3;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.qr-result-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Navigation par onglets */
.tab-navigation {
  display: flex;
  border-bottom: 1px solid rgba(88, 199, 165, 0.2);
  margin-bottom: 1.5rem;
}

.tab-button {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-main);
  position: relative;
}

.tab-button::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: var(--transition-main);
}

.tab-button:hover {
  color: var(--text-primary);
}

.tab-button:hover::after {
  width: 50%;
}

.tab-button.active {
  color: var(--accent-primary);
}

.tab-button.active::after {
  width: 100%;
}

/* Contenu des onglets */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
  display: block;
}

/* Groupes de formulaires */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(8, 12, 18, 0.8);
  border: 1px solid rgba(88, 199, 165, 0.25);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  transition: var(--transition-main);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* URL Validator */
.url-validator {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.url-validator label {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Options de personnalisation */
.customization-options {
  background: rgba(10, 15, 20, 0.7);
  border: 1px solid rgba(88, 199, 165, 0.15);
  border-radius: 8px;
  padding: 1.5rem;
}

.customization-options h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(88, 199, 165, 0.2);
}

.option-group {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.option-group label {
  margin-bottom: 0;
  min-width: 120px;
}

.color-pickers {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.color-pickers .option-group {
  flex: 1;
  margin-bottom: 0;
}

input[type="color"] {
  width: 50px;
  height: 35px;
  border: 1px solid rgba(88, 199, 165, 0.25);
  border-radius: 4px;
  background: none;
  cursor: pointer;
}

input[type="file"] {
  background: rgba(8, 12, 18, 0.8);
  border: 1px solid rgba(88, 199, 165, 0.25);
  border-radius: 6px;
  padding: 0.5rem;
  width: 100%;
  color: var(--text-primary);
}

/* Logo preview */
.logo-preview {
  width: 80px;
  height: 80px;
  border: 1px dashed rgba(88, 199, 165, 0.4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  background: rgba(8, 12, 18, 0.5);
}

.logo-preview img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  color: var(--accent-primary);
  font-size: 0.9rem;
  cursor: help;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 250px;
  background-color: rgba(10, 15, 20, 0.95);
  color: var(--text-primary);
  text-align: center;
  border-radius: 6px;
  padding: 1rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(88, 199, 165, 0.15);
  font-size: 0.85rem;
  line-height: 1.5;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Boutons */
.button {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(88, 199, 165, 0.3);
  background: rgba(30, 95, 75, 0.8);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-main);
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(88, 199, 165, 0.3);
}

.button:active {
  transform: translateY(-1px);
}

.button i {
  margin-right: 0.5rem;
}

.primary-button {
  background: var(--accent-primary);
  color: var(--bg-darker);
  border-color: var(--accent-primary);
}

.primary-button:hover {
  background: var(--accent-digital);
  border-color: var(--accent-digital);
  color: var(--bg-darker);
}

.secondary-button {
  background: rgba(28, 38, 54, 0.6);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.back-button {
  background: rgba(28, 38, 54, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.back-button:hover {
  background: rgba(30, 95, 75, 0.2);
  border-color: rgba(88, 199, 165, 0.3);
}

.generate-controls {
  margin: 1.5rem 0;
}

.generate-controls .button {
  width: 100%;
}

/* QR Code display */
.qr-preview {
  background: rgba(10, 15, 20, 0.7);
  border: 1px solid rgba(88, 199, 165, 0.15);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  position: relative;
}

#qrcode {
  display: flex;
  align-items: center;
  justify-content: center;
}

#qrcode img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
  gap: 1rem;
}

.qr-placeholder i {
  font-size: 3rem;
  color: rgba(88, 199, 165, 0.3);
}

.qr-placeholder p {
  max-width: 250px;
  font-size: 0.9rem;
}

/* Actions QR */
.qr-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.qr-actions .button {
  flex: 1;
  padding: 0.75rem 0.5rem;
}

/* Historique */
.qr-history {
  background: rgba(10, 15, 20, 0.7);
  border: 1px solid rgba(88, 199, 165, 0.15);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.qr-history h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(88, 199, 165, 0.2);
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.history-item {
  width: 70px;
  height: 70px;
  background: rgba(8, 12, 18, 0.8);
  border: 1px solid rgba(88, 199, 165, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-main);
}

.history-item:hover {
  transform: scale(1.05);
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.history-item img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: rgba(13, 17, 23, 0.95);
  margin: 10% auto;
  padding: 2rem;
  border: 1px solid rgba(88, 199, 165, 0.2);
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.3s;
}

.close-button {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover {
  color: var(--accent-primary);
}

.modal-qr-display {
  display: flex;
  justify-content: center;
  padding: 2rem;
  background: rgba(10, 15, 20, 0.7);
  border-radius: 8px;
  margin: 1.5rem 0;
}

.scan-instructions {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Location button */
.location-actions {
  margin-top: 1rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 15px rgba(88, 199, 165, 0.3);
  }
  50% {
    text-shadow: 0 0 25px rgba(88, 199, 165, 0.6), 0 0 40px rgba(88, 199, 165, 0.3);
  }
}

/* Media Queries */
@media (max-width: 992px) {
  .container {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .main-content {
    flex-direction: column;
  }
  
  h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .tab-button {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }
  
  .option-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .color-pickers {
    flex-direction: column;
  }
  
  .qr-actions {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 1.8rem;
  }
  
  .tab-navigation {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.5rem;
  }
  
  .qr-preview {
    padding: 1rem;
    min-height: 280px;
  }
}