/* =========================================
   POSTE_DETAIL.CSS - Corrigé et cohérent avec la charte GVIVA
   ========================================= */

/* Hero Section - Utilise la même classe que les autres pages */
.section-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.section-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: white;
}

.hero-content p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Badges du job - Centrés sous le titre */
.job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.badge.featured {
    background: #f59e0b;
    color: white;
    animation: pulse 2s infinite;
}

.badge.urgent {
    background: #ef4444;
    color: white;
    animation: urgentBlink 1.5s infinite;
}

.badge.contract {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge.level {
    background: #10b981;
    color: white;
}

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

@keyframes urgentBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Métadonnées du job - Centrées */
.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.meta-item:hover {
    color: white;
    transform: translateY(-2px);
}

.meta-item.urgent {
    color: #fbbf24;
    font-weight: 600;
    animation: urgentGlow 2s infinite;
}

@keyframes urgentGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(251, 191, 36, 0.5); }
    50% { text-shadow: 0 0 20px rgba(251, 191, 36, 0.8); }
}

.meta-item i {
    font-size: 1rem;
    opacity: 0.8;
}

/* Section image du job - Séparée du hero */
.job-image-section {
    padding: 2rem 0;
    background: #f9fafb;
}

.job-image-container {
    text-align: center;
}

.job-image-container img {
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.job-image-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Section contenu principal */
.job-content {
    padding: 4rem 0;
    background: #f9fafb;
}

.content-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Détails du job */
.job-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.section:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section h2::before {
    content: "";
    width: 4px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section .content {
    color: #374151;
    line-height: 1.7;
}

/* Listes - Style cohérent */
.responsibilities-list,
.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.responsibilities-list li,
.skills-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.responsibilities-list li:last-child,
.skills-list li:last-child {
    border-bottom: none;
}

.responsibilities-list li:hover,
.skills-list li:hover {
    background: #f9fafb;
    padding-left: 1rem;
    border-radius: 8px;
}

.responsibilities-list li::before {
    content: "✓";
    background: #3b82f6;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.skills-list.required li::before {
    content: "●";
    background: #10b981;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.skills-list.desired li::before {
    content: "★";
    background: #f59e0b;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Sidebar de candidature */
.application-sidebar {
    position: sticky;
    top: 2rem;
}

.application-form-container {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.application-form-container h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.application-form-container h3::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Messages d'alerte */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

/* Formulaire */
.application-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: #ffffff;
    outline: none;
}


.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group small {
    color: #6b7280;
    font-size: 0.75rem;
    font-style: italic;
}

.form-group input[type="file"] {
    padding: 0.5rem;
    border-style: dashed;
    border-width: 2px;
    background: #f9fafb;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    background: #f3f4f6;
    border-color: var(--primary-light);
}

.form-group input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Bouton de soumission */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.btn-submit::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

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

.btn-submit:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-submit:focus {
    outline: none;
}

.btn-submit i {
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-submit span {
    position: relative;
    z-index: 1;
}

.btn-submit:hover i {
    transform: translateX(4px) scale(1.1);
}

/* Section jobs similaires */
.related-jobs {
    padding: 4rem 0;
    background: #ffffff;
}

.related-jobs h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin-bottom: 3rem;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.job-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.job-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.card-content p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-outline:focus {
    outline: none;
    background: var(--primary-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .application-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .job-badges {
        justify-content: center;
    }

    .job-meta {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 1rem;
    }

    .application-form-container {
        padding: 1rem;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
    }

    .related-jobs h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .section-hero {
        padding: 3rem 0;
    }

    .btn-submit {
        padding: 0.75rem 1.25rem;
    }
}