/* Rapport Export Styles */

/* Export Button */
.export-button {
  background-color: #059669;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.export-button:hover {
  background-color: #047857;
}

.export-button svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* Modal Styles */
.export-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  overflow-y: auto;
  height: 100%;
  width: 100%;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: exportFade 0.15s ease-out;
}

.export-modal.hidden {
  display: none;
}

.export-modal-content {
  position: relative;
  margin: auto;
  padding: 1.75rem;
  width: 30rem;
  max-width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  border-radius: 1rem;
  background-color: white;
  animation: exportPop 0.2s ease-out;
}

@keyframes exportFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes exportPop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.export-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.export-modal-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background-color: #d1fae5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
}

.export-modal-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.export-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.25rem;
}

.export-modal-subtitle {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #6b7280;
  margin: 0;
}

/* Période rapide */
.export-presets {
  margin-bottom: 1.25rem;
}

.export-presets-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.export-presets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.export-chip {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.export-chip:hover {
  border-color: var(--color-primary, #348980);
  color: var(--color-primary, #348980);
  background: #fff;
}

.export-chip.active {
  background: var(--color-primary, #348980);
  border-color: var(--color-primary, #348980);
  color: #fff;
}

/* Form Elements */
.export-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.export-form-group {
  margin-bottom: 0.5rem;
}

.export-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.export-form-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  background: #fff;
}

.export-form-input:focus {
  outline: none;
  border-color: var(--color-primary, #348980);
  box-shadow: 0 0 0 3px rgba(52, 137, 128, 0.15);
}

.export-hint {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  margin: 0.75rem 0 1.25rem;
}

/* Modal Actions */
.export-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.export-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.export-btn-cancel {
  background-color: #f3f4f6;
  color: #374151;
}

.export-btn-cancel:hover {
  background-color: #e5e7eb;
}

.export-btn-submit {
  background-color: var(--color-primary);
  color: white;
}

.export-btn-submit:hover {
  background-color: var(--color-secondary);
}

.export-btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading Spinner */
.loading-spinner {
  display: none;
}

.loading-spinner.show {
  display: inline-block;
}

.loading-spinner svg {
  animation: spin 1s linear infinite;
  height: 1.25rem;
  width: 1.25rem;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Header Layout */
.rapport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.rapport-title {
  font-size: 1.875rem;
  font-weight: 700;
}

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

  .export-modal-content {
    padding: 1.25rem;
  }

  .export-dates {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
