.offre-detail-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 80px;
}

/* Job Navigation */
.job-navigation {
  display: flex;
  justify-content: space-between;
}

.job-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.job-nav-btn:hover {
  border-color: var(--primary-purple);
  color: var(--primary-purple);
}

/* Detail Page Badges */
.detail-badges {
  margin-bottom: var(--spacing-sm);
}

/* Job Card */
.job-card {
  background: white;
  border: 2px solid var(--primary-purple);
  border-radius: 1rem;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 4px 12px rgba(106, 62, 235, 0.1);
}

.job-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.job-header h1 {
  font-size: 1.125rem;
  font-weight: 700;
}

.job-salary {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.job-salary .unit {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-grey);
}

.job-location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-grey);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-md);
}

.job-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.job-tag {
  padding: 0.5rem 0.75rem;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Tabs Container */
.tabs-wrapper {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
}

/* Tabs Navigation */
.tabs {
  display: flex;
  background: var(--bg-body);
  padding: 0;
  margin: 0;
  border-bottom: 1px solid #eee;
}

.tab {
  flex: 1;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-grey);
  font-family: inherit;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
@media(max-width: 420px){
  .tab{
    padding-inline: 0.75rem;
    font-size: 0.7rem;
  }
}

.tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.2s ease;
}

.tab.active {
  background: white;
  color: var(--primary-purple);
  font-weight: 600;
}

.tab.active::after {
  background: var(--primary-purple);
}

.tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-dark);
}

/* Tab Content */
.tab-content {
  padding: var(--spacing-lg);
}

.content-section {
  margin-bottom: var(--spacing-lg);
}

.content-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.skill-tag {
  padding: 0.5rem 0.875rem;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
}

.languages-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.language-item {
  font-size: 0.875rem;
  color: var(--text-grey);
}

.language-name {
  font-weight: 600;
  color: var(--text-dark);
}

.description {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-grey);
  white-space: pre-line;
}

/* Employer Tab */
.company-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.company-info .company-logo {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.5rem;
}

.company-info .company-name {
  font-size: 1.125rem;
  font-weight: 600;
}

/* Schedule Tab */
.days-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.day-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-body);
  color: var(--text-grey);
}

.day-chip.active {
  background: var(--tag-green-bg);
  color: var(--tag-green-text);
}

/* Actions */
.actions-container {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

/* Fixed Action */
.fixed-action {
  position: sticky;
  padding-bottom: 4.5rem;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(to top, var(--bg-body) 80%, transparent);
  z-index: 50;
}
@media(max-width: 767px){
  .fixed-action{
    bottom: 88px;
  }
}

.fixed-action__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 35rem;
  margin: 0 auto;
}

.fixed-action__row .btn {
  flex: 1;
}

.fixed-action .btn {
  max-width: 35rem;
  margin: 0 auto;
  display: flex;
}

/* Chat trigger button next to Like */
.chat-trigger-btn {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--primary-purple, #7c3aed);
  background: white;
  color: var(--primary-purple, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-trigger-btn:hover {
  background: var(--primary-purple, #7c3aed);
  color: white;
  transform: scale(1.05);
}

/* Navigation disabled state */
.job-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.job-nav-btn:disabled:hover {
  border-color: #ddd;
  color: inherit;
}

/* Like/Reject Animations */
.offre-detail-page.liking .job-card {
  animation: slideUp 0.3s ease-out forwards;
}

.offre-detail-page.rejecting .job-card {
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideUp {
  to {
    opacity: 0;
    transform: translateY(-30px);
  }
}

@keyframes slideDown {
  to {
    opacity: 0;
    transform: translateY(30px);
  }
}

/* Like Toast */
.offre-detail-page .like-toast {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-purple), #8B5CF6);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  box-shadow: 0 4px 20px rgba(106, 62, 235, 0.4);
  z-index: 1000;
  animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.offre-detail-page .like-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heartPulse 0.6s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.offre-detail-page .like-toast span {
  font-size: 0.875rem;
  font-weight: 500;
}

.offre-detail-page .like-toast strong {
  font-weight: 700;
}

.offre-detail-page .sparkle-toast {
  color: #FFD700;
  animation: sparklePulse 0.5s ease-in-out infinite;
}

@keyframes sparklePulse {
  0%, 100% { opacity: 1; transform: rotate(0deg); }
  50% { opacity: 0.6; transform: rotate(10deg); }
}

/* ─── Chat Drawer ──────────────────────────────────────────── */

.chat-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.chat-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70vh;
  max-height: 600px;
  background: white;
  border-radius: 1.5rem 1.5rem 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 101;
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.chat-drawer--open {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .chat-drawer {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 380px;
    height: 520px;
    max-height: 80vh;
    border-radius: 1.25rem;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .chat-drawer--open {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Drawer Header */
.chat-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.chat-drawer__company {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-drawer__company > div {
  display: flex;
  flex-direction: column;
}

.chat-drawer__company strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.chat-drawer__company span {
  font-size: 0.75rem;
  color: var(--text-grey);
}

.chat-drawer__logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.chat-drawer__logo-fallback {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-purple, #7c3aed), #a855f7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.chat-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-grey);
  display: flex;
  align-items: center;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.chat-drawer__close:hover {
  color: var(--primary-purple);
}

/* Drawer Messages */
.chat-drawer__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: #f7f7fb;
}

.chat-drawer__empty {
  margin: auto;
  color: var(--text-grey);
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Bubbles */
.chat-bubble {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.chat-bubble--self { align-self: flex-end; }
.chat-bubble--other { align-self: flex-start; }

.chat-bubble p {
  padding: 0.625rem 0.875rem;
  border-radius: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  word-break: break-word;
}

.chat-bubble--self p {
  background: var(--primary-purple, #7c3aed);
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.chat-bubble--other p {
  background: white;
  color: #111;
  border-bottom-left-radius: 0.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chat-bubble__time {
  font-size: 0.65rem;
  color: var(--text-grey);
  padding: 0.2rem 0.5rem 0;
}

.chat-bubble--self .chat-bubble__time { text-align: right; }

/* Drawer Footer */
.chat-drawer__footer {
  display: flex;
  align-items: flex-end;
  gap: 0.625rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid #f0f0f0;
  background: white;
  flex-shrink: 0;
}

.chat-drawer__input {
  flex: 1;
  resize: none;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  max-height: 100px;
  overflow-y: auto;
  transition: border-color 0.2s;
}

.chat-drawer__input:focus {
  outline: none;
  border-color: var(--primary-purple);
}

.chat-drawer__input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.chat-drawer__send {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: var(--primary-purple, #7c3aed);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.chat-drawer__send:hover:not(:disabled) {
  opacity: 0.9;
  transform: scale(1.05);
}

.chat-drawer__send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
