/* ========================================
   NEXSAS - CSS UNIFIÉ POUR TOUS LES DASHBOARDS
   Candidat, Intermédiaire, Entreprise
   ======================================== */

/* Reset et variables globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --accent-color: #4f46e5;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-card: linear-gradient(45deg, #667eea, #764ba2);
    
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-hover-bg: rgba(255, 255, 255, 1);
    
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --text-white: #ffffff;
    
    --border-radius: 16px;
    --border-radius-small: 12px;
    --border-radius-large: 20px;
    --border-color: rgba(255, 255, 255, 0.2);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}
/* ========================================
   STYLES GÉNÉRAUX
   ======================================== */

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed; /* 🔥 Garde le background fixe */
    color: var(--text-dark);
    overflow-x: hidden;
}
/* Footer sticky sans gap */
.site-footer {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}
/* ========================================
   HEADER / NAVBAR
   ======================================== */

/* Header sans marges qui créent des lignes */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.25rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    position: static;
    top: 0;
    z-index: 1000;
    margin: 0; /* 🔥 Supprime toute marge */
}

.nav-container {
    max-width: 1700px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    gap: 2.5rem;
}

.logo {
    height: 70px;
    width: auto;
    border-radius: 15px;
    transition: transform var(--transition-normal);
}

.logo:hover {
    transform: scale(1.05);
}

/* Barre de recherche */
.search-container {
    flex: 2;
    max-width: 900px;
    position: relative;
}

.search-container form {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    margin-bottom: 8px;
}

.search-input {
    padding: 0.85rem 1.25rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    min-width: 180px;
    flex: 1;
}

.search-input:focus {
    outline: none;
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-container button[type="submit"] {
    padding: 0.85rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.search-container button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Navigation links */
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-left: 8rem; /* 🔹 pousse le bloc navigation vers la droite */
}


.nav-link {
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 25px;
    transition: all var(--transition-normal);
    font-weight: 500;
    position: relative;
    background: rgba(102, 126, 234, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap; /* 🔹 Empêche les retours à la ligne */
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-link i {
    font-size: 1rem;
}

.profile-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
}

.profile-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.5);
}

/* Formulaire de recherche */
.search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

/* Groupe salaire + période */
.salary-input-group {
    display: flex;
    align-items: center;
    gap: 0; /* pas d’espace entre les deux */
    max-width: 350px; /* tu ajustes selon ton design */
}

.salary-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 2; /* prend plus de place */
    width: 20px;
}

.salary-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    flex: 1; /* prend moins de place */
    min-width: 120px;
}


/* Responsive : pile sur mobile */
@media (max-width: 1024px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .salary-input-group {
        width: 100%;
    }
}

/* ========================================
   CONTAINER PRINCIPAL
   ======================================== */

/* Main container sans gaps */
.main-container {
    flex: 1;
    max-width: 1900px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;

    /* 🔥 sticky */
    position: sticky;
    top: 2rem;
    align-self: start;
    height: fit-content;
}


/* Carte de profil */
.profile-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.profile-pic-container {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    position: relative;
    background: var(--gradient-primary);
    padding: 4px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    border: 3px solid white;
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.profile-role {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.titre {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
}

.titre label {
    font-weight: 600;
    color: var(--text-medium);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.3rem;
}

.titre p {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

/* Carte de statistiques */
.stats-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius-small);
    transition: all var(--transition-normal);
    position: relative; /* 🔥 rend le badge .notif-badge dépendant de ce bloc */
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-content {
    flex: 1;
}

.stat-content h4 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}

.stat-content span {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   ZONE DE CONTENU PRINCIPALE
   ======================================== */

/* Content area sans marges problématiques */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Section d'accueil */
/* Welcome section sans margin-bottom excessif */
.welcome-section {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-large);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    margin-bottom: 0; /* 🔥 Supprime la marge qui crée une ligne */
}

.welcome-section:hover {
    box-shadow: var(--shadow-md);
}

.welcome-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.welcome-subtitle {
    color: var(--text-light);
    font-size: 1.15rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Boutons d'action */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.action-btn i {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.action-btn.secondary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===============================
   Boutons d'embauche (Dashboard)
   =============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-right: 0.5rem;
  margin-bottom: 4px;
}

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

/* ✅ Styles spécifiques */
.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}


/* ========================================
   SYSTÈME DE NOTIFICATIONS
   ======================================== */


.notif-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

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


/* ========================================
   CARTES D'OFFRES / OPPORTUNITÉS
   ======================================== */

.offers-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.offer-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  padding: 1.75rem;
  border: 1px solid rgba(102, 126, 234, 0.15);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.offer-card:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

/* En-tête : titre + entreprise */
.offer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.offer-card h3 {
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.company-badge {
  background: rgba(102, 126, 234, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-color);
  white-space: nowrap;
}

/* Détails alignés : Salaire et Contrat */
.offer-details {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-medium);
  font-weight: 500;
}

.detail-item i {
  color: var(--primary-color);
  font-size: 1rem;
}

/* Description */
.offer-description {
  color: var(--text-medium);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.offer-description strong {
  color: var(--text-dark);
}

/* Meta informations */
.offer-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.offer-meta i {
  color: var(--primary-color);
}

/* Statut de candidature */
.application-status {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}

.status-accepted {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-left: 4px solid #16a34a;
}

.status-rejected {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-left: 4px solid #dc2626;
}

.status-pending {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
  border-left: 4px solid #d97706;
}

/* Messages flash */
.flash-messages {
  margin-bottom: 1rem;
}

.flash-message {
  background: rgba(59, 130, 246, 0.1);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: #2563eb;
  border-left: 4px solid #2563eb;
}

.offer-card .btn {
  margin-top: 1rem;
}

.offer-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Texte tronqué */
.truncated-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.6;
  max-height: 4.8em;
}

/* Carte mise en avant */
.offer-card.featured {
border: 2px solid #7c3aed;
background: #faf5ff;
}

/* Badge */
.featured-badge {
display: inline-block;
background: #7c3aed;
color: #ffffff;
font-size: 0.75rem;
font-weight: 600;
padding: 4px 10px;
border-radius: 999px;
margin-bottom: 8px;
}

/* Styles spécifiques au dashboard intermédiaire */
.points-section {
    background: var(--gradient-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 1.5rem 0;
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    cursor: pointer; /* Rend le curseur "main" */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.points-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.points-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.points-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

.badge {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badge i {
    font-size: 1.2rem;
}

.recommendation-limit {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: white;
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.3);
    margin-bottom: 2rem;
}

.limit-icon {
    font-size: 2.5rem;
}

.limit-text {
    flex: 1;
}

.limit-text strong {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.3rem;
}

.limit-counter {
    font-size: 2rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 15px;
}

.section-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.recommendation-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommendation-item {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-normal);
}

.recommendation-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.recommendation-info {
    flex: 1;
}

.recommendation-candidate {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.recommendation-job {
    color: var(--text-light);
    font-size: 0.95rem;
}

.recommendation-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.status-pending {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-preselected {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-interview {
    background: rgba(168, 85, 247, 0.1);
    color: #9333ea;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.recommendation-points {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    white-space: nowrap;
}

  /* ========================================
   LAYOUT SIMPLIFIÉ - DASHBOARD INTERMÉDIAIRE
   ======================================== */

.content-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.recommendation-limit {
    width: 100%;
    margin: 0 0 1.5rem 0; /* Espace en bas */
}

.opportunities-card {
    width: 100%;
}
/* ========================================
   BOUTONS GÉNÉRAUX
   ======================================== */

.btn {
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-link {
    background: none;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    text-decoration: underline;
    border: none;
    cursor: pointer;
}

.btn-link:hover {
    color: var(--primary-dark);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.fade-in[style*="animation-delay"] {
    animation-play-state: paused;
}

/* Styles spécifiques au dashboard entreprise */
.offer-management-card {
    max-width: 1500px;   /* 🔹 limite la largeur */
    margin: 0 auto 2rem; /* 🔹 centre la carte et garde un espace en bas */
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.offer-management-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.offer-title-section h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.offer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.offer-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    font-size: 0.95rem;
}

.offer-meta-item i {
    color: var(--primary-color);
}

.offer-description {
    color: var(--text-medium);
    margin: 1rem 0;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    hyphens: auto;
}


/* Limiter à 4 lignes max avec "..." */
.offer-description.truncate {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 6.4em; /* 4 lignes × 1.6 */
}


.offer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tab-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-normal);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.notif-badge {
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
    animation: pulse 2s infinite;
}

.edit-btn, .delete-btn, .activate-btn, .deactivate-btn {
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 2px solid rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

.edit-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.activate-btn {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.activate-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: translateY(-2px);
}

.deactivate-btn {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
    border: 2px solid rgba(251, 191, 36, 0.3);
}

.deactivate-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    transform: translateY(-2px);
}

.tab-content {
    display: none;
    background: rgba(102, 126, 234, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

.application-item, .recommendation-item {
    background: white;
    padding: 1.25rem;
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-normal);
}

.application-item:hover, .recommendation-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.candidate-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.candidate-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.candidate-name a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.candidate-name a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.candidate-email {
    color: var(--text-light);
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

.status-pending {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

.status-accepted {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}


.accept-btn {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.accept-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: translateY(-2px);
}

.reject-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.reject-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.feedback-form {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feedback-form button {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.85rem;
}

.feedback-form button:hover {
    transform: translateY(-2px);
}

.justification-text {
  background: rgba(102, 126, 234, 0.05);
  padding: 1rem;
  border-radius: var(--border-radius-small);
  margin: 0.75rem 0;
  font-style: italic;
  color: var(--text-medium);
  border-left: 3px solid var(--primary-color);

  /* 🔧 scroll propre */
  max-height: 8rem;            /* ≈ 5–6 lignes, ajuste à ton goût */
  overflow-y: auto;            /* active le scroll vertical si ça dépasse */
  overflow-x: hidden;          /* évite le scroll horizontal */
  display: block;              /* IMPORTANT: retire -webkit-box */
  white-space: normal;
  overflow-wrap: anywhere;     /* casse les très longs mots/IDs */
  word-break: break-word;
}


.warning-message {
    background: rgba(251, 191, 36, 0.1);
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    border-radius: var(--border-radius-small);
    color: #d97706;
    font-weight: 600;
    margin: 1rem 0;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3.5rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.history-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.hired-badge {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    display: inline-block;
    margin-top: 0.5rem;
}


/* ============================
   BADGE RECOMMANDATION EXTERNE (VIP)
   ============================ */

.external-reco-badge {
  margin-top: 0.5rem;
}

.external-reco-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0.4rem 0.9rem;
  border-radius: 14px;

  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;

  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.15),
    rgba(102, 126, 234, 0.15)
  );

  color: #7c3aed;
  border: 1px solid rgba(168, 85, 247, 0.35);

  transition: all 0.25s ease;
}

.external-reco-link i {
  font-size: 0.85rem;
}

.external-reco-link:hover {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.25),
    rgba(102, 126, 234, 0.25)
  );
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
  color: #6d28d9;
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }
    
    .nav-container {
        flex-wrap: wrap;
    }
    
    .search-container {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .header {
        padding: 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .welcome-title {
        font-size: 1.75rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        padding: 1.5rem;
    }
    
    .logout-btn {
        top: 10px;
        right: 10px;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    
    .search-container form {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 50px;
    }
    
    .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .welcome-section {
        padding: 1.5rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.1rem;
    }
    
    .stat-content h4 {
        font-size: 1.4rem;
    }

    /* 🔥 Supprime complètement la carte + empêche la grille de réserver de la place */
    .my-recommendations-card {
        display: none !important;
        grid-column: unset !important;
        grid-row: unset !important;
    }
    
}

/* === FIX HEADER MOBILE === */
@media (max-width: 768px) {

    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem !important;
        padding: 0.5rem 1rem;
    }

    .logo {
        height: 55px !important;
    }

    .search-container {
        width: 100%;
        max-width: 100%;
        order: 2;
    }

    .nav-links {
        margin-left: 0 !important;  /* 🔥 empêche le décalage */
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 0.75rem !important;
        width: 100%;
    }

    .nav-link {
        font-size: 0.9rem !important;
        padding: 0.65rem 1rem !important;
    }
}
