/* ==========================================================================
   TABLE OF CONTENTS
   ==========================================================================
   /* Variables */
   /* Reset */
   /* Body */
   /* Header */
   /* Navigation */
   /* Hero */
   /* Filtres */
   /* Cartes des offres */
   /* Boutons */
   /* Pagination */
   /* Footer */
   /* Responsive */
   ========================================================================== */

/* ==========================================================================
   /* Variables */
   ========================================================================== */
:root {
  /* Colors */
  --primary-color: #1a3e85;
  --primary-rgb: 26, 62, 133;
  --accent-color: #EFBF04;
  --accent-rgb: 239, 191, 4;
  --warning-color: #ffc107;
  --success-color: #28a745;
  --teal-color: #20c997;
  --dark-color: #1e1e1e;
  --text-muted-color: #6c757d;
  --light-bg-1: #ffffff;
  --light-bg-2: #f8f9fa;
  --light-bg-3: #f1f3f4;
  --light-bg-4: #e9ecef;
  
  /* WhatsApp Button Colors */
  --whatsapp-color: #25d366;
  --whatsapp-hover-color: #128c7e;
  
  /* Fonts */
  --font-family: 'Poppins', sans-serif;
  
  /* Borders & Shadows */
  --border-radius-lg: 15px;
  --border-radius-xl: 20px;
  
  /* Transitions */
  --transition-smooth: all 0.3s ease;
  --transition-card: all 0.4s ease;
}

/* ==========================================================================
   /* Reset */
   ========================================================================== */
* {
  box-sizing: border-box;
}

/* ==========================================================================
   /* Body */
   ========================================================================== */
body {
  overflow-x: hidden;
}

.container {
  padding-left: 15px;
  padding-right: 15px;
}

.container.py-5 {
  margin-top: 0 !important;
}

/* Custom Offers Section offset for fixed navbar */
.offers-section {
  margin-top: 120px;
}

/* ==========================================================================
   /* Header */
   ========================================================================== */
/* Header styles are handled globally by interface_users.css. 
   Offre-specific overrides can be added here if needed. */

/* ==========================================================================
   /* Navigation */
   ========================================================================== */
/* General Navbar Solid Background Setup (eliminates transparency) */
.navbar {
  background-color: #FFFFFF !important;
  background: #FFFFFF !important;
  backdrop-filter: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  position: fixed !important;
  top: 45px !important; /* Positions below the top-bar (sub-header) */
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1055 !important;
  padding: 15px 0 !important;
  transition: all 0.3s ease !important;
}

.background-header {
  top: 0 !important;
  position: fixed !important;
  background-color: #FFFFFF !important;
  background: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.background-header .navbar {
  top: 0 !important;
  padding: 10px 0 !important;
  background-color: #FFFFFF !important;
  background: #FFFFFF !important;
}


/* Desktop Hamburger Toggler Button (avoids transparent background) */
.navbar-toggler {
  background-color: #FFFFFF !important;
  border: 2px solid #1A3E85 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Hamburger icon bars forced to deep blue */


/* ==========================================================================
   /* Hero */
   ========================================================================== */
/* Hero / Page-heading overrides for title text effects */
.page-title {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2rem;
  font-weight: 800;
  text-shadow: 0 0 30px rgba(var(--primary-rgb), 0.3);
  margin-top: 80px !important;
  padding-top: 20px !important;
}


/* ==========================================================================
   /* Filtres */
   ========================================================================== */
.filter-card {
  background: linear-gradient(135deg, var(--light-bg-1), var(--light-bg-3));
  border: none;
  border-radius: var(--border-radius-xl);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  margin: 0 10px;
}

.filter-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
  padding: 15px 20px;
}

.form-control {
  border-radius: 10px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.9);
  transition: var(--transition-smooth);
  font-size: 0.9rem;
  padding: 10px 15px;
}

.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.2);
  transform: scale(1.02);
}

/* ==========================================================================
   /* Cartes des offres */
   ========================================================================== */
.job-card {
  transition: var(--transition-card);
  background: linear-gradient(145deg, var(--light-bg-1), var(--light-bg-2));
  border: none;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin: 0 10px 20px 10px;
}

.job-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Job Image */
.job-image {
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.job-image img {
  transition: transform 0.5s ease;
  filter: brightness(0.9);
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.job-card:hover .job-image img {
  transform: scale(1.05);
  filter: brightness(1);
}

/* Job Title */
.job-title {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
}

/* Job Text details */
.job-description {
  font-size: 0.95rem;
}

.job-profile-text {
  font-size: 0.9rem;
}

.job-stat-value {
  font-size: 0.9rem;
}

/* Company Information Block */
.company-info {
  background: linear-gradient(135deg, var(--light-bg-2) 0%, var(--light-bg-4) 100%);
  border-left: 5px solid var(--accent-color);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
}

.company-info-text {
  font-size: 0.9rem;
}

/* Badges */
.info-badge {
  background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
  color: white;
  border-radius: var(--border-radius-lg);
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Glassmorphism Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   /* Cartes des candidats */
   ========================================================================== */
.candidate-card {
  background: linear-gradient(145deg, var(--light-bg-1), #f0f5ff);
  border: none;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.candidate-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.candidate-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.candidate-body {
  padding: 1.6rem;
}

.candidate-title {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: .4rem;
}

.candidate-meta {
  font-size: .88rem;
  color: #555;
}

.btn-view {
    background: #EFBF04; /* Primary yellow */
    color: #1A3E85 !important; /* Dark blue text */
    border: none;
    border-radius: 8px;
    padding: 7px 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-view:hover {
    background: #1A3E85;
    color: #FFFFFF !important;
    transform: translateY(-2px);
}

.search-filter-form {
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

.pagination {
  justify-content: center;
}

.admin-actions a {
  margin-right: 0.5rem;
}

a:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* ==========================================================================
   /* Boutons */
   ========================================================================== */
.btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  border: none;
  border-radius: 25px;
  padding: 12px 25px;
  font-weight: 600;
  transition: var(--transition-smooth);
  width: 100%;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  outline: none;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color)) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3) !important;
}

.btn-apply {
  background: linear-gradient(45deg, var(--success-color), var(--teal-color));
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
  font-size: 0.9rem;
  width: 100%;
  text-align: center;
  display: block;
}

.btn-apply:hover {
  background: linear-gradient(45deg, var(--teal-color), var(--success-color));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

/* Spontaneous Candidacy Banner */
.candidature-banner {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
  border-radius: var(--border-radius-lg) !important;
}

.candidature-banner-alt {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
  max-width: 500px;
  margin: 0 auto;
  border-radius: var(--border-radius-lg) !important;
}

.candidature-banner-title {
  color: var(--warning-color) !important;
}

.candidature-banner-alt-desc {
  font-size: 0.9rem;
}

.btn-cv-upload {
  background-color: var(--warning-color) !important;
  border: none !important;
  font-size: 1rem !important;
  transition: var(--transition-smooth);
  color: var(--warning-color) !important; /* text color matches candidature title */
}


.btn-cv-upload:hover {
  background-color: #e0a800 !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-cv-upload-alt {
  background-color: var(--warning-color) !important;
  border: none !important;
  transition: var(--transition-smooth);
}

.btn-cv-upload-alt:hover {
  background-color: #e0a800 !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

/* Social Sharing Icons */
.social-link {
  transition: var(--transition-smooth);
  font-size: 1.1rem;
  margin: 0 8px;
}

.social-link:hover {
  transform: scale(1.2) rotate(5deg);
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background: linear-gradient(135deg, #25D366, #1ebe57) !important;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  transition: var(--transition-smooth);
}
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: var(--whatsapp-color) !important;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  transition: var(--transition-smooth);
}
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: var(--whatsapp-color);
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  transition: var(--transition-smooth);
}

.whatsapp-float:hover {
  background-color: var(--whatsapp-hover-color);
  color: #FFF;
  transform: scale(1.1);
}

/* ==========================================================================
   /* Pagination */
   ========================================================================== */
/* No pagination is currently active on the Offres page. 
   Styles can be defined here if pagination is implemented. */

/* ==========================================================================
   /* Footer */
   ========================================================================== */
/* Footer styling is handled globally by interface_users.css.
   Offre-specific overrides can be added here if needed. */

/* ==========================================================================
   /* Responsive */
   ========================================================================== */

/* Touch hover effect (supports both hover and mobile touch states) */
.touch-hover,
.job-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

/* Animation performance optimization */
.job-card, .btn-apply, .social-link {
  will-change: transform;
}

/* Accessibility: reduce motion if user prefers */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Large Desktop (xl) - 1200px and up */
@media (min-width: 1200px) {
  .job-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  }
  
  .page-title {
    font-size: 3rem;
  }
}

/* Desktop (lg) - 992px to 1199px */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .job-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  }
  
  .page-title {
    font-size: 2.8rem;
  }
}



/* Tablet (md) - 768px to 991px */
@media (min-width: 768px) and (max-width: 991.98px) {
  .job-card {
    margin: 0 15px 30px 15px;
  }
  
  .job-title {
    font-size: 1.4rem;
  }
  
  .page-title {
    font-size: 2.5rem;
  }
  
  .filter-card {
    margin: 0 15px;
  }
  
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
  }
}

/* WhatsApp Floating Button Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .whatsapp-float {
    background-color: var(--whatsapp-color) !important;
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 25px;
  }
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 25px;
  }
}

/* Tablet & Mobile Layout for Image/Columns (max-width: 767.98px) */
@media (max-width: 767.98px) {
  .job-image {
    min-height: 150px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  }
  
  .job-image img {
    height: 150px;
  }
  
  .job-card .col-md-8 {
    padding: 20px 15px;
  }
  
  .job-card .col-md-4 {
    padding: 0;
  }

  .footer-item {
    margin-bottom: 30px;
    text-align: center;
  }
  
  .footer-item h4 {
    font-size: 1.2rem;
  }

  .text-muted {
    color: var(--text-muted-color) !important;
  }
  
  .company-info {
    background: linear-gradient(135deg, var(--light-bg-2) 0%, var(--light-bg-4) 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
  }
}

/* Mobile Large & Tablet (sm) - 576px to 767px */
@media (min-width: 576px) and (max-width: 767.98px) {
  .job-title {
    font-size: 1.3rem;
  }
  
  .page-title {
    font-size: 2.2rem;
  }
  
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* Mobile (xs) & Portrait - 575px and below */
@media (max-width: 575.98px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .job-card {
    margin: 0 0 20px 0;
    border-radius: var(--border-radius-lg);
  }
  
  .job-title {
    font-size: 1.1rem;
  }
  
  .page-title {
    font-size: 1.5rem;
    margin-top: 60px !important;
    padding: 10px;
  }
  
  .filter-card {
    margin: 0;
    border-radius: var(--border-radius-lg);
  }
  
  .filter-header {
    padding: 12px 15px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  }
  
  .filter-header h5 {
    font-size: 1rem;
  }
  
  .company-info {
    border-radius: 10px;
    border-left-width: 3px;
  }
  
  .glass-effect {
    padding: 15px !important;
  }
  
  .info-stats {
    flex-direction: column;
  }
  
  .info-stats > div {
    margin-bottom: 15px;
  }
  
  .social-links {
    justify-content: center;
    margin-top: 15px;
  }
  
  .btn-apply {
    padding: 12px;
    font-size: 0.85rem;
    margin-bottom: 15px;
  }
  
  .page-heading {
    padding: 60px 0 40px 0;
  }
  
  .page-heading h1 {
    font-size: 2rem;
  }
  
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .stats-grid > div {
    padding: 10px;
  }
  
  .stats-grid .fas {
    font-size: 1.2rem !important;
  }

  .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  
  .info-badge {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  
  .lead {
    font-size: 0.95rem;
  }
  
  .company-info h5 {
    font-size: 1.1rem;
  }
  
  .company-info p {
    font-size: 0.85rem;
  }
}

/* Style for Extra Small Screens (max-width: 360px) */
@media (max-width: 360px) {
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  
  .job-card {
    border-radius: 12px;
  }
  
  .filter-card {
    border-radius: 12px;
  }
  
  .job-title {
    font-size: 1rem;
  }
  
  .page-title {
    font-size: 1.3rem;
  }
  
  .btn-apply {
    padding: 10px 15px;
    font-size: 0.8rem;
  }
}
