/* Job Portal Styles v1.6.0 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

.jp-portal-container {
    font-family: 'Poppins', sans-serif;
    color: #333;
}

/* Tabs Navigation */
.jp-tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #dee2e6;
    background-color: #ffffff;
}

.jp-tabs-nav a {

    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.jp-tabs-nav a.active,
.jp-tabs-nav a:hover {
    color: #0073a8;
    border-bottom-color: #0073a8;
}

/* Tab Content */
.jp-tab-pane {
    display: none;
}

.jp-tab-pane.active {
    display: block;
}

/* Layout Structure for Job Offers Tab */
.jp-filter-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: #f8f9fb;
}

.jp-results-wrapper {
    background-color: #F1F3F6;


    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Content Wrapper */
.jp-content-wrapper {
    max-width: 1175px;
    margin: 0 auto;
    padding: 40px 20px;
}

.jp-results-wrapper .jp-content-wrapper {
    padding-top: 50px;
    padding-bottom: 50px;
}

/* Headings and Paragraphs */
#candidature-spontanee h2,
#demande-stage h2,
.jp-filter-section h2 {
    color: #021A2D;
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-style: normal;
    font-weight: 600;
    line-height: 124.5%;
    /* 27.39px */
}

#candidature-spontanee p,
#demande-stage p {
    margin-bottom: 30px;
    color: #495057;
}

/* Filter Form */
.jp-filter-section {
    margin-bottom: 0;
}

#job-filter-form .jp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

#job-filter-form .jp-form-row .jp-full-width {
    grid-column: 1 / -1;
}

.jp-form-group label {
    display: block;
    color: #545F71;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 124.5%;
    /* 14.94px */
    letter-spacing: 0.18px;
}

.jp-form-group input[type="text"],
.jp-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: none;
    /* <--- REMOVED BORDER */
    border-radius: 47px;
    background-color: #fff;
    font-size: 1rem;
    transition: box-shadow 0.2s ease;
    /* Updated transition */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    /* <--- ADDED SUBTLE SHADOW */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px 12px;
}

.jp-form-group input[type="text"] {
    background-image: none;
}

.jp-form-group input:focus,
.jp-form-group select:focus {
    outline: none;
    /* border-color: #C5BA90; */
    box-shadow: 0 0 0 3px rgba(197, 186, 144, 0.2);
}

.jp-form-actions {
    margin-top: 30px;
}

/* Filter Button Styles */
/* .jp-btn-search {
    background-color: #C5BA90;
    color: #ffffff;
    border: 2px solid #C5BA90;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.jp-btn-search:hover {
    background-color: #ffffff;
    color: #C5BA90;
    border-color: #C5BA90;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
} */

.jp-btn-reset {
    background-color: #C5BA90;
    color: #fff;
    border: 1px solid #C5BA90;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 1px;
    padding: 12px 30px;
    border-radius: 50px;
    margin-left: 15px;
    transition: all 0.3s ease;
}

.jp-btn-reset:hover {
    background-color: transparent;
    border: 2px solid #C5BA90;
    color: #C5BA90;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.jp-btn-reset:focus {
    background-color: transparent;
    border: 2px solid #C5BA90;
    color: #C5BA90;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Job Item Card Redesign */
.jp-job-item {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef0f3;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.jp-job-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.jp-job-item-main {
    flex-grow: 1;
}

.jp-job-item-action {
    flex-shrink: 0;
}

.jp-job-date {
    font-size: 0.9rem;
    color: #27a9e1;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.jp-job-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #003366;
    margin: 0 0 15px 0;
    font-family: 'Montserrat', sans-serif;
}

.jp-job-meta {
    font-size: 0.9rem;
    color: #003366;
    line-height: 1.7;
}

.jp-job-meta-item {
    margin-bottom: 4px;
    color: #434F6D;
}

.jp-job-meta-item strong {
    font-weight: 600;
    color: #434F6D;
}

.jp-btn-details {
    background-color: transparent;
    border: 1px solid #C5BA90;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: #303A54;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.jp-btn-details:hover {
    background-color: #C5BA90;
    color: #ffffff;
    transform: translateY(-2px);
}

.jp-btn-details:focus {
    background-color: #C5BA90;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Application & Internship Forms */
.jp-application-form {
    margin-top: 40px;
}

.jp-application-form .jp-form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.jp-application-form .jp-form-group input[type="text"],
.jp-application-form .jp-form-group input[type="email"],
.jp-application-form .jp-form-group input[type="tel"],
.jp-application-form .jp-form-group input[type="date"],
.jp-application-form .jp-form-group input[type="number"],
.jp-application-form .jp-form-group textarea {
    background-color: #fff;
    border: none;
    /* <--- REMOVED BORDER */
    border-radius: 47px;
    padding: 14px 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    /* <--- CHANGED TO OUTSIDE SHADOW */
    transition: all 0.2s ease-in-out;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    width: 100%;
}

.jp-application-form .jp-form-group input:focus,
.jp-application-form .jp-form-group textarea:focus {
    outline: none;
    border-color: #C5BA90;
    box-shadow: 0 0 0 4px rgba(197, 186, 144, 0.2);
}

.jp-application-form .jp-form-group input[type="file"] {
    padding: 12px;
    background-image: none;
    border: 1px dashed #ced4da;
    background-color: #f8f9fa;
}

.jp-application-form .jp-form-actions {
    text-align: left;
    margin-top: 10px;
}


.jp-btn.jp-btn-submit, .jp-btn.jp-btn-submit:focus {
    background-color: #C5BA90;
    color: #ffffff;
    border: 2px solid #C5BA90;
    color: #FFF;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    padding: 14px 35px;
    border-radius: 50px;
}



.jp-btn-search {
    color: #303A54 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    line-height: normal !important;
    border-radius: 30px !important;
    border: 1px solid #C5BA90 !important;
    background-color: transparent !important;
    padding: 14px 35px !important;
}


.jp-btn.jp-btn-submit:hover, .jp-btn-search:hover {
    background-color: #ffffff !important;
    color: #C5BA90 !important;
    border-color: #C5BA90 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
}

/* Feedback Messages */
.jp-form-feedback {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.jp-form-feedback.jp-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.jp-form-feedback.jp-error {
    background-color: #fffbe6;
    color: #8a6d3b;
    border: 1px solid #ffeeba;
}

/* Responsive */
@media (max-width: 768px) {
    .jp-job-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .jp-job-item-action {
        margin-top: 20px;
    }

    #job-filter-form .jp-form-row {
        grid-template-columns: 1fr;
    }
}

/* --- NEW STYLES FOR JOB DETAILS EXPAND --- */

/* Restructure job item to handle the new details section */
.jp-job-item {
    flex-direction: column;
    align-items: stretch;
    /* Allow children to take full width */
}

.jp-job-item-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    width: 100%;
}

/* Style for the details wrapper */
.jp-job-details-wrapper {
    border-top: 1px solid #eef0f3;
    margin-top: 25px;
    padding-top: 25px;
}

/* Styling the content inside the details view to match the image */
.jp-job-details-content {
    color: #434F6D;
    line-height: 1.8;
}

.jp-job-details-content h2,
.jp-job-details-content h3,
.jp-job-details-content h4 {
    font-family: 'Montserrat', sans-serif;
    color: #003366;
    margin-top: 2em;
    margin-bottom: 1em;
}

.jp-job-details-content ul {
    list-style-position: outside;
    padding-left: 20px;
    margin-bottom: 1.5em;
}

.jp-job-details-content li {
    margin-bottom: 0.5em;
}

.jp-job-details-content strong,
.jp-job-details-content b {
    font-weight: 600;
    color: #003366;
}

/* Footer with action buttons */
.jp-job-details-footer {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eef0f3;
}

.jp-job-actions-secondary {
    display: flex;
    gap: 8px;
}

.jp-action-btn {
    background: none;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #545F71;
    transition: all 0.2s ease;
}

.jp-action-btn:hover {
    background-color: #f8f9fb;
    border-color: #C5BA90;
    color: #C5BA90;
}

.jp-action-btn img {
    width: 20px;
    height: 20px;
}

/* Primary "Postuler" button */
.jp-btn-apply {
    background-color: transparent;
    color: #303A54;
    border: 2px solid #C5BA90;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
}

.jp-btn-apply:hover {
    background-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #000 !important;
}

/* Style for the "En savoir plus" button when active */
.jp-btn-details.active {
    background-color: #C5BA90;
    color: #ffffff;
}

/* Responsive adjustments for the summary part */
@media (max-width: 768px) {
    .jp-job-item-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .jp-job-item-action {
        margin-top: 20px;
        width: 100%;
    }

    .jp-btn-details {
        width: 100%;
        text-align: center;
    }

    .jp-job-details-footer {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .jp-btn-apply {
        text-align: center;
    }
}

/* --- NEW STYLES FOR APPLICATION & INTERNSHIP FORM LAYOUT --- */

/* Create a 2-column grid for form rows */
.jp-application-form .jp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

/* Allow a form group to span the full width of the grid */
.jp-application-form .jp-form-group.jp-full-width {
    grid-column: 1 / -1;
}

/* Make the textarea resizable only vertically and adjust its style */
.jp-application-form textarea {
    resize: vertical;
    min-height: 150px;
    border-radius: 20px;
    /* Adjust radius for larger element */
}

/* On smaller screens, stack the form fields in a single column */
@media (max-width: 768px) {
    .jp-application-form .jp-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.jp-action-btn:hover {
    background-color: #eef0f3 !important;
    transform: translateY(-2px);
}

/* --- Modern Job Details Grid --- */
.jp-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
    margin-top: 30px;
}

.jp-detail-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.jp-detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #C5BA90;
}

.jp-detail-icon {
    width: 45px;
    height: 45px;
    background-color: rgba(197, 186, 144, 0.1);
    /* Couleur C5BA90 très claire */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C5BA90;
    font-size: 18px;
    flex-shrink: 0;
}

.jp-detail-info {
    display: flex;
    flex-direction: column;
}

.jp-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8892A0;
    font-weight: 600;
    margin-bottom: 2px;
}

.jp-detail-value {
    font-size: 14px;
    color: #003366;
    font-weight: 600;
    line-height: 1.4;
}

/* Ajustement pour le contenu principal */
.jp-description {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid #f5f5f5;
}

/* Responsive */
@media (max-width: 600px) {
    .jp-details-grid {
        grid-template-columns: 1fr;
    }

    .jp-description {
        padding: 20px;
    }
}

/* --- Animations des Icônes --- */

/* 1. Animation de base pour toutes les icônes au survol de la carte */
.jp-detail-card:hover .jp-detail-icon i {
    animation: jp-bounce 0.5s ease;
    color: #003366;
    /* L'icône change de couleur pour le bleu foncé au survol */
}

/* 2. Animation spécifique pour l'horloge (Clock) - Rotation légère */
.jp-detail-card:hover .fa-clock {
    animation: jp-rotate 1.5s linear infinite !important;
}

/* 3. Animation spécifique pour le sablier (Hourglass) - Basculement */
.jp-detail-card:hover .fa-hourglass-half {
    animation: jp-flip 1s ease-in-out infinite !important;
}

/* --- Définition des Keyframes --- */

/* Petit rebond (Bounce) */
@keyframes jp-bounce {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }
}

/* Rotation (pour l'horloge) */
@keyframes jp-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Basculement (pour le sablier) */
@keyframes jp-flip {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(180deg);
    }
}

/* --- Animation d'entrée de la grille (Fade-in Up) --- */
.jp-details-grid {
    animation: jp-fadeInUp 0.8s ease-out forwards;
}

@keyframes jp-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optionnel : Apparition en cascade (Staggered) */
.jp-detail-card:nth-child(1) {
    animation-delay: 0.1s;
}

.jp-detail-card:nth-child(2) {
    animation-delay: 0.2s;
}

.jp-detail-card:nth-child(3) {
    animation-delay: 0.3s;
}

.jp-detail-card:nth-child(4) {
    animation-delay: 0.4s;
}

.jp-detail-card:nth-child(5) {
    animation-delay: 0.5s;
}

.jp-detail-card:nth-child(6) {
    animation-delay: 0.6s;
}