/* ===== Styles pour la modale QR Code ===== */

.qr-modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  /* 29/08/2026 : élargi (500px -> 640px) pour que les trois onglets de
     partage (code / QR Code / lien) tiennent côte à côte sur une seule
     ligne sans troncature, sur demande explicite. */
  max-width: 640px;
  width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  background: #fff;
}

/* 29/08/2026 : rangée des trois onglets de la modale de partage — classe
   dédiée (plutôt que .qr-actions, partagée avec la rangée copier/PDF) pour
   forcer une seule ligne sans retour à la ligne, quel que soit l'espace. */
.qr-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: nowrap;
  margin-bottom: 12px;
}
.qr-tab-btn {
  /* 29/08/2026 : largeur naturelle plutôt que forcée identique
     (flex:1 1 0) — ça tronquait "Générer un QR Code" (le plus long des
     trois libellés) même quand la modale avait la place. */
  flex: 0 0 auto;
  padding: 8px 12px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.qr-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.qr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid #f3f4f6;
  background: linear-gradient(135deg, #f9fafb 0%, #fff 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.qr-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}

.close-modal {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  font-size: 28px;
  color: #333;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
}

.close-modal:hover {
  background: #f87171;
  color: #fff;
  transform: rotate(90deg);
}

.qr-modal-body {
  padding: 20px 24px;
  text-align: center;
}

.qr-display {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 16px 0 20px;
  line-height: 1.4;
}

.qr-url-container {
  margin: 0 auto 16px;
  max-width: 100%;
  text-align: left;
}

.qr-url-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 6px;
}

.qr-url-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.qr-url-input {
  flex: 1;
  padding: 8px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #333;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
  min-width: 0;
}

/* 29/08/2026 : code court affiché plus grand que les autres champs (lien,
   titre) — c'est la valeur qu'on lit/retape, elle doit se voir de loin.
   Ciblé par id plutôt que par une classe à ajouter sur chacune des ~9
   pages qui dupliquent cette modale : une seule règle suffit pour toutes. */
#qrCodeInput {
  font-size: 26px;
  font-weight: 700;
  padding: 10px 12px;
}

.qr-url-input:focus {
  outline: none;
  border-color: #667eea;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.copy-url-btn {
  padding: 8px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f3f4f6;
  color: #333;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.copy-url-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-color: transparent;
  transform: scale(1.05);
}

.copy-url-btn:active {
  transform: scale(0.95);
}

.qr-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.qr-btn-primary, .qr-btn-secondary {
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-size: 15px;
}

.qr-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.qr-btn-primary:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b3fa0 100%);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.qr-btn-secondary {
  background: #f3f4f6;
  color: #333;
  border: 2px solid #e5e7eb;
}

.qr-btn-secondary:hover {
  background: #fff;
  border-color: #667eea;
  transform: translateY(-2px);
}

.qr-btn-primary:active, .qr-btn-secondary:active {
  transform: scale(0.95);
}
