/* Container principal avec padding ajusté */
.om-offres-container,
.om-offre-detail {
    width: 100%;
    padding: 20px 20px 20px 40px;
    box-sizing: border-box;
}
.om-offres-container h1,
.om-offre-detail h1 {
    font-size: 1.8em;
    color: #002b5c;
    font-weight: bold;
    margin-bottom: 1em;
    border-bottom: 3px solid #002b5c;
    padding-bottom: 5px;
}

/* Table des offres de missions */
.om-offres-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    table-layout: auto;
}
.om-offres-table th {
    background-color: #002b5c;
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.om-offres-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bouton d'action */
.om-btn-view {
    background-color: #002b5c;
    color: #fff;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    cursor: pointer;
}
.om-btn-view:hover {
    background-color: #004a8d;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .om-offres-container,
    .om-offre-detail {
        overflow-x: auto;
    }
    .om-offres-table {
        display: block;
        white-space: nowrap;
    }
}

/* Détail de l'offre */
.om-offre-detail .om-mission-content {
    margin-bottom: 20px;
}
.om-btn-back {
    background-color: #002b5c;
    color: #fff;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    margin-bottom: 20px;
    display: inline-block;
}
.om-btn-back:hover {
    background-color: #004a8d;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Table de l’historique des candidatures */
.om-applications-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    table-layout: fixed;
    margin-top: 20px;
}
.om-applications-table th {
    background-color: #002b5c;
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    white-space: nowrap;
}
.om-applications-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    white-space: normal;
    overflow-wrap: break-word;   /* Évite de couper les mots */
    word-break: break-word;      /* Compatible pour anciens navigateurs */
    text-overflow: ellipsis;
}
/* Ajustement des largeurs des colonnes pour l’historique */
.om-applications-table th:nth-child(1) { width: 150px; }
.om-applications-table th:nth-child(2) { width: 80px; }
.om-applications-table th:nth-child(3) { width: 40px; }
.om-applications-table th:nth-child(4) { width: 140px; }
.om-applications-table th:nth-child(5) { width: 140px; }
.om-applications-table th:nth-child(6) { width: 240px; }
.om-applications-table th:nth-child(7) { width: 110px; }

/* Formulaire de candidature – disposition en flex */
.om-application-form {
    background: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.om-application-form .om-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}
.om-application-form .om-form-group {
    flex: 1;
    min-width: 200px;
}
.om-application-form label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}
.om-application-form input[type="file"],
.om-application-form input[type="text"],
.om-application-form input[type="date"],
.om-application-form select {
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.om-btn-submit {
    background-color: #002b5c;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}
.om-btn-submit:hover {
    background-color: #004a8d;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Lien de suppression dans l'historique */
.om-delete-application {
    color: #d9534f;
    cursor: pointer;
    text-decoration: underline;
}


/********************************/
/* PAGE TOUTES LES CANDIDATURES */
/********************************/
.all-candidatures-container {
    width: auto;
    padding: 20px 20px 20px 40px;
    box-sizing: border-box;
}

.all-candidatures-h1 {
    font-size: 1.8em;
    color: #002b5c;
    font-weight: bold;
    margin-bottom: 1em;
    text-align: left;
    border-bottom: 3px solid #002b5c;
    padding-bottom: 5px;
}

/* TABLEAU AVEC COLONNES INTELLIGENTES */
.table-candidatures {
    width: auto;
    table-layout: auto;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

/* EN-TÊTES OPTIMISÉS */
.table-candidatures th {
    background-color: #002b5c;
    color: white;
    padding: 12px 15px;
    text-align: left;
    white-space: nowrap;
}

/* CELLULES ADAPTATIVES */
.table-candidatures td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;   /* coupe si trop long */
    white-space: normal;     /* autorise le wrap */
}

/* LARGEURS SPÉCIFIQUES PAR COLONNE */
.table-candidatures td:nth-child(1), 
.table-candidatures th:nth-child(1) { /* Consultant */
    width: 15%;
    min-width: 30px;
}

.table-candidatures td:nth-child(2), 
.table-candidatures th:nth-child(2) { /* Société */
    width: 10%;
    min-width: 30px;
}

.table-candidatures td:nth-child(3), 
.table-candidatures th:nth-child(3) { /* Mission */
    width: 20%;
    min-width: 30px;
}

.table-candidatures td:nth-child(4), 
.table-candidatures th:nth-child(4) { /* CV */
    width: 5%;
    min-width: 20px;
}

.table-candidatures td:nth-child(5), 
.table-candidatures th:nth-child(5) { /* TJM */
    width: 5%;
    min-width: 20px;
}

.table-candidatures td:nth-child(6), 
.table-candidatures th:nth-child(6) { /* Date disponibilité */
    width: 10%;
    min-width: 30px;
}

.table-candidatures td:nth-child(7), 
.table-candidatures th:nth-child(7) { /* Date candidature */
    width: 10%;
    min-width: 30px;
}

.table-candidatures td:nth-child(8), 
.table-candidatures th:nth-child(8) { /* Statut */
    width: 20%;
    min-width: 30px;
	white-space: normal; /* Permet le retour à la ligne */
}

.table-candidatures td:nth-child(9), 
.table-candidatures th:nth-child(9) { /* Actions */
    width: 5%;
    min-width: 30px;
}

/* BOUTON CRA */
.btn-modifier {
    background-color: #002b5c;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-modifier:hover {
    background-color: #004a8d;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .all-candidatures-container {
        overflow-x: auto;
    }
    
    .table-candidatures {
        display: block;
        white-space: nowrap;
    }
    
    .table-candidatures td, 
    .table-candidatures th {
        display: inline-block;
        width: auto !important;
    }
}

/* Statut recrutement */
.status-recrutement {
    display: inline-block;
    margin-left: .5em;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .85em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-recrutement.recruited {
    background: #2ecc71;
    color: #fff;
}

.status-recrutement.proposed {
    background: #e67e22;
    color: #fff;
} 

/* Statut provenance */
.status-provenance {
    display: inline-block;
    margin-left: .5em;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .85em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-provenance.aion {
    background: #31708f;
    color: #fff;
}

.status-provenance.interne {
    background: #727273;
    color: #fff;
} 