/* QVCMM - Styles personnalises */
/* Theme construction : couleurs chaudes, terre, bois */

:root {
  --color-primary: #d97706;      /* amber-600 */
  --color-primary-dark: #b45309; /* amber-700 */
  --color-primary-light: #fbbf24; /* amber-400 */
  --color-secondary: #78350f;    /* amber-900 */
  --color-accent: #ea580c;       /* orange-600 */
  --color-bg-warm: #fffbeb;      /* amber-50 */
  --color-bg-earth: #fef3c7;     /* amber-100 */
  --color-text: #1c1917;         /* stone-900 */
  --color-text-muted: #78716c;   /* stone-500 */
}

/* Font */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--color-text);
}

/* Hero gradient */
.hero-gradient {
  background: linear-gradient(135deg, #78350f 0%, #d97706 50%, #ea580c 100%);
}

.hero-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
}

/* Boutons */
.btn-primary {
  background-color: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.btn-secondary {
  background-color: white;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--color-bg-warm);
}

.btn-danger {
  background-color: #dc2626;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Cards */
.project-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s;
  overflow: hidden;
}

.project-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.project-card-image {
  height: 200px;
  background-color: #fef3c7;
  background-size: cover;
  background-position: center;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-construction { background-color: #fef3c7; color: #92400e; }
.badge-renovation { background-color: #dbeafe; color: #1e40af; }
.badge-extension { background-color: #dcfce7; color: #166534; }
.badge-amenagement { background-color: #f3e8ff; color: #6b21a8; }

.badge-draft { background-color: #f3f4f6; color: #374151; }
.badge-published { background-color: #dcfce7; color: #166534; }
.badge-in_progress { background-color: #dbeafe; color: #1e40af; }
.badge-completed { background-color: #f0fdf4; color: #15803d; }
.badge-cancelled { background-color: #fee2e2; color: #991b1b; }

.badge-pending { background-color: #fef3c7; color: #92400e; }
.badge-viewed { background-color: #dbeafe; color: #1e40af; }
.badge-accepted { background-color: #dcfce7; color: #166534; }
.badge-rejected { background-color: #fee2e2; color: #991b1b; }
.badge-withdrawn { background-color: #f3f4f6; color: #6b7280; }

/* Trade tags */
.trade-tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background-color: #fef3c7;
  color: #92400e;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  margin: 0.125rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--color-text);
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.form-input-error {
  border-color: #dc2626;
}

.form-error {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.form-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: white;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  min-height: 120px;
  resize: vertical;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* Checkbox custom */
.form-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Steps progress bar */
.steps-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.steps-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #e5e7eb;
  transform: translateY(-50%);
  z-index: 0;
}

.step-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  background-color: #e5e7eb;
  color: #6b7280;
  transition: all 0.3s;
}

.step-circle.active {
  background-color: var(--color-primary);
  color: white;
}

.step-circle.completed {
  background-color: #16a34a;
  color: white;
}

.step-label {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
}

.step-label.active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Messages */
.message-bubble {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

.message-sent {
  background-color: var(--color-primary);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}

.message-received {
  background-color: #f3f4f6;
  color: var(--color-text);
  margin-right: auto;
  border-bottom-left-radius: 0.25rem;
}

.message-time {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.125rem;
}

/* Conversation list */
.conversation-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.conversation-item:hover {
  background-color: #fffbeb;
}

.conversation-item.unread {
  background-color: #fef3c7;
}

/* Sidebar dashboard */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: #374151;
  text-decoration: none;
  transition: all 0.15s;
}

.sidebar-link:hover {
  background-color: #fef3c7;
  color: var(--color-primary);
}

.sidebar-link.active {
  background-color: #fef3c7;
  color: var(--color-primary);
  font-weight: 600;
}

/* Stats cards */
.stat-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Image upload preview */
.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.upload-preview-item {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  aspect-ratio: 1;
}

.upload-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* Notification badge */
.notification-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  background-color: #dc2626;
  color: white;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}

/* Favorite heart */
.favorite-btn {
  cursor: pointer;
  transition: transform 0.2s;
}

.favorite-btn:hover {
  transform: scale(1.2);
}

.favorite-btn.active svg {
  fill: #dc2626;
  color: #dc2626;
}

/* Flash animations */
.flash-enter {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-gradient h1 {
    font-size: 1.75rem;
  }

  .message-bubble {
    max-width: 85%;
  }
}

/* Photo gallery */
.gallery-main {
  width: 100%;
  height: 400px;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: #f3f4f6;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  overflow-x: auto;
}

.gallery-thumb {
  width: 80px;
  height: 60px;
  border-radius: 0.375rem;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.gallery-thumb.active {
  border-color: var(--color-primary);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  animation: spin 0.8s linear infinite;
}

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

/* Accordion FAQ */
.accordion-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

/* Print styles */
@media print {
  header, footer, .sidebar, .btn-primary, .btn-secondary { display: none; }
}
